summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorguy <guy>2005-06-03 22:08:51 +0000
committerguy <guy>2005-06-03 22:08:51 +0000
commite549a228209ce68ef6ad8faf91a57bc1683a2949 (patch)
tree709ce9e7a4a7c8b6498a63a95e1bcbd545b53de9 /aclocal.m4
parent57df820f4ed09dcd2e9d596bdddc440e49b2f94b (diff)
downloadtcpdump-e549a228209ce68ef6ad8faf91a57bc1683a2949.tar.gz
Use pcap_dump_ftell() rather than casting a pcap_dumper_t * to a FILE *
and using ftell(); that won't necessarily work on Windows (if libpcap was built with a different version of the C runtime library than tcpdump is), and, even on UN*X, would break if a pcap_dumper_t * were ever made something other than a FILE *. Provide a pcap_dump_ftell() implementation that does that cheating cast for use if libpcap doesn't have it (a pcap_dumper_t * is just a FILE * on those older versions of libpcap).
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m411
1 files changed, 10 insertions, 1 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 80c0ac4d..aec2cfd1 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,4 +1,4 @@
-dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.111 2005-06-03 21:36:41 guy Exp $ (LBL)
+dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.112 2005-06-03 22:08:51 guy Exp $ (LBL)
dnl
dnl Copyright (c) 1995, 1996, 1997, 1998
dnl The Regents of the University of California. All rights reserved.
@@ -352,6 +352,15 @@ AC_DEFUN(AC_LBL_LIBPCAP,
dnl so just define the HAVE_ value if it's there.
dnl
AC_CHECK_FUNCS(pcap_breakloop)
+
+ dnl
+ dnl Check for "pcap_dump_ftell()" and use a substitute version
+ dnl if it's not present.
+ AC_CHECK_FUNC(pcap_dump_ftell,
+ AC_DEFINE(HAVE_PCAP_DUMP_FTELL),
+ [
+ AC_LIBOBJ(pcap_dump_ftell)
+ ])
])
dnl