1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Limit <config.h>’s includes

This follows up on recent problems with the fact that config.h
includes stdlib.h etc.; some files need to include stdlib.h later.
config.h generally should limit itself to includes that are
universally safe; outside of MS-Windows, only stdbool.h makes
the cut among the files currently included.  So, move the
other includes to just the files that need them (Bug#24506).
* configure.ac (config_opsysfile): Remove, as this generic hook
is no longer needed.
* lib-src/etags.c, src/unexmacosx.c, src/w32.c, src/w32notify.c:
* src/w32proc.c (_GNU_SOURCE):
Remove, as it’s OK for config.h to do this now.
* src/conf_post.h: Include <ms-w32.h>, instead of the generic
config_opsysfile, for simplicity as this old way of configuring is
now done only for the MS-Windows port.  Do not include <ms-w32.h>
if DEFER_MS_W32_H, for the benefit of the few files that want its
effects later.  Do not include <alloca.h>, <string.h>, or
<stdlib.h>.  Other files modified to include these headers as
needed, or to not include headers that are no longer needed.
* src/lisp.h: Include <alloca.h> and <string.h> here, since
some of the inline functions need them.
* src/regex.c: Include <alloca.h> if not emacs.  (If emacs,
we can rely on SAFE_ALLOCA.)  There is no longer any need to
worry about HAVE_ALLOCA_H.
* src/unexmacosx.c: Rely on config.h not including stdlib.h.
* src/w32.c, src/w32notify.c, src/w32proc.c (DEFER_MS_W32_H):
Define before including <config.h> first, and include <ms-w32.h>
after the troublesome headers.
This commit is contained in:
Paul Eggert 2016-09-30 12:14:04 -07:00
parent d1890a3a4a
commit f4eb890029
49 changed files with 72 additions and 81 deletions

View file

@ -4882,14 +4882,6 @@ AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}",
[Define to the canonical Emacs configuration name.]) [Define to the canonical Emacs configuration name.])
AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${emacs_config_options}", AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${emacs_config_options}",
[Define to the options passed to configure.]) [Define to the options passed to configure.])
AH_TEMPLATE(config_opsysfile, [Some platforms that do not use configure
define this to include extra configuration information.])
case $opsys in
mingw32)
AC_DEFINE(config_opsysfile, <ms-w32.h>, [])
;;
esac
XMENU_OBJ= XMENU_OBJ=
XOBJ= XOBJ=

View file

@ -74,6 +74,7 @@ char *w32_getenv (const char *);
#include <stdarg.h> #include <stdarg.h>
#include <ctype.h> #include <ctype.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <getopt.h> #include <getopt.h>
#include <unistd.h> #include <unistd.h>

View file

@ -90,10 +90,6 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
#include <config.h> #include <config.h>
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1 /* enables some compiler checks on GNU */
#endif
/* WIN32_NATIVE is for XEmacs. /* WIN32_NATIVE is for XEmacs.
MSDOS, WINDOWSNT, DOS_NT are for Emacs. */ MSDOS, WINDOWSNT, DOS_NT are for Emacs. */
#ifdef WIN32_NATIVE #ifdef WIN32_NATIVE

View file

@ -22,6 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h> #include <ctype.h>
#include <binary-io.h> #include <binary-io.h>

View file

@ -37,11 +37,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdbool.h>
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> /* config.h unconditionally includes this anyway */ #include <stdlib.h>
#include <string.h>
#ifdef WINDOWSNT #ifdef WINDOWSNT
/* Defined to be sys_fopen in ms-w32.h, but only #ifdef emacs, so this /* Defined to be sys_fopen in ms-w32.h, but only #ifdef emacs, so this

View file

@ -59,8 +59,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/file.h> #include <sys/file.h>
#include <stdbool.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <errno.h> #include <errno.h>
#include <time.h> #include <time.h>

View file

@ -63,10 +63,12 @@ void sys_freeaddrinfo (struct addrinfo * ai);
extern struct servent *hes_getservbyname (/* char *, char * */); extern struct servent *hes_getservbyname (/* char *, char * */);
#endif #endif
#include <alloca.h>
#include <pwd.h> #include <pwd.h>
#include <netdb.h> #include <netdb.h>
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>

View file

@ -35,6 +35,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <inttypes.h> #include <inttypes.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <intprops.h> #include <intprops.h>
#include <systime.h> #include <systime.h>

View file

@ -37,7 +37,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <errno.h> #include <errno.h>
#include <inttypes.h> #include <inttypes.h>
#include <limits.h> #include <limits.h>
#include <stdbool.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>

View file

