summaryrefslogtreecommitdiff
path: root/src/install.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-10-18 22:05:29 +0000
committerJim Meyering <jim@meyering.net>1995-10-18 22:05:29 +0000
commit63b348b3a9df364415fe61abac1b8c3c45c55ccc (patch)
treecfd7e9360f9c80fcf9f9f35c63680d024c67a7a5 /src/install.c
parent6181f175e3916e9e8e81c3fd8f8f9573a66ffec4 (diff)
downloadcoreutils-63b348b3a9df364415fe61abac1b8c3c45c55ccc.tar.xz
Use HAVE_SYS_WAIT_H, not _POSIX_VERSION in conditional
inclusion of sys/wait.h. [endgrent]: Test !HAVE_ENDGRENT rather than _POSIX_SOURCE. [endpwent]: Test !HAVE_ENDPWENT rather than _POSIX_SOURCE.
Diffstat (limited to 'src/install.c')
-rw-r--r--src/install.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/install.c b/src/install.c
index 0d916119e..82faf9e23 100644
--- a/src/install.c
+++ b/src/install.c
@@ -65,19 +65,25 @@
#include "makepath.h"
#include "error.h"
-#ifdef _POSIX_VERSION
+#if HAVE_SYS_WAIT_H
#include <sys/wait.h>
-#else
+#endif
+
struct passwd *getpwnam ();
struct group *getgrnam ();
+
+#ifndef _POSIX_VERSION
uid_t getuid ();
gid_t getgid ();
int wait ();
#endif
-#ifdef _POSIX_SOURCE
-#define endgrent()
-#define endpwent()
+#ifndef HAVE_ENDGRENT
+# define endgrent() ((void) 0)
+#endif
+
+#ifndef HAVE_ENDPWENT
+# define endpwent() ((void) 0)
#endif
/* True if C is an ASCII octal digit. */