From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 20:04:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8515846; Tue, 6 Jan 2015 20:04:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C1BB646FB; Tue, 6 Jan 2015 18:58:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t06Iwa24068224; Tue, 6 Jan 2015 18:58:36 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06IwW8k068204; Tue, 6 Jan 2015 18:58:32 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501061858.t06IwW8k068204@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 6 Jan 2015 18:58:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r276759 - in vendor/libpcap/dist: . Win32/Include Win32/Src bpf/net lbl missing msdos pcap tests X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2015 20:04:57 -0000 Author: delphij Date: Tue Jan 6 18:58:31 2015 New Revision: 276759 URL: https://svnweb.freebsd.org/changeset/base/276759 Log: Vendor import of libpcap 1.6.2. Added: vendor/libpcap/dist/Makefile-devel-adds (contents, props changed) vendor/libpcap/dist/pcap-bt-monitor-linux.c (contents, props changed) vendor/libpcap/dist/pcap-bt-monitor-linux.h (contents, props changed) vendor/libpcap/dist/pcap-dbus.c (contents, props changed) vendor/libpcap/dist/pcap-dbus.h (contents, props changed) vendor/libpcap/dist/pcap/nflog.h (contents, props changed) vendor/libpcap/dist/pcap_get_tstamp_precision.3pcap.in (contents, props changed) vendor/libpcap/dist/pcap_set_immediate_mode.3pcap vendor/libpcap/dist/pcap_set_tstamp_precision.3pcap.in (contents, props changed) vendor/libpcap/dist/tests/capturetest.c (contents, props changed) vendor/libpcap/dist/tests/valgrindtest.c (contents, props changed) Deleted: vendor/libpcap/dist/tests/nonblocktest.c Modified: vendor/libpcap/dist/CHANGES vendor/libpcap/dist/CREDITS vendor/libpcap/dist/INSTALL.txt vendor/libpcap/dist/Makefile.in vendor/libpcap/dist/README vendor/libpcap/dist/README.aix vendor/libpcap/dist/VERSION vendor/libpcap/dist/Win32/Include/Gnuc.h vendor/libpcap/dist/Win32/Include/addrinfo.h vendor/libpcap/dist/Win32/Include/ip6_misc.h vendor/libpcap/dist/Win32/Src/getaddrinfo.c vendor/libpcap/dist/Win32/Src/inet_aton.c vendor/libpcap/dist/Win32/Src/inet_pton.c vendor/libpcap/dist/aclocal.m4 vendor/libpcap/dist/arcnet.h vendor/libpcap/dist/atmuni31.h vendor/libpcap/dist/bpf/net/bpf_filter.c vendor/libpcap/dist/bpf_dump.c vendor/libpcap/dist/bpf_image.c vendor/libpcap/dist/config.guess vendor/libpcap/dist/config.h.in vendor/libpcap/dist/config.sub vendor/libpcap/dist/configure vendor/libpcap/dist/configure.in vendor/libpcap/dist/dlpisubs.c vendor/libpcap/dist/dlpisubs.h vendor/libpcap/dist/etherent.c vendor/libpcap/dist/ethertype.h vendor/libpcap/dist/fad-getad.c vendor/libpcap/dist/fad-gifc.c vendor/libpcap/dist/fad-glifc.c vendor/libpcap/dist/fad-null.c vendor/libpcap/dist/fad-sita.c vendor/libpcap/dist/fad-win32.c vendor/libpcap/dist/gencode.c vendor/libpcap/dist/gencode.h vendor/libpcap/dist/grammar.y vendor/libpcap/dist/inet.c vendor/libpcap/dist/lbl/os-aix4.h vendor/libpcap/dist/lbl/os-hpux11.h vendor/libpcap/dist/lbl/os-osf4.h vendor/libpcap/dist/lbl/os-osf5.h vendor/libpcap/dist/lbl/os-solaris2.h vendor/libpcap/dist/lbl/os-sunos4.h vendor/libpcap/dist/lbl/os-ultrix4.h vendor/libpcap/dist/llc.h vendor/libpcap/dist/missing/snprintf.c vendor/libpcap/dist/mkdep vendor/libpcap/dist/msdos/common.dj vendor/libpcap/dist/msdos/makefile.dj vendor/libpcap/dist/msdos/readme.dos vendor/libpcap/dist/nametoaddr.c vendor/libpcap/dist/nlpid.h vendor/libpcap/dist/optimize.c vendor/libpcap/dist/pcap-bpf.c vendor/libpcap/dist/pcap-bpf.h vendor/libpcap/dist/pcap-bt-linux.c vendor/libpcap/dist/pcap-bt-linux.h vendor/libpcap/dist/pcap-can-linux.c vendor/libpcap/dist/pcap-canusb-linux.c vendor/libpcap/dist/pcap-common.c vendor/libpcap/dist/pcap-common.h vendor/libpcap/dist/pcap-config.1 vendor/libpcap/dist/pcap-dag.c vendor/libpcap/dist/pcap-dag.h vendor/libpcap/dist/pcap-dlpi.c vendor/libpcap/dist/pcap-dos.c vendor/libpcap/dist/pcap-dos.h vendor/libpcap/dist/pcap-enet.c vendor/libpcap/dist/pcap-filter.manmisc.in vendor/libpcap/dist/pcap-int.h vendor/libpcap/dist/pcap-libdlpi.c vendor/libpcap/dist/pcap-linktype.manmisc.in vendor/libpcap/dist/pcap-linux.c vendor/libpcap/dist/pcap-namedb.h vendor/libpcap/dist/pcap-netfilter-linux.c vendor/libpcap/dist/pcap-nit.c vendor/libpcap/dist/pcap-null.c vendor/libpcap/dist/pcap-pf.c vendor/libpcap/dist/pcap-savefile.manfile.in vendor/libpcap/dist/pcap-septel.c vendor/libpcap/dist/pcap-septel.h vendor/libpcap/dist/pcap-sita.c vendor/libpcap/dist/pcap-sita.h vendor/libpcap/dist/pcap-snf.c vendor/libpcap/dist/pcap-snit.c vendor/libpcap/dist/pcap-snoop.c vendor/libpcap/dist/pcap-stdinc.h vendor/libpcap/dist/pcap-tstamp.manmisc.in vendor/libpcap/dist/pcap-usb-linux.c vendor/libpcap/dist/pcap-usb-linux.h vendor/libpcap/dist/pcap-win32.c vendor/libpcap/dist/pcap.3pcap.in vendor/libpcap/dist/pcap.c vendor/libpcap/dist/pcap.h vendor/libpcap/dist/pcap/bluetooth.h vendor/libpcap/dist/pcap/bpf.h vendor/libpcap/dist/pcap/namedb.h vendor/libpcap/dist/pcap/pcap.h vendor/libpcap/dist/pcap/sll.h vendor/libpcap/dist/pcap/usb.h vendor/libpcap/dist/pcap/vlan.h vendor/libpcap/dist/pcap_activate.3pcap vendor/libpcap/dist/pcap_breakloop.3pcap vendor/libpcap/dist/pcap_can_set_rfmon.3pcap vendor/libpcap/dist/pcap_close.3pcap vendor/libpcap/dist/pcap_compile.3pcap.in vendor/libpcap/dist/pcap_create.3pcap vendor/libpcap/dist/pcap_datalink.3pcap.in vendor/libpcap/dist/pcap_datalink_name_to_val.3pcap vendor/libpcap/dist/pcap_datalink_val_to_name.3pcap vendor/libpcap/dist/pcap_dump.3pcap vendor/libpcap/dist/pcap_dump_close.3pcap vendor/libpcap/dist/pcap_dump_file.3pcap vendor/libpcap/dist/pcap_dump_flush.3pcap vendor/libpcap/dist/pcap_dump_ftell.3pcap vendor/libpcap/dist/pcap_dump_open.3pcap.in vendor/libpcap/dist/pcap_file.3pcap vendor/libpcap/dist/pcap_fileno.3pcap vendor/libpcap/dist/pcap_findalldevs.3pcap vendor/libpcap/dist/pcap_freecode.3pcap vendor/libpcap/dist/pcap_get_selectable_fd.3pcap vendor/libpcap/dist/pcap_geterr.3pcap vendor/libpcap/dist/pcap_inject.3pcap vendor/libpcap/dist/pcap_is_swapped.3pcap vendor/libpcap/dist/pcap_lib_version.3pcap vendor/libpcap/dist/pcap_list_datalinks.3pcap.in vendor/libpcap/dist/pcap_lookupdev.3pcap vendor/libpcap/dist/pcap_lookupnet.3pcap vendor/libpcap/dist/pcap_loop.3pcap vendor/libpcap/dist/pcap_major_version.3pcap vendor/libpcap/dist/pcap_next_ex.3pcap vendor/libpcap/dist/pcap_offline_filter.3pcap vendor/libpcap/dist/pcap_open_dead.3pcap.in vendor/libpcap/dist/pcap_open_live.3pcap vendor/libpcap/dist/pcap_open_offline.3pcap.in vendor/libpcap/dist/pcap_set_buffer_size.3pcap vendor/libpcap/dist/pcap_set_datalink.3pcap vendor/libpcap/dist/pcap_set_promisc.3pcap vendor/libpcap/dist/pcap_set_rfmon.3pcap vendor/libpcap/dist/pcap_set_snaplen.3pcap vendor/libpcap/dist/pcap_set_timeout.3pcap vendor/libpcap/dist/pcap_setdirection.3pcap vendor/libpcap/dist/pcap_setfilter.3pcap vendor/libpcap/dist/pcap_setnonblock.3pcap vendor/libpcap/dist/pcap_snapshot.3pcap vendor/libpcap/dist/pcap_stats.3pcap vendor/libpcap/dist/pcap_statustostr.3pcap vendor/libpcap/dist/pcap_strerror.3pcap vendor/libpcap/dist/pcap_tstamp_type_val_to_name.3pcap vendor/libpcap/dist/ppp.h vendor/libpcap/dist/runlex.sh vendor/libpcap/dist/savefile.c vendor/libpcap/dist/scanner.l vendor/libpcap/dist/sf-pcap-ng.c vendor/libpcap/dist/sf-pcap-ng.h vendor/libpcap/dist/sf-pcap.c vendor/libpcap/dist/sf-pcap.h vendor/libpcap/dist/sunatmpos.h vendor/libpcap/dist/tests/filtertest.c Modified: vendor/libpcap/dist/CHANGES ============================================================================== --- vendor/libpcap/dist/CHANGES Tue Jan 6 18:53:09 2015 (r276758) +++ vendor/libpcap/dist/CHANGES Tue Jan 6 18:58:31 2015 (r276759) @@ -1,9 +1,66 @@ -Monday March 18, 2013 guy@alum.mit.edu +Monday Aug. 12, 2014 guy@alum.mit.edu + Summary for 1.6.2 tcpdump release + Don't crash on filters testing a non-existent link-layer type + field. + Fix sending in non-blocking mode on Linux with memory-mapped + capture. + Fix timestamps when reading pcap-ng files on big-endian + machines. + +Saturday Jul. 19, 2014 mcr@sandelman.ca + Summary for 1.6.1 tcpdump release + some fixes for the any device + changes for how --enable-XXX works + +Wednesday Jul. 2, 2014 mcr@sandelman.ca + Summary for 1.6.0 tcpdump release + Don't support D-Bus sniffing on OS X + fixes for byte order issues with NFLOG captures + Handle using cooked mode for DLT_NETLINK in activate_new(). + on platforms where you can not capture on down interfaces, do not list them + but: do list interfaces which are down, if you can capture on them! + +Wednesday December 18, 2013 guy@alum.mit.edu +Summary for 1.5.3 libpcap release + Don't let packets that don't match the current filter get to the + application when TPACKET_V3 is used. (GitHub issue #331) + Fix handling of pcap_loop()/pcap_dispatch() with a packet count + of 0 on some platforms (including Linux with TPACKET_V3). + (GitHub issue #333) + Work around TPACKET_V3 deficiency that causes packets to be lost + when a timeout of 0 is specified. (GitHub issue #335) + Man page formatting fixes. + +Wednesday December 4, 2013 guy@alum.mit.edu +Summary for 1.5.2 libpcap release + Fix libpcap to work when compiled with TPACKET_V3 support and + running on a kernel without TPACKET_V3 support. (GitHub + issue #329) + +Wednesday November 20, 2013 guy@alum.mit.edu +Summary for 1.5.1 libpcap release + Report an error, rather than crashing, if an IPv6 address is + used for link-layer filtering. (Wireshark bug 9376) + +Wednesday October 30, 2013 guy@alum.mit.edu +Summary for 1.5.0 libpcap release + TPACKET_V3 support added for Linux + Point users to the the-tcpdump-group repository on GitHub rather + than the mcr repository + Checks added for malloc()/realloc()/etc. failures + Fixed build on Solaris 11 + Support filtering filtering E1 SS7 traffic on MTP2 layer Annex A + Use "ln -s" to link man pages by default + Add support for getting nanosecond-resolution time stamps when + capturing and reading capture files + Many changes to autoconf to deal better with non-GCC compilers + added many new DLT types + +Saturday April 6, 2013 guy@alum.mit.edu Summary for 1.4.0 libpcap release Add netfilter/nfqueue interface. If we don't have support for IPv6 address resolution, support, in filter expressions, what IPv6 stuff we can. - Checks added for malloc()/realloc()/etc. failures. Fix pcap-config to include -lpthread if canusb support is present Try to fix "pcap_parse not defined" problems when --without-flex @@ -29,6 +86,7 @@ Summary for 1.4.0 libpcap release kernels, for VLAN tag valid flag Clean up some man pages Support libnl3 as well as libnl1 and libnl2 on Linux + Fix handling of Bluetooth devices on 3.x Linux kernels Friday March 30, 2012. mcr@sandelman.ca Summary for 1.3.0 libpcap release @@ -208,7 +266,7 @@ Mon. October 27, 2008. ken@netfuncti DLT: Add JUNIPER_ST 802.15.4 support Variable length 802.11 header support - X2E data type support + X2E data type support SITA ACN Interface support - see README.sita Support for memory-mapped capture on Linux Support for zerocopy BPF on platforms that support it @@ -220,7 +278,7 @@ Mon. October 27, 2008. ken@netfuncti can print better diagnostic information Return PCAP_ERROR_PERM_DENIED if we don't have permission to open a device, so applications can tell the user they need to go play with permissions - On Linux, ignore ENETDOWN so we can continue to capture packets if the + On Linux, ignore ENETDOWN so we can continue to capture packets if the interface goes down and comes back up again. On Linux, support new tpacket frame headers (2.6.27+) On Mac OS X, add scripts for changing permissions on /dev/bpf* and launchd plist @@ -233,14 +291,14 @@ Mon. September 10, 2007. ken@xeleran Change build process to put public libpcap headers into pcap subir DLT: Add value for IPMI IPMB packets DLT: Add value for u10 Networks boards - Require for pf definitions - allows reading of pflog formatted + Require for pf definitions - allows reading of pflog formatted libpcap files on an OS other than where the file was generated Wed. April 25, 2007. ken@xelerance.com. Summary for 0.9.6 libpcap release Put the public libpcap headers into a pcap subdirectory in both the source directory and the target include directory, and have include - files at the top-level directory to include those headers, for + files at the top-level directory to include those headers, for backwards compatibility. Add Bluetooth support Add USB capturing support on Linux @@ -248,30 +306,30 @@ Wed. April 25, 2007. ken@xelerance.com. Add support for new FreeBSD BIOCSDIRECTION ioctl Add additional filter operations for 802.11 frame types Add support for filtering on MTP2 frame types - Propagate some changes from the main branch, so the x.9 branch has + Propagate some changes from the main branch, so the x.9 branch has all the DLT_ and LINKTYPE_ values that the main branch does - Reserved a DLT_ and SAVEFILE_ value for PPI (Per Packet Info) + Reserved a DLT_ and SAVEFILE_ value for PPI (Per Packet Info) encapsulated packets - Add LINKTYPE_ for IEEE 802.15.4, with address fields padded as done + Add LINKTYPE_ for IEEE 802.15.4, with address fields padded as done by Linux drivers Add LINKTYPE_ value corresponding to DLT_IEEE802_16_MAC_CPS. Add DLT for IEEE 802.16 (WiMAX) MAC Common Part Sublayer Add DLT for Bluetooth HCI UART transport layer When building a shared library, build with "-fPIC" on Linux to support x86_64 - Link with "$(CC) -shared" rather than "ld -shared" when building a + Link with "$(CC) -shared" rather than "ld -shared" when building a ".so" shared library Add support for autoconf 2.60 Fixes to discard unread packets when changing filters - Changes to handle name changes in the DAG library resulting from + Changes to handle name changes in the DAG library resulting from switching to libtool. Add support for new DAG ERF types. - Add an explicit "-ldag" when building the shared library, so the DAG + Add an explicit "-ldag" when building the shared library, so the DAG library dependency is explicit. Mac OSX fixes for dealing with "wlt" devices Fixes in add_or_find_if() & pcap_findalldevs() to optimize generating device lists Fixed a bug in pcap_open_live(). The return value of PacketSetHwFilter - was not checked. + was not checked. Tue. September 19, 2006. ken@xelerance.com. Summary for 0.9.5 libpcap release @@ -283,19 +341,19 @@ Tue. September 19, 2006. ken@xelerance.c OP_PACKET now matches the beginning of the packet, instead of beginning+link-layer Add DLT/LINKTYPE for carrying FRF.16 Multi-link Frame Relay - Fix allocation of buffer for list of link-layer types + Fix allocation of buffer for list of link-layer types Added a new DLT and LINKTYPE value for ARINC 653 Interpartition Communcation Messages Fixed a typo in a DLT value: it should start with DLT_ and not LINKTYPE_ Redefined DLT_CAN20B and LINKTYPE_CAN20B as #190 (as this is the right value for CAN). Added definition for DLT_A429 and LINKTYPE_A429 as #184. Added a new DLT and LINKTYPE value for CAN v2.0B frames. Add support for DLT_JUNIPER_VP. - Don't double-count received packets on Linux systems that - support the PACKET_STATISTICS getsockopt() argument on + Don't double-count received packets on Linux systems that + support the PACKET_STATISTICS getsockopt() argument on PF_PACKET sockets. - Add support for DLT_IEEE802_11 and DLT_IEEE802_11_RADIO link + Add support for DLT_IEEE802_11 and DLT_IEEE802_11_RADIO link layers in Windows - Add support to build libpcap.lib and wpcap.dll under Cygnus and + Add support to build libpcap.lib and wpcap.dll under Cygnus and MingW32. Mon. September 5, 2005. ken@xelerance.com. Summary for 0.9.4 libpcap release Modified: vendor/libpcap/dist/CREDITS ============================================================================== --- vendor/libpcap/dist/CREDITS Tue Jan 6 18:53:09 2015 (r276758) +++ vendor/libpcap/dist/CREDITS Tue Jan 6 18:58:31 2015 (r276759) @@ -2,6 +2,7 @@ This file lists people who have contribu The current maintainers: Bill Fenner + Denis Ovsienko Fulvio Risso Guy Harris Hannes Gredler @@ -9,20 +10,24 @@ The current maintainers: Additional people who have contributed patches: + Akos Vandra Alan Bawden Albert Chin Alexander 'Leo' Bergolth Alexey Kuznetsov Alon Bar-Lev + Andres Perera Andrew Brown + Ani Sinha Antti Kantee Arien Vijn Arkadiusz Miskiewicz Armando L. Caro Jr. Assar Westerlund + Bill Parker + Brent Cook Brian Ginsbach - Bill Parker Charles M. Hannum Chris G. Demetriou Chris Lightfoot @@ -30,15 +35,21 @@ Additional people who have contributed p Chris Pepper Christian Bell Christian Peron + Christian Svensson Daniele Orlandi + Darren Lim Darren Reed + David Clark David Kaelbling + David Ward David Young Dean Gaudet dhruv Don Ebright Dug Song Dustin Spicuzza + dzejarczech + Edward Sheldrake Eric Anderson Erik de Castro Lopo Felix Obenhuber @@ -47,15 +58,18 @@ Additional people who have contributed p frederich Fulko Hew Fumiyuki Shimizu + Gabor Tatarka Garrett Cooper + George Neville-Neil Gianluca Varenni Gilbert Hoyek Gisle Vanem Graeme Hewson + Gregor Maier Greg Stark Greg Troxel - Gregor Maier Guillaume Pelat + Gustavo Zacarias Hagen Paul Pfeifer Henri Doreau Hyung Sik Yoon @@ -64,15 +78,17 @@ Additional people who have contributed p Jan-Philip Velders Jason R. Thorpe Javier Achirica + Jean-Louis Charton Jean Tourrilhes - Jean-Louis Charton Jefferson Ogata Jesper Dangaard Brouer Jesper Peterson + Jiri Slaby Joerg Mayer John Bankier Jon Lindgren Jon Smirl + Jorge Boncompte [DTI2] Juergen Schoenwaelder Julien Moutinho Jung-uk Kim @@ -86,6 +102,7 @@ Additional people who have contributed p Love Hörnquist-Åstrand Luis MartinGarcia Maciej W. Rozycki + Mansour Behabadi Marcus Felipe Pereira Mark C. Brown Mark Pizzolato @@ -94,14 +111,17 @@ Additional people who have contributed p Márton Németh Matthew Luckie Max Laier + Michal Labedzki + Michal Sekletar Mike Frysinger Mike Kershaw Mike Wiacek Miroslav Lichvar Monroe Williams - - N. Leiten Nicolas Dade + Niko Delarich + N. Leiten + Octavian Cerna Olaf Kirch Ollie Wild @@ -145,8 +165,8 @@ Additional people who have contributed p Xianjie Zhang Xin Li Yen Yen Lim - Yvan Vanhullebus Yoann Vandoorselaere + Yvan Vanhullebus The original LBL crew: Steve McCanne Modified: vendor/libpcap/dist/INSTALL.txt ============================================================================== --- vendor/libpcap/dist/INSTALL.txt Tue Jan 6 18:53:09 2015 (r276758) +++ vendor/libpcap/dist/INSTALL.txt Tue Jan 6 18:58:31 2015 (r276759) @@ -1,5 +1,3 @@ -@(#) $Header: /tcpdump/master/libpcap/INSTALL.txt,v 1.29 2008-06-12 20:21:51 guy Exp $ (LBL) - To build libpcap, run "./configure" (a shell script). The configure script will determine your system attributes and generate an appropriate Makefile from Makefile.in. Next run "make". If everything @@ -31,19 +29,14 @@ where the configure scripts fails to det You will need an ANSI C compiler to build libpcap. The configure script will abort if your compiler is not ANSI compliant. If this happens, use -the GNU C compiler, available via anonymous ftp: - - ftp://ftp.gnu.org/pub/gnu/gcc/ +the generally available GNU C compiler (GCC). If you use flex, you must use version 2.4.6 or higher. The configure script automatically detects the version of flex and will not use it unless it is new enough. You can use "flex -V" to see what version you have (unless it's really old). The current version of flex is available -via anonymous ftp: - - ftp://ftp.ee.lbl.gov/flex-*.tar.Z - -As of this writing, the current version is 2.5.4. +at flex.sourceforge.net and often comes packaged by means of the OS. +As of this writing, the current version is 2.5.37. If you use bison, you must use flex (and visa versa). The configure script automatically falls back to lex and yacc if both flex and bison Added: vendor/libpcap/dist/Makefile-devel-adds ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libpcap/dist/Makefile-devel-adds Tue Jan 6 18:58:31 2015 (r276759) @@ -0,0 +1,22 @@ +# +# Auto-regenerate configure script or Makefile when things change. +# From autoconf.info . Works best with GNU Make. +# +${srcdir}/configure: configure.in aclocal.m4 + cd ${srcdir} && autoconf + +# autoheader might not change config.h.in, so touch a stamp file. +${srcdir}/config.h.in: ${srcdir}/stamp-h.in +${srcdir}/stamp-h.in: configure.in aclocal.m4 + cd ${srcdir} && autoheader + echo timestamp > ${srcdir}/stamp-h.in + +config.h: stamp-h +stamp-h: ${srcdir}/config.h.in config.status + ./config.status + +Makefile: Makefile.in config.status + ./config.status + +config.status: ${srcdir}/configure + ./config.status --recheck Modified: vendor/libpcap/dist/Makefile.in ============================================================================== --- vendor/libpcap/dist/Makefile.in Tue Jan 6 18:53:09 2015 (r276758) +++ vendor/libpcap/dist/Makefile.in Tue Jan 6 18:58:31 2015 (r276759) @@ -16,8 +16,6 @@ # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -# -# @(#) $Header: /tcpdump/master/libpcap/Makefile.in,v 1.142 2008-11-22 17:30:24 guy Exp $ (LBL) # # Various configurable paths (remember to edit Makefile.in, not Makefile) @@ -47,6 +45,8 @@ VPATH = @srcdir@ LD = /usr/bin/ld CC = @CC@ AR = @AR@ +LN_S = @LN_S@ +MKDEP = @MKDEP@ CCOPT = @V_CCOPT@ INCLS = -I. @V_INCLS@ DEFS = @DEFS@ @V_DEFS@ @@ -57,6 +57,7 @@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ DYEXT = @DYEXT@ V_RPATH_OPT = @V_RPATH_OPT@ +DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@ PROG=libpcap # Standard CFLAGS @@ -82,7 +83,7 @@ YACC = @V_YACC@ @rm -f $@ $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c -PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@ @CANUSB_SRC@ +PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @BT_MONITOR_SRC@ @CAN_SRC@ @NETFILTER_SRC@ @CANUSB_SRC@ @DBUS_SRC@ FSRC = fad-@V_FINDALLDEVS@.c SSRC = @SSRC@ CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \ @@ -104,6 +105,7 @@ PUBHDR = \ pcap/bluetooth.h \ pcap/ipnet.h \ pcap/namedb.h \ + pcap/nflog.h \ pcap/pcap.h \ pcap/sll.h \ pcap/vlan.h \ @@ -126,19 +128,21 @@ HDR = $(PUBHDR) \ sunatmpos.h TESTS = \ + capturetest \ filtertest \ findalldevstest \ - nonblocktest \ opentest \ - selpolltest + selpolltest \ + valgrindtest TESTS_SRC = \ + tests/capturetest.c \ tests/filtertest.c \ tests/findalldevstest.c \ - tests/nonblocktest.c \ tests/opentest.c \ tests/reactivatetest.c \ - tests/selpolltest.c + tests/selpolltest.c \ + tests/valgrindtest.c GENHDR = \ scanner.h tokdefs.h version.h @@ -157,10 +161,12 @@ MAN3PCAP_EXPAND = \ pcap_compile.3pcap.in \ pcap_datalink.3pcap.in \ pcap_dump_open.3pcap.in \ + pcap_get_tstamp_precision.3pcap.in \ pcap_list_datalinks.3pcap.in \ pcap_list_tstamp_types.3pcap.in \ pcap_open_dead.3pcap.in \ pcap_open_offline.3pcap.in \ + pcap_set_tstamp_precision.3pcap.in \ pcap_set_tstamp_type.3pcap.in MAN3PCAP_NOEXPAND = \ @@ -194,6 +200,7 @@ MAN3PCAP_NOEXPAND = \ pcap_open_live.3pcap \ pcap_set_buffer_size.3pcap \ pcap_set_datalink.3pcap \ + pcap_set_immediate_mode.3pcap \ pcap_set_promisc.3pcap \ pcap_set_rfmon.3pcap \ pcap_set_snaplen.3pcap \ @@ -227,6 +234,7 @@ EXTRA_DIST = \ INSTALL.txt \ LICENSE \ Makefile.in \ + Makefile-devel-adds \ README \ README.aix \ README.dag \ @@ -287,6 +295,8 @@ EXTRA_DIST = \ pcap-bpf.c \ pcap-bt-linux.c \ pcap-bt-linux.h \ + pcap-bt-monitor-linux.c \ + pcap-bt-monitor-linux.h \ pcap-can-linux.c \ pcap-can-linux.h \ pcap-canusb-linux.c \ @@ -294,6 +304,8 @@ EXTRA_DIST = \ pcap-config.in \ pcap-dag.c \ pcap-dag.h \ + pcap-dbus.c \ + pcap-dbus.h \ pcap-dlpi.c \ pcap-dos.c \ pcap-dos.h \ @@ -515,21 +527,24 @@ pcap-config: $(srcdir)/pcap-config.in ./ # tests: $(TESTS) +capturetest: tests/capturetest.c libpcap.a + $(CC) $(FULL_CFLAGS) -I. -L. -o capturetest $(srcdir)/tests/capturetest.c libpcap.a $(LIBS) + filtertest: tests/filtertest.c libpcap.a $(CC) $(FULL_CFLAGS) -I. -L. -o filtertest $(srcdir)/tests/filtertest.c libpcap.a $(LIBS) findalldevstest: tests/findalldevstest.c libpcap.a $(CC) $(FULL_CFLAGS) -I. -L. -o findalldevstest $(srcdir)/tests/findalldevstest.c libpcap.a $(LIBS) -nonblocktest: tests/nonblocktest.c libpcap.a - $(CC) $(FULL_CFLAGS) -I. -L. -o nonblocktest $(srcdir)/tests/nonblocktest.c libpcap.a $(LIBS) - opentest: tests/opentest.c libpcap.a $(CC) $(FULL_CFLAGS) -I. -L. -o opentest $(srcdir)/tests/opentest.c libpcap.a $(LIBS) selpolltest: tests/selpolltest.c libpcap.a $(CC) $(FULL_CFLAGS) -I. -L. -o selpolltest $(srcdir)/tests/selpolltest.c libpcap.a $(LIBS) +valgrindtest: tests/valgrindtest.c libpcap.a + $(CC) $(FULL_CFLAGS) -I. -L. -o valgrindtest $(srcdir)/tests/valgrindtest.c libpcap.a $(LIBS) + install: install-shared install-archive pcap-config [ -d $(DESTDIR)$(libdir) ] || \ (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) @@ -560,42 +575,41 @@ install: install-shared install-archive for i in $(MAN3PCAP_EXPAND:.in=); do \ $(INSTALL_DATA) $$i \ $(DESTDIR)$(mandir)/man3/$$i; done - rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_name.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_dump_open.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_findalldevs.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_geterr.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_inject.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_list_datalinks.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_list_tstamp_types.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_loop.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_major_version.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_next_ex.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_next.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_open_offline.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_setnonblock.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap + (cd $(DESTDIR)$(mandir)/man3 && \ + rm -f pcap_datalink_val_to_description.3pcap && \ + $(LN_S) pcap_datalink_val_to_name.3pcap \ + pcap_datalink_val_to_description.3pcap && \ + rm -f pcap_dump_fopen.3pcap && \ + $(LN_S) pcap_dump_open.3pcap pcap_dump_fopen.3pcap && \ + rm -f pcap_freealldevs.3pcap && \ + $(LN_S) pcap_findalldevs.3pcap pcap_freealldevs.3pcap && \ + rm -f pcap_perror.3pcap && \ + $(LN_S) pcap_geterr.3pcap pcap_perror.3pcap && \ + rm -f pcap_sendpacket.3pcap && \ + $(LN_S) pcap_inject.3pcap pcap_sendpacket.3pcap && \ + rm -f pcap_free_datalinks.3pcap && \ + $(LN_S) pcap_list_datalinks.3pcap pcap_free_datalinks.3pcap && \ + rm -f pcap_free_tstamp_types.3pcap && \ + $(LN_S) pcap_list_tstamp_types.3pcap pcap_free_tstamp_types.3pcap && \ + rm -f pcap_dispatch.3pcap && \ + $(LN_S) pcap_loop.3pcap pcap_dispatch.3pcap && \ + rm -f pcap_minor_version.3pcap && \ + $(LN_S) pcap_major_version.3pcap pcap_minor_version.3pcap && \ + rm -f pcap_next.3pcap && \ + $(LN_S) pcap_next_ex.3pcap pcap_next.3pcap && \ + rm -f pcap_open_dead_with_tstamp_precision.3pcap && \ + $(LN_S) pcap_open_dead.3pcap \ + pcap_open_dead_with_tstamp_precision.3pcap && \ + rm -f pcap_open_offline_with_tstamp_precision.3pcap && \ + $(LN_S) pcap_open_offline.3pcap pcap_open_offline_with_tstamp_precision.3pcap && \ + rm -f pcap_fopen_offline.3pcap && \ + $(LN_S) pcap_open_offline.3pcap pcap_fopen_offline.3pcap && \ + rm -f pcap_fopen_offline_with_tstamp_precision.3pcap && \ + $(LN_S) pcap_open_offline.3pcap pcap_fopen_offline_with_tstamp_precision.3pcap && \ + rm -f pcap_tstamp_type_val_to_description.3pcap && \ + $(LN_S) pcap_tstamp_type_val_to_name.3pcap pcap_tstamp_type_val_to_description.3pcap && \ + rm -f pcap_getnonblock.3pcap && \ + $(LN_S) pcap_setnonblock.3pcap pcap_getnonblock.3pcap) for i in $(MANFILE); do \ $(INSTALL_DATA) `echo $$i | sed 's/.manfile.in/.manfile/'` \ $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done @@ -672,8 +686,12 @@ uninstall: uninstall-shared rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_open_dead_with_tstamp_precision.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_open_offline_with_tstamp_precision.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline_with_tstamp_precision.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_tstamp_type_val_to_description.3pcap for i in $(MANFILE); do \ rm -f $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done for i in $(MANMISC); do \ @@ -717,7 +735,7 @@ packaging/pcap.spec: packaging/pcap.spec RPMVERSION=`cat VERSION | sed s/-.*//g`; \ sed -e s/@VERSION@/$$RPMVERSION/ -e s/@NAME@/libpcap-`cat VERSION`/ $< > $@ -releasetar: +releasetar: @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \ mkdir $$name; \ tar cf - $(CSRC) $(HDR) $(MAN1) $(MAN3PCAP_EXPAND) \ @@ -727,9 +745,4 @@ releasetar: rm -rf $$name depend: $(GENSRC) $(GENHDR) bpf_filter.c - ./mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC) - -Makefile: Makefile.in config.status - ./config.status - @echo your Makefile was out of date, now run $(MAKE) again - exit 1 + $(MKDEP) -c $(CC) -m $(CFLAGS) $(DEPENDENCY_CFLAG) $(DEFS) $(INCLS) $(SRC) Modified: vendor/libpcap/dist/README ============================================================================== --- vendor/libpcap/dist/README Tue Jan 6 18:53:09 2015 (r276758) +++ vendor/libpcap/dist/README Tue Jan 6 18:58:31 2015 (r276759) @@ -1,5 +1,3 @@ -@(#) $Header: /tcpdump/master/libpcap/README,v 1.34 2008-12-14 19:44:14 guy Exp $ (LBL) - LIBPCAP 1.x.y www.tcpdump.org @@ -10,18 +8,15 @@ Please send inquiries/comments/reports t Anonymous Git is available via: git clone git://bpf.tcpdump.org/libpcap -Version 1.x.y of LIBPCAP can be retrieved with the CVS tag "libpcap_1_{x}rel{y}": - cvs -d :pserver:tcpdump@cvs.tcpdump.org:/tcpdump/master checkout -r libpcap_1_{x}rel{y} libpcap - Please submit patches by forking the branch on GitHub at - http://github.com/mcr/libpcap/tree/master + http://github.com/the-tcpdump-group/libpcap/tree/master and issuing a pull request. formerly from Lawrence Berkeley National Laboratory Network Research Group - ftp://ftp.ee.lbl.gov/libpcap.tar.Z (0.4) + ftp://ftp.ee.lbl.gov/old/libpcap-0.4a7.tar.Z This directory contains source code for libpcap, a system-independent interface for user-level packet capture. libpcap provides a portable @@ -97,12 +92,12 @@ to the address "tcpdump-workers@lists.tc requests, and feature requests may also be submitted on the GitHub issue tracker for libpcap at - https://github.com/mcr/libpcap/issues + https://github.com/the-tcpdump-group/libpcap/issues Source code contributions, etc. should be sent to the email address above or submitted by forking the branch on GitHub at - http://github.com/mcr/libpcap/tree/master + http://github.com/the-tcpdump-group/libpcap/tree/master and issuing a pull request. Modified: vendor/libpcap/dist/README.aix ============================================================================== --- vendor/libpcap/dist/README.aix Tue Jan 6 18:53:09 2015 (r276758) +++ vendor/libpcap/dist/README.aix Tue Jan 6 18:58:31 2015 (r276759) @@ -11,6 +11,11 @@ Using BPF: same, and the configure script should detect that it's on an AIX system and choose BPF even if the devices aren't there. + Also note that tcpdump _binary_ compiled on AIX 4 may have a problem + doing the initial loading of the BPF driver if copied to AIX 5 and + run there (GH #52). tcpdump binary natively compiled on AIX 5 should + not have this issue. + (2) If libpcap doesn't compile on your machine when configured to use BPF, or if the workarounds fail to make it work correctly, you should send to tcpdump-workers@lists.tcpdump.org a detailed bug @@ -22,7 +27,7 @@ Using BPF: If you fix the problems yourself, please submit a patch by forking the branch at - https://github.com/mcr/libpcap/issues + https://github.com/the-tcpdump-group/libpcap/issues and issuing a pull request, so we can incorporate the fixes into the next release. Modified: vendor/libpcap/dist/VERSION ============================================================================== --- vendor/libpcap/dist/VERSION Tue Jan 6 18:53:09 2015 (r276758) +++ vendor/libpcap/dist/VERSION Tue Jan 6 18:58:31 2015 (r276759) @@ -1 +1 @@ -1.4.0 +1.6.2 Modified: vendor/libpcap/dist/Win32/Include/Gnuc.h ============================================================================== --- vendor/libpcap/dist/Win32/Include/Gnuc.h Tue Jan 6 18:53:09 2015 (r276758) +++ vendor/libpcap/dist/Win32/Include/Gnuc.h Tue Jan 6 18:58:31 2015 (r276759) @@ -1,5 +1,3 @@ -/* @(#) $Header: /tcpdump/master/libpcap/Win32/Include/Gnuc.h,v 1.1 2002-08-01 08:33:05 risso Exp $ (LBL) */ - /* Define __P() macro, if necessary */ #ifndef __P Modified: vendor/libpcap/dist/Win32/Include/addrinfo.h ============================================================================== --- vendor/libpcap/dist/Win32/Include/addrinfo.h Tue Jan 6 18:53:09 2015 (r276758) +++ vendor/libpcap/dist/Win32/Include/addrinfo.h Tue Jan 6 18:58:31 2015 (r276759) @@ -27,8 +27,6 @@ * SUCH DAMAGE. */ -/* $Id: addrinfo.h,v 1.1 2002-08-01 08:33:05 risso Exp $ */ - #ifndef HAVE_ADDRINFO /* Modified: vendor/libpcap/dist/Win32/Include/ip6_misc.h ============================================================================== --- vendor/libpcap/dist/Win32/Include/ip6_misc.h Tue Jan 6 18:53:09 2015 (r276758) +++ vendor/libpcap/dist/Win32/Include/ip6_misc.h Tue Jan 6 18:58:31 2015 (r276759) @@ -17,8 +17,6 @@ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * @(#) $Header: /tcpdump/master/libpcap/Win32/Include/ip6_misc.h,v 1.5 2006-01-22 18:02:18 gianluca Exp $ (LBL) */ /* Modified: vendor/libpcap/dist/Win32/Src/getaddrinfo.c ============================================================================== --- vendor/libpcap/dist/Win32/Src/getaddrinfo.c Tue Jan 6 18:53:09 2015 (r276758) +++ vendor/libpcap/dist/Win32/Src/getaddrinfo.c Tue Jan 6 18:58:31 2015 (r276759) @@ -55,11 +55,6 @@ #include #endif -#ifndef lint -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/Win32/Src/getaddrinfo.c,v 1.3 2008-09-15 23:37:51 guy Exp $"; -#endif - #include #if 0 #include Modified: vendor/libpcap/dist/Win32/Src/inet_aton.c ============================================================================== --- vendor/libpcap/dist/Win32/Src/inet_aton.c Tue Jan 6 18:53:09 2015 (r276758) +++ vendor/libpcap/dist/Win32/Src/inet_aton.c Tue Jan 6 18:58:31 2015 (r276759) @@ -36,13 +36,6 @@ * SUCH DAMAGE. */ -/* $Id: inet_aton.c,v 1.2 2003-11-15 23:24:06 guy Exp $ */ - -#ifndef lint -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/Win32/Src/inet_aton.c,v 1.2 2003-11-15 23:24:06 guy Exp $"; -#endif - #include #include Modified: vendor/libpcap/dist/Win32/Src/inet_pton.c ============================================================================== --- vendor/libpcap/dist/Win32/Src/inet_pton.c Tue Jan 6 18:53:09 2015 (r276758) +++ vendor/libpcap/dist/Win32/Src/inet_pton.c Tue Jan 6 18:58:31 2015 (r276759) @@ -36,13 +36,6 @@ * SUCH DAMAGE. */ -/* $Id: inet_pton.c,v 1.3 2007-09-27 18:02:20 gianluca Exp $ */ - -#ifndef lint -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/Win32/Src/inet_pton.c,v 1.3 2007-09-27 18:02:20 gianluca Exp $"; -#endif - #include #ifdef WIN32 Modified: vendor/libpcap/dist/aclocal.m4 ============================================================================== --- vendor/libpcap/dist/aclocal.m4 Tue Jan 6 18:53:09 2015 (r276758) +++ vendor/libpcap/dist/aclocal.m4 Tue Jan 6 18:58:31 2015 (r276759) @@ -1,5 +1,3 @@ -dnl @(#) $Header: /tcpdump/master/libpcap/aclocal.m4,v 1.93 2008-11-18 07:29:48 guy Exp $ (LBL) -dnl dnl Copyright (c) 1995, 1996, 1997, 1998 dnl The Regents of the University of California. All rights reserved. dnl @@ -38,16 +36,15 @@ dnl AC_LBL_C_INIT. Now, we run AC_LBL_C dnl and AC_LBL_C_INIT at the top level. dnl AC_DEFUN(AC_LBL_C_INIT_BEFORE_CC, - [AC_PREREQ(2.50) +[ AC_BEFORE([$0], [AC_LBL_C_INIT]) AC_BEFORE([$0], [AC_PROG_CC]) AC_BEFORE([$0], [AC_LBL_FIXINCLUDES]) AC_BEFORE([$0], [AC_LBL_DEVEL]) AC_ARG_WITH(gcc, [ --without-gcc don't use gcc]) - $1="-O" - $2="" + $1="" if test "${srcdir}" != "." ; then - $2="-I\$(srcdir)" + $1="-I\$(srcdir)" fi if test "${CFLAGS+set}" = set; then LBL_CFLAGS="$CFLAGS" @@ -73,9 +70,15 @@ AC_DEFUN(AC_LBL_C_INIT_BEFORE_CC, dnl dnl Determine which compiler we're using (cc or gcc) dnl If using gcc, determine the version number -dnl If using cc, require that it support ansi prototypes -dnl If using gcc, use -O2 (otherwise use -O) -dnl If using cc, explicitly specify /usr/local/include +dnl If using cc: +dnl require that it support ansi prototypes +dnl use -O (AC_PROG_CC will use -g -O2 on gcc, so we don't need to +dnl do that ourselves for gcc) +dnl add -g flags, as appropriate +dnl explicitly specify /usr/local/include +dnl +dnl NOTE WELL: with newer versions of autoconf, "gcc" means any compiler +dnl that defines __GNUC__, which means clang, for example, counts as "gcc". dnl dnl usage: dnl @@ -87,102 +90,106 @@ dnl $1 (copt set) dnl $2 (incls set) dnl CC dnl LDFLAGS -dnl ac_cv_lbl_gcc_vers dnl LBL_CFLAGS dnl AC_DEFUN(AC_LBL_C_INIT, - [AC_PREREQ(2.50) +[ AC_BEFORE([$0], [AC_LBL_FIXINCLUDES]) AC_BEFORE([$0], [AC_LBL_DEVEL]) AC_BEFORE([$0], [AC_LBL_SHLIBS_INIT]) if test "$GCC" = yes ; then - if test "$SHLICC2" = yes ; then - ac_cv_lbl_gcc_vers=2 - $1="-O2" - else - AC_MSG_CHECKING(gcc version) - AC_CACHE_VAL(ac_cv_lbl_gcc_vers, - ac_cv_lbl_gcc_vers=`$CC -v 2>&1 | \ - sed -e '/^gcc version /!d' \ - -e 's/^gcc version //' \ - -e 's/ .*//' -e 's/^[[[^0-9]]]*//' \ - -e 's/\..*//'`) - AC_MSG_RESULT($ac_cv_lbl_gcc_vers) - if test $ac_cv_lbl_gcc_vers -gt 1 ; then - $1="-O2" - fi - fi + # + # -Werror forces warnings to be errors. + # + ac_lbl_cc_force_warning_errors=-Werror else - AC_MSG_CHECKING(that $CC handles ansi prototypes) - AC_CACHE_VAL(ac_cv_lbl_cc_ansi_prototypes, - AC_TRY_COMPILE( - [#include ], - [int frob(int, char *)], - ac_cv_lbl_cc_ansi_prototypes=yes, - ac_cv_lbl_cc_ansi_prototypes=no)) - AC_MSG_RESULT($ac_cv_lbl_cc_ansi_prototypes) - if test $ac_cv_lbl_cc_ansi_prototypes = no ; then - case "$host_os" in - - hpux*) - AC_MSG_CHECKING(for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)) - savedcflags="$CFLAGS" - CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS" - AC_CACHE_VAL(ac_cv_lbl_cc_hpux_cc_aa, - AC_TRY_COMPILE( - [#include ], - [int frob(int, char *)], - ac_cv_lbl_cc_hpux_cc_aa=yes, - ac_cv_lbl_cc_hpux_cc_aa=no)) - AC_MSG_RESULT($ac_cv_lbl_cc_hpux_cc_aa) - if test $ac_cv_lbl_cc_hpux_cc_aa = no ; then - AC_MSG_ERROR(see the INSTALL doc for more info) - fi - CFLAGS="$savedcflags" - $1="-Aa $$1" - AC_DEFINE(_HPUX_SOURCE,1,[needed on HP-UX]) - ;; - - osf*) - AC_MSG_CHECKING(for ansi mode in DEC compiler ($CC -std1)) - savedcflags="$CFLAGS" - CFLAGS="-std1" - AC_CACHE_VAL(ac_cv_lbl_cc_osf1_cc_std1, - AC_TRY_COMPILE( - [#include ], - [int frob(int, char *)], - ac_cv_lbl_cc_osf1_cc_std1=yes, - ac_cv_lbl_cc_osf1_cc_std1=no)) - AC_MSG_RESULT($ac_cv_lbl_cc_osf1_cc_std1) - if test $ac_cv_lbl_cc_osf1_cc_std1 = no ; then - AC_MSG_ERROR(see the INSTALL doc for more info) - fi - CFLAGS="$savedcflags" - $1="-std1 $$1" - ;; - - *) - AC_MSG_ERROR(see the INSTALL doc for more info) - ;; - esac - fi $2="$$2 -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib" case "$host_os" in + darwin*) + # + # This is assumed either to be GCC or clang, both + # of which use -Werror to force warnings to be errors. + # + ac_lbl_cc_force_warning_errors=-Werror + ;; + + hpux*) + # + # HP C, which is what we presume we're using, doesn't + # exit with a non-zero exit status if we hand it an + # invalid -W flag, can't be forced to do so even with + # +We, and doesn't handle GCC-style -W flags, so we + # don't want to try using GCC-style -W flags. + # + ac_lbl_cc_dont_try_gcc_dashW=yes + ;; + irix*) + # + # MIPS C, which is what we presume we're using, doesn't + # necessarily exit with a non-zero exit status if we + # hand it an invalid -W flag, can't be forced to do + # so, and doesn't handle GCC-style -W flags, so we + # don't want to try using GCC-style -W flags. + # + ac_lbl_cc_dont_try_gcc_dashW=yes + # + # It also, apparently, defaults to "char" being + # unsigned, unlike most other C implementations; + # I suppose we could say "signed char" whenever + # we want to guarantee a signed "char", but let's + # just force signed chars. + # + # -xansi is normally the default, but the + # configure script was setting it; perhaps -cckr + # was the default in the Old Days. (Then again, + # that would probably be for backwards compatibility + # in the days when ANSI C was Shiny and New, i.e. + # 1989 and the early '90's, so maybe we can just + # drop support for those compilers.) + # + # -g is equivalent to -g2, which turns off + # optimization; we choose -g3, which generates + # debugging information but doesn't turn off + # optimization (even if the optimization would + # cause inaccuracies in debugging). + # $1="$$1 -xansi -signed -g3" ;; osf*) - # + # # Presumed to be DEC OSF/1, Digital UNIX, or # Tru64 UNIX. # + # The DEC C compiler, which is what we presume we're + # using, doesn't exit with a non-zero exit status if we + # hand it an invalid -W flag, can't be forced to do + # so, and doesn't handle GCC-style -W flags, so we + # don't want to try using GCC-style -W flags. + # + ac_lbl_cc_dont_try_gcc_dashW=yes + # + # -g is equivalent to -g2, which turns off + # optimization; we choose -g3, which generates + # debugging information but doesn't turn off + # optimization (even if the optimization would + # cause inaccuracies in debugging). + # $1="$$1 -g3" ;; + solaris*) + # + # Assumed to be Sun C, which requires -errwarn to force + # warnings to be treated as errors. + # + ac_lbl_cc_force_warning_errors=-errwarn + ;; + ultrix*) AC_MSG_CHECKING(that Ultrix $CC hacks const in prototypes) AC_CACHE_VAL(ac_cv_lbl_cc_const_proto, @@ -199,10 +206,179 @@ AC_DEFUN(AC_LBL_C_INIT, *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***