diff options
Diffstat (limited to 'lib/stat.c')
| -rw-r--r-- | lib/stat.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/stat.c b/lib/stat.c index 1002f161bfa..1397aa93290 100644 --- a/lib/stat.c +++ b/lib/stat.c | |||
| @@ -46,6 +46,15 @@ orig_stat (const char *filename, struct stat *buf) | |||
| 46 | #include "dosname.h" | 46 | #include "dosname.h" |
| 47 | #include "verify.h" | 47 | #include "verify.h" |
| 48 | 48 | ||
| 49 | #if REPLACE_FUNC_STAT_DIR | ||
| 50 | # include "pathmax.h" | ||
| 51 | /* The only known systems where REPLACE_FUNC_STAT_DIR is needed also | ||
| 52 | have a constant PATH_MAX. */ | ||
| 53 | # ifndef PATH_MAX | ||
| 54 | # error "Please port this replacement to your platform" | ||
| 55 | # endif | ||
| 56 | #endif | ||
| 57 | |||
| 49 | /* Store information about NAME into ST. Work around bugs with | 58 | /* Store information about NAME into ST. Work around bugs with |
| 50 | trailing slashes. Mingw has other bugs (such as st_ino always | 59 | trailing slashes. Mingw has other bugs (such as st_ino always |
| 51 | being 0 on success) which this wrapper does not work around. But | 60 | being 0 on success) which this wrapper does not work around. But |
| @@ -70,11 +79,6 @@ rpl_stat (char const *name, struct stat *st) | |||
| 70 | } | 79 | } |
| 71 | #endif /* REPLACE_FUNC_STAT_FILE */ | 80 | #endif /* REPLACE_FUNC_STAT_FILE */ |
| 72 | #if REPLACE_FUNC_STAT_DIR | 81 | #if REPLACE_FUNC_STAT_DIR |
| 73 | /* The only known systems where REPLACE_FUNC_STAT_DIR is needed also | ||
| 74 | have a constant PATH_MAX. */ | ||
| 75 | # ifndef PATH_MAX | ||
| 76 | # error "Please port this replacement to your platform" | ||
| 77 | # endif | ||
| 78 | 82 | ||
| 79 | if (result == -1 && errno == ENOENT) | 83 | if (result == -1 && errno == ENOENT) |
| 80 | { | 84 | { |