From 03bb3e863663a034434b000fbfce2de7e908ba24 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 24 Apr 2010 15:22:17 +0000 Subject: remove _GNU_SOURCE define from everywhere. strndup is not standard so provide an implementation. svn path=/trunk/netsurf/; revision=10474 --- utils/config.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'utils/config.h') diff --git a/utils/config.h b/utils/config.h index ba8d8227b..ba6d9b464 100644 --- a/utils/config.h +++ b/utils/config.h @@ -23,19 +23,10 @@ /* Try to detect which features the target OS supports */ -#define HAVE_STRNDUP -#if defined(__FreeBSD__) || (defined(__SRV4) && defined(__sun)) || \ - defined(__APPLE__) || defined(__HAIKU__) || defined(__BEOS__) \ - || defined(__OpenBSD__) || defined(_WIN32) - /* FreeBSD and Solaris do not have this function, so - * we implement it ourselves in util.c - */ -#undef HAVE_STRNDUP char *strndup(const char *s, size_t n); -#endif #define HAVE_STRCASESTR -#if (!(defined(_GNU_SOURCE) || defined(__NetBSD__) || defined(__OpenBSD__)) \ +#if (!(defined(__NetBSD__) || defined(__OpenBSD__)) \ || defined(riscos) || defined(__APPLE__) || defined(_WIN32)) #undef HAVE_STRCASESTR char *strcasestr(const char *haystack, const char *needle); @@ -64,7 +55,7 @@ char *strcasestr(const char *haystack, const char *needle); #define HAVE_STRCHRNUL /* For some reason, UnixLib defines this unconditionally. * Assume we're using UnixLib if building for RISC OS. */ -#if !(defined(_GNU_SOURCE) || defined(riscos)) +#if !(defined(riscos)) #undef HAVE_STRCHRNUL char *strchrnul(const char *s, int c); #endif -- cgit v1.2.3