Nmap Development mailing list archives
RE: [nmap-svn] r24186 - nbase ncat ncat/test nmap
From: "Rob Nicholls" <robert () robnicholls co uk>
Date: Mon, 20 Jun 2011 23:36:27 +0100
I think some of the changes here (and/or around here) may have broken compilation with Visual C++ on Windows: 1>------ Build started: Project: libdnet-stripped, Configuration: Release Win32 ------ 2>------ Build started: Project: ncat, Configuration: Release Win32 ------ 1> libdnet-stripped.vcxproj -> C:\nmap-svn\libdnet-stripped\.\libdnet-stripped.lib 2> ncat_hostmatch.c 2>c1xx : fatal error C1083: Cannot open source file: 'ncat_hostmatch.c': No such file or directory 3>------ Build started: Project: nping, Configuration: Release Win32 ------ 4>------ Build started: Project: nmap, Configuration: Release Win32 ------ 3> C:\nmap-svn\mswin32\\OpenSSL\bin\libeay32.dll 3> C:\nmap-svn\mswin32\\OpenSSL\bin\ssleay32.dll 3> 2 File(s) copied 4> libnetutil.lib(netutil.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance 4>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification 4>nmap.obj : error LNK2001: unresolved external symbol _addrset_free 4>nmap.obj : error LNK2001: unresolved external symbol _nbase_set_log 4>targets.obj : error LNK2001: unresolved external symbol _addrset_contains 4>targets.obj : error LNK2001: unresolved external symbol _addrset_add_spec 4>targets.obj : error LNK2001: unresolved external symbol _addrset_init 4>.\Release/nmap.exe : fatal error LNK1120: 5 unresolved externals ========== Build: 2 succeeded, 2 failed, 5 up-to-date, 0 skipped ========== Rolling back to r24185 allows me to build Nmap okay. Now I just need to find some domain controllers to finally test Patrik's mbenum code (sorry I didn't get around to testing this before it was committed!). Rob -----Original Message----- From: nmap-svn-bounces () insecure org [mailto:nmap-svn-bounces () insecure org] On Behalf Of commit-mailer () insecure org Sent: 20 June 2011 21:47 To: nmap-svn () insecure org Subject: [nmap-svn] r24186 - nbase ncat ncat/test nmap Author: colin Date: Mon Jun 20 13:46:41 2011 New Revision: 24186 Log: Merging from nmap-exp/colin/nmap-addrset, nmap-exp/colin/nbase-addrset, and /nmap-exp/colin/ncat-addrset Ported addrset from ncat to nbase. Made --exclude and --exclude-file options use addrset. As a side effect IPv6 Excludes work. Added: nbase/nbase_addrset.c - copied unchanged from r24179, /nmap-exp/colin/nbase-addrset/nbase_addrset.c nbase/nbase_addrset.h - copied unchanged from r24179, /nmap-exp/colin/nbase-addrset/nbase_addrset.h Removed: ncat/ncat_hostmatch.c ncat/ncat_hostmatch.h Modified: nbase/Makefile.in nbase/configure nbase/configure.ac nbase/nbase.h ncat/Makefile.in ncat/ncat.h ncat/ncat_core.h ncat/ncat_main.c ncat/test/addrset.c nmap/nmap.cc nmap/targets.cc nmap/targets.h Modified: nbase/Makefile.in ============================================================================ == --- nbase/Makefile.in (original) +++ nbase/Makefile.in Mon Jun 20 13:46:41 2011 @@ -23,7 +23,7 @@ TARGET = libnbase.a -DEPS = getopt.h nbase.h nbase_winconfig.h nbase_config.h nbase_ipv6.h nbase_winunix.h nbase_crc32ct.h +DEPS = getopt.h nbase.h nbase_winconfig.h nbase_config.h nbase_ipv6.h nbase_winunix.h nbase_crc32ct.h nbase_addrset.h OBJS = @LIBOBJS@ all: $(TARGET) Modified: nbase/configure ============================================================================ == --- nbase/configure (original) +++ nbase/configure Mon Jun 20 13:46:41 2011 @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65. +# Generated by GNU Autoconf 2.67. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -316,7 +316,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -356,19 +356,19 @@ fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -530,7 +530,7 @@ exec 6>&1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -730,8 +730,9 @@ fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -776,7 +777,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -802,7 +803,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1006,7 +1007,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1022,7 +1023,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1052,8 +1053,8 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1061,7 +1062,7 @@ # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1079,13 +1080,13 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1108,7 +1109,7 @@ [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1122,8 +1123,8 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used."
&2
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used"
&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1138,9 +1139,9 @@
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error "working directory cannot be determined"
+ as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error "pwd does not report name of working directory"
+ as_fn_error $? "pwd does not report name of working directory"
# Find the source files, if location was not specified.
@@ -1179,11 +1180,11 @@
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $?
"$ac_msg"
pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1223,7 +1224,7 @@
--help=short display options specific to this package
--help=recursive display the short help of all the included
packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
+ -q, --quiet, --silent do not print \`checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
@@ -1366,9 +1367,9 @@
if $ac_init_version; then
cat <<\_ACEOF
configure
-generated by GNU Autoconf 2.65
+generated by GNU Autoconf 2.67
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1438,7 +1439,7 @@
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
+ test $ac_status = 0; } > conftest.i && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then :
@@ -1504,10 +1505,10 @@
ac_fn_c_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"}
as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ if eval "test \"\${$3+set}\"" = set; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
@@ -1543,7 +1544,7 @@
else
ac_header_preproc=no
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
@@ -1570,7 +1571,7 @@
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
@@ -1592,7 +1593,7 @@
as_lineno=${as_lineno-"$1"}
as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1623,7 +1624,7 @@
as_lineno=${as_lineno-"$1"}
as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
$as_echo_n "checking for int$2_t... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
@@ -1634,11 +1635,11 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
+ enum { N = $2 / 2 - 1 };
int
main ()
{
-static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
- 0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
+static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) <<
N) - 1) * 2 + 1))];
test_array [0] = 0
;
@@ -1649,11 +1650,11 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
+ enum { N = $2 / 2 - 1 };
int
main ()
{
-static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
- ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
+static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) -
1) * 2 + 1)
< ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
test_array [0] = 0
@@ -1674,8 +1675,7 @@
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- eval as_val=\$$3
- if test "x$as_val" = x""no; then :
+ if eval test \"x\$"$3"\" = x"no"; then :
else
break
@@ -1698,7 +1698,7 @@
as_lineno=${as_lineno-"$1"}
as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
$as_echo_n "checking for uint$2_t... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
@@ -1728,8 +1728,7 @@
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- eval as_val=\$$3
- if test "x$as_val" = x""no; then :
+ if eval test \"x\$"$3"\" = x"no"; then :
else
break
@@ -1797,7 +1796,7 @@
as_lineno=${as_lineno-"$1"}
as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1860,7 +1859,7 @@
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.65. Invocation command line was
+generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
@@ -1970,11 +1969,9 @@
{
echo
- cat <<\_ASBOX
-## ---------------- ##
+ $as_echo "## ---------------- ##
## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
echo
# The following way of writing the cache mishandles newlines in values,
(
@@ -2008,11 +2005,9 @@
)
echo
- cat <<\_ASBOX
-## ----------------- ##
+ $as_echo "## ----------------- ##
## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
echo
for ac_var in $ac_subst_vars
do
@@ -2025,11 +2020,9 @@
echo
if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
+ $as_echo "## ------------------- ##
## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
echo
for ac_var in $ac_subst_files
do
@@ -2043,11 +2036,9 @@
fi
if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
+ $as_echo "## ----------- ##
## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
echo
cat confdefs.h
echo
@@ -2102,7 +2093,12 @@
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- ac_site_file1=$CONFIG_SITE
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
elif test "x$prefix" != xNONE; then
ac_site_file1=$prefix/share/config.site
ac_site_file2=$prefix/etc/config.site
@@ -2117,7 +2113,11 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script
$ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':"
&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
done
@@ -2193,7 +2193,7 @@
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the
environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the
build" >&2;}
- as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start
over" "$LINENO" 5
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start
over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -2536,8 +2536,8 @@
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in
\`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5 ; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -2651,9 +2651,8 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5 ; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -2695,8 +2694,8 @@
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of executables: cannot compile and
link
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -2753,9 +2752,9 @@
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':"
&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
+as_fn_error $? "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
fi
fi
@@ -2806,8 +2805,8 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
@@ -3129,16 +3128,22 @@
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
- for ac_t in install-sh install.sh shtool; do
- if test -f "$ac_dir/$ac_t"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/$ac_t -c"
- break 2
- fi
- done
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
done
if test -z "$ac_aux_dir"; then
- as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\"
\"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in
\"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -3152,7 +3157,7 @@
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
$as_echo_n "checking build system type... " >&6; }
@@ -3163,16 +3168,16 @@
test "x$ac_build_alias" = x &&
ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
test "x$ac_build_alias" = x &&
- as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO"
5
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed"
"$LINENO" 5
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed"
"$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
@@ -3197,7 +3202,7 @@
ac_cv_host=$ac_cv_build
else
ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed"
"$LINENO" 5
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed"
"$LINENO" 5
fi
fi
@@ -3205,7 +3210,7 @@
$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
@@ -3317,7 +3322,7 @@
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -3333,11 +3338,11 @@
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -3376,7 +3381,7 @@
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -3392,18 +3397,18 @@
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
ac_ext=c
@@ -3464,7 +3469,7 @@
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_GREP"; then
- as_fn_error "no acceptable grep could be found in
$PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable grep could be found in
$PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_GREP=$GREP
@@ -3530,7 +3535,7 @@
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_EGREP"; then
- as_fn_error "no acceptable egrep could be found in
$PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable egrep could be found in
$PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_EGREP=$EGREP
@@ -3662,8 +3667,7 @@
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header"
"$ac_includes_default
"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -3677,8 +3681,7 @@
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header"
"$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -4029,8 +4032,8 @@
;; #(
*)
- as_fn_error "unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
esac
@@ -4137,8 +4140,7 @@
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -4152,8 +4154,7 @@
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -4176,8 +4177,7 @@
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -4190,8 +4190,7 @@
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -4224,8 +4223,7 @@
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -4265,6 +4263,12 @@
;;
esac
+case " $LIBOBJS " in
+ *" nbase_addrset.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS nbase_addrset.$ac_objext"
+ ;;
+esac
+
# Check for IPv6 support -- modified from Apache 2.0.40:
@@ -4457,25 +4461,31 @@
fi
done
-for ac_func in inet_ntop inet_pton
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
+if test "x$ac_cv_func_inet_ntop" = x""yes; then :
+ $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
else
case " $LIBOBJS " in
- *" $ac_func.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ *" inet_ntop.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
+if test "x$ac_cv_func_inet_pton" = x""yes; then :
+ $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
+
+else
+ case " $LIBOBJS " in
+ *" inet_pton.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
;;
esac
fi
-done
@@ -5077,7 +5087,7 @@
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
- as_fn_error "cannot check for file existence when cross compiling"
"$LINENO" 5
+ as_fn_error $? "cannot check for file existence when cross compiling"
"$LINENO" 5
if test -r "/proc/self/exe"; then
ac_cv_file__proc_self_exe=yes
else
@@ -5193,6 +5203,7 @@
ac_libobjs=
ac_ltlibobjs=
+U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -5355,19 +5366,19 @@
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit
the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"}
as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"}
as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -5563,7 +5574,7 @@
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory
$as_dir"
} # as_fn_mkdir_p
@@ -5617,7 +5628,7 @@
# values after options handling.
ac_log="
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.65. Invocation command line was
+generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -5679,10 +5690,10 @@
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //;
s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.65,
+configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -5697,11 +5708,16 @@
while test $# != 0
do
case $1 in
- --*=*)
+ --*=?*)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
*)
ac_option=$1
ac_optarg=$2
@@ -5723,6 +5739,7 @@
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
@@ -5735,7 +5752,7 @@
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
- as_fn_error "ambiguous option: \`$1'
+ as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
@@ -5744,7 +5761,7 @@
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error "unrecognized option: \`$1'
+ -*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
@@ -5796,7 +5813,7 @@
"nbase_config.h") CONFIG_HEADERS="$CONFIG_HEADERS nbase_config.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
esac
done
@@ -5833,7 +5850,7 @@
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
@@ -5850,7 +5867,7 @@
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\r'
+ ac_cs_awk_cr='\\r'
else
ac_cs_awk_cr=$ac_cr
fi
@@ -5864,18 +5881,18 @@
echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
echo "_ACEOF"
} >conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
. ./conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -5964,20 +5981,28 @@
else
cat
fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || as_fn_error "could not setup config files machinery" "$LINENO" 5
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading
and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
s/^[^=]*=[ ]*$//
}'
fi
@@ -6005,7 +6030,7 @@
if test -z "$ac_t"; then
break
elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -6090,7 +6115,7 @@
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- as_fn_error "could not setup config headers machinery" "$LINENO" 5
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"
@@ -6103,7 +6128,7 @@
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -6131,7 +6156,7 @@
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed
"s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
@@ -6158,7 +6183,7 @@
case $ac_tag in
*:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -6284,22 +6309,22 @@
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk"
$tmp/out \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; }
&&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test
-z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a
reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
+which seems to be undefined. Please make sure it is defined" >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable
\`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
+which seems to be undefined. Please make sure it is defined" >&2;}
rm -f "$tmp/stdin"
case $ac_file in
-) cat "$tmp/out" && rm -f "$tmp/out";;
*) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
esac \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
:H)
#
@@ -6310,19 +6335,19 @@
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
} >"$tmp/config.h" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$tmp/config.h" "$ac_file" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error "could not create -" "$LINENO" 5
+ || as_fn_error $? "could not create -" "$LINENO" 5
fi
;;
@@ -6337,7 +6362,7 @@
ac_clean_files=$ac_clean_files_save
test $ac_write_fail = 0 ||
- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
# configure is writing to config.log, and then calls config.status.
@@ -6358,7 +6383,7 @@
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit $?
+ $ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no;
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options:
$ac_unrecognized_opts" >&5
Modified: nbase/configure.ac
============================================================================
==
--- nbase/configure.ac (original)
+++ nbase/configure.ac Mon Jun 20 13:46:41 2011
@@ -157,6 +157,7 @@
AC_LIBOBJ([nbase_misc])
AC_LIBOBJ([nbase_memalloc])
AC_LIBOBJ([nbase_rnd])
+AC_LIBOBJ([nbase_addrset])
# Check for IPv6 support -- modified from Apache 2.0.40:
Modified: nbase/nbase.h
============================================================================
==
--- nbase/nbase.h (original)
+++ nbase/nbase.h Mon Jun 20 13:46:41 2011
@@ -166,6 +166,8 @@
#include <inttypes.h>
#endif
+#include <stdio.h>
+
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 64
#endif
@@ -464,6 +466,23 @@
char *executable_path(const char *argv0);
+/* addrset management functions and definitions */
+/* A set of addresses. Used to match against allow/deny lists. */
+struct addrset_elem;
+
+/* A set of addresses. Used to match against allow/deny lists. */
+struct addrset {
+ /* Linked list of struct addset_elem. */
+ struct addrset_elem *head;
+};
+
+void nbase_set_log(void (*log_user_func)(const char *, ...),void
(*log_debug_func)(const char *, ...));
+extern void addrset_init(struct addrset *set);
+extern void addrset_free(struct addrset *set);
+extern int addrset_add_spec(struct addrset *set, const char *spec, int af,
int dns);
+extern int addrset_add_file(struct addrset *set, FILE *fd, int af, int
dns);
+extern int addrset_contains(const struct addrset *set, const struct
sockaddr *sa);
+
#ifndef STDIN_FILENO
#define STDIN_FILENO 0
#endif
Modified: ncat/Makefile.in
============================================================================
==
--- ncat/Makefile.in (original)
+++ ncat/Makefile.in Mon Jun 20 13:46:41 2011
@@ -68,8 +68,8 @@
# usual directory structure into a different tree.
DESTDIR =
-SRCS = ncat_main.c ncat_connect.c ncat_core.c ncat_posix.c ncat_listen.c
ncat_proxy.c ncat_broker.c ncat_hostmatch.c ncat_ssl.c base64.c http.c
util.c sys_wrap.c
-OBJS = ncat_main.o ncat_connect.o ncat_core.o ncat_posix.o ncat_listen.o
ncat_proxy.o ncat_broker.o ncat_hostmatch.o ncat_ssl.o base64.o http.o
util.o sys_wrap.o
+SRCS = ncat_main.c ncat_connect.c ncat_core.c ncat_posix.c ncat_listen.c
ncat_proxy.c ncat_broker.c ncat_ssl.c base64.c http.c util.c sys_wrap.c
+OBJS = ncat_main.o ncat_connect.o ncat_core.o ncat_posix.o ncat_listen.o
ncat_proxy.o ncat_broker.o ncat_ssl.o base64.o http.o util.o sys_wrap.o
DATAFILES =
ifneq ($(HAVE_OPENSSL),)
@@ -112,20 +112,24 @@
$(SHELL) ./config.status; \
fi
-test/addrset: test/addrset.o ncat_core.o ncat_hostmatch.o sys_wrap.o util.o
- $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(NSOCKLIB) $(NBASELIB)
$(OPENSSL_LIBS) $(PCAP_LIBS) $(LIBS)
+test/addrset: test/addrset.o ncat_core.o sys_wrap.o util.o
+ $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(LIBS) $(NSOCKLIB) $(NBASELIB)
$(OPENSSL_LIBS) $(PCAP_LIBS)
-test/test-uri: test/test-uri.o base64.o http.o ncat_core.o ncat_hostmatch.o
sys_wrap.o util.o
- $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(NSOCKLIB) $(NBASELIB)
$(OPENSSL_LIBS) $(PCAP_LIBS) $(LIBS)
+test/test-uri: test/test-uri.o base64.o http.o ncat_core.o sys_wrap.o
util.o
+ $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(LIBS) $(NSOCKLIB) $(NBASELIB)
$(OPENSSL_LIBS) $(PCAP_LIBS)
-test/test-cmdline-split: test/test-cmdline-split.o ncat_posix.o ncat_core.o
ncat_hostmatch.o sys_wrap.o util.o
- $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(NSOCKLIB) $(NBASELIB)
$(OPENSSL_LIBS) $(PCAP_LIBS) $(LIBS)
+test/test-cmdline-split: test/test-cmdline-split.o ncat_posix.o ncat_core.o
sys_wrap.o util.o
+ $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(LIBS) $(NSOCKLIB) $(NBASELIB)
$(OPENSSL_LIBS) $(PCAP_LIBS)
-test/test-wildcard: test/test-wildcard.o ncat_core.o ncat_hostmatch.o
ncat_ssl.o sys_wrap.o util.o
- $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(NSOCKLIB) $(NBASELIB)
$(OPENSSL_LIBS) $(PCAP_LIBS) $(LIBS)
+test/test-wildcard: test/test-wildcard.o ncat_core.o ncat_ssl.o sys_wrap.o
util.o
+ $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(LIBS) $(NSOCKLIB) $(NBASELIB)
$(OPENSSL_LIBS) $(PCAP_LIBS)
.PHONY: uninstall all clean distclean
+../libnetutil/libnetutil.a: ../libnetutil/Makefile
+ @echo Compiling libnetutil;
+ cd ../libnetutil && $(MAKE)
+
$(NBASEDIR)/libnbase.a: $(NBASEDIR)/Makefile
@echo Compiling libnbase;
cd $(NBASEDIR) && $(MAKE)
Modified: ncat/ncat.h
============================================================================
==
--- ncat/ncat.h (original)
+++ ncat/ncat.h Mon Jun 20 13:46:41 2011
@@ -106,7 +106,6 @@
#include "ncat_connect.h"
#include "ncat_core.h"
#include "ncat_exec.h"
-#include "ncat_hostmatch.h"
#include "ncat_listen.h"
#include "ncat_proxy.h"
#include "ncat_ssl.h"
Modified: ncat/ncat_core.h
============================================================================
==
--- ncat/ncat_core.h (original)
+++ ncat/ncat_core.h Mon Jun 20 13:46:41 2011
@@ -89,7 +89,6 @@
#include "nsock.h"
#include "nbase.h"
-#include "ncat_hostmatch.h"
#include "util.h"
#include "sockaddr_u.h"
Modified: ncat/ncat_main.c
============================================================================
==
--- ncat/ncat_main.c (original)
+++ ncat/ncat_main.c Mon Jun 20 13:46:41 2011
@@ -188,7 +188,7 @@
fd = fopen(node->spec, "r");
if (fd == NULL)
bye("can't open %s: %s.", node->spec, strerror(errno));
- if (!addrset_add_file(set, fd))
+ if (!addrset_add_file(set, fd, o.af, !o.nodns))
bye("error in hosts file %s.", node->spec);
fclose(fd);
} else {
@@ -197,7 +197,7 @@
commalist = node->spec;
while ((spec = strtok(commalist, ",")) != NULL) {
commalist = NULL;
- if (!addrset_add_spec(set, spec))
+ if (!addrset_add_spec(set, spec, o.af, !o.nodns))
bye("error in host specification \"%s\".", node->spec);
}
}
@@ -533,6 +533,10 @@
if (o.verbose)
print_banner();
+ if(o.debug)
+ nbase_set_log(loguser, logdebug);
+ else
+ nbase_set_log(loguser, NULL);
/* Will be AF_INET or AF_INET6 when valid */
memset(&targetss.storage, 0, sizeof(targetss.storage));
Modified: ncat/test/addrset.c
============================================================================
==
--- ncat/test/addrset.c (original)
+++ ncat/test/addrset.c Mon Jun 20 13:46:41 2011
@@ -20,7 +20,6 @@
#include <stdlib.h>
#include "ncat_core.h"
-#include "ncat_hostmatch.h"
static int resolve_name(const char *name, struct addrinfo **result)
{
@@ -43,7 +42,7 @@
options_init();
for (i = 1; i < argc; i++) {
- if (!addrset_add_spec(&set, argv[i])) {
+ if (!addrset_add_spec(&set, argv[i], o.af, !o.nodns)) {
fprintf(stderr, "Error adding spec \"%s\".\n", argv[i]);
exit(1);
}
Modified: nmap/nmap.cc
============================================================================
==
--- nmap/nmap.cc (original)
+++ nmap/nmap.cc Mon Jun 20 13:46:41 2011
@@ -475,7 +475,7 @@
/* Only NSE scripts can add targets */
NewTargets *new_targets = NULL;
#endif
- TargetGroup *exclude_group = NULL;
+ addrset exclude_group;
char myname[MAXHOSTNAMELEN + 1];
#if (defined(IN_ADDR_DEEPSTRUCT) || defined( SOLARIS))
/* Note that struct in_addr in solaris is 3 levels deep just to store an
@@ -1645,20 +1645,17 @@
/* lets load our exclude list */
if (excludefd != NULL) {
- exclude_group = load_exclude_file(excludefd);
+ load_exclude_file(&exclude_group, excludefd);
fclose(excludefd);
}
if (exclude_spec != NULL) {
/* Simultaneous --excludefile and --exclude are not supported. */
- assert(exclude_group == NULL);
- exclude_group = load_exclude_string(exclude_spec);
+ load_exclude_string(&exclude_group ,exclude_spec);
free(exclude_spec);
}
- if (exclude_group != NULL) {
- if (o.debugging > 3)
- dumpExclude(exclude_group);
- }
+ if (o.debugging > 3)
+ dumpExclude(&exclude_group);
#ifndef NOLUA
if (o.scriptupdatedb) {
@@ -1692,7 +1689,7 @@
ideal_scan_group_sz = determineScanGroupSize(o.numhosts_scanned,
&ports);
while(Targets.size() < ideal_scan_group_sz) {
o.current_scantype = HOST_DISCOVERY;
- currenths = nexthost(hstate, exclude_group, &ports, o.pingtype);
+ currenths = nexthost(hstate, &exclude_group, &ports, o.pingtype);
if (!currenths) {
/* Try to refill with any remaining expressions */
/* First free the old ones */
@@ -1730,7 +1727,7 @@
num_host_exp_groups);
/* Try one last time -- with new expressions */
- currenths = nexthost(hstate, exclude_group, &ports, o.pingtype);
+ currenths = nexthost(hstate, &exclude_group, &ports, o.pingtype);
if (!currenths)
break;
}
@@ -1971,9 +1968,8 @@
#endif
delete hstate;
- if (exclude_group)
- delete[] exclude_group;
-
+
+ addrset_free(&exclude_group);
hstate = NULL;
/* Free host expressions */
Modified: nmap/targets.cc
============================================================================
==
--- nmap/targets.cc (original)
+++ nmap/targets.cc Mon Jun 20 13:46:41 2011
@@ -101,7 +101,6 @@
#include "nmap_dns.h"
#include "nmap_tty.h"
#include "utils.h"
-
using namespace std;
extern NmapOps o;
@@ -156,133 +155,40 @@
/* Is the host passed as Target to be excluded? Much of this logic had
to be rewritten from wam's original code to allow for the objects */
static int hostInExclude(struct sockaddr *checksock, size_t checksocklen,
- TargetGroup *exclude_group) {
- unsigned long tmpTarget; /* ip we examine */
- int i=0; /* a simple index */
- char targets_type; /* what is the address type of the Target Group
*/
- struct sockaddr_storage ss;
- struct sockaddr_in *sin = (struct sockaddr_in *) &ss;
- size_t slen; /* needed for funct but not used */
- unsigned long mask = 0; /* our trusty netmask, which we convert to nbo
*/
- struct sockaddr_in *checkhost_in;
-
- if ((TargetGroup *)0 == exclude_group)
+ const addrset *exclude_group) {
+ if (exclude_group == NULL)
return 0;
- checkhost_in = NULL;
- if (checksock->sa_family == AF_INET) {
- assert(checksocklen >= sizeof(struct sockaddr_in));
- checkhost_in = (struct sockaddr_in *) checksock;
- }
-
- /* First find out what type of addresses are in the target group */
- targets_type = exclude_group[i].get_targets_type();
-
- /* Lets go through the targets until we reach our uninitialized
placeholder */
- while (exclude_group[i].get_targets_type() != TargetGroup::TYPE_NONE) {
- /* while there are still hosts in the target group */
- while (exclude_group[i].get_next_host(&ss, &slen) == 0) {
- tmpTarget = sin->sin_addr.s_addr;
-
- /* For Netmasks simply compare the network bits and move to the next
- * group if it does not compare, we don't care about the individual
addrs */
- if (targets_type == TargetGroup::IPV4_NETMASK) {
- if (checkhost_in == NULL)
- break;
- mask = htonl((unsigned long) (0-1) <<
(32-exclude_group[i].get_mask()));
- if ((tmpTarget & mask) == (checkhost_in->sin_addr.s_addr & mask)) {
- exclude_group[i].rewind();
- return 1;
- } else {
- break;
- }
- }
- /* For ranges we need to be a little more slick, if we don't find a
match
- * we should skip the rest of the addrs in the octet, thank wam for
this
- * optimization */
- else if (targets_type == TargetGroup::IPV4_RANGES) {
- if (checkhost_in == NULL)
- break;
- if (tmpTarget == checkhost_in->sin_addr.s_addr) {
- exclude_group[i].rewind();
- return 1;
- } else {
- /* note these are in network byte order */
- if ((tmpTarget & 0x000000ff) != (checkhost_in->sin_addr.s_addr &
0x000000ff))
- exclude_group[i].skip_range(TargetGroup::FIRST_OCTET);
- else if ((tmpTarget & 0x0000ff00) !=
(checkhost_in->sin_addr.s_addr & 0x0000ff00))
- exclude_group[i].skip_range(TargetGroup::SECOND_OCTET);
- else if ((tmpTarget & 0x00ff0000) !=
(checkhost_in->sin_addr.s_addr & 0x00ff0000))
- exclude_group[i].skip_range(TargetGroup::THIRD_OCTET);
-
- continue;
- }
- }
-#if HAVE_IPV6
- else if (targets_type == TargetGroup::IPV6_ADDRESS) {
- fatal("exclude file not supported for IPV6 -- If it is important to
you, send a mail to fyodor () insecure org so I can guage support\n");
- }
-#endif
- }
- exclude_group[i++].rewind();
- }
+ if (checksock == NULL)
+ return 0;
- /* we did not find the host */
+ if (addrset_contains(exclude_group,checksock))
+ return 1;
return 0;
}
-/* Convert a vector of host specifications to an array (allocated with
new[]) of
- TargetGroups. The size of the returned array is one greater than the
number
- of host specs, to leave on uninitialized member at the end. */
-static TargetGroup *specs_to_targetgroups(const std::vector<std::string>
&specs) {
- TargetGroup *excludelist;
- unsigned int i;
-
- excludelist = new TargetGroup[specs.size() + 1];
-
- for (i = 0; i < specs.size(); i++) {
- if (excludelist[i].parse_expr(specs[i].c_str(), o.af()) == 0) {
- if (o.debugging > 1)
- error("Loaded exclude target of: %s", specs[i].c_str());
- }
- }
-
- return excludelist;
-}
-
/* Load an exclude list from a file for --excludefile. */
-TargetGroup* load_exclude_file(FILE *fp) {
- std::vector<std::string> specs;
+int load_exclude_file(addrset *excludelist, FILE *fp) {
+ addrset_init(excludelist);
char host_spec[1024];
size_t n;
while ((n = read_host_from_file(fp, host_spec, sizeof(host_spec))) > 0) {
if (n >= sizeof(host_spec))
fatal("One of your exclude file specifications was too long to read
(>= %u chars)", (unsigned int) sizeof(host_spec));
- specs.push_back(host_spec);
+ addrset_add_spec(excludelist, host_spec, o.af(), 1);
}
- return specs_to_targetgroups(specs);
+ return 1;
}
/* Load a comma-separated exclude list from a string, the argument to
--exclude. */
-TargetGroup* load_exclude_string(const char *s) {
- std::vector<std::string> specs;
- const char *begin, *p;
-
- p = s;
- while (*p != '\0') {
- begin = p;
- while (*p != '\0' && *p != ',')
- p++;
- specs.push_back(std::string(begin, p - begin));
- if (*p == '\0')
- break;
- p++;
- }
+int load_exclude_string(addrset *excludelist, const char *s) {
+ addrset_init(excludelist);
+ addrset_add_spec(excludelist, s, o.af(), 1);
- return specs_to_targetgroups(specs);
+ return 1;
}
@@ -292,43 +198,11 @@
the Target Group Object. Rather than writing a bunch of methods to
return
private attributes, which would only be used for debugging, I went for
the
method below. */
-int dumpExclude(TargetGroup *exclude_group) {
- int i=0, debug_save=0, type=TargetGroup::TYPE_NONE;
- unsigned int mask = 0;
- struct sockaddr_storage ss;
- struct sockaddr_in *sin = (struct sockaddr_in *) &ss;
- size_t slen;
-
- /* shut off debugging for now, this is a debug routine in itself, we
don't
- want to see all the debug messages inside of the object */
- debug_save = o.debugging;
- o.debugging = 0;
-
- while ((type = exclude_group[i].get_targets_type()) !=
TargetGroup::TYPE_NONE) {
- switch (type) {
- case TargetGroup::IPV4_NETMASK:
- exclude_group[i].get_next_host(&ss, &slen);
- mask = exclude_group[i].get_mask();
- error("exclude host group %d is %s/%d", i,
inet_ntoa(sin->sin_addr), mask);
- break;
-
- case TargetGroup::IPV4_RANGES:
- while (exclude_group[i].get_next_host(&ss, &slen) == 0)
- error("exclude host group %d is %s", i,
inet_ntoa(sin->sin_addr));
- break;
-
- case TargetGroup::IPV6_ADDRESS:
- fatal("IPV6 addresses are not supported in the exclude file\n");
- break;
-
- default:
- fatal("Unknown target type in exclude file.\n");
- }
- exclude_group[i++].rewind();
- }
-
- /* return debugging to what it was */
- o.debugging = debug_save;
+int dumpExclude(addrset *exclude_group) {
+ /* When we updated the exclude code to use addrset from libnetutil
(originally
+ from ncat) there was no simple available debugging function. Thus we
are
+ zeroing this and if it is needed look in addrset.cc for the lower
level
+ debug function -Colin */
return 1;
}
@@ -415,7 +289,7 @@
return false;
}
-Target *nexthost(HostGroupState *hs, TargetGroup *exclude_group,
+Target *nexthost(HostGroupState *hs, const addrset *exclude_group,
struct scan_lists *ports, int pingtype) {
int i;
struct sockaddr_storage ss;
Modified: nmap/targets.h
============================================================================
==
--- nmap/targets.h (original)
+++ nmap/targets.h Mon Jun 20 13:46:41 2011
@@ -154,15 +154,14 @@
rawprotoscan: 1;
};
-
/* Ports is the list of ports the user asked to be scanned (0 terminated),
you can just pass NULL (it is only a stupid optimization that needs it)
*/
-Target *nexthost(HostGroupState *hs, TargetGroup *exclude_group,
+Target *nexthost(HostGroupState *hs,const addrset *exclude_group,
struct scan_lists *ports, int pingtype);
-TargetGroup* load_exclude_file(FILE *fp);
-TargetGroup* load_exclude_string(const char *s);
+int load_exclude_file(addrset *exclude_group, FILE *fp);
+int load_exclude_string(addrset *exclude_group, const char *s);
/* a debugging routine to dump an exclude list to stdout. */
-int dumpExclude(TargetGroup*exclude_group);
+int dumpExclude(addrset *exclude_group);
/* Returns the last host obtained by nexthost. It will be given again the
next
time you call nexthost(). */
void returnhost(HostGroupState *hs);
_______________________________________________
Sent through the nmap-svn mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-svn
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/
Current thread:
- RE: [nmap-svn] r24186 - nbase ncat ncat/test nmap Rob Nicholls (Jun 20)
- Re: [nmap-svn] r24186 - nbase ncat ncat/test nmap David Fifield (Jun 21)
