changeset 110683:55c8c3ca3d48

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.
author Dan Nicolaescu <dann@ics.uci.edu>
date Fri, 01 Oct 2010 06:56:33 -0700
parents ba6a1c230532
children 88f8a448614e
files ChangeLog configure.in src/ChangeLog src/bidi.c src/callproc.c src/charset.c src/config.in src/dbusbind.c src/dosfns.c src/fileio.c src/filelock.c src/font.c src/gtkutil.c src/msdos.c src/process.c src/scroll.c src/sound.c src/term.c src/unexsol.c src/w16select.c src/w32console.c src/w32heap.c src/w32inevt.c src/w32reg.c src/w32term.c src/xfont.c
diffstat 26 files changed, 29 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Oct 01 13:33:03 2010 +0000
+++ b/ChangeLog	Fri Oct 01 06:56:33 2010 -0700
@@ -1,3 +1,7 @@
+2010-10-01  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* configure.in: Include stdlib.h and string.h unconditionally.
+
 2010-09-29  Romain Francoise  <romain@orebokech.com>
 
 	* configure.in: Don't enable ImageMagick unless HAVE_X11.
--- a/configure.in	Fri Oct 01 13:33:03 2010 +0000
+++ b/configure.in	Fri Oct 01 06:56:33 2010 -0700
@@ -3607,13 +3607,8 @@
    not define __STDC__ (e.g. DEC C by default) or may define it as zero.  */
 #undef PROTOTYPES
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 #ifdef HAVE_ALLOCA_H
 # include <alloca.h>
--- a/src/ChangeLog	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/ChangeLog	Fri Oct 01 06:56:33 2010 -0700
@@ -1,5 +1,29 @@
 2010-10-01  Dan Nicolaescu  <dann@ics.uci.edu>
 
+	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 <pty.h> 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.
 
--- a/src/bidi.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/bidi.c	Fri Oct 01 06:56:33 2010 -0700
@@ -51,7 +51,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <string.h>
 #include <setjmp.h>
 
 #include "lisp.h"
--- a/src/callproc.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/callproc.c	Fri Oct 01 06:56:33 2010 -0700
@@ -38,7 +38,6 @@
 #ifdef WINDOWSNT
 #define NOMINMAX
 #include <windows.h>
-#include <stdlib.h>	/* for proper declaration of environ */
 #include <fcntl.h>
 #include "w32.h"
 #define _P_NOWAIT 1	/* from process.h */
--- a/src/charset.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/charset.c	Fri Oct 01 06:56:33 2010 -0700
@@ -28,7 +28,6 @@
 #include <config.h>
 
 #include <stdio.h>
-#include <stdlib.h>
 #include <unistd.h>
 #include <ctype.h>
 #include <sys/types.h>
--- a/src/config.in	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/config.in	Fri Oct 01 06:56:33 2010 -0700
@@ -1170,13 +1170,8 @@
    not define __STDC__ (e.g. DEC C by default) or may define it as zero.  */
 #undef PROTOTYPES
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 #ifdef HAVE_ALLOCA_H
 # include <alloca.h>
--- a/src/dbusbind.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/dbusbind.c	Fri Oct 01 06:56:33 2010 -0700
@@ -19,7 +19,6 @@
 #include <config.h>
 
 #ifdef HAVE_DBUS
-#include <stdlib.h>
 #include <stdio.h>
 #include <dbus/dbus.h>
 #include <setjmp.h>
--- a/src/dosfns.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/dosfns.c	Fri Oct 01 06:56:33 2010 -0700
@@ -24,7 +24,6 @@
 /* The entire file is within this conditional */
 
 #include <stdio.h>
-#include <string.h>
 #include <dos.h>
 #include <setjmp.h>
 #include "lisp.h"
--- a/src/fileio.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/fileio.c	Fri Oct 01 06:56:33 2010 -0700
@@ -71,7 +71,6 @@
 #ifdef WINDOWSNT
 #define NOMINMAX 1
 #include <windows.h>
-#include <stdlib.h>
 #include <fcntl.h>
 #endif /* not WINDOWSNT */
 
@@ -79,7 +78,6 @@
 #include "msdos.h"
 #include <sys/param.h>
 #include <fcntl.h>
-#include <string.h>
 #endif
 
 #ifdef DOS_NT
--- a/src/filelock.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/filelock.c	Fri Oct 01 06:56:33 2010 -0700
@@ -34,7 +34,6 @@
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
-#include <string.h>
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
--- a/src/font.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/font.c	Fri Oct 01 06:56:33 2010 -0700
@@ -21,7 +21,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <stdlib.h>
 #include <ctype.h>
 #include <setjmp.h>
 
