diff options
| author | Paul Eggert | 2019-07-07 12:29:27 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-07-07 12:33:35 -0700 |
| commit | 8f522efe9a963cd3523ea6863f9bd44881cdf6b7 (patch) | |
| tree | 10ba28c937e142395bcc4d81580d24fa334e1227 /src/lisp.h | |
| parent | bda8a57141e6cb5455e1246c6ab394791fd6c582 (diff) | |
| download | emacs-8f522efe9a963cd3523ea6863f9bd44881cdf6b7.tar.gz emacs-8f522efe9a963cd3523ea6863f9bd44881cdf6b7.zip | |
Remove printmax_t etc.
printmax_t etc. were needed only for platforms that lacked
support for printing intmax_t. These platforms are now so
obsolete that they are no longer practical porting targets.
* src/image.c (gs_load): Fix unlikely buffer overrun
discovered while making these changes. It was introduced in
2011-07-17T00:34:43!eggert@cs.ucla.edu.
* src/lisp.h (printmax_t, uprintmax_t, pMd, pMu, pMx):
Remove. All uses replaced by their standard counterparts
intmax_t, uintmax_t, PRIdMAX, PRIuMAX, PRIxMAX.
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/lisp.h b/src/lisp.h index 1a1d8ee7e48..8acf63fe227 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -134,25 +134,6 @@ enum { BITS_PER_BITS_WORD = BOOL_VECTOR_BITS_PER_CHAR }; | |||
| 134 | #endif | 134 | #endif |
| 135 | verify (BITS_WORD_MAX >> (BITS_PER_BITS_WORD - 1) == 1); | 135 | verify (BITS_WORD_MAX >> (BITS_PER_BITS_WORD - 1) == 1); |
| 136 | 136 | ||
| 137 | /* printmax_t and uprintmax_t are types for printing large integers. | ||
| 138 | These are the widest integers that are supported for printing. | ||
| 139 | pMd etc. are conversions for printing them. | ||
| 140 | On C99 hosts, there's no problem, as even the widest integers work. | ||
| 141 | Fall back on EMACS_INT on pre-C99 hosts. */ | ||
| 142 | #ifdef PRIdMAX | ||
| 143 | typedef intmax_t printmax_t; | ||
| 144 | typedef uintmax_t uprintmax_t; | ||
| 145 | # define pMd PRIdMAX | ||
| 146 | # define pMu PRIuMAX | ||
| 147 | # define pMx PRIxMAX | ||
| 148 | #else | ||
| 149 | typedef EMACS_INT printmax_t; | ||
| 150 | typedef EMACS_UINT uprintmax_t; | ||
| 151 | # define pMd pI"d" | ||
| 152 | # define pMu pI"u" | ||
| 153 | # define pMx pI"x" | ||
| 154 | #endif | ||
| 155 | |||
| 156 | /* Use pD to format ptrdiff_t values, which suffice for indexes into | 137 | /* Use pD to format ptrdiff_t values, which suffice for indexes into |
| 157 | buffers and strings. Emacs never allocates objects larger than | 138 | buffers and strings. Emacs never allocates objects larger than |
| 158 | PTRDIFF_MAX bytes, as they cause problems with pointer subtraction. | 139 | PTRDIFF_MAX bytes, as they cause problems with pointer subtraction. |