From: Paul Eggert Date: Tue, 9 Sep 2003 19:23:55 +0000 (+0000) Subject: Remove K&R cruft. X-Git-Tag: cvs-readonly~4531 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=0a7a9905bf6051f5fb6cca69a85720f83424dd90;p=gnulib.git Remove K&R cruft. --- diff --git a/lib/getusershell.c b/lib/getusershell.c index 3401c885d..1025fbd59 100644 --- a/lib/getusershell.c +++ b/lib/getusershell.c @@ -32,9 +32,7 @@ #endif #include -#if HAVE_STDLIB_H -# include -#endif +#include #include #include "unlocked-io.h" #include "xalloc.h" @@ -47,7 +45,7 @@ #define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c)) -static int readname (); +static int readname (char **, int *, FILE *); #if ! defined ADDITIONAL_DEFAULT_SHELLS && defined __MSDOS__ # define ADDITIONAL_DEFAULT_SHELLS \ @@ -82,7 +80,7 @@ static int line_size = 0; Return NULL if there are no more entries. */ char * -getusershell () +getusershell (void) { if (default_index > 0) { @@ -114,7 +112,7 @@ getusershell () /* Rewind the shells file. */ void -setusershell () +setusershell (void) { default_index = 0; if (shellstream) @@ -124,7 +122,7 @@ setusershell () /* Close the shells file. */ void -endusershell () +endusershell (void) { if (shellstream) { @@ -142,10 +140,7 @@ endusershell () if some nonempty sequence was found, otherwise 0. */ static int -readname (name, size, stream) - char **name; - int *size; - FILE *stream; +readname (char **name, int *size, FILE *stream) { int c; int name_index = 0; @@ -175,7 +170,8 @@ readname (name, size, stream) } #ifdef TEST -main () +int +main (void) { char *s; diff --git a/m4/getusershell.m4 b/m4/getusershell.m4 index 642124bd4..a53d2c93e 100644 --- a/m4/getusershell.m4 +++ b/m4/getusershell.m4 @@ -1,5 +1,5 @@ -# getusershell.m4 serial 1 -dnl Copyright (C) 2002 Free Software Foundation, Inc. +# getusershell.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 @@ -17,7 +17,6 @@ AC_DEFUN([gl_FUNC_GETUSERSHELL], # Prerequisites of lib/getusershell.c. AC_DEFUN([gl_PREREQ_GETUSERSHELL], [ AC_REQUIRE([AC_HEADER_STDC]) - AC_CHECK_HEADERS_ONCE(stdlib.h) AC_CHECK_FUNCS_ONCE(isascii) ])