#endif
#include <boost/config.hpp>
+//
+// For the following code we get several warnings along the lines of:
+//
+// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant
+//
+// So we declare this a system header to suppress these warnings.
+// See also https://github.com/boostorg/config/issues/190
+//
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+#pragma GCC system_header
+#endif
//
// Note that GLIBC is a bit inconsistent about whether int64_t is defined or not
// so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG.
// See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990
//
-#if defined(BOOST_HAS_STDINT_H) \
- && (!defined(__GLIBC__) \
- || defined(__GLIBC_HAVE_LONG_LONG) \
+#if defined(BOOST_HAS_STDINT_H) \
+ && (!defined(__GLIBC__) \
+ || defined(__GLIBC_HAVE_LONG_LONG) \
|| (defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 17)))))
// The following #include is an implementation artifact; not part of interface.
# include <stdint.h>
// There is a bug in Cygwin two _C macros
-# if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__)
+# if defined(INTMAX_C) && defined(__CYGWIN__)
# undef INTMAX_C
# undef UINTMAX_C
# define INTMAX_C(c) c##LL
# endif
-#ifdef __QNX__
+#if defined(__QNX__) && defined(__EXT_QNX)
// QNX (Dinkumware stdlib) defines these as non-standard names.
// Reflect to the standard names.
#include <stddef.h>
#endif
-// PGI seems to not support intptr_t/uintptr_t properly. BOOST_HAS_STDINT_H is not defined for this compiler by Boost.Config.
-#if !defined(__PGIC__)
-
#if (defined(BOOST_WINDOWS) && !defined(_WIN32_WCE)) \
|| (defined(_XOPEN_UNIX) && (_XOPEN_UNIX+0 > 0) && !defined(__UCLIBC__)) \
- || defined(__CYGWIN__) \
+ || defined(__CYGWIN__) || defined(__VXWORKS__) \
|| defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \
- || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(sun)
+ || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || (defined(sun) && !defined(BOOST_HAS_STDINT_H)) || defined(INTPTR_MAX)
namespace boost {
using ::intptr_t;
#endif
-#endif // !defined(__PGIC__)
-
#endif // BOOST_CSTDINT_HPP
#if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && \
(!defined(INT8_C) || !defined(INT16_C) || !defined(INT32_C) || !defined(INT64_C))
//
-// For the following code we get several warnings along the lines of:
-//
-// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant
-//
-// So we declare this a system header to suppress these warnings.
+// Undef the macros as a precaution, since we may get here if <stdint.h> has failed
+// to define them all, see https://svn.boost.org/trac/boost/ticket/12786
//
-#if defined(__GNUC__) && (__GNUC__ >= 4)
-#pragma GCC system_header
-#endif
+#undef INT8_C
+#undef INT16_C
+#undef INT32_C
+#undef INT64_C
+#undef INTMAX_C
+#undef UINT8_C
+#undef UINT16_C
+#undef UINT32_C
+#undef UINT64_C
+#undef UINTMAX_C
#include <limits.h>
# define BOOST__STDC_CONSTANT_MACROS_DEFINED