From 51d340e1c801b82e5e8b58b48639d46681d33f4c Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 9 Sep 2003 00:21:16 +0000 Subject: [PATCH] * dir.cc (readdir): Reinstate setting of old ino field for legacy applications. * dirent.h (dirent): Rename unused field to __ino32. * passwd.cc (getpwnam_r): Initialize pw_comment field. --- winsup/cygwin/ChangeLog | 8 +++++++- winsup/cygwin/dir.cc | 1 + winsup/cygwin/include/sys/dirent.h | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 7c56d7a81..815917e26 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,6 +1,12 @@ 2003-09-08 Christopher Faylor - * passwe.cc (getpwnam_r): Initialize pw_comment field. + * dir.cc (readdir): Reinstate setting of old ino field for legacy + applications. + * dirent.h (dirent): Rename unused field to __ino32. + +2003-09-08 Christopher Faylor + + * passwd.cc (getpwnam_r): Initialize pw_comment field. 2003-09-08 Christopher Faylor diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc index 6fd2804d4..c7edd8871 100644 --- a/winsup/cygwin/dir.cc +++ b/winsup/cygwin/dir.cc @@ -174,6 +174,7 @@ readdir (DIR *dir) __ino64_t dino = hash_path_name (dir->__d_dirhash, "\\"); dir->__d_dirent->d_ino = hash_path_name (dino, res->d_name); } + res->__ino32 = dir->__d_dirent->d_ino; // for legacy applications } return res; } diff --git a/winsup/cygwin/include/sys/dirent.h b/winsup/cygwin/include/sys/dirent.h index 1e6996f87..c3d77c4fb 100644 --- a/winsup/cygwin/include/sys/dirent.h +++ b/winsup/cygwin/include/sys/dirent.h @@ -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. */ - unsigned __flags; /* Used internally. */ + unsigned __ino32; 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 __unused; + unsigned long __ino32; char d_name[256]; }; #else