@ -2,5 +2,6 @@
This should never happen with Emacs. */ This should never happen with Emacs. */
#include <config.h> #include <config.h>
#include "openat.h" #include "openat.h"
#include <stdlib.h>
void openat_save_fail (int errnum) { abort (); } void openat_save_fail (int errnum) { abort (); }
void openat_restore_fail (int errnum) { abort (); } void openat_restore_fail (int errnum) { abort (); }

View file

@ -22,6 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <setjmp.h> #include <setjmp.h>
#include <X11/StringDefs.h> #include <X11/StringDefs.h>

View file

@ -26,6 +26,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <sys/types.h> #include <sys/types.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include "lwlib-int.h" #include "lwlib-int.h"
#include "lwlib-utils.h" #include "lwlib-utils.h"
#include <X11/StringDefs.h> #include <X11/StringDefs.h>

View file

@ -22,6 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <limits.h> /* For CHAR_BIT. */ #include <limits.h> /* For CHAR_BIT. */
#include <signal.h> /* For SIGABRT, SIGDANGER. */ #include <signal.h> /* For SIGABRT, SIGDANGER. */

View file

@ -25,6 +25,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <sys/param.h> #include <sys/param.h>
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <verify.h> #include <verify.h>

View file

@ -22,6 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>

View file

@ -30,6 +30,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <limits.h> #include <limits.h>
#include <sys/types.h> #include <sys/types.h>

View file

@ -18,22 +18,23 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Commentary: /* Put the code here rather than in configure.ac using AH_BOTTOM.
This way, the code does not get processed by autoheader. For
example, undefs here are not commented out.
Rather than writing this code directly in AH_BOTTOM, we include it To help make dependencies clearer elsewhere, this file typically
via this file. This is so that it does not get processed by does not #include other files. The exceptions are first stdbool.h
autoheader. Eg, any undefs here would otherwise be commented out. because it is unlikely to interfere with configuration and bool is
*/ such a core part of the C language, and second ms-w32.h (DOS_NT
only) because it historically was included here and changing that
/* Code: */ would take some work. */
/* Include any platform specific configuration file. */
#ifdef config_opsysfile
# include config_opsysfile
#endif
#include <stdbool.h> #include <stdbool.h>
#if defined DOS_NT && !defined DEFER_MS_W32_H
# include <ms-w32.h>
#endif
/* GNUC_PREREQ (V, W, X) is true if this is GNU C version V.W.X or later. /* GNUC_PREREQ (V, W, X) is true if this is GNU C version V.W.X or later.
It can be used in a preprocessor expression. */ It can be used in a preprocessor expression. */
#ifndef __GNUC_MINOR__ #ifndef __GNUC_MINOR__
@ -55,14 +56,6 @@ typedef unsigned int bool_bf;
typedef bool bool_bf; typedef bool bool_bf;
#endif #endif
#ifndef WINDOWSNT
/* On AIX 3 this must be included before any other include file. */
#include <alloca.h>
#if ! HAVE_ALLOCA
# error "alloca not available on this machine"
#endif
#endif
/* Simulate __has_attribute on compilers that lack it. It is used only /* Simulate __has_attribute on compilers that lack it. It is used only
on arguments like alloc_size that are handled in this simulation. */ on arguments like alloc_size that are handled in this simulation. */
#ifndef __has_attribute #ifndef __has_attribute
@ -239,9 +232,6 @@ extern void _DebPrint (const char *fmt, ...);
extern char *emacs_getenv_TZ (void); extern char *emacs_getenv_TZ (void);
extern int emacs_setenv_TZ (char const *); extern int emacs_setenv_TZ (char const *);
#include <string.h>
#include <stdlib.h>
#if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */ #if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */
#define NO_INLINE __attribute__((noinline)) #define NO_INLINE __attribute__((noinline))
#else #else
@ -365,5 +355,3 @@ extern int emacs_setenv_TZ (char const *);
#else #else
# define UNINIT /* empty */ # define UNINIT /* empty */
#endif #endif
/* conf_post.h ends here */

View file

@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifdef HAVE_DBUS #ifdef HAVE_DBUS
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <dbus/dbus.h> #include <dbus/dbus.h>
#include "lisp.h" #include "lisp.h"

View file

@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
#include "sysstdio.h" #include "sysstdio.h"
#include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include "lisp.h" #include "lisp.h"

View file

@ -103,6 +103,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <float.h> #include <float.h>
#include <unistd.h> #include <unistd.h>
#include <limits.h> #include <limits.h>

View file

