Re: speed up test-stat-time

2009-10-13 Thread Paolo Bonzini
On 10/13/2009 09:23 AM, Jim Meyering wrote: Definitely. In fact, there should be no uses of AC_CHECK_FUNCS in modules/* files. Of course, there*could* be justification if someone requires that a function check be conditional, but if there's enough logic, then you can argue it belongs in a .m4

Re: speed up test-stat-time

2009-10-13 Thread Jim Meyering
Paolo Bonzini wrote: configure.ac: +AC_CHECK_FUNCS([usleep]) AC_CHECK_FUNCS_ONCE is better maybe? Definitely. In fact, there should be no uses of AC_CHECK_FUNCS in modules/* files. Of course, there *could* be justification if someone requires that a function check be conditional, but if

Re: speed up test-stat-time

2009-10-13 Thread Paolo Bonzini
On 10/13/2009 09:47 AM, Bruno Haible wrote: ... or if someone augments LIBS, does an AC_CHECK_FUNCS, and restores LIBS afterwards. Better use a .m4 in that case too, I'd say. Paolo

Re: speed up test-stat-time

2009-10-13 Thread Bruno Haible
Jim Meyering wrote: In fact, there should be no uses of AC_CHECK_FUNCS in modules/* files. Of course, there *could* be justification if someone requires that a function check be conditional ... or if someone augments LIBS, does an AC_CHECK_FUNCS, and restores LIBS afterwards. Bruno, Paolo,

Re: speed up test-stat-time

2009-10-13 Thread Eric Blake
Eric Blake ebb9 at byu.net writes: +/* Sleep long enough to notice a timestamp difference on the file + system in the current directory. */ +static void +nap (void) +{ ... +delay = 200; +} + usleep (delay); Well I feel stupid. POSIX 2008 withdrew usleep in favor of

Re: fchdir on mingw

2009-10-13 Thread Eric Blake
Eric Blake ebb9 at 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

Re: speed up test-stat-time

2009-10-13 Thread Eric Blake
Eric Blake ebb9 at byu.net writes: looking at the assembly, it looks like mingw fails to set errno to EINVAL, but just blindly returns without sleeping). Correction - on mingw, usleep(100) returns EINVAL without touching errno, rather than the POSIX behavior of returning -1 and setting