summaryrefslogtreecommitdiff
path: root/boost/cstdint.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/cstdint.hpp')
-rw-r--r--boost/cstdint.hpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/boost/cstdint.hpp b/boost/cstdint.hpp
index bf7097ec8c..31b67417ae 100644
--- a/boost/cstdint.hpp
+++ b/boost/cstdint.hpp
@@ -374,7 +374,7 @@ namespace boost
|| (defined(_XOPEN_UNIX) && (_XOPEN_UNIX+0 > 0) && !defined(__UCLIBC__)) \
|| defined(__CYGWIN__) \
|| 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;
@@ -422,6 +422,20 @@ INT#_C macros if they're not already defined (John Maddock).
#if defined(__GNUC__) && (__GNUC__ >= 4)
#pragma GCC system_header
#endif
+//
+// 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
+//
+#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