From: Paul Eggert Date: Fri, 6 May 2011 07:13:19 +0000 (-0700) Subject: Do not assume EMACS_INT is the same width as a pointer. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~92 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b08a63ccec4bda5556777ab8538b92726fd55a1e;p=emacs.git Do not assume EMACS_INT is the same width as a pointer. This prepares for a future patch that will prefer 64-bit EMACS_INT if available. That patch can be tried now, by compiling with -DWIDE_EMACS_INT, but it is temporarily not the default so that it can be further tested. Also, install some other fixes for problems discovered by the static checking of GCC 4.6.0. Fixes: debbugs:8545 debbugs:8601 debbugs:8600 debbugs:8602 --- b08a63ccec4bda5556777ab8538b92726fd55a1e diff --cc ChangeLog index 83bbcf49d8e,4e675fcca9a..c7038691a32 --- a/ChangeLog +++ b/ChangeLog @@@ -1,3 -1,15 +1,15 @@@ -2011-05-05 Paul Eggert ++2011-05-06 Paul Eggert + + Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux. + * Makefile.in (GNULIB_MODULES): Add stdarg, for va_copy. + * lib/stdarg.in.h, m4/stdarg.m4: New files, from gnulib. + + * Makefile.in (GNULIB_TOOL_FLAG): Add --conditional-dependencies. + This new gnulib-tool option saves 'configure' the trouble of + checking for strtoull when strtoumax exists. + + * configure.in (BITS_PER_LONG_LONG): New macro. + 2011-05-05 Glenn Morris * Makefile.in (bootstrap-clean): Save config.log. (Bug#765) diff --cc doc/lispref/ChangeLog index 4aa63c6abaa,163de31f220..7ef3be46b68 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@@ -1,3 -1,7 +1,7 @@@ -2011-05-03 Paul Eggert ++2011-05-06 Paul Eggert + + * numbers.texi (Integer Basics): Large integers are treated as floats. + 2011-04-30 Lars Magne Ingebrigtsen * processes.texi (Synchronous Processes): Document the (:file diff --cc src/callproc.c index 1d3d8764ff8,2763331bde2..946670320ca --- a/src/callproc.c +++ b/src/callproc.c @@@ -591,9 -589,20 +589,20 @@@ usage: (call-process PROGRAM &optional BLOCK_INPUT; - pid = vfork (); + /* vfork, and prevent local vars from being clobbered by the vfork. */ - { ++ { + int volatile fd_error_volatile = fd_error; + int volatile fd_output_volatile = fd_output; + int volatile output_to_buffer_volatile = output_to_buffer; + unsigned char const **volatile new_argv_volatile = new_argv; + + pid = vfork (); - new_argv = new_argv_volatile; + fd_error = fd_error_volatile; + fd_output = fd_output_volatile; + output_to_buffer = output_to_buffer_volatile; + new_argv = new_argv_volatile; + } if (pid == 0) { diff --cc src/doc.c index 3832eb3708d,d764b66e75e..89a7d322966 --- a/src/doc.c +++ b/src/doc.c @@@ -506,8 -506,11 +506,11 @@@ store_function_docstring (Lisp_Object f /* The type determines where the docstring is stored. */ /* Lisp_Subrs have a slot for it. */ - if (SUBRP (fun)) - { - intptr_t negative_offset = - offset; - XSUBR (fun)->doc = (char *) negative_offset; - } + if (SUBRP (fun)) - XSUBR (fun)->doc = (char *) - offset; ++ { ++ intptr_t negative_offset = - offset; ++ XSUBR (fun)->doc = (char *) negative_offset; ++ } /* If it's a lisp form, stick it in the form. */ else if (CONSP (fun))