aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-02-13 09:58:23 +0000
committerJustus Winter <[email protected]>2017-03-08 10:34:21 +0000
commit5e51b642f747547c737a7abbc37e65b0f630d188 (patch)
tree62e76288d8108af08d3e4a2c25f1ce760aa38aa7
parentw32: Conditionalize ISO 2022 definitions. (diff)
downloadlibgpg-error-5e51b642f747547c737a7abbc37e65b0f630d188.tar.gz
libgpg-error-5e51b642f747547c737a7abbc37e65b0f630d188.zip
build: Use macOS' compatibility macros to enable all features.
* configure.ac: On macOS, use the compatibility macros to expose every feature of the libc. This is the equivalent of _GNU_SOURCE on GNU libc. -- Not defining this leads to compilation errors or superfluous warnings on macOS. GnuPG-bug-id: 2910 Signed-off-by: Justus Winter <[email protected]>
-rw-r--r--configure.ac8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index a44f0c8..d5c6887 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,7 +81,7 @@ AC_PROG_AWK
AC_CHECK_TOOL(AR, ar, :)
AC_GNU_SOURCE
-# Set some internal variables depending on the platform for later use.
+# Set some variables depending on the platform for later use.
have_w32_system=no
have_w64_system=no
have_w32ce_system=no
@@ -97,6 +97,12 @@ case "${host}" in
*-mingw32*)
have_w32_system=yes
;;
+ *-apple-darwin*)
+ # This is the equivalent of the _GNU_SOURCE feature-test-macro
+ # on GNU libc systems.
+ AC_DEFINE(_DARWIN_C_SOURCE, 900000L,
+ Expose all libc features (__DARWIN_C_FULL).)
+ ;;
*)
;;
esac