From 24ae20fb048992858350c0884b5553c7b76a1bdc Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 10 Sep 2003 03:47:34 +0000 Subject: [PATCH] Remove K&R cruft. --- lib/posixtm.c | 12 +++--------- lib/posixver.c | 6 +----- m4/posixtm.m4 | 5 ++--- m4/posixver.m4 | 5 ++--- 4 files changed, 8 insertions(+), 20 deletions(-) diff --git a/lib/posixtm.c b/lib/posixtm.c index 49e239c888..7ddf182ff7 100644 --- a/lib/posixtm.c +++ b/lib/posixtm.c @@ -25,15 +25,9 @@ #include #include -#if HAVE_STDLIB_H -# include -#endif +#include #include -#if HAVE_STRING_H -# include -#else -# include -#endif +#include #ifdef TM_IN_SYS_TIME # include @@ -294,7 +288,7 @@ END-DATA # define MAX_BUFF_LEN 1024 int -main () +main (void) { char buff[MAX_BUFF_LEN + 1]; diff --git a/lib/posixver.c b/lib/posixver.c index 9467a78cdb..d4761edf96 100644 --- a/lib/posixver.c +++ b/lib/posixver.c @@ -1,6 +1,6 @@ /* Which POSIX version to conform to, for utilities. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,11 +23,7 @@ #endif #include - #include -#if !HAVE_DECL_GETENV && !defined getenv -char *getenv (); -#endif #if HAVE_UNISTD_H # include diff --git a/m4/posixtm.m4 b/m4/posixtm.m4 index 45635bc412..0bf4aca173 100644 --- a/m4/posixtm.m4 +++ b/m4/posixtm.m4 @@ -1,5 +1,5 @@ -# posixtm.m4 serial 1 -dnl Copyright (C) 2002 Free Software Foundation, Inc. +# posixtm.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 @@ -10,5 +10,4 @@ AC_DEFUN([gl_POSIXTM], [ dnl Prerequisites of lib/posixtm.c. AC_STRUCT_TM - AC_CHECK_HEADERS_ONCE(stdlib.h string.h) ]) diff --git a/m4/posixver.m4 b/m4/posixver.m4 index 17eb7c14b1..d0639c7adb 100644 --- a/m4/posixver.m4 +++ b/m4/posixver.m4 @@ -1,5 +1,5 @@ -# posixver.m4 serial 1 -dnl Copyright (C) 2002 Free Software Foundation, Inc. +# posixver.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 @@ -9,5 +9,4 @@ dnl the same distribution terms as the rest of that program. AC_DEFUN([gl_POSIXVER], [ AC_CHECK_HEADERS_ONCE(unistd.h) - AC_CHECK_DECLS_ONCE(getenv) ]) -- 2.30.2