/* userspec.c -- Parse a user and group string.
- Copyright (C) 1989, 1990, 1991, 1992, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1989-1992, 1997, 1998 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
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
-# ifdef HAVE_ALLOCA_H
+# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#define isdigit(c) ((c) >= '0' && (c) <= '9')
+#ifndef strdup
char *strdup ();
+#endif
/* Return nonzero if STR represents an unsigned decimal integer,
otherwise return 0. */
static int
-is_number (str)
- const char *str;
+is_number (const char *str)
{
for (; *str; str++)
if (!isdigit (*str))
Return NULL if successful, a static error message string if not. */
const char *
-parse_user_spec (spec_arg, uid, gid, username_arg, groupname_arg)
- const char *spec_arg;
- uid_t *uid;
- gid_t *gid;
- char **username_arg, **groupname_arg;
+parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid,
+ char **username_arg, char **groupname_arg)
{
static const char *tired = "virtual memory exhausted";
const char *error_msg;