diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-07-01 20:56:03 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-07-01 20:56:03 (GMT) |
commit | ff48c0a89b501df92c78873352956348d5cb0690 (patch) | |
tree | 91765ff103ed931247c6f3012f097aeeb230ef19 | |
parent | 041d2e1e1e2146f87071f97a8913d4cb7adfaa36 (diff) | |
download | cpython-ff48c0a89b501df92c78873352956348d5cb0690.zip cpython-ff48c0a89b501df92c78873352956348d5cb0690.tar.gz cpython-ff48c0a89b501df92c78873352956348d5cb0690.tar.bz2 |
Really fix issue #10898: posixmodule.c redefines FSTAT
-rw-r--r-- | Modules/posixmodule.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 2431e1c..fbd343b 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -338,20 +338,6 @@ extern int lstat(const char *, struct stat *); #define USE_TMPNAM_R #endif -/* choose the appropriate stat and fstat functions and return structs */ -#undef STAT -#undef FSTAT -#undef STRUCT_STAT -#if defined(MS_WIN64) || defined(MS_WINDOWS) -# define STAT win32_stat -# define FSTAT win32_fstat -# define STRUCT_STAT struct win32_stat -#else -# define STAT stat -# define FSTAT fstat -# define STRUCT_STAT struct stat -#endif - #if defined(MAJOR_IN_MKDEV) #include <sys/mkdev.h> #else @@ -842,6 +828,20 @@ win32_wchdir(LPCWSTR path) } #endif +/* choose the appropriate stat and fstat functions and return structs */ +#undef STAT +#undef FSTAT +#undef STRUCT_STAT +#if defined(MS_WIN64) || defined(MS_WINDOWS) +# define STAT win32_stat +# define FSTAT win32_fstat +# define STRUCT_STAT struct win32_stat +#else +# define STAT stat +# define FSTAT fstat +# define STRUCT_STAT struct stat +#endif + #ifdef MS_WINDOWS /* The CRT of Windows has a number of flaws wrt. its stat() implementation: - time stamps are restricted to second resolution |