aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-04-10 18:55:06 +0000
committerGuy Harris <guy@alum.mit.edu>2011-04-10 18:55:06 +0000
commit71d4caa5b92bbf9ce36583f3535a13980dcf17bc (patch)
tree842f0ca863af080e61c3435bee2a026f9f09b86f /wsutil
parent332e0263edab6ec314089e9a14a25becbe78b064 (diff)
Add ws_fstat64(), defined to be fstat on UN*X and _fstati64 on Windows.
Use it in some places where we're getting the file size. svn path=/trunk/; revision=36544
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/file_util.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/wsutil/file_util.h b/wsutil/file_util.h
index e81d8773a7..caf7a85a2e 100644
--- a/wsutil/file_util.h
+++ b/wsutil/file_util.h
@@ -96,6 +96,7 @@ extern FILE * ws_stdio_freopen (const gchar *filename, const gchar *mode, FILE *
#define ws_write _write
#define ws_close _close
#define ws_dup _dup
+#define ws_fstat64 _fstati64 /* use _fstati64 for 64-bit size support */
#define ws_lseek64 _lseeki64 /* use _lseeki64 for 64-bit offset support */
/* DLL loading */
@@ -134,8 +135,9 @@ extern char *getenv_utf8(const char *varname);
#define ws_write write
#define ws_close close
#define ws_dup dup
+#define ws_fstat64 fstat /* AC_SYS_LARGEFILE should make off_t 64-bit */
#define ws_lseek64 lseek /* AC_SYS_LARGEFILE should make off_t 64-bit */
-#define O_BINARY 0 /* Win32 needs the O_BINARY flag for open() */
+#define O_BINARY 0 /* Win32 needs the O_BINARY flag for open() */
#endif /* _WIN32 */
/* directory handling */