summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1994-02-16 21:25:32 +0000
committerRoland McGrath <roland@redhat.com>1994-02-16 21:25:32 +0000
commit29b051dc0c5d983037f5793b60874073f71cddbb (patch)
tree424387f5b90d4436efacbeae6b9199a0e7c04a79 /misc.c
parent8e1432e250e2a78b07a65585534323bc0e045c4f (diff)
downloadgunmake-29b051dc0c5d983037f5793b60874073f71cddbb.tar.gz
Formerly misc.c.~30~
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/misc.c b/misc.c
index a8787c8..977e7dc 100644
--- a/misc.c
+++ b/misc.c
@@ -491,6 +491,21 @@ dep_name (dep)
#ifdef GETLOADAVG_PRIVILEGED
+#ifdef POSIX
+/* Hopefully if a system says it's POSIX.1 and has the setuid and setgid
+ functions, they work as POSIX.1 says. Some systems (Alpha OSF/1 1.2,
+ for example) which claim to be POSIX.1 also have the BSD setreuid and
+ setregid functions, but they don't work as in BSD and only the POSIX.1
+ way works. */
+
+#if defined (HAVE_SETREUID) && defined (HAVE_SETUID)
+#undef HAVE_SETREUID
+#endif
+#if defined (HAVE_SETREGID) && defined (HAVE_SETGID)
+#undef HAVE_SETREGID
+#endif
+#endif
+
#ifndef HAVE_UNISTD_H
extern int getuid (), getgid (), geteuid (), getegid ();
extern int setuid (), setgid ();