--- a/src/gtkutil.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/gtkutil.c	Fri Oct 01 06:56:33 2010 -0700
@@ -20,7 +20,6 @@
 #include <config.h>
 
 #ifdef USE_GTK
-#include <string.h>
 #include <signal.h>
 #include <stdio.h>
 #include <setjmp.h>
--- a/src/msdos.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/msdos.c	Fri Oct 01 06:56:33 2010 -0700
@@ -29,13 +29,11 @@
 #include <setjmp.h>
 #include "lisp.h"
 #include <stdio.h>
-#include <stdlib.h>
 #include <time.h>
 #include <sys/param.h>
 #include <sys/time.h>
 #include <dos.h>
 #include <errno.h>
-#include <string.h>	 /* for memset and string functions */
 #include <sys/stat.h>    /* for _fixpath */
 #include <unistd.h>	 /* for chdir, dup, dup2, etc. */
 #include <dir.h>	 /* for getdisk */
--- a/src/process.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/process.c	Fri Oct 01 06:56:33 2010 -0700
@@ -31,7 +31,6 @@
 #ifdef HAVE_INTTYPES_H
 #include <inttypes.h>
 #endif
-#include <stdlib.h>
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
--- a/src/scroll.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/scroll.c	Fri Oct 01 06:56:33 2010 -0700
@@ -20,7 +20,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <string.h>
 #include <setjmp.h>
 #include "lisp.h"
 #include "termchar.h"
--- a/src/sound.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/sound.c	Fri Oct 01 06:56:33 2010 -0700
@@ -86,8 +86,6 @@
 
 /* BEGIN: Windows Specific Includes */
 #include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include <limits.h>
 #include <windows.h>
 #include <mmsystem.h>
--- a/src/term.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/term.c	Fri Oct 01 06:56:33 2010 -0700
@@ -23,7 +23,6 @@
 #include <config.h>
 #include <stdio.h>
 #include <ctype.h>
-#include <string.h>
 #include <errno.h>
 #include <sys/file.h>
 
--- a/src/unexsol.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/unexsol.c	Fri Oct 01 06:56:33 2010 -0700
@@ -1,7 +1,6 @@
 /* Trivial unexec for Solaris.  */
 
 #include <config.h>
-#include <stdlib.h>
 #include <dlfcn.h>
 #include <setjmp.h>
 
--- a/src/w16select.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/w16select.c	Fri Oct 01 06:56:33 2010 -0700
@@ -28,7 +28,6 @@
 #ifdef MSDOS
 
 #include <config.h>
-#include <string.h>
 #include <dpmi.h>
 #include <go32.h>
 #include <sys/farptr.h>
--- a/src/w32console.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/w32console.c	Fri Oct 01 06:56:33 2010 -0700
@@ -25,10 +25,8 @@
 
 #include <config.h>
 
-#include <stdlib.h>
 #include <stdio.h>
 #include <windows.h>
-#include <string.h>
 #include <setjmp.h>
 
 #include "lisp.h"
--- a/src/w32heap.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/w32heap.c	Fri Oct 01 06:56:33 2010 -0700
@@ -25,7 +25,6 @@
 #include <config.h>
 #endif
 
-#include <stdlib.h>
 #include <stdio.h>
 #include <setjmp.h>
 
--- a/src/w32inevt.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/w32inevt.c	Fri Oct 01 06:56:33 2010 -0700
@@ -27,7 +27,6 @@
 #include <config.h>
 #endif
 
-#include <stdlib.h>
 #include <stdio.h>
 #include <windows.h>
 #include <setjmp.h>
--- a/src/w32reg.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/w32reg.c	Fri Oct 01 06:56:33 2010 -0700
@@ -26,7 +26,6 @@
 #include "blockinput.h"
 
 #include <stdio.h>
-#include <string.h>
 
 #define REG_ROOT "SOFTWARE\\GNU\\Emacs"
 
--- a/src/w32term.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/w32term.c	Fri Oct 01 06:56:33 2010 -0700
@@ -21,7 +21,6 @@
 #include <config.h>
 #include <signal.h>
 #include <stdio.h>
-#include <stdlib.h>
 #include <setjmp.h>
 #include "lisp.h"
 #include "blockinput.h"
--- a/src/xfont.c	Fri Oct 01 13:33:03 2010 +0000
+++ b/src/xfont.c	Fri Oct 01 06:56:33 2010 -0700
@@ -21,7 +21,6 @@
 
 #include <config.h>
 #include <stdio.h>
-#include <stdlib.h>
 #include <setjmp.h>
 #include <X11/Xlib.h>