]> git.lyx.org Git - lyx.git/blobdiff - 3rdparty/boost/boost/cstdint.hpp
inputenc only expects one option
[lyx.git] / 3rdparty / boost / boost / cstdint.hpp
index 69888352dae572432abd9ba7a9835c996bac15b0..9c88d13b84ff2d3decabd6f730acc1c2196ba60c 100644 (file)
 #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
@@ -41,9 +52,9 @@
 // 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.
@@ -60,7 +71,7 @@
 #   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
@@ -69,7 +80,7 @@
 
 # endif
 
-#ifdef __QNX__
+#if defined(__QNX__) && defined(__EXT_QNX) 
 
 // QNX (Dinkumware stdlib) defines these as non-standard names.
 // Reflect to the standard names.
@@ -367,14 +378,11 @@ namespace boost
 #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;
@@ -393,8 +401,6 @@ namespace boost {
 
 #endif
 
-#endif // !defined(__PGIC__)
-
 #endif // BOOST_CSTDINT_HPP
 
 
@@ -413,15 +419,19 @@ INT#_C macros if they're not already defined (John Maddock).
 #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