@ -49,6 +49,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <limits.h> #include <limits.h>
#include <intprops.h> #include <intprops.h>
#include <stdlib.h>
#include <strftime.h> #include <strftime.h>
#include <verify.h> #include <verify.h>

View file

@ -21,11 +21,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "emacs-module.h" #include "emacs-module.h"
#include <stdbool.h>
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include "lisp.h" #include "lisp.h"
#include "dynlib.h" #include "dynlib.h"

View file

@ -24,6 +24,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/file.h> #include <sys/file.h>

View file

@ -22,6 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
#include <limits.h> #include <limits.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include "lisp.h" #include "lisp.h"
#include "blockinput.h" #include "blockinput.h"
#include "commands.h" #include "commands.h"

View file

@ -27,6 +27,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <sys/stat.h> #include <sys/stat.h>
#include <signal.h> #include <signal.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_PWD_H #ifdef HAVE_PWD_H
#include <pwd.h> #include <pwd.h>

View file

@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
#include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <filevercmp.h> #include <filevercmp.h>
#include <intprops.h> #include <intprops.h>

View file

@ -23,6 +23,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
#include <float.h> #include <float.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <c-ctype.h> #include <c-ctype.h>

View file

@ -26,6 +26,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include "lisp.h" #include "lisp.h"
#include "blockinput.h" #include "blockinput.h"

View file

@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <errno.h> #include <errno.h>
#include <limits.h> #include <limits.h>

View file

@ -41,6 +41,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include "lisp.h" #include "lisp.h"
#include "commands.h" #include "commands.h"

View file

@ -21,10 +21,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifndef EMACS_LISP_H #ifndef EMACS_LISP_H
#define EMACS_LISP_H #define EMACS_LISP_H
#include <alloca.h>
#include <setjmp.h> #include <setjmp.h>
#include <stdalign.h> #include <stdalign.h>
#include <stdarg.h> #include <stdarg.h>
#include <stddef.h> #include <stddef.h>
#include <string.h>
#include <float.h> #include <float.h>
#include <inttypes.h> #include <inttypes.h>
#include <limits.h> #include <limits.h>

View file

@ -23,6 +23,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
#include "sysstdio.h" #include "sysstdio.h"
#include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/file.h> #include <sys/file.h>

View file

@ -22,6 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <errno.h> #include <errno.h>
#include <sys/types.h> /* Some typedefs are used in sys/file.h. */ #include <sys/types.h> /* Some typedefs are used in sys/file.h. */
#include <sys/file.h> #include <sys/file.h>

View file

@ -50,6 +50,7 @@
#include <config.h> #include <config.h>
#include <stddef.h> #include <stddef.h>
#include <stdlib.h>
#ifdef emacs #ifdef emacs
/* We need this for `regex.h', and perhaps for the Emacs include files. */ /* We need this for `regex.h', and perhaps for the Emacs include files. */
@ -443,25 +444,12 @@ init_syntax_once (void)
#else /* not REGEX_MALLOC */ #else /* not REGEX_MALLOC */
/* Emacs already defines alloca, sometimes. */
# ifndef alloca
/* Make alloca work the best possible way. */
# ifdef __GNUC__
# define alloca __builtin_alloca
# else /* not __GNUC__ */
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# endif /* HAVE_ALLOCA_H */
# endif /* not __GNUC__ */
# endif /* not alloca */
# ifdef emacs # ifdef emacs
# define REGEX_USE_SAFE_ALLOCA USE_SAFE_ALLOCA # define REGEX_USE_SAFE_ALLOCA USE_SAFE_ALLOCA
# define REGEX_SAFE_FREE() SAFE_FREE () # define REGEX_SAFE_FREE() SAFE_FREE ()
# define REGEX_ALLOCATE SAFE_ALLOCA # define REGEX_ALLOCATE SAFE_ALLOCA
# else # else
# include <alloca.h>
# define REGEX_ALLOCATE alloca # define REGEX_ALLOCATE alloca
# endif # endif

View file

@ -26,6 +26,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <grp.h> #include <grp.h>
#endif /* HAVE_PWD_H */ #endif /* HAVE_PWD_H */
#include <limits.h> #include <limits.h>
#include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <c-ctype.h> #include <c-ctype.h>

View file

@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <fcntl.h> #include <fcntl.h>
#endif /* not DOS_NT */ #endif /* not DOS_NT */
#include <stdbool.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#ifdef HPUX #ifdef HPUX

View file

@ -23,6 +23,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <sys/file.h> #include <sys/file.h>
#include <sys/time.h> #include <sys/time.h>
#include <unistd.h> #include <unistd.h>

View file

