[exim-cvs] _ISOC99_SOURCE -> _GNU_SOURCE

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] _ISOC99_SOURCE -> _GNU_SOURCE
Gitweb: http://git.exim.org/exim.git/commitdiff/57eb9e91fe084ad434fcc286f0135e89b658c213
Commit:     57eb9e91fe084ad434fcc286f0135e89b658c213
Parent:     b87a6e0eedc31fdaa0d468349769b265db904aa7
Author:     Phil Pennock <pdp@???>
AuthorDate: Wed May 23 23:43:20 2012 -0400
Committer:  Phil Pennock <pdp@???>
CommitDate: Wed May 23 23:43:20 2012 -0400


    _ISOC99_SOURCE -> _GNU_SOURCE


    _ISOC99_SOURCE broke build on Linux (Ubuntu 11.10) because it broke <resolv.h>, <arpa/nameser.h>, etc.
    Their u_char and u_int usage relies upon BSD source being enabled too.  So use _GNU_SOURCE.
---
 doc/doc-txt/ChangeLog |    2 +-
 src/src/exim.h        |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index ef3236a..b7a6a00 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -149,7 +149,7 @@ PP/34 Validate tls_require_ciphers on startup, since debugging an invalid
 PP/35 Pull in <features.h> on Linux, for some portability edge-cases of
       64-bit ${eval} (JH/03).


-PP/36 Define _ISOC99_SOURCE in exim.h; it's needed for some releases of
+PP/36 Define _GNU_SOURCE in exim.h; it's needed for some releases of
       GNU libc to support some of the 64-bit stuff, should not lead to
       conflicts.  Defined before os.h is pulled in, so if a given platform
       needs to override this, it can.
diff --git a/src/src/exim.h b/src/src/exim.h
index 987aebf..c18c9ae 100644
--- a/src/src/exim.h
+++ b/src/src/exim.h
@@ -21,9 +21,11 @@ This call dates back at least as far as SUSv2. */
 #define HAVE_SRANDOM


/* This is primarily for the Gnu C library; we define it before os.h so that
-os.h has a chance to hurriedly undef it, Just In Case. */
+os.h has a chance to hurriedly undef it, Just In Case. We need C99 for some
+64-bit math support, and defining _ISOC99_SOURCE breaks <resolv.h> and friends.
+*/

-#define _ISOC99_SOURCE 1
+#define _GNU_SOURCE 1

/* First of all include the os-specific header, which might set things that
are needed by any of the other headers, including system headers. */