diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2015-12-04 09:15:29 +0100 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2015-12-04 10:01:52 +0100 |
commit | 7af29da05d2e5a5e311a5f73f20d0f232035973b (patch) | |
tree | f37df9bb14fa7baccf3c017fe61e1e267fad8420 /rts | |
parent | 99d01e1d82505e168224043d10e7ce116f5617ae (diff) | |
download | haskell-7af29da05d2e5a5e311a5f73f20d0f232035973b.tar.gz |
Use Autoconf's AC_USE_SYSTEM_EXTENSIONS
This takes care of setting feature test macros (i.e. let Autoconf decide when
those can be set safely) to allow subsequent Autoconf tests to better detect
available OS features.
This also includes a submodule update of unix which enables the use of
`AC_USE_SYSTEM_EXTENSIONS` in there as well.
Specifically, this takes care of setting `_GNU_SOURCE` (which allows to remove
two occurences where it's set manually) and `_ALL_SOURCE` (which fixes issues
on AIX).
See also
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Posix-Variants.html
for details.
At some point we may want to reconsider the purpose of "rts/PosixSource.h" and
rely more on Autoconf instead.
Diffstat (limited to 'rts')
-rw-r--r-- | rts/Linker.c | 7 | ||||
-rw-r--r-- | rts/posix/OSThreads.c | 6 |
2 files changed, 0 insertions, 13 deletions
diff --git a/rts/Linker.c b/rts/Linker.c index 51142c57ce..f728f0e175 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -10,13 +10,6 @@ #include "PosixSource.h" #endif -/* Linux needs _GNU_SOURCE to get RTLD_DEFAULT from <dlfcn.h> and - MREMAP_MAYMOVE from <sys/mman.h>. - */ -#if defined(__linux__) || defined(__GLIBC__) -#define _GNU_SOURCE 1 -#endif - #include "Rts.h" #include "HsFFI.h" diff --git a/rts/posix/OSThreads.c b/rts/posix/OSThreads.c index 8c1beda5cf..91f95237ae 100644 --- a/rts/posix/OSThreads.c +++ b/rts/posix/OSThreads.c @@ -7,12 +7,6 @@ * * --------------------------------------------------------------------------*/ -#if defined(__linux__) || defined(__GLIBC__) -/* We want GNU extensions in DEBUG mode for mutex error checking */ -/* We also want the affinity API, which requires _GNU_SOURCE */ -#define _GNU_SOURCE -#endif - #include "PosixSource.h" #if defined(freebsd_HOST_OS) |