]> granicus.if.org Git - nethack/commitdiff
U277 - Gnome compilation on Redhat 7.2 & 8.0
authorcohrs <cohrs>
Sun, 2 Mar 2003 06:07:19 +0000 (06:07 +0000)
committercohrs <cohrs>
Sun, 2 Mar 2003 06:07:19 +0000 (06:07 +0000)
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.

doc/fixes34.2
doc/fixes35.0
include/config1.h
sys/unix/unixres.c

index bea639d3e9dee612a24af48ff7bd1a424c0bce10..0e233ae196eeb650e5f7e5ec54453d23819a3353 100644 (file)
@@ -7,6 +7,7 @@ avoid panic when secondary weapon is cursed while generating bones level
 
 Platform- and/or Interface-Specific Fixes
 -----------------------------------------
+Gnome: compilation problems on Redhat 7.2 and 8.0
 
 
 General New Features
@@ -16,5 +17,4 @@ General New Features
 Platform- and/or Interface-Specific New Features
 ------------------------------------------------
 
 
index 15f244766d2278ebe29ea0a6c854e6207c22a043..58d693e9004a8342879dd75b7892a34a0534aa5f 100644 (file)
@@ -8,6 +8,7 @@ avoid panic when secondary weapon is cursed while generating bones level
 
 Platform- and/or Interface-Specific Fixes
 -----------------------------------------
+Gnome: compilation problems on Redhat 7.2 and 8.0
 
 
 General New Features
index 6c6d7af77872493b8166a0a9a70fc128e11baff1..d17225f6a0e3bac6d2db6f6223bcccaf21ca9219 100644 (file)
 #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
index bf352ba6266aa143359b52d7513058e30298aa00..8c234e57361edfb91584a1a453073cc07639758d 100644 (file)
@@ -19,9 +19,6 @@
 #ifdef GETRES_SUPPORT
 
 # if defined(LINUX)
-#ifdef __GNUC__
-#define _GNU_SOURCE
-#endif
 
 /* requires dynamic linking with libc */
 #include <dlfcn.h>