/* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX.
But note that <sys/int_types.h> contains only the type definitions! */
-# define HAVE_SYSTEM_INTTYPES
+# define _STDINT_H_HAVE_SYSTEM_INTTYPES
#endif
#if (defined(__hpux) || defined(_AIX)) && HAVE_INTTYPES_H
# include <inttypes.h>
UINT_FAST8_MAX, PTRDIFF_MIN, PTRDIFF_MAX. */
/* AIX 4 <inttypes.h> has nearly everything, except INTPTR_MIN, INTPTR_MAX,
UINTPTR_MAX, PTRDIFF_MIN, PTRDIFF_MAX. */
-# define HAVE_SYSTEM_INTTYPES
+# define _STDINT_H_HAVE_SYSTEM_INTTYPES
#endif
#if !(defined(UNIX_CYGWIN32) && defined(__BIT_TYPES_DEFINED__))
-# define NEED_SIGNED_INT_TYPES
+# define _STDINT_H_NEED_SIGNED_INT_TYPES
#endif
-#if !defined(HAVE_SYSTEM_INTTYPES)
+#if !defined(_STDINT_H_HAVE_SYSTEM_INTTYPES)
/* 7.18.1.1. Exact-width integer types */
#if !defined(__FreeBSD__)
-#ifdef NEED_SIGNED_INT_TYPES
+#ifdef _STDINT_H_NEED_SIGNED_INT_TYPES
typedef signed char int8_t;
#endif
typedef unsigned char uint8_t;
-#ifdef NEED_SIGNED_INT_TYPES
+#ifdef _STDINT_H_NEED_SIGNED_INT_TYPES
typedef short int16_t;
#endif
typedef unsigned short uint16_t;
-#ifdef NEED_SIGNED_INT_TYPES
+#ifdef _STDINT_H_NEED_SIGNED_INT_TYPES
typedef int int32_t;
#endif
typedef unsigned int uint32_t;
#if @HAVE_LONG_64BIT@
-#ifdef NEED_SIGNED_INT_TYPES
+#ifdef _STDINT_H_NEED_SIGNED_INT_TYPES
typedef long int64_t;
#endif
typedef unsigned long uint64_t;
+#define _STDINT_H_HAVE_INT64
#elif @HAVE_LONG_LONG_64BIT@
-#ifdef NEED_SIGNED_INT_TYPES
+#ifdef _STDINT_H_NEED_SIGNED_INT_TYPES
typedef long long int64_t;
#endif
typedef unsigned long long uint64_t;
+#define _STDINT_H_HAVE_INT64
+#elif defined(_MSC_VER)
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#define _STDINT_H_HAVE_INT64
#endif
#endif /* !FreeBSD */
typedef uint16_t uint_least16_t;
typedef int32_t int_least32_t;
typedef uint32_t uint_least32_t;
-#if @HAVE_LONG_64BIT@ || @HAVE_LONG_LONG_64BIT@
+#ifdef _STDINT_H_HAVE_INT64
typedef int64_t int_least64_t;
typedef uint64_t uint_least64_t;
#endif
typedef uint32_t uint_fast16_t;
typedef int32_t int_fast32_t;
typedef uint32_t uint_fast32_t;
-#if @HAVE_LONG_64BIT@ || @HAVE_LONG_LONG_64BIT@
+#ifdef _STDINT_H_HAVE_INT64
typedef int64_t int_fast64_t;
typedef uint64_t uint_fast64_t;
#endif
/* 7.18.1.5. Greatest-width integer types */
-#if @HAVE_LONG_64BIT@ || @HAVE_LONG_LONG_64BIT@
+#ifdef _STDINT_H_HAVE_INT64
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
#else
#define INT32_MIN (~INT32_MAX)
#define INT32_MAX 2147483647
#define UINT32_MAX 4294967295U
+#ifdef _STDINT_H_HAVE_INT64
+#define INT64_MIN (~INT64_MAX)
#if @HAVE_LONG_64BIT@
-#define INT64_MIN (~INT64_MIN)
#define INT64_MAX 9223372036854775807L
#define UINT64_MAX 18446744073709551615UL
#elif @HAVE_LONG_LONG_64BIT@
-#define INT64_MIN (~INT64_MIN)
#define INT64_MAX 9223372036854775807LL
#define UINT64_MAX 18446744073709551615ULL
+#elif defined(_MSC_VER)
+#define INT64_MAX 9223372036854775807i64
+#define UINT64_MAX 18446744073709551615ui64
+#endif
#endif
/* 7.18.2.2. Limits of minimum-width integer types */
#define INT_LEAST32_MIN INT32_MIN
#define INT_LEAST32_MAX INT32_MAX
#define UINT_LEAST32_MAX UINT32_MAX
-#if @HAVE_LONG_64BIT@ || @HAVE_LONG_LONG_64BIT@
+#ifdef _STDINT_H_HAVE_INT64
#define INT_LEAST64_MIN INT64_MIN
#define INT_LEAST64_MAX INT64_MAX
#define UINT_LEAST64_MAX UINT64_MAX
#define INT_FAST32_MIN INT32_MIN
#define INT_FAST32_MAX INT32_MAX
#define UINT_FAST32_MAX UINT32_MAX
-#if @HAVE_LONG_64BIT@ || @HAVE_LONG_LONG_64BIT@
+#ifdef _STDINT_H_HAVE_INT64
#define INT_FAST64_MIN INT64_MIN
#define INT_FAST64_MAX INT64_MAX
#define UINT_FAST64_MAX UINT64_MAX
/* 7.18.2.5. Limits of greatest-width integer types */
-#if @HAVE_LONG_64BIT@ || @HAVE_LONG_LONG_64BIT@
+#ifdef _STDINT_H_HAVE_INT64
#define INTMAX_MIN INT64_MIN
#define INTMAX_MAX INT64_MAX
#define UINTMAX_MAX UINT64_MAX
#elif @HAVE_LONG_LONG_64BIT@
#define INT64_C(x) x##LL
#define UINT64_C(x) x##ULL
+#elif defined(_MSC_VER)
+#define INT64_C(x) x##i64
+#define UINT64_C(x) x##ui64
#endif
/* 7.18.4.2. Macros for greatest-width integer constants */
#elif @HAVE_LONG_LONG_64BIT@
#define INTMAX_C(x) x##LL
#define UINTMAX_C(x) x##ULL
+#elif defined(_MSC_VER)
+#define INTMAX_C(x) x##i64
+#define UINTMAX_C(x) x##ui64
#else
#define INTMAX_C(x) x
#define UINTMAX_C(x) x##U
#endif
-#endif /* !HAVE_SYSTEM_INTTYPES */
+#endif /* !_STDINT_H_HAVE_SYSTEM_INTTYPES */
#endif /* _STDINT_H */