[Patch] Add dirent.d_type support to Cygwin 1.7 ?
Christian Franke
Christian.Franke@t-online.de
Wed Nov 26 21:25:00 GMT 2008
This is an experimental patch to add dirent.d_type support to readdir().
It sets d_type to DT_DIR/REG for normal disk directories/files and
DT_UNKNOWN in all other cases.
Test result with original find (4.4.0-3) vs. same find rebuild with new
sys/dirent.h:
$ export TIMEFORMAT='%1R'
$ time find /cygdrive/c/cygwin >/dev/null
30.5
$ time find-with-d_type /cygdrive/c/cygwin >/dev/null
9.5
$ time cmd /c dir /a/s 'c:\cygwin' >/dev/null
5.2
Due to the missing initialization of '__d_unused1', new programs with
d_type support would not be backward compatible.
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygwin-dirent-d_type.patch
Type: text/x-patch
Size: 3704 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20081126/69e1b26c/attachment.bin>
More information about the Cygwin-patches
mailing list