[exim-cvs] Define _ISOC99_SOURCE in exim.h

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Exim Git Commits Mailing List
Date:  
À: exim-cvs
Sujet: [exim-cvs] Define _ISOC99_SOURCE in exim.h
Gitweb: http://git.exim.org/exim.git/commitdiff/b87a6e0eedc31fdaa0d468349769b265db904aa7
Commit:     b87a6e0eedc31fdaa0d468349769b265db904aa7
Parent:     5b257915c7b51e64b90bc6d89520514e0f4d4164
Author:     Phil Pennock <pdp@???>
AuthorDate: Wed May 23 23:27:44 2012 -0400
Committer:  Phil Pennock <pdp@???>
CommitDate: Wed May 23 23:27:44 2012 -0400


    Define _ISOC99_SOURCE in exim.h


    Done before os.h is pulled in so an OS can override it.
---
 doc/doc-txt/ChangeLog |    5 +++++
 src/OS/os.h-Linux     |    6 +++---
 src/src/exim.h        |    5 +++++
 3 files changed, 13 insertions(+), 3 deletions(-)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 8c7dc72..ef3236a 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -149,6 +149,11 @@ 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
+      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.
+


Exim version 4.77
-----------------
diff --git a/src/OS/os.h-Linux b/src/OS/os.h-Linux
index 5186ec8..fe4eaa6 100644
--- a/src/OS/os.h-Linux
+++ b/src/OS/os.h-Linux
@@ -1,8 +1,8 @@
/* Exim: OS-specific C header file for Linux */

-/* Some weird variants may require invocation with C99 and features.h
-inclusion to build, with the 64-bit arithmetic. Make compiler selection
-their problem, but build anyway. */
+/* Some old systems we've received bug-reports for have a <limits.h> which
+does not pull in <features.h>. Best to just pull it in now and have done
+with the issue. */

#include <features.h>

diff --git a/src/src/exim.h b/src/src/exim.h
index 601dfed..987aebf 100644
--- a/src/src/exim.h
+++ b/src/src/exim.h
@@ -20,6 +20,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. */
+
+#define _ISOC99_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. */