diff options
| author | Dan Nicolaescu | 2010-10-01 06:56:33 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-10-01 06:56:33 -0700 |
| commit | 4cacd822d198d85848348ae85c08fb56f6525116 (patch) | |
| tree | 37d3c5dfbfa693aaef0e65965336f2551103d056 /src | |
| parent | 0a887f3950c55887fb86fc45d6ceaf958e5c1f6e (diff) | |
| download | emacs-4cacd822d198d85848348ae85c08fb56f6525116.tar.gz emacs-4cacd822d198d85848348ae85c08fb56f6525116.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 25 | ||||
| -rw-r--r-- | src/bidi.c | 1 | ||||
| -rw-r--r-- | src/callproc.c | 1 | ||||
| -rw-r--r-- | src/charset.c | 1 | ||||
| -rw-r--r-- | src/config.in | 5 | ||||
| -rw-r--r-- | src/dbusbind.c | 1 | ||||
| -rw-r--r-- | src/dosfns.c | 1 | ||||
| -rw-r--r-- | src/fileio.c | 2 | ||||
| -rw-r--r-- | src/filelock.c | 1 | ||||
| -rw-r--r-- | src/font.c | 1 | ||||
| -rw-r--r-- | src/gtkutil.c | 1 | ||||
| -rw-r--r-- | src/msdos.c | 2 | ||||
| -rw-r--r-- | src/process.c | 1 | ||||
| -rw-r--r-- | src/scroll.c | 1 | ||||
| -rw-r--r-- | src/sound.c | 2 | ||||
| -rw-r--r-- | src/term.c | 1 | ||||
| -rw-r--r-- | src/unexsol.c | 1 | ||||
| -rw-r--r-- | src/w16select.c | 1 | ||||
| -rw-r--r-- | src/w32console.c | 2 | ||||
| -rw-r--r-- | src/w32heap.c | 1 | ||||
| -rw-r--r-- | src/w32inevt.c | 1 | ||||
| -rw-r--r-- | src/w32reg.c | 1 | ||||
| -rw-r--r-- | src/w32term.c | 1 | ||||
| -rw-r--r-- | src/xfont.c | 1 |
24 files changed, 25 insertions, 31 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index dc8b4e554e2..5e7ac0cc4b2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,29 @@ | |||
| 1 | 2010-10-01 Dan Nicolaescu <dann@ics.uci.edu> | 1 | 2010-10-01 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 2 | ||
| 3 | Do not include stdlib.h and string.h, config.h does it. | ||
| 4 | * xfont.c: | ||
| 5 | * w32term.c: | ||
| 6 | * w32reg.c: | ||
| 7 | * w32inevt.c: | ||
| 8 | * w32heap.c: | ||
| 9 | * w32console.c: | ||
| 10 | * w16select.c: | ||
| 11 | * unexsol.c: | ||
| 12 | * term.c: | ||
| 13 | * sound.c: | ||
| 14 | * scroll.c (m): | ||
| 15 | * gtkutil.c: | ||
| 16 | * font.c: | ||
| 17 | * filelock.c: | ||
| 18 | * fileio.c: | ||
| 19 | * dosfns.c: | ||
| 20 | * dbusbind.c: | ||
| 21 | * bidi.c: | ||
| 22 | * callproc.c: | ||
| 23 | * process.c: | ||
| 24 | * msdos.c: | ||
| 25 | * charset.c: Do not include stdlib.h and string.h, config.h does it. | ||
| 26 | |||
| 3 | * callproc.c (SIGCHLD): Remove conditional definition, syssignal.h defines it. | 27 | * callproc.c (SIGCHLD): Remove conditional definition, syssignal.h defines it. |
| 4 | 28 | ||
| 5 | * process.c: Move #include <pty.h> earlier. | 29 | * process.c: Move #include <pty.h> earlier. |
| @@ -10,6 +34,7 @@ | |||
| 10 | * nsmenu.m (syms_of_nsmenu): | 34 | * nsmenu.m (syms_of_nsmenu): |
| 11 | * nsfns.m (syms_of_nsfns): | 35 | * nsfns.m (syms_of_nsfns): |
| 12 | * msdos.c (syms_of_msdos): | 36 | * msdos.c (syms_of_msdos): |
| 37 | |||
| 13 | * image.c (syms_of_image): | 38 | * image.c (syms_of_image): |
| 14 | * charset.c (syms_of_charset): Use intern_c_string instead of intern. | 39 | * charset.c (syms_of_charset): Use intern_c_string instead of intern. |
| 15 | 40 | ||
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/>. */ | |||
| 51 | 51 | ||
| 52 | #include <config.h> | 52 | #include <config.h> |
| 53 | #include <stdio.h> | 53 | #include <stdio.h> |
| 54 | #include <string.h> | ||
| 55 | #include <setjmp.h> | 54 | #include <setjmp.h> |
| 56 | 55 | ||
| 57 | #include "lisp.h" | 56 | #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/>. */ | |||
| 38 | #ifdef WINDOWSNT | 38 | #ifdef WINDOWSNT |
| 39 | #define NOMINMAX | 39 | #define NOMINMAX |
| 40 | #include <windows.h> | 40 | #include <windows.h> |
| 41 | #include <stdlib.h> /* for proper declaration of environ */ | ||
| 42 | #include <fcntl.h> | 41 | #include <fcntl.h> |
| 43 | #include "w32.h" | 42 | #include "w32.h" |
| 44 | #define _P_NOWAIT 1 /* from process.h */ | 43 | #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/>. */ | |||
| 28 | #include <config.h> | 28 | #include <config.h> |
| 29 | 29 | ||
| 30 | #include <stdio.h> | 30 | #include <stdio.h> |
| 31 | #include <stdlib.h> | ||
| 32 | #include <unistd.h> | 31 | #include <unistd.h> |
| 33 | #include <ctype.h> | 32 | #include <ctype.h> |
| 34 | #include <sys/types.h> | 33 | #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. */ | |||
| 1170 | not define __STDC__ (e.g. DEC C by default) or may define it as zero. */ | 1170 | not define __STDC__ (e.g. DEC C by default) or may define it as zero. */ |
| 1171 | #undef PROTOTYPES | 1171 | #undef PROTOTYPES |
| 1172 | 1172 | ||
| 1173 | #ifdef HAVE_STRING_H | ||
| 1174 | #include <string.h> | 1173 | #include <string.h> |
| 1175 | #endif | ||
| 1176 | |||
| 1177 | #ifdef HAVE_STDLIB_H | ||
| 1178 | #include <stdlib.h> | 1174 | #include <stdlib.h> |
| 1179 | #endif | ||
| 1180 | 1175 | ||
| 1181 | #ifdef HAVE_ALLOCA_H | 1176 | #ifdef HAVE_ALLOCA_H |
| 1182 | # include <alloca.h> | 1177 | # 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/>. */ | |||
| 19 | #include <config.h> | 19 | #include <config.h> |
| 20 | 20 | ||
| 21 | #ifdef HAVE_DBUS | 21 | #ifdef HAVE_DBUS |
| 22 | #include <stdlib.h> | ||
| 23 | #include <stdio.h> | 22 | #include <stdio.h> |
| 24 | #include <dbus/dbus.h> | 23 | #include <dbus/dbus.h> |
| 25 | #include <setjmp.h> | 24 | #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/>. */ | |||
| 24 | /* The entire file is within this conditional */ | 24 | /* The entire file is within this conditional */ |
| 25 | 25 | ||
| 26 | #include <stdio.h> | 26 | #include <stdio.h> |
| 27 | #include <string.h> | ||
| 28 | #include <dos.h> | 27 | #include <dos.h> |
| 29 | #include <setjmp.h> | 28 | #include <setjmp.h> |
| 30 | #include "lisp.h" | 29 | #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/>. */ | |||
| 71 | #ifdef WINDOWSNT | 71 | #ifdef WINDOWSNT |
| 72 | #define NOMINMAX 1 | 72 | #define NOMINMAX 1 |
| 73 | #include <windows.h> | 73 | #include <windows.h> |
| 74 | #include <stdlib.h> | ||
| 75 | #include <fcntl.h> | 74 | #include <fcntl.h> |
| 76 | #endif /* not WINDOWSNT */ | 75 | #endif /* not WINDOWSNT */ |
| 77 | 76 | ||
| @@ -79,7 +78,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 79 | #include "msdos.h" | 78 | #include "msdos.h" |
| 80 | #include <sys/param.h> | 79 | #include <sys/param.h> |
| 81 | #include <fcntl.h> | 80 | #include <fcntl.h> |
| 82 | #include <string.h> | ||
| 83 | #endif | 81 | #endif |
| 84 | 82 | ||
| 85 | #ifdef DOS_NT | 83 | #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/>. */ | |||
| 34 | #ifdef HAVE_FCNTL_H | 34 | #ifdef HAVE_FCNTL_H |
| 35 | #include <fcntl.h> | 35 | #include <fcntl.h> |
| 36 | #endif | 36 | #endif |
| 37 | #include <string.h> | ||
| 38 | 37 | ||
| 39 | #ifdef HAVE_UNISTD_H | 38 | #ifdef HAVE_UNISTD_H |
| 40 | #include <unistd.h> | 39 | #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/>. */ | |||
| 21 | 21 | ||
| 22 | #include <config.h> | 22 | #include <config.h> |
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <stdlib.h> | ||
| 25 | #include <ctype.h> | 24 | #include <ctype.h> |
| 26 | #include <setjmp.h> | 25 | #include <setjmp.h> |
| 27 | 26 | ||
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/>. */ | |||
| 20 | #include <config.h> | 20 | #include <config.h> |
| 21 | 21 | ||
| 22 | #ifdef USE_GTK | 22 | #ifdef USE_GTK |
| 23 | #include <string.h> | ||
| 24 | #include <signal.h> | 23 | #include <signal.h> |
| 25 | #include <stdio.h> | 24 | #include <stdio.h> |
| 26 | #include <setjmp.h> | 25 | #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/>. */ | |||
| 29 | #include <setjmp.h> | 29 | #include <setjmp.h> |
| 30 | #include "lisp.h" | 30 | #include "lisp.h" |
| 31 | #include <stdio.h> | 31 | #include <stdio.h> |
| 32 | #include <stdlib.h> | ||
| 33 | #include <time.h> | 32 | #include <time.h> |
| 34 | #include <sys/param.h> | 33 | #include <sys/param.h> |
| 35 | #include <sys/time.h> | 34 | #include <sys/time.h> |
| 36 | #include <dos.h> | 35 | #include <dos.h> |
| 37 | #include <errno.h> | 36 | #include <errno.h> |
| 38 | #include <string.h> /* for memset and string functions */ | ||
| 39 | #include <sys/stat.h> /* for _fixpath */ | 37 | #include <sys/stat.h> /* for _fixpath */ |
| 40 | #include <unistd.h> /* for chdir, dup, dup2, etc. */ | 38 | #include <unistd.h> /* for chdir, dup, dup2, etc. */ |
| 41 | #include <dir.h> /* for getdisk */ | 39 | #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/>. */ | |||
| 31 | #ifdef HAVE_INTTYPES_H | 31 | #ifdef HAVE_INTTYPES_H |
| 32 | #include <inttypes.h> | 32 | #include <inttypes.h> |
| 33 | #endif | 33 | #endif |
| 34 | #include <stdlib.h> | ||
| 35 | 34 | ||
| 36 | #ifdef HAVE_UNISTD_H | 35 | #ifdef HAVE_UNISTD_H |
| 37 | #include <unistd.h> | 36 | #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/>. */ | |||
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <stdio.h> | 22 | #include <stdio.h> |
| 23 | #include <string.h> | ||
| 24 | #include <setjmp.h> | 23 | #include <setjmp.h> |
| 25 | #include "lisp.h" | 24 | #include "lisp.h" |
| 26 | #include "termchar.h" | 25 | #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/>. */ | |||
| 86 | 86 | ||
| 87 | /* BEGIN: Windows Specific Includes */ | 87 | /* BEGIN: Windows Specific Includes */ |
| 88 | #include <stdio.h> | 88 | #include <stdio.h> |
| 89 | #include <stdlib.h> | ||
| 90 | #include <string.h> | ||
| 91 | #include <limits.h> | 89 | #include <limits.h> |
| 92 | #include <windows.h> | 90 | #include <windows.h> |
| 93 | #include <mmsystem.h> | 91 | #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/>. */ | |||
| 23 | #include <config.h> | 23 | #include <config.h> |
| 24 | #include <stdio.h> | 24 | #include <stdio.h> |
| 25 | #include <ctype.h> | 25 | #include <ctype.h> |
| 26 | #include <string.h> | ||
| 27 | #include <errno.h> | 26 | #include <errno.h> |
| 28 | #include <sys/file.h> | 27 | #include <sys/file.h> |
| 29 | 28 | ||
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 @@ | |||
| 1 | /* Trivial unexec for Solaris. */ | 1 | /* Trivial unexec for Solaris. */ |
| 2 | 2 | ||
| 3 | #include <config.h> | 3 | #include <config.h> |
| 4 | #include <stdlib.h> | ||
| 5 | #include <dlfcn.h> | 4 | #include <dlfcn.h> |
| 6 | #include <setjmp.h> | 5 | #include <setjmp.h> |
| 7 | 6 | ||
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/>. */ | |||
| 28 | #ifdef MSDOS | 28 | #ifdef MSDOS |
| 29 | 29 | ||
| 30 | #include <config.h> | 30 | #include <config.h> |
| 31 | #include <string.h> | ||
| 32 | #include <dpmi.h> | 31 | #include <dpmi.h> |
| 33 | #include <go32.h> | 32 | #include <go32.h> |
| 34 | #include <sys/farptr.h> | 33 | #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/>. */ | |||
| 25 | 25 | ||
| 26 | #include <config.h> | 26 | #include <config.h> |
| 27 | 27 | ||
| 28 | #include <stdlib.h> | ||
| 29 | #include <stdio.h> | 28 | #include <stdio.h> |
| 30 | #include <windows.h> | 29 | #include <windows.h> |
| 31 | #include <string.h> | ||
| 32 | #include <setjmp.h> | 30 | #include <setjmp.h> |
| 33 | 31 | ||
| 34 | #include "lisp.h" | 32 | #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/>. */ | |||
| 25 | #include <config.h> | 25 | #include <config.h> |
| 26 | #endif | 26 | #endif |
| 27 | 27 | ||
| 28 | #include <stdlib.h> | ||
| 29 | #include <stdio.h> | 28 | #include <stdio.h> |
| 30 | #include <setjmp.h> | 29 | #include <setjmp.h> |
| 31 | 30 | ||
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/>. */ | |||
| 27 | #include <config.h> | 27 | #include <config.h> |
| 28 | #endif | 28 | #endif |
| 29 | 29 | ||
| 30 | #include <stdlib.h> | ||
| 31 | #include <stdio.h> | 30 | #include <stdio.h> |
| 32 | #include <windows.h> | 31 | #include <windows.h> |
| 33 | #include <setjmp.h> | 32 | #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/>. */ | |||
| 26 | #include "blockinput.h" | 26 | #include "blockinput.h" |
| 27 | 27 | ||
| 28 | #include <stdio.h> | 28 | #include <stdio.h> |
| 29 | #include <string.h> | ||
| 30 | 29 | ||
| 31 | #define REG_ROOT "SOFTWARE\\GNU\\Emacs" | 30 | #define REG_ROOT "SOFTWARE\\GNU\\Emacs" |
| 32 | 31 | ||
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/>. */ | |||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | #include <signal.h> | 22 | #include <signal.h> |
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <stdlib.h> | ||
| 25 | #include <setjmp.h> | 24 | #include <setjmp.h> |
| 26 | #include "lisp.h" | 25 | #include "lisp.h" |
| 27 | #include "blockinput.h" | 26 | #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/>. */ | |||
| 21 | 21 | ||
| 22 | #include <config.h> | 22 | #include <config.h> |
| 23 | #include <stdio.h> | 23 | #include <stdio.h> |
| 24 | #include <stdlib.h> | ||
| 25 | #include <setjmp.h> | 24 | #include <setjmp.h> |
| 26 | #include <X11/Xlib.h> | 25 | #include <X11/Xlib.h> |
| 27 | 26 | ||