summaryrefslogtreecommitdiff
path: root/wsutil/file_util.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-04-10 18:22:47 +0000
committerGuy Harris <guy@alum.mit.edu>2011-04-10 18:22:47 +0000
commitc349caf925ce533d403a6c3dd4380c30d6552ea7 (patch)
tree47be42075ef0ca489ee8fb4e6427977c9d2fefd9 /wsutil/file_util.h
parentd7d45f8072523ecca0c6823bf3f55b7f61134d92 (diff)
downloadwireshark-c349caf925ce533d403a6c3dd4380c30d6552ea7.tar.gz
Use AC_SYS_LARGEFILE to turn on large file support on platforms that
support it. Rename ws_lseek to ws_lseek64, as it should be given a 64-bit offset, and have it use _lseeki64 on Windows, to try to get 64-bit offset support; AC_SYS_LARGEFILE should cause lseek() to support 64-bit offsets on UN*X if possible. svn path=/trunk/; revision=36542
Diffstat (limited to 'wsutil/file_util.h')
-rw-r--r--wsutil/file_util.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/wsutil/file_util.h b/wsutil/file_util.h
index 4225fe5933..e81d8773a7 100644
--- a/wsutil/file_util.h
+++ b/wsutil/file_util.h
@@ -92,11 +92,11 @@ extern FILE * ws_stdio_freopen (const gchar *filename, const gchar *mode, FILE *
/* some common file function differences between UNIX and WIN32 */
#ifdef _WIN32
/* the Win32 API prepends underscores for whatever reasons */
-#define ws_read _read
-#define ws_write _write
-#define ws_close _close
-#define ws_dup _dup
-#define ws_lseek _lseek
+#define ws_read _read
+#define ws_write _write
+#define ws_close _close
+#define ws_dup _dup
+#define ws_lseek64 _lseeki64 /* use _lseeki64 for 64-bit offset support */
/* DLL loading */
@@ -130,11 +130,11 @@ GModule *ws_module_open(gchar *module_name, GModuleFlags flags);
extern char *getenv_utf8(const char *varname);
#else /* _WIN32 */
-#define ws_read read
-#define ws_write write
-#define ws_close close
-#define ws_dup dup
-#define ws_lseek lseek
+#define ws_read read
+#define ws_write write
+#define ws_close close
+#define ws_dup dup
+#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() */
#endif /* _WIN32 */