[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gnulib] stdint_.h update
From: |
Bruno Haible |
Subject: |
[bug-gnulib] stdint_.h update |
Date: |
Sat, 14 May 2005 15:51:06 +0200 |
User-agent: |
KMail/1.5 |
Hi,
I committed this patch. It enables the use of 64-bit integer types in MSVC
(which is also the compiler used in 'uwin').
2005-05-13 Bruno Haible <address@hidden>
* stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
Add support for 64-bit integers in the MSVC compiler.
*** clisp-20050316/src/stdint_.h.bak 2005-03-17 01:25:45.000000000 +0100
--- clisp-20050316/src/stdint_.h 2005-05-13 12:35:12.000000000 +0200
***************
*** 83,88 ****
--- 83,91 ----
typedef long long int64_t;
#endif
typedef unsigned long long uint64_t;
+ #elif defined(_MSC_VER)
+ typedef __int64 int64_t;
+ typedef unsigned __int64 uint64_t;
#endif
#endif /* !FreeBSD */
***************
*** 95,101 ****
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@
typedef int64_t int_least64_t;
typedef uint64_t uint_least64_t;
#endif
--- 98,104 ----
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@ || defined(_MSC_VER)
typedef int64_t int_least64_t;
typedef uint64_t uint_least64_t;
#endif
***************
*** 108,114 ****
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@
typedef int64_t int_fast64_t;
typedef uint64_t uint_fast64_t;
#endif
--- 111,117 ----
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@ || defined(_MSC_VER)
typedef int64_t int_fast64_t;
typedef uint64_t uint_fast64_t;
#endif
***************
*** 126,132 ****
/* 7.18.1.5. Greatest-width integer types */
! #if @HAVE_LONG_64BIT@ || @HAVE_LONG_LONG_64BIT@
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
#else
--- 129,135 ----
/* 7.18.1.5. Greatest-width integer types */
! #if @HAVE_LONG_64BIT@ || @HAVE_LONG_LONG_64BIT@ || defined(_MSC_VER)
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
#else
***************
*** 157,162 ****
--- 160,169 ----
#define INT64_MIN (~INT64_MIN)
#define INT64_MAX 9223372036854775807LL
#define UINT64_MAX 18446744073709551615ULL
+ #elif defined(_MSC_VER)
+ #define INT64_MIN (~INT64_MIN)
+ #define INT64_MAX 9223372036854775807i64
+ #define UINT64_MAX 18446744073709551615ui64
#endif
/* 7.18.2.2. Limits of minimum-width integer types */
***************
*** 170,176 ****
#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@
#define INT_LEAST64_MIN INT64_MIN
#define INT_LEAST64_MAX INT64_MAX
#define UINT_LEAST64_MAX UINT64_MAX
--- 177,183 ----
#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@ || defined(_MSC_VER)
#define INT_LEAST64_MIN INT64_MIN
#define INT_LEAST64_MAX INT64_MAX
#define UINT_LEAST64_MAX UINT64_MAX
***************
*** 187,193 ****
#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@
#define INT_FAST64_MIN INT64_MIN
#define INT_FAST64_MAX INT64_MAX
#define UINT_FAST64_MAX UINT64_MAX
--- 194,200 ----
#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@ || defined(_MSC_VER)
#define INT_FAST64_MIN INT64_MIN
#define INT_FAST64_MAX INT64_MAX
#define UINT_FAST64_MAX UINT64_MAX
***************
*** 201,207 ****
/* 7.18.2.5. Limits of greatest-width integer types */
! #if @HAVE_LONG_64BIT@ || @HAVE_LONG_LONG_64BIT@
#define INTMAX_MIN INT64_MIN
#define INTMAX_MAX INT64_MAX
#define UINTMAX_MAX UINT64_MAX
--- 208,214 ----
/* 7.18.2.5. Limits of greatest-width integer types */
! #if @HAVE_LONG_64BIT@ || @HAVE_LONG_LONG_64BIT@ || defined(_MSC_VER)
#define INTMAX_MIN INT64_MIN
#define INTMAX_MAX INT64_MAX
#define UINTMAX_MAX UINT64_MAX
***************
*** 245,250 ****
--- 252,260 ----
#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 */
***************
*** 255,260 ****
--- 265,273 ----
#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
- [bug-gnulib] stdint_.h update,
Bruno Haible <=