This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Fixed build failure on Linux in cppfiles (_XOPEN_SOURCE is evil)

>>>>> Mark Mitchell writes:

>>>>> "Alexandre" == Alexandre Oliva <> writes:
>>> - Notice that we are using glibc, or particular versions of
>>> glibc, and turn on the defines there, since we know what they
>>> will do.

Alexandre> But this is probably the way to go at this time.

Mark> I agree.  Andreas, please produce an appropriate patch.

Mark> Thanks!

Here's a patch to follow your suggestions (the regenerated files are
not attached).  It reverts Geoff's last patch.  Is this ok to install?


2000-09-18  Andreas Jaeger  <>

	* Define _GNU_SOURCE only when using the GNU C
        * configure: Regenerated.
        * Regenerated.

---	2000/09/17 00:12:33	1.420
+++	2000/09/18 07:12:42
@@ -395,8 +395,19 @@
-# Define _GNU_SOURCE, since this is a GNU program.
-AC_DEFINE(_GNU_SOURCE, 1, [Always define this])
+AC_MSG_CHECKING(for GNU C library)
+  [#include <features.h>],[
+#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
+#error Not a GNU C library system
+  [gcc_cv_glibc=yes], 
+  gcc_cv_glibc=no)])
+if test "gcc_cv_glibc" = "yes"; then
+  AC_DEFINE(_GNU_SOURCE, 1, [Always define this when using the GNU C Library])

 Andreas Jaeger
  SuSE Labs

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]