From 8b2c2981e6eb29e690d711da01793ad8d99ea372 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 9 Sep 2003 22:41:13 +0000 Subject: [PATCH] Remove K&R cruft. --- lib/mktime.c | 12 +++--------- lib/modechange.c | 7 +------ lib/mountlist.c | 13 ++----------- m4/mktime.m4 | 6 ++---- m4/modechange.m4 | 5 ++--- m4/mountlist.m4 | 7 +++---- 6 files changed, 13 insertions(+), 37 deletions(-) diff --git a/lib/mktime.c b/lib/mktime.c index 5a17eecc6..3dab58ad8 100644 --- a/lib/mktime.c +++ b/lib/mktime.c @@ -25,10 +25,6 @@ # include #endif -#ifdef _LIBC -# define STDC_HEADERS 1 -#endif - /* Assume that leap seconds are possible, unless told otherwise. If the host has a `zic' command with a `-L leapsecondfilename' option, then it supports leap seconds; otherwise it probably doesn't. */ @@ -43,10 +39,8 @@ #if DEBUG # include -# if STDC_HEADERS -# include -# include -# endif +# include +# include /* Make it work even if the system's libc has its own mktime routine. */ # define mktime my_mktime #endif /* DEBUG */ @@ -625,6 +619,6 @@ main (int argc, char **argv) /* Local Variables: -compile-command: "gcc -DDEBUG -DSTDC_HEADERS -Wall -W -O -g mktime.c -o mktime" +compile-command: "gcc -DDEBUG -Wall -W -O -g mktime.c -o mktime" End: */ diff --git a/lib/modechange.c b/lib/modechange.c index 8cec11d41..c9bdbe7bd 100644 --- a/lib/modechange.c +++ b/lib/modechange.c @@ -34,12 +34,7 @@ #include #include "xstrtol.h" #include - -#if STDC_HEADERS -# include -#else -char *malloc (); -#endif +#include #if STAT_MACROS_BROKEN # undef S_ISDIR diff --git a/lib/mountlist.c b/lib/mountlist.c index a2c1c2569..096593fb1 100644 --- a/lib/mountlist.c +++ b/lib/mountlist.c @@ -21,18 +21,9 @@ #include #include +#include +#include - -#ifdef STDC_HEADERS -# include -#else -void free (); -#endif -#if defined STDC_HEADERS || defined HAVE_STRING_H -# include -#else -# include -#endif #include "xalloc.h" #ifndef strstr diff --git a/m4/mktime.m4 b/m4/mktime.m4 index 739757b6a..94ed67f70 100644 --- a/m4/mktime.m4 +++ b/m4/mktime.m4 @@ -1,4 +1,4 @@ -# mktime.m4 serial 3 +# mktime.m4 serial 4 dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -199,6 +199,4 @@ AC_DEFUN([gl_FUNC_MKTIME], ]) # Prerequisites of lib/mktime.c. -AC_DEFUN([gl_PREREQ_MKTIME], [ - AC_REQUIRE([AC_HEADER_STDC]) -]) +AC_DEFUN([gl_PREREQ_MKTIME], [:]) diff --git a/m4/modechange.m4 b/m4/modechange.m4 index d5403e91d..80b03c967 100644 --- a/m4/modechange.m4 +++ b/m4/modechange.m4 @@ -1,5 +1,5 @@ -# modechange.m4 serial 1 -dnl Copyright (C) 2002 Free Software Foundation, Inc. +# modechange.m4 serial 2 +dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program @@ -8,6 +8,5 @@ dnl the same distribution terms as the rest of that program. AC_DEFUN([gl_MODECHANGE], [ - AC_REQUIRE([AC_HEADER_STDC]) AC_REQUIRE([AC_HEADER_STAT]) ]) diff --git a/m4/mountlist.m4 b/m4/mountlist.m4 index c2af19a91..6a6b38c3f 100644 --- a/m4/mountlist.m4 +++ b/m4/mountlist.m4 @@ -1,5 +1,5 @@ -# mountlist.m4 serial 1 -dnl Copyright (C) 2002 Free Software Foundation, Inc. +# mountlist.m4 serial 2 +dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program @@ -19,9 +19,8 @@ AC_DEFUN([gl_MOUNTLIST], # Prerequisites of lib/mountlist.c not done by jm_LIST_MOUNTED_FILESYSTEMS. AC_DEFUN([gl_PREREQ_MOUNTLIST_EXTRA], [ - AC_REQUIRE([AC_HEADER_STDC]) dnl Note jm_LIST_MOUNTED_FILESYSTEMS checks for mntent.h, not sys/mntent.h. - AC_CHECK_HEADERS_ONCE(fcntl.h string.h unistd.h) + AC_CHECK_HEADERS_ONCE(fcntl.h unistd.h) AC_CHECK_HEADERS(sys/mntent.h) jm_FSTYPENAME ]) -- 2.11.0