diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-01-13 07:09:20 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-01-13 07:09:20 +0000 |
commit | 7a36bede0b7367182c6dfbfa4e0352566df885c4 (patch) | |
tree | f0c0dd538dbefaaf38246921b8311118abbf5a3a /wiretap/i4btrace.c | |
parent | b558dc21ec489263992a3a2037d40d01de4bf389 (diff) | |
download | wireshark-7a36bede0b7367182c6dfbfa4e0352566df885c4.tar.gz wireshark-7a36bede0b7367182c6dfbfa4e0352566df885c4.tar.bz2 wireshark-7a36bede0b7367182c6dfbfa4e0352566df885c4.zip |
We are obliged to define HAVE_UNISTD_H in "config.h"; to avoid the
hideous problem on FreeBSD 3.[23] (and perhaps other BSDs) if
HAVE_UNISTD_H is defined before "zlib.h" is included, turn "file_seek()"
into a subroutine defined in a file that *undefines* HAVE_UNISTD_H
before including "zlib.h", so that the *only* call to "gzseek()" is made
from a file that does not have HAVE_UNISTD_H defined when it includes
"zlib.h".
Move "file_error()" to that file while you're at it, so it holds all the
wrappers that hide the presence or absence of zlib from routines to read
capture files.
Turn "file.h", which declared those wrapper functions as well as wrapper
macros, into "file_wrapper.h" - it belongs with the "file_wrapper.c"
file that defines the wrapper functions, not with "file.c" which handles
higher-layer file access functions.
Remove the comment in "configure.in" that explained why defining
HAVE_UNISTD_H was a bad idea, as we're not obliged to define it and work
around the problem. (The comment in "file_wrapper.c" explains the
workaround.)
svn path=/trunk/; revision=1463
Diffstat (limited to 'wiretap/i4btrace.c')
-rw-r--r-- | wiretap/i4btrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wiretap/i4btrace.c b/wiretap/i4btrace.c index 80df4367b7..7ddd847f78 100644 --- a/wiretap/i4btrace.c +++ b/wiretap/i4btrace.c @@ -1,6 +1,6 @@ /* i4btrace.c * - * $Id: i4btrace.c,v 1.2 1999/12/15 02:25:50 guy Exp $ + * $Id: i4btrace.c,v 1.3 2000/01/13 07:09:16 guy Exp $ * * Wiretap Library * Copyright (c) 1999 by Bert Driehuis <driehuis@playbeing.org> @@ -28,7 +28,7 @@ #include <errno.h> #include <time.h> #include "wtap.h" -#include "file.h" +#include "file_wrappers.h" #include "buffer.h" #include "i4b_trace.h" |