summaryrefslogtreecommitdiff
path: root/lib/stdint.in.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-12-19 18:00:28 +0100
committerAndy Wingo <wingo@pobox.com>2011-12-19 18:00:28 +0100
commit296004b3ba34139292eb1d8bf54739ee1a082712 (patch)
tree149e2c87f169583ade59bbb876530fc03af9b2ea /lib/stdint.in.h
parentbfe35b90ff0c7f78335e70bdb26ea3466f6e98d9 (diff)
parent52b680f85e84689778f10ed8f9e72adf8316fbe7 (diff)
downloadguile-296004b3ba34139292eb1d8bf54739ee1a082712.tar.gz
Merge remote-tracking branch 'origin/stable-2.0'
Conflicts: libguile/feature.c m4/gnulib-cache.m4 module/ice-9/deprecated.scm module/language/tree-il/peval.scm
Diffstat (limited to 'lib/stdint.in.h')
-rw-r--r--lib/stdint.in.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/stdint.in.h b/lib/stdint.in.h
index 16967f2e8..1451dbf25 100644
--- a/lib/stdint.in.h
+++ b/lib/stdint.in.h
@@ -49,6 +49,17 @@
diagnostics. */
# define __STDINT_H__
# endif
+
+ /* Some pre-C++11 <stdint.h> implementations need this. */
+# ifdef __cplusplus
+# ifndef __STDC_CONSTANT_MACROS
+# define __STDC_CONSTANT_MACROS 1
+# endif
+# ifndef __STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS 1
+# endif
+# endif
+
/* Other systems may have an incomplete or buggy <stdint.h>.
Include it before <inttypes.h>, since any "#include <stdint.h>"
in <inttypes.h> would reinclude us, skipping our contents because
@@ -313,8 +324,6 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
/* 7.18.2. Limits of specified-width integer types */
-#if ! defined __cplusplus || defined __STDC_LIMIT_MACROS
-
/* 7.18.2.1. Limits of exact-width integer types */
/* Here we assume a standard architecture where the hardware integer
@@ -534,12 +543,8 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
#define WINT_MAX \
_STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
-#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */
-
/* 7.18.4. Macros for integer constants */
-#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
-
/* 7.18.4.1. Macros for minimum-width integer constants */
/* According to ISO C 99 Technical Corrigendum 1 */
@@ -600,7 +605,5 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
# endif
#endif
-#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
-
#endif /* _@GUARD_PREFIX@_STDINT_H */
#endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */