Rename my internal macros STAT and LSTAT (defined to stat/lstat or
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 26 Oct 2012 19:14:10 +0000 (19:14 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 26 Oct 2012 19:14:10 +0000 (19:14 +0000)
stat64/lstat64 depending on autoconf) to something else, since an
AIX-based user has given me reason to think that one of the AIX system
headers treads on the former names.

git-svn-id: svn://svn.tartarus.org/sgt/agedu@9691 cda61777-01e9-0310-a592-d414129be87e

agedu.h
du.c

diff --git a/agedu.h b/agedu.h
index 8e2548c..b0052f0 100644 (file)
--- a/agedu.h
+++ b/agedu.h
@@ -102,12 +102,12 @@ extern char pathsep;
 
 #if defined HAVE_LSTAT64 && HAVE_STAT64
 #define STRUCT_STAT struct stat64
-#define LSTAT lstat64
-#define STAT stat64
+#define LSTAT_FUNC lstat64
+#define STAT_FUNC stat64
 #else
 #define STRUCT_STAT struct stat
-#define LSTAT lstat
-#define STAT stat
+#define LSTAT_FUNC lstat
+#define STAT_FUNC stat
 #endif
 
 #define max(x,y) ( (x) > (y) ? (x) : (y) )
diff --git a/du.c b/du.c
index 03276c4..fb39201 100644 (file)
--- a/du.c
+++ b/du.c
@@ -185,9 +185,9 @@ static void du_recurse(char **path, size_t pathlen, size_t *pathsize,
      * symlink.
      */
     if (toplevel)
-       statret = STAT(*path, &st);
+       statret = STAT_FUNC(*path, &st);
     else
-       statret = LSTAT(*path, &st);
+       statret = LSTAT_FUNC(*path, &st);
     if (statret < 0) {
        err(gotdata_ctx, "%s: lstat: %s\n", *path, strerror(errno));
        return;