Redefine/undef getusershell around inclusion of <unistd.h>
authorJim Meyering <jim@meyering.net>
Sat, 5 Jul 1997 08:25:58 +0000 (08:25 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 5 Jul 1997 08:25:58 +0000 (08:25 +0000)
(via system.h) so Cray's int-returning prototype doesn't conflict
with our char*-returning one.

src/su.c

index 96b47552d86ecfd9e914fd3a6ef7e425ab3462ff..26c65fe7bbec151f061f84791a4bac99cc7959ab 100644 (file)
--- a/src/su.c
+++ b/src/su.c
 #include <sys/types.h>
 #include <pwd.h>
 #include <grp.h>
+
+/* Hide any system prototype for getusershell.
+   This is necessary because some Cray systems have a conflicting
+   prototype (returning `int') in <unistd.h>.  */
+#define getusershell _getusershell_sys_proto_
+
 #include "system.h"
 
+#undef getusershell
+
 #if HAVE_SYSLOG_H && HAVE_SYSLOG
 # include <syslog.h>
 #else