From 4cacd822d198d85848348ae85c08fb56f6525116 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Fri, 1 Oct 2010 06:56:33 -0700 Subject: [PATCH] Do not include stdlib.h and string.h, config.h does it. * src/xfont.c: * src/w32term.c: * src/w32reg.c: * src/w32inevt.c: * src/w32heap.c: * src/w32console.c: * src/w16select.c: * src/unexsol.c: * src/term.c: * src/sound.c: * src/scroll.c (m): * src/gtkutil.c: * src/font.c: * src/filelock.c: * src/fileio.c: * src/dosfns.c: * src/dbusbind.c: * src/bidi.c: * src/callproc.c: * src/process.c: * src/msdos.c: * src/charset.c: Do not include stdlib.h and string.h, config.h does it. * configure.in: Include stdlib.h and string.h unconditionally. --- ChangeLog | 4 ++++ configure.in | 5 ----- src/ChangeLog | 25 +++++++++++++++++++++++++ src/bidi.c | 1 - src/callproc.c | 1 - src/charset.c | 1 - src/config.in | 5 ----- src/dbusbind.c | 1 - src/dosfns.c | 1 - src/fileio.c | 2 -- src/filelock.c | 1 - src/font.c | 1 - src/gtkutil.c | 1 - src/msdos.c | 2 -- src/process.c | 1 - src/scroll.c | 1 - src/sound.c | 2 -- src/term.c | 1 - src/unexsol.c | 1 - src/w16select.c | 1 - src/w32console.c | 2 -- src/w32heap.c | 1 - src/w32inevt.c | 1 - src/w32reg.c | 1 - src/w32term.c | 1 - src/xfont.c | 1 - 26 files changed, 29 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0778d0a7b09..c3bb32c2ade 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-10-01 Dan Nicolaescu + + * configure.in: Include stdlib.h and string.h unconditionally. + 2010-09-29 Romain Francoise * configure.in: Don't enable ImageMagick unless HAVE_X11. diff --git a/configure.in b/configure.in index 771ce78459b..e52bb2bd22e 100644 --- a/configure.in +++ b/configure.in @@ -3607,13 +3607,8 @@ SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */ not define __STDC__ (e.g. DEC C by default) or may define it as zero. */ #undef PROTOTYPES -#ifdef HAVE_STRING_H #include -#endif - -#ifdef HAVE_STDLIB_H #include -#endif #ifdef HAVE_ALLOCA_H # include diff --git a/src/ChangeLog b/src/ChangeLog index dc8b4e554e2..5e7ac0cc4b2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,29 @@ 2010-10-01 Dan Nicolaescu + Do not include stdlib.h and string.h, config.h does it. + * xfont.c: + * w32term.c: + * w32reg.c: + * w32inevt.c: + * w32heap.c: + * w32console.c: + * w16select.c: + * unexsol.c: + * term.c: + * sound.c: + * scroll.c (m): + * gtkutil.c: + * font.c: + * filelock.c: + * fileio.c: + * dosfns.c: + * dbusbind.c: + * bidi.c: + * callproc.c: + * process.c: + * msdos.c: + * charset.c: Do not include stdlib.h and string.h, config.h does it. + * callproc.c (SIGCHLD): Remove conditional definition, syssignal.h defines it. * process.c: Move #include earlier. @@ -10,6 +34,7 @@ * nsmenu.m (syms_of_nsmenu): * nsfns.m (syms_of_nsfns): * msdos.c (syms_of_msdos): + * image.c (syms_of_image): * charset.c (syms_of_charset): Use intern_c_string instead of intern. diff --git a/src/bidi.c b/src/bidi.c index b7c6fdc2ddd..1f14f6ab840 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -51,7 +51,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include #include "lisp.h" diff --git a/src/callproc.c b/src/callproc.c index e1ffd0c0cf6..346a913626d 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -38,7 +38,6 @@ along with GNU Emacs. If not, see . */ #ifdef WINDOWSNT #define NOMINMAX #include -#include /* for proper declaration of environ */ #include #include "w32.h" #define _P_NOWAIT 1 /* from process.h */ diff --git a/src/charset.c b/src/charset.c index 43d1015a93d..0ab776b6914 100644 --- a/src/charset.c +++ b/src/charset.c @@ -28,7 +28,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include #include #include diff --git a/src/config.in b/src/config.in index 43ebb756215..d5eaada59bb 100644 --- a/src/config.in +++ b/src/config.in @@ -1170,13 +1170,8 @@ SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */ not define __STDC__ (e.g. DEC C by default) or may define it as zero. */ #undef PROTOTYPES -#ifdef HAVE_STRING_H #include -#endif - -#ifdef HAVE_STDLIB_H #include -#endif #ifdef HAVE_ALLOCA_H # include diff --git a/src/dbusbind.c b/src/dbusbind.c index ffa02e8e9c9..99a157fbc76 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see . */ #include #ifdef HAVE_DBUS -#include #include #include #include diff --git a/src/dosfns.c b/src/dosfns.c index e66b50ed3ff..fea70386f18 100644 --- a/src/dosfns.c +++ b/src/dosfns.c @@ -24,7 +24,6 @@ along with GNU Emacs. If not, see . */ /* The entire file is within this conditional */ #include -#include #include #include #include "lisp.h" diff --git a/src/fileio.c b/src/fileio.c index 3d08e881e8f..bf6b7699883 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -71,7 +71,6 @@ along with GNU Emacs. If not, see . */ #ifdef WINDOWSNT #define NOMINMAX 1 #include -#include #include #endif /* not WINDOWSNT */ @@ -79,7 +78,6 @@ along with GNU Emacs. If not, see . */ #include "msdos.h" #include #include -#include #endif #ifdef DOS_NT diff --git a/src/filelock.c b/src/filelock.c index 15ed546bc50..59076eb6a4a 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -34,7 +34,6 @@ along with GNU Emacs. If not, see . */ #ifdef HAVE_FCNTL_H #include #endif -#include #ifdef HAVE_UNISTD_H #include diff --git a/src/font.c b/src/font.c index dee55d1e976..33c3cbd7385 100644 --- a/src/font.c +++ b/src/font.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include #include diff --git a/src/gtkutil.c b/src/gtkutil.c index f82be62965d..3b7e6888753 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -20,7 +20,6 @@ along with GNU Emacs. If not, see . */ #include #ifdef USE_GTK -#include #include #include #include diff --git a/src/msdos.c b/src/msdos.c index 3894770e194..0957221f597 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -29,13 +29,11 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" #include -#include #include #include #include #include #include -#include /* for memset and string functions */ #include /* for _fixpath */ #include /* for chdir, dup, dup2, etc. */ #include /* for getdisk */ diff --git a/src/process.c b/src/process.c index c78404910af..435e0784455 100644 --- a/src/process.c +++ b/src/process.c @@ -31,7 +31,6 @@ along with GNU Emacs. If not, see . */ #ifdef HAVE_INTTYPES_H #include #endif -#include #ifdef HAVE_UNISTD_H #include diff --git a/src/scroll.c b/src/scroll.c index ce26acbce64..4d1c4045bd4 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -20,7 +20,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include #include "lisp.h" #include "termchar.h" diff --git a/src/sound.c b/src/sound.c index b93099283da..3869f3a57ff 100644 --- a/src/sound.c +++ b/src/sound.c @@ -86,8 +86,6 @@ along with GNU Emacs. If not, see . */ /* BEGIN: Windows Specific Includes */ #include -#include -#include #include #include #include diff --git a/src/term.c b/src/term.c index a2f7a9cbabe..d67056d2918 100644 --- a/src/term.c +++ b/src/term.c @@ -23,7 +23,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include #include diff --git a/src/unexsol.c b/src/unexsol.c index 04e3f40799c..da4865d8ca8 100644 --- a/src/unexsol.c +++ b/src/unexsol.c @@ -1,7 +1,6 @@ /* Trivial unexec for Solaris. */ #include -#include #include #include diff --git a/src/w16select.c b/src/w16select.c index ef1b974752b..4d471e97911 100644 --- a/src/w16select.c +++ b/src/w16select.c @@ -28,7 +28,6 @@ along with GNU Emacs. If not, see . */ #ifdef MSDOS #include -#include #include #include #include diff --git a/src/w32console.c b/src/w32console.c index c39a65f59ff..35f0fc195f7 100644 --- a/src/w32console.c +++ b/src/w32console.c @@ -25,10 +25,8 @@ along with GNU Emacs. If not, see . */ #include -#include #include #include -#include #include #include "lisp.h" diff --git a/src/w32heap.c b/src/w32heap.c index e307694a563..d785dffeab9 100644 --- a/src/w32heap.c +++ b/src/w32heap.c @@ -25,7 +25,6 @@ along with GNU Emacs. If not, see . */ #include #endif -#include #include #include diff --git a/src/w32inevt.c b/src/w32inevt.c index 1ab0546d44f..7cf566e91a2 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c @@ -27,7 +27,6 @@ along with GNU Emacs. If not, see . */ #include #endif -#include #include #include #include diff --git a/src/w32reg.c b/src/w32reg.c index 77667eb7dc9..5c02dd376c7 100644 --- a/src/w32reg.c +++ b/src/w32reg.c @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see . */ #include "blockinput.h" #include -#include #define REG_ROOT "SOFTWARE\\GNU\\Emacs" diff --git a/src/w32term.c b/src/w32term.c index 992538e0e88..20f0dea8572 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include #include #include "lisp.h" #include "blockinput.h" diff --git a/src/xfont.c b/src/xfont.c index 368587de6d8..0a7f4a3c97f 100644 --- a/src/xfont.c +++ b/src/xfont.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #include #include -- 2.11.4.GIT