Index: wu-ftpd/README.v6 diff -u /dev/null wu-ftpd/README.v6:1.5.2.1 --- /dev/null Fri Jan 30 22:37:39 2004 +++ wu-ftpd/README.v6 Fri Jan 30 22:37:02 2004 @@ -0,0 +1,63 @@ +IPv6-capable wu-ftpd + Jun-ichiro Itoh, KAME Project + Munechika SUMIKAWA, KAME Project + +$Id: README.v6,v 1.5.2.1 2004/01/30 13:37:02 sumikawa Exp $ + + +This patch kit contains a patch to enable wu-ftpd to handle +both IPv4 and IPv6 connections. + +SUPPORTED EXTENSIONS +==================== +LPSV, LPRT, EPSV, EPRT are supported. +"EPSV ALL" is accepted but ignored. + + +HOW TO BUILD BINARY +=================== + +Normally, binary can easily be build with the "configure" script. +Basically, + % sh configure --enable-ipv6 + % su + # make install +should work fine. + +We still support the old "build" script, but it is not recommended +to use this old method. + +SUPPORTED PLATFORMS +=================== +KAME: http://www.kame.net +Linux: http://www.linux.org + http://www.linux-ipv6.org +Compaq tru64 + +THIRD-PARTY PATCHES +=================== +It is known that wu-ftpd has some interoperability issue with +non-complient (but widely deployed) ftp clients. You might want to +apply the following patch as well, to deal with the interoperability +issues. The patch also contains some improvements on security. + +http://www.isoternet.org/~y-koga/wu-ftpd/wu-ftpd-2.6.1.test.patch + +TODO +=================== +- Access filtering already supports IPv6 but it's checked to work. + +- -s(standalone) option suport to open dual socket but acl_DaemonAddress() + doesn't work at this moment. + +- provide compatible libraries such as getaddrinfo() for OSs which + do not have them and detect them in configure. HAVE_GETADDRINFO + related code are too complex. + +- get rid off union sockunion. check: + http://www.t17.ds.pwr.wroc.pl/~misiek/ipv6/wu-ftpd-2.6.1-ipv6-20000914.patch.gz) + +-- +Updated to 2.6.0 by Arkadiusz Miskiewicz , PLD/Linux. +Updated by Masaaki NORO + and Hideaki YOSHIFUJI Index: wu-ftpd/build diff -u wu-ftpd/build:1.1.1.6 wu-ftpd/build:1.11 --- wu-ftpd/build:1.1.1.6 Thu Jul 11 10:53:03 2002 +++ wu-ftpd/build Thu Jul 11 10:58:21 2002 @@ -61,6 +61,7 @@ hiu : Hitachi 3050 Unix (HI-UX/WE2) hpx : HP-UX lnx : Linux (tested on 1.2.X and 2.0.0) + lv6 : Linux (tested on 2.2.13) with glibc 2.1.2) nbs : NetBSD 1.X nx2 : NeXTstep 2.x nx3 : NeXTstep 3.x @@ -139,6 +140,32 @@ else cp makefiles/Makefile.$maketarget Makefile fi + INET6_CFLAGS="" + INET6_LDFLAGS="" + case $maketarget in + fbd|nbs|bdi) + if [ -f /usr/local/v6/lib/libinet6.a ]; then + INET6_CFLAGS="-DINET6" + INET6_LDFLAGS="-L/usr/local/v6/lib -linet6" + fi + ;; + lv6) + if [ -f /usr/inet6/lib/libinet6.a ]; then + INET6_CFLAGS="-DINET6 -I/usr/inet6/include" + INET6_LDFLAGS="-L/usr/inet6/lib -linet6" + fi + ;; + esac + _INET6_CFLAGS=`echo $INET6_CFLAGS | sed -e 's/\\//\\\\\\//g'` + _INET6_LDFLAGS=`echo $INET6_LDFLAGS | sed -e 's/\\//\\\\\\//g'` + ed Makefile </dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi -# Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -53,8 +52,165 @@ set -o posix fi +# NLS nuisances. +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +(set +x; test -n "`(LANG=C; export LANG) 2>&1`") && + { $as_unset LANG || test "${LANG+set}" != set; } || + { LANG=C; export LANG; } +(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && + { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || + { LC_ALL=C; export LC_ALL; } +(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && + { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || + { LC_TIME=C; export LC_TIME; } +(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && + { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || + { LC_CTYPE=C; export LC_CTYPE; } +(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && + { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || + { LANGUAGE=C; export LANGUAGE; } +(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && + { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || + { LC_COLLATE=C; export LC_COLLATE; } +(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && + { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || + { LC_NUMERIC=C; export LC_NUMERIC; } +(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && + { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || + { LC_MESSAGES=C; export LC_MESSAGES; } + + # Name of the executable. -as_me=`echo "$0" |sed 's,.*[\\/],,'` +as_me=`(basename "$0") 2>/dev/null || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conftest.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr @@ -82,22 +238,12 @@ as_executable_p="test -f" -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -# NLS nuisances. -$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } -$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } -$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } -$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } -$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } -$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } -$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } -$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } # IFS # We need space, tab and new line, in precisely that order. @@ -106,7 +252,8 @@ IFS=" $as_nl" # CDPATH. -$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } + # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -121,7 +268,8 @@ ac_default_prefix=/usr/local cross_compiling=no subdirs= -MFLAGS= MAKEFLAGS= +MFLAGS= +MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. @@ -129,8 +277,52 @@ # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + ac_unique_file="src/ftpd.c" ac_default_prefix=/usr +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + # Initialize some variables set by options. ac_init_help= @@ -170,13 +362,6 @@ infodir='${prefix}/info' mandir='${prefix}/man' -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - ac_prev= for ac_option do @@ -309,7 +494,7 @@ with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -488,7 +673,7 @@ eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done @@ -500,18 +685,19 @@ eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. +# FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias -# FIXME: should be removed in autoconf 3.0. +# FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe @@ -527,13 +713,23 @@ test "$silent" = yes && exec 6>/dev/null + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. @@ -543,10 +739,10 @@ fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else - { echo "$as_me: error: cannot find sources in $srcdir" >&2 + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi @@ -590,7 +786,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 <&2 + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done @@ -762,31 +980,31 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then - cat <<\EOF + cat <<\_ACEOF -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -EOF +_ACEOF exit 0 fi exec 5>config.log -cat >&5 <&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.52. Invocation command line was +generated by GNU Autoconf 2.53. Invocation command line was $ $0 $@ -EOF +_ACEOF { cat <<_ASUNAME -## ---------- ## -## Platform. ## -## ---------- ## +## --------- ## +## Platform. ## +## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` @@ -805,17 +1023,27 @@ /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` -PATH = $PATH - _ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + } >&5 -cat >&5 <&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF -EOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. @@ -826,15 +1054,17 @@ do case $ac_arg in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; + | --no-cr | --no-c | -n ) continue ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - ac_sep=" " ;; - *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" - ac_sep=" " ;; + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + ac_sep=" " ;; esac # Get rid of the leading space. done @@ -842,14 +1072,19 @@ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. - echo >&5 - echo "## ----------------- ##" >&5 - echo "## Cache variables. ##" >&5 - echo "## ----------------- ##" >&5 - echo >&5 - # The following way of writing the cache mishandles newlines in values, + { + echo + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in @@ -863,21 +1098,24 @@ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; -} >&5 - sed "/^$/d" confdefs.h >conftest.log - if test -s conftest.log; then - echo >&5 - echo "## ------------ ##" >&5 - echo "## confdefs.h. ##" >&5 - echo "## ------------ ##" >&5 - echo >&5 - cat conftest.log >&5 - fi - (echo; echo) >&5 - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" >&5 - echo "$as_me: exit $exit_status" >&5 - rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && +} + echo + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core core.* *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do @@ -890,6 +1128,33 @@ # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then @@ -901,9 +1166,9 @@ fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - { echo "$as_me:904: loading site script $ac_site_file" >&5 + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} - cat "$ac_site_file" >&5 + sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done @@ -912,7 +1177,7 @@ # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:915: loading cache $cache_file" >&5 + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; @@ -920,7 +1185,7 @@ esac fi else - { echo "$as_me:923: creating cache $cache_file" >&5 + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -936,42 +1201,42 @@ eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:939: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:943: error: \`$ac_var' was not set in the previous run" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:949: error: \`$ac_var' has changed since the previous run:" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:951: former value: $ac_old_val" >&5 + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:953: current value: $ac_new_val" >&5 + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac - # Pass precious variables to config.status. It doesn't matter if - # we pass some twice (in addition to the command line arguments). + # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val" - ;; + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { echo "$as_me:972: error: changes in the environment can compromise the build" >&5 + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:974: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -982,29 +1247,27 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac -echo "#! $SHELL" >conftest.sh -echo "exit 0" >>conftest.sh -chmod +x conftest.sh -if { (echo "$as_me:994: PATH=\".;.\"; conftest.sh") >&5 - (PATH=".;."; conftest.sh) 2>&5 - ac_status=$? - echo "$as_me:997: \$? = $ac_status" >&5 - (exit $ac_status); }; then - ac_path_separator=';' -else - ac_path_separator=: -fi -PATH_SEPARATOR="$ac_path_separator" -rm -f conftest.sh + + + + + + + + + + + + + + + + + ac_config_headers="$ac_config_headers config.h src/config.h" + ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then @@ -1022,7 +1285,7 @@ fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:1025: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi @@ -1032,11 +1295,11 @@ # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:1035: error: cannot run $ac_config_sub" >&5 + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:1039: checking build system type" >&5 +echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1045,23 +1308,24 @@ test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && - { { echo "$as_me:1048: error: cannot guess build type; you must specify one" >&5 + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:1052: error: $ac_config_sub $ac_cv_build_alias failed." >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1057: result: $ac_cv_build" >&5 +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$as_me:1064: checking host system type" >&5 + +echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1070,19 +1334,20 @@ test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:1073: error: $ac_config_sub $ac_cv_host_alias failed" >&5 + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1078: result: $ac_cv_host" >&5 +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$as_me:1085: checking target system type" >&5 + +echo "$as_me:$LINENO: checking target system type" >&5 echo $ECHO_N "checking target system type... $ECHO_C" >&6 if test "${ac_cv_target+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1091,18 +1356,19 @@ test "x$ac_cv_target_alias" = "x" && ac_cv_target_alias=$ac_cv_host_alias ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || - { { echo "$as_me:1094: error: $ac_config_sub $ac_cv_target_alias failed" >&5 + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1099: result: $ac_cv_target" >&5 +echo "$as_me:$LINENO: result: $ac_cv_target" >&5 echo "${ECHO_T}$ac_cv_target" >&6 target=$ac_cv_target target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && @@ -1117,7 +1383,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:1120: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1125,25 +1391,28 @@ if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="${ac_tool_prefix}gcc" -echo "$as_me:1135: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1143: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1146: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1152,7 +1421,7 @@ ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:1155: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1160,25 +1429,28 @@ if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="gcc" -echo "$as_me:1170: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1178: result: $ac_ct_CC" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1181: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1191,7 +1463,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:1194: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1199,25 +1471,28 @@ if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="${ac_tool_prefix}cc" -echo "$as_me:1209: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1217: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1220: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1226,7 +1501,7 @@ ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1229: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1234,25 +1509,28 @@ if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="cc" -echo "$as_me:1244: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1252: result: $ac_ct_CC" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1255: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1265,7 +1543,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1268: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1274,19 +1552,22 @@ ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue -fi -ac_cv_prog_CC="cc" -echo "$as_me:1288: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done if test $ac_prog_rejected = yes; then @@ -1298,7 +1579,7 @@ # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - set dummy "$ac_dir/$ac_word" ${1+"$@"} + set dummy "$as_dir/$ac_word" ${1+"$@"} shift ac_cv_prog_CC="$@" fi @@ -1307,10 +1588,10 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1310: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1313: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1321,7 +1602,7 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:1324: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1329,25 +1610,28 @@ if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -echo "$as_me:1339: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1347: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1350: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1360,7 +1644,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:1363: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1368,25 +1652,28 @@ if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="$ac_prog" -echo "$as_me:1378: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1386: result: $ac_ct_CC" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1389: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1398,34 +1685,41 @@ fi -test -z "$CC" && { { echo "$as_me:1401: error: no acceptable cc found in \$PATH" >&5 -echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:1406:" \ +echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:1409: \"$ac_compiler --version &5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? - echo "$as_me:1412: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1414: \"$ac_compiler -v &5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? - echo "$as_me:1417: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1419: \"$ac_compiler -V &5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? - echo "$as_me:1422: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF -#line 1426 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1439,22 +1733,26 @@ # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:1442: checking for C compiler default output" >&5 +echo "$as_me:$LINENO: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:1445: \"$ac_link_default\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? - echo "$as_me:1448: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. -for ac_file in `ls a.exe conftest.exe 2>/dev/null; + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null; ls a.out conftest 2>/dev/null; ls a.* conftest.* 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;; a.out ) # We found the default executable, but exeext='' is most # certainly right. break;; @@ -1468,34 +1766,34 @@ else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1471: error: C compiler cannot create executables" >&5 +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5 echo "$as_me: error: C compiler cannot create executables" >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext -echo "$as_me:1477: result: $ac_file" >&5 +echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1482: checking whether the C compiler works" >&5 +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:1488: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1491: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:1498: error: cannot run C compiled programs. + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&2;} @@ -1503,24 +1801,24 @@ fi fi fi -echo "$as_me:1506: result: yes" >&5 +echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1513: checking whether we are cross compiling" >&5 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:1515: result: $cross_compiling" >&5 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 -echo "$as_me:1518: checking for executable suffix" >&5 -echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 -if { (eval echo "$as_me:1520: \"$ac_link\"") >&5 +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1523: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -1536,27 +1834,33 @@ esac done else - { { echo "$as_me:1539: error: cannot compute EXEEXT: cannot compile and link" >&5 -echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext -echo "$as_me:1545: result: $ac_cv_exeext" >&5 +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:1551: checking for object suffix" >&5 -echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1557 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1566,10 +1870,10 @@ } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:1569: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1572: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in @@ -1581,26 +1885,32 @@ else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1584: error: cannot compute OBJEXT: cannot compile" >&5 -echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:1591: result: $ac_cv_objext" >&5 +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:1595: checking whether we are using the GNU C compiler" >&5 +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1601 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1613,16 +1923,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1616: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1619: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1622: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1625: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else @@ -1634,21 +1944,27 @@ ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:1637: result: $ac_cv_c_compiler_gnu" >&5 +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" -echo "$as_me:1643: checking whether $CC accepts -g" >&5 +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1649 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1658,16 +1974,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1661: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1664: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1667: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1670: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else @@ -1677,7 +1993,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:1680: result: $ac_cv_prog_cc_g" >&5 +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -1704,16 +2020,16 @@ #endif _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1707: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1710: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1713: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1716: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ @@ -1725,10 +2041,16 @@ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line 1728 "configure" +#line $LINENO "configure" #include "confdefs.h" #include $ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1738,16 +2060,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1741: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1744: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1747: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1750: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -1757,9 +2079,15 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 1760 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1769,16 +2097,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1772: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1775: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1778: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1781: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -1805,34 +2133,119 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:1808: checking for POSIXized ISC" >&5 -echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6 -if test -d /etc/conf/kconfig.d && - grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 -then - echo "$as_me:1813: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - ISC=yes # If later tests want to check for ISC. -cat >>confdefs.h <<\EOF -#define _POSIX_SOURCE 1 -EOF +echo "$as_me:$LINENO: checking for library containing strerror" >&5 +echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 +if test "${ac_cv_search_strerror+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_strerror=no +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" - if test "$GCC" = yes; then - CC="$CC -posix" - else - CC="$CC -Xp" - fi +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strerror (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +strerror (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_strerror="none required" else - echo "$as_me:1827: result: no" >&5 -echo "${ECHO_T}no" >&6 - ISC= + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_strerror" = no; then + for ac_lib in cposix; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strerror (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +strerror (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_strerror="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 +echo "${ECHO_T}$ac_cv_search_strerror" >&6 +if test "$ac_cv_search_strerror" != no; then + test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" + +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:1835: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1840,25 +2253,28 @@ if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" -echo "$as_me:1850: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:1858: result: $RANLIB" >&5 + echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else - echo "$as_me:1861: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1867,7 +2283,7 @@ ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:1870: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1875,15 +2291,18 @@ if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_RANLIB="ranlib" -echo "$as_me:1885: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" @@ -1891,10 +2310,10 @@ fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:1894: result: $ac_ct_RANLIB" >&5 + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else - echo "$as_me:1897: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1907,7 +2326,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:1910: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_YACC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1915,25 +2334,28 @@ if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_YACC="$ac_prog" -echo "$as_me:1925: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_YACC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then - echo "$as_me:1933: result: $YACC" >&5 + echo "$as_me:$LINENO: result: $YACC" >&5 echo "${ECHO_T}$YACC" >&6 else - echo "$as_me:1936: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1953,43 +2375,48 @@ # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:1956: checking for a BSD compatible install" >&5 -echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_IFS=$IFS; IFS=$ac_path_separator - for ac_dir in $PATH; do - IFS=$ac_save_IFS - # Account for people who put trailing slashes in PATH elements. - case $ac_dir/ in - / | ./ | .// | /cC/* \ - | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \ - | /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if $as_executable_p "$ac_dir/$ac_prog"; then - if test $ac_prog = install && - grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi done - ;; - esac - done + done + ;; +esac +done + fi if test "${ac_cv_path_install+set}" = set; then @@ -2002,7 +2429,7 @@ INSTALL=$ac_install_sh fi fi -echo "$as_me:2005: result: $INSTALL" >&5 +echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -2017,7 +2444,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:2020: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2025,25 +2452,28 @@ if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_AR="$ac_prog" -echo "$as_me:2035: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:2043: result: $AR" >&5 + echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else - echo "$as_me:2046: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2052,7 +2482,7 @@ test -n "$AR" || AR="NO" if test $AR = NO; then - { { echo "$as_me:2055: error: Can\'t find ar or gar." >&5 + { { echo "$as_me:$LINENO: error: Can\'t find ar or gar." >&5 echo "$as_me: error: Can\'t find ar or gar." >&2;} { (exit 1); exit 1; }; } fi @@ -2062,7 +2492,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:2065: checking how to run the C preprocessor" >&5 +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then @@ -2083,18 +2513,18 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF -#line 2086 "configure" +#line $LINENO "configure" #include "confdefs.h" #include Syntax error _ACEOF -if { (eval echo "$as_me:2091: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2097: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2117,17 +2547,17 @@ # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 2120 "configure" +#line $LINENO "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:2124: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2130: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2164,7 +2594,7 @@ else ac_cv_prog_CPP=$CPP fi -echo "$as_me:2167: result: $CPP" >&5 +echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -2174,18 +2604,18 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF -#line 2177 "configure" +#line $LINENO "configure" #include "confdefs.h" #include Syntax error _ACEOF -if { (eval echo "$as_me:2182: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2188: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2208,17 +2638,17 @@ # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 2211 "configure" +#line $LINENO "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:2215: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2221: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2246,7 +2676,7 @@ if $ac_preproc_ok; then : else - { { echo "$as_me:2249: error: C preprocessor \"$CPP\" fails sanity check" >&5 + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi @@ -2257,13 +2687,14 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:2260: checking for ANSI C header files" >&5 + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2266 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #include @@ -2271,13 +2702,13 @@ #include _ACEOF -if { (eval echo "$as_me:2274: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2280: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2299,7 +2730,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF -#line 2302 "configure" +#line $LINENO "configure" #include "confdefs.h" #include @@ -2317,7 +2748,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF -#line 2320 "configure" +#line $LINENO "configure" #include "confdefs.h" #include @@ -2338,7 +2769,7 @@ : else cat >conftest.$ac_ext <<_ACEOF -#line 2341 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #if ((' ' & 0x0FF) == 0x020) @@ -2364,49 +2795,56 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:2367: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2370: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:2372: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2375: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi -echo "$as_me:2388: result: $ac_cv_header_stdc" >&5 +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 -EOF +_ACEOF fi -echo "$as_me:2398: checking whether time.h and sys/time.h may both be included" >&5 +echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2404 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #include #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2417,16 +2855,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2420: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2423: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2426: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2429: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_time=yes else @@ -2436,34 +2874,188 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:2439: result: $ac_cv_header_time" >&5 +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 -EOF +_ACEOF fi -cat >>confdefs.h <<\EOF +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#ifndef __cplusplus +static $ac_kw int static_foo () {return 0; } +$ac_kw int foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 +case $ac_cv_c_inline in + inline | yes) ;; + no) +cat >>confdefs.h <<\_ACEOF +#define inline +_ACEOF + ;; + *) cat >>confdefs.h <<_ACEOF +#define inline $ac_cv_c_inline +_ACEOF + ;; +esac + + +cat >>confdefs.h <<\_ACEOF #define AUTOCONF 1 -EOF +_ACEOF + -echo "$as_me:2453: checking if we can do hard links" >&5 +echo "$as_me:$LINENO: checking if we can do hard links" >&5 echo $ECHO_N "checking if we can do hard links... $ECHO_C" >&6 ln configure src/link.tst 2>&5 if test -x src/link.tst; then CPLN="ln" rm -f src/link.tst - echo "$as_me:2459: result: yes - using ln" >&5 + echo "$as_me:$LINENO: result: yes - using ln" >&5 echo "${ECHO_T}yes - using ln" >&6 else CPLN="cp" - echo "$as_me:2463: result: no - using cp" >&5 + echo "$as_me:$LINENO: result: no - using cp" >&5 echo "${ECHO_T}no - using cp" >&6 fi + + + # Check whether --with-etc-dir or --without-etc-dir was given. if test "${with_etc_dir+set}" = set; then withval="$with_etc_dir" @@ -2472,6 +3064,8 @@ ETCDIR=/etc fi; + + # Check whether --with-pid-dir or --without-pid-dir was given. if test "${with_pid_dir+set}" = set; then withval="$with_pid_dir" @@ -2480,6 +3074,8 @@ PIDDIR=/var/run fi; + + # Check whether --with-log-dir or --without-log-dir was given. if test "${with_log_dir+set}" = set; then withval="$with_log_dir" @@ -2488,6 +3084,7 @@ LOGDIR=/var/log fi; + # Check whether --enable-upload or --disable-upload was given. if test "${enable_upload+set}" = set; then enableval="$enable_upload" @@ -2596,7 +3193,7 @@ then if test $opie = "yes" -o $skey = "y" then - { { echo "$as_me:2599: error: *** YOU SHOULD NOT HAVE BOTH SKEY AND OPIE DEFINED!!!!!" >&5 + { { echo "$as_me:$LINENO: error: *** YOU SHOULD NOT HAVE BOTH SKEY AND OPIE DEFINED!!!!!" >&5 echo "$as_me: error: *** YOU SHOULD NOT HAVE BOTH SKEY AND OPIE DEFINED!!!!!" >&2;} { (exit 1); exit 1; }; } fi @@ -2817,6 +3414,92 @@ LIBS="" +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + for ac_header in dirent.h regex.h shadow.h security/pam_appl.h opie.h skey.h \ syslog.h sys/syslog.h fcntl.h mntent.h stdlib.h unistd.h glob.h grp.h \ ndir.h sys/dir.h sys/ndir.h string.h vmsdir.h sys/systeminfo.h \ @@ -2824,23 +3507,61 @@ sys/mnttab.h paths.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:2827: checking for $ac_header" >&5 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line 2833 "configure" + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:2837: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2843: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -2851,23 +3572,84 @@ ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - eval "$as_ac_Header=yes" + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - eval "$as_ac_Header=no" + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -echo "$as_me:2862: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -EOF +_ACEOF + +fi + +done + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -fi -done for ac_func in dirfd fchdir flock ftw getcwd getdtablesize pstat lstat \ vprintf snprintf regexec regex fgetspent usercmp getusershell setuid vsnprintf \ @@ -2876,13 +3658,13 @@ strtoul do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:2879: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2885 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -2896,6 +3678,12 @@ char $ac_func (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2913,16 +3701,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2916: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2919: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2922: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2925: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -2932,26 +3720,29 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:2935: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF fi done + + + for ac_func in seteuid setreuid setresuid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:2948: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2954 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -2965,6 +3756,12 @@ char $ac_func (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2982,16 +3779,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2985: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2988: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2991: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2994: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -3001,26 +3798,29 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:3004: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF break fi done + + + for ac_func in setegid setregid setresgid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:3017: checking for $ac_func" >&5 +echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3023 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -3034,6 +3834,12 @@ char $ac_func (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3051,16 +3857,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3054: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3057: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3060: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3063: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -3070,17 +3876,18 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:3073: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF break fi done -echo "$as_me:3083: checking for crypt in -lcrypt" >&5 + +echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6 if test "${ac_cv_lib_crypt_crypt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3088,7 +3895,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypt $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 3091 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -3098,6 +3905,12 @@ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char crypt (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3107,16 +3920,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3110: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3113: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3116: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3119: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_crypt_crypt=yes else @@ -3127,7 +3940,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:3130: result: $ac_cv_lib_crypt_crypt" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6 if test $ac_cv_lib_crypt_crypt = yes; then result=yes @@ -3139,7 +3952,7 @@ LIBS="$LIBS -lcrypt" fi USENSL=no -echo "$as_me:3142: checking for socket in -lsocket" >&5 +echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3147,7 +3960,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 3150 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -3157,6 +3970,12 @@ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char socket (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3166,16 +3985,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3169: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3172: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3175: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3178: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_socket=yes else @@ -3186,7 +4005,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:3189: result: $ac_cv_lib_socket_socket" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 if test $ac_cv_lib_socket_socket = yes; then result=yes @@ -3197,7 +4016,7 @@ if test $result = yes; then LIBS="$LIBS -lsocket" else - echo "$as_me:3200: checking for socket in -lsocket" >&5 + echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3205,7 +4024,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket -lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 3208 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -3215,6 +4034,12 @@ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char socket (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3224,16 +4049,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3227: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3230: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3233: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3236: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_socket=yes else @@ -3244,7 +4069,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:3247: result: $ac_cv_lib_socket_socket" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 if test $ac_cv_lib_socket_socket = yes; then result=yes @@ -3256,7 +4081,7 @@ LIBS = "$LIBS -lsocket -lnsl" USENSL=yes else - echo "$as_me:3259: checking for connect in -lsocket" >&5 + echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3264,7 +4089,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 3267 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -3274,6 +4099,12 @@ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3283,16 +4114,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3286: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3289: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3292: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3295: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_connect=yes else @@ -3303,7 +4134,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:3306: result: $ac_cv_lib_socket_connect" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 if test $ac_cv_lib_socket_connect = yes; then result=yes @@ -3314,7 +4145,7 @@ if test $result = yes; then LIBS="$LIBS -lsocket" else - echo "$as_me:3317: checking for connect in -lsocket" >&5 + echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3322,7 +4153,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket -lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 3325 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -3332,6 +4163,12 @@ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3341,16 +4178,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3344: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3347: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3350: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3353: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_connect=yes else @@ -3361,7 +4198,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:3364: result: $ac_cv_lib_socket_connect" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 if test $ac_cv_lib_socket_connect = yes; then result=yes @@ -3377,7 +4214,7 @@ fi fi if test $USENSL != yes; then - echo "$as_me:3380: checking for inet_addr in -lnsl" >&5 + echo "$as_me:$LINENO: checking for inet_addr in -lnsl" >&5 echo $ECHO_N "checking for inet_addr in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_inet_addr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3385,7 +4222,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 3388 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -3395,6 +4232,12 @@ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char inet_addr (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3404,16 +4247,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3407: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3410: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3413: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3416: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_inet_addr=yes else @@ -3424,7 +4267,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:3427: result: $ac_cv_lib_nsl_inet_addr" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_inet_addr" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_inet_addr" >&6 if test $ac_cv_lib_nsl_inet_addr = yes; then result=yes @@ -3437,13 +4280,19 @@ fi fi -echo "$as_me:3440: checking for sys_siglist" >&5 +echo "$as_me:$LINENO: checking for sys_siglist" >&5 echo $ECHO_N "checking for sys_siglist... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 3443 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3453,16 +4302,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3456: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3459: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3462: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3465: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=yes else @@ -3471,22 +4320,28 @@ result=no fi rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:3474: result: $result" >&5 +echo "$as_me:$LINENO: result: $result" >&5 echo "${ECHO_T}$result" >&6 if test "$result" = "yes"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SIGLIST 1 -EOF +_ACEOF fi -echo "$as_me:3483: checking type of qsort" >&5 +echo "$as_me:$LINENO: checking type of qsort" >&5 echo $ECHO_N "checking type of qsort... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 3486 "configure" +#line $LINENO "configure" #include "confdefs.h" #include extern void qsort(); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3496,16 +4351,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3499: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3502: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3505: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3508: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=void else @@ -3514,22 +4369,28 @@ result=int fi rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:3517: result: $result" >&5 +echo "$as_me:$LINENO: result: $result" >&5 echo "${ECHO_T}$result" >&6 if test "$result" = "void"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define QSORT_IS_VOID 1 -EOF +_ACEOF fi -echo "$as_me:3526: checking how to determine bytesize" >&5 +echo "$as_me:$LINENO: checking how to determine bytesize" >&5 echo $ECHO_N "checking how to determine bytesize... $ECHO_C" >&6 if test "$ac_cv_header_bsd_bsd_h" = "yes"; then cat >conftest.$ac_ext <<_ACEOF -#line 3530 "configure" +#line $LINENO "configure" #include "confdefs.h" #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3539,16 +4400,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3542: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3545: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3548: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3551: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then NBBY=NBBY else @@ -3559,9 +4420,15 @@ rm -f conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF -#line 3562 "configure" +#line $LINENO "configure" #include "confdefs.h" #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3571,16 +4438,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3574: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3577: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3580: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3583: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then NBBY=NBBY else @@ -3592,9 +4459,15 @@ fi if test "$NBBY" = "8"; then cat >conftest.$ac_ext <<_ACEOF -#line 3595 "configure" +#line $LINENO "configure" #include "confdefs.h" #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3604,16 +4477,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3607: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3610: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3613: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3616: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then NBBY=BITSPERBYTE else @@ -3624,9 +4497,15 @@ rm -f conftest.$ac_objext conftest.$ac_ext if test "$NBBY" = "8"; then cat >conftest.$ac_ext <<_ACEOF -#line 3627 "configure" +#line $LINENO "configure" #include "confdefs.h" #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3636,16 +4515,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3639: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3642: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3645: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3648: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then NBBY=CHAR_BIT else @@ -3655,15 +4534,21 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext if test "$NBBY" != "8"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NEED_LIMITS_H 1 -EOF +_ACEOF else cat >conftest.$ac_ext <<_ACEOF -#line 3664 "configure" +#line $LINENO "configure" #include "confdefs.h" #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3673,16 +4558,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3676: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3679: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3682: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3685: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then NBBY=NBBY else @@ -3693,42 +4578,42 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi else - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NEED_VALUES_H 1 -EOF +_ACEOF fi else if test "$ac_cv_header_bsd_bsd_h" = "yes"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NEED_BSD_BSD_H 1 -EOF +_ACEOF else - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NEED_SYS_PARAM_H 1 -EOF +_ACEOF fi fi if test "$NBBY" = "8"; then - echo "$as_me:3715: result: can't be determined - assuming 8" >&5 + echo "$as_me:$LINENO: result: can't be determined - assuming 8" >&5 echo "${ECHO_T}can't be determined - assuming 8" >&6 else - echo "$as_me:3718: result: $NBBY" >&5 + echo "$as_me:$LINENO: result: $NBBY" >&5 echo "${ECHO_T}$NBBY" >&6 fi if test "$NBBY" != "NBBY"; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define NBBY $NBBY -EOF +_ACEOF fi -echo "$as_me:3728: checking if openlog requires 3 arguments" >&5 +echo "$as_me:$LINENO: checking if openlog requires 3 arguments" >&5 echo $ECHO_N "checking if openlog requires 3 arguments... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 3731 "configure" +#line $LINENO "configure" #include "confdefs.h" #ifdef HAVE_SYSLOG_H #include @@ -3736,6 +4621,12 @@ #ifdef HAVE_SYS_SYSLOG_H #include #endif +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3745,16 +4636,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3748: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3751: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3754: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3757: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=yes else @@ -3763,13 +4654,13 @@ result=no fi rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:3766: result: $result" >&5 +echo "$as_me:$LINENO: result: $result" >&5 echo "${ECHO_T}$result" >&6 if test "$result" = "yes"; then - echo "$as_me:3769: checking which facility openlog understands" >&5 + echo "$as_me:$LINENO: checking which facility openlog understands" >&5 echo $ECHO_N "checking which facility openlog understands... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 3772 "configure" +#line $LINENO "configure" #include "confdefs.h" #ifdef HAVE_SYSLOG_H #include @@ -3777,6 +4668,12 @@ #ifdef HAVE_SYS_SYSLOG_H #include #endif +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3786,16 +4683,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3789: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3792: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3795: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3798: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=yes else @@ -3808,7 +4705,7 @@ FACILITY="LOG_FTP" else cat >conftest.$ac_ext <<_ACEOF -#line 3811 "configure" +#line $LINENO "configure" #include "confdefs.h" #ifdef HAVE_SYSLOG_H #include @@ -3816,6 +4713,12 @@ #ifdef HAVE_SYS_SYSLOG_H #include #endif +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3825,16 +4728,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3828: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3831: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3834: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3837: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=yes else @@ -3847,7 +4750,7 @@ FACILITY="LOG_DAEMON" else cat >conftest.$ac_ext <<_ACEOF -#line 3850 "configure" +#line $LINENO "configure" #include "confdefs.h" #ifdef HAVE_SYSLOG_H #include @@ -3855,6 +4758,12 @@ #ifdef HAVE_SYS_SYSLOG_H #include #endif +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3864,16 +4773,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3867: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3870: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3873: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3876: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=yes else @@ -3887,18 +4796,18 @@ fi fi fi - echo "$as_me:3890: result: $FACILITY" >&5 + echo "$as_me:$LINENO: result: $FACILITY" >&5 echo "${ECHO_T}$FACILITY" >&6 - cat >>confdefs.h <>confdefs.h <<_ACEOF #define FACILITY $FACILITY -EOF +_ACEOF fi -echo "$as_me:3898: checking type of getmntent function" >&5 +echo "$as_me:$LINENO: checking type of getmntent function" >&5 echo $ECHO_N "checking type of getmntent function... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 3901 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #include @@ -3912,6 +4821,12 @@ #include #endif #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3921,16 +4836,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3924: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3927: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3930: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3933: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=new-style else @@ -3939,19 +4854,19 @@ result=old-style fi rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:3942: result: $result" >&5 +echo "$as_me:$LINENO: result: $result" >&5 echo "${ECHO_T}$result" >&6 if test "$result" = "old-style"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAS_OLDSTYLE_GETMNTENT 1 -EOF +_ACEOF fi -echo "$as_me:3951: checking if there is a ut_host field in the utmp structure" >&5 +echo "$as_me:$LINENO: checking if there is a ut_host field in the utmp structure" >&5 echo $ECHO_N "checking if there is a ut_host field in the utmp structure... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 3954 "configure" +#line $LINENO "configure" #include "confdefs.h" #ifdef TIME_WITH_SYS_TIME @@ -3965,6 +4880,12 @@ #endif #endif #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3974,16 +4895,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:3977: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:3980: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:3983: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3986: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=yes else @@ -3993,18 +4914,18 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext if test "$result" = "yes"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UT_UT_HOST 1 -EOF +_ACEOF fi -echo "$as_me:4001: result: $result" >&5 +echo "$as_me:$LINENO: result: $result" >&5 echo "${ECHO_T}$result" >&6 -echo "$as_me:4004: checking if there is a ut_exit.e_termination field in the utmp structure" >&5 +echo "$as_me:$LINENO: checking if there is a ut_exit.e_termination field in the utmp structure" >&5 echo $ECHO_N "checking if there is a ut_exit.e_termination field in the utmp structure... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 4007 "configure" +#line $LINENO "configure" #include "confdefs.h" #ifdef TIME_WITH_SYS_TIME #include @@ -4017,6 +4938,12 @@ #endif #endif #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4026,16 +4953,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4029: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4032: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4035: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4038: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=yes else @@ -4045,20 +4972,26 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext if test "$result" = "yes"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UT_UT_EXIT_E_TERMINATION 1 -EOF +_ACEOF fi -echo "$as_me:4053: result: $result" >&5 +echo "$as_me:$LINENO: result: $result" >&5 echo "${ECHO_T}$result" >&6 -echo "$as_me:4056: checking if there is a pw_expire field in the pw structure" >&5 +echo "$as_me:$LINENO: checking if there is a pw_expire field in the pw structure" >&5 echo $ECHO_N "checking if there is a pw_expire field in the pw structure... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 4059 "configure" +#line $LINENO "configure" #include "confdefs.h" #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4068,16 +5001,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4071: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4074: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4077: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4080: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=yes else @@ -4087,20 +5020,26 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext if test "$result" = "yes"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAS_PW_EXPIRE 1 -EOF +_ACEOF fi -echo "$as_me:4095: result: $result" >&5 +echo "$as_me:$LINENO: result: $result" >&5 echo "${ECHO_T}$result" >&6 -echo "$as_me:4098: checking if there is a st_blksize field in the stat structure" >&5 +echo "$as_me:$LINENO: checking if there is a st_blksize field in the stat structure" >&5 echo $ECHO_N "checking if there is a st_blksize field in the stat structure... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 4101 "configure" +#line $LINENO "configure" #include "confdefs.h" #include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4110,16 +5049,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4113: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4116: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4119: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4122: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=yes else @@ -4129,21 +5068,21 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext if test "$result" = "yes"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_ST_BLKSIZE 1 -EOF +_ACEOF fi -echo "$as_me:4137: result: $result" >&5 +echo "$as_me:$LINENO: result: $result" >&5 echo "${ECHO_T}$result" >&6 -echo "$as_me:4140: checking for res_query" >&5 +echo "$as_me:$LINENO: checking for res_query" >&5 echo $ECHO_N "checking for res_query... $ECHO_C" >&6 if test "${ac_cv_func_res_query+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 4146 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char res_query (); below. */ @@ -4157,6 +5096,12 @@ char res_query (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4174,16 +5119,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4177: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4180: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4183: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4186: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_res_query=yes else @@ -4193,7 +5138,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:4196: result: $ac_cv_func_res_query" >&5 +echo "$as_me:$LINENO: result: $ac_cv_func_res_query" >&5 echo "${ECHO_T}$ac_cv_func_res_query" >&6 if test $ac_cv_func_res_query = yes; then result=yes @@ -4202,12 +5147,12 @@ fi if test "$result" = "yes"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_LIBRESOLV 1 -EOF +_ACEOF else - echo "$as_me:4210: checking for res_query in -lbind" >&5 + echo "$as_me:$LINENO: checking for res_query in -lbind" >&5 echo $ECHO_N "checking for res_query in -lbind... $ECHO_C" >&6 if test "${ac_cv_lib_bind_res_query+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4215,7 +5160,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lbind $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 4218 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -4225,6 +5170,12 @@ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char res_query (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4234,16 +5185,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4237: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4240: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4243: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4246: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_bind_res_query=yes else @@ -4254,7 +5205,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:4257: result: $ac_cv_lib_bind_res_query" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_bind_res_query" >&5 echo "${ECHO_T}$ac_cv_lib_bind_res_query" >&6 if test $ac_cv_lib_bind_res_query = yes; then result=yes @@ -4263,13 +5214,13 @@ fi if test "$result" = "yes"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_LIBRESOLV 1 -EOF +_ACEOF LIBS="$LIBS -lbind" else - echo "$as_me:4272: checking for res_query in -lresolv" >&5 + echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5 echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6 if test "${ac_cv_lib_resolv_res_query+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -4277,7 +5228,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 4280 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -4287,6 +5238,12 @@ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char res_query (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4296,16 +5253,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4299: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4302: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4305: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4308: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_resolv_res_query=yes else @@ -4316,7 +5273,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:4319: result: $ac_cv_lib_resolv_res_query" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_query" >&5 echo "${ECHO_T}$ac_cv_lib_resolv_res_query" >&6 if test $ac_cv_lib_resolv_res_query = yes; then result=yes @@ -4325,22 +5282,22 @@ fi if test "$result" = "yes"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_LIBRESOLV 1 -EOF +_ACEOF LIBS="$LIBS -lresolv" fi fi fi -echo "$as_me:4337: checking how to printf gr_gid" >&5 +echo "$as_me:$LINENO: checking how to printf gr_gid" >&5 echo $ECHO_N "checking how to printf gr_gid... $ECHO_C" >&6 if test "$cross_compiling" = yes; then result="no" else cat >conftest.$ac_ext <<_ACEOF -#line 4343 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #include @@ -4352,27 +5309,28 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4355: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4358: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4360: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4363: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="u" -cat >>confdefs.h <>confdefs.h <<_ACEOF #define GR_GID_FORMAT "$result" -EOF +_ACEOF -echo "$as_me:4370: result: gr_gid is just a long - using %u" >&5 +echo "$as_me:$LINENO: result: gr_gid is just a long - using %u" >&5 echo "${ECHO_T}gr_gid is just a long - using %u" >&6 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="no" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -4382,7 +5340,7 @@ result="no" else cat >conftest.$ac_ext <<_ACEOF -#line 4385 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int main(int argc, char **argv) { @@ -4392,21 +5350,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4395: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4398: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4400: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4403: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="qd" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="no" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -4416,7 +5375,7 @@ result="no" else cat >conftest.$ac_ext <<_ACEOF -#line 4419 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int main(int argc, char **argv) { @@ -4426,21 +5385,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4429: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4432: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4434: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4437: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="Ld" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="no" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -4450,7 +5410,7 @@ result="no" else cat >conftest.$ac_ext <<_ACEOF -#line 4453 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int main(int argc, char **argv) { @@ -4460,21 +5420,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4463: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4466: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4468: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4471: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="lld" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="no" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -4484,7 +5445,7 @@ result="d" else cat >conftest.$ac_ext <<_ACEOF -#line 4487 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int main(int argc, char **argv) { @@ -4494,21 +5455,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4497: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4500: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4502: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4505: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="ld" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="d" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -4516,21 +5478,21 @@ fi fi fi - cat >>confdefs.h <>confdefs.h <<_ACEOF #define GR_GID_FORMAT "$result" -EOF +_ACEOF - echo "$as_me:4523: result: %$result" >&5 + echo "$as_me:$LINENO: result: %$result" >&5 echo "${ECHO_T}%$result" >&6 fi -echo "$as_me:4527: checking how to printf pw_uid" >&5 +echo "$as_me:$LINENO: checking how to printf pw_uid" >&5 echo $ECHO_N "checking how to printf pw_uid... $ECHO_C" >&6 if test "$cross_compiling" = yes; then result="no" else cat >conftest.$ac_ext <<_ACEOF -#line 4533 "configure" +#line $LINENO "configure" #include "confdefs.h" #include #include @@ -4542,27 +5504,28 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4545: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4548: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4550: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4553: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="u" -cat >>confdefs.h <>confdefs.h <<_ACEOF #define PW_UID_FORMAT "$result" -EOF +_ACEOF -echo "$as_me:4560: result: uid_t is just a long - using %u" >&5 +echo "$as_me:$LINENO: result: uid_t is just a long - using %u" >&5 echo "${ECHO_T}uid_t is just a long - using %u" >&6 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="no" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -4572,7 +5535,7 @@ result="no" else cat >conftest.$ac_ext <<_ACEOF -#line 4575 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int main(int argc, char **argv) { @@ -4582,21 +5545,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4585: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4588: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4590: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4593: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="qd" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="no" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -4606,7 +5570,7 @@ result="no" else cat >conftest.$ac_ext <<_ACEOF -#line 4609 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int main(int argc, char **argv) { @@ -4616,21 +5580,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4619: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4622: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4624: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4627: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="Ld" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="no" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -4640,7 +5605,7 @@ result="no" else cat >conftest.$ac_ext <<_ACEOF -#line 4643 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int main(int argc, char **argv) { @@ -4650,21 +5615,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4653: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4656: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4658: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4661: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="lld" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="no" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -4674,7 +5640,7 @@ result="d" else cat >conftest.$ac_ext <<_ACEOF -#line 4677 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int main(int argc, char **argv) { @@ -4684,21 +5650,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4687: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4690: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4692: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4695: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="ld" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="d" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -4706,21 +5673,21 @@ fi fi fi - cat >>confdefs.h <>confdefs.h <<_ACEOF #define PW_UID_FORMAT "$result" -EOF +_ACEOF - echo "$as_me:4713: result: %$result" >&5 + echo "$as_me:$LINENO: result: %$result" >&5 echo "${ECHO_T}%$result" >&6 fi -echo "$as_me:4717: checking how to printf an off_t" >&5 +echo "$as_me:$LINENO: checking how to printf an off_t" >&5 echo $ECHO_N "checking how to printf an off_t... $ECHO_C" >&6 if test "$cross_compiling" = yes; then result="no" else cat >conftest.$ac_ext <<_ACEOF -#line 4723 "configure" +#line $LINENO "configure" #include "confdefs.h" #ifdef HAVE_STDLIB_H #include @@ -4736,27 +5703,28 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4739: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4742: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4744: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4747: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="u" -cat >>confdefs.h <>confdefs.h <<_ACEOF #define L_FORMAT "$result" -EOF +_ACEOF -echo "$as_me:4754: result: off_t is just a long - using %u" >&5 +echo "$as_me:$LINENO: result: off_t is just a long - using %u" >&5 echo "${ECHO_T}off_t is just a long - using %u" >&6 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="no" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -4766,7 +5734,7 @@ result="no" else cat >conftest.$ac_ext <<_ACEOF -#line 4769 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int main(int argc, char **argv) { @@ -4777,21 +5745,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4780: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4783: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4785: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4788: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="qd" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="no" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -4801,7 +5770,7 @@ result="no" else cat >conftest.$ac_ext <<_ACEOF -#line 4804 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int main(int argc, char **argv) { @@ -4812,21 +5781,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4815: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4818: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4820: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4823: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="Ld" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="no" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -4836,7 +5806,7 @@ result="no" else cat >conftest.$ac_ext <<_ACEOF -#line 4839 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int main(int argc, char **argv) { @@ -4847,21 +5817,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4850: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4853: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4855: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4858: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="lld" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="no" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -4871,7 +5842,7 @@ result="d" else cat >conftest.$ac_ext <<_ACEOF -#line 4874 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int main(int argc, char **argv) { @@ -4882,21 +5853,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4885: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4888: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4890: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4893: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="ld" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="d" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -4904,20 +5876,20 @@ fi fi fi - cat >>confdefs.h <>confdefs.h <<_ACEOF #define L_FORMAT "$result" -EOF +_ACEOF - echo "$as_me:4911: result: using %$result" >&5 + echo "$as_me:$LINENO: result: using %$result" >&5 echo "${ECHO_T}using %$result" >&6 fi -echo "$as_me:4914: checking how to printf a time_t" >&5 +echo "$as_me:$LINENO: checking how to printf a time_t" >&5 echo $ECHO_N "checking how to printf a time_t... $ECHO_C" >&6 if test "$cross_compiling" = yes; then result="no" else cat >conftest.$ac_ext <<_ACEOF -#line 4920 "configure" +#line $LINENO "configure" #include "confdefs.h" #ifdef HAVE_STDLIB_H #include @@ -4942,27 +5914,28 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4945: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4948: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4950: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4953: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="u" -cat >>confdefs.h <>confdefs.h <<_ACEOF #define T_FORMAT "$result" -EOF +_ACEOF -echo "$as_me:4960: result: time_t is just a long - using %u" >&5 +echo "$as_me:$LINENO: result: time_t is just a long - using %u" >&5 echo "${ECHO_T}time_t is just a long - using %u" >&6 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="no" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -4972,7 +5945,7 @@ result="no" else cat >conftest.$ac_ext <<_ACEOF -#line 4975 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int main(int argc, char **argv) { @@ -4982,21 +5955,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4985: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4988: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4990: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4993: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="qd" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="no" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -5006,7 +5980,7 @@ result="no" else cat >conftest.$ac_ext <<_ACEOF -#line 5009 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int main(int argc, char **argv) { @@ -5016,21 +5990,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:5019: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5022: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:5024: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5027: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="Ld" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="no" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -5040,7 +6015,7 @@ result="no" else cat >conftest.$ac_ext <<_ACEOF -#line 5043 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int main(int argc, char **argv) { @@ -5050,21 +6025,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:5053: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5056: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:5058: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5061: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="lld" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="no" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -5074,7 +6050,7 @@ result="d" else cat >conftest.$ac_ext <<_ACEOF -#line 5077 "configure" +#line $LINENO "configure" #include "confdefs.h" #include int main(int argc, char **argv) { @@ -5084,21 +6060,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:5087: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5090: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:5092: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5095: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result="ld" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) result="d" fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -5106,14 +6083,15 @@ fi fi fi - cat >>confdefs.h <>confdefs.h <<_ACEOF #define T_FORMAT "$result" -EOF +_ACEOF - echo "$as_me:5113: result: %$result" >&5 + echo "$as_me:$LINENO: result: %$result" >&5 echo "${ECHO_T}%$result" >&6 fi + if test $ac_cv_func_usercmp != yes; then AUTHUSER=authuser.o fi @@ -5126,9 +6104,9 @@ if test $ac_cv_func_setuid != yes; then SCO=sco.o else - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SETUID 1 -EOF +_ACEOF fi if test $ac_cv_func_snprintf != yes; then @@ -5162,87 +6140,511 @@ STRNCASECMP=strncasecmp.o fi + + + + + + + + + + + + + + +echo "$as_me:$LINENO: checking whether to enable ipv6" >&5 +echo $ECHO_N "checking whether to enable ipv6... $ECHO_C" >&6 +# Check whether --enable-ipv6 or --disable-ipv6 was given. +if test "${enable_ipv6+set}" = set; then + enableval="$enable_ipv6" + case "$enableval" in + no) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ipv6=no + ;; + *) echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF +#define ENABLE_IPV6 1 +_ACEOF + + ipv6=yes + ;; + esac +else + if test "$cross_compiling" = yes; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ipv6=no + +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + /* AF_INET6 avalable check */ +#include +#include +main() +{ + if (socket(AF_INET6, SOCK_STREAM, 0) < 0) + exit(1); + else + exit(0); +} + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF +#define ENABLE_IPV6 1 +_ACEOF + + ipv6=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ipv6=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi; + +ipv6type=unknown +ipv6lib=none + +if test "$ipv6" = "yes"; then + echo "$as_me:$LINENO: checking IPv6 stack type" >&5 +echo $ECHO_N "checking IPv6 stack type... $ECHO_C" >&6 + for i in inria kame linux-glibc linux-inet6 toshiba v6d zeta; do + case $i in + inria) + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +dnl +#include +#ifdef IPV6_INRIA_VERSION +%%%yes%%% +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "%%%yes%%%" >/dev/null 2>&1; then + ipv6type=$i; + CFLAGS="-DINET6 $CPPFLAGS" +fi +rm -f conftest* + + ;; + kame) + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +dnl +#include +#ifdef __KAME__ +%%%yes%%% +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "%%%yes%%%" >/dev/null 2>&1; then + ipv6type=$i; + ipv6lib=inet6; + ipv6libdir=/usr/local/v6/lib; + CFLAGS="-DINET6 $CPPFLAGS" +fi +rm -f conftest* + + ;; + linux-glibc) + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +dnl +#include +#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 +%%%yes%%% +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "%%%yes%%%" >/dev/null 2>&1; then + ipv6type=$i; + default_enable_ipv4in6=yes + CFLAGS="-DINET6 -DLINUX $CFLAGS" +fi +rm -f conftest* + + ;; + linux-inet6) + if test -d /usr/inet6; then + ipv6type=$i + ipv6lib=inet6 + ipv6libdir=/usr/inet6/lib + default_enable_ipv4in6=yes + CFLAGS="-DINET6 -DLINUX -I/usr/inet6/include $CFLAGS" + fi + ;; + toshiba) + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +dnl +#include +#ifdef _TOSHIBA_INET6 +%%%yes%%% +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "%%%yes%%%" >/dev/null 2>&1; then + ipv6type=$i; + ipv6lib=inet6; + ipv6libdir=/usr/local/v6/lib; + CFLAGS="-DINET6 $CFLAGS" +fi +rm -f conftest* + + ;; + v6d) + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +dnl +#include +#ifdef __V6D__ +%%%yes%%% +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "%%%yes%%%" >/dev/null 2>&1; then + ipv6type=$i; + ipv6lib=v6; + ipv6libdir=/usr/local/v6/lib; + CFLAGS="-I/usr/local/v6/include $CFLAGS" +fi +rm -f conftest* + + ;; + zeta) + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +dnl +#include +#ifdef _ZETA_MINAMI_INET6 +yes +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "%%%yes%%%" >/dev/null 2>&1; then + ipv6type=$i; + ipv6lib=inet6; + ipv6libdir=/usr/local/v6/lib; + CFLAGS="-DINET6 $CFLAGS" +fi +rm -f conftest* + + ;; + esac + if test "$ipv6type" != "unknown"; then + break + fi + done + if test "$ipv6type" = "unknown"; then + case "$host" in + *-dec-osf*) + ipv6type=tru64 + CC="cc" + CFLAGS="-DINET6 $CFLAGS" + ;; + *) + CFLAGS="-DINET6 $CFLAGS" + ;; + esac + fi + echo "$as_me:$LINENO: result: $ipv6type" >&5 +echo "${ECHO_T}$ipv6type" >&6 +fi + +if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then + if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then + echo "You have $ipv6lib library, using it" + LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" + else + echo "You do not have $ipv6lib library, trying libc" + fi +fi + + +for ac_func in getaddrinfo +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +echo "$as_me:$LINENO: checking whether struct sockaddr has sa_len" >&5 +echo $ECHO_N "checking whether struct sockaddr has sa_len... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#include +#include + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + +struct sockaddr sa; +int i = sa.sa_len; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF +#define HAVE_SOCKADDR_LEN 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest.$ac_objext conftest.$ac_ext + + if test $upload = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define UPLOAD 1 -EOF +_ACEOF fi if test $overwrite = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define OVERWRITE 1 -EOF +_ACEOF fi if test $hostxs = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HOST_ACCESS 1 -EOF +_ACEOF fi if test $logfailed = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define LOG_FAILED 1 -EOF +_ACEOF fi if test $logtoomany = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define LOG_TOOMANY 1 -EOF +_ACEOF fi if test $private = no; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NO_PRIVATE 1 -EOF +_ACEOF fi if test $dnsretry = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DNS_TRYAGAIN 1 -EOF +_ACEOF fi if test $anononly = yes; then if test $anonymous = no; then - { { echo "$as_me:5209: error: enable-anononly and disable-anonymous together don't make sense." >&5 + { { echo "$as_me:$LINENO: error: enable-anononly and disable-anonymous together don't make sense." >&5 echo "$as_me: error: enable-anononly and disable-anonymous together don't make sense." >&2;} { (exit 1); exit 1; }; } fi - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define ANON_ONLY 1 -EOF +_ACEOF fi if test $paranoid = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define PARANOID 1 -EOF +_ACEOF fi if test $quota != no; then + + + + + for ac_header in sys/quota.h sys/fs/ufs_quota.h ufs/quota.h jfs/quota.h ufs/ufs/quota.h linux/quota.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:5229: checking for $ac_header" >&5 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - cat >conftest.$ac_ext <<_ACEOF -#line 5235 "configure" + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:5239: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:5245: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -5253,51 +6655,78 @@ ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - eval "$as_ac_Header=yes" + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - eval "$as_ac_Header=no" + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" fi -echo "$as_me:5264: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -EOF +_ACEOF fi + done if test $ac_cv_header_sys_quota.h = yes -o $ac_cv_header_sys_fs_ufs_quota_h = yes -o $ac_cv_header_ufs_quota_h = yes -o $ac_cv_header_jfs_quota_h = yes -o $ac_cv_header_ufs_ufs_quota_h = yes -o $ac_cv_header_linux_quota_h = yes; then quota=yes else if test $quota = yes; then - { echo "$as_me:5278: WARNING: QUOTA not supported by OS - disabled" >&5 + { echo "$as_me:$LINENO: WARNING: QUOTA not supported by OS - disabled" >&5 echo "$as_me: WARNING: QUOTA not supported by OS - disabled" >&2;} fi quota=no fi - echo "$as_me:5283: checking for quota support" >&5 + echo "$as_me:$LINENO: checking for quota support" >&5 echo $ECHO_N "checking for quota support... $ECHO_C" >&6 - echo "$as_me:5285: result: $quota" >&5 + echo "$as_me:$LINENO: result: $quota" >&5 echo "${ECHO_T}$quota" >&6 fi if test $quota = yes; then if test $ac_cv_header_sys_quota_h = yes -o $ac_cv_header_sys_fs_ufs_quota_h = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define QUOTA_DEVICE 1 -EOF +_ACEOF fi - echo "$as_me:5297: checking whether quota support is file- or inode based" >&5 + echo "$as_me:$LINENO: checking whether quota support is file- or inode based" >&5 echo $ECHO_N "checking whether quota support is file- or inode based... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 5300 "configure" +#line $LINENO "configure" #include "confdefs.h" #include @@ -5334,6 +6763,12 @@ #include #endif struct dqblk quota; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5343,16 +6778,16 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:5346: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5349: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:5352: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5355: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then result=inode else @@ -5361,33 +6796,33 @@ result=file fi rm -f conftest.$ac_objext conftest.$ac_ext - echo "$as_me:5364: result: $result" >&5 + echo "$as_me:$LINENO: result: $result" >&5 echo "${ECHO_T}$result" >&6 if test $result = inode; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define QUOTA_INODE 1 -EOF +_ACEOF fi - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define QUOTA 1 -EOF +_ACEOF fi if test $ac_cv_header_security_pam_appl_h = no; then if test $pam = yes; then - { echo "$as_me:5379: WARNING: You don\'t have PAM libraries" >&5 + { echo "$as_me:$LINENO: WARNING: You don\'t have PAM libraries" >&5 echo "$as_me: WARNING: You don\'t have PAM libraries" >&2;} pam=no fi fi if test $pam = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USE_PAM 1 -EOF +_ACEOF LIBS="$LIBS -lpam" - echo "$as_me:5390: checking for dlopen in -ldl" >&5 + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5395,7 +6830,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 5398 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -5405,6 +6840,12 @@ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5414,16 +6855,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5417: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5420: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5423: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5426: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else @@ -5434,7 +6875,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:5437: result: $ac_cv_lib_dl_dlopen" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then result=yes @@ -5447,7 +6888,7 @@ LIBS="$LIBS -ldl" fi fi -echo "$as_me:5450: checking for setspent in -lshadow" >&5 +echo "$as_me:$LINENO: checking for setspent in -lshadow" >&5 echo $ECHO_N "checking for setspent in -lshadow... $ECHO_C" >&6 if test "${ac_cv_lib_shadow_setspent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5455,7 +6896,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lshadow $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 5458 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -5465,6 +6906,12 @@ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char setspent (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5474,16 +6921,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5477: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5480: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5483: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5486: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_shadow_setspent=yes else @@ -5494,7 +6941,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:5497: result: $ac_cv_lib_shadow_setspent" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_shadow_setspent" >&5 echo "${ECHO_T}$ac_cv_lib_shadow_setspent" >&6 if test $ac_cv_lib_shadow_setspent = yes; then result=yes @@ -5509,7 +6956,7 @@ SHADOW_PASSWORD=1 LIBSHADOW=1 else - echo "$as_me:5512: checking for getspnam in -lshadow" >&5 + echo "$as_me:$LINENO: checking for getspnam in -lshadow" >&5 echo $ECHO_N "checking for getspnam in -lshadow... $ECHO_C" >&6 if test "${ac_cv_lib_shadow_getspnam+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5517,7 +6964,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lshadow $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 5520 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -5527,6 +6974,12 @@ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getspnam (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5536,16 +6989,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5539: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5542: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5545: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5548: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_shadow_getspnam=yes else @@ -5556,7 +7009,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:5559: result: $ac_cv_lib_shadow_getspnam" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_shadow_getspnam" >&5 echo "${ECHO_T}$ac_cv_lib_shadow_getspnam" >&6 if test $ac_cv_lib_shadow_getspnam = yes; then result=yes @@ -5569,7 +7022,7 @@ SHADOW_PASSWORD=1 LIBSHADOW=1 else - echo "$as_me:5572: checking for setspent in -lc" >&5 + echo "$as_me:$LINENO: checking for setspent in -lc" >&5 echo $ECHO_N "checking for setspent in -lc... $ECHO_C" >&6 if test "${ac_cv_lib_c_setspent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5577,7 +7030,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 5580 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -5587,6 +7040,12 @@ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char setspent (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5596,16 +7055,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5599: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5602: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5605: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5608: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_c_setspent=yes else @@ -5616,7 +7075,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:5619: result: $ac_cv_lib_c_setspent" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_c_setspent" >&5 echo "${ECHO_T}$ac_cv_lib_c_setspent" >&6 if test $ac_cv_lib_c_setspent = yes; then result=yes @@ -5631,7 +7090,7 @@ fi if test $SHADOW_PASSWORD = 1; then if test $ac_cv_func_fgetspent != yes; then - echo "$as_me:5634: checking for fgetspent in -lshadow" >&5 + echo "$as_me:$LINENO: checking for fgetspent in -lshadow" >&5 echo $ECHO_N "checking for fgetspent in -lshadow... $ECHO_C" >&6 if test "${ac_cv_lib_shadow_fgetspent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -5639,7 +7098,7 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lshadow $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line 5642 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -5649,6 +7108,12 @@ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char fgetspent (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5658,16 +7123,16 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5661: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5664: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5667: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5670: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_shadow_fgetspent=yes else @@ -5678,7 +7143,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:5681: result: $ac_cv_lib_shadow_fgetspent" >&5 +echo "$as_me:$LINENO: result: $ac_cv_lib_shadow_fgetspent" >&5 echo "${ECHO_T}$ac_cv_lib_shadow_fgetspent" >&6 if test $ac_cv_lib_shadow_fgetspent = yes; then result=yes @@ -5692,244 +7157,249 @@ fi fi fi - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define SHADOW_PASSWORD 1 -EOF +_ACEOF fi if test $ac_cv_header_skey_h = no; then if test $skey = yes; then - { echo "$as_me:5702: WARNING: You don\'t have S/Key libraries" >&5 + { echo "$as_me:$LINENO: WARNING: You don\'t have S/Key libraries" >&5 echo "$as_me: WARNING: You don\'t have S/Key libraries" >&2;} skey=no fi fi if test $skey = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define SKEY 1 -EOF +_ACEOF LIBS="$LIBS -lskey" fi if test $ac_cv_header_opie_h = no; then if test $opie = yes; then - { echo "$as_me:5716: WARNING: You don\'t have OPIE libraries" >&5 + { echo "$as_me:$LINENO: WARNING: You don\'t have OPIE libraries" >&5 echo "$as_me: WARNING: You don\'t have OPIE libraries" >&2;} opie=no fi fi if test $opie = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define OPIE 1 -EOF +_ACEOF LIBS="$LIBS -lopie" fi if test $newcd = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define ALTERNATE_CD 1 -EOF +_ACEOF fi if test $chmod = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define UNRESTRICTED_CHMOD 1 -EOF +_ACEOF fi if test $rfc931 = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USE_RFC931 1 -EOF +_ACEOF fi if test "$ratio" = "yes"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define RATIO 1 -EOF +_ACEOF fi if test "$passwd" = "yes"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define OTHER_PASSWD 1 -EOF +_ACEOF fi if test $daemon = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DAEMON 1 -EOF +_ACEOF fi if test $mapchdir = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define MAPPING_CHDIR 1 -EOF +_ACEOF fi if test $throughput = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define THROUGHPUT 1 -EOF +_ACEOF fi if test $count = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define TRANSFER_COUNT 1 -EOF +_ACEOF - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define TRANSFER_LIMIT 1 -EOF +_ACEOF fi if test $newlines = no; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NO_SUCKING_NEWLINES 1 -EOF +_ACEOF fi if test $crackers = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HELP_CRACKERS 1 -EOF +_ACEOF fi if test $verbose = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define VERBOSE_ERROR_LOGING 1 -EOF +_ACEOF fi if test $noop = no; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define IGNORE_NOOP 1 -EOF +_ACEOF fi if test $logrp = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define XFERLOG_REALPATH 1 -EOF +_ACEOF fi if test $virtual = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define VIRTUAL 1 -EOF +_ACEOF fi if test $closedvirt = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define CLOSED_VIRTUAL_SERVER 1 -EOF +_ACEOF fi if test $dns = no; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NO_DNS 1 -EOF +_ACEOF fi if test $port = no; then if test $pasv = no; then - { { echo "$as_me:5836: error: Need at least PORT or PASV mode. Don't disable both." >&5 + { { echo "$as_me:$LINENO: error: Need at least PORT or PASV mode. Don't disable both." >&5 echo "$as_me: error: Need at least PORT or PASV mode. Don't disable both." >&2;} { (exit 1); exit 1; }; } fi - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_PORT 1 -EOF +_ACEOF fi if test $pasv = no; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define DISABLE_PASV 1 -EOF +_ACEOF fi if test $plsm = no; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NO_PID_SLEEP_MSGS 1 -EOF +_ACEOF fi if test $pasvip = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define FIGHT_PASV_PORT_RACE 1 -EOF +_ACEOF fi if test $anonymous = no; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NO_ANONYMOUS_ACCESS 1 -EOF +_ACEOF fi if test $ls = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define INTERNAL_LS 1 -EOF +_ACEOF fi if test $numericuid = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define LS_NUMERIC_UIDS 1 -EOF +_ACEOF fi if test $hidesetuid = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HIDE_SETUID 1 -EOF +_ACEOF fi if test $mail = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define MAIL_ADMIN 1 -EOF +_ACEOF fi if test $badclients = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define SUPPORT_BROKEN_CLIENTS 1 -EOF +_ACEOF fi if test $nlstdirs = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NLST_SHOWS_DIRS 1 -EOF +_ACEOF fi if test x`expr $bufsize + 1 - 1 2>/dev/null` = x$bufsize; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define BUFFER_SIZE $bufsize -EOF +_ACEOF fi if test x`expr $backlog + 1 - 1 2>/dev/null` = x$backlog; then - cat >>confdefs.h <>confdefs.h <<_ACEOF #define MAX_BACKLOG $backlog -EOF +_ACEOF else - cat >>confdefs.h <>confdefs.h <<_ACEOF #define MAX_BACKLOG 100 -EOF +_ACEOF fi -cat >>confdefs.h <>confdefs.h <<_ACEOF #define SIGNAL_TYPE void -EOF +_ACEOF + LIBS="$LIBS -lsupport" -cat >>confdefs.h <<\EOF + + +cat >>confdefs.h <<\_ACEOF #define USE_ETC 1 -EOF +_ACEOF + + ac_config_files="$ac_config_files Makefile src/Makefile support/Makefile util/privatepw/Makefile src/pathnames.h" cat >confcache <<\_ACEOF @@ -6008,25 +7478,29 @@ DEFS=-DHAVE_CONFIG_H + : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:6014: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL -# Generated automatically by configure. +# Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false SHELL=\${CONFIG_SHELL-$SHELL} -ac_cs_invocation="\$0 \$@" - _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF + +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh @@ -6035,8 +7509,167 @@ set -o posix fi +# NLS nuisances. +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +(set +x; test -n "`(LANG=C; export LANG) 2>&1`") && + { $as_unset LANG || test "${LANG+set}" != set; } || + { LANG=C; export LANG; } +(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && + { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || + { LC_ALL=C; export LC_ALL; } +(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && + { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || + { LC_TIME=C; export LC_TIME; } +(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && + { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || + { LC_CTYPE=C; export LC_CTYPE; } +(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && + { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || + { LANGUAGE=C; export LANGUAGE; } +(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && + { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || + { LC_COLLATE=C; export LC_COLLATE; } +(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && + { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || + { LC_NUMERIC=C; export LC_NUMERIC; } +(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && + { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || + { LC_MESSAGES=C; export LC_MESSAGES; } + + # Name of the executable. -as_me=`echo "$0" |sed 's,.*[\\/],,'` +as_me=`(basename "$0") 2>/dev/null || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conftest.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr @@ -6064,22 +7697,12 @@ as_executable_p="test -f" -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -# NLS nuisances. -$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } -$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } -$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } -$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } -$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } -$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } -$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } -$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } # IFS # We need space, tab and new line, in precisely that order. @@ -6088,10 +7711,34 @@ IFS=" $as_nl" # CDPATH. -$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } exec 6>&1 +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.53. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF # Files that config.status was made for. @@ -6111,7 +7758,7 @@ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the @@ -6135,12 +7782,12 @@ $config_headers Report bugs to ." -EOF +_ACEOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.52, +configured by $0, generated by GNU Autoconf 2.53, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 @@ -6149,9 +7796,9 @@ gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" -EOF +_ACEOF -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: @@ -6173,18 +7820,18 @@ case $1 in # Handling of the options. -EOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:6187: error: ambiguous option: $1 + { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} @@ -6203,7 +7850,7 @@ ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:6206: error: unrecognized option: $1 + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} @@ -6215,25 +7862,13 @@ shift done -exec 5>>config.log -cat >&5 << _ACEOF +_ACEOF + -## ----------------------- ## -## Running config.status. ## -## ----------------------- ## -This file was extended by $as_me 2.52, executed with - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - > $ac_cs_invocation -on `(hostname || uname -n) 2>/dev/null | sed 1q` -_ACEOF -EOF -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in @@ -6245,7 +7880,7 @@ "src/pathnames.h" ) CONFIG_FILES="$CONFIG_FILES src/pathnames.h" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; - *) { { echo "$as_me:6248: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -6282,9 +7917,9 @@ { (exit 1); exit 1; } } -EOF +_ACEOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. @@ -6297,6 +7932,12 @@ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t @@ -6312,19 +7953,13 @@ s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@DEFS@,$DEFS,;t t s,@LIBS@,$LIBS,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t @@ -6373,9 +8008,9 @@ s,@STRNCASECMP@,$STRNCASECMP,;t t CEOF -EOF +_ACEOF - cat >>$CONFIG_STATUS <<\EOF + cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 @@ -6414,8 +8049,8 @@ fi fi # test -n "$CONFIG_FILES" -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in @@ -6429,7 +8064,8 @@ esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ @@ -6440,8 +8076,7 @@ /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - { case "$ac_dir" in + { case "$ac_dir" in [\\/]* | ?:[\\/]* ) as_incr_dir=;; *) as_incr_dir=.;; esac @@ -6452,48 +8087,68 @@ ?:) as_incr_dir=$as_mkdir_dir ;; *) as_incr_dir=$as_incr_dir/$as_mkdir_dir - test -d "$as_incr_dir" || mkdir "$as_incr_dir" + test -d "$as_incr_dir" || + mkdir "$as_incr_dir" || + { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; } ;; esac done; } - ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` - else - ac_dir_suffix= ac_dots= - fi + ac_builddir=. - case $srcdir in - .) ac_srcdir=. - if test -z "$ac_dots"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; *) # Relative path. - ac_srcdir=$ac_dots$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_dots$srcdir ;; - esac + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_dots$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then - { echo "$as_me:6488: creating $ac_file" >&5 + { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: - # /* config.h. Generated automatically by config.status. */ - configure_input="Generated automatically from `echo $ac_file_in | - sed 's,.*/,,'` by configure." + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. @@ -6503,7 +8158,7 @@ -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:6506: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -6516,23 +8171,29 @@ echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:6519: error: cannot find input file: $f" >&5 + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } -EOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin @@ -6544,8 +8205,8 @@ fi done -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. @@ -6577,7 +8238,7 @@ * ) ac_file_in=$ac_file.in ;; esac - test x"$ac_file" != x- && { echo "$as_me:6580: creating $ac_file" >&5 + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the @@ -6588,7 +8249,7 @@ -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:6591: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -6601,7 +8262,7 @@ echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:6604: error: cannot find input file: $f" >&5 + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -6610,7 +8271,7 @@ # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in -EOF +_ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into @@ -6626,16 +8287,16 @@ # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\EOF +cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear -s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end -EOF +_ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. @@ -6646,9 +8307,9 @@ # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\EOF +cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -EOF +_ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). @@ -6705,23 +8366,24 @@ done rm -f conftest.undefs -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: - # /* config.h. Generated automatically by config.status. */ + # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then - echo "/* Generated automatically by configure. */" >$tmp/config.h + echo "/* Generated by configure. */" >$tmp/config.h else - echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then - { echo "$as_me:6721: $ac_file is unchanged" >&5 + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else - ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ @@ -6732,8 +8394,7 @@ /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - { case "$ac_dir" in + { case "$ac_dir" in [\\/]* | ?:[\\/]* ) as_incr_dir=;; *) as_incr_dir=.;; esac @@ -6744,12 +8405,15 @@ ?:) as_incr_dir=$as_mkdir_dir ;; *) as_incr_dir=$as_incr_dir/$as_mkdir_dir - test -d "$as_incr_dir" || mkdir "$as_incr_dir" + test -d "$as_incr_dir" || + mkdir "$as_incr_dir" || + { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; } ;; esac done; } - fi rm -f $ac_file mv $tmp/config.h $ac_file fi @@ -6758,14 +8422,15 @@ rm -f $tmp/config.h fi done -EOF +_ACEOF -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } -EOF +_ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. Index: wu-ftpd/configure.in diff -u wu-ftpd/configure.in:1.1.1.3 wu-ftpd/configure.in:1.9 --- wu-ftpd/configure.in:1.1.1.3 Thu Jul 11 10:53:04 2002 +++ wu-ftpd/configure.in Thu Jul 11 10:58:21 2002 @@ -47,6 +47,7 @@ AC_SUBST(AR) AC_HEADER_STDC AC_HEADER_TIME +AC_C_INLINE dnl Quick hack: Let the source know we don't want stuff like dnl #ifdef LINUX... @@ -702,6 +703,175 @@ AC_SUBST(STRCASECMP) AC_SUBST(STRNCASECMP) +dnl === part for IPv6 support === +AC_MSG_CHECKING([whether to enable ipv6]) +AC_ARG_ENABLE(ipv6, +[ --enable-ipv6 Enable ipv6 (with ipv4) support + --disable-ipv6 Disable ipv6 support], +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + ipv6=no + ;; + *) AC_MSG_RESULT(yes) + AC_DEFINE(ENABLE_IPV6) + ipv6=yes + ;; + esac ], + + AC_TRY_RUN([ /* AF_INET6 avalable check */ +#include +#include +main() +{ + if (socket(AF_INET6, SOCK_STREAM, 0) < 0) + exit(1); + else + exit(0); +} +], + AC_MSG_RESULT(yes) + AC_DEFINE(ENABLE_IPV6) + ipv6=yes, + AC_MSG_RESULT(no) + ipv6=no, + AC_MSG_RESULT(no) + ipv6=no +)) + +ipv6type=unknown +ipv6lib=none + +if test "$ipv6" = "yes"; then + AC_MSG_CHECKING([IPv6 stack type]) + for i in inria kame linux-glibc linux-inet6 toshiba v6d zeta; do + case $i in + inria) + dnl http://www.kame.net/ + AC_EGREP_CPP(%%%yes%%%, [dnl +#include +#ifdef IPV6_INRIA_VERSION +%%%yes%%% +#endif], + [ipv6type=$i; + CFLAGS="-DINET6 $CPPFLAGS"]) + ;; + kame) + dnl http://www.kame.net/ + AC_EGREP_CPP(%%%yes%%%, [dnl +#include +#ifdef __KAME__ +%%%yes%%% +#endif], + [ipv6type=$i; + ipv6lib=inet6; + ipv6libdir=/usr/local/v6/lib; + CFLAGS="-DINET6 $CPPFLAGS"]) + ;; + linux-glibc) + dnl http://www.v6.linux.or.jp/ + AC_EGREP_CPP(%%%yes%%%, [dnl +#include +#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 +%%%yes%%% +#endif], + [ipv6type=$i; + default_enable_ipv4in6=yes + CFLAGS="-DINET6 -DLINUX $CFLAGS"]) + ;; + linux-inet6) + dnl http://www.v6.linux.or.jp/ + if test -d /usr/inet6; then + ipv6type=$i + ipv6lib=inet6 + ipv6libdir=/usr/inet6/lib + default_enable_ipv4in6=yes + CFLAGS="-DINET6 -DLINUX -I/usr/inet6/include $CFLAGS" + fi + ;; + toshiba) + AC_EGREP_CPP(%%%yes%%%, [dnl +#include +#ifdef _TOSHIBA_INET6 +%%%yes%%% +#endif], + [ipv6type=$i; + ipv6lib=inet6; + ipv6libdir=/usr/local/v6/lib; + CFLAGS="-DINET6 $CFLAGS"]) + ;; + v6d) + AC_EGREP_CPP(%%%yes%%%, [dnl +#include +#ifdef __V6D__ +%%%yes%%% +#endif], + [ipv6type=$i; + ipv6lib=v6; + ipv6libdir=/usr/local/v6/lib; + CFLAGS="-I/usr/local/v6/include $CFLAGS"]) + ;; + zeta) + AC_EGREP_CPP(%%%yes%%%, [dnl +#include +#ifdef _ZETA_MINAMI_INET6 +yes +#endif], + [ipv6type=$i; + ipv6lib=inet6; + ipv6libdir=/usr/local/v6/lib; + CFLAGS="-DINET6 $CFLAGS"]) + ;; +dnl solaris7) +dnl ipv6type=$i; +dnl CFLAGS="-DINET6 $CFLAGS" +dnl ;; + esac + if test "$ipv6type" != "unknown"; then + break + fi + done + if test "$ipv6type" = "unknown"; then + case "$host" in + *-dec-osf*) + ipv6type=tru64 + CC="cc" + CFLAGS="-DINET6 $CFLAGS" + ;; + *) + CFLAGS="-DINET6 $CFLAGS" + ;; + esac + fi + AC_MSG_RESULT($ipv6type) +fi + +if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then + if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then + echo "You have $ipv6lib library, using it" + LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" + else + echo "You do not have $ipv6lib library, trying libc" + fi +fi + +AC_CHECK_FUNCS(getaddrinfo) + +dnl checking for sa_len; +dnl the following check says 'yes' if your system has __libc_sa_len +dnl AC_EGREP_HEADER(sa_len, sys/socket.h, +dnl [ AC_DEFINE(HAVE_SOCKADDR_LEN) AC_MSG_RESULT(yes)], AC_MSG_RESULT(no)) +AC_MSG_CHECKING([whether struct sockaddr has sa_len]) +AC_TRY_COMPILE([ +#include +#include +],[ +struct sockaddr sa; +int i = sa.sa_len; +], +[AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SOCKADDR_LEN)], +AC_MSG_RESULT(no)) dnl =========================================================================== dnl Get the --enable, --disable, --with, --without stuff into the config files Index: wu-ftpd/doc/ftpd.8 diff -u wu-ftpd/doc/ftpd.8:1.1.1.5 wu-ftpd/doc/ftpd.8:1.7 --- wu-ftpd/doc/ftpd.8:1.1.1.5 Sun Sep 24 05:54:28 2000 +++ wu-ftpd/doc/ftpd.8 Sun Sep 24 05:56:14 2000 @@ -284,6 +284,10 @@ XMKD make a directory (deprecated) XPWD print the current working directory (deprecated) XRMD remove a directory (deprecated) +LPSV prepare for server-to-server transferw, IPv6 (RFC1639) +LPRT specify data connection port, IPv6 (RFC1639) +EPSV prepare for server-to-server transfer, multiprotocol +EPRT specify data connection port, multiprotocol .fi .PP The following non-standard or UNIX specific commands are supported Index: wu-ftpd/makefiles/Makefile.lv6 diff -u /dev/null wu-ftpd/makefiles/Makefile.lv6:1.2 --- /dev/null Fri Jan 30 22:37:40 2004 +++ wu-ftpd/makefiles/Makefile.lv6 Mon Sep 25 12:57:37 2000 @@ -0,0 +1,82 @@ +# +# Copyright (c) 1999,2000 WU-FTPD Development Group. +# All rights reserved. +# +# Portions Copyright (c) 1980, 1985, 1988, 1989, 1990, 1991, 1993, 1994 +# The Regents of the University of California. +# Portions Copyright (c) 1993, 1994 Washington University in Saint Louis. +# Portions Copyright (c) 1989 Massachusetts Institute of Technology. +# Portions Copyright (c) 1998 Sendmail, Inc. +# Portions Copyright (c) 1983, 1995, 1996, 1997 Eric P. Allman. +# Portions Copyright (c) 1996, 1998 Berkeley Software Design, Inc. +# Portions Copyright (C) 1991, 1992, 1993, 1994, 1995 1996, 1997 +# Free Software Foundation, Inc. +# Portions Copyright (c) 1997 Stan Barber. +# Portions Copyright (c) 1997 Kent Landfield. +# +# Use and distribution of this software and its source code are governed by +# the terms and conditions of the WU-FTPD Software License ("LICENSE"). +# +# If you did not receive a copy of the license, it may be obtained online at +# http://www.wu-ftpd.org/license.html. +# +# $Id: Makefile.lv6,v 1.2 2000/09/25 03:57:37 yoshfuji Exp $ +# + +DESTDIR= +PREFIX= /usr + +BINDIR= ${DESTDIR}${PREFIX}/bin +BINOWN= bin +BINGRP= bin + +SBINDIR= ${DESTDIR}${PREFIX}/sbin +SBINOWN= bin +SBINGRP= bin + +MANDIR= ${DESTDIR}${PREFIX}/man +MANOWN= bin +MANGRP= bin + +INSTALL= install + +all: + @ echo 'Use the "build" command (shell script) to make ftpd.' + @ echo 'You can say "build help" for details on how it works.' + +install: bin/ftpd bin/ftpcount bin/ftpshut bin/ftprestart bin/ftpwho bin/privatepw + @echo installing binaries. + @if [ ! -e ${BINDIR} ]; then \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 -d ${BINDIR} ; \ + fi + @if [ ! -e ${SBINDIR} ]; then \ + ${INSTALL} -o ${SBINOWN} -g ${SBINGRP} -m 755 -d ${SBINDIR} ; \ + fi + ${INSTALL} -c -o ${SBINOWN} -g ${SBINGRP} -m 110 bin/ftpd ${SBINDIR}/in.ftpd + @( cd ${SBINDIR} ; ln -s -f in.ftpd wu.ftpd ; chown ${SBINOWN}.${SBINGRP} wu.ftpd ) + @( cd ${SBINDIR} ; ln -s -f in.ftpd in.wuftpd ; chown ${SBINOWN}.${SBINGRP} in.wuftpd ) + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 111 bin/ftpshut ${BINDIR}/ftpshut + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 111 bin/ftprestart ${BINDIR}/ftprestart + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 111 bin/ftpcount ${BINDIR}/ftpcount + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 111 bin/ftpwho ${BINDIR}/ftpwho + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 111 bin/privatepw ${BINDIR}/privatepw + @echo installing manpages. + @if [ ! -e ${MANDIR}/man1 ]; then \ + ${INSTALL} -o ${MANOWN} -g ${MANGRP} -m 755 -d ${MANDIR}/man1 ; \ + fi + ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m 444 doc/ftpcount.1 ${MANDIR}/man1/ftpcount.1 + ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m 444 doc/ftpwho.1 ${MANDIR}/man1/ftpwho.1 + @if [ ! -e ${MANDIR}/man5 ]; then \ + ${INSTALL} -o ${MANOWN} -g ${MANGRP} -m 755 -d ${MANDIR}/man5 ; \ + fi + ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m 444 doc/ftpaccess.5 ${MANDIR}/man5/ftpaccess.5 + ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m 444 doc/ftpconversions.5 ${MANDIR}/man5/ftpconversions.5 + ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m 444 doc/ftphosts.5 ${MANDIR}/man5/ftphosts.5 + ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m 444 doc/xferlog.5 ${MANDIR}/man5/xferlog.5 + @if [ ! -e ${MANDIR}/man8 ]; then \ + ${INSTALL} -o ${MANOWN} -g ${MANGRP} -m 755 -d ${MANDIR}/man8 ; \ + fi + ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m 444 doc/ftpd.8 ${MANDIR}/man8/ftpd.8 + ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m 444 doc/ftpshut.8 ${MANDIR}/man8/ftpshut.8 + ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m 444 doc/ftprestart.8 ${MANDIR}/man8/ftprestart.8 + ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m 444 util/privatepw/privatepw.8 ${MANDIR}/man8/privatepw.8 Index: wu-ftpd/src/.cvsignore diff -u /dev/null wu-ftpd/src/.cvsignore:1.1 --- /dev/null Fri Jan 30 22:37:40 2004 +++ wu-ftpd/src/.cvsignore Thu Aug 20 18:20:56 1998 @@ -0,0 +1,5 @@ +Makefile +config.h +y.tab.h +ftpcmd.c +vers.c Index: wu-ftpd/src/access.c diff -u wu-ftpd/src/access.c:1.1.1.5 wu-ftpd/src/access.c:1.6 --- wu-ftpd/src/access.c:1.1.1.5 Sun Sep 24 05:54:31 2000 +++ wu-ftpd/src/access.c Wed Oct 3 17:22:36 2001 @@ -1,4 +1,3 @@ - /**************************************************************************** Copyright (c) 1999,2000 WU-FTPD Development Group. @@ -31,6 +30,10 @@ #include #include #include +#ifdef INET6 +#include +#include +#endif #ifdef HAVE_SYS_SYSLOG_H #include @@ -55,6 +58,7 @@ #include #include #include +#include #ifdef HAVE_PATHS_H #include @@ -195,6 +199,16 @@ int not_found = 0; int match = 0; int i, a[4], m[4], r[4], cidr; +#ifdef INET6 + u_int16_t octet[8],remote_addr_octet[8]; + u_int32_t addr_int[4],remote_int[4]; + struct sockaddr_in6 in6_addr,remote_in6_addr; + char inet6addr[INET6_ADDRSTRLEN+1]; + char colon[3]="::",slash[2]="/"; + char *point,*delim; + int bits_shift; + u_int32_t mask_v; +#endif if (addr == NULL) return (0); @@ -277,6 +291,112 @@ return not_found; return found; } +#ifdef INET6 + else if (sscanf(addr, "%hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx/%d" + ,octet,octet+1,octet+2,octet+3,octet+4,octet+5,octet+6 + ,octet+7,&cidr)==9) { /* IPv6 network full ddress entry with cidr */ + sscanf(remoteaddr,"%hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx" + ,remote_addr_octet,remote_addr_octet+1,remote_addr_octet+2 + ,remote_addr_octet+3,remote_addr_octet+4,remote_addr_octet+5 + ,remote_addr_octet+6,remote_addr_octet+7); + if (1<=cidr<=16){ + bits_shift = 16 - cidr; + octet[0] = octet[0] >> bits_shift; + remote_addr_octet[0] = remote_addr_octet[0] >> bits_shift; + octet[0] = octet[0] << bits_shift; + remote_addr_octet[0] = remote_addr_octet[0] << bits_shift; + octet[1]=octet[2]=octet[3]=octet[4]=octet[5]=octet[6]=octet[7]=0; + remote_addr_octet[1]=remote_addr_octet[2]=remote_addr_octet[3]=remote_addr_octet[4]=remote_addr_octet[5]=remote_addr_octet[6]=remote_addr_octet[7]=0; + }else if (17<=cidr<=32){ + bits_shift = 32 - cidr; + octet[1] = octet[1] >> bits_shift; + remote_addr_octet[1] = remote_addr_octet[1] >> bits_shift; + octet[1] = octet[1] << bits_shift; + remote_addr_octet[1] = remote_addr_octet[1] << bits_shift; + octet[2]=octet[3]=octet[4]=octet[5]=octet[6]=octet[7]=0; + remote_addr_octet[2]=remote_addr_octet[3]=remote_addr_octet[4]=remote_addr_octet[5]=remote_addr_octet[6]=remote_addr_octet[7]=0; + }else if (33<=cidr<=48){ + bits_shift = 48 - cidr; + octet[2] = octet[2] >> bits_shift; + remote_addr_octet[2] = remote_addr_octet[2] >> bits_shift; + octet[2] = octet[2] << bits_shift; + remote_addr_octet[2] = remote_addr_octet[2] << bits_shift; + octet[3]=octet[4]=octet[5]=octet[6]=octet[7]=0; + remote_addr_octet[3]=remote_addr_octet[4]=remote_addr_octet[5]=remote_addr_octet[6]=remote_addr_octet[7]=0; + }else if (49<=cidr<=64){ + bits_shift = 64 - cidr; + octet[3] = octet[3] >> bits_shift; + remote_addr_octet[3] = remote_addr_octet[3] >> bits_shift; + octet[3] = octet[3] << bits_shift; + remote_addr_octet[3] = remote_addr_octet[3] << bits_shift; + octet[4]=octet[5]=octet[6]=octet[7]=0; + remote_addr_octet[4]=remote_addr_octet[5]=remote_addr_octet[6]=remote_addr_octet[7]=0; + }else{ + return not_found; + } + + if (memcmp(octet,remote_addr_octet,sizeof(u_int16_t)*8)) + return not_found; + return found; + } + else if (sscanf(addr, "%hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx" + ,octet,octet+1,octet+2,octet+3,octet+4,octet+5,octet+6,octet+7) + ==8){ /* IPv6 host specific full address entry */ + sprintf(inet6addr,"%hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx" + ,octet,octet+1,octet+2,octet+3,octet+4,octet+5,octet+6,octet+7); + inet_pton(AF_INET6,inet6addr,in6_addr.sin6_addr.s6_addr); + inet_pton(AF_INET6,remoteaddr,remote_in6_addr.sin6_addr.s6_addr); + if (memcmp(remote_in6_addr.sin6_addr.s6_addr ,in6_addr.sin6_addr.s6_addr,sizeof(struct in6_addr))) + return not_found; + return found; + } + else if (NULL != (point=strstr(addr,colon))){ + if (NULL != (delim=strstr(addr,slash))){ + sscanf(delim,"/%d",&cidr); + memset(inet6addr,0,INET6_ADDRSTRLEN); + memcpy(inet6addr,addr,delim-addr); + inet_pton(AF_INET6,inet6addr,in6_addr.sin6_addr.s6_addr); + inet_pton(AF_INET6,remoteaddr,remote_in6_addr.sin6_addr.s6_addr); + memcpy(addr_int,in6_addr.sin6_addr.s6_addr,sizeof(u_int32_t)*4); + memcpy(remote_int,remote_in6_addr.sin6_addr.s6_addr,sizeof(u_int32_t)*4); + for (i =0;i<4;i++){ + addr_int[i]=ntohl(addr_int[i]); + remote_int[i]=ntohl(remote_int[i]); + }; + if ((0> bits_shift; + remote_int[0] = remote_int[0] >> bits_shift; + addr_int[0] = addr_int[0] << bits_shift; + remote_int[0] = remote_int[0] << bits_shift; + addr_int[1]=addr_int[2]=addr_int[3]=0; + remote_int[1]=remote_int[2]=remote_int[3]=0; + } else if ((32> bits_shift; + remote_int[1] = remote_int[1] >> bits_shift; + addr_int[1] = addr_int[1] << bits_shift; + remote_int[1]=remote_int[1] << bits_shift; + + addr_int[2]=addr_int[3]=0; + remote_int[2]=remote_int[3]=0; + } else { + return not_found; + } + if (memcmp(addr_int,remote_int,sizeof(u_int32_t)*4)){ + return not_found; + } + return found; + }else{ + inet_pton(AF_INET6,addr,in6_addr.sin6_addr.s6_addr); + inet_pton(AF_INET6,remoteaddr,remote_in6_addr.sin6_addr.s6_addr); + if (memcmp(remote_in6_addr.sin6_addr.s6_addr ,in6_addr.sin6_addr.s6_addr,sizeof(struct in6_addr))){ + return not_found; + } + return found; + } + } +#endif else if (*addr == '/') { /* * read addrglobs from named path using similar format as addrglobs @@ -285,7 +405,7 @@ if ((incfile = fopen(addr, "r")) == NULL) { if (errno != ENOENT) syslog(LOG_ERR, - "cannot open addrglob file %s: %m", addr); + "cannot open addrglob file %s: %m\n", addr); return (0); } @@ -596,7 +716,7 @@ if ((grp = getgrnam(ARG0))) pw->pw_gid = grp->gr_gid; else - syslog(LOG_ERR, "autogroup: set group %s not found", ARG0); + syslog(LOG_ERR, "autogroup: set group %s not found\n", ARG0); endgrent(); } return; @@ -1162,7 +1282,7 @@ } if (pidfd < 0) { - syslog(LOG_ERR, "cannot open pid file %s: %m", pidfile); + syslog(LOG_ERR, "cannot open pid file %s: %m\n", pidfile); return -1; } Index: wu-ftpd/src/authenticate.c diff -u wu-ftpd/src/authenticate.c:1.1.1.4 wu-ftpd/src/authenticate.c:1.7 --- wu-ftpd/src/authenticate.c:1.1.1.4 Sun Sep 24 05:54:32 2000 +++ wu-ftpd/src/authenticate.c Sun Sep 24 05:56:14 2000 @@ -27,9 +27,12 @@ #include "config.h" #include #include +#include +#include #include "support/authuser.h" #include "authenticate.h" #include "proto.h" +#include "sockunion.h" #define AUTHNAMESIZE 100 @@ -49,7 +52,7 @@ { char *user; #if USE_A_RFC931 - unsigned long in; + union sockunion in; unsigned short local, remote; #endif /* USE_A_RFC931 */ @@ -60,10 +63,10 @@ #if USE_A_RFC931 if (disable_rfc931 || (timeout_rfc931 == 0)) user = "*"; - else if (auth_fd(0, &in, &local, &remote) == -1) + else if (auth_fd(0, (struct sockaddr *)&in, &local, &remote) == -1) user = "?"; /* getpeername/getsockname failure */ else { - if (!(user = auth_tcpuser(in, local, remote))) + if (!(user = auth_tcpuser((struct sockaddr *)&in, local, remote))) user = "*"; /* remote host doesn't support RFC 931 */ else authenticated |= A_RFC931; Index: wu-ftpd/src/config.h.in diff -u wu-ftpd/src/config.h.in:1.1.1.2 wu-ftpd/src/config.h.in:1.2 --- wu-ftpd/src/config.h.in:1.1.1.2 Sun Sep 24 05:54:32 2000 +++ wu-ftpd/src/config.h.in Tue Oct 10 12:03:49 2000 @@ -198,3 +198,8 @@ #undef USE_PAM #include "../config.h" + +/* IPv6 stuff */ +#undef HAVE_GETADDRINFO +#undef HAVE_SOCKADDR_LEN + Index: wu-ftpd/src/domain.c diff -u wu-ftpd/src/domain.c:1.1.1.2 wu-ftpd/src/domain.c:1.7 --- wu-ftpd/src/domain.c:1.1.1.2 Sun Sep 24 05:54:33 2000 +++ wu-ftpd/src/domain.c Thu Jun 7 00:12:21 2001 @@ -34,6 +34,12 @@ #include #include "proto.h" + + +#include +#include "sockunion.h" +#include + #ifdef HAVE_LIBRESOLV #include @@ -60,6 +66,10 @@ #define INADDRSZ sizeof(struct in_addr) #endif /* !INADDRSZ */ +#ifndef IN6ADDRSZ +#define IN6ADDRSZ sizeof(struct in6_addr) +#endif /* !IN6ADDRSZ*/ + #ifndef HFIXEDSZ #define HFIXEDSZ sizeof(HEADER) #endif /* !HFIXEDSZ */ @@ -181,9 +191,15 @@ /* Prototypes */ int check_matching_dns(void); +#ifdef INET6 +int lookup_ip(char *ip, char **fqdn, union sockunion *addr); +int check_name_for_ip(char *name, union sockunion remote_socket); +int initialize_dns(union sockunion *remote_socket); +#else int lookup_ip(char *ip, char **fqdn); int check_name_for_ip(char *name, char *ip); int initialize_dns(struct sockaddr_in *remote_socket); +#endif int check_reverse_dns(void); /* types for res_* answers */ @@ -304,7 +320,11 @@ * This routine takes an IP address in the format a.b.c.d and returns the * hostname. ***************************************************************************/ +#ifdef INET6 +int lookup_ip(char *ip, char **fqdn, union sockunion *addr) +#else int lookup_ip(char *ip, char **fqdn) +#endif { #ifndef NO_DNS u_char *msg_end, *msg_ptr; @@ -318,13 +338,29 @@ char in_addr[MAXDNAME + 1]; unsigned int a, b, c, d; +#ifdef INET6 + if (addr->su_family == AF_INET){ + a = b = c = d = 0; + sscanf(ip, "%u.%u.%u.%u", &a, &b, &c, &d); + sprintf(in_addr, "%u.%u.%u.%u.in-addr.arpa", d, c, b, a); + }else{ + int i; + char *cp = &((struct sockaddr_in6 *)addr)->sin6_addr.s6_addr[15], *tp; + + for (tp = in_addr, i = 0; i < 16; i++, cp--) { + tp += sprintf(tp, "%1x.%1x.", *cp & 0x0f, + ((*cp) & 0xf0) / 16); + } + sprintf(tp, "IP6.INT."); + }; +#else a = b = c = d = 0; sscanf(ip, "%u.%u.%u.%u", &a, &b, &c, &d); sprintf(in_addr, "%u.%u.%u.%u.in-addr.arpa", d, c, b, a); +#endif #ifdef USE_RES_SEND rc = res_mkquery(QUERY, in_addr, C_IN, T_PTR, NULL, 0, NULL, question.qb2, sizeof(querybuf)); - if (rc < 0) { return FALSE; } @@ -333,7 +369,6 @@ #else rc = res_query(in_addr, C_IN, T_PTR, answer.qb2, sizeof(querybuf)); #endif - if (rc < 0) { return FALSE; } @@ -408,7 +443,11 @@ * IP address for the same machine, we want to make sure that we match * them. ***************************************************************************/ +#ifndef INET6 int check_name_for_ip(char *name, char *ip) +#else +int check_name_for_ip(char *name, union sockunion remote_socket) +#endif { #ifndef NO_DNS #ifdef USE_RES_SEND @@ -419,16 +458,28 @@ u_char *msg_end, *msg_ptr; char query_name[MAXDNAME + 1]; int rc, num_answers, num_query, q_type, q_class, q_ttl, q_len; +#ifndef INET6 struct in_addr inaddr, qaddr; +#else + union sockunion inaddr, qaddr; +#endif /* convert the passed IP address into an in_addr (for comparison later) */ /* not all systems have inet_aton(), so use inet_addr() */ +#ifndef INET6 if ((qaddr.s_addr = inet_addr(ip)) == (u_long) - 1) { return FALSE; } +#else + qaddr=remote_socket; +#endif #ifdef USE_RES_SEND - rc = res_mkquery(QUERY, name, C_IN, T_A, NULL, 0, NULL, question.qb2, sizeof(querybuf)); + if (remote_socket.su_family==AF_INET){ + rc = res_mkquery(QUERY, name, C_IN, T_A, NULL, 0, NULL, question.qb2, sizeof(querybuf)); + }else{ + rc = res_mkquery(QUERY, name, C_IN, T_AAAA, NULL, 0, NULL, question.qb2, sizeof(querybuf)); + }; if (rc < 0) { return FALSE; @@ -436,7 +487,15 @@ rc = res_send(question.qb2, rc, answer.qb2, sizeof(querybuf)); #else +#ifdef INET6 + if (qaddr.su_family==AF_INET){ + rc = res_query(name, C_IN, T_A, answer.qb2, sizeof(querybuf)); + }else{ + rc = res_query(name, C_IN, T_AAAA, answer.qb2, sizeof(querybuf)); + }; +#else rc = res_query(name, C_IN, T_A, answer.qb2, sizeof(querybuf)); +#endif /* INET6 */ #endif if (rc < 0) { @@ -491,6 +550,15 @@ return TRUE; } break; +#ifdef INET6 + case T_AAAA: + bcopy(msg_ptr, (char *) &inaddr, IN6ADDRSZ); + msg_ptr += q_len; + if (memcmp(&inaddr, &qaddr, sizeof(struct in6_addr)) == 0) { + return TRUE; + } + break; +#endif default: /* what the ?? - we don't expect this response type */ return FALSE; @@ -509,7 +577,11 @@ * variables. The remote socket is passed to this routine so that it * can set DNS variables related to the remote site. ***************************************************************************/ +#ifndef INET6 int initialize_dns(struct sockaddr_in *remote_socket) +#else +int initialize_dns(union sockunion *remote_socket) +#endif { #ifndef NO_DNS @@ -586,7 +658,23 @@ } /* save the remote address */ +#ifndef INET6 temp_pointer = inet_ntoa(remote_socket->sin_addr); +#else + if (remote_socket->su_si.si_family == AF_INET){ + temp_pointer = malloc(INET6_ADDRSTRLEN); + temp_pointer = inet_ntoa(remote_socket->su_sin.sin_addr); + }else{ + temp_pointer = malloc(INET6_ADDRSTRLEN); + memset(temp_pointer,0,INET6_ADDRSTRLEN); +#ifndef SIN6_LEN + inet_ntop(remote_socket->su_family,(*remote_socket).su_sin6.sin6_addr.s6_addr,temp_pointer,su_len(remote_socket->su_family)); +#else + inet_ntop(remote_socket->su_family,(remote_socket->su_sin6.sin6_addr.s6_addr),temp_pointer,remote_socket->su_len); +#endif + + } +#endif remote_address = (char *) malloc(strlen(temp_pointer) + 1); if (remote_address == NULL) { /* memory error */ @@ -601,7 +689,11 @@ if (!strcmp(remote_address, "0.0.0.0")) { remote_hostname = "localhost"; } - else if (lookup_ip(remote_address, &temp_pointer)) { +#ifdef INET6 + else if (lookup_ip(remote_address, &temp_pointer,remote_socket)) { +#else + else if (lookup_ip(remote_address, &temp_pointer)) { +#endif has_reverse_dns = TRUE; /* save the remote hostname (returned from lookup_ip()) */ @@ -616,7 +708,11 @@ /* ok, we should now have hostname and address based on the real */ /* IP address. Let's check the forward DNS of remote_hostname */ /* and see if we get the same address.. */ +#ifndef INET6 has_matching_dns = check_name_for_ip(remote_hostname, inet_ntoa(remote_socket->sin_addr)); +#else + has_matching_dns = check_name_for_ip(remote_hostname, *remote_socket); +#endif } else { has_reverse_dns = FALSE; Index: wu-ftpd/src/extensions.c diff -u wu-ftpd/src/extensions.c:1.1.1.5 wu-ftpd/src/extensions.c:1.3 --- wu-ftpd/src/extensions.c:1.1.1.5 Sun Sep 24 05:54:33 2000 +++ wu-ftpd/src/extensions.c Sun Sep 24 05:56:15 2000 @@ -950,7 +950,9 @@ void newer(char *date, char *path, int showlots) { +#if !defined(__linux__) && !defined(INET6) extern int ftw(const char *path, int (*fn) (char *, struct stat *, int), int depth); +#endif struct tm tm; if (sscanf(date, "%04d%02d%02d%02d%02d%02d", Index: wu-ftpd/src/ftpcmd.y diff -u wu-ftpd/src/ftpcmd.y:1.1.1.6 wu-ftpd/src/ftpcmd.y:1.15 --- wu-ftpd/src/ftpcmd.y:1.1.1.6 Thu Jul 11 10:53:06 2002 +++ wu-ftpd/src/ftpcmd.y Thu Jul 11 10:58:21 2002 @@ -54,17 +54,25 @@ #include #include #include +#include #include "extensions.h" #include "pathnames.h" #include "proto.h" +#include "sockunion.h" + + +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 64 /* may be too big */ +#endif + extern int dolreplies; #ifndef INTERNAL_LS extern char ls_long[50]; extern char ls_short[50]; #endif -extern struct sockaddr_in data_dest; -extern struct sockaddr_in his_addr; /* added. _H */ +extern union sockunion data_dest; +extern union sockunion his_addr; /* added. _H */ extern int logged_in; extern struct passwd *pw; extern int anonymous; @@ -127,7 +135,7 @@ #endif static unsigned short cliport = 0; -static struct in_addr cliaddr; +static union sockunion cliaddr; static int cmd_type; static int cmd_form; static int cmd_bytesz; @@ -135,7 +143,9 @@ char *fromname; /* Debian linux bison fix: moved this up, added forward decls */ - +#ifdef INET6 +char tmpaddr[INET6_ADDRSTRLEN]; +#endif struct tab { char *name; short token; @@ -162,6 +172,7 @@ %token A B C E F I L N P R S T + ALL SP CRLF COMMA STRING NUMBER @@ -173,6 +184,8 @@ STAT HELP NOOP MKD RMD PWD CDUP STOU SMNT SYST SIZE MDTM + LPRT LPSV EPRT EPSV + UMASK IDLE CHMOD GROUP GPASS NEWER MINFO INDEX EXEC ALIAS CDPATH GROUPS CHECKMETHOD CHECKSUM @@ -187,6 +200,7 @@ %type STRING password pathname pathstring username method %type NUMBER byte_size check_login form_code %type struct_code mode_code octal_number +%type ALL %start cmd_list @@ -221,36 +235,253 @@ } | PORT check_login SP host_port CRLF = { +#ifdef INET6 + char hname[INET6_ADDRSTRLEN]; +#else + char hname[MAXHOSTNAMELEN]; +#endif + char *port_host; if (log_commands) syslog(LOG_INFO, "PORT"); /* H* port fix, part B: admonish the twit. Also require login before PORT works */ if ($2) { -#ifndef DISABLE_PORT - if (((cliaddr.s_addr == his_addr.sin_addr.s_addr) - || (port_allowed(inet_ntoa(cliaddr)))) - && (ntohs(cliport) > 1023)) { +#ifndef DISABLE_PORT /*noro*/ + if (cliaddr.su_family == AF_INET){ + port_host=inet_ntoa(cliaddr.su_sin.sin_addr); + } + if (cliaddr.su_family == AF_INET + && ((cliaddr.su_sin.sin_addr.s_addr == + his_addr.su_sin.sin_addr.s_addr) + || (port_allowed(port_host))) + && ntohs(cliaddr.su_sin.sin_port) > 1023) { +// FIXME - port_allowed() is missing +// if (((cliaddr.s_addr == his_addr.sin_addr.s_addr) +// || (port_allowed(inet_ntoa(cliaddr)))) +// && (ntohs(cliport) > 1023)) { usedefault = 0; if (pdata >= 0) { (void) close(pdata); pdata = -1; } - data_dest.sin_family = AF_INET; - data_dest.sin_addr = cliaddr; - data_dest.sin_port = cliport; +#ifdef SIN6_LEN + memcpy(&data_dest, &cliaddr, cliaddr.su_len); +#else + memcpy(&data_dest, &cliaddr, SA_LEN((struct sockaddr *)&cliaddr)); +#endif reply(200, "PORT command successful."); } else { -#endif memset(&data_dest, 0, sizeof(data_dest)); +#endif +#ifndef INET6 + if (cliaddr.su_family == AF_INET) + strcpy(hname, inet_ntoa(cliaddr.su_sin.sin_addr)); + else + strcpy(hname, "???"); +#else + if (getnameinfo((struct sockaddr *)&cliaddr, +#ifdef SIN6_LEN + cliaddr.su_len, +#else + SA_LEN((struct sockaddr *)&cliaddr), +#endif + hname, sizeof(hname), NULL, 0, NI_NUMERICHOST)) + { + strcpy(hname, "???"); + } +#endif + syslog(LOG_WARNING, "refused PORT %s,%d from %s", - inet_ntoa(cliaddr), ntohs(cliport), remoteident); + hname, ntohs(cliaddr.su_port), remoteident); reply(500, "Illegal PORT Command"); #ifndef DISABLE_PORT } + } + } + | LPRT check_login SP host_long_port4 CRLF + = { +#ifdef INET6 + char hname[INET6_ADDRSTRLEN]; +#else + char hname[MAXHOSTNAMELEN]; +#endif + if (log_commands) syslog(LOG_INFO, "LPRT"); + usedefault = 0; + if (pdata >= 0) { + (void) close(pdata); + pdata = -1; + } + if ($2) { + if (cliaddr.su_family == AF_INET) { +#ifdef SIN6_LEN + memcpy(&data_dest, &cliaddr, cliaddr.su_len); +#else + memcpy(&data_dest, &cliaddr, SA_LEN((struct sockaddr *)&cliaddr)); +#endif + reply(200, "LPRT command successful."); + } else { + memset(&data_dest, 0, sizeof(data_dest)); +#ifndef INET6 + if (cliaddr.su_family == AF_INET) + strcpy(hname, inet_ntoa(cliaddr.su_sin.sin_addr)); + else + strcpy(hname, "???"); +#else + if (getnameinfo((struct sockaddr *)&cliaddr, +#ifdef SIN6_LEN + cliaddr.su_len, +#else + SA_LEN((struct sockaddr *)&cliaddr), +#endif + hname, sizeof(hname), NULL, 0, NI_NUMERICHOST)) { + strcpy(hname, "???"); + } +#endif + syslog (LOG_WARNING, "refused LPRT %s,%d from %s", + hname, ntohs(cliaddr.su_port), remotehost); + reply(500, "Illegal LPRT Command"); + } #endif } } + | LPRT check_login SP host_long_port6 CRLF + = { +#ifdef INET6 + char hname[INET6_ADDRSTRLEN]; + + if (log_commands) syslog(LOG_INFO, "LPRT"); + usedefault = 0; + if (pdata >= 0) { + (void) close(pdata); + pdata = -1; + } + if ($2) { + if (cliaddr.su_family == AF_INET6) { +#ifdef SIN6_LEN + memcpy(&data_dest, &cliaddr, cliaddr.su_len); +#else + memcpy(&data_dest, &cliaddr, SA_LEN((struct sockaddr *)&cliaddr)); +#endif + reply(200, "LPRT command successful."); + } else { + memset(&data_dest, 0, sizeof(data_dest)); +#ifdef SIN6_LEN + if (getnameinfo((struct sockaddr *)&cliaddr, cliaddr.su_len, +#else + if (getnameinfo((struct sockaddr *)&cliaddr, SA_LEN((struct sockaddr *)&cliaddr), +#endif + hname, sizeof(hname), NULL, 0, NI_NUMERICHOST)) { + strcpy(hname, "???"); + } + syslog (LOG_WARNING, "refused LPRT %s,%d from %s", + hname, ntohs(cliaddr.su_port), remotehost); + reply(500, "Illegal LPRT Command"); + } + } +#else + reply(500, "IPv6 LPRT not supported."); +#endif + } + | EPRT SP STRING CRLF + = { +#ifdef INET6 + char *tmp = NULL; + char *result[3]; + char *p, *q; + char delim; + struct addrinfo hints; + struct addrinfo *res; + int i; + + if (log_commands) syslog(LOG_INFO, "EPRT"); + usedefault = 0; + if (pdata >= 0) { + (void) close(pdata); + pdata = -1; + } + + /*XXX checks for login */ + + tmp = strdup($3); + if (!tmp) { + fatal("not enough core."); + /*NOTREACHED*/ + } + p = tmp; + delim = p[0]; + p++; + memset(result, 0, sizeof(result)); + for (i = 0; i < 3; i++) { + q = strchr(p, delim); + if (!q || *q != delim) { + parsefail: + reply(500, "Invalid argument, rejected."); + if (tmp) + free(tmp); + usedefault = 1; + goto eprt_done; + } + *q++ = '\0'; + result[i] = p; + p = q; + } + + /* some more sanity check */ + p = result[0]; + while (*p) { + if (!isdigit(*p)) + goto parsefail; + p++; + } + p = result[2]; + while (*p) { + if (!isdigit(*p)) + goto parsefail; + p++; + } + + memset(&hints, 0, sizeof(hints)); + if (atoi(result[0]) == 1) + hints.ai_family = PF_INET; + if (atoi(result[0]) == 2) + hints.ai_family = PF_INET6; + else + hints.ai_family = PF_UNSPEC; /*XXX*/ + hints.ai_socktype = SOCK_STREAM; +#if defined(HAVE_GETADDRINFO) && !defined(BOKEN_GETADDRINFO) + if (getaddrinfo(result[1], result[2], &hints, &res)) + goto parsefail; + memcpy(&data_dest, res->ai_addr, res->ai_addrlen); +#else + data_dest.su_family = hints.ai_family; + data_dest.su_port=htons(atoi(result[2])); + if (data_dest.su_family == PF_INET){ +#ifdef SIN6_LEN + data_dest.su_len = sizeof(struct sockaddr_in); +#endif + inet_pton(data_dest.su_family,result[1],&(data_dest.su_sin.sin_addr.s_addr)); + }else if(data_dest.su_family == PF_INET6){ +#ifdef SIN6_LEN + data_dest.su_len = sizeof(struct sockaddr_in6); +#endif + inet_pton(data_dest.su_family,result[1],&(data_dest.su_sin6.sin6_addr.s6_addr)); + } +#endif /* HAVE_GETADDRINFO && ! BROKEN_GETADDRINFO */ + free(tmp); + tmp = NULL; + + if (data_dest.su_family != AF_INET + && data_dest.su_family != AF_INET6) { + reply(500, "unsupported address family."); + usedefault = 1; + } else + reply(200, "EPRT command successful."); + eprt_done:; +#else + reply(500, "EPRT not supported."); +#endif + } | PASV check_login CRLF = { /* Require login for PASV, too. This actually fixes a bug -- telnet to an @@ -260,6 +491,50 @@ if ($2) #if (defined (DISABLE_PORT) || !defined (DISABLE_PASV)) passive(); + } + | LPSV check_login CRLF + = { +/* Require login for PASV, too. This actually fixes a bug -- telnet to an + unfixed wu-ftpd and type PASV first off, and it crashes! */ + if (log_commands) syslog(LOG_INFO, "LPSV"); + if ($2) + long_passive("LPSV", PF_UNSPEC); + } + | EPSV check_login SP NUMBER CRLF + = { + if ($2) { + int pf; + switch ($4) { + case 1: + pf = PF_INET; + break; +#ifdef INET6 + case 2: + pf = PF_INET6; + break; +#endif + default: + pf = -1; /*junk value*/ + break; + } + long_passive("EPSV", pf); + } + } + | EPSV check_login SP ALL CRLF + = { + if ($2) { + reply(200, + "EPSV ALL command successful."); + /* further processing required */ + } + } + | EPSV check_login CRLF + = { +/* Require login for PASV, too. This actually fixes a bug -- telnet to an + unfixed wu-ftpd and type PASV first off, and it crashes! */ + if (log_commands) syslog(LOG_INFO, "EPSV"); + if ($2) + long_passive("EPSV", PF_UNSPEC); #else reply(425, "Cannot open passive connection"); #endif @@ -1003,19 +1278,73 @@ host_port: NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER = { - register char *a, *p; + register char *a; - a = (char *) &cliaddr; + + memset(&cliaddr, 0, sizeof(cliaddr)); + cliaddr.su_family = AF_INET; +#ifdef SIN6_LEN + cliaddr.su_len = sizeof(struct sockaddr_in); +#endif + a = (char *)&cliaddr.su_sin.sin_addr; a[0] = $1; a[1] = $3; a[2] = $5; a[3] = $7; - p = (char *) &cliport; - p[0] = $9; - p[1] = $11; + cliaddr.su_port = ntohs((($9 & 0xff) << 8) | $11); } ; +host_long_port4: NUMBER COMMA NUMBER COMMA + NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA + NUMBER COMMA NUMBER COMMA NUMBER + = { + register char *a; + + memset(&cliaddr, 0, sizeof(cliaddr)); + if ($1 == 4 && $3 == 4 && $13 == 2) { + cliaddr.su_family = AF_INET; +#ifdef SIN6_LEN + cliaddr.su_len = sizeof(struct sockaddr_in); +#endif + a = (char *)&cliaddr.su_sin.sin_addr; + a[0] = $5; a[1] = $7; a[2] = $9; a[3] = $11; + cliaddr.su_port = ntohs((($13 & 0xff) << 8) | $15); + } else { + /* ??? */ + } + } + ; + +host_long_port6: NUMBER COMMA NUMBER COMMA + NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA + NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA + NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA + NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA + NUMBER COMMA NUMBER COMMA NUMBER + = { + register char *a; + + memset(&cliaddr, 0, sizeof(cliaddr)); +#ifdef INET6 + if ($1 == 6 && $3 == 16 && $37 == 2) { + cliaddr.su_family = AF_INET6; +#ifdef SIN6_LEN + cliaddr.su_len = sizeof(struct sockaddr_in6); +#endif + a = (char *)&cliaddr.su_sin6.sin6_addr; + a[0] = $5; a[1] = $7; a[2] = $9; a[3] = $11; + a[4] = $13; a[5] = $15; a[6] = $17; a[7] = $19; + a[8] = $21; a[9] = $23; a[10] = $25; a[11] = $27; + a[12] = $29; a[13] = $31; a[14] = $33; a[15] = $35; + cliaddr.su_port = ntohs((($39 & 0xff) << 8) | $41); + } else { + /* ??? */ + } +#endif + } + ; + form_code: N = { $$ = FORM_N; @@ -1295,6 +1624,10 @@ {"STOU", STOU, STR1, 1, " file-name"}, {"SIZE", SIZE, OSTR, 1, " path-name"}, {"MDTM", MDTM, OSTR, 1, " path-name"}, + {"LPRT", LPRT, ARGS, 1, " af, hal, h1, h2, .., pal, p1, p2, ..." }, + {"LPSV", LPSV, ARGS, 1, "(set server in passive mode)" }, + {"EPRT", EPRT, STR1, 1, " |af|addr|port|" }, + {"EPSV", EPSV, ARGS, 1, "[ af|ALL]" }, {NULL, 0, 0, 0, 0} }; @@ -1649,6 +1982,11 @@ yylval.Number = atoi(cp); cbuf[cpos] = c; return (NUMBER); + } + if (strncasecmp(&cbuf[cpos], "ALL", 3) == 0 + && !isalnum(cbuf[cpos + 3])) { + cpos += 3; + return ALL; } switch (cbuf[cpos++]) { Index: wu-ftpd/src/ftpd.c diff -u wu-ftpd/src/ftpd.c:1.1.1.6 wu-ftpd/src/ftpd.c:1.18.2.2 --- wu-ftpd/src/ftpd.c:1.1.1.6 Thu Jul 11 10:53:06 2002 +++ wu-ftpd/src/ftpd.c Fri Jan 30 22:34:40 2004 @@ -81,6 +81,7 @@ #define VA_END va_end(ap) #include "proto.h" +#include "sockunion.h" #ifdef HAVE_UFS_QUOTA_H #include @@ -193,6 +194,10 @@ #ifdef MAIL_ADMIN #define MAILSERVERS 10 #define INCMAILS 10 + +#ifndef MAXSOCK +#define MAXSOCK 10 +#endif int mailservers = 0; char *mailserver[MAILSERVERS]; int incmails = 0; @@ -228,12 +233,15 @@ extern off_t restart_point; extern int yyerrorcalled; -struct sockaddr_in ctrl_addr; -struct sockaddr_in data_source; -struct sockaddr_in data_dest; -struct sockaddr_in his_addr; -struct sockaddr_in pasv_addr; -struct sockaddr_in vect_addr; +union sockunion ctrl_addr; +union sockunion data_source; +union sockunion data_dest; +union sockunion his_addr; +union sockunion pasv_addr; +union sockunion vect_addr; +#ifdef INET6 +u_short protocol_family = AF_UNSPEC; +#endif int route_vectored = 0; int passive_port_min = -1; int passive_port_max = -1; @@ -356,9 +364,15 @@ char defhome[] = "/"; #endif char tmpline[7]; +#ifndef INET6 char hostname[MAXHOSTNAMELEN]; char remotehost[MAXHOSTNAMELEN]; char remoteaddr[MAXHOSTNAMELEN]; +#else +char hostname[INET6_ADDRSTRLEN]; +char remotehost[INET6_ADDRSTRLEN]; +char remoteaddr[INET6_ADDRSTRLEN]; +#endif char *remoteident = "[nowhere yet]"; /* log failures 27-apr-93 ehk/bm */ @@ -424,7 +438,8 @@ #endif #ifdef HAVE_LIBRESOLV -int initialize_dns(struct sockaddr_in *remote_socket); +/*int initialize_dns(struct sockaddr_in *remote_socket);*/ +int initialize_dns(union sockunion *remote_socket); int check_reverse_dns(void); int check_matching_dns(void); #endif @@ -461,6 +476,8 @@ int ultrix_check_pass(char *passwd, char *xpasswd); #endif +int family = AF_INET; + #ifdef USE_PAM #if defined(ULTRIX_AUTH) || defined(SECUREOSF) || defined(KERBEROS) || defined(SKEY) || defined (OPIE) || defined (BSD_AUTH) #error No other auth methods are allowed with PAM. @@ -478,6 +495,7 @@ #ifdef DAEMON int be_daemon = 0; /* Run standalone? */ int daemon_port = 0; +char **daemon_port_ptr; void do_daemon(int argc, char **argv, char **envp); #endif int Bypass_PID_Files = 0; @@ -504,7 +522,7 @@ #else int send_data(FILE *, FILE *, off_t); #endif -void dolog(struct sockaddr_in *); +void dolog(struct sockaddr *); void dologout(int); void perror_reply(int, char *); int denieduid(uid_t); @@ -572,7 +590,7 @@ int addrlen; #endif int on = 1; -#ifdef IPTOS_LOWDELAY +#if defined(IPTOS_SUPPORT) && defined(IPTOS_LOWDELAY) int tos; #endif int c; @@ -581,7 +599,13 @@ #endif extern int optopt; extern char *optarg; +#ifndef INET6 struct hostent *shp; +#else + struct addrinfo hints; + struct addrinfo *res; + int error; +#endif struct aclmember *entry; #ifdef VIRTUAL #if defined(UNIXWARE) || defined(AIX) @@ -589,8 +613,13 @@ #else int virtual_len; #endif - struct sockaddr_in *virtual_ptr; - struct sockaddr_in virtual_addr; + union sockunion *virtual_ptr; + union sockunion virtual_addr; +#ifdef INET6 + char ntop_buf[INET6_ADDRSTRLEN]; +#else + char ntop_buf[MAXHOSTNAMELEN]; +#endif #endif #ifndef DAEMON struct servent *serv; @@ -633,23 +662,54 @@ exit(1); #endif } -#ifdef IPTOS_LOWDELAY - tos = IPTOS_LOWDELAY; - if (setsockopt(0, IPPROTO_IP, IP_TOS, (char *) &tos, sizeof(int)) < 0) - syslog(LOG_WARNING, "setsockopt (IP_TOS): %m"); +#ifdef INET6 + if (his_addr.su_family == AF_INET6) { + if (IN6_IS_ADDR_V4MAPPED(&his_addr.su_sin6.sin6_addr)) { + his_addr.su_family = AF_INET; + /* + * XXX: memcpy is dangerous here, since we are about to rewrite + * almost same area. (This is actually safe, but I dare to use + * memmove with this notice.) + */ + memmove(&his_addr.su_sin.sin_addr, + &his_addr.su_sin6.sin6_addr.s6_addr[12], + sizeof(his_addr.su_sin.sin_addr)); +#ifdef SIN6_LEN + his_addr.su_len = sizeof(struct sockaddr_in); +#endif + protocol_family = AF_INET; + } else + protocol_family = AF_INET6; + }; +#endif + +#if defined(IPTOS_SUPPORT) && defined(IPTOS_LOWDELAY) + if (ctrl_addr.su_family == AF_INET) { + tos = IPTOS_LOWDELAY; + if (setsockopt(0, IPPROTO_IP, IP_TOS, (char *) &tos, sizeof(int)) < 0) + syslog(LOG_WARNING, "setsockopt (IP_TOS): %m"); + } #endif serv = getservbyname("ftp-data", "tcp"); if (serv != NULL) data_source.sin_port = serv->s_port; else - data_source.sin_port = htons(ntohs(ctrl_addr.sin_port) - 1); + data_source.su_port = htons(ntohs(ctrl_addr.su_sin.sin_port) - 1); #endif /* DAEMON */ #ifndef DAEMON - while ((c = getopt(argc, argv, ":aAvdlLiIoP:qQr:t:T:u:wVWX")) != -1) { + while ((c = getopt(argc, argv, ":aAvdlLiIoP:qQr:t:T:u:wVWX" +#ifdef INET6 + "46" +#endif + )) != -1) { #else /* DAEMON */ - while ((c = getopt(argc, argv, ":aAvdlLiIop:P:qQr:sSt:T:u:VwWX")) != -1) { + while ((c = getopt(argc, argv, ":aAvdlLiIop:P:qQr:sSt:T:u:VwWX" +#ifdef INET6 + "46" +#endif + )) != -1) { #endif /* DAEMON */ switch (c) { @@ -706,12 +766,13 @@ break; case 'P': - data_source.sin_port = htons(atoi(optarg)); + data_source.su_port = htons(atoi(optarg)); /* XXX */ break; #ifdef DAEMON case 'p': daemon_port = atoi(optarg); + daemon_port_ptr = &optarg; break; case 's': @@ -752,9 +813,19 @@ print_copyright(); exit(0); /* NOTREACHED */ - case 'w': - wtmp_logging = 1; +#ifdef INET6 + case '4': + family = AF_INET; + break; + + case '6': + family = AF_INET6; break; +#endif /* INET6 */ + + case 'w': + wtmp_logging = 1; + break; case 'W': wtmp_logging = 0; @@ -991,7 +1062,27 @@ exit(1); #endif } -#ifdef IPTOS_LOWDELAY +#ifdef INET6 + if (his_addr.su_family == AF_INET6){ + if (IN6_IS_ADDR_V4MAPPED(&his_addr.su_sin6.sin6_addr)) { + his_addr.su_family = AF_INET; + /* + * XXX: memcpy is dangerous here, since we are about to rewrite + * almost same area. (This is actually safe, but I dare to use + * memmove with this notice.) + */ + memmove(&his_addr.su_sin.sin_addr, + &his_addr.su_sin6.sin6_addr.s6_addr[12], + sizeof(his_addr.su_sin.sin_addr)); +#ifdef SIN6_LEN + his_addr.su_len = sizeof(struct sockaddr_in); +#endif + protocol_family = AF_INET; + } else + protocol_family = AF_INET6; + }; +#endif +#if defined(IPTOS_SUPPORT) && defined(IPTOS_LOWDELAY) tos = IPTOS_LOWDELAY; if (setsockopt(0, IPPROTO_IP, IP_TOS, (char *) &tos, sizeof(int)) < 0) syslog(LOG_WARNING, "setsockopt (IP_TOS): %m"); @@ -1000,7 +1091,14 @@ if (setsockopt(0, SOL_SOCKET, SO_KEEPALIVE, (char *) &on, sizeof(on)) < 0) syslog(LOG_ERR, "setsockopt SO_KEEPALIVE %m"); - data_source.sin_port = htons(ntohs(ctrl_addr.sin_port) - 1); +#ifndef INET6 + data_source.su_sin.sin_port = htons(ntohs(ctrl_addr.su_sin.sin_port) - 1); +#else + if (ctrl_addr.su_family == AF_INET) + data_source.su_sin.sin_port = htons(ntohs(ctrl_addr.su_sin.sin_port) - 1); + else + data_source.su_sin6.sin6_port = htons(ntohs(ctrl_addr.su_sin6.sin6_port) - 1); +#endif #endif /* DAEMON */ /* Try to handle urgent data inline */ @@ -1034,7 +1132,7 @@ initialize_dns(&his_addr); #endif - dolog(&his_addr); + dolog((struct sockaddr *)&his_addr); /* Set up default state */ data = -1; type = TYPE_A; @@ -1056,11 +1154,23 @@ (void) gethostname(hostname, sizeof(hostname)); #endif /* set the FQDN here */ +#ifndef INET6 shp = gethostbyname(hostname); if (shp != NULL) { (void) strncpy(hostname, shp->h_name, sizeof(hostname)); hostname[sizeof(hostname) - 1] = '\0'; } +#else + memset(&hints, 0, sizeof(hints)); + hints.ai_family = PF_UNSPEC; + error = getaddrinfo(hostname, NULL, &hints, &res); + if (!error && res && res->ai_canonname) { + syslog(LOG_DEBUG, "got canonname %s", res->ai_canonname); + (void) strncpy(hostname, res->ai_canonname, sizeof(hostname)); + (void) strncpy(hostname, res->ai_canonname, sizeof(hostname)); + hostname[sizeof(hostname)-1]='\0'; + } +#endif /* INET6 */ } route_vectored = routevector(); conv_init(); @@ -1100,14 +1210,38 @@ virtual_hostname[0] = '\0'; virtual_address[0] = '\0'; virtual_len = sizeof(virtual_addr); - if (getsockname(0, (struct sockaddr *) &virtual_addr, &virtual_len) == 0) { - virtual_ptr = (struct sockaddr_in *) &virtual_addr; - strcpy(virtual_address, inet_ntoa(virtual_ptr->sin_addr)); - shp = gethostbyaddr((char *) &virtual_ptr->sin_addr, sizeof(struct in_addr), AF_INET); + if (getsockname(0, (struct sockaddr *) &virtual_addr, &virtual_len) == 0 +#ifndef INET6 + && virtual_addr.su_family == AF_INET +#endif + ) { + virtual_ptr = &virtual_addr; +#ifndef INET6 + strcpy (virtual_address, inet_ntoa(virtual_ptr->su_sin.sin_addr)); + shp = gethostbyaddr((char *) &virtual_ptr->su_sin.sin_addr, sizeof (struct in_addr), AF_INET); if (shp != NULL) { (void) strncpy(virtual_hostname, shp->h_name, sizeof(virtual_hostname)); virtual_hostname[sizeof(virtual_hostname) - 1] = '\0'; } +#else + getnameinfo((struct sockaddr *)virtual_ptr, +#ifdef SIN6_LEN + virtual_ptr->su_len, +#else + SA_LEN((struct sockaddr *)virtual_ptr), +#endif + virtual_address, sizeof(virtual_address), + NULL, 0, NI_NUMERICHOST); + getnameinfo((struct sockaddr *)virtual_ptr, +#ifdef SIN6_LEN + virtual_ptr->su_len, +#else + SA_LEN((struct sockaddr *)virtual_ptr), +#endif + virtual_hostname, sizeof(virtual_hostname), + NULL, 0, 0); +#endif + entry = (struct aclmember *) NULL; while (getaclentry("virtual", &entry)) { if (!ARG0 || !ARG1 || !ARG2) @@ -4673,12 +4807,23 @@ FILE *getdatasock(char *mode) { int s, on = 1, tries; +#if defined(INET6) && defined(KAME) + char ipv4addr[MAXHOSTNAMELEN+1],ipv6addr[INET6_ADDRSTRLEN+1]; +#endif /* INET6 && ! KAME */ if (data >= 0) return (fdopen(data, mode)); delay_signaling(); /* we can't allow any signals while euid==0: kinch */ (void) seteuid((uid_t) 0); - s = socket(AF_INET, SOCK_STREAM, 0); +#ifdef KAME + if ((ctrl_addr.su_family == AF_INET6) && (data_dest.su_family == AF_INET)){ + s = socket(data_dest.su_family, SOCK_STREAM, 0); + } else { + s = socket(ctrl_addr.su_family, SOCK_STREAM, 0); + }; +#else /* KAME */ + s = socket(ctrl_addr.su_family, SOCK_STREAM, 0); +#endif /* KAME */ if (s < 0) goto bad; if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, @@ -4690,16 +4835,33 @@ (void) setsockopt(s, SOL_SOCKET, (*mode == 'w' ? SO_SNDBUF : SO_RCVBUF), (char *) &TCPwindowsize, sizeof(TCPwindowsize)); /* anchor socket to avoid multi-homing problems */ - data_source.sin_family = AF_INET; - data_source.sin_addr = ctrl_addr.sin_addr; +#ifdef KAME + if ((ctrl_addr.su_family==AF_INET6)&&(data_dest.su_family==AF_INET)){ + data_source.su_family=AF_INET; + inet_ntop(ctrl_addr.su_family,ctrl_addr.su_sin6.sin6_addr.s6_addr,ipv6addr,ctrl_addr.su_len); + memcpy(ipv4addr,ipv6addr+7,strlen(ipv6addr+7)); + inet_pton(AF_INET,ipv4addr,&(data_source.su_sin.sin_addr.s_addr)); + data_source.su_len=sizeof(struct sockaddr_in); + } else { + data_source = ctrl_addr; + data_source.su_port = htons(ntohs(data_source.su_port) - 1); + } +#else + data_source = ctrl_addr; + data_source.su_port = htons(ntohs(data_source.su_port) - 1); +#endif /* KAME */ #if defined(VIRTUAL) && defined(CANT_BIND) /* can't bind to virtual address */ data_source.sin_addr.s_addr = htonl(INADDR_ANY); #endif for (tries = 1;; tries++) { - if (bind(s, (struct sockaddr *) &data_source, - sizeof(data_source)) >= 0) +#ifdef SIN6_LEN + if (bind(s, (struct sockaddr *) &data_source,data_source.su_len) >= 0) + break; +#else + if (bind(s, (struct sockaddr *) &data_source,su_len(data_source.su_family)) >= 0) break; +#endif /* SIN6_LEN */ if (errno != EADDRINUSE || tries > 10) goto bad; sleep(tries); @@ -4719,7 +4881,8 @@ (void) seteuid((uid_t) pw->pw_uid); enable_signaling(); /* we can allow signals once again: kinch */ -#ifdef IPTOS_THROUGHPUT + if (ctrl_addr.su_family == AF_INET) { +#if defined(IPTOS_SUPPORT) && defined(IPTOS_LOWDELAY) on = IPTOS_THROUGHPUT; if (setsockopt(s, IPPROTO_IP, IP_TOS, (char *) &on, sizeof(int)) < 0) syslog(LOG_WARNING, "setsockopt (IP_TOS): %m"); @@ -4735,7 +4898,7 @@ if (setsockopt(s, IPPROTO_TCP, TCP_NOPUSH, (char *) &on, sizeof on) < 0) syslog(LOG_WARNING, "setsockopt (TCP_NOPUSH): %m"); #endif - + } return (fdopen(s, mode)); bad: on = errno; /* hold errno for return */ @@ -4753,9 +4916,15 @@ FILE *file; int retry = 0; int on = 1; + int cval, serrno; #ifdef IPTOS_LOWDELAY int tos; #endif +#ifdef INET6 + char ntop_buf[INET6_ADDRSTRLEN]; +#else + char ntop_buf[MAXHOSTNAMELEN]; +#endif #ifdef THROUGHPUT int bps; double bpsmult; @@ -4768,8 +4937,12 @@ else (void) strcpy(sizebuf, ""); if (pdata >= 0) { - struct sockaddr_in from; + union sockunion from; +#ifndef INET6 char dataaddr[MAXHOSTNAMELEN]; +#else + char dataaddr[INET6_ADDRSTRLEN]; +#endif #if defined(UNIXWARE) || defined(AIX) size_t fromlen = sizeof(from); #else @@ -4821,12 +4994,35 @@ (void) close(pdata); pdata = s; #ifdef IPTOS_LOWDELAY + if (from.su_family == AF_INET) { tos = IPTOS_LOWDELAY; (void) setsockopt(s, IPPROTO_IP, IP_TOS, (char *) &tos, sizeof(int)); - + } +#endif +#ifndef INET6 + switch (from.su_family) { + case AF_INET: + (void) strncpy(dataaddr, inet_ntop(from.su_family, + &from.su_sin.sin_addr, ntop_buf, sizeof(ntop_buf)), + sizeof(dataaddr)); + break; + default: + strncpy(dataaddr, "invalid", sizeof(dataaddr)); + break; + } +#else + if (getnameinfo((struct sockaddr *)&from, +#ifdef SIN6_LEN + from.su_len, +#else + su_len(from.su_family), +#endif + dataaddr, sizeof(dataaddr), NULL, 0, + NI_NUMERICHOST) != 0) { + strncpy(dataaddr, "invalid", sizeof(dataaddr)); + } #endif - (void) strncpy(dataaddr, inet_ntoa(from.sin_addr), sizeof(dataaddr)); if (!pasv_allowed(dataaddr)) if (strcasecmp(dataaddr, remoteaddr) != 0) { /* @@ -4841,11 +5037,12 @@ (void) close(pdata); pdata = -1; return (NULL); -#else +#else /* FIGHT_PASV_PORT_RACE */ + syslog(LOG_NOTICE, "%s of %s: data connect from %s for %s%s", anonymous ? guestpw : pw->pw_name, remoteident, dataaddr, name, sizebuf); -#endif +#endif /* FIGHT_PASV_PORT_RACE */ } #ifdef THROUGHPUT throughput_calc(name, &bps, &bpsmult); @@ -4868,37 +5065,100 @@ } if (usedefault) data_dest = his_addr; - if (data_dest.sin_port == 0) { + if (data_dest.su_sin.sin_port == 0) { reply(500, "Can't build data connection: no PORT specified"); return (NULL); } usedefault = 1; - file = getdatasock(mode); - if (file == NULL) { - reply(425, "Can't create data socket (%s,%d): %s.", - inet_ntoa(data_source.sin_addr), - ntohs(data_source.sin_port), strerror(errno)); - return (NULL); - } - data = fileno(file); - (void) signal(SIGALRM, alarm_signal); - alarm(timeout_connect); - while (connect(data, (struct sockaddr *) &data_dest, - sizeof(data_dest)) < 0) { + do { + file = getdatasock(mode); + if (file == NULL) { +#ifndef INET6 + switch (data_source.su_family) { + case AF_INET: + inet_ntop(data_source.su_family, &data_source.su_sin.sin_addr, + ntop_buf, sizeof(ntop_buf)); + break; + default: + strncpy(ntop_buf, "???", sizeof(ntop_buf)); + break; + } +#else + if (getnameinfo((struct sockaddr *)&data_source, +#ifdef SIN6_LEN + data_source.su_len, +#else + su_len(data_source.su_family), +#endif + ntop_buf, sizeof(ntop_buf), NULL, 0, NI_NUMERICHOST) != 0) { + strncpy(ntop_buf, "???", sizeof(ntop_buf)); + } +#endif + reply(425, "Can't create data socket (%s,%d): %s.", + ntop_buf, ntohs(data_source.su_port), strerror(errno)); + return (NULL); + } + data = fileno(file); + (void) signal(SIGALRM, alarm_signal); + alarm(timeout_connect); + +#if defined(INET6) && !defined(KAME) + if ((data_dest.su_family == AF_INET) && + (ctrl_addr.su_family == AF_INET6)) { + /* convert an IPv4 address to an IPv4-mapped IPv6 address. */ + + /* + * XXX: memcpy is dangerous here, since we are about to rewrite + * almost same area. (This is actually safe, but I dare to use + * memmove with this notice.) + */ + memmove(&data_dest.su_sin6.sin6_addr.s6_addr[12], + &data_dest.su_sin.sin_addr.s_addr, + sizeof(data_dest.su_sin.sin_addr.s_addr)); + /* + * fill 0 in the upper 80 bits of the address, and 0xffff in the + * succeeding 16 bits. + */ + memset(&data_dest.su_sin6.sin6_addr.s6_addr, 0, 10); + data_dest.su_sin6.sin6_addr.s6_addr[10] = 0xff; + data_dest.su_sin6.sin6_addr.s6_addr[11] = 0xff; + + data_dest.su_family = AF_INET6; + } +#endif /* INET6 && ! KAME */ + + cval = connect(data, (struct sockaddr *) &data_dest, +#ifdef SIN6_LEN + data_dest.su_len +#else + su_len(data_dest.su_family) +#endif + ); + serrno = errno; alarm(0); - if ((errno == EADDRINUSE || errno == EINTR) && retry < swaitmax) { - sleep((unsigned) swaitint); - retry += swaitint; - (void) signal(SIGALRM, alarm_signal); - alarm(timeout_connect); - continue; + if (cval == -1) { + /* + * When connect fails, the state of the socket is unspecified so + * it should be closed and a new socket created for each connection + * attempt. This also prevents denial of service problems when + * running on operating systems that only allow one non-connected + * socket bound to the same local address. + */ + (void) fclose(file); + data = -1; + errno = serrno; + if ((errno == EADDRINUSE || errno == EINTR) && retry < swaitmax) { + sleep((unsigned) swaitint); + retry += swaitint; + } + else { + syslog(LOG_INFO,"error = %d\n",errno); + syslog(LOG_INFO,"error = %s\n",strerror(errno)); + perror_reply(425, "Can't build data connection"); + return (NULL); + } } - perror_reply(425, "Can't build data connection"); - (void) fclose(file); - data = -1; - return (NULL); - } - alarm(0); + } while (cval == -1); if (keepalive) (void) setsockopt(pdata, SOL_SOCKET, SO_KEEPALIVE, (char *) &on, sizeof(on)); if (TCPwindowsize) @@ -5328,16 +5588,38 @@ void statcmd(void) { - struct sockaddr_in *sin; + union sockunion *su; u_char *a, *p; +#ifdef INET6 + char ntop_buf[INET6_ADDRSTRLEN]; +#else + char ntop_buf[MAXHOSTNAMELEN]; +#endif lreply(211, "%s FTP server status:", hostname); lreply(0, " %s", version); +#ifndef INET6 if (!isdigit(remotehost[0])) lreply(0, " Connected to %s (%s)", remotehost, - inet_ntoa(his_addr.sin_addr)); + inet_ntoa(his_addr.su_sin.sin_addr)); else lreply(0, " Connected to %s", remotehost); +#else + ntop_buf[0] = '\0'; + if (getnameinfo((struct sockaddr *)&his_addr, +#ifdef SIN6_LEN + his_addr.su_len, +#else + SA_LEN((struct sockaddr *)&his_addr), +#endif + ntop_buf, sizeof(ntop_buf), NULL, 0, NI_NUMERICHOST) != 0) { + strncpy(ntop_buf, "???", sizeof(ntop_buf)); + } + if (strcmp(remotehost, ntop_buf) == 0) + lreply(0, " Connected to %s", remotehost); + else + lreply(0, " Connected to %s (%s)", remotehost, ntop_buf); +#endif /* INET6 */ if (logged_in) { if (anonymous) @@ -5367,17 +5649,92 @@ lreply(0, " Data connection open"); else if (pdata != -1 || usedefault == 0) { if (usedefault == 0) - sin = &data_dest; + su = (union sockunion *)&data_dest; else if (route_vectored) - sin = &vect_addr; + su = (union sockunion *)&vect_addr; else - sin = &pasv_addr; - a = (u_char *) & sin->sin_addr; - p = (u_char *) & sin->sin_port; + su = (union sockunion *)&pasv_addr; #define UC(b) (((int) b) & 0xff) - lreply(0, " %s (%d,%d,%d,%d,%d,%d)", - usedefault == 0 ? "PORT" : "in Passive mode", - UC(a[0]), UC(a[1]), UC(a[2]), UC(a[3]), UC(p[0]), UC(p[1])); + /* PORT/PASV */ + if (su->su_family == AF_INET) { + a = (u_char *) & su->su_sin.sin_addr; + p = (u_char *) & su->su_sin.sin_port; + lreply(0, " %s (%d,%d,%d,%d,%d,%d)", + usedefault == 0 ? "PORT" : "PASV", + UC(a[0]), UC(a[1]), UC(a[2]), UC(a[3]), UC(p[0]), UC(p[1])); + } + +#ifdef INET6 + /* LPRT/LPSV */ + { + int alen, af, i; + char replybuf[1024]; + char *p; + + switch (su->su_family) { + case AF_INET: + a = (u_char *) & su->su_sin.sin_addr; + p = (u_char *) & su->su_sin.sin_port; + alen = sizeof(su->su_sin.sin_addr); + af = 4; + break; + case AF_INET6: + a = (u_char *) & su->su_sin6.sin6_addr; + p = (u_char *) & su->su_sin6.sin6_port; + alen = sizeof(su->su_sin6.sin6_addr); + af = 6; + break; + default: + af = 0; + break; + } + if (af) { + p = replybuf; + sprintf(p, " %s (%d,%d,", + usedefault == 0 ? "LPRT" : "LPSV", af, alen); + while (*p) + p++; + for (i = 0; i < alen; i++) { + sprintf(p, "%d,", UC(a[i])); + while (*p) + p++; + } + sprintf(p, "%d,%d,%d)", 2, UC(p[0]), UC(p[1])); + lreply(0, replybuf); + } + } + + /* EPRT/EPSV */ + { + int af; + + switch (su->su_family) { + case AF_INET: + af = 1; + break; + case AF_INET6: + af = 2; + break; + default: + af = 0; + break; + } + if (af) { + if (getnameinfo((struct sockaddr *)su, +#ifdef SIN6_LEN + su->su_len, +#else + su_len(su->su_family), +#endif + ntop_buf, sizeof(ntop_buf), NULL, 0, + NI_NUMERICHOST) == 0) { + lreply(0, " %s (|%d|%s|%d)", + usedefault == 0 ? "EPRT" : "EPSV", af, + ntop_buf, ntohs(su->su_port)); + } + } + } +#endif #undef UC } else @@ -5963,14 +6320,21 @@ } } -void dolog(struct sockaddr_in *sin) +void dolog(struct sockaddr *sa) { #ifndef NO_DNS +#ifndef INET6 struct hostent *hp; char *blah; - + struct sockaddr_in *sin; #ifdef DNS_TRYAGAIN int num_dns_tries = 0; +#endif + + sin = (struct sockaddr_in *)sa; + +#ifdef DNS_TRYAGAIN + /* * 27-Apr-93 EHK/BM * far away connections might take some time to get their IP address @@ -5992,6 +6356,8 @@ #endif blah = inet_ntoa(sin->sin_addr); + syslog(LOG_DEBUG,"remoteaddr = %s\n",remoteaddr); + syslog(LOG_DEBUG,"remotehost = %s\n",remotehost); (void) strncpy(remoteaddr, blah, sizeof(remoteaddr)); @@ -6010,13 +6376,45 @@ } } #else + int error; + +#ifdef SIN6_LEN + error = getnameinfo(sa, sa->sa_len, remotehost, sizeof(remotehost), NULL, + 0, 0); + nameserved = isdigit(remotehost[0]) ? 1 : 0; /* XXX */ + getnameinfo(sa, sa->sa_len, remoteaddr, sizeof(remoteaddr), NULL, + 0, NI_NUMERICHOST); +#else + error = getnameinfo(sa, SA_LEN((struct sockaddr*)sa), remotehost, + sizeof(remotehost), NULL, 0, 0); + nameserved = isdigit(remotehost[0]) ? 1 : 0; /* XXX */ + getnameinfo(sa, SA_LEN((struct sockaddr*)sa), remoteaddr, + sizeof(remoteaddr), NULL, 0, NI_NUMERICHOST); +#endif +#endif /* INET6 */ +#else /* ifndef NO_DNS */ +#ifndef INET6 char *blah; blah = inet_ntoa(sin->sin_addr); (void) strncpy(remoteaddr, blah, sizeof(remoteaddr)); nameserved = 0; (void) strncpy(remotehost, remoteaddr, sizeof(remotehost)); +#else +#ifdef SIN6_LEN + getnameinfo(sa, sa->sa_len, remoteaddr, sizeof(remoteaddr), NULL, + 0, NI_NUMERICHOST); + getnameinfo(sa, sa->sa_len, remotehost, sizeof(remotehost), NULL, + 0, NI_NUMERICHOST); +#else + getnameinfo(sa, SA_LEN((struct sockaddr*)sa), remoteaddr, + sizeof(remoteaddr), NULL, 0, NI_NUMERICHOST); + getnameinfo(sa, SA_LEN((struct sockaddr*)sa), remotehost, + sizeof(remotehost), NULL, 0, NI_NUMERICHOST); #endif + nameserved = 0; +#endif /* INET6 */ +#endif /* NO_DNS */ remotehost[sizeof(remotehost) - 1] = '\0'; sprintf(proctitle, "%s: connected", remotehost); @@ -6146,6 +6544,10 @@ int bind_error; int on = 1; register char *p, *a; +#ifdef INET6 + char ipv6addr[INET6_ADDRSTRLEN]; + union sockunion convaddr; +#endif /* H* fix: if we already *have* a passive socket, close it first. Prevents a whole variety of entertaining clogging attacks. */ @@ -6168,8 +6570,25 @@ (void) setsockopt(pdata, SOL_SOCKET, SO_SNDBUF, (char *) &TCPwindowsize, sizeof(TCPwindowsize)); (void) setsockopt(pdata, SOL_SOCKET, SO_RCVBUF, (char *) &TCPwindowsize, sizeof(TCPwindowsize)); } +#ifdef INET6 + if (ctrl_addr.su_family==AF_INET6){ +#ifdef SIN6_LEN + inet_ntop(ctrl_addr.su_family,ctrl_addr.su_sin6.sin6_addr.s6_addr,ipv6addr,ctrl_addr.su_si.si_len); + pasv_addr.su_len=sizeof(struct sockaddr_in); +#else + inet_ntop(ctrl_addr.su_family,ctrl_addr.su_sin6.sin6_addr.s6_addr,ipv6addr,su_len(ctrl_addr.su_family)); +#endif + memmove(ipv6addr,ipv6addr+7,strlen(ipv6addr)-6); + inet_pton(AF_INET,ipv6addr,&(pasv_addr.su_sin.sin_addr.s_addr)); + pasv_addr.su_family=AF_INET; + pasv_addr.su_port=ctrl_addr.su_port; + }else{ + pasv_addr = ctrl_addr; + } +#else pasv_addr = ctrl_addr; - pasv_addr.sin_port = 0; +#endif + pasv_addr.su_sin.sin_port = 0; delay_signaling(); /* we can't allow any signals while euid==0: kinch */ (void) seteuid((uid_t) 0); /* XXX: not needed if > 1024 */ @@ -6238,8 +6657,12 @@ while (++k < j) port_array[k - 1] = port_array[k]; } - pasv_addr.sin_port = htons(pasv_port_array[j - 1]); - bind_error = bind(pdata, (struct sockaddr *) &pasv_addr, sizeof(pasv_addr)); + pasv_addr.su_sin.sin_port = htons (pasv_port_array [j-1]); +#ifdef SIN6_LEN + bind_error = bind (pdata, (struct sockaddr *)&pasv_addr, pasv_addr.su_len); +#else + bind_error = bind (pdata, (struct sockaddr *)&pasv_addr, su_len(pasv_addr.su_family)); +#endif } } @@ -6261,19 +6684,28 @@ if (listen(pdata, 1) < 0) goto pasv_error; usedefault = 1; - if (route_vectored) - a = (char *) &vect_addr.sin_addr; - else - a = (char *) &pasv_addr.sin_addr; - p = (char *) &pasv_addr.sin_port; + if (route_vectored){ + a = (char *) &vect_addr.su_sin.sin_addr; + }else{ + a = (char *) &pasv_addr.su_sin.sin_addr; + }; + if (pasv_addr.su_family == AF_INET){ + p = (char *) &pasv_addr.su_sin.sin_port; +#ifdef INET6 + }else{ + p = (char *) &pasv_addr.su_sin6.sin6_port; + } +#else + } +#endif #define UC(b) (((int) b) & 0xff) if (debug) { - char *s = calloc(128 + strlen(remoteident), sizeof(char)); + char *s = calloc(128 + strlen(remotehost), sizeof(char)); if (s) { - int i = ntohs(pasv_addr.sin_port); - sprintf(s, "PASV port %i assigned to %s", i, remoteident); + int i = ntohs(pasv_addr.su_sin.sin_port); + sprintf(s, "PASV port %i assigned to %s", i, remotehost); syslog(LOG_DEBUG, "%s", s); free(s); } @@ -6282,13 +6714,288 @@ UC(a[1]), UC(a[2]), UC(a[3]), UC(p[0]), UC(p[1])); return; +#undef UC + + pasv_error: + (void) close(pdata); + pdata = -1; +if (debug) { + char *s = calloc (128+strlen (remotehost), sizeof (char)); + if (s) { + sprintf (s, "PASV port assignment assigned for %s", remotehost); + syslog (LOG_DEBUG, "%s", s); + free (s); + } +} + perror_reply(425, "Can't open passive connection"); + return; +} + +/* + * Long passive defined in RFC 1639. + * 228 Entering Long Passive Mode (af, hal, h1, h2, ..., pal, p1, p2, ...) + * Long passive defined in draft-ietf-ftpext-ftp-over-ipv6-02.txt + * 229 Entering Extended Passive Mode (|||port|) + */ +void +#ifdef __STDC__ +long_passive(char *cmd, int pf) +#else +long_passive(cmd, pf) + char *cmd; + int pf; +#endif +{ +#if defined(UNIXWARE) || defined(AIX) + size_t len; +#else + int len; +#endif + int bind_error; + char *p, *a; + u_short port; + +/* H* fix: if we already *have* a passive socket, close it first. Prevents + a whole variety of entertaining clogging attacks. */ + if (pdata > 0) + close (pdata); + if (!logged_in) { + reply(530, "Login with USER first."); + return; + } + + if (pf != PF_UNSPEC) { + if (ctrl_addr.su_family != pf) { + switch (ctrl_addr.su_family) { + case AF_INET: + pf = 1; + break; +#ifdef INET6 + case AF_INET6: + pf = 2; + break; +#endif + default: + pf = 0; + break; + } + /* + * XXX + * only EPRT/EPSV ready clients will understand this + */ + if (strcmp(cmd, "EPSV") == 0 && pf) { + reply(522, "Network protocol mismatch, " + "use (%d)", pf); + } else + reply(501, "Network protocol mismatch"); /*XXX*/ + + return; + } + } + + if (TCPwindowsize) { + (void) setsockopt(pdata, SOL_SOCKET, SO_SNDBUF, (char *) &TCPwindowsize, sizeof(TCPwindowsize)); + (void) setsockopt(pdata, SOL_SOCKET, SO_RCVBUF, (char *) &TCPwindowsize, sizeof(TCPwindowsize)); + } + pdata = socket(ctrl_addr.su_family, SOCK_STREAM, 0); + if (pdata < 0) { + perror_reply(425, "Can't open passive connection"); + return; + } + pasv_addr = ctrl_addr; +#ifndef INET6 + pasv_addr.su_sin.sin_port = 0; +#else + if (pasv_addr.su_family == AF_INET) + pasv_addr.su_sin.sin_port = 0; + else + pasv_addr.su_sin6.sin6_port = 0; +#endif + delay_signaling(); /* we can't allow any signals while euid==0: kinch */ + (void) seteuid((uid_t) 0); /* XXX: not needed if > 1024 */ + +checkports(); + +if (passive_port_min == -1) { + passive_port_max = 65534; + passive_port_min = 1024; +} + + { + int *port_array; + int *pasv_port_array; + int i; + int j; + int k; + + if (passive_port_max < passive_port_min) { + (void) seteuid((uid_t) pw->pw_uid); + enable_signaling(); /* we can allow signals once again: kinch */ + goto pasv_error; + } + + i = passive_port_max - passive_port_min + 1; + + port_array = calloc (i, sizeof (int)); + if (port_array == NULL) { + (void) seteuid((uid_t) pw->pw_uid); + enable_signaling(); /* we can allow signals once again: kinch */ + goto pasv_error; + } + + pasv_port_array = calloc (i, sizeof (int)); + if (pasv_port_array == NULL) { + free (port_array); + (void) seteuid((uid_t) pw->pw_uid); + enable_signaling(); /* we can allow signals once again: kinch */ + goto pasv_error; + } + + do { + --i; + port_array [i] = passive_port_min + i; + } while (i > 0); + + srand (time (NULL)); + +/* + i = passive_port_max - passive_port_min + 1; + do { + --i; + j = (int) (((1.0 + i) * rand()) / (RAND_MAX + 1.0)); + pasv_port_array [i] = port_array [j]; + while (++j <= i) + port_array [j-1] = port_array [j]; + } while (i > 0); +*/ + + bind_error = -1; + errno = EADDRINUSE; + for (i = 3; (bind_error < 0) && (errno == EADDRINUSE) && (i > 0); i--) { + for (j = passive_port_max - passive_port_min + 1; (bind_error < 0) && +(errno == EADDRINUSE) && (j > 0); j--) { + if (i == 3) { + k = (int) ((1.0 * j * rand()) / (RAND_MAX + 1.0)); + pasv_port_array [j-1] = port_array [k]; + while (++k < j) + port_array [k-1] = port_array [k]; + } +#ifndef INET6 + pasv_addr.su_sin.sin_port = htons (pasv_port_array [j-1]); +#else + if (pasv_addr.su_family == AF_INET) + pasv_addr.su_sin.sin_port = htons (pasv_port_array [j-1]); + else + pasv_addr.su_sin6.sin6_port = htons (pasv_port_array [j-1]); +#endif +#ifdef SIN6_LEN + bind_error = bind (pdata, (struct sockaddr *)&pasv_addr, pasv_addr.su_len); +#else + bind_error = bind (pdata, (struct sockaddr *)&pasv_addr, SA_LEN((struct sockaddr *)&pasv_addr)); +#endif + } + } + free (pasv_port_array); + free (port_array); + + if ( bind_error < 0 ) { + (void) seteuid((uid_t) pw->pw_uid); + enable_signaling(); /* we can allow signals once again: kinch */ + goto pasv_error; + } + } + + (void) seteuid((uid_t) pw->pw_uid); + enable_signaling(); /* we can allow signals once again: kinch */ +#ifdef SIN6_LEN + len = pasv_addr.su_len; +#else + len = SA_LEN((struct sockaddr *)&pasv_addr); +#endif + if (getsockname(pdata, (struct sockaddr *) &pasv_addr, &len) < 0) + goto pasv_error; + if (listen(pdata, 1) < 0) + goto pasv_error; + usedefault = 1; +#ifndef INET6 + port = pasv_addr.su_sin.sin_port; +#else + if (pasv_addr.su_family == AF_INET) + port = pasv_addr.su_sin.sin_port; + else + port = pasv_addr.su_sin6.sin6_port; +#endif + +#define UC(b) (((int) b) & 0xff) + + if (strcmp(cmd, "LPSV") == 0) { + +if (debug) { + char *s = calloc (128+strlen (remotehost), sizeof (char)); + if (s) { + int i = ntohs (port); + sprintf (s, "LPSV port %i assigned to %s", i, remotehost); + syslog (LOG_DEBUG, "%s", s); + free (s); + } +} + switch (pasv_addr.su_family) { + case AF_INET: + if (route_vectored) + a = (char *) &vect_addr.su_sin.sin_addr; + else + a = (char *) &pasv_addr.su_sin.sin_addr; + p = (char *) &pasv_addr.su_sin.sin_port; + reply(227, "Entering Passive Mode (%d,%d,%d,%d,%d,%d)", UC(a[0]), + UC(a[1]), UC(a[2]), UC(a[3]), UC(p[0]), UC(p[1])); + return; +#ifdef INET6 + case AF_INET6: + if (route_vectored) + a = (char *) &vect_addr.su_sin6.sin6_addr; + else + a = (char *) &pasv_addr.su_sin6.sin6_addr; + p = (char *) &pasv_addr.su_sin6.sin6_port; + reply(228, "Entering Long Passive Mode (%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)", 6, 16, + UC(a[0]), UC(a[1]), UC(a[2]), UC(a[3]), + UC(a[4]), UC(a[5]), UC(a[6]), UC(a[7]), + UC(a[8]), UC(a[9]), UC(a[10]), UC(a[11]), + UC(a[12]), UC(a[13]), UC(a[14]), UC(a[15]), + 2, UC(p[0]), UC(p[1])); + return; +#endif + } +#undef UC + } else if (strcmp(cmd, "EPSV") == 0) { + switch (pasv_addr.su_family) { + case AF_INET: +#ifdef INET6 + case AF_INET6: +#endif +if (debug) { + char *s = calloc (128+strlen (remotehost), sizeof (char)); + if (s) { + int i = ntohs (port); + sprintf (s, "EPSV port %i assigned to %s", i, remotehost); + syslog (LOG_DEBUG, "%s", s); + free (s); + } +} + reply(229, "Entering Extended Passive Mode (|||%d|)", + ntohs(port)); + return; + } + } else { + /* more proper error code? */ + } + pasv_error: (void) close(pdata); pdata = -1; if (debug) { - char *s = calloc(128 + strlen(remoteident), sizeof(char)); + char *s = calloc(128 + strlen(remotehost), sizeof(char)); if (s) { - sprintf(s, "PASV port assignment assigned for %s", remoteident); + sprintf(s, "LPSV/EPSV port assignment assigned for %s", remotehost); syslog(LOG_DEBUG, "%s", s); free(s); } @@ -7030,13 +7737,19 @@ /* I am running as a standalone daemon (not under inetd) */ void do_daemon(int argc, char **argv, char **envp) { - struct sockaddr_in server; - struct servent *serv; + struct addrinfo hints, *res, *res0; + struct sockaddr_storage from; + socklen_t fromlen; + int error; int pgrp; - int lsock; + int s[MAXSOCK]; + int smax; + int sockmax; int one = 1; FILE *pidfile; int i; + int n; + fd_set rfd, rfd0; /* Some of this is "borrowed" from inn - lots of it isn't */ @@ -7123,86 +7836,124 @@ syslog(LOG_INFO, "FTP server (%s) ready.", version); - /* Create a socket to listen on */ - lsock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - if (lsock < 0) { - syslog(LOG_ERR, "Cannot create socket to listen on: %m"); - exit(1); + memset(&hints, 0, sizeof(hints)); + hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = AI_PASSIVE; + + if (daemon_port == 0) { + error = getaddrinfo(NULL, "ftp", &hints, &res0); + } else { + error = getaddrinfo(NULL, *daemon_port_ptr, &hints, &res0); } - if (setsockopt(lsock, SOL_SOCKET, SO_REUSEADDR, (char *) &one, sizeof(one)) < 0) { - syslog(LOG_ERR, "Cannot set SO_REUSEADDR option: %m"); + if (error) { + syslog(LOG_ERR, "Cannot find service ftp: %s", gai_strerror(error)); exit(1); } - if (keepalive) - (void) setsockopt(lsock, SOL_SOCKET, SO_KEEPALIVE, (char *) &one, sizeof(one)); - - server.sin_family = AF_INET; - server.sin_addr.s_addr = acl_DaemonAddress(); - if (daemon_port == 0) { - if (!(serv = getservbyname("ftp", "tcp"))) { - syslog(LOG_ERR, "Cannot find service ftp: %m"); - exit(1); + + smax = 0; + sockmax = -1; + for (res = res0; res && smax < MAXSOCK; res = res->ai_next) { + /* Create a socket to listen on */ + s[smax] = socket(res->ai_family, res->ai_socktype, res->ai_protocol); + if (s[smax] < 0) { + continue; } - server.sin_port = serv->s_port; - daemon_port = ntohs(serv->s_port); - } - else - server.sin_port = htons(daemon_port); - - if (bind(lsock, (struct sockaddr *) &server, sizeof(server)) < 0) { - syslog(LOG_ERR, "Cannot bind socket: %m"); + + /* avoid FD_SET overrun */ + if (s[smax] >= FD_SETSIZE) { + close(s[smax]); + s[smax] = -1; + continue; + } + if (setsockopt(s[smax], SOL_SOCKET, SO_REUSEADDR, (char *) &one, sizeof(one)) < 0) { + syslog(LOG_ERR, "Cannot set SO_REUSEADDR option: %m"); + continue; + } + if (keepalive) + (void) setsockopt(s[smax], SOL_SOCKET, SO_KEEPALIVE, (char *) &one, sizeof(one)); + if (bind(s[smax], res->ai_addr, res->ai_addrlen) < 0) { + close(s[smax]); + s[smax] = -1; + syslog(LOG_ERR, "Cannot bind socket: %m"); + continue; + } + if (listen(s[smax], MAX_BACKLOG) < 0) { + close(s[smax]); + s[smax] = -1; + continue; + } + if (s[smax] > sockmax) + sockmax = s[smax]; + smax++; + } + + if (smax == 0) { + syslog(LOG_WARNING, "Cannot create socket to listen on: "); exit(1); } - - listen(lsock, MAX_BACKLOG); - + sprintf(proctitle, "accepting connections on port %i", daemon_port); setproctitle("%s", proctitle); - + + FD_ZERO(&rfd0); + for (i = 0; i < smax; i++) + FD_SET(s[i], &rfd0); + while (1) { int pid; int msgsock; - - msgsock = accept(lsock, 0, 0); - if (msgsock < 0) { - syslog(LOG_ERR, "Accept failed: %m"); - sleep(1); - continue; - } - if (keepalive) - (void) setsockopt(msgsock, SOL_SOCKET, SO_KEEPALIVE, (char *) &one, sizeof(one)); - - /* Fork off a handler */ - pid = fork(); - if (pid < 0) { - syslog(LOG_ERR, "failed to fork: %m"); - sleep(1); - continue; + + rfd = rfd0; + n = select(sockmax + 1, &rfd, NULL, NULL, NULL); + if (n < 0) { + syslog(LOG_ERR, "select error"); + exit(1); } - if (pid == 0) { - /* I am that forked off child */ - closelog(); - /* Make sure that stdin/stdout are the new socket */ - dup2(msgsock, 0); - dup2(msgsock, 1); - /* Only parent needs lsock */ - if (lsock != 0 && lsock != 1) - close(lsock); + + for (i = 0; i < smax; i++) { + if (FD_ISSET(s[i], &rfd)) { + fromlen = sizeof(from); + msgsock = accept(s[i], (struct sockaddr *)&from, &fromlen); + if (msgsock < 0) { + syslog(LOG_ERR, "Accept failed: %m"); + sleep(1); + continue; + } + if (keepalive) + (void) setsockopt(msgsock, SOL_SOCKET, SO_KEEPALIVE, (char *) &one, sizeof(one)); + + /* Fork off a handler */ + pid = fork(); + if (pid < 0) { + syslog(LOG_ERR, "failed to fork: %m"); + sleep(1); + continue; + } + if (pid == 0) { + /* I am that forked off child */ + closelog(); + /* Make sure that stdin/stdout are the new socket */ + dup2(msgsock, 0); + dup2(msgsock, 1); + /* Only parent needs s[smax] */ + if (s[smax] != 0 && s[smax] != 1) + close(s[smax]); #ifdef FACILITY - openlog("ftpd", LOG_PID | LOG_NDELAY, FACILITY); + openlog("ftpd", LOG_PID | LOG_NDELAY, FACILITY); #else - openlog("ftpd", LOG_PID); + openlog("ftpd", LOG_PID); #endif - return; - } - - /* I am the parent */ - close(msgsock); - - /* Quick check to see if any of the forked off children have - * terminated. */ - while ((pid = waitpid((pid_t) -1, (int *) 0, WNOHANG)) > 0) { - /* A child has finished */ + return; + } + /* I am the parent */ + close(msgsock); + + /* Quick check to see if any of the forked off children have + * terminated. */ + while ((pid = waitpid((pid_t) -1, (int *) 0, WNOHANG)) > 0) { + /* A child has finished */ + } + } } } } Index: wu-ftpd/src/hostacc.c diff -u wu-ftpd/src/hostacc.c:1.1.1.5 wu-ftpd/src/hostacc.c:1.3 --- wu-ftpd/src/hostacc.c:1.1.1.5 Sun Sep 24 05:54:36 2000 +++ wu-ftpd/src/hostacc.c Sun Sep 24 05:56:15 2000 @@ -198,17 +198,29 @@ *pcTmp2++ = *pcTmp1; else /* whitespace */ +#ifdef INET6 + if (*(pcTmp2 - 1) == ';') +#else if (*(pcTmp2 - 1) == ':') +#endif continue; else +#ifdef INET6 + *pcTmp2++ = ';'; +#else *pcTmp2++ = ':'; +#endif } /* Throw away trailing whitespace, now indicated by * the last character of the unified buffer being a * colon. Remember where the news string ends. */ +#ifdef INET6 + pcEnd = (*(pcTmp2 - 1) == ';') ? (pcTmp2 - 1) : pcTmp2; +#else pcEnd = (*(pcTmp2 - 1) == ':') ? (pcTmp2 - 1) : pcTmp2; +#endif *pcEnd = '\0'; /* Terminate new string */ /* @@ -243,8 +255,11 @@ iHaSize = iHaInd; return (-1); } - +#ifdef INET6 + if ((pcColon = strchr(pcBegin, ';')) != NULL) +#else if ((pcColon = strchr(pcBegin, ':')) != NULL) +#endif ha_arr[iHaInd].ha_login = strnsav(pcBegin, (pcColon - pcBegin)); else { @@ -254,7 +269,11 @@ } pcBegin = pcColon + 1; +#ifdef INET6 + while ((pcColon = strchr(pcBegin, ';')) != NULL) { +#else while ((pcColon = strchr(pcBegin, ':')) != NULL) { +#endif ha_arr[iHaInd].ha_hosts[iHaHind++] = strnsav(pcBegin, (pcColon - pcBegin)); pcBegin = pcColon + 1; Index: wu-ftpd/src/sockunion.h diff -u /dev/null wu-ftpd/src/sockunion.h:1.9 --- /dev/null Fri Jan 30 22:37:41 2004 +++ wu-ftpd/src/sockunion.h Wed Oct 3 17:24:11 2001 @@ -0,0 +1,41 @@ +union sockunion { + struct sockinet { +#ifdef SIN6_LEN + u_char si_len; + u_char si_family; +#else + u_short si_family; +#endif + u_short si_port; + } su_si; + struct sockaddr_in su_sin; +#ifdef INET6 + struct sockaddr_in6 su_sin6; +#endif +}; +#ifdef SIN6_LEN +#define su_len su_si.si_len +#endif +#define su_family su_si.si_family +#define su_port su_si.si_port + +#ifndef SIN6_LEN +#ifdef INET6 +#define su_len(af) __wuftp_su_len(af) +static int inline __wuftp_su_len(int af){ + switch(af){ + case AF_INET6: + return sizeof(struct sockaddr_in6); + case AF_INET: + return sizeof(struct sockaddr_in); + } + return 0; +} +#else +#define su_len(af) ((af) == AF_INET ? sizeof(struct sockaddr_in) : 0) +#endif + +#ifndef SA_LEN +#define SA_LEN(sa) su_len((sa)->sa_family) +#endif +#endif Index: wu-ftpd/src/config/config.lv6 diff -u /dev/null wu-ftpd/src/config/config.lv6:1.2 --- /dev/null Fri Jan 30 22:37:41 2004 +++ wu-ftpd/src/config/config.lv6 Mon Sep 25 12:57:38 2000 @@ -0,0 +1,98 @@ +/**************************************************************************** + Copyright (c) 1999,2000 WU-FTPD Development Group. + All rights reserved. + + Portions Copyright (c) 1980, 1985, 1988, 1989, 1990, 1991, 1993, 1994 + The Regents of the University of California. + Portions Copyright (c) 1993, 1994 Washington University in Saint Louis. + Portions Copyright (c) 1996, 1998 Berkeley Software Design, Inc. + Portions Copyright (c) 1989 Massachusetts Institute of Technology. + Portions Copyright (c) 1998 Sendmail, Inc. + Portions Copyright (c) 1983, 1995, 1996, 1997 Eric P. Allman. + Portions Copyright (c) 1997 by Stan Barber. + Portions Copyright (c) 1997 by Kent Landfield. + Portions Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997 + Free Software Foundation, Inc. + + Use and distribution of this software and its source code are governed + by the terms and conditions of the WU-FTPD Software License ("LICENSE"). + + If you did not receive a copy of the license, it may be obtained online + at http://www.wu-ftpd.org/license.html. + + $Id: config.lv6,v 1.2 2000/09/25 03:57:38 yoshfuji Exp $ + +****************************************************************************/ +/* + ** Linux configuration file + */ + +#include +#include +#if defined(LINUX_VERSION_CODE) +#if LINUX_VERSION_CODE >= 0x01020d +/* 1.2.13 or later */ +#define HAVE_DIRFD +#endif +#endif +#undef BSD +#define HAVE_DIRENT_H +#define HAVE_FLOCK +#define HAVE_FTW +#define HAVE_GETCWD +#define HAVE_GETDTABLESIZE +#undef HAVE_PSTAT +#define HAVE_ST_BLKSIZE +#undef HAVE_SYSINFO +#define HAVE_SYSCONF +#define HAVE_UT_UT_HOST +#define HAVE_VPRINTF +#define HAVE_SNPRINTF +#define LINUX +#define QUOTA_INODE +#define HAVE_SYS_TIME_H +#define NO_UTMPX +#undef HAVE_REGEX +#define HAVE_REGEX_H +#define SPT_TYPE SPT_REUSEARGV +#undef USG +#define SVR4 +#define HAVE_FCNTL_H +#define FACILITY LOG_DAEMON +#define HAVE_SYS_VFS +#define HAVE_LSTAT +#define UTMAXTYPE +#if !defined(USE_ETC_FTPD) && !defined(USE_LOCAL_ETC) && !defined(USE_OPT_FTPD) +#define USE_ETC +#endif +#define USE_LOG +#define USE_VAR +#define VAR_RUN +#define VIRTUAL +#define NEED_SIGFIX +#include +#if __GLIBC__ < 2 +#define NBBY 8 +#ifndef NCARGS +#ifdef _POSIX_ARG_MAX +#define NCARGS _POSIX_ARG_MAX +#else +#define HAVE_SYS_QUOTA_H +#endif +#endif +#endif + +#include /* here instead of in all the srcs. _H */ +#include + +typedef void SIGNAL_TYPE; + +#include "../config.h" + +#define QUOTA + +#include +#define HAVE_GLOB_H + + +#define INET6 Index: wu-ftpd/src/makefiles/Makefile.lv6 diff -u /dev/null wu-ftpd/src/makefiles/Makefile.lv6:1.2 --- /dev/null Fri Jan 30 22:37:42 2004 +++ wu-ftpd/src/makefiles/Makefile.lv6 Mon Sep 25 12:57:38 2000 @@ -0,0 +1,90 @@ +# +# Copyright (c) 1999,2000 WU-FTPD Development Group. +# All rights reserved. +# +# Portions Copyright (c) 1980, 1985, 1988, 1989, 1990, 1991, 1993, 1994 +# The Regents of the University of California. +# Portions Copyright (c) 1993, 1994 Washington University in Saint Louis. +# Portions Copyright (c) 1989 Massachusetts Institute of Technology. +# Portions Copyright (c) 1998 Sendmail, Inc. +# Portions Copyright (c) 1983, 1995, 1996, 1997 Eric P. Allman. +# Portions Copyright (c) 1996, 1998 Berkeley Software Design, Inc. +# Portions Copyright (C) 1991, 1992, 1993, 1994, 1995 1996, 1997 +# Free Software Foundation, Inc. +# Portions Copyright (c) 1997 Stan Barber. +# Portions Copyright (c) 1997 Kent Landfield. +# +# Use and distribution of this software and its source code are governed by +# the terms and conditions of the WU-FTPD Software License ("LICENSE"). +# +# If you did not receive a copy of the license, it may be obtained online at +# http://www.wu-ftpd.org/license.html. +# +# $Id: Makefile.lv6,v 1.2 2000/09/25 03:57:38 yoshfuji Exp $ +# + +# +# Makefile for Linux +# + +# Set the following when building, ie: build NOPAM=1 lnx +NOPAM = +NOSHADOW = +NOOPIE = +STATIC = +# +OPIEDIR = /usr/local/opie +OPIELIB = ${OPIEDIR}/libopie +# +# +CC = gcc +# YACC = bison -y +CDEFS := $(shell \ + if [ "${NOPAM}" = "" -a -f /usr/include/security/pam_appl.h ]; then \ + echo "-DUSE_PAM"; \ + else \ + if [ "${NOSHADOW}" = "" -a -f /usr/include/shadow.h ]; then \ + echo "-DSHADOW_PASSWORD"; \ + fi; \ + if [ "${NOOPIE}" = "" -a -f ${OPIEDIR}/opie.h ]; then \ + echo "-DOPIE"; \ + fi; \ + fi; \ + if [ -e /etc/ftpd ]; then \ + echo "-DUSE_ETC_FTPD"; \ + fi ) +# older Linux may want to add -I/usr/include/bsd to IFLAGS. +IFLAGS = -I.. -I../support \ + $(shell \ + if [ "${NOOPIE}" = "" -a -f ${OPIEDIR}/opie.h ]; then \ + echo "-I${OPIEDIR}"; \ + fi ) +LFLAGS = -L../support -s \ + $(shell \ + if [ "${STATIC}" != "" ]; then \ + echo "-static"; \ + fi ) +RPM_OPT_FLAGS = -O3 +CFLAGS = ${RPM_OPT_FLAGS} -fomit-frame-pointer -fno-strength-reduce -pipe ${IFLAGS} ${LFLAGS} ${CDEFS} +XOBJS = +# select based on type +AUXLIBS := $(shell \ + if [ "${NOPAM}" = "" -a -f /usr/include/security/pam_appl.h ]; then \ + echo "-lpam -ldl"; \ + fi; \ + if [ -f /usr/lib/libcrypt.a ]; then \ + echo "-lcrypt"; \ + else \ + if [ "${NOSHADOW}" = "" -a -f /usr/include/shadow.h -a -f /usr/lib/libshadow.a ]; then \ + echo "-lshadow"; \ + fi; \ + fi; \ + if [ "${NOOPIE}" = "" -a -f ${OPIEDIR}/opie.h ]; then \ + echo "-L${OPIELIB} -lopie"; \ + fi ) +LIBES = -lsupport -lresolv ${AUXLIBS} +LINTFLAGS= +LKERB = -lauth -lckrb -lkrb -ldes +XLIBS = ${LIBES} +MKDEP = ../util/mkdep + Index: wu-ftpd/support/.cvsignore diff -u /dev/null wu-ftpd/support/.cvsignore:1.1 --- /dev/null Fri Jan 30 22:37:42 2004 +++ wu-ftpd/support/.cvsignore Thu Aug 20 18:20:57 1998 @@ -0,0 +1 @@ +Makefile Index: wu-ftpd/support/Makefile.in diff -u wu-ftpd/support/Makefile.in:1.1.1.2 wu-ftpd/support/Makefile.in:1.2 --- wu-ftpd/support/Makefile.in:1.1.1.2 Sun Sep 24 05:54:58 2000 +++ wu-ftpd/support/Makefile.in Fri Aug 30 16:39:06 2002 @@ -40,4 +40,4 @@ -rm -f Makefile .c.o: - @CC@ @CFLAGS@ -c -o $@ $< + @CC@ @CFLAGS@ -I../src -c -o $@ $< Index: wu-ftpd/support/authuser.c diff -u wu-ftpd/support/authuser.c:1.1.1.5 wu-ftpd/support/authuser.c:1.8 --- wu-ftpd/support/authuser.c:1.1.1.5 Sun Sep 24 05:54:58 2000 +++ wu-ftpd/support/authuser.c Sun Sep 24 06:24:23 2000 @@ -50,6 +50,7 @@ extern int errno; #include "authuser.h" +#include "sockunion.h" unsigned short auth_tcpport = 113; @@ -69,7 +70,7 @@ static char authline[SIZ]; -char *auth_xline(register char *user, register int fd, register long unsigned int *in) +char *auth_xline(register char *user, register int fd, struct sockaddr *in) { unsigned short local; unsigned short remote; @@ -77,7 +78,7 @@ if (auth_fd(fd, in, &local, &remote) == -1) return 0; - ruser = auth_tcpuser(*in, local, remote); + ruser = auth_tcpuser(in, local, remote); if (!ruser) return 0; if (!user) @@ -88,28 +89,50 @@ return authline; } -int auth_fd(register int fd, register long unsigned int *in, register short unsigned int *local, register short unsigned int *remote) +int auth_fd(register int fd, struct sockaddr *in, register short unsigned int *local, register short unsigned int *remote) { - struct sockaddr_in sa; + union sockunion su; #if defined(UNIXWARE) || defined(AIX) size_t dummy; #else int dummy; #endif - dummy = sizeof(sa); - if (getsockname(fd, (struct sockaddr *) &sa, &dummy) == -1) - return -1; - if (sa.sin_family != AF_INET) { - errno = EAFNOSUPPORT; + dummy = sizeof(su); + if (getsockname(fd, (struct sockaddr *) &su, &dummy) == -1) return -1; + switch (su.su_family) { + case AF_INET: +#ifdef INET6 + case AF_INET6: +#endif + break; + default: + errno = EAFNOSUPPORT; + return -1; } - *local = ntohs(sa.sin_port); - dummy = sizeof(sa); - if (getpeername(fd, (struct sockaddr *) &sa, &dummy) == -1) - return -1; - *remote = ntohs(sa.sin_port); - *in = sa.sin_addr.s_addr; + if (local) + *local = ntohs(su.su_port); + dummy = sizeof(su); + if (getpeername(fd, (struct sockaddr *)&su, &dummy) == -1) + return -1; + switch (su.su_family) { + case AF_INET: +#ifdef INET6 + case AF_INET6: +#endif + break; + default: + errno = EAFNOSUPPORT; + return -1; + } + if (remote) + *remote = ntohs(su.su_port); +#ifdef SIN6_LEN + memcpy(in, &su, su.su_len); +#else + memcpy(in, &su, SA_LEN((struct sockaddr *)&su)); +#endif return 0; } @@ -127,16 +150,16 @@ } } -char *auth_tcpuser(register long unsigned int in, register short unsigned int local, register short unsigned int remote) +char *auth_tcpuser(struct sockaddr *in, register short unsigned int local, register short unsigned int remote) { - struct sockaddr_in sa; + union sockunion su; register int buflen; register int w; register int saveerrno; char ch; unsigned short rlocal; unsigned short rremote; - extern struct sockaddr_in ctrl_addr; + extern union sockunion ctrl_addr; int on = 1; buf = realbuf; @@ -144,19 +167,23 @@ /* note the reversed order---the example in the RFC is misleading */ buflen = strlen(buf); - if ((fdAuth = socket(AF_INET, SOCK_STREAM, 0)) == -1) + if ((fdAuth = socket(in->sa_family, SOCK_STREAM, 0)) == -1) return 0; setsockopt(fdAuth, SOL_SOCKET, SO_REUSEADDR, (char *) &on, sizeof(on)); /*Try */ - sa = ctrl_addr; - sa.sin_port = htons(0); - bind(fdAuth, (struct sockaddr *) &sa, sizeof(sa)); /* may as well try ... */ - - sa.sin_family = AF_INET; - sa.sin_port = htons(auth_tcpport); - sa.sin_addr.s_addr = in; - +#ifdef SIN6_LEN + memcpy(&su, &ctrl_addr, ctrl_addr.su_len); + su.su_port = htons(0); + bind(fdAuth, (struct sockaddr *)&su, su.su_len); /* may as well try ... */ + memcpy(&su, in, in->sa_len); +#else + memcpy(&su, &ctrl_addr, SA_LEN((struct sockaddr *)&ctrl_addr)); + su.su_port = htons(0); + bind(fdAuth, (struct sockaddr *)&su, SA_LEN((struct sockaddr *)&su)); + memcpy(&su, in, SA_LEN(in)); +#endif + su.su_port = htons(auth_tcpport); signal(SIGALRM, timout); #if defined(LINUX) @@ -176,7 +203,11 @@ } #endif alarm(timeout_rfc931); - if (connect(fdAuth, (struct sockaddr *) &sa, sizeof(sa)) == -1) { +#ifdef SIN6_LEN + if (connect(fdAuth, (struct sockaddr *)&su, su.su_len) == -1) { +#else + if (connect(fdAuth, (struct sockaddr *)&su, SA_LEN((struct sockaddr *)&su)) == -1) { +#endif saveerrno = errno; alarm(0); if (fdAuth != -1) { Index: wu-ftpd/support/authuser.h diff -u wu-ftpd/support/authuser.h:1.1.1.4 wu-ftpd/support/authuser.h:1.5 --- wu-ftpd/support/authuser.h:1.1.1.4 Sun Sep 24 05:54:58 2000 +++ wu-ftpd/support/authuser.h Sun Sep 24 05:56:15 2000 @@ -29,9 +29,9 @@ extern unsigned short auth_tcpport; -extern char *auth_xline(register char *user, register int fd, register long unsigned int *in); +extern char *auth_xline(register char *user, register int fd, struct sockaddr *in); -extern int auth_fd(register int fd, register long unsigned int *in, register short unsigned int *local, register short unsigned int *remote); +extern int auth_fd(register int fd, struct sockaddr *in, register short unsigned int *local, register short unsigned int *remote); -extern char *auth_tcpuser(register long unsigned int in, register short unsigned int local, register short unsigned int remote); +extern char *auth_tcpuser(struct sockaddr *in, register short unsigned int local, register short unsigned int remote); #endif Index: wu-ftpd/support/makefiles/Makefile.lv6 diff -u /dev/null wu-ftpd/support/makefiles/Makefile.lv6:1.2 --- /dev/null Fri Jan 30 22:37:42 2004 +++ wu-ftpd/support/makefiles/Makefile.lv6 Mon Sep 25 12:57:38 2000 @@ -0,0 +1,40 @@ +# +# Copyright (c) 1999,2000 WU-FTPD Development Group. +# All rights reserved. +# +# Portions Copyright (c) 1980, 1985, 1988, 1989, 1990, 1991, 1993, 1994 +# The Regents of the University of California. +# Portions Copyright (c) 1993, 1994 Washington University in Saint Louis. +# Portions Copyright (c) 1989 Massachusetts Institute of Technology. +# Portions Copyright (c) 1998 Sendmail, Inc. +# Portions Copyright (c) 1983, 1995, 1996, 1997 Eric P. Allman. +# Portions Copyright (c) 1996, 1998 Berkeley Software Design, Inc. +# Portions Copyright (C) 1991, 1992, 1993, 1994, 1995 1996, 1997 +# Free Software Foundation, Inc. +# Portions Copyright (c) 1997 Stan Barber. +# Portions Copyright (c) 1997 Kent Landfield. +# +# Use and distribution of this software and its source code are governed by +# the terms and conditions of the WU-FTPD Software License ("LICENSE"). +# +# If you did not receive a copy of the license, it may be obtained online at +# http://www.wu-ftpd.org/license.html. +# +# $Id: Makefile.lv6,v 1.2 2000/09/25 03:57:38 yoshfuji Exp $ +# + +# +# Makefile for Linux 1.2.13 with gcc 2.6.3 +# + +CC = gcc +AR = ar cq +RANLIB = ranlib +LIBC = /lib/libc.a +IFLAGS = +LFLAGS = +RPMFLAGS = $(shell if [ "${RPM_OPT_FLAGS}" != "" ]; then echo "${RPM_OPT_FLAGS}"; else echo "-O3"; fi ) +CFLAGS = ${RPMFLAGS} -fomit-frame-pointer -fno-strength-reduce -pipe ${IFLAGS} ${LFLAGS} + +SRCS = strcasestr.c authuser.c snprintf.c +OBJS = strcasestr.o authuser.o snprintf.o