From cc3b6eb3e4bd6e86f210917badf1e6ac34b2d7b8 Mon Sep 17 00:00:00 2001
From: hniksic <devnull@localhost>
Date: Wed, 15 Nov 2000 10:10:01 -0800
Subject: [PATCH] [svn] Do the _XOPEN_SOURCE/_SVID_SOURCE things only on Linux.

---
 src/ChangeLog   |  5 +++++
 src/config.h.in | 13 +++++++++----
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index 79ed0a3e..1b9f4a02 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2000-11-15  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+	* config.h.in: Do the _XOPEN_SOURCE and _SVID_SOURCE things only
+	on Linux.
+
 2000-11-12  Hrvoje Niksic  <hniksic@arsdigita.com>
 
 	* host.c (realhost): Add HOST to the list with quality==0 only if
diff --git a/src/config.h.in b/src/config.h.in
index 709b979b..2038acde 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -204,10 +204,15 @@ char *alloca ();
    But I don't think that's right.  The __USE_XOPEN thing is an
    internal glibc2 thing that gets defined in features.h.  From
    reading that file carefully, I think we need something like this
-   incantation.  Without testing it, I can only hope that this won't
-   screw things up on other, non-glibc2 systems.  */
+   incantation to get the kind of features we use.
 
-#define _XOPEN_SOURCE 500
-#define _SVID_SOURCE
+   However, testing Wget under Solaris showed that compilation of
+   connect.c chokes because of the _XOPEN_SOURCE definition.  So I'm
+   disabling it.  If anyone understands this maze, please help!  */
+
+#ifdef __linux__
+# define _XOPEN_SOURCE 500
+# define _SVID_SOURCE
+#endif
 
 #endif /* CONFIG_H */