X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Ffstatat.c;h=9b701c4d6175e2bcfe3797bf710490a74fb423a0;hb=96f023c5e537dd4afbdb294de7065f65effe3eb2;hp=b53a83d43077eaabc4ef782443b87006506cb10f;hpb=e0e8128146064983909c9756c02e2f8cd3fb9e12;p=gnulib.git diff --git a/lib/fstatat.c b/lib/fstatat.c index b53a83d43..9b701c4d6 100644 --- a/lib/fstatat.c +++ b/lib/fstatat.c @@ -1,6 +1,6 @@ /* Work around an fstatat bug on Solaris 9. - Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -92,7 +92,7 @@ rpl_fstatat (int fd, char const *file, struct stat *st, int flag) #else /* ! (HAVE_FSTATAT && HAVE_WORKING_FSTATAT_ZERO_FLAG) */ -/* On mingw, the gnulib defines `stat' as a function-like +/* On mingw, the gnulib defines 'stat' as a function-like macro; but using it in AT_FUNC_F2 causes compilation failure because the preprocessor sees a use of a macro that requires two arguments but is only given one. Hence, we need an inline @@ -103,7 +103,7 @@ stat_func (char const *name, struct stat *st) return stat (name, st); } -/* Likewise, if there is no native `lstat', then the gnulib +/* Likewise, if there is no native 'lstat', then the gnulib defined it as stat, which also needs adjustment. */ # if !HAVE_LSTAT # undef lstat @@ -118,11 +118,7 @@ stat_func (char const *name, struct stat *st) 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