(SOURCES): Add memcmp.c, memcpy.c, and memset.c.
[gnulib.git] / lib / euidaccess.c
index 1073c97..499040c 100644 (file)
 #include <sys/types.h>
 #include <sys/stat.h>
 
+#ifdef S_IEXEC
+#ifndef S_IXUSR
+#define S_IXUSR S_IEXEC
+#endif
+#ifndef S_IXGRP
+#define S_IXGRP (S_IEXEC >> 3)
+#endif
+#ifndef S_IXOTH
+#define S_IXOTH (S_IEXEC >> 6)
+#endif
+#endif /* S_IEXEC */
+
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
@@ -47,7 +59,7 @@ gid_t getegid ();
 #endif /* not POSIX_VERSION */
 
 #include <errno.h>
-#ifndef STDC_HEADERS
+#ifndef errno
 extern int errno;
 #endif
 
@@ -165,7 +177,7 @@ euidaccess (path, mode)
       return access (path, mode);
     }
 
-  if (SAFE_STAT (path, &stats))
+  if (safe_stat (path, &stats))
     return -1;
 
   return eaccess_stat (&stats, mode, path);