X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstat.c;h=9ea53c1c0cd5b4f9ed8a776a1ab434f59b88dd29;hb=06ef7ef9193810369b351b00548cfaa48fad0952;hp=1002f161bfa5e07b0f2146d31bc5efa635a19a3b;hpb=6563cd7648f78ce137eb66d4a9a77f9f1666d17f;p=gnulib.git diff --git a/lib/stat.c b/lib/stat.c index 1002f161b..9ea53c1c0 100644 --- a/lib/stat.c +++ b/lib/stat.c @@ -1,5 +1,5 @@ /* Work around platform bugs in stat. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 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 @@ -46,6 +46,15 @@ orig_stat (const char *filename, struct stat *buf) #include "dosname.h" #include "verify.h" +#if REPLACE_FUNC_STAT_DIR +# include "pathmax.h" + /* The only known systems where REPLACE_FUNC_STAT_DIR is needed also + have a constant PATH_MAX. */ +# ifndef PATH_MAX +# error "Please port this replacement to your platform" +# endif +#endif + /* Store information about NAME into ST. Work around bugs with trailing slashes. Mingw has other bugs (such as st_ino always being 0 on success) which this wrapper does not work around. But @@ -70,11 +79,6 @@ rpl_stat (char const *name, struct stat *st) } #endif /* REPLACE_FUNC_STAT_FILE */ #if REPLACE_FUNC_STAT_DIR - /* The only known systems where REPLACE_FUNC_STAT_DIR is needed also - have a constant PATH_MAX. */ -# ifndef PATH_MAX -# error "Please port this replacement to your platform" -# endif if (result == -1 && errno == ENOENT) {