[Patch] Add dirent.d_type support to Cygwin 1.7 ?

Christian Franke Christian.Franke@t-online.de
Fri Nov 28 21:34:00 GMT 2008

Corinna Vinschen wrote:
> On Nov 27 21:15, Christopher Faylor wrote:
>> ...
>> If Corinna's ok with this then so am I.
> Yep.  Applied with just a minor change to the ChangeLog entry.


Attn maintainers:
If package with dirent.d_type support is rebuild with new sys/dirent.h, 
it is no longer backward compatible with older Cygwin releases. This is 
IMO no problem for packages rebuild for 1.7.

If desired, this can be fixed by initializing d_type after opendir:

   DIR * dir = opendir(path);
   if (!dir) {...}
+#if defined(__CYGWIN__) && defined(_DIRENT_HAVE_D_TYPE)
+  dir->__d_dirent->d_type = DT_UNKNOWN;

Probably OT: Current CVS does not work for me, bash fails when first 
command is run:

bash-3.2$ ./true
    419 [sig] bash 3016 _cygtls::handle_exceptions: Exception: 
   1032 [sig] bash 3016 open_stackdumpfile: Dumping stack trace to 

Using exception.cc 1.326 instead of 1.327 fixes the problem.


More information about the Cygwin-patches mailing list