emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r106301: * inc/stdint.h (UINT64_MAX,


From: Christoph Scholtes
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106301: * inc/stdint.h (UINT64_MAX, UINT64_MIN, INT64_MIN, UINTMAX_MAX)
Date: Sat, 05 Nov 2011 16:33:44 -0600
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106301
committer: Christoph Scholtes <address@hidden>
branch nick: trunk
timestamp: Sat 2011-11-05 16:33:44 -0600
message:
  * inc/stdint.h (UINT64_MAX, UINT64_MIN, INT64_MIN, UINTMAX_MAX)
  (UINTMAX_MIN, INTMAX_MAX, INTMAX_MIN, UINT32_MIN, UINT32_MAX)
  (INT32_MIN, UINTMAX_MAX, UINTMAX_MIN, INTMAX_MAX, INTMAX_MIN)
  (intmax_t, INT64_MAX): Add for MSVC.
modified:
  nt/ChangeLog
  nt/inc/stdint.h
=== modified file 'nt/ChangeLog'
--- a/nt/ChangeLog      2011-11-05 14:59:51 +0000
+++ b/nt/ChangeLog      2011-11-05 22:33:44 +0000
@@ -1,5 +1,10 @@
 2011-11-05  Christoph Scholtes  <address@hidden>
 
+       * inc/stdint.h (UINT64_MAX, UINT64_MIN, INT64_MIN, UINTMAX_MAX)
+       (UINTMAX_MIN, INTMAX_MAX, INTMAX_MIN, UINT32_MIN, UINT32_MAX)
+       (INT32_MIN, UINTMAX_MAX, UINTMAX_MIN, INTMAX_MAX, INTMAX_MIN)
+       (intmax_t, INT64_MAX): Add for MSVC.
+
        * config.nt: (mode_t) [!__GNUC__]: Define mode_t for MSVC.
 
 2011-11-05  Eli Zaretskii  <address@hidden>

=== modified file 'nt/inc/stdint.h'
--- a/nt/inc/stdint.h   2011-06-07 12:34:09 +0000
+++ b/nt/inc/stdint.h   2011-11-05 22:33:44 +0000
@@ -27,20 +27,34 @@
 /* Minimum definitions to allow compilation with tool chains where
    stdint.h is not available, e.g. Microsoft Visual Studio.  */
 
-typedef unsigned int uint32_t;
-#define INT32_MAX 2147483647
+#ifdef _WIN64
+typedef __int64 intptr_t;
+#define UINT64_MAX 18446744073709551616
+#define UINT64_MIN 0
 /* "i64" is the non-standard suffix used by MSVC for 64-bit constants.  */
 #define INT64_MAX 9223372036854775807i64
-
-#ifdef _WIN64
-  typedef __int64 intptr_t;
+#define INT64_MIN (~INT64_MAX)
 #define INTPTR_MAX INT64_MAX
+#define UINTMAX_MAX UINT64_MAX
+#define UINTMAX_MIN UINT64_MIN
+#define INTMAX_MAX INT64_MAX
+#define INTMAX_MIN INT64_MIN
 #else
-  typedef int intptr_t;
+typedef int intptr_t;
+typedef unsigned int uint32_t;
+#define UINT32_MAX 4294967296
+#define UINT32_MIN 0
+#define INT32_MAX 2147483647
+#define INT32_MIN (~INT32_MAX)
 #define INTPTR_MAX INT32_MAX
+#define UINTMAX_MAX UINT32_MAX
+#define UINTMAX_MIN UINT32_MIN
+#define INTMAX_MAX INT32_MAX
+#define INTMAX_MIN INT32_MIN
 #endif
 
 #define uintmax_t unsigned __int64
+#define intmax_t __int64
 #define PTRDIFF_MAX INTPTR_MAX
 
 #endif /* !__GNUC__ */


reply via email to

[Prev in Thread] Current Thread [Next in Thread]