]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/cstdint.hpp
Also display the info about BibTeX databases in the TeX info panel.
[lyx.git] / boost / boost / cstdint.hpp
index 47e6a160c6c50829233f18a6b4ac97cf3d0f1664..ea84b65062fa3b84c9af93e1cef743cc5416fee7 100644 (file)
@@ -137,7 +137,7 @@ namespace boost
 
 } // namespace boost
 
-#elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__)
+#elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__) || defined(__VMS)
 // FreeBSD and Tru64 have an <inttypes.h> that contains much of what we need.
 # include <inttypes.h>
 
@@ -256,20 +256,27 @@ namespace boost
 
 //  32-bit types  -----------------------------------------------------------//
 
-# if ULONG_MAX == 0xffffffff
-     typedef long            int32_t;
-     typedef long            int_least32_t;
-     typedef long            int_fast32_t;
-     typedef unsigned long   uint32_t;
-     typedef unsigned long   uint_least32_t;
-     typedef unsigned long   uint_fast32_t;
-# elif UINT_MAX == 0xffffffff
+# if UINT_MAX == 0xffffffff
      typedef int             int32_t;
      typedef int             int_least32_t;
      typedef int             int_fast32_t;
      typedef unsigned int    uint32_t;
      typedef unsigned int    uint_least32_t;
      typedef unsigned int    uint_fast32_t;
+# elif (USHRT_MAX == 0xffffffff)
+     typedef short             int32_t;
+     typedef short             int_least32_t;
+     typedef short             int_fast32_t;
+     typedef unsigned short    uint32_t;
+     typedef unsigned short    uint_least32_t;
+     typedef unsigned short    uint_fast32_t;
+# elif ULONG_MAX == 0xffffffff
+     typedef long            int32_t;
+     typedef long            int_least32_t;
+     typedef long            int_fast32_t;
+     typedef unsigned long   uint32_t;
+     typedef unsigned long   uint_least32_t;
+     typedef unsigned long   uint_fast32_t;
 # elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__) 
       // Integers are 64 bits on the MTA / XMT 
       typedef __int32           int32_t; 
@@ -366,58 +373,87 @@ INT#_C macros if they're not already defined (John Maddock).
 
 ******************************************************/
 
-#if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && !defined(INT8_C)
+#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. 
+//
+#if defined(__GNUC__) && (__GNUC__ >= 4) 
+#pragma GCC system_header 
+#endif 
+
 #include <limits.h>
 # define BOOST__STDC_CONSTANT_MACROS_DEFINED
 # if defined(BOOST_HAS_MS_INT64)
 //
 // Borland/Intel/Microsoft compilers have width specific suffixes:
 //
+#ifndef INT8_C
 #  define INT8_C(value)     value##i8
+#endif
+#ifndef INT16_C
 #  define INT16_C(value)    value##i16
+#endif
+#ifndef INT32_C
 #  define INT32_C(value)    value##i32
+#endif
+#ifndef INT64_C
 #  define INT64_C(value)    value##i64
+#endif
 #  ifdef __BORLANDC__
     // Borland bug: appending ui8 makes the type a signed char
 #   define UINT8_C(value)    static_cast<unsigned char>(value##u)
 #  else
 #   define UINT8_C(value)    value##ui8
 #  endif
+#ifndef UINT16_C
 #  define UINT16_C(value)   value##ui16
+#endif
+#ifndef UINT32_C
 #  define UINT32_C(value)   value##ui32
+#endif
+#ifndef UINT64_C
 #  define UINT64_C(value)   value##ui64
+#endif
+#ifndef INTMAX_C
 #  define INTMAX_C(value)   value##i64
 #  define UINTMAX_C(value)  value##ui64
+#endif
 
 # else
 //  do it the old fashioned way:
 
 //  8-bit types  ------------------------------------------------------------//
 
-#  if UCHAR_MAX == 0xff
+#  if (UCHAR_MAX == 0xff) && !defined(INT8_C)
 #   define INT8_C(value) static_cast<boost::int8_t>(value)
 #   define UINT8_C(value) static_cast<boost::uint8_t>(value##u)
 #  endif
 
 //  16-bit types  -----------------------------------------------------------//
 
-#  if USHRT_MAX == 0xffff
+#  if (USHRT_MAX == 0xffff) && !defined(INT16_C)
 #   define INT16_C(value) static_cast<boost::int16_t>(value)
 #   define UINT16_C(value) static_cast<boost::uint16_t>(value##u)
 #  endif
 
 //  32-bit types  -----------------------------------------------------------//
-
-#  if UINT_MAX == 0xffffffff
+#ifndef INT32_C
+#  if (UINT_MAX == 0xffffffff)
 #   define INT32_C(value) value
 #   define UINT32_C(value) value##u
 #  elif ULONG_MAX == 0xffffffff
 #   define INT32_C(value) value##L
 #   define UINT32_C(value) value##uL
 #  endif
+#endif
 
 //  64-bit types + intmax_t and uintmax_t  ----------------------------------//
-
+#ifndef INT64_C
 #  if defined(BOOST_HAS_LONG_LONG) && \
     (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX) || defined(_LLONG_MAX))
 
@@ -462,7 +498,7 @@ INT#_C macros if they're not already defined (John Maddock).
 #   define INTMAX_C(value) INT64_C(value)
 #   define UINTMAX_C(value) UINT64_C(value)
 #  endif
-
+#endif
 # endif // Borland/Microsoft specific width suffixes
 
 #endif // INT#_C macros.