diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2007-06-29 15:13:01 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2007-06-29 15:13:01 +0000 |
commit | 40570a828e0ed00cf570a2d7fa41ddae887c1367 (patch) | |
tree | 86f1a9e5322b57c1b2567a1e85b308e0ff932816 /winsup/cygwin/include/sys | |
parent | 8931495a1417c7dc1b6c56d0120efb40a1fa030b (diff) | |
download | cygnal-40570a828e0ed00cf570a2d7fa41ddae887c1367.tar.gz cygnal-40570a828e0ed00cf570a2d7fa41ddae887c1367.tar.bz2 cygnal-40570a828e0ed00cf570a2d7fa41ddae887c1367.zip |
* cygwin.din: Export fdopendir.
* dir.cc (opendir): Call fhandler's opendir with fd set to -1.
(fdopendir): New function.
(seekdir64): Use dirent_info_mask.
(rewinddir): Ditto.
(closedir): Only release underlying file descriptor if it has been
reserved by opendir itself.
* fhandler.cc (fhandler_base::opendir): Accommodate new parameter.
* fhandler.h (dirent_states): Add dirent_valid_fd and dirent_info_mask.
(fhander_XXX::opendir): Add file descriptor parameter. Use regparms.
(fhandler_procnet::opendir): Drop declaration.
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Ditto.
If called from fdopendir, use existing handle to re-open directory
with valid flags. Rename fd to cfd. Use only if no valid incoming fd.
(fhandler_cygdrive::opendir): Accommodate new parameter.
* fhandler_process.cc (fhandler_process::opendir): Ditto.
* fhandler_procnet.cc (fhandler_procnet::opendir): Drop definition.
* fhandler_virtual.cc (fhandler_virtual::opendir): Accommodate new
parameter. Only create new file descriptor entry if called from
opendir. Remove duplicated setting of dir->__flags.
* posix.sgml: Add fdopendir to list of implemented Solaris functions.
* include/cygwin/version.h: Bump API minor number.
* include/sys/dirent.h: Declare fdopendir.
Diffstat (limited to 'winsup/cygwin/include/sys')
-rw-r--r-- | winsup/cygwin/include/sys/dirent.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/include/sys/dirent.h b/winsup/cygwin/include/sys/dirent.h index d4e5e1333..24cde06d6 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, 2002, 2003, 2005, 2006 Red Hat, Inc. + Copyright 2001, 2002, 2003, 2005, 2006, 2007 Red Hat, Inc. This software is a copyrighted work licensed under the terms of the Cygwin license. Please consult the file "CYGWIN_LICENSE" for @@ -56,6 +56,7 @@ typedef struct __DIR #pragma pack(pop) DIR *opendir (const char *); +DIR *fdopendir (int); struct dirent *readdir (DIR *); int readdir_r (DIR *, struct dirent *, struct dirent **); void rewinddir (DIR *); |