Do not include stdlib.h and string.h, config.h does it.
authorDan Nicolaescu <dann@ics.uci.edu>
Fri, 1 Oct 2010 13:56:33 +0000 (06:56 -0700)
committerDan Nicolaescu <dann@ics.uci.edu>
Fri, 1 Oct 2010 13:56:33 +0000 (06:56 -0700)
* 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.

26 files changed:
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

index 0778d0a..c3bb32c 100644 (file)
--- 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.
index 771ce78..e52bb2b 100644 (file)
@@ -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>
index dc8b4e5..5e7ac0c 100644 (file)
@@ -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.
 
index b7c6fdc..1f14f6a 100644 (file)
@@ -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"
index e1ffd0c..346a913 100644 (file)
@@ -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 */
index 43d1015..0ab776b 100644 (file)
@@ -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>
index 43ebb75..d5eaada 100644 (file)
@@ -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>
index ffa02e8..99a157f 100644 (file)
@@ -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>
index e66b50e..fea7038 100644 (file)
@@ -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"
index 3d08e88..bf6b769 100644 (file)
@@ -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
index 15ed546..59076eb 100644 (file)
@@ -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>
index dee55d1..33c3cbd 100644 (file)
@@ -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>
 
index f82be62..3b7e688 100644 (file)
@@ -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>
index 3894770..0957221 100644 (file)
@@ -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 */
index c784049..435e078 100644 (file)
@@ -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>
index ce26acb..4d1c404 100644 (file)
@@ -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"
index b930992..3869f3a 100644 (file)
@@ -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>
index a2f7a9c..d67056d 100644 (file)
@@ -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>
 
index 04e3f40..da4865d 100644 (file)
@@ -1,7 +1,6 @@
 /* Trivial unexec for Solaris.  */
 
 #include <config.h>
-#include <stdlib.h>
 #include <dlfcn.h>
 #include <setjmp.h>
 
index ef1b974..4d471e9 100644 (file)
@@ -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>
index c39a65f..35f0fc1 100644 (file)
@@ -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"
index e307694..d785dff 100644 (file)
@@ -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>
 
index 1ab0546..7cf566e 100644 (file)
@@ -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>
index 77667eb..5c02dd3 100644 (file)
@@ -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"
 
index 992538e..20f0dea 100644 (file)
@@ -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"
index 368587d..0a7f4a3 100644 (file)
@@ -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>