summaryrefslogtreecommitdiff
path: root/utils/config.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2010-04-26 09:27:16 +0000
committerVincent Sanders <vince@netsurf-browser.org>2010-04-26 09:27:16 +0000
commitbd9c0d9a7e03dff94904000384b5a03ce13d6f29 (patch)
tree88cdfaf94d6d0491e96594c04f3c07b7668566cf /utils/config.h
parenta2c1afcc32eda671253b55e91fc79326071bf733 (diff)
downloadnetsurf-bd9c0d9a7e03dff94904000384b5a03ce13d6f29.tar.gz
netsurf-bd9c0d9a7e03dff94904000384b5a03ce13d6f29.tar.bz2
hopefully fix the _GNU_SOURCE mess
svn path=/trunk/netsurf/; revision=10487
Diffstat (limited to 'utils/config.h')
-rw-r--r--utils/config.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/utils/config.h b/utils/config.h
index ba6d9b464..4a4fa069c 100644
--- a/utils/config.h
+++ b/utils/config.h
@@ -23,15 +23,30 @@
/* Try to detect which features the target OS supports */
+#if (defined(_GNU_SOURCE))
+#define HAVE_STRNDUP
+#else
+#undef HAVE_STRNDUP
char *strndup(const char *s, size_t n);
+#endif
+#if (defined(_GNU_SOURCE))
#define HAVE_STRCASESTR
-#if (!(defined(__NetBSD__) || defined(__OpenBSD__)) \
- || defined(riscos) || defined(__APPLE__) || defined(_WIN32))
+#else
#undef HAVE_STRCASESTR
char *strcasestr(const char *haystack, const char *needle);
#endif
+/* For some reason, UnixLib defines this unconditionally.
+ * Assume we're using UnixLib if building for RISC OS. */
+#if (defined(_GNU_SOURCE) || defined(riscos))
+#define HAVE_STRCHRNUL
+#else
+#undef HAVE_STRCHRNUL
+char *strchrnul(const char *s, int c);
+#endif
+
+
#define HAVE_UTSNAME
#if (defined(_WIN32))
#undef HAVE_UTSNAME
@@ -52,13 +67,6 @@ char *strcasestr(const char *haystack, const char *needle);
#undef HAVE_STDOUT
#endif
-#define HAVE_STRCHRNUL
-/* For some reason, UnixLib defines this unconditionally.
- * Assume we're using UnixLib if building for RISC OS. */
-#if !(defined(riscos))
-#undef HAVE_STRCHRNUL
-char *strchrnul(const char *s, int c);
-#endif
/* This section toggles build options on and off.
* Simply undefine a symbol to turn the relevant feature off.