aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2003-11-28 10:48:26 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2003-11-28 10:48:26 +0000
commit74a824198a92275fbb576b6e293ba623be5460fc (patch)
tree028a7271e24f76454f7b67290efd882a575ad0c1
parenteb366e1abf1dba9af43854b9c859beb263bcb1ac (diff)
downloadcpio-74a824198a92275fbb576b6e293ba623be5460fc.tar.gz
cpio-74a824198a92275fbb576b6e293ba623be5460fc.tar.bz2
Changed the way of handling declared vs. undeclared system calls.
-rw-r--r--userspec.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/userspec.c b/userspec.c
index 6dfea71..a048141 100644
--- a/userspec.c
+++ b/userspec.c
@@ -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);',

Return to:

Send suggestions and report system problems to the System administrator.