diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-04-10 20:59:10 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-04-10 20:59:10 +0000 |
commit | 4fdcc5c18044f7af0e4d892819e202090199bc4b (patch) | |
tree | d13512b25cf373d606ea059eae4f836085f3a99e /wsutil/file_util.h | |
parent | f2008e4dd388076f50caa024d1900afa2116b7b9 (diff) |
Rename ws_stat to ws_stat64, and make it take a pointer to a ws_statb64
as an argument, along the lines of ws_fstat64, and, on Windows, make it
use _wstati64, to handle 64-bit file sizes.
svn path=/trunk/; revision=36547
Diffstat (limited to 'wsutil/file_util.h')
-rw-r--r-- | wsutil/file_util.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/wsutil/file_util.h b/wsutil/file_util.h index 65164165c3..d31746498f 100644 --- a/wsutil/file_util.h +++ b/wsutil/file_util.h @@ -60,7 +60,7 @@ extern FILE * ws_stdio_freopen (const gchar *filename, const gchar *mode, FILE * #define ws_open ws_stdio_open #define ws_rename ws_stdio_rename #define ws_mkdir ws_stdio_mkdir -#define ws_stat ws_stdio_stat +#define ws_stat64 ws_stdio_stat64 #define ws_unlink ws_stdio_unlink #define ws_remove ws_stdio_remove #define ws_fopen ws_stdio_fopen @@ -70,14 +70,16 @@ extern FILE * ws_stdio_freopen (const gchar *filename, const gchar *mode, FILE * /* "Not Windows" or GLib < 2.6: use "old school" functions */ #ifdef _WIN32 -#define ws_open _open -#define ws_stat _stat -#define ws_unlink _unlink +/* Windows, but GLib < 2.6 */ +#define ws_open _open +#define ws_stat64 _stati64 /* use _stati64 for 64-bit size support */ +#define ws_unlink _unlink #define ws_mkdir(dir,mode) _mkdir(dir) -#else -#define ws_open open -#define ws_stat stat -#define ws_unlink unlink +#else /* _WIN32 */ +/* "Not Windows" */ +#define ws_open open +#define ws_stat64 stat +#define ws_unlink unlink #define ws_mkdir(dir,mode) mkdir(dir,mode) #endif /* _WIN32 */ |