diff --git a/libpcap/Makefile.in b/libpcap/Makefile.in index dff75ec12..38e7bb1bc 100644 --- a/libpcap/Makefile.in +++ b/libpcap/Makefile.in @@ -76,9 +76,6 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ RANLIB = @RANLIB@ -LEX = @LEX@ -YACC = @YACC@ - # Explicitly define compilation rule since SunOS 4's make doesn't like gcc. # Also, gcc does not remove the .o before forking 'as', which can be a # problem if you don't own the file but can write to the directory. @@ -153,7 +150,7 @@ TAGFILES = \ $(SRC) $(HDR) CLEANFILES = $(OBJ) libpcap.a libpcap.so.`cat $(srcdir)/VERSION` \ - $(PROG)-`cat $(srcdir)/VERSION`.tar.gz $(GENSRC) $(GENHDR) \ + $(PROG)-`cat $(srcdir)/VERSION`.tar.gz \ lex.yy.c pcap-config libpcap.pc MAN1 = pcap-config.1 @@ -381,6 +378,15 @@ EXTRA_DIST = \ all: libpcap.a shared $(BUILD_RPCAPD) libpcap.pc pcap-config +# Inhibit implicit rule Make seems to have for using yacc/lex to +# recompile new scanner.c/grammar.c -- we ship ones which we want to +# use instead. +grammar.c: + echo "Not rebuilding grammar.c" + +scanner.c: + echo "Not rebuilding scanner.c" + libpcap.a: $(OBJ) @rm -f $@ $(AR) rc $@ $(OBJ) $(ADDLARCHIVEOBJS) @@ -462,27 +468,9 @@ libpcap.shareda: $(OBJ) # libpcap.none: -scanner.c: $(srcdir)/scanner.l - $(LEX) -P pcap_ --header-file=scanner.h --nounput -o scanner.c $< -scanner.h: scanner.c -## Recover from the removal of $@ - @if test -f $@; then :; else \ - rm -f scanner.c; \ - $(MAKE) $(MAKEFLAGS) scanner.c; \ - fi - scanner.o: scanner.c grammar.h $(CC) $(FULL_CFLAGS) -c scanner.c -grammar.c: $(srcdir)/grammar.y - $(YACC) -p pcap_ -o grammar.c -d $< -grammar.h: grammar.c -## Recover from the removal of $@ - @if test -f $@; then :; else \ - rm -f grammar.c; \ - $(MAKE) $(MAKEFLAGS) grammar.c; \ - fi - grammar.o: grammar.c scanner.h $(CC) $(FULL_CFLAGS) -c grammar.c diff --git a/libpcap/NMAP_MODIFICATIONS/0001-Don-t-autogenerate-Lex-Yacc-files.patch b/libpcap/NMAP_MODIFICATIONS/0001-Don-t-autogenerate-Lex-Yacc-files.patch new file mode 100644 index 000000000..d5bc17405 --- /dev/null +++ b/libpcap/NMAP_MODIFICATIONS/0001-Don-t-autogenerate-Lex-Yacc-files.patch @@ -0,0 +1,103 @@ +diff --git a/libpcap/Makefile.in b/libpcap/Makefile.in +index dff75ec..38e7bb1 100644 +--- a/libpcap/Makefile.in ++++ b/libpcap/Makefile.in +@@ -76,9 +76,6 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_DATA = @INSTALL_DATA@ + RANLIB = @RANLIB@ + +-LEX = @LEX@ +-YACC = @YACC@ +- + # Explicitly define compilation rule since SunOS 4's make doesn't like gcc. + # Also, gcc does not remove the .o before forking 'as', which can be a + # problem if you don't own the file but can write to the directory. +@@ -153,7 +150,7 @@ TAGFILES = \ + $(SRC) $(HDR) + + CLEANFILES = $(OBJ) libpcap.a libpcap.so.`cat $(srcdir)/VERSION` \ +- $(PROG)-`cat $(srcdir)/VERSION`.tar.gz $(GENSRC) $(GENHDR) \ ++ $(PROG)-`cat $(srcdir)/VERSION`.tar.gz \ + lex.yy.c pcap-config libpcap.pc + + MAN1 = pcap-config.1 +@@ -381,6 +378,15 @@ EXTRA_DIST = \ + + all: libpcap.a shared $(BUILD_RPCAPD) libpcap.pc pcap-config + ++# Inhibit implicit rule Make seems to have for using yacc/lex to ++# recompile new scanner.c/grammar.c -- we ship ones which we want to ++# use instead. ++grammar.c: ++ echo "Not rebuilding grammar.c" ++ ++scanner.c: ++ echo "Not rebuilding scanner.c" ++ + libpcap.a: $(OBJ) + @rm -f $@ + $(AR) rc $@ $(OBJ) $(ADDLARCHIVEOBJS) +@@ -462,27 +468,9 @@ libpcap.shareda: $(OBJ) + # + libpcap.none: + +-scanner.c: $(srcdir)/scanner.l +- $(LEX) -P pcap_ --header-file=scanner.h --nounput -o scanner.c $< +-scanner.h: scanner.c +-## Recover from the removal of $@ +- @if test -f $@; then :; else \ +- rm -f scanner.c; \ +- $(MAKE) $(MAKEFLAGS) scanner.c; \ +- fi +- + scanner.o: scanner.c grammar.h + $(CC) $(FULL_CFLAGS) -c scanner.c + +-grammar.c: $(srcdir)/grammar.y +- $(YACC) -p pcap_ -o grammar.c -d $< +-grammar.h: grammar.c +-## Recover from the removal of $@ +- @if test -f $@; then :; else \ +- rm -f grammar.c; \ +- $(MAKE) $(MAKEFLAGS) grammar.c; \ +- fi +- + grammar.o: grammar.c scanner.h + $(CC) $(FULL_CFLAGS) -c grammar.c + +diff --git a/libpcap/configure.ac b/libpcap/configure.ac +index eff6eb8..0127f0a 100644 +--- a/libpcap/configure.ac ++++ b/libpcap/configure.ac +@@ -1462,7 +1462,7 @@ yes) AC_MSG_RESULT(yes) + #include "ftmacros.h" + #include + ]) +- ++ AC_CONFIG_FILES([rpcapd/Makefile rpcapd/rpcapd.manadmin]) + AC_DEFINE(ENABLE_REMOTE,, + [Define to 1 if remote packet capture is to be supported]) + SSRC="$SSRC pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c" +@@ -1867,14 +1867,12 @@ AC_SUBST(V_CCOPT) + AC_SUBST(V_DEFS) + AC_SUBST(V_FINDALLDEVS) + AC_SUBST(V_INCLS) +-AC_SUBST(V_LEX) + AC_SUBST(V_PCAP) + AC_SUBST(V_SHLIB_CCOPT) + AC_SUBST(V_SHLIB_CMD) + AC_SUBST(V_SHLIB_OPT) + AC_SUBST(V_SONAME_OPT) + AC_SUBST(V_RPATH_OPT) +-AC_SUBST(V_YACC) + AC_SUBST(ADDLOBJS) + AC_SUBST(ADDLARCHIVEOBJS) + AC_SUBST(SSRC) +@@ -2275,6 +2273,6 @@ AC_OUTPUT(Makefile pcap-filter.manmisc pcap-linktype.manmisc + pcap_get_tstamp_precision.3pcap pcap_list_datalinks.3pcap + pcap_list_tstamp_types.3pcap pcap_open_dead.3pcap + pcap_open_offline.3pcap pcap_set_tstamp_precision.3pcap +- pcap_set_tstamp_type.3pcap rpcapd/Makefile rpcapd/rpcapd.manadmin ++ pcap_set_tstamp_type.3pcap + testprogs/Makefile) + exit 0 diff --git a/libpcap/configure b/libpcap/configure index 9a8c1588f..38e0a9052 100755 --- a/libpcap/configure +++ b/libpcap/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for pcap 1.9.0-PRE-GIT. +# Generated by GNU Autoconf 2.69 for pcap 1.9.0. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='pcap' PACKAGE_TARNAME='pcap' -PACKAGE_VERSION='1.9.0-PRE-GIT' -PACKAGE_STRING='pcap 1.9.0-PRE-GIT' +PACKAGE_VERSION='1.9.0' +PACKAGE_STRING='pcap 1.9.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -716,6 +716,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -814,6 +815,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1066,6 +1068,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1203,7 +1214,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1316,7 +1327,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures pcap 1.9.0-PRE-GIT to adapt to many kinds of systems. +\`configure' configures pcap 1.9.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1356,6 +1367,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1382,7 +1394,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of pcap 1.9.0-PRE-GIT:";; + short | recursive ) echo "Configuration of pcap 1.9.0:";; esac cat <<\_ACEOF @@ -1520,7 +1532,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -pcap configure 1.9.0-PRE-GIT +pcap configure 1.9.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2042,7 +2054,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by pcap $as_me 1.9.0-PRE-GIT, which was +It was created by pcap $as_me 1.9.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4214,7 +4226,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4260,7 +4272,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4284,7 +4296,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4329,7 +4341,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4353,7 +4365,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -7664,6 +7676,7 @@ _ACEOF fi + ac_config_files="$ac_config_files rpcapd/Makefile rpcapd/rpcapd.manadmin" $as_echo "#define ENABLE_REMOTE /**/" >>confdefs.h @@ -10748,7 +10761,7 @@ ac_config_headers="$ac_config_headers config.h" ac_config_commands="$ac_config_commands default-1" -ac_config_files="$ac_config_files Makefile pcap-filter.manmisc pcap-linktype.manmisc pcap-tstamp.manmisc pcap-savefile.manfile pcap.3pcap pcap_compile.3pcap pcap_datalink.3pcap pcap_dump_open.3pcap pcap_get_tstamp_precision.3pcap pcap_list_datalinks.3pcap pcap_list_tstamp_types.3pcap pcap_open_dead.3pcap pcap_open_offline.3pcap pcap_set_tstamp_precision.3pcap pcap_set_tstamp_type.3pcap rpcapd/Makefile rpcapd/rpcapd.manadmin testprogs/Makefile" +ac_config_files="$ac_config_files Makefile pcap-filter.manmisc pcap-linktype.manmisc pcap-tstamp.manmisc pcap-savefile.manfile pcap.3pcap pcap_compile.3pcap pcap_datalink.3pcap pcap_dump_open.3pcap pcap_get_tstamp_precision.3pcap pcap_list_datalinks.3pcap pcap_list_tstamp_types.3pcap pcap_open_dead.3pcap pcap_open_offline.3pcap pcap_set_tstamp_precision.3pcap pcap_set_tstamp_type.3pcap testprogs/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -11256,7 +11269,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by pcap $as_me 1.9.0-PRE-GIT, which was +This file was extended by pcap $as_me 1.9.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -11322,7 +11335,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -pcap config.status 1.9.0-PRE-GIT +pcap config.status 1.9.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -11449,6 +11462,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 for ac_config_target in $ac_config_targets do case $ac_config_target in + "rpcapd/Makefile") CONFIG_FILES="$CONFIG_FILES rpcapd/Makefile" ;; + "rpcapd/rpcapd.manadmin") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd.manadmin" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; @@ -11467,8 +11482,6 @@ do "pcap_open_offline.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_offline.3pcap" ;; "pcap_set_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_precision.3pcap" ;; "pcap_set_tstamp_type.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_type.3pcap" ;; - "rpcapd/Makefile") CONFIG_FILES="$CONFIG_FILES rpcapd/Makefile" ;; - "rpcapd/rpcapd.manadmin") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd.manadmin" ;; "testprogs/Makefile") CONFIG_FILES="$CONFIG_FILES testprogs/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; diff --git a/libpcap/configure.ac b/libpcap/configure.ac index eff6eb897..0127f0a63 100644 --- a/libpcap/configure.ac +++ b/libpcap/configure.ac @@ -1462,7 +1462,7 @@ yes) AC_MSG_RESULT(yes) #include "ftmacros.h" #include ]) - + AC_CONFIG_FILES([rpcapd/Makefile rpcapd/rpcapd.manadmin]) AC_DEFINE(ENABLE_REMOTE,, [Define to 1 if remote packet capture is to be supported]) SSRC="$SSRC pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c" @@ -1867,14 +1867,12 @@ AC_SUBST(V_CCOPT) AC_SUBST(V_DEFS) AC_SUBST(V_FINDALLDEVS) AC_SUBST(V_INCLS) -AC_SUBST(V_LEX) AC_SUBST(V_PCAP) AC_SUBST(V_SHLIB_CCOPT) AC_SUBST(V_SHLIB_CMD) AC_SUBST(V_SHLIB_OPT) AC_SUBST(V_SONAME_OPT) AC_SUBST(V_RPATH_OPT) -AC_SUBST(V_YACC) AC_SUBST(ADDLOBJS) AC_SUBST(ADDLARCHIVEOBJS) AC_SUBST(SSRC) @@ -2275,6 +2273,6 @@ AC_OUTPUT(Makefile pcap-filter.manmisc pcap-linktype.manmisc pcap_get_tstamp_precision.3pcap pcap_list_datalinks.3pcap pcap_list_tstamp_types.3pcap pcap_open_dead.3pcap pcap_open_offline.3pcap pcap_set_tstamp_precision.3pcap - pcap_set_tstamp_type.3pcap rpcapd/Makefile rpcapd/rpcapd.manadmin + pcap_set_tstamp_type.3pcap testprogs/Makefile) exit 0