Reported on RH 7.2 and 8.0. Compilation failed because system headers that
needed _GNU_SOURCE on these Redhat versions got included before it was
defined. To ensure _GNU_SOURCE is defined, added an autodetect for it to
config1.h and removed the need to set it in unixres.c. __linux__ is also
checked elsewhere.
Platform- and/or Interface-Specific Fixes
-----------------------------------------
+Gnome: compilation problems on Redhat 7.2 and 8.0
General New Features
Platform- and/or Interface-Specific New Features
------------------------------------------------
-
Platform- and/or Interface-Specific Fixes
-----------------------------------------
+Gnome: compilation problems on Redhat 7.2 and 8.0
General New Features
#endif
+#if defined(__linux__) && defined(__GNUC__) && !defined(_GNU_SOURCE)
+/* ensure _GNU_SOURCE is defined before including any system headers */
+# define _GNU_SOURCE
+#endif
+
#ifdef VMS /* really old compilers need special handling, detected here */
# undef UNIX
# ifdef __DECC
#ifdef GETRES_SUPPORT
# if defined(LINUX)
-#ifdef __GNUC__
-#define _GNU_SOURCE
-#endif
/* requires dynamic linking with libc */
#include <dlfcn.h>