(SOURCES): Add strtoul.
[gnulib.git] / lib / euidaccess.c
index 00d6a95..7bd317d 100644 (file)
@@ -59,7 +59,7 @@ gid_t getegid ();
 #endif /* not POSIX_VERSION */
 
 #include <errno.h>
-#ifndef STDC_HEADERS
+#ifndef errno
 extern int errno;
 #endif
 
@@ -74,8 +74,6 @@ extern int errno;
 #define R_OK 4
 #endif
 
-#include "safe-stat.h"
-
 /* The user's real user id. */
 static uid_t uid;
 
@@ -103,9 +101,9 @@ static int have_ids = 0;
 
 int
 eaccess_stat (statp, mode, path)
-     struct stat *statp;
+     const struct stat *statp;
      int mode;
-     char *path;
+     const char *path;
 {
   int granted;
 
@@ -158,7 +156,7 @@ eaccess_stat (statp, mode, path)
 
 int
 euidaccess (path, mode)
-     char *path;
+     const char *path;
      int mode;
 {
   struct stat stats;
@@ -177,7 +175,7 @@ euidaccess (path, mode)
       return access (path, mode);
     }
 
-  if (SAFE_STAT (path, &stats))
+  if (stat (path, &stats))
     return -1;
 
   return eaccess_stat (&stats, mode, path);