change from __ino32 to __invalid_ino32.
* include/sys/dirent.h (__invalid_ino32): Rename from __ino32. Don't define
unused d_type macros.
+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.
/* 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')
__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;
}
__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
long d_version;
ino_t __invalid_d_ino;
long d_fd;
- unsigned long __ino32;
+ unsigned long __invalid_ino32;
char d_name[256];
};
#else
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
{
/* 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*/