Fixed build failure on Linux in cppfiles (_XOPEN_SOURCEis evil)

Mark Mitchell mark@codesourcery.com
Sat Sep 16 10:31:00 GMT 2000


>>>>> "Andreas" == Andreas Jaeger <aj@suse.de> writes:

    >>> * configure.in: Always define _GNU_SOURCE to make interfaces
    >>> visible that were hidden by only defining _GNU_SOURCE.

    >> Ok

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                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


More information about the Gcc-patches mailing list