diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2003-11-28 10:48:26 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2003-11-28 10:48:26 +0000 |
commit | 74a824198a92275fbb576b6e293ba623be5460fc (patch) | |
tree | 028a7271e24f76454f7b67290efd882a575ad0c1 | |
parent | eb366e1abf1dba9af43854b9c859beb263bcb1ac (diff) | |
download | cpio-74a824198a92275fbb576b6e293ba623be5460fc.tar.gz cpio-74a824198a92275fbb576b6e293ba623be5460fc.tar.bz2 |
Changed the way of handling declared vs. undeclared system calls.
-rw-r--r-- | userspec.c | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -57,15 +57,21 @@ char *alloca (); #include <unistd.h> #endif -#ifndef _POSIX_VERSION -struct passwd *getpwnam (); -struct group *getgrnam (); -struct group *getgrgid (); +#if !HAVE_DECL_GETPWNAM +extern struct passwd *getpwnam (const char *name); +#endif +#if !HAVE_DECL_GETGRNAM +extern struct group *getgrnam (const char *name); +#endif +#if !HAVE_DECL_GETGRGID +extern struct group *getgrgid (gid_t gid); #endif -#ifdef _POSIX_SOURCE -#define endpwent() -#define endgrent() +#ifndef HAVE_ENDPWENT +# define endpwent() +#endif +#ifndef HAVE_ENDGRENT +# define endgrent() #endif /* Perform the equivalent of the statement `dest = strdup (src);', |