From 4a2f0ad6c1725a6858c3f02add438e8323bb4c7d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 14 Jun 2011 13:09:52 -0700 Subject: [PATCH] * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now. --- src/ChangeLog | 6 ++++-- src/doprnt.c | 4 ---- src/eval.c | 4 ---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index dc8f983c870..275d7e08a76 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,11 +1,13 @@ 2011-06-14 Paul Eggert + * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now. + Variadic C functions now count arguments with ptrdiff_t. This partly undoes my 2011-03-30 change, which replaced int with size_t. Back then I didn't know that the Emacs coding style prefers signed int. Also, in the meantime I found a few more instances where arguments - were being counted with int, which may be too narrow, or EMACS_INT, which - may be too wide. + were being counted with int, which may truncate counts on 64-bit + machines, or EMACS_INT, which may be unnecessarily wide. * lisp.h (struct Lisp_Subr.function.aMANY) (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Arg counts are now ptrdiff_t, not size_t. diff --git a/src/doprnt.c b/src/doprnt.c index f5e31153628..195598c07ea 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -118,10 +118,6 @@ along with GNU Emacs. If not, see . */ another macro. */ #include "character.h" -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) -#endif - #ifndef DBL_MAX_10_EXP #define DBL_MAX_10_EXP 308 /* IEEE double */ #endif diff --git a/src/eval.c b/src/eval.c index 65cd87cd8ed..eff50a4de52 100644 --- a/src/eval.c +++ b/src/eval.c @@ -32,10 +32,6 @@ along with GNU Emacs. If not, see . */ #include "xterm.h" #endif -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) -#endif - /* This definition is duplicated in alloc.c and keyboard.c. */ /* Putting it in lisp.h makes cc bomb out! */ -- 2.11.4.GIT