diff options
| author | Eli Zaretskii | 2011-06-07 15:34:09 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2011-06-07 15:34:09 +0300 |
| commit | f7b2cdf3ad4094e4a12425a01e7ec7c94abd659f (patch) | |
| tree | 048928d82600952ec7be1564bb4993a2dc6a1433 /nt | |
| parent | 0442dc7f7b592a37bd097ca450a02870f1155096 (diff) | |
| download | emacs-f7b2cdf3ad4094e4a12425a01e7ec7c94abd659f.tar.gz emacs-f7b2cdf3ad4094e4a12425a01e7ec7c94abd659f.zip | |
Update nt/inc/stdint.h for PTRDIFF_MAX.
nt/inc/stdint.h (INT32_MAX, INT64_MAX, INTPTR_MAX, PTRDIFF_MAX)
[!__GNUC__]: New macros.
Diffstat (limited to 'nt')
| -rw-r--r-- | nt/ChangeLog | 5 | ||||
| -rw-r--r-- | nt/inc/stdint.h | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog index 1503f6d1097..c7b92a4baea 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-06-07 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * inc/stdint.h (INT32_MAX, INT64_MAX, INTPTR_MAX, PTRDIFF_MAX) | ||
| 4 | [!__GNUC__}: New macros. | ||
| 5 | |||
| 1 | 2011-05-28 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2011-05-28 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | Use 'inline', not 'INLINE'. | 8 | 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 <http://www.gnu.org/licenses/>. */ | |||
| 28 | stdint.h is not available, e.g. Microsoft Visual Studio. */ | 28 | stdint.h is not available, e.g. Microsoft Visual Studio. */ |
| 29 | 29 | ||
| 30 | typedef unsigned int uint32_t; | 30 | typedef unsigned int uint32_t; |
| 31 | #define INT32_MAX 2147483647 | ||
| 32 | /* "i64" is the non-standard suffix used by MSVC for 64-bit constants. */ | ||
| 33 | #define INT64_MAX 9223372036854775807i64 | ||
| 31 | 34 | ||
| 32 | #ifdef _WIN64 | 35 | #ifdef _WIN64 |
| 33 | typedef __int64 intptr_t; | 36 | typedef __int64 intptr_t; |
| 37 | #define INTPTR_MAX INT64_MAX | ||
| 34 | #else | 38 | #else |
| 35 | typedef int intptr_t; | 39 | typedef int intptr_t; |
| 40 | #define INTPTR_MAX INT32_MAX | ||
| 36 | #endif | 41 | #endif |
| 37 | 42 | ||
| 38 | #define uintmax_t unsigned __int64 | 43 | #define uintmax_t unsigned __int64 |
| 44 | #define PTRDIFF_MAX INTPTR_MAX | ||
| 39 | 45 | ||
| 40 | #endif /* !__GNUC__ */ | 46 | #endif /* !__GNUC__ */ |
| 41 | 47 | ||