changeset 29228:e00bc0cd9038

Fix problem with _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H on VMS. * lib/stdint.in.h (_GL_JUST_INCLUDE_SYSTEM_INTTYPES_H): Define before any system include files, and undef after them all. This should fix a problem on VMS reported by John E. Malmberg in <http://lists.gnu.org/archive/html/bug-gnulib/2007-12/msg00118.html>.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 18 Dec 2007 16:11:25 -0800
parents 0be09e88acb1
children 20d66442dcb3
files ChangeLog lib/stdint.in.h
diffstat 2 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Dec 17 21:50:40 2007 -0700
+++ b/ChangeLog	Tue Dec 18 16:11:25 2007 -0800
@@ -1,3 +1,11 @@
+2007-12-18  Paul Eggert  <eggert@cs.ucla.edu>
+
+	Fix problem with _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H on VMS.
+	* lib/stdint.in.h (_GL_JUST_INCLUDE_SYSTEM_INTTYPES_H): Define
+	before any system include files, and undef after them all.  This
+	should fix a problem on VMS reported by John E. Malmberg in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2007-12/msg00118.html>.
+
 2007-12-17  Eric Blake  <ebb9@byu.net>
 
 	Revert addition of verify, for BSD/OS.
--- a/lib/stdint.in.h	Mon Dec 17 21:50:40 2007 -0700
+++ b/lib/stdint.in.h	Tue Dec 18 16:11:25 2007 -0800
@@ -23,6 +23,12 @@
 
 #ifndef _GL_STDINT_H
 
+/* When including a system file that in turn includes <inttypes.h>,
+   use the system <inttypes.h>, not our substitute.  This avoids
+   problems with (for example) VMS, whose <sys/bitypes.h> includes
+   <inttypes.h>.  */
+#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+
 /* Get those types that are already defined in other system include
    files, so that we can "#define int8_t signed char" below without
    worrying about a later system include file containing a "typedef
@@ -66,9 +72,7 @@
   /* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines
      int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
      <inttypes.h> also defines intptr_t and uintptr_t.  */
-# define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
 # include <inttypes.h>
-# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
 #elif @HAVE_SYS_INTTYPES_H@
   /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
      the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX.  */
@@ -91,6 +95,8 @@
 
 #endif
 
+#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+
 /* Minimum and maximum values for a integer type under the usual assumption.
    Return an unspecified value if BITS == 0, adding a check to pacify
    picky compilers.  */