summaryrefslogtreecommitdiff
path: root/wiretap/file_wrappers.h
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-11-06 22:43:25 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-11-06 22:43:25 +0000
commitc3187174bfe39f05c8aa8c6b411952e4b502477d (patch)
tree0eb95991cb932d74ca534ed0df29a3f2f256b1b8 /wiretap/file_wrappers.h
parent4e954caec384454ebf4eb61140c466e8787daabe (diff)
downloadwireshark-c3187174bfe39f05c8aa8c6b411952e4b502477d.tar.gz
replace *a lot* of file related calls by their GLib counterparts. This is necessary for the switch to GTK 2.6 (at least on WIN32).
to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place. deleted related things from config.h.win32 As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon. svn path=/trunk/; revision=16403
Diffstat (limited to 'wiretap/file_wrappers.h')
-rw-r--r--wiretap/file_wrappers.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/wiretap/file_wrappers.h b/wiretap/file_wrappers.h
index ef88fd0896..3d9af8bdcf 100644
--- a/wiretap/file_wrappers.h
+++ b/wiretap/file_wrappers.h
@@ -26,7 +26,7 @@
#ifdef HAVE_LIBZ
-#define file_open gzopen
+extern FILE_T file_open(const char *path, int oflag, const char *mode);
#define filed_open gzdopen
extern long file_seek(void *stream, long offset, int whence, int *err);
#define file_read(buf, bsize, count, file) gzread((file),(buf),((count)*(bsize)))
@@ -39,7 +39,7 @@ extern int file_error(void *fh);
#define file_eof gzeof
#else /* No zLib */
-#define file_open fopen
+#define file_open(path, oflag, mode) fopen(path, mode)
#define filed_open fdopen
extern long file_seek(void *stream, long offset, int whence, int *err);
#define file_read fread