* dir.cc (readdir_worker): Fill in invalid fields with -1. Accommodate name
change from __ino32 to __invalid_ino32. * include/sys/dirent.h (__invalid_ino32): Rename from __ino32. Don't define unused d_type macros.
This commit is contained in:
parent
96f5988e31
commit
9025f2aa7d
@ -1,3 +1,10 @@
|
||||
2006-01-19 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* dir.cc (readdir_worker): Fill in invalid fields with -1. Accommodate
|
||||
name change from __ino32 to __invalid_ino32.
|
||||
* include/sys/dirent.h (__invalid_ino32): Rename from __ino32. Don't
|
||||
define unused d_type macros.
|
||||
|
||||
2006-01-18 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* heap.cc (heap_init): Remove Sleep.
|
||||
|
@ -104,8 +104,8 @@ readdir_worker (DIR *dir, dirent *de)
|
||||
/* error return */;
|
||||
else if (!CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO)
|
||||
{
|
||||
de->__invalid_d_ino = 0;
|
||||
de->__ino32 = 0;
|
||||
de->__invalid_d_ino = (ino_t) -1;
|
||||
de->__invalid_ino32 = (uint32_t) -1;
|
||||
if (de->d_name[0] == '.')
|
||||
{
|
||||
if (de->d_name[1] == '\0')
|
||||
@ -150,7 +150,7 @@ readdir_worker (DIR *dir, dirent *de)
|
||||
__ino64_t dino = hash_path_name (dir->__d_dirhash, "\\");
|
||||
de->__invalid_d_ino = hash_path_name (dino, de->d_name);
|
||||
}
|
||||
de->__ino32 = de->__invalid_d_ino; // for legacy applications
|
||||
de->__invalid_ino32 = de->__invalid_d_ino; // for legacy applications
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ struct dirent
|
||||
__ino64_t __invalid_d_ino;
|
||||
long d_fd; /* File descriptor of open directory.
|
||||
Used since Cygwin 1.3.3. */
|
||||
unsigned __ino32;
|
||||
unsigned __invalid_ino32;
|
||||
char d_name[256]; /* FIXME: use NAME_MAX? */
|
||||
};
|
||||
#else
|
||||
@ -33,7 +33,7 @@ struct dirent
|
||||
long d_version;
|
||||
ino_t __invalid_d_ino;
|
||||
long d_fd;
|
||||
unsigned long __ino32;
|
||||
unsigned long __invalid_ino32;
|
||||
char d_name[256];
|
||||
};
|
||||
#else
|
||||
@ -86,6 +86,7 @@ int scandir (const char *__dir,
|
||||
int (*compar) (const struct dirent **, const struct dirent **));
|
||||
|
||||
int alphasort (const struct dirent **__a, const struct dirent **__b);
|
||||
#if 0 /* these make no sense in the absence of d_type */
|
||||
/* File types for `d_type'. */
|
||||
enum
|
||||
{
|
||||
@ -112,5 +113,6 @@ enum
|
||||
/* Convert between stat structure types and directory types. */
|
||||
# define IFTODT(mode) (((mode) & 0170000) >> 12)
|
||||
# define DTTOIF(dirtype) ((dirtype) << 12)
|
||||
#endif
|
||||
#endif /* _POSIX_SOURCE */
|
||||
#endif /*_SYS_DIRENT_H*/
|
||||
|
Loading…
Reference in New Issue
Block a user