]> code.delx.au - gnu-emacs/commitdiff
Update nt/inc/stdint.h for PTRDIFF_MAX.
authorEli Zaretskii <eliz@gnu.org>
Tue, 7 Jun 2011 12:34:09 +0000 (15:34 +0300)
committerEli Zaretskii <eliz@gnu.org>
Tue, 7 Jun 2011 12:34:09 +0000 (15:34 +0300)
 nt/inc/stdint.h (INT32_MAX, INT64_MAX, INTPTR_MAX, PTRDIFF_MAX)
 [!__GNUC__]: New macros.

nt/ChangeLog
nt/inc/stdint.h

index 1503f6d1097bab28837358bba6defe699df3579d..c7b92a4baea1b58db21c04481d72ddec1645096d 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-07  Eli Zaretskii  <eliz@gnu.org>
+
+       * inc/stdint.h (INT32_MAX, INT64_MAX, INTPTR_MAX, PTRDIFF_MAX)
+       [!__GNUC__}: New macros.
+
 2011-05-28  Paul Eggert  <eggert@cs.ucla.edu>
 
        Use 'inline', not 'INLINE'.
index 555ca9182ff0554ba42bd135f0365a88bde1cb46..4af0346af2c346442132a1566df87ca0c9e6bda6 100644 (file)
@@ -28,14 +28,20 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    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__ */