From fd369ba030e3b438471331b668b823dc02567615 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 15 Oct 2007 14:46:49 +0100 Subject: remove attempts at K&R compatibility; such systems are no longer supported by the GNU build system and man-db's support for them was unadvertised and broken anyway --- lib/appendstr.c | 29 ++++------------------------- lib/basename.c | 10 +--------- lib/decompress.c | 12 ++---------- lib/hashtable.c | 12 ++---------- lib/pathsearch.c | 10 ++-------- lib/tempfile.c | 4 +--- libdb/db_btree.c | 5 ----- libdb/db_delete.c | 14 -------------- libdb/db_gdbm.c | 10 ++-------- libdb/db_lookup.c | 15 --------------- libdb/db_ndbm.c | 5 +---- libdb/db_store.c | 14 -------------- libdb/db_ver.c | 7 ------- src/accessdb.c | 17 ++--------------- src/catman.c | 17 ++--------------- src/check_mandirs.c | 18 ++---------------- src/compression.c | 16 ++-------------- src/convert_name.c | 14 +++----------- src/descriptions.c | 13 ++----------- src/descriptions_store.c | 13 ++----------- src/encodings.c | 10 ++-------- src/fake_security.c | 4 ---- src/filenames.c | 13 ++----------- src/globbing.c | 15 ++------------- src/globbing_test.c | 5 +---- src/lexgrog.l | 11 +---------- src/lexgrog.l-2.3.8 | 11 +---------- src/lexgrog.l-2.4a | 11 +---------- src/lexgrog.l.new | 11 +---------- src/lexgrog_test.c | 11 ++--------- src/man.c | 18 ++---------------- src/manconv.c | 11 ++--------- src/mandb.c | 16 ++-------------- src/manp.c | 19 ++----------------- src/manpath.c | 11 ++--------- src/security.c | 15 ++------------- src/straycats.c | 17 ++--------------- src/ult_src.c | 17 ++--------------- src/util.c | 15 ++------------- src/version.c | 2 -- src/whatis.c | 17 ++--------------- src/zsoelim.l | 17 ++--------------- 42 files changed, 65 insertions(+), 467 deletions(-) diff --git a/lib/appendstr.c b/lib/appendstr.c index 998dc05b..1bbaebcc 100644 --- a/lib/appendstr.c +++ b/lib/appendstr.c @@ -20,35 +20,14 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ -#if defined(STDC_HEADERS) -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -extern char *strcpy(); -#endif /* STDC_HEADERS */ - -#ifdef __STDC__ -# include -# define VA_START va_start (ap, str) -#else -# include -# define VA_START va_start (ap) -#endif +#include +#include #include "manconfig.h" /* append strings to first argument, which is realloced to the correct size first arg may be NULL */ -#ifdef __STDC__ char *appendstr (char *str, ...) -#else -char *appendstr (str, va_alist) - char *str; - va_dcl -#endif { va_list ap; int len, newlen; @@ -56,7 +35,7 @@ char *appendstr (str, va_alist) len = str ? strlen (str) : 0; - VA_START; + va_start (ap, str); newlen = len + 1; while ((next = va_arg (ap, char *))) newlen += strlen (next); @@ -65,7 +44,7 @@ char *appendstr (str, va_alist) str = xrealloc (str, newlen); end = str + len; - VA_START; + va_start (ap, str); while ((next = va_arg (ap, char *))) { strcpy (end, next); end += strlen (next); diff --git a/lib/basename.c b/lib/basename.c index e86a6e0d..ff6001ba 100644 --- a/lib/basename.c +++ b/lib/basename.c @@ -27,15 +27,7 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ -#if defined(STDC_HEADERS) -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -extern char *strrchr(); -#endif /* STDC_HEADERS */ +#include /* return basename of given filename */ char *basename(char *filename) diff --git a/lib/decompress.c b/lib/decompress.c index 5b3c11c8..38a83c4b 100644 --- a/lib/decompress.c +++ b/lib/decompress.c @@ -24,16 +24,8 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -#endif /* STDC_HEADERS */ - +#include +#include #include #include #include diff --git a/lib/hashtable.c b/lib/hashtable.c index 43f256df..5935ed10 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -34,16 +34,8 @@ #endif /* HAVE_CONFIG_H */ #include /* only for printf() */ - -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -#endif /* STDC_HEADERS */ +#include +#include #include "manconfig.h" #include "hashtable.h" diff --git a/lib/pathsearch.c b/lib/pathsearch.c index 4e366485..adebe952 100644 --- a/lib/pathsearch.c +++ b/lib/pathsearch.c @@ -24,14 +24,8 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#endif /* STDC_HEADERS */ +#include +#include #include #include diff --git a/lib/tempfile.c b/lib/tempfile.c index 3d6daa3c..dd97646d 100644 --- a/lib/tempfile.c +++ b/lib/tempfile.c @@ -26,9 +26,7 @@ #include -#ifdef STDC_HEADERS -# include -#endif /* STDC_HEADERS */ +#include #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ diff --git a/libdb/db_btree.c b/libdb/db_btree.c index bcc1ecc2..65bb54c1 100644 --- a/libdb/db_btree.c +++ b/libdb/db_btree.c @@ -30,12 +30,7 @@ #include #include - -#if defined(STDC_HEADERS) || defined(HAVE_STRING_H) #include -#elif defined(HAVE_STRINGS_H) -#include -#endif /* STDC_HEADERS */ #if HAVE_SYS_FILE_H # include /* for flock() */ diff --git a/libdb/db_delete.c b/libdb/db_delete.c index 240c9509..0732b04d 100644 --- a/libdb/db_delete.c +++ b/libdb/db_delete.c @@ -27,27 +27,13 @@ #include #include - -#if defined(STDC_HEADERS) #include #include -#elif defined(HAVE_STRING_H) -#include -#elif defined(HAVE_STRINGS_H) -#include -#else /* no string(s) header file */ -extern char *strsep(); -#endif /* STDC_HEADERS */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ -#ifndef STDC_HEADERS -extern long atol(); -extern char *strsep(); -#endif /* not STDC_HEADERS */ - #include "gettext.h" #define _(String) gettext (String) diff --git a/libdb/db_gdbm.c b/libdb/db_gdbm.c index c060d5b5..1f78c0e2 100644 --- a/libdb/db_gdbm.c +++ b/libdb/db_gdbm.c @@ -26,14 +26,8 @@ #ifdef GDBM -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#endif /* STDC_HEADERS */ +#include +#include #include "manconfig.h" diff --git a/libdb/db_lookup.c b/libdb/db_lookup.c index ddc59302..e02a021d 100644 --- a/libdb/db_lookup.c +++ b/libdb/db_lookup.c @@ -29,28 +29,13 @@ #include #include #include - -#if defined(STDC_HEADERS) #include #include -#elif defined(HAVE_STRING_H) -#include -#elif defined(HAVE_STRINGS_H) -#include -#else /* no string(s) header file */ -extern char *strsep(); -#endif /* STDC_HEADERS */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ -#ifndef STDC_HEADERS -extern long atol(); -extern char *strsep(); -extern int errno; -#endif /* not STDC_HEADERS */ - #include "gettext.h" #define _(String) gettext (String) diff --git a/libdb/db_ndbm.c b/libdb/db_ndbm.c index d293f132..a3591077 100644 --- a/libdb/db_ndbm.c +++ b/libdb/db_ndbm.c @@ -26,6 +26,7 @@ #ifdef NDBM +#include #include #if HAVE_SYS_FILE_H @@ -39,10 +40,6 @@ # include #endif -#ifdef STDC_HEADERS -#include -#endif /* STDC_HEADERS */ - #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ diff --git a/libdb/db_store.c b/libdb/db_store.c index dc82e320..4c91bbb5 100644 --- a/libdb/db_store.c +++ b/libdb/db_store.c @@ -27,27 +27,13 @@ #include #include - -#if defined(STDC_HEADERS) #include #include -#elif defined(HAVE_STRING_H) -#include -#elif defined(HAVE_STRINGS_H) -#include -#else /* no string(s) header file */ -extern char *strsep(); -#endif /* STDC_HEADERS */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ -#ifndef STDC_HEADERS -extern long atol(); -extern char *strsep(); -#endif /* not STDC_HEADERS */ - #include "gettext.h" #define _(String) gettext (String) diff --git a/libdb/db_ver.c b/libdb/db_ver.c index d106738a..85a135f9 100644 --- a/libdb/db_ver.c +++ b/libdb/db_ver.c @@ -26,15 +26,8 @@ #endif #include - -#if defined(STDC_HEADERS) #include #include -#elif defined(HAVE_STRING_H) -#include -#elif defined(HAVE_STRINGS_H) -#include -#endif /* STDC_HEADERS */ #include "gettext.h" #define _(String) gettext (String) diff --git a/src/accessdb.c b/src/accessdb.c index e05093ad..2e1b5215 100644 --- a/src/accessdb.c +++ b/src/accessdb.c @@ -29,21 +29,8 @@ #include #include - -#ifndef STDC_HEADERS -extern int errno; -#endif - -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -extern char *strchr(); -#endif /* STDC_HEADERS */ +#include +#include #ifdef HAVE_LIBGEN_H # include diff --git a/src/catman.c b/src/catman.c index ac4d9882..0d615222 100644 --- a/src/catman.c +++ b/src/catman.c @@ -33,26 +33,13 @@ #include #include #include +#include +#include #if HAVE_SYS_WAIT_H # include #endif /* HAVE_SYS_WAIT_H */ -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -#endif /* STDC_HEADERS */ - -#ifndef STDC_HEADERS -extern char *getenv(); -extern int errno; -#endif - #if defined(HAVE_UNISTD_H) # include #endif /* HAVE_UNISTD_H */ diff --git a/src/check_mandirs.c b/src/check_mandirs.c index 5625a638..1e7ede65 100644 --- a/src/check_mandirs.c +++ b/src/check_mandirs.c @@ -30,6 +30,8 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ +#include +#include #include #include #include @@ -56,22 +58,6 @@ # include #endif /* HAVE_UNISTD_H */ -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -extern char *strchr(), *strrchr(), *strstr(), *strpbrk(); -#endif /* no string(s) header */ - -#ifndef STDC_HEADERS -extern time_t time(); -extern int errno; -#endif - #ifdef HAVE_LIBGEN_H # include #endif /* HAVE_LIBGEN_H */ diff --git a/src/compression.c b/src/compression.c index a258166f..f64df2c8 100644 --- a/src/compression.c +++ b/src/compression.c @@ -30,20 +30,8 @@ #include #include #include - -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -#endif /* STDC_HEADERS */ - -#ifndef STDC_HEADERS -extern int errno; -#endif +#include +#include #if defined(HAVE_UNISTD_H) # include diff --git a/src/convert_name.c b/src/convert_name.c index 786c994c..2df52866 100644 --- a/src/convert_name.c +++ b/src/convert_name.c @@ -28,22 +28,14 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -#endif /* STDC_HEADERS */ +#include +#include +#include #if defined(HAVE_UNISTD_H) # include #endif /* HAVE_UNISTD_H */ -#include - #include "gettext.h" #define _(String) gettext (String) diff --git a/src/descriptions.c b/src/descriptions.c index 46783e78..b66e1393 100644 --- a/src/descriptions.c +++ b/src/descriptions.c @@ -25,17 +25,8 @@ #endif /* HAVE_CONFIG_H */ #include - -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -extern char *strchr(); -#endif /* no string(s) header */ +#include +#include #include "manconfig.h" #include "descriptions.h" diff --git a/src/descriptions_store.c b/src/descriptions_store.c index bdc2beac..1459150e 100644 --- a/src/descriptions_store.c +++ b/src/descriptions_store.c @@ -25,17 +25,8 @@ #endif /* HAVE_CONFIG_H */ #include - -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -extern char *strchr(); -#endif /* no string(s) header */ +#include +#include #include "gettext.h" #define _(String) gettext (String) diff --git a/src/encodings.c b/src/encodings.c index 9d982bf6..ac4118cd 100644 --- a/src/encodings.c +++ b/src/encodings.c @@ -24,14 +24,8 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#endif /* STDC_HEADERS */ +#include +#include #include "gettext.h" #include diff --git a/src/fake_security.c b/src/fake_security.c index bbf0021d..80ef15ab 100644 --- a/src/fake_security.c +++ b/src/fake_security.c @@ -30,10 +30,6 @@ #include #include -#ifndef STDC_HEADERS -extern int errno; -#endif - #include #include "gettext.h" diff --git a/src/filenames.c b/src/filenames.c index ec1995cf..7e52a24e 100644 --- a/src/filenames.c +++ b/src/filenames.c @@ -26,17 +26,8 @@ #endif /* HAVE_CONFIG_H */ #include - -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -extern char *strrchr(); -#endif /* no string(s) header */ +#include +#include #ifdef HAVE_LIBGEN_H # include diff --git a/src/globbing.c b/src/globbing.c index 344a0c4f..968217e2 100644 --- a/src/globbing.c +++ b/src/globbing.c @@ -27,22 +27,11 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -extern char *strrchr(); -#endif /* STDC_HEADERS */ - +#include +#include #include - #include #include - #include #include diff --git a/src/globbing_test.c b/src/globbing_test.c index b3de6294..e64d45ea 100644 --- a/src/globbing_test.c +++ b/src/globbing_test.c @@ -26,10 +26,7 @@ #endif /* HAVE_CONFIG_H */ #include - -#ifdef STDC_HEADERS -# include -#endif /* STDC_HEADERS */ +#include #include "gettext.h" #define _(String) gettext (String) diff --git a/src/lexgrog.l b/src/lexgrog.l index ac0d3b3e..501b13a4 100644 --- a/src/lexgrog.l +++ b/src/lexgrog.l @@ -36,21 +36,12 @@ #include #include - -#ifndef STDC_HEADERS -extern int errno; -#endif +#include #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H -# include -#elif defined (HAVE_STRINGS_H) -# include -#endif /* HAVE_STRING_H */ - #include "gettext.h" #define _(String) gettext (String) diff --git a/src/lexgrog.l-2.3.8 b/src/lexgrog.l-2.3.8 index ee7df99f..3b4168d4 100644 --- a/src/lexgrog.l-2.3.8 +++ b/src/lexgrog.l-2.3.8 @@ -29,21 +29,12 @@ #endif /* HAVE_CONFIG_H */ #include - -#ifndef STDC_HEADERS -extern int errno; -#endif +#include #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H -# include -#elif defined (HAVE_STRINGS_H) -# include -#endif /* HAVE_STRING_H */ - #include "manconfig.h" #include "error.h" diff --git a/src/lexgrog.l-2.4a b/src/lexgrog.l-2.4a index daaca70b..96c3ae4f 100644 --- a/src/lexgrog.l-2.4a +++ b/src/lexgrog.l-2.4a @@ -31,21 +31,12 @@ #endif /* HAVE_CONFIG_H */ #include - -#ifndef STDC_HEADERS -extern int errno; -#endif +#include #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H -# include -#elif defined (HAVE_STRINGS_H) -# include -#endif /* HAVE_STRING_H */ - #include "manconfig.h" #include "error.h" diff --git a/src/lexgrog.l.new b/src/lexgrog.l.new index dcf99373..1ca83751 100644 --- a/src/lexgrog.l.new +++ b/src/lexgrog.l.new @@ -31,21 +31,12 @@ #endif /* HAVE_CONFIG_H */ #include - -#ifndef STDC_HEADERS -extern int errno; -#endif +#include #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ -#ifdef HAVE_STRING_H -# include -#elif defined (HAVE_STRINGS_H) -# include -#endif /* HAVE_STRING_H */ - #include "gettext.h" #define _(String) gettext (String) diff --git a/src/lexgrog_test.c b/src/lexgrog_test.c index 830cbd83..225ecfaf 100644 --- a/src/lexgrog_test.c +++ b/src/lexgrog_test.c @@ -26,18 +26,11 @@ #endif /* HAVE_CONFIG_H */ #include +#include +#include #include -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#endif /* STDC_HEADERS */ - #ifdef HAVE_LIBGEN_H # include #endif /* HAVE_LIBGEN_H */ diff --git a/src/man.c b/src/man.c index d9557698..10d7d000 100644 --- a/src/man.c +++ b/src/man.c @@ -39,22 +39,13 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ +#include +#include #include #include #include #include -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -extern char *strchr(), *strcat(); -#endif /* STDC_HEADERS */ - #if defined(HAVE_UNISTD_H) # include #else @@ -103,11 +94,6 @@ static char *cwd; # include #endif -#ifndef STDC_HEADERS -extern char *getenv(); -extern int errno; -#endif - #ifdef HAVE_LIBGEN_H # include #endif /* HAVE_LIBGEN_H */ diff --git a/src/manconv.c b/src/manconv.c index f1a0bb5c..2a929ed2 100644 --- a/src/manconv.c +++ b/src/manconv.c @@ -35,15 +35,8 @@ #include #include - -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#endif +#include +#include #if defined(HAVE_UNISTD_H) # include diff --git a/src/mandb.c b/src/mandb.c index 57893623..d5fa7470 100644 --- a/src/mandb.c +++ b/src/mandb.c @@ -29,6 +29,8 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ +#include +#include #include #include #include @@ -36,20 +38,6 @@ #include /* for chmod() */ #include -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -#endif /* STDC_HEADERS */ - -#ifndef STDC_HEADERS -extern int errno; -#endif - #if defined(HAVE_UNISTD_H) # include #else diff --git a/src/manp.c b/src/manp.c index 008ff595..bcb366e5 100644 --- a/src/manp.c +++ b/src/manp.c @@ -54,28 +54,13 @@ #include #include -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -extern char *strtok(); -extern char *strchr(); -extern char *strstr(); -#endif +#include +#include #if defined(HAVE_UNISTD_H) # include #endif /* HAVE_UNISTD_H */ -#ifndef STDC_HEADERS -extern char *getenv(); -extern int errno; -#endif - #include #include "gettext.h" diff --git a/src/manpath.c b/src/manpath.c index 1d1bbf25..7d6619ad 100644 --- a/src/manpath.c +++ b/src/manpath.c @@ -27,20 +27,13 @@ #include "config.h" #endif /* HAVE_CONFIG_H */ +#include +#include #include #include #include #include -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#endif /* STDC_HEADERS */ - #if defined(HAVE_UNISTD_H) # include #endif /* HAVE_UNISTD_H */ diff --git a/src/security.c b/src/security.c index 9d39abef..a4821d98 100644 --- a/src/security.c +++ b/src/security.c @@ -27,23 +27,12 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ +#include +#include #include #include #include -#ifndef STDC_HEADERS -extern int errno; -#endif - -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#endif /* STDC_HEADERS */ - #include #if HAVE_SYS_WAIT_H diff --git a/src/straycats.c b/src/straycats.c index 39839c13..62035740 100644 --- a/src/straycats.c +++ b/src/straycats.c @@ -27,25 +27,12 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ +#include +#include #include #include #include -#ifndef STDC_HEADERS -extern int errno; -#endif - -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -extern char *strrchr(); -#endif /* STDC_HEADERS */ - #include #include diff --git a/src/ult_src.c b/src/ult_src.c index eef8ebac..535b4d24 100644 --- a/src/ult_src.c +++ b/src/ult_src.c @@ -31,6 +31,8 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ +#include +#include #include #include #include @@ -38,10 +40,6 @@ #include #include -#ifndef STDC_HEADERS -extern int errno; -#endif - #ifndef S_ISLNK /* losing sys/stat.h */ # if defined(S_IFMT) && defined(S_IFLNK) # define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK) @@ -63,17 +61,6 @@ extern int errno; # endif /* HAVE_NDIR_H */ #endif /* HAVE_DIRENT_H */ -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -extern char *strrchr(); -#endif /* no string(s) header */ - #if defined(HAVE_UNISTD_H) # include #endif /* HAVE_UNISTD_H */ diff --git a/src/util.c b/src/util.c index 1ff94f9b..cfb4f171 100644 --- a/src/util.c +++ b/src/util.c @@ -35,21 +35,10 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ +#include +#include #include -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -extern char *strrchr(); -extern char *strcat(); -extern char *strcpy(); -#endif /* STDC_HEADERS */ - #include #include #include diff --git a/src/version.c b/src/version.c index f75ce800..35d9799c 100644 --- a/src/version.c +++ b/src/version.c @@ -27,9 +27,7 @@ #endif /* HAVE_CONFIG_H */ #include -#ifdef STDC_HEADERS #include -#endif #include "gettext.h" #define _(String) gettext (String) diff --git a/src/whatis.c b/src/whatis.c index 97715dc0..182de3ac 100644 --- a/src/whatis.c +++ b/src/whatis.c @@ -33,29 +33,16 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ +#include +#include #include #include #include -#ifndef STDC_HEADERS -extern int errno; -#endif - #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else -extern char *strrchr(); -#endif /* no string(s) header */ - #include "gettext.h" #include #define _(String) gettext (String) diff --git a/src/zsoelim.l b/src/zsoelim.l index 3ee3ce62..2f6eacd5 100644 --- a/src/zsoelim.l +++ b/src/zsoelim.l @@ -40,17 +40,8 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ -#if defined(STDC_HEADERS) -# include -# include -#elif defined(HAVE_STRING_H) -# include -#elif defined(HAVE_STRINGS_H) -# include -#else /* no string(s) header */ -extern char *strchr(), *strcat(); -extern int strncmp(); -#endif /* STDC_HEADERS */ +#include +#include #if defined(HAVE_UNISTD_H) # include @@ -61,10 +52,6 @@ extern int strncmp(); #include #include -#ifndef STDC_HEADERS -extern int errno; -#endif - #ifdef HAVE_LIBGEN_H # include #endif /* HAVE_LIBGEN_H */ -- cgit v1.2.3