=== modified file 'ChangeLog' --- ChangeLog 2014-05-13 14:18:54 +0000 +++ ChangeLog 2014-05-14 00:43:38 +0000 @@ -1,3 +1,12 @@ +2014-05-14 Paul Eggert + + Assume C99 or later. + * lib/stdarg.in.h, lib/stdbool.in.h, m4/stdarg.m4, m4/stdbool.m4: + Remove. + * configure.ac (_AC_PROG_CC_C89): Define a dummy, to keep 'configure' + smaller. + * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. + 2014-05-13 Dmitry Antipov * configure.ac (HAVE_XFIXES): Define if available. === modified file 'admin/ChangeLog' --- admin/ChangeLog 2014-05-13 23:15:01 +0000 +++ admin/ChangeLog 2014-05-14 00:43:38 +0000 @@ -1,3 +1,9 @@ +2014-05-14 Paul Eggert + + Assume C99 or later. + * merge-gnulib (GNULIB_MODULES): Remove stdarg, stdbool. + (GNULIB_TOOL_FLAGS): Avoid stdarg, stdbool. + 2014-05-13 Paul Eggert * merge-gnulib: Defer to autogen.sh for ACLOCAL_PATH computation. === modified file 'admin/merge-gnulib' --- admin/merge-gnulib 2014-05-13 23:15:01 +0000 +++ admin/merge-gnulib 2014-05-14 00:43:38 +0000 @@ -35,7 +35,7 @@ intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat - sig2str socklen stat-time stdalign stdarg stdbool stdio + sig2str socklen stat-time stdalign stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv update-copyright utimens @@ -49,6 +49,7 @@ --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask + --avoid=stdarg --avoid=stdbool --avoid=threadlib --conditional-dependencies --import --no-changelog --no-vc-files --makefile-name=gnulib.mk === modified file 'configure.ac' --- configure.ac 2014-05-13 14:18:54 +0000 +++ configure.ac 2014-05-14 00:43:38 +0000 @@ -670,6 +670,9 @@ #### Choose a compiler. +dnl Don't bother to test for C89, as Emacs needs C99 or later. +AC_DEFUN([_AC_PROG_CC_C89], [$2]) + dnl Sets GCC=yes if using gcc. AC_PROG_CC([gcc cc cl clang "$XCRUN gcc" "$XCRUN clang"]) if test -n "$XCRUN"; then @@ -1303,7 +1306,7 @@ CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS" fi -# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better. +# Suppress obsolescent Autoconf test for size_t; Emacs assumes C99 or better. AC_DEFUN([AC_TYPE_SIZE_T]) # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them. AC_DEFUN([AC_TYPE_UID_T]) === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2014-05-08 03:41:21 +0000 +++ doc/lispref/ChangeLog 2014-05-14 00:43:38 +0000 @@ -1,3 +1,8 @@ +2014-05-14 Paul Eggert + + Assume C99 or later. + * internals.texi (C Dialect): Document this. + 2014-05-08 Paul Eggert * internals.texi (C Dialect): New section. === modified file 'doc/lispref/internals.texi' --- doc/lispref/internals.texi 2014-05-08 03:41:21 +0000 +++ doc/lispref/internals.texi 2014-05-14 00:43:38 +0000 @@ -580,15 +580,14 @@ @section C Dialect @cindex C programming language -The C part of Emacs is portable to C89: C99-specific features such as -@samp{} and @samp{inline} are not used without a check, +The C part of Emacs is portable to C99 or later: C11-specific features such +as @samp{} and @samp{_Noreturn} are not used without a check, typically at configuration time, and the Emacs build procedure -provides a substitute implementation if necessary. Some C99 features, -such as declarations after statements, are too difficult to provide -substitutes for, so they are avoided entirely. +provides a substitute implementation if necessary. Some C11 features, +such as anonymous structures and unions, are too difficult to emulate, +so they are avoided entirely. -At some point in the not-too-distant future the base C dialect will -change from C89 to C99, and eventually it will no doubt change to C11. +At some point in the future the base C dialect will no doubt change to C11. @node Writing Emacs Primitives @section Writing Emacs Primitives === modified file 'etc/ChangeLog' --- etc/ChangeLog 2014-05-13 11:12:05 +0000 +++ etc/ChangeLog 2014-05-14 01:06:42 +0000 @@ -1,3 +1,7 @@ +2014-05-14 Paul Eggert + + * NEWS: Assume C99 or later. + 2014-05-13 Dmitry Antipov * PROBLEMS: Mention potential problems with === modified file 'etc/NEWS' --- etc/NEWS 2014-05-04 23:49:33 +0000 +++ etc/NEWS 2014-05-14 01:06:42 +0000 @@ -25,6 +25,8 @@ * Installation Changes in Emacs 24.5 +++ +** Building Emacs now requires C99 or later. + ** Building Emacs now requires GNU make. ** By default, Emacs no longer works on IRIX. We expect that Emacs === modified file 'src/ChangeLog' --- src/ChangeLog 2014-05-13 22:59:36 +0000 +++ src/ChangeLog 2014-05-14 00:43:38 +0000 @@ -1,3 +1,13 @@ +2014-05-14 Paul Eggert + + Assume C99 or later. + * bytecode.c (B__dummy__): Remove. + * conf_post.h (bool_bf) [!NS_IMPL_GNUSTEP]: Use bool. + (FLEXIBLE_ARRAY_MEMBER): Now always empty. + * dbusbind.c (XD_DEBUG_MESSAGE) [!DBUS_DEBUG]: + * regex.c (DEBUG_PRINT): Assume varargs macros. + * lisp.h (DEFUN_FUNCTION_INIT): Remove. All uses now assume C99. + 2014-05-13 Paul Eggert * keyboard.c (Qdeactivate_mark): Now static. === modified file 'src/bytecode.c' --- src/bytecode.c 2014-04-13 02:51:11 +0000 +++ src/bytecode.c 2014-05-14 00:43:38 +0000 @@ -292,8 +292,6 @@ Bscan_buffer = 0153, /* No longer generated as of v18. */ Bset_mark = 0163, /* this loser is no longer generated as of v18 */ #endif - - B__dummy__ = 0 /* Pacify C89. */ }; /* Whether to maintain a `top' and `bottom' field in the stack frame. */ === modified file 'src/conf_post.h' --- src/conf_post.h 2014-04-23 18:23:28 +0000 +++ src/conf_post.h 2014-05-14 00:43:38 +0000 @@ -34,9 +34,10 @@ #include -/* The pre-C99 emulation doesn't work for bool bitfields. - Nor does compiling Objective-C with standard GCC. */ -#if __STDC_VERSION__ < 199901 || NS_IMPL_GNUSTEP +/* The type of bool bitfields. Needed to compile Objective-C with + standard GCC. It was also needed to port to pre-C99 compilers, + although we don't care about that any more. */ +#if NS_IMPL_GNUSTEP typedef unsigned int bool_bf; #else typedef bool bool_bf; @@ -293,14 +294,11 @@ /* To use the struct hack with N elements, declare the struct like this: struct s { ...; t name[FLEXIBLE_ARRAY_MEMBER]; }; - and allocate (offsetof (struct s, name) + N * sizeof (t)) bytes. */ -#if 199901 <= __STDC_VERSION__ -# define FLEXIBLE_ARRAY_MEMBER -#elif __GNUC__ && !defined __STRICT_ANSI__ -# define FLEXIBLE_ARRAY_MEMBER 0 -#else -# define FLEXIBLE_ARRAY_MEMBER 1 -#endif + and allocate (offsetof (struct s, name) + N * sizeof (t)) bytes. + + This macro used to expand to something different on pre-C99 compilers. + FIXME: Remove it, and remove all uses. */ +#define FLEXIBLE_ARRAY_MEMBER /* Use this to suppress gcc's `...may be used before initialized' warnings. */ #ifdef lint === modified file 'src/dbusbind.c' --- src/dbusbind.c 2014-02-27 15:36:14 +0000 +++ src/dbusbind.c 2014-05-14 00:43:38 +0000 @@ -142,10 +142,7 @@ } while (0) #else /* !DBUS_DEBUG */ -# if __STDC_VERSION__ < 199901 -# define XD_DEBUG_MESSAGE (void) /* Pre-C99 compilers cannot debug. */ -# else -# define XD_DEBUG_MESSAGE(...) \ +# define XD_DEBUG_MESSAGE(...) \ do { \ if (!NILP (Vdbus_debug)) \ { \ @@ -154,7 +151,6 @@ message ("%s: %s", __func__, s); \ } \ } while (0) -# endif # define XD_DEBUG_VALID_LISP_OBJECT_P(object) #endif === modified file 'src/emacs.c' --- src/emacs.c 2014-04-18 23:36:51 +0000 +++ src/emacs.c 2014-05-14 00:43:38 +0000 @@ -214,7 +214,7 @@ static void sort_args (int argc, char **argv); static void syms_of_emacs (void); -/* C89 needs each string be at most 509 characters, so the usage +/* C99 needs each string to be at most 4095 characters, and the usage strings below are split to not overflow this limit. */ static char const *const usage_message[] = { "\ === modified file 'src/lisp.h' --- src/lisp.h 2014-04-28 16:59:41 +0000 +++ src/lisp.h 2014-05-14 00:43:38 +0000 @@ -2654,16 +2654,11 @@ minargs, maxargs, lname, intspec, 0}; \ Lisp_Object fnname #else /* not _MSC_VER */ -# if __STDC_VERSION__ < 199901 -# define DEFUN_FUNCTION_INIT(fnname, maxargs) (Lisp_Object (*) (void)) fnname -# else -# define DEFUN_FUNCTION_INIT(fnname, maxargs) .a ## maxargs = fnname -# endif #define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \ Lisp_Object fnname DEFUN_ARGS_ ## maxargs ; \ static struct Lisp_Subr alignas (GCALIGNMENT) sname = \ { { PVEC_SUBR << PSEUDOVECTOR_AREA_BITS }, \ - { DEFUN_FUNCTION_INIT (fnname, maxargs) }, \ + { .a ## maxargs = fnname }, \ minargs, maxargs, lname, intspec, 0}; \ Lisp_Object fnname #endif === modified file 'src/regex.c' --- src/regex.c 2014-04-28 01:29:44 +0000 +++ src/regex.c 2014-05-14 00:43:38 +0000 @@ -1190,12 +1190,7 @@ # define assert(e) # define DEBUG_STATEMENT(e) -# if __STDC_VERSION__ < 199901L -# define DEBUG_COMPILES_ARGUMENTS -# define DEBUG_PRINT /* 'DEBUG_PRINT (x, y)' discards X and Y. */ (void) -# else -# define DEBUG_PRINT(...) -# endif +# define DEBUG_PRINT(...) # define DEBUG_PRINT_COMPILED_PATTERN(p, s, e) # define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2)