summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-03-17 21:00:48 +0000
committerJim Meyering <jim@meyering.net>2003-03-17 21:00:48 +0000
commite01be0a128af8426994e01c4eab3845523257194 (patch)
tree3a1d783cdc364b4aa2099adf098ca1af6dce8d1e
parent67b77b54e5ef474b79e9597004a0975ff779b749 (diff)
downloadcoreutils-e01be0a128af8426994e01c4eab3845523257194.tar.xz
(FTW_STAT): Rename from `STAT', to avoid conflict
with STAT definition from <sys/dir.h> on AIX 5.1.
-rw-r--r--lib/ftw.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/ftw.c b/lib/ftw.c
index 817c0f17b..95d5a1c3d 100644
--- a/lib/ftw.c
+++ b/lib/ftw.c
@@ -137,7 +137,7 @@ int rpl_lstat (const char *, struct stat *);
# define FTW_NAME ftw
# define NFTW_NAME nftw
# define INO_T ino_t
-# define STAT stat
+# define FTW_STAT stat
# ifdef _LIBC
# define LXSTAT __lxstat
# define XSTAT __xstat
@@ -218,7 +218,8 @@ static const int ftw_arr[] =
/* Forward declarations of local functions. */
-static int ftw_dir (struct ftw_data *data, struct STAT *st) internal_function;
+static int ftw_dir (struct ftw_data *data, struct FTW_STAT *st)
+ internal_function;
static int
@@ -237,7 +238,7 @@ object_compare (const void *p1, const void *p2)
static inline int
-add_object (struct ftw_data *data, struct STAT *st)
+add_object (struct ftw_data *data, struct FTW_STAT *st)
{
struct known_object *newp = malloc (sizeof (struct known_object));
if (newp == NULL)
@@ -249,7 +250,7 @@ add_object (struct ftw_data *data, struct STAT *st)
static inline int
-find_object (struct ftw_data *data, struct STAT *st)
+find_object (struct ftw_data *data, struct FTW_STAT *st)
{
struct known_object obj;
obj.dev = st->st_dev;
@@ -353,7 +354,7 @@ static inline int
process_entry (struct ftw_data *data, struct dir_data *dir, const char *name,
size_t namlen)
{
- struct STAT st;
+ struct FTW_STAT st;
int result = 0;
int flag = 0;
size_t new_buflen;
@@ -465,7 +466,7 @@ process_entry (struct ftw_data *data, struct dir_data *dir, const char *name,
static int
internal_function
-ftw_dir (struct ftw_data *data, struct STAT *st)
+ftw_dir (struct ftw_data *data, struct FTW_STAT *st)
{
struct dir_data dir;
struct dirent64 *d;
@@ -639,7 +640,7 @@ ftw_startup (const char *dir, int is_nftw, NFTW_FUNC_T func, int descriptors,
int flags)
{
struct ftw_data data;
- struct STAT st;
+ struct FTW_STAT st;
int result = 0;
int save_err;
struct saved_cwd cwd;