guy 2000/01/13 01:09:29 CST
Modified files:
wiretap Makefile.am ascend.c configure.in file.c
i4btrace.c iptrace.c lanalyzer.c
libpcap.c netmon.c nettl.c netxray.c
ngsniffer.c radcom.c snoop.c toshiba.c
wtap.c
Added files:
wiretap file_wrappers.c file_wrappers.h
Removed files:
wiretap file.h
Log:
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.)
Revision Changes Path
1.26 +3 -2 ethereal/wiretap/Makefile.am
1.11 +2 -2 ethereal/wiretap/ascend.c
1.20 +1 -42 ethereal/wiretap/configure.in
1.45 +2 -40 ethereal/wiretap/file.c
1.3 +2 -2 ethereal/wiretap/i4btrace.c
1.23 +2 -2 ethereal/wiretap/iptrace.c
1.19 +2 -2 ethereal/wiretap/lanalyzer.c
1.30 +2 -2 ethereal/wiretap/libpcap.c
1.23 +2 -2 ethereal/wiretap/netmon.c
1.3 +2 -2 ethereal/wiretap/nettl.c
1.21 +2 -2 ethereal/wiretap/netxray.c
1.34 +2 -2 ethereal/wiretap/ngsniffer.c
1.16 +2 -2 ethereal/wiretap/radcom.c
1.23 +2 -2 ethereal/wiretap/snoop.c
1.7 +2 -2 ethereal/wiretap/toshiba.c
1.36 +2 -2 ethereal/wiretap/wtap.c