aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu <[email protected]>2010-10-01 06:56:33 -0700
committerDan Nicolaescu <[email protected]>2010-10-01 06:56:33 -0700
commit4cacd822d198d85848348ae85c08fb56f6525116 (patch)
tree37d3c5dfbfa693aaef0e65965336f2551103d056
parent0a887f3950c55887fb86fc45d6ceaf958e5c1f6e (diff)
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.
-rw-r--r--ChangeLog4
-rw-r--r--configure.in5
-rw-r--r--src/ChangeLog25
-rw-r--r--src/bidi.c1
-rw-r--r--src/callproc.c1
-rw-r--r--src/charset.c1
-rw-r--r--src/config.in5
-rw-r--r--src/dbusbind.c1
-rw-r--r--src/dosfns.c1
-rw-r--r--src/fileio.c2
-rw-r--r--src/filelock.c1
-rw-r--r--src/font.c1
-rw-r--r--src/gtkutil.c1
-rw-r--r--src/msdos.c2
-rw-r--r--src/process.c1
-rw-r--r--src/scroll.c1
-rw-r--r--src/sound.c2
-rw-r--r--src/term.c1
-rw-r--r--src/unexsol.c1
-rw-r--r--src/w16select.c1
-rw-r--r--src/w32console.c2
-rw-r--r--src/w32heap.c1
-rw-r--r--src/w32inevt.c1
-rw-r--r--src/w32reg.c1
-rw-r--r--src/w32term.c1
-rw-r--r--src/xfont.c1
26 files changed, 29 insertions, 36 deletions
diff --git a/ChangeLog b/ChangeLog
index 0778d0a7b0..c3bb32c2ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-10-01 Dan Nicolaescu <[email protected]>
+
+ * configure.in: Include stdlib.h and string.h unconditionally.
+
2010-09-29 Romain Francoise <[email protected]>
* configure.in: Don't enable ImageMagick unless HAVE_X11.
diff --git a/configure.in b/configure.in
index 771ce78459..e52bb2bd22 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 <string.h>
-#endif
-
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
diff --git a/src/ChangeLog b/src/ChangeLog
index dc8b4e554e..5e7ac0cc4b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,29 @@
2010-10-01 Dan Nicolaescu <[email protected]>
+ 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.
diff --git a/src/bidi.c b/src/bidi.c
index b7c6fdc2dd..1f14f6ab84 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -51,7 +51,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <stdio.h>
-#include <string.h>
#include <setjmp.h>
#include "lisp.h"
diff --git a/src/callproc.c b/src/callproc.c
index e1ffd0c0cf..346a913626 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -38,7 +38,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#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 */
diff --git a/src/charset.c b/src/charset.c
index 43d1015a93..0ab776b691 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -28,7 +28,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <stdio.h>
-#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
#include <sys/types.h>
diff --git a/src/config.in b/src/config.in
index 43ebb75621..d5eaada59b 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 <string.h>
-#endif
-
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
diff --git a/src/dbusbind.c b/src/dbusbind.c
index ffa02e8e9c..99a157fbc7 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#ifdef HAVE_DBUS
-#include <stdlib.h>
#include <stdio.h>
#include <dbus/dbus.h>
#include <setjmp.h>
diff --git a/src/dosfns.c b/src/dosfns.c
index e66b50ed3f..fea70386f1 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -24,7 +24,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* The entire file is within this conditional */
#include <stdio.h>
-#include <string.h>
#include <dos.h>
#include <setjmp.h>
#include "lisp.h"
diff --git a/src/fileio.c b/src/fileio.c
index 3d08e881e8..bf6b769988 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -71,7 +71,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifdef WINDOWSNT
#define NOMINMAX 1
#include <windows.h>
-#include <stdlib.h>
#include <fcntl.h>
#endif /* not WINDOWSNT */
@@ -79,7 +78,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "msdos.h"
#include <sys/param.h>
#include <fcntl.h>
-#include <string.h>
#endif
#ifdef DOS_NT
diff --git a/src/filelock.c b/src/filelock.c
index 15ed546bc5..59076eb6a4 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -34,7 +34,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
diff --git a/src/font.c b/src/font.c
index dee55d1e97..33c3cbd738 100644
--- a/src/font.c
+++ b/src/font.c
@@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <stdio.h>
-#include <stdlib.h>
#include <ctype.h>
#include <setjmp.h>
diff --git a/src/gtkutil.c b/src/gtkutil.c
index f82be62965..3b7e688875 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -20,7 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#ifdef USE_GTK
-#include <string.h>
#include <signal.h>
#include <stdio.h>
#include <setjmp.h>
diff --git a/src/msdos.c b/src/msdos.c
index 3894770e19..0957221f59 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -29,13 +29,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#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 */
diff --git a/src/process.c b/src/process.c
index c78404910a..435e078445 100644
--- a/src/process.c
+++ b/src/process.c
@@ -31,7 +31,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
-#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
diff --git a/src/scroll.c b/src/scroll.c
index ce26acbce6..4d1c4045bd 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -20,7 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <stdio.h>
-#include <string.h>
#include <setjmp.h>
#include "lisp.h"
#include "termchar.h"
diff --git a/src/sound.c b/src/sound.c
index b93099283d..3869f3a57f 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -86,8 +86,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* BEGIN: Windows Specific Includes */
#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <limits.h>
#include <windows.h>
#include <mmsystem.h>
diff --git a/src/term.c b/src/term.c
index a2f7a9cbab..d67056d291 100644
--- a/src/term.c
+++ b/src/term.c
@@ -23,7 +23,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <stdio.h>
#include <ctype.h>
-#include <string.h>
#include <errno.h>
#include <sys/file.h>
diff --git a/src/unexsol.c b/src/unexsol.c
index 04e3f40799..da4865d8ca 100644
--- a/src/unexsol.c
+++ b/src/unexsol.c
@@ -1,7 +1,6 @@
/* Trivial unexec for Solaris. */
#include <config.h>
-#include <stdlib.h>
#include <dlfcn.h>
#include <setjmp.h>
diff --git a/src/w16select.c b/src/w16select.c
index ef1b974752..4d471e9791 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -28,7 +28,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifdef MSDOS
#include <config.h>
-#include <string.h>
#include <dpmi.h>
#include <go32.h>
#include <sys/farptr.h>
diff --git a/src/w32console.c b/src/w32console.c
index c39a65f59f..35f0fc195f 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -25,10 +25,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
-#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
-#include <string.h>
#include <setjmp.h>
#include "lisp.h"
diff --git a/src/w32heap.c b/src/w32heap.c
index e307694a56..d785dffeab 100644
--- a/src/w32heap.c
+++ b/src/w32heap.c
@@ -25,7 +25,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#endif
-#include <stdlib.h>
#include <stdio.h>
#include <setjmp.h>
diff --git a/src/w32inevt.c b/src/w32inevt.c
index 1ab0546d44..7cf566e91a 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -27,7 +27,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#endif
-#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
#include <setjmp.h>
diff --git a/src/w32reg.c b/src/w32reg.c
index 77667eb7dc..5c02dd376c 100644
--- a/src/w32reg.c
+++ b/src/w32reg.c
@@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "blockinput.h"
#include <stdio.h>
-#include <string.h>
#define REG_ROOT "SOFTWARE\\GNU\\Emacs"
diff --git a/src/w32term.c b/src/w32term.c
index 992538e0e8..20f0dea857 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <signal.h>
#include <stdio.h>
-#include <stdlib.h>
#include <setjmp.h>
#include "lisp.h"
#include "blockinput.h"
diff --git a/src/xfont.c b/src/xfont.c
index 368587de6d..0a7f4a3c97 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include <stdio.h>
-#include <stdlib.h>
#include <setjmp.h>
#include <X11/Xlib.h>