This is the mail archive of the
mailing list for the GCC project.
Re: Fixed build failure on Linux in cppfiles (_XOPEN_SOURCEis evil)
>>>>> "Andreas" == Andreas Jaeger <email@example.com> writes:
>>> * configure.in: Always define _GNU_SOURCE to make interfaces
>>> visible that were hidden by only defining _GNU_SOURCE.
Actually, I was about to disapprove this patch, in favor a simple cast
to char * for the munmap bits.
We don't have any way of knowing what these macros are doing on
non-glibc based systems. Defining these macros unconditionally on all
systems is a mistake.
If we need to define these macros, then the tests should look like:
Do we have getpagesize?
If so, stop.
If not, do we have getpagesize when we define _GNU_SOURCE?
If so, define _GNU_SOURCE and stop.
That follows the usual autoconf philosophy of figuring out what you
need to do to make a particular system work.
Andreas, would you make a change along these lines?
Mark Mitchell firstname.lastname@example.org
CodeSourcery, LLC http://www.codesourcery.com