Re: fchdir on mingw

2009-10-13 Thread Eric Blake
Eric Blake byu.net> writes: > Date: Tue, 15 Sep 2009 15:54:43 -0600 > Subject: [PATCH] fchdir: improve use of replacement functions > > * m4/fchdir.m4 (gl_FUNC_FCHDIR): Set appropriate witnesses. > * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add REPLACE_FSTAT. This patch broke fstat on non-dir

Re: fchdir on mingw

2009-09-15 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 9/1/2009 10:55 AM: > > Eric Blake (5): > fchdir: fix off-by-one bug in previous patch > fchdir: simplify error handling, and support dup3 > fchdir: use more consistent macro convention This particular patc

Re: fchdir on mingw

2009-09-01 Thread Eric Blake
Eric Blake byu.net> writes: > +/* Return stat information about FD in STATBUF. Needed when > + rpl_open() used a dummy file to work around an open() that can't > + normally visit directories. */ > +#if REPLACE_OPEN_DIRECTORY > +int > +rpl_fstat (int fd, struct stat *statbuf) > +{ > + if (0

Re: fchdir on mingw

2009-08-31 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 8/31/2009 3:35 PM: > One of the main reasons the fchdir module was added was so that the openat > module (and friends) would compile on mingw. Well, it turns out that mingw > has > the (documented) limitation that open(di

Re: fchdir on mingw

2009-08-31 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 8/31/2009 5:38 PM: > Notice that this changes the status of fdopendir - whereas it was previously > non-multithread safe and could call _exit, the mingw version of fdopendir is > now threadsafe and avoids _exit. Well, not

Re: fchdir on mingw

2009-08-31 Thread Eric Blake
Eric Blake byu.net> writes: > > Eric Blake byu.net> writes: > > > One improvement possible for fdopendir is that > > if fchdir is being emulated by gnulib, we can do a query into the fchdir > > metadata table to retrieve the directory name associated with an fd, rather > > than having to go

Re: fchdir on mingw

2009-08-31 Thread Eric Blake
Eric Blake byu.net> writes: > One improvement possible for fdopendir is that > if fchdir is being emulated by gnulib, we can do a query into the fchdir > metadata table to retrieve the directory name associated with an fd, rather > than having to go through save_cwd/fchdir/opendir/restore_cwd.