diff options
Diffstat (limited to 'gl/tests/stat.c')
-rw-r--r-- | gl/tests/stat.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gl/tests/stat.c b/gl/tests/stat.c index 9ea53c1c0c..1fc633eeef 100644 --- a/gl/tests/stat.c +++ b/gl/tests/stat.c @@ -27,6 +27,20 @@ #include <sys/stat.h> #undef __need_system_sys_stat_h +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if _GL_WINDOWS_64_BIT_ST_SIZE +# define stat _stati64 +# define REPLACE_FUNC_STAT_DIR 1 +# undef REPLACE_FUNC_STAT_FILE +# elif REPLACE_FUNC_STAT_FILE +/* mingw64 has a broken stat() function, based on _stat(), in libmingwex.a. + Bypass it. */ +# define stat _stat +# define REPLACE_FUNC_STAT_DIR 1 +# undef REPLACE_FUNC_STAT_FILE +# endif +#endif + static inline int orig_stat (const char *filename, struct stat *buf) { |