summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 0778d0a7b09..c3bb32c2ade 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
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 <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 dc8b4e554e2..5e7ac0cc4b2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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.
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 <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 e1ffd0c0cf6..346a913626d 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 43d1015a93d..0ab776b6914 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 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 <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 ffa02e8e9c9..99a157fbc76 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 e66b50ed3ff..fea70386f18 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 3d08e881e8f..bf6b7699883 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 15ed546bc50..59076eb6a4a 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 dee55d1e976..33c3cbd7385 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 f82be62965d..3b7e6888753 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 3894770e194..0957221f597 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 c78404910af..435e0784455 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 ce26acbce64..4d1c4045bd4 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 b93099283da..3869f3a57ff 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 a2f7a9cbabe..d67056d2918 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 04e3f40799c..da4865d8ca8 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 ef1b974752b..4d471e97911 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 c39a65f59ff..35f0fc195f7 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 e307694a563..d785dffeab9 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 1ab0546d44f..7cf566e91a2 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 77667eb7dc9..5c02dd376c7 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 992538e0e88..20f0dea8572 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 368587de6d8..0a7f4a3c97f 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>