Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-09-08 08:04:19 +0400
committerChristopher Faylor <me@cgf.cx>2003-09-08 08:04:19 +0400
commit0c7b55727aff6848f72afc41c149d9d4dfc3cdb5 (patch)
tree216af49bea40c5c2e936020955135ce8a3529277 /winsup/cygwin/include
parentd31c5928ddc2f5cde08e89e55fb0cbc9656fd2b9 (diff)
Throughout, remove __d_u.__d_data fields from DIR structure.
* include/sys/dirent.h (dirent): Remvoe old_d_ino. (DIR): Make __d_dirhash a 64 bit value. Remove __d_data and __d_u. Add __flags. * dir.cc (opendir_states): New enum. (opendir): Clear new DIR __flags field. (readdir): Fill in '.' and '..' entries if we hit EOF and we haven't seen them already. Nuke setting of old_d_ino. (rewinddir): Reset DIR __flags field. (seekdir64): Ditto. * fhandler_disk_file.cc (fhandler_cygdrive::fhandler_cygdrive): Remove special handling of "." and ".." since they are now handled automatically.
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r--winsup/cygwin/include/sys/dirent.h25
1 files changed, 9 insertions, 16 deletions
diff --git a/winsup/cygwin/include/sys/dirent.h b/winsup/cygwin/include/sys/dirent.h
index a077169b9..1e6996f87 100644
--- a/winsup/cygwin/include/sys/dirent.h
+++ b/winsup/cygwin/include/sys/dirent.h
@@ -1,6 +1,6 @@
/* Posix dirent.h for WIN32.
- Copyright 2001 Red Hat, Inc.
+ Copyright 2001, 2002, 2003 Red Hat, Inc.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
@@ -23,7 +23,7 @@ struct dirent
__ino64_t d_ino; /* still junk but with more bits */
long d_fd; /* File descriptor of open directory.
Used since Cygwin 1.3.3. */
- __ino32_t old_d_ino; /* Just for compatibility, it's junk */
+ unsigned __flags; /* Used internally. */
char d_name[256]; /* FIXME: use NAME_MAX? */
};
#else
@@ -33,7 +33,7 @@ struct dirent
long d_version;
ino_t d_ino;
long d_fd;
- unsigned long old_d_ino;
+ unsigned long __unused;
char d_name[256];
};
#else
@@ -51,6 +51,7 @@ struct dirent
#define __DIRENT_COOKIE 0xdede4242
+#pragma pack(push,4)
typedef struct __DIR
{
/* This is first to set alignment in non _COMPILING_NEWLIB case. */
@@ -58,20 +59,12 @@ typedef struct __DIR
struct dirent *__d_dirent;
char *__d_dirname; /* directory name with trailing '*' */
_off_t __d_position; /* used by telldir/seekdir */
- unsigned long __d_dirhash; /* hash of directory name for use by
- readdir */
- union
- {
-#ifdef __INSIDE_CYGWIN__
- struct
- {
- void *__handle;
- void *__fh;
- } __d_data;
-#endif
- char __d_filler[16];
- } __d_u;
+ __ino64_t __d_dirhash; /* hash of directory name for use by readdir */
+ void *__handle;
+ void *__fh;
+ unsigned __flags;
} DIR;
+#pragma pack(pop)
DIR *opendir (const char *);
struct dirent *readdir (DIR *);