diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-07-06 18:32:56 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-07-06 18:32:56 -0700 |
commit | 0e926e561c259468174b16407dd7271c2c8fe904 (patch) | |
tree | 6a226d2950e17e8e117874c6714fd054600ffba6 /lib-src | |
parent | 59361254a6ea5fcfc2f1ec344665aa719fbb936f (diff) | |
download | emacs-0e926e561c259468174b16407dd7271c2c8fe904.tar.gz |
Assume freestanding C89 headers, string.h, stdlib.h.
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/ChangeLog | 8 | ||||
-rw-r--r-- | lib-src/ebrowse.c | 4 | ||||
-rw-r--r-- | lib-src/etags.c | 25 | ||||
-rw-r--r-- | lib-src/makefile.w32-in | 2 | ||||
-rw-r--r-- | lib-src/movemail.c | 2 | ||||
-rw-r--r-- | lib-src/pop.c | 2 | ||||
-rw-r--r-- | lib-src/update-game-score.c | 7 |
7 files changed, 11 insertions, 39 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 393cac2c8a0..5d95ec74277 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,13 @@ 2011-07-06 Paul Eggert <eggert@cs.ucla.edu> + Assume freestanding C89 headers, string.h, stdlib.h. + * ebrowse.c: Include stdlib.h unconditionally. + * etags.c, update-game-score.c: + Include string.h and stdlib.h unconditionally. + * makefile.w32-in (LOCAL_CFLAGS): Don't define STDC_HEADERS. + * movemail.c, pop.c: Include string.h unconditionally. + * update-game-score.c: No need to include stdarg.h; not used. + Assume support for memcmp, memcpy, memmove, memset. * etags.c (absolute_filename): Assume memmove exists. diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 7871a804997..a997e56cc9f 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c @@ -20,11 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> - -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - #include <string.h> #include <ctype.h> #include <assert.h> diff --git a/lib-src/etags.c b/lib-src/etags.c index bba4b8e7267..522c54ee4a5 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -138,9 +138,7 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4"; #endif /* MSDOS */ #ifdef WINDOWSNT -# include <stdlib.h> # include <fcntl.h> -# include <string.h> # include <direct.h> # include <io.h> # define MAXPATHLEN _MAX_PATH @@ -151,27 +149,6 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4"; # define HAVE_GETCWD # endif /* undef HAVE_GETCWD */ #else /* not WINDOWSNT */ -# ifdef STDC_HEADERS -# include <stdlib.h> -# include <string.h> -# else /* no standard C headers */ - extern char *getenv (const char *); - extern char *strcpy (char *, const char *); - extern char *strncpy (char *, const char *, unsigned long); - extern char *strcat (char *, const char *); - extern char *strncat (char *, const char *, unsigned long); - extern int strcmp (const char *, const char *); - extern int strncmp (const char *, const char *, unsigned long); - extern int system (const char *); - extern unsigned long strlen (const char *); - extern void *malloc (unsigned long); - extern void *realloc (void *, unsigned long); - extern void exit (int); - extern void free (void *); - extern void *memmove (void *, const void *, unsigned long); -# define EXIT_SUCCESS 0 -# define EXIT_FAILURE 1 -# endif #endif /* !WINDOWSNT */ #include <unistd.h> @@ -181,6 +158,8 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4"; # endif #endif /* HAVE_UNISTD_H */ +#include <stdlib.h> +#include <string.h> #include <stdio.h> #include <ctype.h> #include <errno.h> diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index 07f6170afe4..28f913a4df6 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in @@ -21,7 +21,7 @@ ALL = make-docfile hexl ctags etags movemail ebrowse emacsclient .PHONY: $(ALL) -LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \ +LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DNO_LDAV=1 \ -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../lib \ -I../nt/inc -I../src diff --git a/lib-src/movemail.c b/lib-src/movemail.c index e8c09f090f3..d70c655adec 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -68,9 +68,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #ifdef HAVE_FCNTL_H #include <fcntl.h> #endif -#ifdef HAVE_STRING_H #include <string.h> -#endif #include "syswait.h" #ifdef MAIL_USE_POP #include "pop.h" diff --git a/lib-src/pop.c b/lib-src/pop.c index 426b39bd1fb..a94e06fbd87 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c @@ -65,9 +65,7 @@ extern struct servent *hes_getservbyname (/* char *, char * */); #include <netdb.h> #include <errno.h> #include <stdio.h> -#ifdef STDC_HEADERS #include <string.h> -#endif #include <unistd.h> #ifdef KERBEROS diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c index e95e2ce259d..284beafb9d9 100644 --- a/lib-src/update-game-score.c +++ b/lib-src/update-game-score.c @@ -35,12 +35,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <unistd.h> #include <errno.h> -#ifdef HAVE_STRING_H #include <string.h> -#endif -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif #include <stdio.h> #include <time.h> #include <pwd.h> @@ -48,9 +44,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #ifdef HAVE_FCNTL_H #include <fcntl.h> #endif -#ifdef STDC_HEADERS -#include <stdarg.h> -#endif #include <sys/stat.h> /* Needed for SunOS4, for instance. */ |