#endif
#include <stdio.h>
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
#include <ctype.h>
#include "unlocked-io.h"
#include "xalloc.h"
#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 \
Return NULL if there are no more entries. */
char *
-getusershell ()
+getusershell (void)
{
if (default_index > 0)
{
/* Rewind the shells file. */
void
-setusershell ()
+setusershell (void)
{
default_index = 0;
if (shellstream)
/* Close the shells file. */
void
-endusershell ()
+endusershell (void)
{
if (shellstream)
{
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;
}
#ifdef TEST
-main ()
+int
+main (void)
{
char *s;
-# 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
# 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)
])