diff options
author | Guy Harris <guy@alum.mit.edu> | 2005-11-07 02:45:19 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2005-11-07 02:45:19 +0000 |
commit | 7474bc0f13e306bfe66b5d86daf949c855c7cb57 (patch) | |
tree | f012a997193e2f249310bbbaabeb6b20df53f8ec /wiretap/file_wrappers.h | |
parent | b7407b5a2a89146ee4f52304d0484b33e0ce2bb3 (diff) | |
download | wireshark-7474bc0f13e306bfe66b5d86daf949c855c7cb57.tar.gz |
If we're using libz, make file_open() construct the open() flag
argument, rather than requiring the caller to get the open() flag and
the fopen() flag in sync. That also means that if we're *not* using
libz, it can just be a wrapper around eth_fopen().
We need to include <fcntl.h>, at least on UN*X, to get open() declared
and the O_ flags defined.
svn path=/trunk/; revision=16409
Diffstat (limited to 'wiretap/file_wrappers.h')
-rw-r--r-- | wiretap/file_wrappers.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wiretap/file_wrappers.h b/wiretap/file_wrappers.h index 3d9af8bdcf..c5ace29953 100644 --- a/wiretap/file_wrappers.h +++ b/wiretap/file_wrappers.h @@ -26,7 +26,7 @@ #ifdef HAVE_LIBZ -extern FILE_T file_open(const char *path, int oflag, const char *mode); +extern FILE_T file_open(const char *path, 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(path, oflag, mode) fopen(path, mode) +#define file_open(path, mode) eth_fopen(path, mode) #define filed_open fdopen extern long file_seek(void *stream, long offset, int whence, int *err); #define file_read fread |