directory: rename attribute "stat" to "have_stat"

"stat" is a macro on mingw32, which is a pretty stupid thing, and this
commit works around this build failure.
This commit is contained in:
Max Kellermann
2011-11-27 20:15:25 +01:00
parent 2bb5bfa74e
commit cd108ba3aa
2 changed files with 3 additions and 3 deletions

View File

@@ -43,7 +43,7 @@ struct directory {
time_t mtime; time_t mtime;
ino_t inode; ino_t inode;
dev_t device; dev_t device;
bool stat; /* not needed if ino_t == dev_t == 0 is impossible */ bool have_stat; /* not needed if ino_t == dev_t == 0 is impossible */
char path[sizeof(long)]; char path[sizeof(long)];
}; };

View File

@@ -86,7 +86,7 @@ directory_set_stat(struct directory *dir, const struct stat *st)
{ {
dir->inode = st->st_ino; dir->inode = st->st_ino;
dir->device = st->st_dev; dir->device = st->st_dev;
dir->stat = true; dir->have_stat = true;
} }
static void static void
@@ -346,7 +346,7 @@ inodeFoundInParent(struct directory *parent, ino_t inode, dev_t device)
{ {
#ifndef G_OS_WIN32 #ifndef G_OS_WIN32
while (parent) { while (parent) {
if (!parent->stat && statDirectory(parent) < 0) if (!parent->have_stat && statDirectory(parent) < 0)
return -1; return -1;
if (parent->inode == inode && parent->device == device) { if (parent->inode == inode && parent->device == device) {
g_debug("recursive directory found"); g_debug("recursive directory found");