@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
#include "unexec.h" #include "unexec.h"
#include "lisp.h" #include "lisp.h"
#include <string.h>
#include <stdio.h> #include <stdio.h>
#include <fcntl.h> #include <fcntl.h>
#include <a.out.h> #include <a.out.h>

View file

@ -85,20 +85,16 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
be changed accordingly. be changed accordingly.
*/ */
/* Enable GNU extensions in gnulib replacement headers. */
#define _GNU_SOURCE 1
/* config.h #define:s malloc/realloc/free and then includes stdlib.h.
We want the undefined versions, but if config.h includes stdlib.h
with the #define:s in place, the prototypes will be wrong and we get
warnings. To prevent that, include stdlib.h before config.h. */
#include <stdlib.h>
#include <config.h> #include <config.h>
/* Although <config.h> redefines malloc to unexec_malloc, etc., this
file wants stdlib.h to declare the originals. */
#undef malloc #undef malloc
#undef realloc #undef realloc
#undef free #undef free
#include <stdlib.h>
#include "unexec.h" #include "unexec.h"
#include "lisp.h" #include "lisp.h"

View file

@ -21,8 +21,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
Geoff Voelker (voelker@cs.washington.edu) 7-29-94 Geoff Voelker (voelker@cs.washington.edu) 7-29-94
*/ */
/* Enable GNU extensions in gnulib replacement headers. */ #define DEFER_MS_W32_H
#define _GNU_SOURCE 1 #include <config.h>
#include <mingw_time.h> #include <mingw_time.h>
#include <stddef.h> /* for offsetof */ #include <stddef.h> /* for offsetof */
@ -40,9 +40,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <sys/utime.h> #include <sys/utime.h>
#include <math.h> #include <math.h>
/* must include CRT headers *before* config.h */ /* Include CRT headers *before* ms-w32.h. */
#include <ms-w32.h>
#include <config.h>
#include <mbstring.h> /* for _mbspbrk, _mbslwr, _mbsrchr, ... */ #include <mbstring.h> /* for _mbspbrk, _mbslwr, _mbsrchr, ... */
#undef access #undef access

View file

@ -81,14 +81,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
thread to exit. The main thread waits for some time for the worker thread to exit. The main thread waits for some time for the worker
thread to exit, and if it doesn't, terminates it forcibly. */ thread to exit, and if it doesn't, terminates it forcibly. */
/* Enable GNU extensions in gnulib replacement headers. */ #define DEFER_MS_W32_H
#define _GNU_SOURCE 1 #include <config.h>
#include <stddef.h> #include <stddef.h>
#include <errno.h> #include <errno.h>
/* must include CRT headers *before* config.h */ /* Include CRT headers *before* ms-w32.h. */
#include <config.h> #include <ms-w32.h>
#include <windows.h> #include <windows.h>

View file

@ -22,8 +22,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
Adapted from alarm.c by Tim Fleehart Adapted from alarm.c by Tim Fleehart
*/ */
/* Enable GNU extensions in gnulib replacement headers. */ #define DEFER_MS_W32_H
#define _GNU_SOURCE 1 #include <config.h>
#include <mingw_time.h> #include <mingw_time.h>
#include <stdio.h> #include <stdio.h>
@ -38,8 +38,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <mbstring.h> #include <mbstring.h>
#include <locale.h> #include <locale.h>
/* must include CRT headers *before* config.h */ /* Include CRT headers *before* ms-w32.h. */
#include <config.h> #include <ms-w32.h>
#undef signal #undef signal
#undef wait #undef wait

View file

@ -32,6 +32,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "widget.h" #include "widget.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include "lisp.h" #include "lisp.h"
#include "xterm.h" #include "xterm.h"

View file

@ -288,6 +288,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <limits.h> #include <limits.h>
#include "lisp.h" #include "lisp.h"

View file

@ -200,6 +200,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
used to fill in unspecified attributes of the default face. */ used to fill in unspecified attributes of the default face. */
#include <config.h> #include <config.h>
#include <stdlib.h>
#include "sysstdio.h" #include "sysstdio.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>

View file

@ -19,6 +19,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <math.h> #include <math.h>
#include <unistd.h> #include <unistd.h>

View file

@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include "lisp.h" #include "lisp.h"

View file

@ -25,7 +25,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <glib.h> #include <glib.h>
#include <errno.h> #include <errno.h>
#include <stdbool.h>
#include "blockinput.h" #include "blockinput.h"
#include "systime.h" #include "systime.h"

View file

@ -22,6 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#ifdef USE_CAIRO #ifdef USE_CAIRO
#include <math.h> #include <math.h>
#endif #endif