diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-04-10 19:56:06 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-04-10 19:56:06 +0000 |
commit | c6a1f982e57bc57503864e715b01cd0f985d7f08 (patch) | |
tree | 2637dd7d87e1622f41d226398c2668d90c6e2f82 | |
parent | 7b7ee4207b88a36b162ba1db52c1d04b470eb3c0 (diff) |
Define ws_statb64 to be the appropriate "struct XXX" for a
64-bit-file-size-capable stat call, and use it for ws_fstat64().
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36545 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r-- | fileset.c | 2 | ||||
-rw-r--r-- | wiretap/wtap.c | 2 | ||||
-rw-r--r-- | wsutil/file_util.h | 10 |
3 files changed, 12 insertions, 2 deletions
@@ -177,7 +177,7 @@ static fileset_entry * fileset_add_file(const char *dirname, const char *fname, gboolean current) { int fh, result; - struct stat buf; + ws_statb64 buf; char *path; fileset_entry *entry = NULL; diff --git a/wiretap/wtap.c b/wiretap/wtap.c index 861628a60c..6e120fb8da 100644 --- a/wiretap/wtap.c +++ b/wiretap/wtap.c @@ -52,7 +52,7 @@ gint64 wtap_file_size(wtap *wth, int *err) { - struct stat statb; + ws_statb64 statb; if (ws_fstat64(wth->fd, &statb) == -1) { if (err != NULL) diff --git a/wsutil/file_util.h b/wsutil/file_util.h index caf7a85a2e..6289173a7c 100644 --- a/wsutil/file_util.h +++ b/wsutil/file_util.h @@ -99,6 +99,11 @@ extern FILE * ws_stdio_freopen (const gchar *filename, const gchar *mode, FILE * #define ws_fstat64 _fstati64 /* use _fstati64 for 64-bit size support */ #define ws_lseek64 _lseeki64 /* use _lseeki64 for 64-bit offset support */ +/* + * The structure to pass to ws_fstat64(). + */ +#define ws_statb64 struct _stat64 + /* DLL loading */ /** Try to remove the current directory from the DLL search path. @@ -140,6 +145,11 @@ extern char *getenv_utf8(const char *varname); #define O_BINARY 0 /* Win32 needs the O_BINARY flag for open() */ #endif /* _WIN32 */ +/* + * The structure to pass to ws_fstat64(). + */ +#define ws_statb64 struct stat + /* directory handling */ #define WS_DIR GDir #define WS_DIRENT const char |