From: Eli Zaretskii Date: Tue, 7 Jun 2011 12:34:09 +0000 (+0300) Subject: Update nt/inc/stdint.h for PTRDIFF_MAX. X-Git-Tag: emacs-pretest-24.0.90~104^2~618^2~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f7b2cdf3ad4094e4a12425a01e7ec7c94abd659f;p=emacs.git Update nt/inc/stdint.h for PTRDIFF_MAX. nt/inc/stdint.h (INT32_MAX, INT64_MAX, INTPTR_MAX, PTRDIFF_MAX) [!__GNUC__]: New macros. --- diff --git a/nt/ChangeLog b/nt/ChangeLog index 1503f6d1097..c7b92a4baea 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,8 @@ +2011-06-07 Eli Zaretskii + + * inc/stdint.h (INT32_MAX, INT64_MAX, INTPTR_MAX, PTRDIFF_MAX) + [!__GNUC__}: New macros. + 2011-05-28 Paul Eggert Use 'inline', not 'INLINE'. diff --git a/nt/inc/stdint.h b/nt/inc/stdint.h index 555ca9182ff..4af0346af2c 100644 --- a/nt/inc/stdint.h +++ b/nt/inc/stdint.h @@ -28,14 +28,20 @@ along with GNU Emacs. If not, see . */ stdint.h is not available, e.g. Microsoft Visual Studio. */ typedef unsigned int uint32_t; +#define INT32_MAX 2147483647 +/* "i64" is the non-standard suffix used by MSVC for 64-bit constants. */ +#define INT64_MAX 9223372036854775807i64 #ifdef _WIN64 typedef __int64 intptr_t; +#define INTPTR_MAX INT64_MAX #else typedef int intptr_t; +#define INTPTR_MAX INT32_MAX #endif #define uintmax_t unsigned __int64 +#define PTRDIFF_MAX INTPTR_MAX #endif /* !__GNUC__ */