Hi Paul, > Anyway, I've verified that the following patch fixes the bug on > Solaris 8, so I've pushed it into gnulib.
Thanks for this fix, and the preceding one regarding fdopendir(). I could reproduce the problem with a testdir for module 'getcwd', and I've verified that with these two fixes, the link errors that were present on MacOS X, FreeBSD 6.4, OpenBSD 4.9, NetBSD 5.1, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, mingw are gone. Here's a further simplification. We don't need to duplicate in fstatat.c the decision whether to define rpl_fstatat or fstatat. This decision is already implemented in sys_stat.in.h. I've verified this patch on the above platforms. 2011-11-19 Bruno Haible <br...@clisp.org> fstatat: Simplify. * lib/fstatat.c (AT_FUNC_NAME): Define as fstatat. On platforms where gnulib should define rpl_fstatat, there is a "#define fstatat rpl_fstatat" in <sys/stat.h>. --- lib/fstatat.c.orig Sat Nov 19 19:05:38 2011 +++ lib/fstatat.c Sat Nov 19 18:35:59 2011 @@ -118,11 +118,7 @@ then give a diagnostic and exit nonzero. Otherwise, this function works just like Solaris' fstatat. */ -# if HAVE_FSTATAT -# define AT_FUNC_NAME rpl_fstatat -# else -# define AT_FUNC_NAME fstatat -# endif +# define AT_FUNC_NAME fstatat # define AT_FUNC_F1 lstat # define AT_FUNC_F2 stat_func # define AT_FUNC_USE_F1_COND AT_SYMLINK_NOFOLLOW -- In memoriam Farhád Asdaqí <http://www.iranhrdc.org/english/publications/reports/3149-a-faith-denied-the-persecution-of-the-baha-is-of-iran.html?p=29>