Re: dirfd on mingw

2011-04-28 Thread Bruno Haible
Eric Blake wrote: > perhaps the dummy fd for fchdir _should_ open a directory HANDLE, as > windows guarantees that a directory with an open handle is less likely > to be renamed out from under us Yes, you can control this behaviour through the FILE_SHARE_DELETE bit of the ShareMode parameter of Cr

Re: dirfd on mingw

2011-04-28 Thread Eric Blake
On 04/28/2011 04:10 PM, Bruno Haible wrote: > Eric Blake wrote: >> what about my idea of >> starting to associate DIR* with directory fds, for the sake of dirfd? > > OK, you want to implement dirfd for native Windows? There are two issues: > > 1) Use a fake fd without a HANDLE, or use a real HAND

Re: dirfd on mingw

2011-04-28 Thread Bruno Haible
Eric Blake wrote: > what about my idea of > starting to associate DIR* with directory fds, for the sake of dirfd? OK, you want to implement dirfd for native Windows? There are two issues: 1) Use a fake fd without a HANDLE, or use a real HANDLE? 2) How to associate the fd with with a DIR structure