summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/config.h13
-rw-r--r--utils/url.c1
-rw-r--r--utils/utf8.c1
-rw-r--r--utils/utils.c2
4 files changed, 2 insertions, 15 deletions
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
diff --git a/utils/url.c b/utils/url.c
index b02d77756..5cb7305e8 100644
--- a/utils/url.c
+++ b/utils/url.c
@@ -22,7 +22,6 @@
* URL parsing and joining (implementation).
*/
-#define _GNU_SOURCE /* for strdup() */
#include <sys/types.h>
#include <assert.h>
#include <ctype.h>
diff --git a/utils/utf8.c b/utils/utf8.c
index f866562e1..d7fef5e7a 100644
--- a/utils/utf8.c
+++ b/utils/utf8.c
@@ -20,7 +20,6 @@
* UTF-8 manipulation functions (implementation).
*/
-#define _GNU_SOURCE /* for strndup */
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
diff --git a/utils/utils.c b/utils/utils.c
index 175b33073..b0069365e 100644
--- a/utils/utils.c
+++ b/utils/utils.c
@@ -295,7 +295,6 @@ char *strcasestr(const char *haystack, const char *needle)
#endif
-#ifndef HAVE_STRNDUP
/**
* Duplicate up to n characters of a string.
@@ -318,7 +317,6 @@ char *strndup(const char *s, size_t n)
return s2;
}
-#endif
#ifndef HAVE_STRCHRNUL