summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/Makefile.in2
-rw-r--r--source3/acconfig.h5
-rwxr-xr-xsource3/configure1345
-rw-r--r--source3/configure.in23
-rw-r--r--source3/include/config.h.in5
-rw-r--r--source3/include/includes.h1
-rw-r--r--source3/include/proto.h25
-rw-r--r--source3/lib/messages.c14
-rw-r--r--source3/locking/brlock.c26
-rw-r--r--source3/locking/locking.c8
-rw-r--r--source3/tdb/Makefile10
-rw-r--r--source3/tdb/spinlock.c403
-rw-r--r--source3/tdb/spinlock.h55
-rw-r--r--source3/tdb/tdb.c1730
-rw-r--r--source3/tdb/tdb.h111
-rw-r--r--source3/tdb/tdbutil.c4
16 files changed, 2027 insertions, 1740 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 669bd156d8..c992dd8675 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -95,7 +95,7 @@ QUOTAOBJS=@QUOTAOBJS@
# object file lists
######################################################################
-TDB_OBJ = tdb/tdb.o tdb/tdbutil.o
+TDB_OBJ = tdb/tdb.o tdb/spinlock.o tdb/tdbutil.o
LIB_OBJ = lib/charcnv.o lib/charset.o lib/debug.o lib/fault.o \
lib/getsmbpass.o lib/interface.o lib/kanji.o lib/md4.o \
diff --git a/source3/acconfig.h b/source3/acconfig.h
index 701df207c1..db473d27f5 100644
--- a/source3/acconfig.h
+++ b/source3/acconfig.h
@@ -132,3 +132,8 @@
#undef PUTUTLINE_RETURNS_UTMP
#undef COMPILER_SUPPORTS_LL
#undef HAVE_YP_GET_DEFAULT_DOMAIN
+#undef USE_SPINLOCKS
+#undef SPARC_SPINLOCKS
+#undef INTEL_SPINLOCKS
+#undef MIPS_SPINLOCKS
+#undef POWERPC_SPINLOCKS
diff --git a/source3/configure b/source3/configure
index 6a05c3a21c..690488dd9a 100755
--- a/source3/configure
+++ b/source3/configure
@@ -86,6 +86,8 @@ ac_help="$ac_help
--with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)"
ac_help="$ac_help
--with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)"
+ac_help="$ac_help
+ --with-spinlocks use spin locks instead of fcntl locks "
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -616,7 +618,7 @@ CFLAGS=${CFLAGS-"-O"}
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:620: checking for $ac_word" >&5
+echo "configure:622: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -646,7 +648,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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:650: checking for $ac_word" >&5
+echo "configure:652: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -697,7 +699,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:701: checking for $ac_word" >&5
+echo "configure:703: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -729,7 +731,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:733: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:735: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -740,12 +742,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 744 "configure"
+#line 746 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -771,12 +773,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:775: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:777: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:780: checking whether we are using GNU C" >&5
+echo "configure:782: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -785,7 +787,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -804,7 +806,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:808: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:810: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -866,7 +868,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:870: checking for a BSD compatible install" >&5
+echo "configure:872: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -923,7 +925,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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:927: checking for $ac_word" >&5
+echo "configure:929: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1028,7 +1030,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1032: checking host system type" >&5
+echo "configure:1034: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -1049,7 +1051,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1053: checking build system type" >&5
+echo "configure:1055: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1069,7 +1071,7 @@ echo "$ac_t""$build" 1>&6
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1073: checking for $ac_word" >&5
+echo "configure:1075: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1108,7 +1110,7 @@ ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1112: checking for ld used by GCC" >&5
+echo "configure:1114: checking for ld used by GCC" >&5
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
@@ -1132,10 +1134,10 @@ echo "configure:1112: checking for ld used by GCC" >&5
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1136: checking for GNU ld" >&5
+echo "configure:1138: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1139: checking for non-GNU ld" >&5
+echo "configure:1141: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1170,7 +1172,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1174: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1176: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1186,7 +1188,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1190: checking for BSD-compatible nm" >&5
+echo "configure:1192: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1222,7 +1224,7 @@ NM="$ac_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1226: checking whether ln -s works" >&5
+echo "configure:1228: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1271,8 +1273,8 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
case "$lt_target" in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1275 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 1277 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
@@ -1293,19 +1295,19 @@ case "$lt_target" in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:1297: checking whether the C compiler needs -belf" >&5
+echo "configure:1299: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1302 "configure"
+#line 1304 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@@ -1410,10 +1412,10 @@ exec 5>>./config.log
if test "x$CC" != xcc; then
echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
-echo "configure:1414: checking whether $CC and cc understand -c and -o together" >&5
+echo "configure:1416: checking whether $CC and cc understand -c and -o together" >&5
else
echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
-echo "configure:1417: checking whether cc understands -c and -o together" >&5
+echo "configure:1419: checking whether cc understands -c and -o together" >&5
fi
set dummy $CC; ac_cc="`echo $2 |
sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
@@ -1425,16 +1427,16 @@ else
# We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one.
ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
-if { (eval echo configure:1429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
- test -f conftest.o && { (eval echo configure:1430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+if { (eval echo configure:1431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+ test -f conftest.o && { (eval echo configure:1432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
then
eval ac_cv_prog_cc_${ac_cc}_c_o=yes
if test "x$CC" != xcc; then
# Test first that cc exists at all.
- if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
ac_try='cc -c conftest.c -o conftest.o 1>&5'
- if { (eval echo configure:1437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
- test -f conftest.o && { (eval echo configure:1438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+ if { (eval echo configure:1439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+ test -f conftest.o && { (eval echo configure:1440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
then
# cc works too.
:
@@ -1468,20 +1470,20 @@ fi
echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
-echo "configure:1472: checking that the C compiler understands volatile" >&5
+echo "configure:1474: checking that the C compiler understands volatile" >&5
if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1478 "configure"
+#line 1480 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
volatile int i = 0
; return 0; }
EOF
-if { (eval echo configure:1485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_volatile=yes
else
@@ -1531,7 +1533,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1535: checking host system type" >&5
+echo "configure:1537: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -1552,7 +1554,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1556: checking target system type" >&5
+echo "configure:1558: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -1570,7 +1572,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1574: checking build system type" >&5
+echo "configure:1576: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1604,7 +1606,7 @@ esac
echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
-echo "configure:1608: checking config.cache system type" >&5
+echo "configure:1610: checking config.cache system type" >&5
if { test x"${ac_cv_host_system_type+set}" = x"set" &&
test x"$ac_cv_host_system_type" != x"$host"; } ||
{ test x"${ac_cv_build_system_type+set}" = x"set" &&
@@ -1629,7 +1631,7 @@ case "$host_os" in
# Try to work out if this is the native HPUX compiler that uses the -Ae flag.
*hpux*)
echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
-echo "configure:1633: checking whether ${CC-cc} accepts -Ae" >&5
+echo "configure:1635: checking whether ${CC-cc} accepts -Ae" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1713,14 +1715,14 @@ EOF
*sysv4*)
if test $host = mips-sni-sysv4 ; then
echo $ac_n "checking for LFS support""... $ac_c" 1>&6
-echo "configure:1717: checking for LFS support" >&5
+echo "configure:1719: checking for LFS support" >&5
old_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
if test "$cross_compiling" = yes; then
SINIX_LFS_SUPPORT=cross
else
cat > conftest.$ac_ext <<EOF
-#line 1724 "configure"
+#line 1726 "configure"
#include "confdefs.h"
#include <unistd.h>
@@ -1732,7 +1734,7 @@ exit(1);
#endif
}
EOF
-if { (eval echo configure:1736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
SINIX_LFS_SUPPORT=yes
else
@@ -1763,14 +1765,14 @@ fi
;;
*hurd*)
echo $ac_n "checking for LFS support""... $ac_c" 1>&6
-echo "configure:1767: checking for LFS support" >&5
+echo "configure:1769: checking for LFS support" >&5
old_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
if test "$cross_compiling" = yes; then
GLIBC_LFS_SUPPORT=cross
else
cat > conftest.$ac_ext <<EOF
-#line 1774 "configure"
+#line 1776 "configure"
#include "confdefs.h"
#include <unistd.h>
@@ -1782,7 +1784,7 @@ exit(1);
#endif
}
EOF
-if { (eval echo configure:1786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
GLIBC_LFS_SUPPORT=yes
else
@@ -1804,21 +1806,21 @@ fi
esac
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1808: checking for inline" >&5
+echo "configure:1810: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1815 "configure"
+#line 1817 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -1844,7 +1846,7 @@ EOF
esac
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1848: checking how to run the C preprocessor" >&5
+echo "configure:1850: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1859,13 +1861,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1863 "configure"
+#line 1865 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1876,13 +1878,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1880 "configure"
+#line 1882 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1893,13 +1895,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1897 "configure"
+#line 1899 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1924,12 +1926,12 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1928: checking for ANSI C header files" >&5
+echo "configure:1930: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1933 "configure"
+#line 1935 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1937,7 +1939,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1954,7 +1956,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1958 "configure"
+#line 1960 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1972,7 +1974,7 @@ fi
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 <<EOF
-#line 1976 "configure"
+#line 1978 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1993,7 +1995,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1997 "configure"
+#line 1999 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2004,7 +2006,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2032,12 +2034,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:2036: checking for $ac_hdr that defines DIR" >&5
+echo "configure:2038: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2041 "configure"
+#line 2043 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -2045,7 +2047,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:2049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -2070,7 +2072,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:2074: checking for opendir in -ldir" >&5
+echo "configure:2076: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2078,7 +2080,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2082 "configure"
+#line 2084 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2089,7 +2091,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:2093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2111,7 +2113,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:2115: checking for opendir in -lx" >&5
+echo "configure:2117: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2119,7 +2121,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2123 "configure"
+#line 2125 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2130,7 +2132,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:2134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2153,12 +2155,12 @@ fi
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2157: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:2159: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2162 "configure"
+#line 2164 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -2167,7 +2169,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:2171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -2188,12 +2190,12 @@ EOF
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:2192: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:2194: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2197 "configure"
+#line 2199 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -2209,7 +2211,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:2213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -2233,17 +2235,17 @@ for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2237: checking for $ac_hdr" >&5
+echo "configure:2239: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2242 "configure"
+#line 2244 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2273,17 +2275,17 @@ for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2277: checking for $ac_hdr" >&5
+echo "configure:2279: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2282 "configure"
+#line 2284 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2313,17 +2315,17 @@ for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2317: checking for $ac_hdr" >&5
+echo "configure:2319: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2322 "configure"
+#line 2324 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2353,17 +2355,17 @@ for ac_hdr in sys/param.h ctype.h sys/un.h sys/wait.h sys/resource.h sys/ioctl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2357: checking for $ac_hdr" >&5
+echo "configure:2359: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2362 "configure"
+#line 2364 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2393,17 +2395,17 @@ for ac_hdr in sys/mman.h sys/filio.h sys/priv.h string.h strings.h stdlib.h sys/
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2397: checking for $ac_hdr" >&5
+echo "configure:2399: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2402 "configure"
+#line 2404 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2433,17 +2435,17 @@ for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h term
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2437: checking for $ac_hdr" >&5
+echo "configure:2439: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2442 "configure"
+#line 2444 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2473,17 +2475,17 @@ for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2477: checking for $ac_hdr" >&5
+echo "configure:2479: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2482 "configure"
+#line 2484 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2516,14 +2518,14 @@ done
case "$host_os" in
*hpux*)
cat > conftest.$ac_ext <<EOF
-#line 2520 "configure"
+#line 2522 "configure"
#include "confdefs.h"
#include <shadow.h>
int main() {
struct spwd testme
; return 0; }
EOF
-if { (eval echo configure:2527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_shadow_h=yes
else
@@ -2545,17 +2547,17 @@ for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2549: checking for $ac_hdr" >&5
+echo "configure:2551: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2554 "configure"
+#line 2556 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2585,17 +2587,17 @@ for ac_hdr in nss.h sys/security.h security/pam_appl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2589: checking for $ac_hdr" >&5
+echo "configure:2591: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2594 "configure"
+#line 2596 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2625,17 +2627,17 @@ for ac_hdr in stropts.h poll.h readline.h history.h readline/readline.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2629: checking for $ac_hdr" >&5
+echo "configure:2631: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2634 "configure"
+#line 2636 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2665,17 +2667,17 @@ for ac_hdr in readline/history.h sys/capability.h syscall.h sys/syscall.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2669: checking for $ac_hdr" >&5
+echo "configure:2671: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2674 "configure"
+#line 2676 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2705,17 +2707,17 @@ for ac_hdr in sys/acl.h sys/cdefs.h glob.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2709: checking for $ac_hdr" >&5
+echo "configure:2711: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2714 "configure"
+#line 2716 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2747,17 +2749,17 @@ for ac_hdr in utmp.h utmpx.h lastlog.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2751: checking for $ac_hdr" >&5
+echo "configure:2753: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2756 "configure"
+#line 2758 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2789,17 +2791,17 @@ for ac_hdr in sys/fs/vx_quota.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2793: checking for $ac_hdr" >&5
+echo "configure:2795: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2798 "configure"
+#line 2800 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2827,7 +2829,7 @@ done
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:2831: checking size of int" >&5
+echo "configure:2833: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2835,7 +2837,7 @@ else
ac_cv_sizeof_int=cross
else
cat > conftest.$ac_ext <<EOF
-#line 2839 "configure"
+#line 2841 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2846,7 +2848,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:2850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
@@ -2866,7 +2868,7 @@ EOF
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:2870: checking size of long" >&5
+echo "configure:2872: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2874,7 +2876,7 @@ else
ac_cv_sizeof_long=cross
else
cat > conftest.$ac_ext <<EOF
-#line 2878 "configure"
+#line 2880 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2885,7 +2887,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:2889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
@@ -2905,7 +2907,7 @@ EOF
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:2909: checking size of short" >&5
+echo "configure:2911: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2913,7 +2915,7 @@ else
ac_cv_sizeof_short=cross
else
cat > conftest.$ac_ext <<EOF
-#line 2917 "configure"
+#line 2919 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2924,7 +2926,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:2928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_short=`cat conftestval`
else
@@ -2945,12 +2947,12 @@ EOF
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2949: checking for working const" >&5
+echo "configure:2951: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2954 "configure"
+#line 2956 "configure"
#include "confdefs.h"
int main() {
@@ -2999,7 +3001,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:3003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -3020,21 +3022,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:3024: checking for inline" >&5
+echo "configure:3026: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 3031 "configure"
+#line 3033 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:3038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -3060,14 +3062,14 @@ EOF
esac
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3064: checking whether byte ordering is bigendian" >&5
+echo "configure:3066: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 3071 "configure"
+#line 3073 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3078,11 +3080,11 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 3086 "configure"
+#line 3088 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3093,7 +3095,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@@ -3113,7 +3115,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3117 "configure"
+#line 3119 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
@@ -3126,7 +3128,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:3130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
@@ -3150,14 +3152,14 @@ EOF
fi
echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
-echo "configure:3154: checking whether char is unsigned" >&5
+echo "configure:3156: checking whether char is unsigned" >&5
if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$GCC" = yes; then
# GCC predefines this symbol on systems where it applies.
cat > conftest.$ac_ext <<EOF
-#line 3161 "configure"
+#line 3163 "configure"
#include "confdefs.h"
#ifdef __CHAR_UNSIGNED__
yes
@@ -3179,7 +3181,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3183 "configure"
+#line 3185 "configure"
#include "confdefs.h"
/* volatile prevents gcc2 from optimizing the test away on sparcs. */
#if !defined(__STDC__) || __STDC__ != 1
@@ -3189,7 +3191,7 @@ main() {
volatile char c = 255; exit(c < 0);
}
EOF
-if { (eval echo configure:3193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_char_unsigned=yes
else
@@ -3214,12 +3216,12 @@ fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3218: checking return type of signal handlers" >&5
+echo "configure:3220: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3223 "configure"
+#line 3225 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -3236,7 +3238,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:3240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -3255,12 +3257,12 @@ EOF
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3259: checking for uid_t in sys/types.h" >&5
+echo "configure:3261: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3264 "configure"
+#line 3266 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -3289,12 +3291,12 @@ EOF
fi
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:3293: checking for mode_t" >&5
+echo "configure:3295: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3298 "configure"
+#line 3300 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3322,12 +3324,12 @@ EOF
fi
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3326: checking for off_t" >&5
+echo "configure:3328: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3331 "configure"
+#line 3333 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3355,12 +3357,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3359: checking for size_t" >&5
+echo "configure:3361: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3364 "configure"
+#line 3366 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3388,12 +3390,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3392: checking for pid_t" >&5
+echo "configure:3394: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3397 "configure"
+#line 3399 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3421,12 +3423,12 @@ EOF
fi
echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
-echo "configure:3425: checking for st_rdev in struct stat" >&5
+echo "configure:3427: checking for st_rdev in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3430 "configure"
+#line 3432 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -3434,7 +3436,7 @@ int main() {
struct stat s; s.st_rdev;
; return 0; }
EOF
-if { (eval echo configure:3438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_rdev=yes
else
@@ -3455,12 +3457,12 @@ EOF
fi
echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
-echo "configure:3459: checking for d_off in dirent" >&5
+echo "configure:3461: checking for d_off in dirent" >&5
if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3464 "configure"
+#line 3466 "configure"
#include "confdefs.h"
#include <unistd.h>
@@ -3470,7 +3472,7 @@ int main() {
struct dirent d; d.d_off;
; return 0; }
EOF
-if { (eval echo configure:3474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_dirent_d_off=yes
else
@@ -3491,12 +3493,12 @@ EOF
fi
echo $ac_n "checking for ino_t""... $ac_c" 1>&6
-echo "configure:3495: checking for ino_t" >&5
+echo "configure:3497: checking for ino_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3500 "configure"
+#line 3502 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3524,12 +3526,12 @@ EOF
fi
echo $ac_n "checking for loff_t""... $ac_c" 1>&6
-echo "configure:3528: checking for loff_t" >&5
+echo "configure:3530: checking for loff_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3533 "configure"
+#line 3535 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3557,12 +3559,12 @@ EOF
fi
echo $ac_n "checking for offset_t""... $ac_c" 1>&6
-echo "configure:3561: checking for offset_t" >&5
+echo "configure:3563: checking for offset_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3566 "configure"
+#line 3568 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3590,12 +3592,12 @@ EOF
fi
echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:3594: checking for ssize_t" >&5
+echo "configure:3596: checking for ssize_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3599 "configure"
+#line 3601 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3623,12 +3625,12 @@ EOF
fi
echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
-echo "configure:3627: checking for wchar_t" >&5
+echo "configure:3629: checking for wchar_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3632 "configure"
+#line 3634 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3658,7 +3660,7 @@ fi
# we need libcups for CUPS support...
echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
-echo "configure:3662: checking for httpConnect in -lcups" >&5
+echo "configure:3664: checking for httpConnect in -lcups" >&5
ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3666,7 +3668,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcups $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3670 "configure"
+#line 3672 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3677,7 +3679,7 @@ int main() {
httpConnect()
; return 0; }
EOF
-if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3707,7 +3709,7 @@ fi
# we need libdl for PAM and the new VFS code
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:3711: checking for dlopen in -ldl" >&5
+echo "configure:3713: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3715,7 +3717,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3719 "configure"
+#line 3721 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3726,7 +3728,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:3730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3752,13 +3754,13 @@ fi
echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
-echo "configure:3756: checking for sig_atomic_t type" >&5
+echo "configure:3758: checking for sig_atomic_t type" >&5
if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3762 "configure"
+#line 3764 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -3771,7 +3773,7 @@ int main() {
sig_atomic_t i = 0
; return 0; }
EOF
-if { (eval echo configure:3775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_sig_atomic_t=yes
else
@@ -3792,20 +3794,20 @@ EOF
fi
echo $ac_n "checking for errno in errno.h""... $ac_c" 1>&6
-echo "configure:3796: checking for errno in errno.h" >&5
+echo "configure:3798: checking for errno in errno.h" >&5
if eval "test \"`echo '$''{'samba_cv_errno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3802 "configure"
+#line 3804 "configure"
#include "confdefs.h"
#include <errno.h>
int main() {
int i = errno
; return 0; }
EOF
-if { (eval echo configure:3809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_errno=yes
else
@@ -3827,20 +3829,20 @@ fi
# stupid glibc has the functions but no declaration. grrrr.
echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
-echo "configure:3831: checking for setresuid declaration" >&5
+echo "configure:3833: checking for setresuid declaration" >&5
if eval "test \"`echo '$''{'samba_cv_have_setresuid_decl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3837 "configure"
+#line 3839 "configure"
#include "confdefs.h"
#include <unistd.h>
int main() {
int i = (int)setresuid
; return 0; }
EOF
-if { (eval echo configure:3844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_have_setresuid_decl=yes
else
@@ -3862,20 +3864,20 @@ fi
# stupid glibc has the functions but no declaration. grrrr.
echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
-echo "configure:3866: checking for setresgid declaration" >&5
+echo "configure:3868: checking for setresgid declaration" >&5
if eval "test \"`echo '$''{'samba_cv_have_setresgid_decl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3872 "configure"
+#line 3874 "configure"
#include "confdefs.h"
#include <unistd.h>
int main() {
int i = (int)setresgid
; return 0; }
EOF
-if { (eval echo configure:3879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_have_setresgid_decl=yes
else
@@ -3898,7 +3900,7 @@ fi
# and glibc has setresuid under linux but the function does
# nothing until kernel 2.1.44! very dumb.
echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
-echo "configure:3902: checking for real setresuid" >&5
+echo "configure:3904: checking for real setresuid" >&5
if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3907,12 +3909,12 @@ else
samba_cv_have_setresuid=cross
else
cat > conftest.$ac_ext <<EOF
-#line 3911 "configure"
+#line 3913 "configure"
#include "confdefs.h"
#include <errno.h>
main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
EOF
-if { (eval echo configure:3916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_have_setresuid=yes
else
@@ -3937,7 +3939,7 @@ fi
# Do the same check for setresguid...
#
echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
-echo "configure:3941: checking for real setresgid" >&5
+echo "configure:3943: checking for real setresgid" >&5
if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3946,13 +3948,13 @@ else
samba_cv_have_setresgid=cross
else
cat > conftest.$ac_ext <<EOF
-#line 3950 "configure"
+#line 3952 "configure"
#include "confdefs.h"
#include <unistd.h>
#include <errno.h>
main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
EOF
-if { (eval echo configure:3956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_have_setresgid=yes
else
@@ -3975,7 +3977,7 @@ EOF
fi
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:3979: checking for 8-bit clean memcmp" >&5
+echo "configure:3981: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3983,7 +3985,7 @@ else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 3987 "configure"
+#line 3989 "configure"
#include "confdefs.h"
main()
@@ -3993,7 +3995,7 @@ main()
}
EOF
-if { (eval echo configure:3997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
@@ -4016,12 +4018,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
for ac_func in crypt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4020: checking for $ac_func" >&5
+echo "configure:4022: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4025 "configure"
+#line 4027 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4044,7 +4046,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4070,7 +4072,7 @@ done
if test x"$ac_cv_func_crypt" = x"no"; then
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:4074: checking for crypt in -lcrypt" >&5
+echo "configure:4076: checking for crypt in -lcrypt" >&5
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4078,7 +4080,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4082 "configure"
+#line 4084 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4089,7 +4091,7 @@ int main() {
crypt()
; return 0; }
EOF
-if { (eval echo configure:4093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4121,7 +4123,7 @@ fi
if test "$ac_cv_header_readline_h" = "yes" ||
test "$ac_cv_header_readline_readline_h" = "yes"; then
echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
-echo "configure:4125: checking for readline in -lreadline" >&5
+echo "configure:4127: checking for readline in -lreadline" >&5
ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4129,7 +4131,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lreadline $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4133 "configure"
+#line 4135 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4140,7 +4142,7 @@ int main() {
readline()
; return 0; }
EOF
-if { (eval echo configure:4144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4179,12 +4181,12 @@ fi
for ac_func in connect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4183: checking for $ac_func" >&5
+echo "configure:4185: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4188 "configure"
+#line 4190 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4207,7 +4209,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4235,7 +4237,7 @@ if test x"$ac_cv_func_connect" = x"no"; then
case "$LIBS" in
*-lnsl*) ;;
*) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
-echo "configure:4239: checking for printf in -lnsl_s" >&5
+echo "configure:4241: checking for printf in -lnsl_s" >&5
ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4243,7 +4245,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl_s $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4247 "configure"
+#line 4249 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4254,7 +4256,7 @@ int main() {
printf()
; return 0; }
EOF
-if { (eval echo configure:4258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4285,7 +4287,7 @@ fi
case "$LIBS" in
*-lnsl*) ;;
*) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
-echo "configure:4289: checking for printf in -lnsl" >&5
+echo "configure:4291: checking for printf in -lnsl" >&5
ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4293,7 +4295,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4297 "configure"
+#line 4299 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4304,7 +4306,7 @@ int main() {
printf()
; return 0; }
EOF
-if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4335,7 +4337,7 @@ fi
case "$LIBS" in
*-lsocket*) ;;
*) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:4339: checking for connect in -lsocket" >&5
+echo "configure:4341: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4343,7 +4345,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4347 "configure"
+#line 4349 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4354,7 +4356,7 @@ int main() {
connect()
; return 0; }
EOF
-if { (eval echo configure:4358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4385,7 +4387,7 @@ fi
case "$LIBS" in
*-linet*) ;;
*) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
-echo "configure:4389: checking for connect in -linet" >&5
+echo "configure:4391: checking for connect in -linet" >&5
ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4393,7 +4395,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-linet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4397 "configure"
+#line 4399 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4404,7 +4406,7 @@ int main() {
connect()
; return 0; }
EOF
-if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4448,12 +4450,12 @@ fi
for ac_func in yp_get_default_domain
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4452: checking for $ac_func" >&5
+echo "configure:4454: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4457 "configure"
+#line 4459 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4476,7 +4478,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4502,7 +4504,7 @@ done
if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
-echo "configure:4506: checking for yp_get_default_domain in -lnsl" >&5
+echo "configure:4508: checking for yp_get_default_domain in -lnsl" >&5
ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4510,7 +4512,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4514 "configure"
+#line 4516 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4521,7 +4523,7 @@ int main() {
yp_get_default_domain()
; return 0; }
EOF
-if { (eval echo configure:4525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4551,12 +4553,12 @@ fi
for ac_func in execl
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4555: checking for $ac_func" >&5
+echo "configure:4557: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4560 "configure"
+#line 4562 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4579,7 +4581,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4612,12 +4614,12 @@ fi
for ac_func in waitpid getcwd strdup strtoul strerror chown chmod chroot
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4616: checking for $ac_func" >&5
+echo "configure:4618: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4621 "configure"
+#line 4623 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4640,7 +4642,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4667,12 +4669,12 @@ done
for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4671: checking for $ac_func" >&5
+echo "configure:4673: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4676 "configure"
+#line 4678 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4695,7 +4697,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4722,12 +4724,12 @@ done
for ac_func in memmove vsnprintf snprintf setsid glob strpbrk pipe crypt16 getauthuid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4726: checking for $ac_func" >&5
+echo "configure:4728: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4731 "configure"
+#line 4733 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4750,7 +4752,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4777,12 +4779,12 @@ done
for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4781: checking for $ac_func" >&5
+echo "configure:4783: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4786 "configure"
+#line 4788 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4805,7 +4807,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4832,12 +4834,12 @@ done
for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4836: checking for $ac_func" >&5
+echo "configure:4838: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4841 "configure"
+#line 4843 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4860,7 +4862,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4887,12 +4889,12 @@ done
for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4891: checking for $ac_func" >&5
+echo "configure:4893: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4896 "configure"
+#line 4898 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4915,7 +4917,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4942,12 +4944,12 @@ done
for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4946: checking for $ac_func" >&5
+echo "configure:4948: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4951 "configure"
+#line 4953 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4970,7 +4972,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4997,12 +4999,12 @@ done
for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5001: checking for $ac_func" >&5
+echo "configure:5003: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5006 "configure"
+#line 5008 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5025,7 +5027,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5052,12 +5054,12 @@ done
for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5056: checking for $ac_func" >&5
+echo "configure:5058: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5061 "configure"
+#line 5063 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5080,7 +5082,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5109,12 +5111,12 @@ done
for ac_func in syscall
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5113: checking for $ac_func" >&5
+echo "configure:5115: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5118 "configure"
+#line 5120 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5137,7 +5139,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5165,12 +5167,12 @@ done
for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5169: checking for $ac_func" >&5
+echo "configure:5171: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5174 "configure"
+#line 5176 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5193,7 +5195,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5220,12 +5222,12 @@ done
for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5224: checking for $ac_func" >&5
+echo "configure:5226: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5229 "configure"
+#line 5231 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5248,7 +5250,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5275,12 +5277,12 @@ done
for ac_func in __getcwd _getcwd
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5279: checking for $ac_func" >&5
+echo "configure:5281: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5284 "configure"
+#line 5286 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5303,7 +5305,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5330,12 +5332,12 @@ done
for ac_func in __xstat __fxstat __lxstat
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5334: checking for $ac_func" >&5
+echo "configure:5336: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5339 "configure"
+#line 5341 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5358,7 +5360,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5385,12 +5387,12 @@ done
for ac_func in _stat _lstat _fstat __stat __lstat __fstat
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5389: checking for $ac_func" >&5
+echo "configure:5391: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5394 "configure"
+#line 5396 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5413,7 +5415,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5440,12 +5442,12 @@ done
for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5444: checking for $ac_func" >&5
+echo "configure:5446: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5449 "configure"
+#line 5451 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5468,7 +5470,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5495,12 +5497,12 @@ done
for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5499: checking for $ac_func" >&5
+echo "configure:5501: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5504 "configure"
+#line 5506 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5523,7 +5525,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5550,12 +5552,12 @@ done
for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5554: checking for $ac_func" >&5
+echo "configure:5556: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5559 "configure"
+#line 5561 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5578,7 +5580,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5605,12 +5607,12 @@ done
for ac_func in _write __write _fork __fork
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5609: checking for $ac_func" >&5
+echo "configure:5611: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5614 "configure"
+#line 5616 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5633,7 +5635,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5660,12 +5662,12 @@ done
for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5664: checking for $ac_func" >&5
+echo "configure:5666: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5669 "configure"
+#line 5671 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5688,7 +5690,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5715,12 +5717,12 @@ done
for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5719: checking for $ac_func" >&5
+echo "configure:5721: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5724 "configure"
+#line 5726 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5743,7 +5745,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5770,12 +5772,12 @@ done
for ac_func in pread _pread __pread pread64 _pread64 __pread64
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5774: checking for $ac_func" >&5
+echo "configure:5776: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5779 "configure"
+#line 5781 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5798,7 +5800,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5825,12 +5827,12 @@ done
for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5829: checking for $ac_func" >&5
+echo "configure:5831: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5834 "configure"
+#line 5836 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5853,7 +5855,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5880,12 +5882,12 @@ done
for ac_func in open64 _open64 __open64 creat64
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5884: checking for $ac_func" >&5
+echo "configure:5886: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5889 "configure"
+#line 5891 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5908,7 +5910,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5939,9 +5941,9 @@ done
if test x$ac_cv_func_stat64 = xno ; then
echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
-echo "configure:5943: checking for stat64 in <sys/stat.h>" >&5
+echo "configure:5945: checking for stat64 in <sys/stat.h>" >&5
cat > conftest.$ac_ext <<EOF
-#line 5945 "configure"
+#line 5947 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -5953,7 +5955,7 @@ int main() {
struct stat64 st64; exit(stat64(".",&st64));
; return 0; }
EOF
-if { (eval echo configure:5957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_stat64=yes
else
@@ -5972,9 +5974,9 @@ fi
if test x$ac_cv_func_lstat64 = xno ; then
echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
-echo "configure:5976: checking for lstat64 in <sys/stat.h>" >&5
+echo "configure:5978: checking for lstat64 in <sys/stat.h>" >&5
cat > conftest.$ac_ext <<EOF
-#line 5978 "configure"
+#line 5980 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -5986,7 +5988,7 @@ int main() {
struct stat64 st64; exit(lstat64(".",&st64));
; return 0; }
EOF
-if { (eval echo configure:5990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_lstat64=yes
else
@@ -6005,9 +6007,9 @@ fi
if test x$ac_cv_func_fstat64 = xno ; then
echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
-echo "configure:6009: checking for fstat64 in <sys/stat.h>" >&5
+echo "configure:6011: checking for fstat64 in <sys/stat.h>" >&5
cat > conftest.$ac_ext <<EOF
-#line 6011 "configure"
+#line 6013 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -6019,7 +6021,7 @@ int main() {
struct stat64 st64; exit(fstat64(0,&st64));
; return 0; }
EOF
-if { (eval echo configure:6023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_fstat64=yes
else
@@ -6044,7 +6046,7 @@ fi
if test x$ac_cv_func_strcasecmp = xno ; then
echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
-echo "configure:6048: checking for strcasecmp in -lresolv" >&5
+echo "configure:6050: checking for strcasecmp in -lresolv" >&5
ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6052,7 +6054,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6056 "configure"
+#line 6058 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6063,7 +6065,7 @@ int main() {
strcasecmp()
; return 0; }
EOF
-if { (eval echo configure:6067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -6099,12 +6101,12 @@ case "$LIBS" in
*-lsecurity*) for ac_func in putprpwnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6103: checking for $ac_func" >&5
+echo "configure:6105: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6108 "configure"
+#line 6110 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6127,7 +6129,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6152,7 +6154,7 @@ fi
done
;;
*) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
-echo "configure:6156: checking for putprpwnam in -lsecurity" >&5
+echo "configure:6158: checking for putprpwnam in -lsecurity" >&5
ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6160,7 +6162,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsecurity $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6164 "configure"
+#line 6166 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6171,7 +6173,7 @@ int main() {
putprpwnam()
; return 0; }
EOF
-if { (eval echo configure:6175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -6201,12 +6203,12 @@ fi
for ac_func in putprpwnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6205: checking for $ac_func" >&5
+echo "configure:6207: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6210 "configure"
+#line 6212 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6229,7 +6231,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6260,12 +6262,12 @@ case "$LIBS" in
*-lsec*) for ac_func in putprpwnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6264: checking for $ac_func" >&5
+echo "configure:6266: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6269 "configure"
+#line 6271 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6288,7 +6290,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6313,7 +6315,7 @@ fi
done
;;
*) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
-echo "configure:6317: checking for putprpwnam in -lsec" >&5
+echo "configure:6319: checking for putprpwnam in -lsec" >&5
ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6321,7 +6323,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsec $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6325 "configure"
+#line 6327 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6332,7 +6334,7 @@ int main() {
putprpwnam()
; return 0; }
EOF
-if { (eval echo configure:6336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -6362,12 +6364,12 @@ fi
for ac_func in putprpwnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6366: checking for $ac_func" >&5
+echo "configure:6368: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6371 "configure"
+#line 6373 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6390,7 +6392,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6422,12 +6424,12 @@ case "$LIBS" in
*-lsecurity*) for ac_func in set_auth_parameters
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6426: checking for $ac_func" >&5
+echo "configure:6428: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6431 "configure"
+#line 6433 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6450,7 +6452,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6475,7 +6477,7 @@ fi
done
;;
*) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
-echo "configure:6479: checking for set_auth_parameters in -lsecurity" >&5
+echo "configure:6481: checking for set_auth_parameters in -lsecurity" >&5
ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6483,7 +6485,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsecurity $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6487 "configure"
+#line 6489 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6494,7 +6496,7 @@ int main() {
set_auth_parameters()
; return 0; }
EOF
-if { (eval echo configure:6498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -6524,12 +6526,12 @@ fi
for ac_func in set_auth_parameters
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6528: checking for $ac_func" >&5
+echo "configure:6530: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6533 "configure"
+#line 6535 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6552,7 +6554,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6583,12 +6585,12 @@ case "$LIBS" in
*-lsec*) for ac_func in set_auth_parameters
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6587: checking for $ac_func" >&5
+echo "configure:6589: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6592 "configure"
+#line 6594 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6611,7 +6613,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6636,7 +6638,7 @@ fi
done
;;
*) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
-echo "configure:6640: checking for set_auth_parameters in -lsec" >&5
+echo "configure:6642: checking for set_auth_parameters in -lsec" >&5
ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6644,7 +6646,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsec $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6648 "configure"
+#line 6650 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6655,7 +6657,7 @@ int main() {
set_auth_parameters()
; return 0; }
EOF
-if { (eval echo configure:6659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -6685,12 +6687,12 @@ fi
for ac_func in set_auth_parameters
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6689: checking for $ac_func" >&5
+echo "configure:6691: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6694 "configure"
+#line 6696 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6713,7 +6715,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6746,12 +6748,12 @@ case "$LIBS" in
*-lgen*) for ac_func in getspnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6750: checking for $ac_func" >&5
+echo "configure:6752: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6755 "configure"
+#line 6757 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6774,7 +6776,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6799,7 +6801,7 @@ fi
done
;;
*) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
-echo "configure:6803: checking for getspnam in -lgen" >&5
+echo "configure:6805: checking for getspnam in -lgen" >&5
ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6807,7 +6809,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgen $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6811 "configure"
+#line 6813 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6818,7 +6820,7 @@ int main() {
getspnam()
; return 0; }
EOF
-if { (eval echo configure:6822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -6848,12 +6850,12 @@ fi
for ac_func in getspnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6852: checking for $ac_func" >&5
+echo "configure:6854: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6857 "configure"
+#line 6859 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6876,7 +6878,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6908,12 +6910,12 @@ case "$LIBS" in
*-lsecurity*) for ac_func in getspnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6912: checking for $ac_func" >&5
+echo "configure:6914: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6917 "configure"
+#line 6919 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6936,7 +6938,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6961,7 +6963,7 @@ fi
done
;;
*) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
-echo "configure:6965: checking for getspnam in -lsecurity" >&5
+echo "configure:6967: checking for getspnam in -lsecurity" >&5
ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6969,7 +6971,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsecurity $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6973 "configure"
+#line 6975 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6980,7 +6982,7 @@ int main() {
getspnam()
; return 0; }
EOF
-if { (eval echo configure:6984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7010,12 +7012,12 @@ fi
for ac_func in getspnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7014: checking for $ac_func" >&5
+echo "configure:7016: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7019 "configure"
+#line 7021 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7038,7 +7040,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7069,12 +7071,12 @@ case "$LIBS" in
*-lsec*) for ac_func in getspnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7073: checking for $ac_func" >&5
+echo "configure:7075: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7078 "configure"
+#line 7080 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7097,7 +7099,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7122,7 +7124,7 @@ fi
done
;;
*) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
-echo "configure:7126: checking for getspnam in -lsec" >&5
+echo "configure:7128: checking for getspnam in -lsec" >&5
ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7130,7 +7132,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsec $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7134 "configure"
+#line 7136 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7141,7 +7143,7 @@ int main() {
getspnam()
; return 0; }
EOF
-if { (eval echo configure:7145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7171,12 +7173,12 @@ fi
for ac_func in getspnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7175: checking for $ac_func" >&5
+echo "configure:7177: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7180 "configure"
+#line 7182 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7199,7 +7201,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7231,12 +7233,12 @@ case "$LIBS" in
*-lsecurity*) for ac_func in bigcrypt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7235: checking for $ac_func" >&5
+echo "configure:7237: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7240 "configure"
+#line 7242 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7259,7 +7261,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7284,7 +7286,7 @@ fi
done
;;
*) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
-echo "configure:7288: checking for bigcrypt in -lsecurity" >&5
+echo "configure:7290: checking for bigcrypt in -lsecurity" >&5
ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7292,7 +7294,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsecurity $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7296 "configure"
+#line 7298 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7303,7 +7305,7 @@ int main() {
bigcrypt()
; return 0; }
EOF
-if { (eval echo configure:7307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7333,12 +7335,12 @@ fi
for ac_func in bigcrypt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7337: checking for $ac_func" >&5
+echo "configure:7339: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7342 "configure"
+#line 7344 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7361,7 +7363,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7392,12 +7394,12 @@ case "$LIBS" in
*-lsec*) for ac_func in bigcrypt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7396: checking for $ac_func" >&5
+echo "configure:7398: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7401 "configure"
+#line 7403 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7420,7 +7422,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7445,7 +7447,7 @@ fi
done
;;
*) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
-echo "configure:7449: checking for bigcrypt in -lsec" >&5
+echo "configure:7451: checking for bigcrypt in -lsec" >&5
ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7453,7 +7455,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsec $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7457 "configure"
+#line 7459 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7464,7 +7466,7 @@ int main() {
bigcrypt()
; return 0; }
EOF
-if { (eval echo configure:7468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7494,12 +7496,12 @@ fi
for ac_func in bigcrypt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7498: checking for $ac_func" >&5
+echo "configure:7500: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7503 "configure"
+#line 7505 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7522,7 +7524,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7554,12 +7556,12 @@ case "$LIBS" in
*-lsecurity*) for ac_func in getprpwnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7558: checking for $ac_func" >&5
+echo "configure:7560: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7563 "configure"
+#line 7565 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7582,7 +7584,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7607,7 +7609,7 @@ fi
done
;;
*) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
-echo "configure:7611: checking for getprpwnam in -lsecurity" >&5
+echo "configure:7613: checking for getprpwnam in -lsecurity" >&5
ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7615,7 +7617,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsecurity $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7619 "configure"
+#line 7621 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7626,7 +7628,7 @@ int main() {
getprpwnam()
; return 0; }
EOF
-if { (eval echo configure:7630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7656,12 +7658,12 @@ fi
for ac_func in getprpwnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7660: checking for $ac_func" >&5
+echo "configure:7662: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7665 "configure"
+#line 7667 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7684,7 +7686,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7715,12 +7717,12 @@ case "$LIBS" in
*-lsec*) for ac_func in getprpwnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7719: checking for $ac_func" >&5
+echo "configure:7721: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7724 "configure"
+#line 7726 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7743,7 +7745,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7768,7 +7770,7 @@ fi
done
;;
*) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
-echo "configure:7772: checking for getprpwnam in -lsec" >&5
+echo "configure:7774: checking for getprpwnam in -lsec" >&5
ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7776,7 +7778,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsec $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7780 "configure"
+#line 7782 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7787,7 +7789,7 @@ int main() {
getprpwnam()
; return 0; }
EOF
-if { (eval echo configure:7791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7817,12 +7819,12 @@ fi
for ac_func in getprpwnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7821: checking for $ac_func" >&5
+echo "configure:7823: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7826 "configure"
+#line 7828 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7845,7 +7847,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7950,7 +7952,7 @@ EOF
*dgux*) # Extract the first word of "groff", so it can be a program name with args.
set dummy groff; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7954: checking for $ac_word" >&5
+echo "configure:7956: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8005,7 +8007,7 @@ esac
# try to work out how to produce pic code with this compiler
echo $ac_n "checking whether ${CC-cc} accepts -fpic""... $ac_c" 1>&6
-echo "configure:8009: checking whether ${CC-cc} accepts -fpic" >&5
+echo "configure:8011: checking whether ${CC-cc} accepts -fpic" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8025,7 +8027,7 @@ if test $ac_cv_prog_cc_fpic = yes; then
fi
if test x$PICFLAG = x; then
echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6
-echo "configure:8029: checking whether ${CC-cc} accepts -Kpic" >&5
+echo "configure:8031: checking whether ${CC-cc} accepts -Kpic" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8046,7 +8048,7 @@ echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6
fi
if test x$PICFLAG = x; then
echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
-echo "configure:8050: checking whether ${CC-cc} accepts -KPIC" >&5
+echo "configure:8052: checking whether ${CC-cc} accepts -KPIC" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8069,7 +8071,7 @@ fi
################
echo $ac_n "checking for long long""... $ac_c" 1>&6
-echo "configure:8073: checking for long long" >&5
+echo "configure:8075: checking for long long" >&5
if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8078,12 +8080,12 @@ if test "$cross_compiling" = yes; then
samba_cv_have_longlong=cross
else
cat > conftest.$ac_ext <<EOF
-#line 8082 "configure"
+#line 8084 "configure"
#include "confdefs.h"
#include <stdio.h>
main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
EOF
-if { (eval echo configure:8087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_have_longlong=yes
else
@@ -8110,20 +8112,20 @@ fi
# AIX needs this.
echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
-echo "configure:8114: checking for LL suffix on long long integers" >&5
+echo "configure:8116: checking for LL suffix on long long integers" >&5
if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8120 "configure"
+#line 8122 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
long long i = 0x8000000000LL
; return 0; }
EOF
-if { (eval echo configure:8127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_compiler_supports_ll=yes
else
@@ -8145,7 +8147,7 @@ fi
echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
-echo "configure:8149: checking for 64 bit off_t" >&5
+echo "configure:8151: checking for 64 bit off_t" >&5
if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8154,13 +8156,13 @@ if test "$cross_compiling" = yes; then
samba_cv_SIZEOF_OFF_T=cross
else
cat > conftest.$ac_ext <<EOF
-#line 8158 "configure"
+#line 8160 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/stat.h>
main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
EOF
-if { (eval echo configure:8164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_SIZEOF_OFF_T=yes
else
@@ -8183,7 +8185,7 @@ EOF
fi
echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:8187: checking for off64_t" >&5
+echo "configure:8189: checking for off64_t" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8192,7 +8194,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_OFF64_T=cross
else
cat > conftest.$ac_ext <<EOF
-#line 8196 "configure"
+#line 8198 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -8202,7 +8204,7 @@ else
#include <sys/stat.h>
main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
EOF
-if { (eval echo configure:8206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_OFF64_T=yes
else
@@ -8225,7 +8227,7 @@ EOF
fi
echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
-echo "configure:8229: checking for 64 bit ino_t" >&5
+echo "configure:8231: checking for 64 bit ino_t" >&5
if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8234,13 +8236,13 @@ if test "$cross_compiling" = yes; then
samba_cv_SIZEOF_INO_T=cross
else
cat > conftest.$ac_ext <<EOF
-#line 8238 "configure"
+#line 8240 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/stat.h>
main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
EOF
-if { (eval echo configure:8244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_SIZEOF_INO_T=yes
else
@@ -8263,7 +8265,7 @@ EOF
fi
echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
-echo "configure:8267: checking for ino64_t" >&5
+echo "configure:8269: checking for ino64_t" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8272,7 +8274,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_INO64_T=cross
else
cat > conftest.$ac_ext <<EOF
-#line 8276 "configure"
+#line 8278 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -8282,7 +8284,7 @@ else
#include <sys/stat.h>
main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
EOF
-if { (eval echo configure:8286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_INO64_T=yes
else
@@ -8305,13 +8307,13 @@ EOF
fi
echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:8309: checking for struct dirent64" >&5
+echo "configure:8311: checking for struct dirent64" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8315 "configure"
+#line 8317 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -8323,7 +8325,7 @@ int main() {
struct dirent64 de;
; return 0; }
EOF
-if { (eval echo configure:8327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_STRUCT_DIRENT64=yes
else
@@ -8344,7 +8346,7 @@ EOF
fi
echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
-echo "configure:8348: checking for unsigned char" >&5
+echo "configure:8350: checking for unsigned char" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8353,12 +8355,12 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_UNSIGNED_CHAR=cross
else
cat > conftest.$ac_ext <<EOF
-#line 8357 "configure"
+#line 8359 "configure"
#include "confdefs.h"
#include <stdio.h>
main() { char c; c=250; exit((c > 0)?0:1); }
EOF
-if { (eval echo configure:8362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_UNSIGNED_CHAR=yes
else
@@ -8381,13 +8383,13 @@ EOF
fi
echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
-echo "configure:8385: checking for sin_len in sock" >&5
+echo "configure:8387: checking for sin_len in sock" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8391 "configure"
+#line 8393 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
@@ -8396,7 +8398,7 @@ int main() {
struct sockaddr_in sock; sock.sin_len = sizeof(sock);
; return 0; }
EOF
-if { (eval echo configure:8400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_SOCK_SIN_LEN=yes
else
@@ -8417,13 +8419,13 @@ EOF
fi
echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
-echo "configure:8421: checking whether seekdir returns void" >&5
+echo "configure:8423: checking whether seekdir returns void" >&5
if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8427 "configure"
+#line 8429 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <dirent.h>
@@ -8432,7 +8434,7 @@ int main() {
return 0;
; return 0; }
EOF
-if { (eval echo configure:8436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_SEEKDIR_RETURNS_VOID=yes
else
@@ -8453,20 +8455,20 @@ EOF
fi
echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
-echo "configure:8457: checking for __FILE__ macro" >&5
+echo "configure:8459: checking for __FILE__ macro" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8463 "configure"
+#line 8465 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
printf("%s\n", __FILE__);
; return 0; }
EOF
-if { (eval echo configure:8470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_FILE_MACRO=yes
else
@@ -8487,20 +8489,20 @@ EOF
fi
echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
-echo "configure:8491: checking for __FUNCTION__ macro" >&5
+echo "configure:8493: checking for __FUNCTION__ macro" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8497 "configure"
+#line 8499 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
printf("%s\n", __FUNCTION__);
; return 0; }
EOF
-if { (eval echo configure:8504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_FUNCTION_MACRO=yes
else
@@ -8521,7 +8523,7 @@ EOF
fi
echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
-echo "configure:8525: checking if gettimeofday takes tz argument" >&5
+echo "configure:8527: checking if gettimeofday takes tz argument" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8530,14 +8532,14 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
else
cat > conftest.$ac_ext <<EOF
-#line 8534 "configure"
+#line 8536 "configure"
#include "confdefs.h"
#include <sys/time.h>
#include <unistd.h>
main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
EOF
-if { (eval echo configure:8541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
else
@@ -8561,7 +8563,7 @@ fi
echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
-echo "configure:8565: checking for broken readdir" >&5
+echo "configure:8567: checking for broken readdir" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8570,7 +8572,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_BROKEN_READDIR=cross
else
cat > conftest.$ac_ext <<EOF
-#line 8574 "configure"
+#line 8576 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <dirent.h>
@@ -8578,7 +8580,7 @@ main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
di->d_name[0] == 0) exit(0); exit(1);}
EOF
-if { (eval echo configure:8582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_BROKEN_READDIR=yes
else
@@ -8601,13 +8603,13 @@ EOF
fi
echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
-echo "configure:8605: checking for utimbuf" >&5
+echo "configure:8607: checking for utimbuf" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8611 "configure"
+#line 8613 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utime.h>
@@ -8615,7 +8617,7 @@ int main() {
struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
; return 0; }
EOF
-if { (eval echo configure:8619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UTIMBUF=yes
else
@@ -8639,12 +8641,12 @@ fi
for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8643: checking for $ac_func" >&5
+echo "configure:8645: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8648 "configure"
+#line 8650 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -8667,7 +8669,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:8671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -8693,13 +8695,13 @@ done
echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
-echo "configure:8697: checking for ut_name in utmp" >&5
+echo "configure:8699: checking for ut_name in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8703 "configure"
+#line 8705 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -8707,7 +8709,7 @@ int main() {
struct utmp ut; ut.ut_name[0] = 'a';
; return 0; }
EOF
-if { (eval echo configure:8711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_NAME=yes
else
@@ -8728,13 +8730,13 @@ EOF
fi
echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
-echo "configure:8732: checking for ut_user in utmp" >&5
+echo "configure:8734: checking for ut_user in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8738 "configure"
+#line 8740 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -8742,7 +8744,7 @@ int main() {
struct utmp ut; ut.ut_user[0] = 'a';
; return 0; }
EOF
-if { (eval echo configure:8746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_USER=yes
else
@@ -8763,13 +8765,13 @@ EOF
fi
echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
-echo "configure:8767: checking for ut_id in utmp" >&5
+echo "configure:8769: checking for ut_id in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8773 "configure"
+#line 8775 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -8777,7 +8779,7 @@ int main() {
struct utmp ut; ut.ut_id[0] = 'a';
; return 0; }
EOF
-if { (eval echo configure:8781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_ID=yes
else
@@ -8798,13 +8800,13 @@ EOF
fi
echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
-echo "configure:8802: checking for ut_host in utmp" >&5
+echo "configure:8804: checking for ut_host in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8808 "configure"
+#line 8810 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -8812,7 +8814,7 @@ int main() {
struct utmp ut; ut.ut_host[0] = 'a';
; return 0; }
EOF
-if { (eval echo configure:8816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_HOST=yes
else
@@ -8833,13 +8835,13 @@ EOF
fi
echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
-echo "configure:8837: checking for ut_time in utmp" >&5
+echo "configure:8839: checking for ut_time in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8843 "configure"
+#line 8845 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -8847,7 +8849,7 @@ int main() {
struct utmp ut; time_t t; ut.ut_time = t;
; return 0; }
EOF
-if { (eval echo configure:8851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_TIME=yes
else
@@ -8868,13 +8870,13 @@ EOF
fi
echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
-echo "configure:8872: checking for ut_tv in utmp" >&5
+echo "configure:8874: checking for ut_tv in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8878 "configure"
+#line 8880 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -8882,7 +8884,7 @@ int main() {
struct utmp ut; struct timeval tv; ut.ut_tv = tv;
; return 0; }
EOF
-if { (eval echo configure:8886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_TV=yes
else
@@ -8903,13 +8905,13 @@ EOF
fi
echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
-echo "configure:8907: checking for ut_type in utmp" >&5
+echo "configure:8909: checking for ut_type in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8913 "configure"
+#line 8915 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -8917,7 +8919,7 @@ int main() {
struct utmp ut; ut.ut_type = 0;
; return 0; }
EOF
-if { (eval echo configure:8921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_TYPE=yes
else
@@ -8938,13 +8940,13 @@ EOF
fi
echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
-echo "configure:8942: checking for ut_pid in utmp" >&5
+echo "configure:8944: checking for ut_pid in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8948 "configure"
+#line 8950 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -8952,7 +8954,7 @@ int main() {
struct utmp ut; ut.ut_pid = 0;
; return 0; }
EOF
-if { (eval echo configure:8956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_PID=yes
else
@@ -8973,13 +8975,13 @@ EOF
fi
echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
-echo "configure:8977: checking for ut_exit in utmp" >&5
+echo "configure:8979: checking for ut_exit in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8983 "configure"
+#line 8985 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -8987,7 +8989,7 @@ int main() {
struct utmp ut; ut.ut_exit.e_exit = 0;
; return 0; }
EOF
-if { (eval echo configure:8991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_EXIT=yes
else
@@ -9008,13 +9010,13 @@ EOF
fi
echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
-echo "configure:9012: checking for ut_addr in utmp" >&5
+echo "configure:9014: checking for ut_addr in utmp" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9018 "configure"
+#line 9020 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -9022,7 +9024,7 @@ int main() {
struct utmp ut; ut.ut_addr = 0;
; return 0; }
EOF
-if { (eval echo configure:9026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UT_UT_ADDR=yes
else
@@ -9044,13 +9046,13 @@ fi
if test x$ac_cv_func_pututline = xyes ; then
echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
-echo "configure:9048: checking whether pututline returns pointer" >&5
+echo "configure:9050: checking whether pututline returns pointer" >&5
if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9054 "configure"
+#line 9056 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmp.h>
@@ -9058,7 +9060,7 @@ int main() {
struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
; return 0; }
EOF
-if { (eval echo configure:9062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_PUTUTLINE_RETURNS_UTMP=yes
else
@@ -9080,13 +9082,13 @@ EOF
fi
echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
-echo "configure:9084: checking for ut_syslen in utmpx" >&5
+echo "configure:9086: checking for ut_syslen in utmpx" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9090 "configure"
+#line 9092 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utmpx.h>
@@ -9094,7 +9096,7 @@ int main() {
struct utmpx ux; ux.ut_syslen = 0;
; return 0; }
EOF
-if { (eval echo configure:9098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UX_UT_SYSLEN=yes
else
@@ -9115,7 +9117,7 @@ EOF
fi
echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
-echo "configure:9119: checking for Linux kernel oplocks" >&5
+echo "configure:9121: checking for Linux kernel oplocks" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9124,7 +9126,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9128 "configure"
+#line 9130 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -9138,7 +9140,7 @@ main() {
}
EOF
-if { (eval echo configure:9142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
else
@@ -9161,7 +9163,7 @@ EOF
fi
echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
-echo "configure:9165: checking for kernel change notify support" >&5
+echo "configure:9167: checking for kernel change notify support" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9170,7 +9172,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9174 "configure"
+#line 9176 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -9184,7 +9186,7 @@ main() {
}
EOF
-if { (eval echo configure:9188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
else
@@ -9207,7 +9209,7 @@ EOF
fi
echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
-echo "configure:9211: checking for kernel share modes" >&5
+echo "configure:9213: checking for kernel share modes" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9216,7 +9218,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_KERNEL_SHARE_MODES=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9220 "configure"
+#line 9222 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -9232,7 +9234,7 @@ main() {
}
EOF
-if { (eval echo configure:9236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_KERNEL_SHARE_MODES=yes
else
@@ -9258,13 +9260,13 @@ fi
echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
-echo "configure:9262: checking for IRIX kernel oplock type definitions" >&5
+echo "configure:9264: checking for IRIX kernel oplock type definitions" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9268 "configure"
+#line 9270 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <fcntl.h>
@@ -9272,7 +9274,7 @@ int main() {
oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
; return 0; }
EOF
-if { (eval echo configure:9276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
else
@@ -9293,7 +9295,7 @@ EOF
fi
echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
-echo "configure:9297: checking for irix specific capabilities" >&5
+echo "configure:9299: checking for irix specific capabilities" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9302,7 +9304,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9306 "configure"
+#line 9308 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/capability.h>
@@ -9317,7 +9319,7 @@ main() {
}
EOF
-if { (eval echo configure:9321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
else
@@ -9345,13 +9347,13 @@ fi
#
echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:9349: checking for int16 typedef included by rpc/rpc.h" >&5
+echo "configure:9351: checking for int16 typedef included by rpc/rpc.h" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9355 "configure"
+#line 9357 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
@@ -9361,7 +9363,7 @@ int main() {
int16 testvar;
; return 0; }
EOF
-if { (eval echo configure:9365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
else
@@ -9382,13 +9384,13 @@ EOF
fi
echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:9386: checking for uint16 typedef included by rpc/rpc.h" >&5
+echo "configure:9388: checking for uint16 typedef included by rpc/rpc.h" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9392 "configure"
+#line 9394 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
@@ -9398,7 +9400,7 @@ int main() {
uint16 testvar;
; return 0; }
EOF
-if { (eval echo configure:9402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
else
@@ -9419,13 +9421,13 @@ EOF
fi
echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:9423: checking for int32 typedef included by rpc/rpc.h" >&5
+echo "configure:9425: checking for int32 typedef included by rpc/rpc.h" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9429 "configure"
+#line 9431 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
@@ -9435,7 +9437,7 @@ int main() {
int32 testvar;
; return 0; }
EOF
-if { (eval echo configure:9439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
else
@@ -9456,13 +9458,13 @@ EOF
fi
echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:9460: checking for uint32 typedef included by rpc/rpc.h" >&5
+echo "configure:9462: checking for uint32 typedef included by rpc/rpc.h" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9466 "configure"
+#line 9468 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if defined(HAVE_RPC_RPC_H)
@@ -9472,7 +9474,7 @@ int main() {
uint32 testvar;
; return 0; }
EOF
-if { (eval echo configure:9476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
else
@@ -9494,13 +9496,13 @@ fi
echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
-echo "configure:9498: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
+echo "configure:9500: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9504 "configure"
+#line 9506 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_SECURITY_H
@@ -9514,7 +9516,7 @@ int main() {
int testvar;
; return 0; }
EOF
-if { (eval echo configure:9518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
else
@@ -9535,16 +9537,16 @@ EOF
fi
echo $ac_n "checking for test routines""... $ac_c" 1>&6
-echo "configure:9539: checking for test routines" >&5
+echo "configure:9541: checking for test routines" >&5
if test "$cross_compiling" = yes; then
echo "configure: warning: cannot run when cross-compiling" 1>&2
else
cat > conftest.$ac_ext <<EOF
-#line 9544 "configure"
+#line 9546 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/trivial.c"
EOF
-if { (eval echo configure:9548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""yes" 1>&6
else
@@ -9558,7 +9560,7 @@ fi
echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
-echo "configure:9562: checking for ftruncate extend" >&5
+echo "configure:9564: checking for ftruncate extend" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9567,11 +9569,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_FTRUNCATE_EXTEND=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9571 "configure"
+#line 9573 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/ftruncate.c"
EOF
-if { (eval echo configure:9575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_FTRUNCATE_EXTEND=yes
else
@@ -9594,7 +9596,7 @@ EOF
fi
echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
-echo "configure:9598: checking for broken getgroups" >&5
+echo "configure:9600: checking for broken getgroups" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9603,11 +9605,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_BROKEN_GETGROUPS=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9607 "configure"
+#line 9609 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/getgroups.c"
EOF
-if { (eval echo configure:9611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_BROKEN_GETGROUPS=yes
else
@@ -9630,7 +9632,7 @@ EOF
fi
echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
-echo "configure:9634: checking whether getpass should be replaced" >&5
+echo "configure:9636: checking whether getpass should be replaced" >&5
if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9638,7 +9640,7 @@ else
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
cat > conftest.$ac_ext <<EOF
-#line 9642 "configure"
+#line 9644 "configure"
#include "confdefs.h"
#define REPLACE_GETPASS 1
@@ -9651,7 +9653,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:9655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_REPLACE_GETPASS=yes
else
@@ -9674,7 +9676,7 @@ EOF
fi
echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
-echo "configure:9678: checking for broken inet_ntoa" >&5
+echo "configure:9680: checking for broken inet_ntoa" >&5
if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9683,7 +9685,7 @@ if test "$cross_compiling" = yes; then
samba_cv_REPLACE_INET_NTOA=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9687 "configure"
+#line 9689 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -9697,7 +9699,7 @@ if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); }
exit(1);}
EOF
-if { (eval echo configure:9701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_REPLACE_INET_NTOA=yes
else
@@ -9720,7 +9722,7 @@ EOF
fi
echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
-echo "configure:9724: checking for sysconf(_SC_NGROUPS_MAX)" >&5
+echo "configure:9726: checking for sysconf(_SC_NGROUPS_MAX)" >&5
if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9729,12 +9731,12 @@ if test "$cross_compiling" = yes; then
samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9733 "configure"
+#line 9735 "configure"
#include "confdefs.h"
#include <unistd.h>
main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
EOF
-if { (eval echo configure:9738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
else
@@ -9757,7 +9759,7 @@ EOF
fi
echo $ac_n "checking for root""... $ac_c" 1>&6
-echo "configure:9761: checking for root" >&5
+echo "configure:9763: checking for root" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9766,11 +9768,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_ROOT=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9770 "configure"
+#line 9772 "configure"
#include "confdefs.h"
main() { exit(getuid() != 0); }
EOF
-if { (eval echo configure:9774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_ROOT=yes
else
@@ -9798,7 +9800,7 @@ fi
# look for a method of finding the list of network interfaces
iface=no;
echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
-echo "configure:9802: checking for iface AIX" >&5
+echo "configure:9804: checking for iface AIX" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9807,7 +9809,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_IFACE_AIX=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9811 "configure"
+#line 9813 "configure"
#include "confdefs.h"
#define HAVE_IFACE_AIX 1
@@ -9815,7 +9817,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/interfaces.c"
EOF
-if { (eval echo configure:9819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_IFACE_AIX=yes
else
@@ -9839,7 +9841,7 @@ fi
if test $iface = no; then
echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
-echo "configure:9843: checking for iface ifconf" >&5
+echo "configure:9845: checking for iface ifconf" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9848,7 +9850,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_IFACE_IFCONF=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9852 "configure"
+#line 9854 "configure"
#include "confdefs.h"
#define HAVE_IFACE_IFCONF 1
@@ -9856,7 +9858,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/interfaces.c"
EOF
-if { (eval echo configure:9860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_IFACE_IFCONF=yes
else
@@ -9881,7 +9883,7 @@ fi
if test $iface = no; then
echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
-echo "configure:9885: checking for iface ifreq" >&5
+echo "configure:9887: checking for iface ifreq" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9890,7 +9892,7 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_IFACE_IFREQ=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9894 "configure"
+#line 9896 "configure"
#include "confdefs.h"
#define HAVE_IFACE_IFREQ 1
@@ -9898,7 +9900,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/interfaces.c"
EOF
-if { (eval echo configure:9902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_IFACE_IFREQ=yes
else
@@ -9927,7 +9929,7 @@ fi
seteuid=no;
if test $seteuid = no; then
echo $ac_n "checking for setresuid""... $ac_c" 1>&6
-echo "configure:9931: checking for setresuid" >&5
+echo "configure:9933: checking for setresuid" >&5
if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9936,7 +9938,7 @@ if test "$cross_compiling" = yes; then
samba_cv_USE_SETRESUID=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9940 "configure"
+#line 9942 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
@@ -9944,7 +9946,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
EOF
-if { (eval echo configure:9948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_USE_SETRESUID=yes
else
@@ -9970,7 +9972,7 @@ fi
if test $seteuid = no; then
echo $ac_n "checking for setreuid""... $ac_c" 1>&6
-echo "configure:9974: checking for setreuid" >&5
+echo "configure:9976: checking for setreuid" >&5
if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9979,7 +9981,7 @@ if test "$cross_compiling" = yes; then
samba_cv_USE_SETREUID=cross
else
cat > conftest.$ac_ext <<EOF
-#line 9983 "configure"
+#line 9985 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
@@ -9987,7 +9989,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
EOF
-if { (eval echo configure:9991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:9993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_USE_SETREUID=yes
else
@@ -10012,7 +10014,7 @@ fi
if test $seteuid = no; then
echo $ac_n "checking for seteuid""... $ac_c" 1>&6
-echo "configure:10016: checking for seteuid" >&5
+echo "configure:10018: checking for seteuid" >&5
if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10021,7 +10023,7 @@ if test "$cross_compiling" = yes; then
samba_cv_USE_SETEUID=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10025 "configure"
+#line 10027 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
@@ -10029,7 +10031,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
EOF
-if { (eval echo configure:10033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_USE_SETEUID=yes
else
@@ -10054,7 +10056,7 @@ fi
if test $seteuid = no; then
echo $ac_n "checking for setuidx""... $ac_c" 1>&6
-echo "configure:10058: checking for setuidx" >&5
+echo "configure:10060: checking for setuidx" >&5
if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10063,7 +10065,7 @@ if test "$cross_compiling" = yes; then
samba_cv_USE_SETUIDX=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10067 "configure"
+#line 10069 "configure"
#include "confdefs.h"
#define AUTOCONF_TEST 1
@@ -10071,7 +10073,7 @@ else
#include "confdefs.h"
#include "${srcdir-.}/lib/util_sec.c"
EOF
-if { (eval echo configure:10075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_USE_SETUIDX=yes
else
@@ -10096,7 +10098,7 @@ fi
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:10100: checking for working mmap" >&5
+echo "configure:10102: checking for working mmap" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10105,11 +10107,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_MMAP=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10109 "configure"
+#line 10111 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/shared_mmap.c"
EOF
-if { (eval echo configure:10113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_MMAP=yes
else
@@ -10132,7 +10134,7 @@ EOF
fi
echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
-echo "configure:10136: checking for ftruncate needs root" >&5
+echo "configure:10138: checking for ftruncate needs root" >&5
if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10141,11 +10143,11 @@ if test "$cross_compiling" = yes; then
samba_cv_FTRUNCATE_NEEDS_ROOT=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10145 "configure"
+#line 10147 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/ftruncroot.c"
EOF
-if { (eval echo configure:10149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_FTRUNCATE_NEEDS_ROOT=yes
else
@@ -10168,7 +10170,7 @@ EOF
fi
echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
-echo "configure:10172: checking for fcntl locking" >&5
+echo "configure:10174: checking for fcntl locking" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10177,11 +10179,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_FCNTL_LOCK=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10181 "configure"
+#line 10183 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/fcntl_lock.c"
EOF
-if { (eval echo configure:10185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_FCNTL_LOCK=yes
else
@@ -10204,7 +10206,7 @@ EOF
fi
echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
-echo "configure:10208: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
+echo "configure:10210: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10213,11 +10215,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10217 "configure"
+#line 10219 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/fcntl_lock64.c"
EOF
-if { (eval echo configure:10221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
else
@@ -10242,7 +10244,7 @@ else
echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
-echo "configure:10246: checking for 64 bit fcntl locking" >&5
+echo "configure:10248: checking for 64 bit fcntl locking" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10251,7 +10253,7 @@ else
samba_cv_HAVE_STRUCT_FLOCK64=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10255 "configure"
+#line 10257 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -10275,7 +10277,7 @@ exit(1);
#endif
}
EOF
-if { (eval echo configure:10279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_STRUCT_FLOCK64=yes
else
@@ -10300,7 +10302,7 @@ EOF
fi
echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
-echo "configure:10304: checking for a crypt that needs truncated salt" >&5
+echo "configure:10306: checking for a crypt that needs truncated salt" >&5
if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10309,11 +10311,11 @@ if test "$cross_compiling" = yes; then
samba_cv_HAVE_TRUNCATED_SALT=cross
else
cat > conftest.$ac_ext <<EOF
-#line 10313 "configure"
+#line 10315 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/crypttest.c"
EOF
-if { (eval echo configure:10317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:10319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
samba_cv_HAVE_TRUNCATED_SALT=no
else
@@ -10336,13 +10338,13 @@ EOF
fi
echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
-echo "configure:10340: checking for broken nisplus include files" >&5
+echo "configure:10342: checking for broken nisplus include files" >&5
if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10346 "configure"
+#line 10348 "configure"
#include "confdefs.h"
#include <sys/acl.h>
#if defined(HAVE_RPCSVC_NIS_H)
@@ -10352,7 +10354,7 @@ int main() {
return 0;
; return 0; }
EOF
-if { (eval echo configure:10356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
else
@@ -10376,7 +10378,7 @@ fi
#################################################
# check for smbwrapper support
echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
-echo "configure:10380: checking whether to use smbwrapper" >&5
+echo "configure:10382: checking whether to use smbwrapper" >&5
# Check whether --with-smbwrapper or --without-smbwrapper was given.
if test "${with_smbwrapper+set}" = set; then
withval="$with_smbwrapper"
@@ -10420,7 +10422,7 @@ fi
#################################################
# check for the AFS filesystem
echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
-echo "configure:10424: checking whether to use AFS" >&5
+echo "configure:10426: checking whether to use AFS" >&5
# Check whether --with-afs or --without-afs was given.
if test "${with_afs+set}" = set; then
withval="$with_afs"
@@ -10446,7 +10448,7 @@ fi
#################################################
# check for the DFS auth system
echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
-echo "configure:10450: checking whether to use DFS auth" >&5
+echo "configure:10452: checking whether to use DFS auth" >&5
# Check whether --with-dfs or --without-dfs was given.
if test "${with_dfs+set}" = set; then
withval="$with_dfs"
@@ -10471,7 +10473,7 @@ fi
#################################################
# check for Kerberos IV auth system
echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
-echo "configure:10475: checking whether to use Kerberos IV" >&5
+echo "configure:10477: checking whether to use Kerberos IV" >&5
# Check whether --with-krb4 or --without-krb4 was given.
if test "${with_krb4+set}" = set; then
withval="$with_krb4"
@@ -10481,7 +10483,7 @@ if test "${with_krb4+set}" = set; then
EOF
echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
-echo "configure:10485: checking for dn_expand in -lresolv" >&5
+echo "configure:10487: checking for dn_expand in -lresolv" >&5
ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -10489,7 +10491,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 10493 "configure"
+#line 10495 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -10500,7 +10502,7 @@ int main() {
dn_expand()
; return 0; }
EOF
-if { (eval echo configure:10504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -10539,7 +10541,7 @@ fi
#################################################
# check for Kerberos 5 auth system
echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
-echo "configure:10543: checking whether to use Kerberos 5" >&5
+echo "configure:10545: checking whether to use Kerberos 5" >&5
# Check whether --with-krb5 or --without-krb5 was given.
if test "${with_krb5+set}" = set; then
withval="$with_krb5"
@@ -10560,7 +10562,7 @@ fi
#################################################
# check for automount support
echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
-echo "configure:10564: checking whether to use AUTOMOUNT" >&5
+echo "configure:10566: checking whether to use AUTOMOUNT" >&5
# Check whether --with-automount or --without-automount was given.
if test "${with_automount+set}" = set; then
withval="$with_automount"
@@ -10585,7 +10587,7 @@ fi
#################################################
# check for smbmount support
echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
-echo "configure:10589: checking whether to use SMBMOUNT" >&5
+echo "configure:10591: checking whether to use SMBMOUNT" >&5
# Check whether --with-smbmount or --without-smbmount was given.
if test "${with_smbmount+set}" = set; then
withval="$with_smbmount"
@@ -10614,7 +10616,7 @@ fi
#################################################
# check for a PAM password database
echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
-echo "configure:10618: checking whether to use PAM password database" >&5
+echo "configure:10620: checking whether to use PAM password database" >&5
# Check whether --with-pam or --without-pam was given.
if test "${with_pam+set}" = set; then
withval="$with_pam"
@@ -10640,7 +10642,7 @@ fi
#################################################
# check for a TDB password database
echo $ac_n "checking whether to use TDB password database""... $ac_c" 1>&6
-echo "configure:10644: checking whether to use TDB password database" >&5
+echo "configure:10646: checking whether to use TDB password database" >&5
# Check whether --with-tdbsam or --without-tdbsam was given.
if test "${with_tdbsam+set}" = set; then
withval="$with_tdbsam"
@@ -10666,7 +10668,7 @@ fi
#################################################
# check for a LDAP password database
echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
-echo "configure:10670: checking whether to use LDAP password database" >&5
+echo "configure:10672: checking whether to use LDAP password database" >&5
# Check whether --with-ldap or --without-ldap was given.
if test "${with_ldap+set}" = set; then
withval="$with_ldap"
@@ -10692,7 +10694,7 @@ fi
#################################################
# check for a NISPLUS password database
echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
-echo "configure:10696: checking whether to use NISPLUS password database" >&5
+echo "configure:10698: checking whether to use NISPLUS password database" >&5
# Check whether --with-nisplus or --without-nisplus was given.
if test "${with_nisplus+set}" = set; then
withval="$with_nisplus"
@@ -10717,7 +10719,7 @@ fi
#################################################
# check for a NISPLUS_HOME support
echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
-echo "configure:10721: checking whether to use NISPLUS_HOME" >&5
+echo "configure:10723: checking whether to use NISPLUS_HOME" >&5
# Check whether --with-nisplus-home or --without-nisplus-home was given.
if test "${with_nisplus_home+set}" = set; then
withval="$with_nisplus_home"
@@ -10742,7 +10744,7 @@ fi
#################################################
# check for the secure socket layer
echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
-echo "configure:10746: checking whether to use SSL" >&5
+echo "configure:10748: checking whether to use SSL" >&5
# Check whether --with-ssl or --without-ssl was given.
if test "${with_ssl+set}" = set; then
withval="$with_ssl"
@@ -10801,7 +10803,7 @@ fi
#################################################
# check for syslog logging
echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
-echo "configure:10805: checking whether to use syslog logging" >&5
+echo "configure:10807: checking whether to use syslog logging" >&5
# Check whether --with-syslog or --without-syslog was given.
if test "${with_syslog+set}" = set; then
withval="$with_syslog"
@@ -10826,7 +10828,7 @@ fi
#################################################
# check for a shared memory profiling support
echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
-echo "configure:10830: checking whether to use profiling" >&5
+echo "configure:10832: checking whether to use profiling" >&5
# Check whether --with-profile or --without-profile was given.
if test "${with_profile+set}" = set; then
withval="$with_profile"
@@ -10852,7 +10854,7 @@ fi
#################################################
# check for experimental netatalk resource fork support
echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
-echo "configure:10856: checking whether to support netatalk" >&5
+echo "configure:10858: checking whether to support netatalk" >&5
# Check whether --with-netatalk or --without-netatalk was given.
if test "${with_netatalk+set}" = set; then
withval="$with_netatalk"
@@ -10879,7 +10881,7 @@ fi
QUOTAOBJS=smbd/noquotas.o
echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
-echo "configure:10883: checking whether to support disk-quotas" >&5
+echo "configure:10885: checking whether to support disk-quotas" >&5
# Check whether --with-quotas or --without-quotas was given.
if test "${with_quotas+set}" = set; then
withval="$with_quotas"
@@ -10903,7 +10905,7 @@ fi
# check for experimental utmp accounting
echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
-echo "configure:10907: checking whether to support utmp accounting" >&5
+echo "configure:10909: checking whether to support utmp accounting" >&5
# Check whether --with-utmp or --without-utmp was given.
if test "${with_utmp+set}" = set; then
withval="$with_utmp"
@@ -10929,7 +10931,7 @@ fi
# check for MS Dfs support
echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6
-echo "configure:10933: checking whether to support Microsoft Dfs" >&5
+echo "configure:10935: checking whether to support Microsoft Dfs" >&5
# Check whether --with-msdfs or --without-msdfs was given.
if test "${with_msdfs+set}" = set; then
withval="$with_msdfs"
@@ -11029,14 +11031,14 @@ fi
#################################################
# these tests are taken from the GNU fileutils package
echo "checking how to get filesystem space usage" 1>&6
-echo "configure:11033: checking how to get filesystem space usage" >&5
+echo "configure:11035: checking how to get filesystem space usage" >&5
space=no
# Test for statvfs64.
if test $space = no; then
# SVR4
echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
-echo "configure:11040: checking statvfs64 function (SVR4)" >&5
+echo "configure:11042: checking statvfs64 function (SVR4)" >&5
if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -11044,7 +11046,7 @@ else
fu_cv_sys_stat_statvfs64=cross
else
cat > conftest.$ac_ext <<EOF
-#line 11048 "configure"
+#line 11050 "configure"
#include "confdefs.h"
#if defined(HAVE_UNISTD_H)
@@ -11058,7 +11060,7 @@ else
exit (statvfs64 (".", &fsd));
}
EOF
-if { (eval echo configure:11062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
fu_cv_sys_stat_statvfs64=yes
else
@@ -11091,12 +11093,12 @@ fi
if test $space = no; then
# SVR4
echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
-echo "configure:11095: checking statvfs function (SVR4)" >&5
+echo "configure:11097: checking statvfs function (SVR4)" >&5
if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 11100 "configure"
+#line 11102 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/statvfs.h>
@@ -11104,7 +11106,7 @@ int main() {
struct statvfs fsd; statvfs (0, &fsd);
; return 0; }
EOF
-if { (eval echo configure:11108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
fu_cv_sys_stat_statvfs=yes
else
@@ -11129,7 +11131,7 @@ fi
if test $space = no; then
# DEC Alpha running OSF/1
echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
-echo "configure:11133: checking for 3-argument statfs function (DEC OSF/1)" >&5
+echo "configure:11135: checking for 3-argument statfs function (DEC OSF/1)" >&5
if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -11137,7 +11139,7 @@ else
fu_cv_sys_stat_statfs3_osf1=no
else
cat > conftest.$ac_ext <<EOF
-#line 11141 "configure"
+#line 11143 "configure"
#include "confdefs.h"
#include <sys/param.h>
@@ -11150,7 +11152,7 @@ else
exit (statfs (".", &fsd, sizeof (struct statfs)));
}
EOF
-if { (eval echo configure:11154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
fu_cv_sys_stat_statfs3_osf1=yes
else
@@ -11177,7 +11179,7 @@ fi
if test $space = no; then
# AIX
echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
-echo "configure:11181: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
+echo "configure:11183: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -11185,7 +11187,7 @@ else
fu_cv_sys_stat_statfs2_bsize=no
else
cat > conftest.$ac_ext <<EOF
-#line 11189 "configure"
+#line 11191 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_PARAM_H
@@ -11204,7 +11206,7 @@ else
exit (statfs (".", &fsd));
}
EOF
-if { (eval echo configure:11208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
fu_cv_sys_stat_statfs2_bsize=yes
else
@@ -11231,7 +11233,7 @@ fi
if test $space = no; then
# SVR3
echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
-echo "configure:11235: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
+echo "configure:11237: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -11239,7 +11241,7 @@ else
fu_cv_sys_stat_statfs4=no
else
cat > conftest.$ac_ext <<EOF
-#line 11243 "configure"
+#line 11245 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/statfs.h>
@@ -11249,7 +11251,7 @@ else
exit (statfs (".", &fsd, sizeof fsd, 0));
}
EOF
-if { (eval echo configure:11253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
fu_cv_sys_stat_statfs4=yes
else
@@ -11276,7 +11278,7 @@ fi
if test $space = no; then
# 4.4BSD and NetBSD
echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
-echo "configure:11280: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
+echo "configure:11282: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -11284,7 +11286,7 @@ else
fu_cv_sys_stat_statfs2_fsize=no
else
cat > conftest.$ac_ext <<EOF
-#line 11288 "configure"
+#line 11290 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
@@ -11300,7 +11302,7 @@ else
exit (statfs (".", &fsd));
}
EOF
-if { (eval echo configure:11304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
fu_cv_sys_stat_statfs2_fsize=yes
else
@@ -11327,7 +11329,7 @@ fi
if test $space = no; then
# Ultrix
echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
-echo "configure:11331: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
+echo "configure:11333: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -11335,7 +11337,7 @@ else
fu_cv_sys_stat_fs_data=no
else
cat > conftest.$ac_ext <<EOF
-#line 11339 "configure"
+#line 11341 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
@@ -11355,7 +11357,7 @@ else
exit (statfs (".", &fsd) != 1);
}
EOF
-if { (eval echo configure:11359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
fu_cv_sys_stat_fs_data=yes
else
@@ -11389,7 +11391,7 @@ fi
#
echo "checking if large file support can be enabled"
cat > conftest.$ac_ext <<EOF
-#line 11393 "configure"
+#line 11395 "configure"
#include "confdefs.h"
#if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
@@ -11402,7 +11404,7 @@ int main() {
int i
; return 0; }
EOF
-if { (eval echo configure:11406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
else
@@ -11422,16 +11424,59 @@ else
echo "no"
fi
+# Check whether --with-spinlocks or --without-spinlocks was given.
+if test "${with_spinlocks+set}" = set; then
+ withval="$with_spinlocks"
+ :
+fi
+
+if test "x$with_spinlocks" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define USE_SPINLOCKS 1
+EOF
+
+
+ case "$host_cpu" in
+ sparc)
+ cat >> confdefs.h <<\EOF
+#define SPARC_SPINLOCKS 1
+EOF
+
+ ;;
+
+ i386|i486|i586|i686)
+ cat >> confdefs.h <<\EOF
+#define INTEL_SPINLOCKS 1
+EOF
+
+ ;;
+
+ mips)
+ cat >> confdefs.h <<\EOF
+#define MIPS_SPINLOCKS 1
+EOF
+
+ ;;
+
+ powerpc)
+ cat >> confdefs.h <<\EOF
+#define POWERPC_SPINLOCKS 1
+EOF
+
+ ;;
+ esac
+fi
+
echo "checking configure summary"
if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 11431 "configure"
+#line 11476 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/summary.c"
EOF
-if { (eval echo configure:11435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:11480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "configure OK";
else
diff --git a/source3/configure.in b/source3/configure.in
index f7f8b95845..b5d4d881e0 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1902,6 +1902,29 @@ else
echo "no"
fi
+AC_ARG_WITH(spinlocks, [ --with-spinlocks use spin locks instead of fcntl locks ])
+if test "x$with_spinlocks" = "xyes"; then
+ AC_DEFINE(USE_SPINLOCKS)
+
+ case "$host_cpu" in
+ sparc)
+ AC_DEFINE(SPARC_SPINLOCKS)
+ ;;
+
+ i386|i486|i586|i686)
+ AC_DEFINE(INTEL_SPINLOCKS)
+ ;;
+
+ mips)
+ AC_DEFINE(MIPS_SPINLOCKS)
+ ;;
+
+ powerpc)
+ AC_DEFINE(POWERPC_SPINLOCKS)
+ ;;
+ esac
+fi
+
echo "checking configure summary"
AC_TRY_RUN([#include "${srcdir-.}/tests/summary.c"],
echo "configure OK";,
diff --git a/source3/include/config.h.in b/source3/include/config.h.in
index 83e7a25cac..a647db2911 100644
--- a/source3/include/config.h.in
+++ b/source3/include/config.h.in
@@ -195,6 +195,11 @@
#undef PUTUTLINE_RETURNS_UTMP
#undef COMPILER_SUPPORTS_LL
#undef HAVE_YP_GET_DEFAULT_DOMAIN
+#undef USE_SPINLOCKS
+#undef SPARC_SPINLOCKS
+#undef INTEL_SPINLOCKS
+#undef MIPS_SPINLOCKS
+#undef POWERPC_SPINLOCKS
/* The number of bytes in a int. */
#undef SIZEOF_INT
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 605932dd21..1102f99d05 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -606,6 +606,7 @@ extern int errno;
#include "ubi_dLinkList.h"
#include "dlinklist.h"
#include "../tdb/tdb.h"
+#include "../tdb/spinlock.h"
#include "talloc.h"
#include "interfaces.h"
#include "hash.h"
diff --git a/source3/include/proto.h b/source3/include/proto.h
index b51b57716b..b46047ea12 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4006,23 +4006,34 @@ int smbw_stat_printjob(struct smbw_server *srv,char *path,
int smbw_fstat(int fd, struct stat *st);
int smbw_stat(const char *fname, struct stat *st);
+/*The following definitions come from tdb/spinlock.c */
+
+int tdb_spinlock(TDB_CONTEXT *tdb, int list, int rw_type);
+int tdb_spinunlock(TDB_CONTEXT *tdb, int list, int rw_type);
+int tdb_create_rwlocks(int fd, unsigned int hash_size);
+int tdb_clear_spinlocks(TDB_CONTEXT *tdb);
+int tdb_clear_spinlocks(TDB_CONTEXT *tdb);
+
/*The following definitions come from tdb/tdb.c */
-char *tdb_error(TDB_CONTEXT *tdb);
-int tdb_update(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf);
+void tdb_printfreelist(TDB_CONTEXT *tdb);
+const char *tdb_errorstr(TDB_CONTEXT *tdb);
TDB_DATA tdb_fetch(TDB_CONTEXT *tdb, TDB_DATA key);
int tdb_exists(TDB_CONTEXT *tdb, TDB_DATA key);
-int tdb_traverse(TDB_CONTEXT *tdb, int (*fn)(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, void* state), void* state);
+int tdb_traverse(TDB_CONTEXT *tdb, tdb_traverse_func fn, void *state);
TDB_DATA tdb_firstkey(TDB_CONTEXT *tdb);
-TDB_DATA tdb_nextkey(TDB_CONTEXT *tdb, TDB_DATA key);
+TDB_DATA tdb_nextkey(TDB_CONTEXT *tdb, TDB_DATA oldkey);
int tdb_delete(TDB_CONTEXT *tdb, TDB_DATA key);
int tdb_store(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, int flag);
TDB_CONTEXT *tdb_open(char *name, int hash_size, int tdb_flags,
int open_flags, mode_t mode);
int tdb_close(TDB_CONTEXT *tdb);
-int tdb_lockchain(TDB_CONTEXT *tdb, TDB_DATA key);
-int tdb_unlockchain(TDB_CONTEXT *tdb, TDB_DATA key);
-void tdb_printfreelist(TDB_CONTEXT *tdb);
+int tdb_lockall(TDB_CONTEXT *tdb);
+void tdb_unlockall(TDB_CONTEXT *tdb);
+int tdb_lockkeys(TDB_CONTEXT *tdb, u32 number, TDB_DATA keys[]);
+void tdb_unlockkeys(TDB_CONTEXT *tdb);
+int tdb_chainlock(TDB_CONTEXT *tdb, TDB_DATA key);
+void tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key);
/*The following definitions come from tdb/tdbutil.c */
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index c30c389d49..e5aafcb646 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -174,7 +174,7 @@ BOOL message_send_pid(pid_t pid, int msg_type, void *buf, size_t len, BOOL dupli
kbuf = message_key_pid(pid);
/* lock the record for the destination */
- tdb_lockchain(tdb, kbuf);
+ tdb_chainlock(tdb, kbuf);
dbuf = tdb_fetch(tdb, kbuf);
@@ -208,7 +208,7 @@ BOOL message_send_pid(pid_t pid, int msg_type, void *buf, size_t len, BOOL dupli
if (!len || (len && !memcmp( ptr + sizeof(rec), (char *)buf, len))) {
DEBUG(10,("message_send_pid: discarding duplicate message.\n"));
free(dbuf.dptr);
- tdb_unlockchain(tdb, kbuf);
+ tdb_chainunlock(tdb, kbuf);
return True;
}
}
@@ -232,11 +232,11 @@ BOOL message_send_pid(pid_t pid, int msg_type, void *buf, size_t len, BOOL dupli
free(dbuf.dptr);
ok:
- tdb_unlockchain(tdb, kbuf);
+ tdb_chainunlock(tdb, kbuf);
return message_notify(pid);
failed:
- tdb_unlockchain(tdb, kbuf);
+ tdb_chainunlock(tdb, kbuf);
return False;
}
@@ -253,7 +253,7 @@ static BOOL message_recv(int *msg_type, pid_t *src, void **buf, size_t *len)
kbuf = message_key_pid(sys_getpid());
- tdb_lockchain(tdb, kbuf);
+ tdb_chainlock(tdb, kbuf);
dbuf = tdb_fetch(tdb, kbuf);
if (dbuf.dptr == NULL || dbuf.dsize == 0) goto failed;
@@ -288,11 +288,11 @@ static BOOL message_recv(int *msg_type, pid_t *src, void **buf, size_t *len)
tdb_store(tdb, kbuf, dbuf, TDB_REPLACE);
free(dbuf.dptr);
- tdb_unlockchain(tdb, kbuf);
+ tdb_chainunlock(tdb, kbuf);
return True;
failed:
- tdb_unlockchain(tdb, kbuf);
+ tdb_chainunlock(tdb, kbuf);
return False;
}
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 979910970f..5c3dae02c0 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -121,7 +121,7 @@ static int delete_fn(TDB_CONTEXT *ttdb, TDB_DATA kbuf, TDB_DATA dbuf, void *stat
struct lock_key *key;
int count, i;
- tdb_lockchain(tdb, kbuf);
+ tdb_chainlock(tdb, kbuf);
locks = (struct lock_struct *)dbuf.dptr;
key = (struct lock_key *)kbuf.dptr;
@@ -147,7 +147,7 @@ static int delete_fn(TDB_CONTEXT *ttdb, TDB_DATA kbuf, TDB_DATA dbuf, void *stat
tdb_store(tdb, kbuf, dbuf, TDB_REPLACE);
}
- tdb_unlockchain(tdb, kbuf);
+ tdb_chainunlock(tdb, kbuf);
return 0;
}
@@ -188,7 +188,7 @@ BOOL brl_lock(SMB_DEV_T dev, SMB_INO_T ino, int fnum,
dbuf.dptr = NULL;
- tdb_lockchain(tdb, kbuf);
+ tdb_chainlock(tdb, kbuf);
dbuf = tdb_fetch(tdb, kbuf);
lock.context.smbpid = smbpid;
@@ -218,12 +218,12 @@ BOOL brl_lock(SMB_DEV_T dev, SMB_INO_T ino, int fnum,
tdb_store(tdb, kbuf, dbuf, TDB_REPLACE);
free(dbuf.dptr);
- tdb_unlockchain(tdb, kbuf);
+ tdb_chainunlock(tdb, kbuf);
return True;
fail:
if (dbuf.dptr) free(dbuf.dptr);
- tdb_unlockchain(tdb, kbuf);
+ tdb_chainunlock(tdb, kbuf);
return False;
}
@@ -244,7 +244,7 @@ BOOL brl_unlock(SMB_DEV_T dev, SMB_INO_T ino, int fnum,
dbuf.dptr = NULL;
- tdb_lockchain(tdb, kbuf);
+ tdb_chainlock(tdb, kbuf);
dbuf = tdb_fetch(tdb, kbuf);
if (!dbuf.dptr) {
@@ -292,7 +292,7 @@ smbpid = %u, pid = %u, tid = %u\n",
}
free(dbuf.dptr);
- tdb_unlockchain(tdb, kbuf);
+ tdb_chainunlock(tdb, kbuf);
return True;
}
}
@@ -301,7 +301,7 @@ smbpid = %u, pid = %u, tid = %u\n",
fail:
if (dbuf.dptr) free(dbuf.dptr);
- tdb_unlockchain(tdb, kbuf);
+ tdb_chainunlock(tdb, kbuf);
return False;
}
@@ -322,7 +322,7 @@ BOOL brl_locktest(SMB_DEV_T dev, SMB_INO_T ino, int fnum,
dbuf.dptr = NULL;
- tdb_lockchain(tdb, kbuf);
+ tdb_chainlock(tdb, kbuf);
dbuf = tdb_fetch(tdb, kbuf);
lock.context.smbpid = smbpid;
@@ -346,12 +346,12 @@ BOOL brl_locktest(SMB_DEV_T dev, SMB_INO_T ino, int fnum,
/* no conflicts - we could have added it */
free(dbuf.dptr);
- tdb_unlockchain(tdb, kbuf);
+ tdb_chainunlock(tdb, kbuf);
return True;
fail:
if (dbuf.dptr) free(dbuf.dptr);
- tdb_unlockchain(tdb, kbuf);
+ tdb_chainunlock(tdb, kbuf);
return False;
}
@@ -369,7 +369,7 @@ void brl_close(SMB_DEV_T dev, SMB_INO_T ino, pid_t pid, int tid, int fnum)
dbuf.dptr = NULL;
- tdb_lockchain(tdb, kbuf);
+ tdb_chainlock(tdb, kbuf);
dbuf = tdb_fetch(tdb, kbuf);
if (!dbuf.dptr) goto fail;
@@ -404,7 +404,7 @@ void brl_close(SMB_DEV_T dev, SMB_INO_T ino, pid_t pid, int tid, int fnum)
/* we didn't find it */
fail:
if (dbuf.dptr) free(dbuf.dptr);
- tdb_unlockchain(tdb, kbuf);
+ tdb_chainunlock(tdb, kbuf);
}
/****************************************************************************
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 58e6b06e66..2056e6dcf5 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -274,7 +274,7 @@ static TDB_DATA locking_key_fsp(files_struct *fsp)
BOOL lock_share_entry(connection_struct *conn,
SMB_DEV_T dev, SMB_INO_T inode)
{
- return tdb_lockchain(tdb, locking_key(dev, inode)) == 0;
+ return tdb_chainlock(tdb, locking_key(dev, inode)) == 0;
}
/*******************************************************************
@@ -283,7 +283,7 @@ BOOL lock_share_entry(connection_struct *conn,
BOOL unlock_share_entry(connection_struct *conn,
SMB_DEV_T dev, SMB_INO_T inode)
{
- return tdb_unlockchain(tdb, locking_key(dev, inode)) == 0;
+ return tdb_chainunlock(tdb, locking_key(dev, inode)) == 0;
}
@@ -292,7 +292,7 @@ BOOL unlock_share_entry(connection_struct *conn,
******************************************************************/
BOOL lock_share_entry_fsp(files_struct *fsp)
{
- return tdb_lockchain(tdb, locking_key(fsp->dev, fsp->inode)) == 0;
+ return tdb_chainlock(tdb, locking_key(fsp->dev, fsp->inode)) == 0;
}
/*******************************************************************
@@ -300,7 +300,7 @@ BOOL lock_share_entry_fsp(files_struct *fsp)
******************************************************************/
BOOL unlock_share_entry_fsp(files_struct *fsp)
{
- return tdb_unlockchain(tdb, locking_key(fsp->dev, fsp->inode)) == 0;
+ return tdb_chainunlock(tdb, locking_key(fsp->dev, fsp->inode)) == 0;
}
/*******************************************************************
diff --git a/source3/tdb/Makefile b/source3/tdb/Makefile
index d9b0e05f4d..01de7d244b 100644
--- a/source3/tdb/Makefile
+++ b/source3/tdb/Makefile
@@ -8,14 +8,14 @@ PROGS = tdbtest tdbtool tdbtorture
default: $(PROGS)
-tdbtest: tdbtest.o tdb.o
- $(CC) $(CFLAGS) -o tdbtest tdbtest.o tdb.o -lgdbm
+tdbtest: tdbtest.o tdb.o spinlock.o
+ $(CC) $(CFLAGS) -o tdbtest tdbtest.o tdb.o spinlock.o -lgdbm
-tdbtool: tdbtool.o tdb.o
- $(CC) $(CFLAGS) -o tdbtool tdbtool.o tdb.o
+tdbtool: tdbtool.o tdb.o spinlock.o
+ $(CC) $(CFLAGS) -o tdbtool tdbtool.o tdb.o spinlock.o
tdbtorture: tdbtorture.o tdb.o
- $(CC) $(CFLAGS) -o tdbtorture tdbtorture.o tdb.o
+ $(CC) $(CFLAGS) -o tdbtorture tdbtorture.o tdb.o spinlock.o
clean:
rm -f $(PROGS) *.o *~ *% core test.db test.tdb test.gdbm
diff --git a/source3/tdb/spinlock.c b/source3/tdb/spinlock.c
new file mode 100644
index 0000000000..731188a153
--- /dev/null
+++ b/source3/tdb/spinlock.c
@@ -0,0 +1,403 @@
+#if STANDALONE
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <time.h>
+#include "tdb.h"
+#include "spinlock.h"
+
+#define DEBUG
+#else
+#include "includes.h"
+#endif
+
+#ifdef USE_SPINLOCKS
+
+/*
+ * ARCH SPECIFIC
+ */
+
+#if defined(SPARC_SPINLOCKS)
+
+static inline int __spin_trylock(spinlock_t *lock)
+{
+ unsigned int result;
+
+ asm volatile("ldstub [%1], %0"
+ : "=r" (result)
+ : "r" (lock)
+ : "memory");
+
+ return (result == 0) ? 0 : EBUSY;
+}
+
+static inline void __spin_unlock(spinlock_t *lock)
+{
+ *lock = 0;
+}
+
+static inline void __spin_lock_init(spinlock_t *lock)
+{
+ *lock = 0;
+}
+
+static inline int __spin_is_locked(spinlock_t *lock)
+{
+ return (*lock != 0);
+}
+
+#elif defined(POWERPC_SPINLOCKS)
+
+static inline int __spin_trylock(spinlock_t *lock)
+{
+ int result;
+
+ __asm__ __volatile__ (
+ " eieio;"
+ "0: lwarx %0,0,%1;"
+ " cmpwi 0,%0,0;"
+ " bne- 1f;"
+ " stwcx. %2,0,%1;"
+ " bne- 0b;"
+ " sync;"
+ "1:"
+ : "=&r"(result)
+ : "r"(lock), "r"(1)
+ : "cr0", "memory");
+
+ return (result == 0) ? 0 : EBUSY;
+}
+
+static inline void __spin_unlock(spinlock_t *lock)
+{
+ asm volatile("sync");
+ *lock = 0;
+}
+
+static inline void __spin_lock_init(spinlock_t *lock)
+{
+ *lock = 0;
+}
+
+static inline int __spin_is_locked(spinlock_t *lock)
+{
+ return (*lock != 0);
+}
+
+#elif defined(INTEL_SPINLOCKS)
+
+static inline int __spin_trylock(spinlock_t *lock)
+{
+ int oldval;
+
+ asm volatile("xchgl %0,%1"
+ : "=r" (oldval), "=m" (*lock)
+ : "0" (0));
+ return oldval > 0 ? 0 : EBUSY;
+}
+
+static inline void __spin_unlock(spinlock_t *lock)
+{
+ *lock = 1;
+}
+
+static inline void __spin_lock_init(spinlock_t *lock)
+{
+ *lock = 1;
+}
+
+static inline int __spin_is_locked(spinlock_t *lock)
+{
+ return (*lock != 1);
+}
+
+#elif defined(MIPS_SPINLOCKS)
+
+static inline unsigned int load_linked(unsigned long addr)
+{
+ unsigned int res;
+
+ __asm__ __volatile__("ll\t%0,(%1)"
+ : "=r" (res)
+ : "r" (addr));
+
+ return res;
+}
+
+static inline unsigned int store_conditional(unsigned long addr, unsigned int value)
+{
+ unsigned int res;
+
+ __asm__ __volatile__("sc\t%0,(%2)"
+ : "=r" (res)
+ : "0" (value), "r" (addr));
+ return res;
+}
+
+static inline int __spin_trylock(spinlock_t *lock)
+{
+ unsigned int mw;
+
+ do {
+ mw = load_linked(lock);
+ if (mw)
+ return EBUSY;
+ } while (!store_conditional(lock, 1));
+
+ return 0;
+}
+
+static inline void __spin_unlock(spinlock_t *lock)
+{
+ *lock = 0;
+}
+
+static inline void __spin_lock_init(spinlock_t *lock)
+{
+ *lock = 0;
+}
+
+static inline int __spin_is_locked(spinlock_t *lock)
+{
+ return (*lock != 0);
+}
+
+#else
+#error Need to implement spinlock code in spinlock.c
+#endif
+
+/*
+ * OS SPECIFIC
+ */
+
+static void yield_cpu(void)
+{
+ struct timespec tm;
+
+#ifdef USE_SCHED_YIELD
+ sched_yield();
+#else
+ /* Linux will busy loop for delays < 2ms on real time tasks */
+ tm.tv_sec = 0;
+ tm.tv_nsec = 2000000L + 1;
+ nanosleep(&tm, NULL);
+#endif
+}
+
+static int this_is_smp(void)
+{
+ return 0;
+}
+
+/*
+ * GENERIC
+ */
+
+static int smp_machine = 0;
+
+static inline void __spin_lock(spinlock_t *lock)
+{
+ int ntries = 0;
+
+ while(__spin_trylock(lock)) {
+ while(__spin_is_locked(lock)) {
+ if (smp_machine && ntries++ < MAX_BUSY_LOOPS)
+ continue;
+ yield_cpu();
+ }
+ }
+}
+
+static void __read_lock(rwlock_t *rwlock)
+{
+ int ntries = 0;
+
+ while(1) {
+ __spin_lock(&rwlock->lock);
+
+ if (!(rwlock->count & RWLOCK_BIAS)) {
+ rwlock->count++;
+ __spin_unlock(&rwlock->lock);
+ return;
+ }
+
+ __spin_unlock(&rwlock->lock);
+
+ while(rwlock->count & RWLOCK_BIAS) {
+ if (smp_machine && ntries++ < MAX_BUSY_LOOPS)
+ continue;
+ yield_cpu();
+ }
+ }
+}
+
+static void __write_lock(rwlock_t *rwlock)
+{
+ int ntries = 0;
+
+ while(1) {
+ __spin_lock(&rwlock->lock);
+
+ if (rwlock->count == 0) {
+ rwlock->count |= RWLOCK_BIAS;
+ __spin_unlock(&rwlock->lock);
+ return;
+ }
+
+ __spin_unlock(&rwlock->lock);
+
+ while(rwlock->count != 0) {
+ if (smp_machine && ntries++ < MAX_BUSY_LOOPS)
+ continue;
+ yield_cpu();
+ }
+ }
+}
+
+static void __write_unlock(rwlock_t *rwlock)
+{
+ __spin_lock(&rwlock->lock);
+
+#ifdef DEBUG
+ if (!(rwlock->count & RWLOCK_BIAS))
+ fprintf(stderr, "bug: write_unlock\n");
+#endif
+
+ rwlock->count &= ~RWLOCK_BIAS;
+ __spin_unlock(&rwlock->lock);
+}
+
+static void __read_unlock(rwlock_t *rwlock)
+{
+ __spin_lock(&rwlock->lock);
+
+#ifdef DEBUG
+ if (!rwlock->count)
+ fprintf(stderr, "bug: read_unlock\n");
+
+ if (rwlock->count & RWLOCK_BIAS)
+ fprintf(stderr, "bug: read_unlock\n");
+#endif
+
+ rwlock->count--;
+ __spin_unlock(&rwlock->lock);
+}
+
+/* TDB SPECIFIC */
+
+/* lock a list in the database. list -1 is the alloc list */
+int tdb_spinlock(TDB_CONTEXT *tdb, int list, int rw_type)
+{
+ rwlock_t *rwlocks;
+
+ if (!tdb->map_ptr) return -1;
+ rwlocks = (rwlock_t *)((char *)tdb->map_ptr + tdb->header.rwlocks);
+
+ switch(rw_type) {
+ case F_RDLCK:
+ __read_lock(&rwlocks[list+1]);
+ break;
+
+ case F_WRLCK:
+ __write_lock(&rwlocks[list+1]);
+ break;
+
+ default:
+ return TDB_ERRCODE(TDB_ERR_LOCK, -1);
+ }
+ return 0;
+}
+
+/* unlock the database. */
+int tdb_spinunlock(TDB_CONTEXT *tdb, int list, int rw_type)
+{
+ rwlock_t *rwlocks;
+
+ if (!tdb->map_ptr) return -1;
+ rwlocks = (rwlock_t *)((char *)tdb->map_ptr + tdb->header.rwlocks);
+
+ switch(rw_type) {
+ case F_RDLCK:
+ __read_unlock(&rwlocks[list+1]);
+ break;
+
+ case F_WRLCK:
+ __write_unlock(&rwlocks[list+1]);
+ break;
+
+ default:
+ return TDB_ERRCODE(TDB_ERR_LOCK, -1);
+ }
+
+ return 0;
+}
+
+int tdb_create_rwlocks(int fd, unsigned int hash_size)
+{
+ unsigned size, i;
+ rwlock_t *rwlocks;
+
+ size = (hash_size + 1) * sizeof(rwlock_t);
+ rwlocks = malloc(size);
+ if (!rwlocks)
+ return -1;
+
+ for(i = 0; i < hash_size+1; i++) {
+ __spin_lock_init(&rwlocks[i].lock);
+ rwlocks[i].count = 0;
+ }
+
+ /* Write it out (appending to end) */
+ if (write(fd, rwlocks, size) != size) {
+ free(rwlocks);
+ return -1;
+ }
+ smp_machine = this_is_smp();
+ free(rwlocks);
+ return 0;
+}
+
+int tdb_clear_spinlocks(TDB_CONTEXT *tdb)
+{
+ rwlock_t *rwlocks;
+ unsigned i;
+
+ if (tdb->header.rwlocks == 0) return 0;
+ if (!tdb->map_ptr) return -1;
+
+ /* We're mmapped here */
+ rwlocks = (rwlock_t *)((char *)tdb->map_ptr + tdb->header.rwlocks);
+ for(i = 0; i < tdb->header.hash_size+1; i++) {
+ __spin_lock_init(&rwlocks[i].lock);
+ rwlocks[i].count = 0;
+ }
+ return 0;
+}
+#else
+int tdb_create_rwlocks(int fd, unsigned int hash_size) { return 0; }
+int tdb_spinlock(TDB_CONTEXT *tdb, int list, int rw_type) { return -1; }
+int tdb_spinunlock(TDB_CONTEXT *tdb, int list, int rw_type) { return -1; }
+
+/* Non-spinlock version: remove spinlock pointer */
+int tdb_clear_spinlocks(TDB_CONTEXT *tdb)
+{
+ tdb_off off = (tdb_off)((char *)&tdb->header.rwlocks
+ - (char *)&tdb->header);
+
+ tdb->header.rwlocks = 0;
+ if (lseek(tdb->fd, off, SEEK_SET) != off
+ || write(tdb->fd, (void *)&tdb->header.rwlocks,
+ sizeof(tdb->header.rwlocks))
+ != sizeof(tdb->header.rwlocks))
+ return -1;
+ return 0;
+}
+#endif
diff --git a/source3/tdb/spinlock.h b/source3/tdb/spinlock.h
new file mode 100644
index 0000000000..a0dd9cbca5
--- /dev/null
+++ b/source3/tdb/spinlock.h
@@ -0,0 +1,55 @@
+#ifndef __SPINLOCK_H__
+#define __SPINLOCK_H__
+
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "tdb.h"
+
+#ifdef USE_SPINLOCKS
+
+#define RWLOCK_BIAS 0x1000UL
+
+/* OS SPECIFIC */
+#define MAX_BUSY_LOOPS 1000
+#undef USE_SCHED_YIELD
+
+/* ARCH SPECIFIC */
+/* We should make sure these are padded to a cache line */
+#if defined(SPARC_SPINLOCKS)
+typedef volatile char spinlock_t;
+#elif defined(POWERPC_SPINLOCKS)
+typedef volatile unsigned long spinlock_t;
+#elif defined(INTEL_SPINLOCKS)
+typedef volatile int spinlock_t;
+#elif defined(MIPS_SPINLOCKS)
+typedef volatile unsigned long spinlock_t;
+#else
+#error Need to implement spinlock code in spinlock.h
+#endif
+
+typedef struct {
+ spinlock_t lock;
+ volatile int count;
+} rwlock_t;
+
+int tdb_spinlock(TDB_CONTEXT *tdb, int list, int rw_type);
+int tdb_spinunlock(TDB_CONTEXT *tdb, int list, int rw_type);
+int tdb_create_rwlocks(int fd, unsigned int hash_size);
+int tdb_clear_spinlocks(TDB_CONTEXT *tdb);
+
+#else /* !USE_SPINLOCKS */
+#if 0
+#define tdb_create_rwlocks(fd, hash_size) 0
+#define tdb_spinlock(tdb, list, rw_type) (-1)
+#define tdb_spinunlock(tdb, list, rw_type) (-1)
+#else
+int tdb_spinlock(TDB_CONTEXT *tdb, int list, int rw_type);
+int tdb_spinunlock(TDB_CONTEXT *tdb, int list, int rw_type);
+int tdb_create_rwlocks(int fd, unsigned int hash_size);
+#endif
+int tdb_clear_spinlocks(TDB_CONTEXT *tdb);
+#endif
+
+#endif
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c
index d142649adf..1e66fe1419 100644
--- a/source3/tdb/tdb.c
+++ b/source3/tdb/tdb.c
@@ -4,7 +4,8 @@
Samba database functions
Copyright (C) Andrew Tridgell 1999-2000
Copyright (C) Luke Kenneth Casson Leighton 2000
- Copyright (C) Jeremy Allison 2000
+ Copyright (C) Paul `Rusty' Russell 2000
+ Copyright (C) Jeremy Allison 2000
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,6 +23,10 @@
*/
#if STANDALONE
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
@@ -32,55 +37,88 @@
#include <sys/mman.h>
#include <sys/stat.h>
#include "tdb.h"
+#include "spinlock.h"
#else
#include "includes.h"
#endif
-#define TDB_VERSION (0x26011967 + 3)
+#define TDB_MAGIC_FOOD "TDB file\n"
+#define TDB_VERSION (0x26011967 + 6)
#define TDB_MAGIC (0x26011999U)
#define TDB_FREE_MAGIC (~TDB_MAGIC)
-#define TDB_ALIGN 4
-#define MIN_REC_SIZE (2*sizeof(struct list_struct) + 200)
+#define TDB_DEAD_MAGIC (0xFEE1DEAD)
+#define TDB_ALIGNMENT 4
+#define MIN_REC_SIZE (2*sizeof(struct list_struct) + TDB_ALIGNMENT)
#define DEFAULT_HASH_SIZE 131
#define TDB_PAGE_SIZE 0x2000
-#define TDB_LEN_MULTIPLIER 10
#define FREELIST_TOP (sizeof(struct tdb_header))
+#define TDB_ALIGN(x,a) (((x) + (a)) & ~((a)-1))
+#define TDB_BYTEREV(x) (((x<<24)|(x&0xFF00)<<8)|((x>>8)&0xFF00)|(x>>24))
+#define TDB_DEAD(r) ((r)->magic == TDB_DEAD_MAGIC)
+#define TDB_BAD_MAGIC(r) ((r)->magic != TDB_MAGIC && !TDB_DEAD(r))
+#define TDB_HASH_TOP(hash) (FREELIST_TOP + (BUCKET(hash)+1)*sizeof(tdb_off))
/* lock offsets */
#define GLOBAL_LOCK 0
#define ACTIVE_LOCK 4
-#define LIST_LOCK_BASE 1024
-
-#define BUCKET(hash) ((hash) % tdb->header.hash_size)
#ifndef MAP_FILE
#define MAP_FILE 0
#endif
+#define BUCKET(hash) ((hash) % tdb->header.hash_size)
+TDB_DATA tdb_null;
+
+/* all contexts, to ensure no double-opens (fcntl locks don't nest!) */
+static TDB_CONTEXT *tdbs = NULL;
+
+static void *tdb_munmap(void *ptr, tdb_len size)
+{
+#ifdef HAVE_MMAP
+ munmap(ptr, size);
+#endif
+ return NULL;
+}
+
+static void *tdb_mmap(tdb_len size, int readonly, int fd)
+{
+ void *ret = NULL;
+#ifdef HAVE_MMAP
+ ret = mmap(NULL, size, PROT_READ | (readonly ? 0 : PROT_WRITE), MAP_SHARED|MAP_FILE, fd, 0);
+#endif
+ return ret;
+}
+
+/* Endian conversion: we only ever deal with 4 byte quantities */
+static void *convert(void *buf, u32 size)
+{
+ u32 i, *p = buf;
+ for (i = 0; i < size / 4; i++) p[i] = TDB_BYTEREV(p[i]);
+ return buf;
+}
+#define DOCONV() (tdb->flags & TDB_CONVERT)
+#define CONVERT(x) (DOCONV() ? convert(&x, sizeof(x)) : &x)
+
/* the body of the database is made of one list_struct for the free space
plus a separate data list for each hash value */
struct list_struct {
- tdb_len rec_len; /* total byte length of record */
tdb_off next; /* offset of the next record in the list */
+ tdb_len rec_len; /* total byte length of record */
tdb_len key_len; /* byte length of key */
tdb_len data_len; /* byte length of data */
- unsigned full_hash; /* the full 32 bit hash of the key */
- unsigned magic; /* try to catch errors */
- /*
- the following union is implied
+ u32 full_hash; /* the full 32 bit hash of the key */
+ u32 magic; /* try to catch errors */
+ /* the following union is implied:
union {
char record[rec_len];
struct {
char key[key_len];
char data[data_len];
}
- }
- */
+ u32 totalsize; (tailer)
+ } */
};
-/* a null data record - useful for error returns */
-static TDB_DATA null_data;
-
/* a byte range locking function - return 0 on success
this functions locks/unlocks 1 byte at the specified offset */
static int tdb_brlock(TDB_CONTEXT *tdb, tdb_off offset,
@@ -89,7 +127,6 @@ static int tdb_brlock(TDB_CONTEXT *tdb, tdb_off offset,
struct flock fl;
if (tdb->flags & TDB_NOLOCK) return 0;
-
if (tdb->read_only) return -1;
fl.l_type = rw_type;
@@ -98,102 +135,59 @@ static int tdb_brlock(TDB_CONTEXT *tdb, tdb_off offset,
fl.l_len = 1;
fl.l_pid = 0;
- if (fcntl(tdb->fd, lck_type, &fl) != 0) {
-#if TDB_DEBUG
- if (lck_type == F_SETLKW) {
- printf("lock failed at %d (%s)\n",
- offset, strerror(errno));
- }
-#endif
- tdb->ecode = TDB_ERR_LOCK;
- return -1;
- }
+ if (fcntl(tdb->fd,lck_type,&fl)) return TDB_ERRCODE(TDB_ERR_LOCK, -1);
return 0;
}
/* lock a list in the database. list -1 is the alloc list */
-static int tdb_lock(TDB_CONTEXT *tdb, int list, int locktype)
+static int tdb_lock(TDB_CONTEXT *tdb, int list, int ltype)
{
- if (list < -1 || list >= (int)tdb->header.hash_size) {
-#if TDB_DEBUG
- printf("bad list %d\n", list);
-#endif
- return -1;
- }
-
+ if (list < -1 || list >= (int)tdb->header.hash_size) return -1;
if (tdb->flags & TDB_NOLOCK) return 0;
- if (tdb->locked[list+1].count == 0 ||
- (tdb->locked[list+1].ltype == F_RDLCK &&
- locktype == F_WRLCK)) {
- if (tdb_brlock(tdb, LIST_LOCK_BASE + 4*list,
- locktype, F_SETLKW) != 0) {
+ /* Since fcntl locks don't nest, we do a lock for the first one,
+ and simply bump the count for future ones */
+ if (tdb->locked[list+1].count == 0) {
+ if (tdb->header.rwlocks) {
+ if (tdb_spinlock(tdb, list, ltype)) return -1;
+ } else if (tdb_brlock(tdb,FREELIST_TOP+4*list,ltype,F_SETLKW))
return -1;
- }
- tdb->locked[list+1].ltype = locktype;
+ tdb->locked[list+1].ltype = ltype;
}
-
tdb->locked[list+1].count++;
return 0;
}
-/* unlock the database. */
-static int tdb_unlock(TDB_CONTEXT *tdb, int list)
+/* unlock the database: returns void because it's too late for errors. */
+static void tdb_unlock(TDB_CONTEXT *tdb, int list, int ltype)
{
- if (list < -1 || list >= (int)tdb->header.hash_size) {
-#if TDB_DEBUG
- printf("bad unlock list %d\n", list);
-#endif
- return -1;
- }
+ if (tdb->flags & TDB_NOLOCK) return;
- if (tdb->flags & TDB_NOLOCK) return 0;
+ /* Sanity checks */
+ if (list < -1 || list >= (int)tdb->header.hash_size) return;
+ if (tdb->locked[list+1].count==0) return;
- if (tdb->locked[list+1].count == 0) {
-#if TDB_DEBUG
- printf("not locked %d\n", list);
-#endif
- tdb->ecode = TDB_ERR_LOCK;
- return -1;
- }
if (tdb->locked[list+1].count == 1) {
- if (tdb_brlock(tdb, LIST_LOCK_BASE + 4*list,
- F_UNLCK, F_SETLKW) != 0) {
- return -1;
- }
+ /* Down to last nested lock: unlock underneath */
+ if (tdb->header.rwlocks) tdb_spinunlock(tdb, list, ltype);
+ else tdb_brlock(tdb, FREELIST_TOP+4*list, F_UNLCK, F_SETLKW);
}
tdb->locked[list+1].count--;
- return 0;
}
-/* the hash algorithm - turn a key into an integer
- This is based on the hash agorithm from gdbm */
-static unsigned tdb_hash(TDB_DATA *key)
+/* This is based on the hash agorithm from gdbm */
+static u32 tdb_hash(TDB_DATA *key)
{
- unsigned value; /* Used to compute the hash value. */
- unsigned i; /* Used to cycle through random values. */
+ u32 value; /* Used to compute the hash value. */
+ u32 i; /* Used to cycle through random values. */
/* Set the initial value from the key size. */
- value = 0x238F13AF * key->dsize;
- for (i=0; i < key->dsize; i++) {
+ for (value = 0x238F13AF * key->dsize, i=0; i < key->dsize; i++)
value = (value + (key->dptr[i] << (i*5 % 24)));
- }
-
- value = (1103515243 * value + 12345);
-
- return value;
-}
-/* find the top of the hash chain for an open database */
-static tdb_off tdb_hash_top(TDB_CONTEXT *tdb, unsigned hash)
-{
- tdb_off ret;
- hash = BUCKET(hash);
- ret = FREELIST_TOP + (hash+1)*sizeof(tdb_off);
- return ret;
+ return (1103515243 * value + 12345);
}
-
/* check for an out of bounds access - if it is out of bounds then
see if the database has been expanded by someone else and expand
if necessary */
@@ -201,372 +195,274 @@ static int tdb_oob(TDB_CONTEXT *tdb, tdb_off offset)
{
struct stat st;
if (offset <= tdb->map_size) return 0;
-
if (tdb->flags & TDB_INTERNAL) return 0;
fstat(tdb->fd, &st);
- if (st.st_size <= (size_t)offset) {
- tdb->ecode = TDB_ERR_IO;
- return -1;
- }
-
-#if HAVE_MMAP
- if (tdb->map_ptr) {
- munmap(tdb->map_ptr, tdb->map_size);
- tdb->map_ptr = NULL;
- }
-#endif
+ if (st.st_size <= (size_t)offset) return TDB_ERRCODE(TDB_ERR_IO, -1);
+ /* Unmap, update size, remap */
+ if (tdb->map_ptr) tdb->map_ptr=tdb_munmap(tdb->map_ptr, tdb->map_size);
tdb->map_size = st.st_size;
-#if HAVE_MMAP
- if (!(tdb->flags & TDB_NOMMAP)) {
- tdb->map_ptr = (void *)mmap(NULL, tdb->map_size,
- tdb->read_only?PROT_READ:PROT_READ|PROT_WRITE,
- MAP_SHARED | MAP_FILE, tdb->fd, 0);
- }
-#endif
+ if (!(tdb->flags & TDB_NOMMAP))
+ tdb->map_ptr = tdb_mmap(tdb->map_size, tdb->read_only,tdb->fd);
return 0;
}
-
/* write a lump of data at a specified offset */
-static int tdb_write(TDB_CONTEXT *tdb, tdb_off offset, const char *buf, tdb_len len)
+static int tdb_write(TDB_CONTEXT *tdb, tdb_off off, void *buf, tdb_len len)
{
- if (tdb_oob(tdb, offset + len) != 0) {
- /* oops - trying to write beyond the end of the database! */
- return -1;
- }
+ if (tdb_oob(tdb, off + len) != 0) return -1;
- if (tdb->map_ptr) {
- memcpy(offset + (char *)tdb->map_ptr, buf, len);
- } else {
- if (lseek(tdb->fd, offset, SEEK_SET) != offset ||
- write(tdb->fd, buf, len) != (ssize_t)len) {
- tdb->ecode = TDB_ERR_IO;
- return -1;
- }
- }
+ if (tdb->map_ptr) memcpy(off + (char *)tdb->map_ptr, buf, len);
+ else if (lseek(tdb->fd, off, SEEK_SET) != off
+ || write(tdb->fd, buf, len) != (ssize_t)len)
+ return TDB_ERRCODE(TDB_ERR_IO, -1);
return 0;
}
-/* read a lump of data at a specified offset */
-static int tdb_read(TDB_CONTEXT *tdb, tdb_off offset, char *buf, tdb_len len)
+/* read a lump of data at a specified offset, maybe convert */
+static int tdb_read(TDB_CONTEXT *tdb,tdb_off off,void *buf,tdb_len len,int cv)
{
- if (tdb_oob(tdb, offset + len) != 0) {
- /* oops - trying to read beyond the end of the database! */
- return -1;
- }
+ if (tdb_oob(tdb, off + len) != 0) return -1;
- if (tdb->map_ptr) {
- memcpy(buf, offset + (char *)tdb->map_ptr, len);
- } else {
- if (lseek(tdb->fd, offset, SEEK_SET) != offset ||
- read(tdb->fd, buf, len) != (ssize_t)len) {
- tdb->ecode = TDB_ERR_IO;
- return -1;
- }
- }
+ if (tdb->map_ptr) memcpy(buf, off + (char *)tdb->map_ptr, len);
+ else if (lseek(tdb->fd, off, SEEK_SET) != off
+ || read(tdb->fd, buf, len) != (ssize_t)len)
+ return TDB_ERRCODE(TDB_ERR_IO, -1);
+ if (cv) convert(buf, len);
return 0;
}
-
/* read a lump of data, allocating the space for it */
static char *tdb_alloc_read(TDB_CONTEXT *tdb, tdb_off offset, tdb_len len)
{
char *buf;
- buf = (char *)malloc(len);
-
- if (!buf) {
- tdb->ecode = TDB_ERR_OOM;
- return NULL;
- }
-
- if (tdb_read(tdb, offset, buf, len) == -1) {
+ if (!(buf = malloc(len))) return TDB_ERRCODE(TDB_ERR_OOM, buf);
+ if (tdb_read(tdb, offset, buf, len, 0) == -1) {
free(buf);
return NULL;
}
-
return buf;
}
-/* convenience routine for writing a record */
-static int rec_write(TDB_CONTEXT *tdb, tdb_off offset, struct list_struct *rec)
+/* read/write a tdb_off */
+static int ofs_read(TDB_CONTEXT *tdb, tdb_off offset, tdb_off *d)
{
- return tdb_write(tdb, offset, (char *)rec, sizeof(*rec));
+ return tdb_read(tdb, offset, (char*)d, sizeof(*d), DOCONV());
}
-
-/* convenience routine for writing a tdb_off */
static int ofs_write(TDB_CONTEXT *tdb, tdb_off offset, tdb_off *d)
{
- return tdb_write(tdb, offset, (char *)d, sizeof(*d));
+ tdb_off off = *d;
+ return tdb_write(tdb, offset, CONVERT(off), sizeof(*d));
}
-/* read a tdb_off from the store */
-static int ofs_read(TDB_CONTEXT *tdb, tdb_off offset, tdb_off *d)
+/* read/write a record */
+static int rec_read(TDB_CONTEXT *tdb, tdb_off offset, struct list_struct *rec)
{
- return tdb_read(tdb, offset, (char *)d, sizeof(*d));
+ if (tdb_read(tdb, offset, rec, sizeof(*rec),DOCONV()) == -1) return -1;
+ if (TDB_BAD_MAGIC(rec)) return TDB_ERRCODE(TDB_ERR_CORRUPT, -1);
+ return tdb_oob(tdb, rec->next);
}
-
-/* read a record and check for simple errors */
-static int rec_read(TDB_CONTEXT *tdb, tdb_off offset, struct list_struct *rec)
+static int rec_write(TDB_CONTEXT *tdb, tdb_off offset, struct list_struct *rec)
{
- if (tdb_read(tdb, offset, (char *)rec, sizeof(*rec)) == -1) return -1;
- if (rec->magic != TDB_MAGIC) {
-#if TDB_DEBUG
- printf("bad magic 0x%08x at offset %d\n",
- rec->magic, offset);
-#endif
- tdb->ecode = TDB_ERR_CORRUPT;
- return -1;
- }
- if (tdb_oob(tdb, rec->next) != 0) {
- return -1;
- }
- return 0;
+ struct list_struct r = *rec;
+ return tdb_write(tdb, offset, CONVERT(r), sizeof(r));
}
/* read a freelist record and check for simple errors */
-static int rec_free_read(TDB_CONTEXT *tdb, tdb_off offset, struct list_struct *rec)
+static int rec_free_read(TDB_CONTEXT *tdb, tdb_off off, struct list_struct*rec)
{
- if (tdb_read(tdb, offset, (char *)rec, sizeof(*rec)) == -1) return -1;
+ if (tdb_read(tdb, off, rec, sizeof(*rec),DOCONV()) == -1) return -1;
if (rec->magic != TDB_FREE_MAGIC) {
-#if TDB_DEBUG
+#ifdef TDB_DEBUG
printf("bad magic 0x%08x at offset %d\n",
- rec->magic, offset);
+ rec->magic, off);
#endif
- tdb->ecode = TDB_ERR_CORRUPT;
- return -1;
- }
- if (tdb_oob(tdb, rec->next) != 0) {
- return -1;
+ return TDB_ERRCODE(TDB_ERR_CORRUPT, -1);
}
+ if (tdb_oob(tdb, rec->next) != 0) return -1;
return 0;
}
-/* Add an element into the (sorted) freelist. Merge adjacent records
- if neccessary. */
-
-static int tdb_free(TDB_CONTEXT *tdb, tdb_off rec_offset, struct list_struct *rec)
+/* update a record tailer (must hold allocation lock) */
+static int update_tailer(TDB_CONTEXT *tdb, tdb_off offset,
+ const struct list_struct *rec)
{
- tdb_off curr_offset = 0;
- struct list_struct curr_rec;
+ tdb_off totalsize;
- /* Set rec as free. */
- rec->magic = TDB_FREE_MAGIC;
- rec->next = 0;
-
- tdb_lock(tdb, -1, F_WRLCK);
-
- /* Find the correct place for this offset in the freelist. */
-
- if (ofs_read(tdb, FREELIST_TOP, &curr_offset) == -1) {
- goto fail;
- }
+ /* Offset of tailer from record header */
+ totalsize = sizeof(*rec) + rec->rec_len;
+ return ofs_write(tdb, offset + totalsize - sizeof(tdb_off),
+ &totalsize);
+}
- /* Special case 1 - no freelist. */
- if (curr_offset == 0) {
- if (rec_write(tdb, rec_offset, rec) == -1)
- goto fail;
+#ifdef TDB_DEBUG
+void tdb_printfreelist(TDB_CONTEXT *tdb)
+{
+ tdb_off offset, rec_ptr, last_ptr;
+ struct list_struct rec, lastrec, newrec;
- if (ofs_write(tdb, FREELIST_TOP, &rec_offset) == -1) {
- tdb->ecode = TDB_ERR_CORRUPT;
- goto fail;
- }
+ tdb_lock(tdb, -1, F_WRLCK);
-#if TDB_DEBUG_FREE
- {
- extern void tdb_printfreelist(TDB_CONTEXT *);
+ last_ptr = 0;
+ offset = FREELIST_TOP;
- tdb_printfreelist(tdb);
- }
-#endif
- tdb_unlock(tdb, -1);
- return 0;
+ /* read in the freelist top */
+ if (ofs_read(tdb, offset, &rec_ptr) == -1) {
+ return;
}
-
- /* Special case 2 - rec should be inserted at start of freelist. */
- if (rec_offset < curr_offset) {
-
- /* Link the record being freed into the freelist. */
- rec->next = curr_offset;
-
- /* Check for merge with first record. */
- if (rec_offset + rec->rec_len + sizeof(struct list_struct) == curr_offset ) {
-
- /* Read the first freelist record. */
- if (rec_free_read(tdb, curr_offset, &curr_rec) == -1) {
- goto fail;
- }
- rec->rec_len += (curr_rec.rec_len + sizeof(struct list_struct));
- rec->next = curr_rec.next;
+ printf("freelist top=[0x%08x]\n", rec_ptr );
+ while (rec_ptr) {
+ if (tdb_read(tdb, rec_ptr, (char *)&rec, sizeof(rec), DOCONV()) == -1) {
+ return;
}
- /* Write out the new record. */
- if (rec_write(tdb, rec_offset, rec) == -1)
- goto fail;
-
- /* Insert at the start of the freelist. */
- if (ofs_write(tdb, FREELIST_TOP, &rec_offset) == -1) {
- tdb->ecode = TDB_ERR_CORRUPT;
- goto fail;
+ if (rec.magic != TDB_FREE_MAGIC) {
+ printf("bad magic 0x%08x in free list\n", rec.magic);
+ return;
}
-#if TDB_DEBUG_FREE
- {
- extern void tdb_printfreelist(TDB_CONTEXT *);
-
- tdb_printfreelist(tdb);
- }
-#endif
- tdb_unlock(tdb, -1);
- return 0;
- }
-
- /* Find the correct place to insert into the freelist. */
+ printf("entry offset=[0x%08x], rec.rec_len = [0x%08x]\n", rec.next, rec.rec_len );
- /* Read the first freelist record. */
- if (rec_free_read(tdb, curr_offset, &curr_rec) == -1) {
- goto fail;
+ /* move to the next record */
+ rec_ptr = rec.next;
}
- while ( curr_rec.next && (rec_offset > curr_rec.next)) {
+ tdb_unlock(tdb, -1, F_WRLCK);
+}
+#endif
- curr_offset = curr_rec.next;
+/* Remove an element from the freelist. Must have alloc lock. */
+static int remove_from_freelist(TDB_CONTEXT *tdb, tdb_off off, tdb_off next)
+{
+ tdb_off last_ptr, i;
- if (rec_free_read(tdb, curr_offset, &curr_rec) == -1) {
- goto fail;
+ /* read in the freelist top */
+ last_ptr = FREELIST_TOP;
+ while (ofs_read(tdb, last_ptr, &i) != -1 && i != 0) {
+ if (i == off) {
+ /* We've found it! */
+ return ofs_write(tdb, last_ptr, &next);
}
+ /* Follow chain (next offset is at start of record) */
+ last_ptr = i;
}
+ return TDB_ERRCODE(TDB_ERR_CORRUPT, -1);
+}
- /* Link the record being freed into the freelist. */
- rec->next = curr_rec.next;
- curr_rec.next = rec_offset;
-
- /* Check for merge with previous record. */
-
- if (curr_offset + curr_rec.rec_len + sizeof(struct list_struct) == rec_offset) {
- /* Merge with previous. */
- curr_rec.rec_len += (rec->rec_len + sizeof(struct list_struct));
- curr_rec.next = rec->next;
- rec_offset = curr_offset;
- *rec = curr_rec;
- }
+/* Add an element into the freelist. Merge adjacent records if
+ neccessary. */
+static int tdb_free(TDB_CONTEXT *tdb, tdb_off offset, struct list_struct *rec)
+{
+ tdb_off right, left;
+ /* Allocation and tailer lock */
+ if (tdb_lock(tdb, -1, F_WRLCK) != 0) return -1;
- /* Check for merge with next record. */
- if (rec_offset + rec->rec_len + sizeof(struct list_struct) == rec->next ) {
- struct list_struct next_rec;
+ /* Look right first (I'm an Australian, dammit) */
+ right = offset + sizeof(*rec) + rec->rec_len;
+ if (tdb_oob(tdb, right + sizeof(*rec)) == 0) {
+ struct list_struct r;
- if (rec_free_read(tdb, rec->next, &next_rec) == -1) {
+ if (tdb_read(tdb, right, &r, sizeof(r), DOCONV()) == -1)
goto fail;
- }
- /* Merge with next. */
- rec->rec_len += (next_rec.rec_len + sizeof(struct list_struct));
- rec->next = next_rec.next;
+ /* If it's free, expand to include it. */
+ if (r.magic == TDB_FREE_MAGIC) {
+ if (remove_from_freelist(tdb, right, r.next) == -1)
+ goto fail;
+ rec->rec_len += sizeof(r) + r.rec_len;
+ }
}
- /* At this point rec_offset is the offset of the
- new free record, and rec points at the new record to write. */
-
-#if TDB_DEBUG_FREE
- printf("tdb free: writing record of size %x at offset %x\n",
- rec->rec_len, rec_offset );
-#endif
+ /* Look left */
+ left = offset - 4;
+ if (left > TDB_HASH_TOP(tdb->header.hash_size-1)) {
+ struct list_struct l;
+ tdb_off leftsize;
- /* Write the new record. */
- if (rec_write(tdb, rec_offset, rec) == -1) {
- tdb->ecode = TDB_ERR_CORRUPT;
- goto fail;
- }
+ /* Read in tailer and jump back to header */
+ if (ofs_read(tdb, left, &leftsize) == -1) goto fail;
+ left = offset - leftsize;
- /* Now link into the freelist. */
- if (rec_offset != curr_offset) {
- if (rec_write(tdb, curr_offset, &curr_rec) == -1) {
- tdb->ecode = TDB_ERR_CORRUPT;
+ /* Now read in record */
+ if (tdb_read(tdb, left, &l, sizeof(l), DOCONV()) == -1)
goto fail;
+
+ /* If it's free, expand to include it. */
+ if (l.magic == TDB_FREE_MAGIC) {
+ if (remove_from_freelist(tdb, left, l.next) == -1)
+ goto fail;
+ offset = left;
+ rec->rec_len += leftsize;
}
}
+ if (update_tailer(tdb, offset, rec) == -1) goto fail;
-#if TDB_DEBUG_FREE
- {
- extern void tdb_printfreelist(TDB_CONTEXT *);
+ /* Now, prepend to free list */
+ rec->magic = TDB_FREE_MAGIC;
- tdb_printfreelist(tdb);
- }
-#endif
+ if (ofs_read(tdb, FREELIST_TOP, &rec->next) == -1) goto fail;
+ if (rec_write(tdb, offset, rec) == -1) goto fail;
+ if (ofs_write(tdb, FREELIST_TOP, &offset) == -1) goto fail;
- tdb_unlock(tdb, -1);
+ /* And we're done. */
+ tdb_unlock(tdb, -1, F_WRLCK);
return 0;
- fail:
-
- tdb_unlock(tdb, -1);
+ fail:
+ tdb_unlock(tdb, -1, F_WRLCK);
return -1;
}
-/* expand the database at least length bytes by expanding the
- underlying file and doing the mmap again if necessary */
-static int tdb_expand(TDB_CONTEXT *tdb, tdb_off length)
+/* expand the database at least size bytes by expanding the underlying
+ file and doing the mmap again if necessary */
+static int tdb_expand(TDB_CONTEXT *tdb, tdb_off size)
{
struct list_struct rec;
- tdb_off offset, ptr;
+ tdb_off offset;
char b = 0;
- tdb_lock(tdb,-1, F_WRLCK);
+ if (tdb_lock(tdb, -1, F_WRLCK) == -1) return 0;
- /* make sure we know about any previous expansions by another
- process */
- tdb_oob(tdb,tdb->map_size + 1);
+ /* must know about any previous expansions by another process */
+ tdb_oob(tdb, tdb->map_size + 1);
- /* always make room for at least 10 more records */
- length *= TDB_LEN_MULTIPLIER;
-
- /* and round the database up to a multiple of TDB_PAGE_SIZE */
- length = ((tdb->map_size + length + TDB_PAGE_SIZE) & ~(TDB_PAGE_SIZE - 1)) - tdb->map_size;
+ /* always make room for at least 10 more records, and round
+ the database up to a multiple of TDB_PAGE_SIZE */
+ size = TDB_ALIGN(tdb->map_size + size*10, TDB_PAGE_SIZE) - tdb->map_size;
/* expand the file itself */
- if (!(tdb->flags & TDB_INTERNAL)) {
- lseek(tdb->fd, tdb->map_size + length - 1, SEEK_SET);
+ if (!(tdb->flags & TDB_INTERNAL)) {
+ lseek(tdb->fd, tdb->map_size + size - 1, SEEK_SET);
if (write(tdb->fd, &b, 1) != 1) goto fail;
- }
+ }
-#if HAVE_MMAP
- if (!(tdb->flags & TDB_INTERNAL) && tdb->map_ptr) {
- munmap(tdb->map_ptr, tdb->map_size);
- tdb->map_ptr = NULL;
- }
-#endif
+ if (!(tdb->flags & TDB_INTERNAL) && tdb->map_ptr)
+ tdb->map_ptr = tdb_munmap(tdb->map_ptr, tdb->map_size);
- tdb->map_size += length;
+ tdb->map_size += size;
- if (tdb->flags & TDB_INTERNAL) {
+ if (tdb->flags & TDB_INTERNAL)
tdb->map_ptr = realloc(tdb->map_ptr, tdb->map_size);
- }
/* form a new freelist record */
memset(&rec,'\0',sizeof(rec));
- rec.rec_len = length - sizeof(rec);
+ rec.rec_len = size - sizeof(rec);
/* link it into the free list */
- offset = tdb->map_size - length;
+ offset = tdb->map_size - size;
if (tdb_free(tdb, offset, &rec) == -1) goto fail;
-#if HAVE_MMAP
- if (!(tdb->flags & TDB_NOMMAP)) {
- tdb->map_ptr = (void *)mmap(NULL, tdb->map_size,
- PROT_READ|PROT_WRITE,
- MAP_SHARED | MAP_FILE, tdb->fd, 0);
- }
-#endif
+ if (!(tdb->flags & TDB_NOMMAP))
+ tdb->map_ptr = tdb_mmap(tdb->map_size, 0, tdb->fd);
- tdb_unlock(tdb, -1);
+ tdb_unlock(tdb, -1, F_WRLCK);
return 0;
-
fail:
- tdb_unlock(tdb,-1);
+ tdb_unlock(tdb, -1, F_WRLCK);
return -1;
}
@@ -578,189 +474,125 @@ static int tdb_expand(TDB_CONTEXT *tdb, tdb_off length)
*/
static tdb_off tdb_allocate(TDB_CONTEXT *tdb, tdb_len length)
{
- tdb_off offset, rec_ptr, last_ptr;
- struct list_struct rec, lastrec, newrec;
+ tdb_off rec_ptr, last_ptr;
+ struct list_struct rec, newrec;
- tdb_lock(tdb, -1, F_WRLCK);
+ if (tdb_lock(tdb, -1, F_WRLCK) == -1) return 0;
+
+ /* Extra bytes required for tailer */
+ length += sizeof(tdb_off);
again:
- last_ptr = 0;
- offset = FREELIST_TOP;
+ last_ptr = FREELIST_TOP;
/* read in the freelist top */
- if (ofs_read(tdb, offset, &rec_ptr) == -1) {
- goto fail;
- }
+ if (ofs_read(tdb, FREELIST_TOP, &rec_ptr) == -1) goto fail;
- /* keep looking until we find a freelist record that is big
- enough */
+ /* keep looking until we find a freelist record big enough */
while (rec_ptr) {
- if (tdb_read(tdb, rec_ptr, (char *)&rec, sizeof(rec)) == -1) {
- goto fail;
- }
-
- if (rec.magic != TDB_FREE_MAGIC) {
-#if TDB_DEBUG
- printf("bad magic 0x%08x in free list\n", rec.magic);
-#endif
- goto fail;
- }
+ if (rec_free_read(tdb, rec_ptr, &rec) == -1) goto fail;
if (rec.rec_len >= length) {
/* found it - now possibly split it up */
if (rec.rec_len > length + MIN_REC_SIZE) {
- length = (length + TDB_ALIGN) & ~(TDB_ALIGN-1);
+ length = TDB_ALIGN(length, TDB_ALIGNMENT);
- newrec.rec_len = rec.rec_len - (sizeof(rec) + length);
+ newrec.rec_len = rec.rec_len
+ - (sizeof(rec) + length);
newrec.next = rec.next;
newrec.magic = TDB_FREE_MAGIC;
rec.rec_len = length;
rec.next = rec_ptr + sizeof(rec) + rec.rec_len;
-
- if (rec_write(tdb, rec.next, &newrec) == -1) {
- goto fail;
- }
- if (rec_write(tdb, rec_ptr, &rec) == -1) {
+ /* Update split-off record */
+ if (rec_write(tdb, rec.next, &newrec) == -1
+ || update_tailer(tdb,rec.next,&newrec)==-1)
+ goto fail;
+ /* Update record we're about to allocate */
+ if (rec_write(tdb, rec_ptr, &rec) == -1
+ || update_tailer(tdb, rec_ptr, &rec)==-1)
goto fail;
- }
}
/* remove it from the list */
- if (last_ptr == 0) {
- offset = FREELIST_TOP;
-
- if (ofs_write(tdb, offset, &rec.next) == -1) {
+ if (ofs_write(tdb, last_ptr, &rec.next) == -1)
goto fail;
- }
- } else {
- lastrec.next = rec.next;
- if (rec_write(tdb, last_ptr, &lastrec) == -1) {
- goto fail;
- }
- }
/* all done - return the new record offset */
- tdb_unlock(tdb, -1);
-
-#if TDB_DEBUG_FREE
- {
- extern void tdb_printfreelist(TDB_CONTEXT *);
- printf("tdb_allocate: offset %x, size %x\n", rec_ptr, rec.rec_len);
-
- tdb_printfreelist(tdb);
- }
-#endif
+ tdb_unlock(tdb, -1, F_WRLCK);
return rec_ptr;
}
-
/* move to the next record */
- lastrec = rec;
last_ptr = rec_ptr;
rec_ptr = rec.next;
}
-
/* we didn't find enough space. See if we can expand the
database and if we can then try again */
if (tdb_expand(tdb, length + sizeof(rec)) == 0) goto again;
-
fail:
-#if TDB_DEBUG
- printf("tdb_allocate failed for size %u\n", length);
-#endif
- tdb_unlock(tdb, -1);
+ tdb_unlock(tdb, -1, F_WRLCK);
return 0;
}
/* initialise a new database with a specified hash size */
static int tdb_new_database(TDB_CONTEXT *tdb, int hash_size)
{
- struct tdb_header header;
- tdb_off offset;
- int i, size = 0;
- tdb_off buf[16];
-
- /* create the header */
- memset(&header, 0, sizeof(header));
- memcpy(header.magic_food, TDB_MAGIC_FOOD, strlen(TDB_MAGIC_FOOD)+1);
- header.version = TDB_VERSION;
- header.hash_size = hash_size;
- if (tdb->fd != -1) {
- lseek(tdb->fd, 0, SEEK_SET);
- ftruncate(tdb->fd, 0);
- }
-
- if (tdb->fd != -1 && write(tdb->fd, &header, sizeof(header)) !=
- sizeof(header)) {
- tdb->ecode = TDB_ERR_IO;
- return -1;
- } else size += sizeof(header);
-
- /* the freelist and hash pointers */
- offset = 0;
- memset(buf, 0, sizeof(buf));
-
- for (i=0;(hash_size+1)-i >= 16; i += 16) {
- if (tdb->fd != -1 && write(tdb->fd, buf, sizeof(buf)) !=
- sizeof(buf)) {
- tdb->ecode = TDB_ERR_IO;
- return -1;
- } else size += sizeof(buf);
- }
-
- for (;i<hash_size+1; i++) {
- if (tdb->fd != -1 && write(tdb->fd, buf, sizeof(tdb_off)) !=
- sizeof(tdb_off)) {
- tdb->ecode = TDB_ERR_IO;
- return -1;
- } else size += sizeof(tdb_off);
- }
-
- if (tdb->flags & TDB_INTERNAL) {
- tdb->map_ptr = calloc(size,1);
- tdb->map_size = size;
- if (tdb->map_ptr == NULL) {
- tdb->ecode = TDB_ERR_IO;
- return -1;
- }
- memcpy(&tdb->header, &header, sizeof(header));
- }
-
-#if TDB_DEBUG
- printf("initialised database of hash_size %u\n",
- hash_size);
+ struct tdb_header *newdb;
+ int size, ret;
+
+ /* We make it up in memory, then write it out if not internal */
+ size = sizeof(struct tdb_header) + (hash_size+1)*sizeof(tdb_off);
+ if (!(newdb = calloc(size, 1))) return TDB_ERRCODE(TDB_ERR_OOM, -1);
+
+ /* Fill in the header */
+ newdb->version = TDB_VERSION;
+ newdb->hash_size = hash_size;
+#ifdef USE_SPINLOCKS
+ newdb->rwlocks = size;
#endif
- return 0;
+ if (tdb->flags & TDB_INTERNAL) {
+ tdb->map_size = size;
+ tdb->map_ptr = (char *)newdb;
+ memcpy(&tdb->header, newdb, sizeof(tdb->header));
+ /* Convert the `ondisk' version if asked. */
+ CONVERT(*newdb);
+ return 0;
+ }
+ lseek(tdb->fd, 0, SEEK_SET);
+ ftruncate(tdb->fd, 0);
+ /* This creates an endian-converted header, as if read from disk */
+ CONVERT(*newdb);
+ memcpy(&tdb->header, newdb, sizeof(tdb->header));
+ /* Don't endian-convert the magic food! */
+ memcpy(newdb->magic_food, TDB_MAGIC_FOOD, strlen(TDB_MAGIC_FOOD)+1);
+ if (write(tdb->fd, newdb, size) != size) ret = -1;
+ else ret = tdb_create_rwlocks(tdb->fd, hash_size);
+
+ free(newdb);
+ return ret;
}
/* Returns 0 on fail. On success, return offset of record, and fills
in rec */
-static tdb_off tdb_find(TDB_CONTEXT *tdb, TDB_DATA key, unsigned int hash,
- struct list_struct *rec)
+static tdb_off tdb_find(TDB_CONTEXT *tdb, TDB_DATA key, u32 hash,
+ struct list_struct *r)
{
- tdb_off offset, rec_ptr;
+ tdb_off rec_ptr;
- /* find the top of the hash chain */
- offset = tdb_hash_top(tdb, hash);
-
/* read in the hash top */
- if (ofs_read(tdb, offset, &rec_ptr) == -1)
- return 0;
+ if (ofs_read(tdb, TDB_HASH_TOP(hash), &rec_ptr) == -1) return 0;
/* keep looking until we find the right record */
while (rec_ptr) {
- if (rec_read(tdb, rec_ptr, rec) == -1)
- return 0;
+ if (rec_read(tdb, rec_ptr, r) == -1) return 0;
- if (hash == rec->full_hash && key.dsize == rec->key_len) {
+ if (!TDB_DEAD(r) && hash==r->full_hash && key.dsize==r->key_len) {
char *k;
/* a very likely hit - read the key */
- k = tdb_alloc_read(tdb, rec_ptr + sizeof(*rec),
- rec->key_len);
-
- if (!k)
- return 0;
+ k = tdb_alloc_read(tdb, rec_ptr + sizeof(*r),
+ r->key_len);
+ if (!k) return 0;
if (memcmp(key.dptr, k, key.dsize) == 0) {
free(k);
@@ -768,77 +600,75 @@ static tdb_off tdb_find(TDB_CONTEXT *tdb, TDB_DATA key, unsigned int hash,
}
free(k);
}
-
- /* move to the next record */
- rec_ptr = rec->next;
+ rec_ptr = r->next;
}
- return 0;
+ return TDB_ERRCODE(TDB_ERR_NOEXIST, 0);
}
-/*
- return an error string for the last tdb error
-*/
-char *tdb_error(TDB_CONTEXT *tdb)
+/* If they do lockkeys, check that this hash is one they locked */
+static int tdb_keylocked(TDB_CONTEXT *tdb, u32 hash)
+{
+ u32 i;
+ if (!tdb->lockedkeys) return 1;
+ for (i = 0; i < tdb->lockedkeys[0]; i++)
+ if (tdb->lockedkeys[i+1] == hash) return 1;
+ return TDB_ERRCODE(TDB_ERR_NOLOCK, 0);
+}
+
+/* As tdb_find, but if you succeed, keep the lock */
+static tdb_off tdb_find_lock(TDB_CONTEXT *tdb, TDB_DATA key, int locktype,
+ struct list_struct *rec)
+{
+ u32 hash, rec_ptr;
+
+ hash = tdb_hash(&key);
+ if (!tdb_keylocked(tdb, hash)) return 0;
+ if (tdb_lock(tdb, BUCKET(hash), locktype) == -1) return 0;
+ if (!(rec_ptr = tdb_find(tdb, key, hash, rec)))
+ tdb_unlock(tdb, BUCKET(hash), locktype);
+ return rec_ptr;
+}
+
+enum TDB_ERROR tdb_error(TDB_CONTEXT *tdb)
{
- int i;
- static struct {
- enum TDB_ERROR ecode;
- char *estring;
- } emap[] = {
- {TDB_SUCCESS, "Success"},
- {TDB_ERR_CORRUPT, "Corrupt database"},
- {TDB_ERR_IO, "IO Error"},
- {TDB_ERR_LOCK, "Locking error"},
- {TDB_ERR_OOM, "Out of memory"},
- {TDB_ERR_EXISTS, "Record exists"},
- {TDB_ERR_NOEXIST, "Record does not exist"},
- {(enum TDB_ERROR)-1, NULL}};
- if (tdb != NULL) {
- for (i=0;emap[i].estring;i++) {
+ return tdb->ecode;
+}
+
+static struct tdb_errname {
+ enum TDB_ERROR ecode; const char *estring;
+} emap[] = { {TDB_SUCCESS, "Success"},
+ {TDB_ERR_CORRUPT, "Corrupt database"},
+ {TDB_ERR_IO, "IO Error"},
+ {TDB_ERR_LOCK, "Locking error"},
+ {TDB_ERR_OOM, "Out of memory"},
+ {TDB_ERR_EXISTS, "Record exists"},
+ {TDB_ERR_NOLOCK, "Lock exists on other keys"},
+ {TDB_ERR_NOEXIST, "Record does not exist"} };
+
+/* Error string for the last tdb error */
+const char *tdb_errorstr(TDB_CONTEXT *tdb)
+{
+ u32 i;
+ for (i = 0; i < sizeof(emap) / sizeof(struct tdb_errname); i++)
if (tdb->ecode == emap[i].ecode) return emap[i].estring;
- }
- } else {
- return "Invalid tdb context";
- }
return "Invalid error code";
}
-
/* update an entry in place - this only works if the new data size
is <= the old data size and the key exists.
on failure return -1
*/
-int tdb_update(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf)
+static int tdb_update(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf)
{
- unsigned hash;
struct list_struct rec;
tdb_off rec_ptr;
int ret = -1;
- if (tdb == NULL) {
-#ifdef TDB_DEBUG
- printf("tdb_update() called with null context\n");
-#endif
- return -1;
- }
+ /* find entry */
+ if (!(rec_ptr = tdb_find_lock(tdb, key, F_WRLCK, &rec))) return -1;
- /* initialise error code to ok, first */
- tdb->ecode = 0;
-
- /* find which hash bucket it is in */
- hash = tdb_hash(&key);
-
- tdb_lock(tdb, BUCKET(hash), F_WRLCK);
- rec_ptr = tdb_find(tdb, key, hash, &rec);
-
- if (!rec_ptr) {
- tdb->ecode = TDB_ERR_NOEXIST;
- goto out;
- }
-
- /* must be long enough */
- if (rec.rec_len < key.dsize + dbuf.dsize)
- goto out;
+ /* must be long enough key, data and tailer */
+ if (rec.rec_len < key.dsize + dbuf.dsize + sizeof(tdb_off)) goto out;
if (tdb_write(tdb, rec_ptr + sizeof(rec) + rec.key_len,
dbuf.dptr, dbuf.dsize) == -1)
@@ -848,46 +678,27 @@ int tdb_update(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf)
/* update size */
rec.data_len = dbuf.dsize;
ret = rec_write(tdb, rec_ptr, &rec);
- } else
- ret = 0;
-
+ }
+ else ret = 0;
out:
- tdb_unlock(tdb, BUCKET(hash));
+ tdb_unlock(tdb, BUCKET(rec.full_hash), F_WRLCK);
return ret;
}
/* find an entry in the database given a key */
TDB_DATA tdb_fetch(TDB_CONTEXT *tdb, TDB_DATA key)
{
- unsigned hash;
tdb_off rec_ptr;
struct list_struct rec;
- TDB_DATA ret = null_data;
-
- if (tdb == NULL) {
-#ifdef TDB_DEBUG
- printf("tdb_fetch() called with null context\n");
-#endif
- return null_data;
- }
+ TDB_DATA ret;
/* find which hash bucket it is in */
- hash = tdb_hash(&key);
+ if (!(rec_ptr = tdb_find_lock(tdb,key,F_RDLCK,&rec))) return tdb_null;
- tdb_lock(tdb, BUCKET(hash), F_RDLCK);
- rec_ptr = tdb_find(tdb, key, hash, &rec);
-
- if (rec_ptr) {
- if (rec.data_len)
- ret.dptr = tdb_alloc_read(tdb,
- rec_ptr + sizeof(rec) + rec.key_len,
- rec.data_len);
- else
- ret.dptr = NULL;
- ret.dsize = rec.data_len;
- }
-
- tdb_unlock(tdb, BUCKET(hash));
+ ret.dptr = tdb_alloc_read(tdb, rec_ptr + sizeof(rec) + rec.key_len,
+ rec.data_len);
+ ret.dsize = rec.data_len;
+ tdb_unlock(tdb, BUCKET(rec.full_hash), F_RDLCK);
return ret;
}
@@ -899,299 +710,245 @@ TDB_DATA tdb_fetch(TDB_CONTEXT *tdb, TDB_DATA key)
*/
int tdb_exists(TDB_CONTEXT *tdb, TDB_DATA key)
{
- unsigned hash;
- tdb_off rec_ptr;
struct list_struct rec;
- if (tdb == NULL) {
-#ifdef TDB_DEBUG
- printf("tdb_exists() called with null context\n");
-#endif
- return 0;
- }
-
- /* find which hash bucket it is in */
- hash = tdb_hash(&key);
+ if (tdb_find_lock(tdb, key, F_RDLCK, &rec) == 0) return 0;
+ tdb_unlock(tdb, BUCKET(rec.full_hash), F_RDLCK);
+ return 1;
+}
- tdb_lock(tdb, BUCKET(hash), F_RDLCK);
- rec_ptr = tdb_find(tdb, key, hash, &rec);
- tdb_unlock(tdb, BUCKET(hash));
+/* record lock stops delete underneath */
+static int lock_record(TDB_CONTEXT *tdb, tdb_off off)
+{
+ return off ? tdb_brlock(tdb, off, F_RDLCK, F_SETLKW) : 0;
+}
+/* write locks override our own fcntl readlocks, so check it here */
+static int write_lock_record(TDB_CONTEXT *tdb, tdb_off off)
+{
+ struct tdb_traverse_lock *i;
+ for (i = &tdb->travlocks; i; i = i->next) if (i->off == off) return -1;
+ return tdb_brlock(tdb, off, F_WRLCK, F_SETLK);
+}
+static int write_unlock_record(TDB_CONTEXT *tdb, tdb_off off)
+{
+ return tdb_brlock(tdb, off, F_UNLCK, F_SETLK);
+}
+/* fcntl locks don't stack: avoid unlocking someone else's */
+static int unlock_record(TDB_CONTEXT *tdb, tdb_off off)
+{
+ struct tdb_traverse_lock *i;
+ u32 count = 0;
- return rec_ptr != 0;
+ if (off == 0) return 0;
+ for (i = &tdb->travlocks; i; i = i->next) if (i->off == off) count++;
+ return (count == 1 ? tdb_brlock(tdb, off, F_UNLCK, F_SETLKW) : 0);
}
-/* traverse the entire database - calling fn(tdb, key, data) on each element.
- return -1 on error or the record count traversed
- if fn is NULL then it is not called
- a non-zero return value from fn() indicates that the traversal should stop
- */
-int tdb_traverse(TDB_CONTEXT *tdb, int (*fn)(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, void* state), void* state)
+/* actually delete an entry in the database given the offset */
+static int do_delete(TDB_CONTEXT *tdb, tdb_off rec_ptr, struct list_struct*rec)
{
- int count = 0;
- unsigned h;
- tdb_off offset, rec_ptr;
- struct list_struct rec;
- char *data;
- TDB_DATA key, dbuf;
+ tdb_off last_ptr, i;
+ struct list_struct lastrec;
- if (tdb == NULL) {
-#ifdef TDB_DEBUG
- printf("tdb_traverse() called with null context\n");
-#endif
- return -1;
- }
+ if (write_lock_record(tdb, rec_ptr) == -1) {
+ /* Someone traversing here: mark it as dead */
+ rec->magic = TDB_DEAD_MAGIC;
+ return rec_write(tdb, rec_ptr, rec);
+ }
+ write_unlock_record(tdb, rec_ptr);
- /* loop over all hash chains */
- for (h = 0; h < tdb->header.hash_size; h++) {
- tdb_lock(tdb, BUCKET(h), F_WRLCK);
+ /* find previous record in hash chain */
+ if (ofs_read(tdb, TDB_HASH_TOP(rec->full_hash), &i) == -1) return -1;
+ for (last_ptr = 0; i != rec_ptr; last_ptr = i, i = lastrec.next)
+ if (rec_read(tdb, i, &lastrec) == -1) return -1;
- /* read in the hash top */
- offset = tdb_hash_top(tdb, h);
- if (ofs_read(tdb, offset, &rec_ptr) == -1) {
- goto fail;
- }
+ /* unlink it: next ptr is at start of record. */
+ if (last_ptr == 0) last_ptr = TDB_HASH_TOP(rec->full_hash);
+ if (ofs_write(tdb, last_ptr, &rec->next) == -1) return -1;
- /* traverse all records for this hash */
- while (rec_ptr) {
- if (rec_read(tdb, rec_ptr, &rec) == -1) {
- goto fail;
- }
+ /* recover the space */
+ if (tdb_free(tdb, rec_ptr, rec) == -1) return -1;
+ return 0;
+}
- /* now read the full record */
- data = tdb_alloc_read(tdb, rec_ptr + sizeof(rec),
- rec.key_len + rec.data_len);
- if (!data) {
- goto fail;
- }
+/* Uses traverse lock: 0 = finish, -1 = error, other = record offset */
+static int tdb_next_lock(TDB_CONTEXT *tdb, struct tdb_traverse_lock *tlock,
+ struct list_struct *rec)
+{
+ tdb_off next;
+ int first = (tlock->off == 0);
- key.dptr = data;
- key.dsize = rec.key_len;
- dbuf.dptr = data + rec.key_len;
- dbuf.dsize = rec.data_len;
- count++;
-
- if (fn && fn(tdb, key, dbuf, state) != 0) {
- /* they want us to stop traversing */
- free(data);
- tdb_unlock(tdb, BUCKET(h));
- return count;
- }
+ /* No traversal allows if you've called tdb_lockkeys() */
+ if (tdb->lockedkeys) return TDB_ERRCODE(TDB_ERR_NOLOCK, -1);
- /* a miss - drat */
- free(data);
+ /* Lock each chain from the start one. */
+ for (; tlock->hash < tdb->header.hash_size; tlock->hash++) {
+ if (tdb_lock(tdb, tlock->hash, F_WRLCK) == -1) return -1;
- /* move to the next record */
- rec_ptr = rec.next;
+ /* No previous record? Start at top of chain. */
+ if (!tlock->off) {
+ if (ofs_read(tdb, TDB_HASH_TOP(tlock->hash),
+ &tlock->off) == -1)
+ goto fail;
+ } else {
+ /* Othereisre unlock the previous record. */
+ unlock_record(tdb, tlock->off);
}
- tdb_unlock(tdb, BUCKET(h));
- }
- /* return the number traversed */
- return count;
+ if (!first) {
+ /* Grab next record */
+ if (rec_read(tdb, tlock->off, rec) == -1) goto fail;
+ tlock->off = rec->next;
+ first = 0;
+ }
+
+ /* Iterate through chain */
+ for (; tlock->off; tlock->off = next) {
+ if (rec_read(tdb, tlock->off, rec) == -1) goto fail;
+ if (!TDB_DEAD(rec)) {
+ /* Woohoo: we found one! */
+ lock_record(tdb, tlock->off);
+ return tlock->off;
+ }
+ /* Try to clean dead ones from old traverses */
+ next = rec->next;
+ do_delete(tdb, tlock->off, rec);
+ }
+ tdb_unlock(tdb, tlock->hash, F_WRLCK);
+ }
+ /* We finished iteration without finding anything */
+ return TDB_ERRCODE(TDB_SUCCESS, 0);
fail:
- tdb_unlock(tdb, BUCKET(h));
+ tlock->off = 0;
+ tdb_unlock(tdb, tlock->hash, F_WRLCK);
return -1;
}
-
-/* find the first entry in the database and return its key */
-TDB_DATA tdb_firstkey(TDB_CONTEXT *tdb)
+/* traverse the entire database - calling fn(tdb, key, data) on each element.
+ return -1 on error or the record count traversed
+ if fn is NULL then it is not called
+ a non-zero return value from fn() indicates that the traversal should stop
+ */
+int tdb_traverse(TDB_CONTEXT *tdb, tdb_traverse_func fn, void *state)
{
- tdb_off offset, rec_ptr;
+ TDB_DATA key, dbuf;
struct list_struct rec;
- unsigned hash;
- TDB_DATA ret;
-
- if (tdb == NULL) {
-#ifdef TDB_DEBUG
- printf("tdb_firstkey() called with null context\n");
-#endif
- return null_data;
- }
-
- /* look for a non-empty hash chain */
- for (hash = 0, rec_ptr = 0;
- hash < tdb->header.hash_size;
- hash++) {
- /* find the top of the hash chain */
- offset = tdb_hash_top(tdb, hash);
-
- tdb_lock(tdb, BUCKET(hash), F_RDLCK);
-
- /* read in the hash top */
- if (ofs_read(tdb, offset, &rec_ptr) == -1) {
- goto fail;
+ struct tdb_traverse_lock tl = { tdb->travlocks.next, 0, 0 };
+ int ret, count = 0;
+
+ /* fcntl locks don't stack: beware traverse inside traverse */
+ tdb->travlocks.next = &tl;
+
+ /* tdb_next_lock places locks on the record returned, and its chain */
+ while ((ret = tdb_next_lock(tdb, &tl, &rec)) > 0) {
+ count++;
+ /* now read the full record */
+ key.dptr = tdb_alloc_read(tdb, tl.off + sizeof(rec),
+ rec.key_len + rec.data_len);
+ if (!key.dptr) {
+ tdb_unlock(tdb, tl.hash, F_WRLCK);
+ unlock_record(tdb, tl.off);
+ tdb->travlocks.next = tl.next;
+ return -1;
}
-
- if (rec_ptr) break;
-
- tdb_unlock(tdb, BUCKET(hash));
+ key.dsize = rec.key_len;
+ dbuf.dptr = key.dptr + rec.key_len;
+ dbuf.dsize = rec.data_len;
+
+ /* Drop chain lock, call out */
+ tdb_unlock(tdb, tl.hash, F_WRLCK);
+ if (fn && fn(tdb, key, dbuf, state)) {
+ /* They want us to terminate traversal */
+ unlock_record(tdb, tl.off);
+ tdb->travlocks.next = tl.next;
+ free(key.dptr);
+ return count;
+ }
+ free(key.dptr);
}
+ tdb->travlocks.next = tl.next;
+ if (ret < 0) return -1;
+ else return count;
+}
- if (rec_ptr == 0) return null_data;
-
- /* we've found a non-empty chain, now read the record */
- if (rec_read(tdb, rec_ptr, &rec) == -1) {
- goto fail;
- }
+/* find the first entry in the database and return its key */
+TDB_DATA tdb_firstkey(TDB_CONTEXT *tdb)
+{
+ TDB_DATA key;
+ struct list_struct rec;
- /* allocate and read the key space */
- ret.dptr = tdb_alloc_read(tdb, rec_ptr + sizeof(rec), rec.key_len);
- ret.dsize = rec.key_len;
- tdb_unlock(tdb, BUCKET(hash));
- return ret;
+ /* release any old lock */
+ unlock_record(tdb, tdb->travlocks.off);
+ tdb->travlocks.off = tdb->travlocks.hash = 0;
- fail:
- tdb_unlock(tdb, BUCKET(hash));
- return null_data;
+ if (tdb_next_lock(tdb, &tdb->travlocks, &rec) <= 0) return tdb_null;
+ /* now read the key */
+ key.dsize = rec.key_len;
+ key.dptr =tdb_alloc_read(tdb,tdb->travlocks.off+sizeof(rec),key.dsize);
+ tdb_unlock(tdb, BUCKET(tdb->travlocks.hash), F_WRLCK);
+ return key;
}
/* find the next entry in the database, returning its key */
-TDB_DATA tdb_nextkey(TDB_CONTEXT *tdb, TDB_DATA key)
+TDB_DATA tdb_nextkey(TDB_CONTEXT *tdb, TDB_DATA oldkey)
{
- unsigned hash, hbucket;
- tdb_off rec_ptr, offset;
+ u32 oldhash;
+ TDB_DATA key = tdb_null;
struct list_struct rec;
- TDB_DATA ret;
-
- if (tdb == NULL) {
-#ifdef TDB_DEBUG
- printf("tdb_nextkey() called with null context\n");
-#endif
- return null_data;
- }
-
- /* find which hash bucket it is in */
- hash = tdb_hash(&key);
- hbucket = BUCKET(hash);
-
- tdb_lock(tdb, hbucket, F_RDLCK);
- rec_ptr = tdb_find(tdb, key, hash, &rec);
- if (rec_ptr) {
- /* we want the next record after this one */
- rec_ptr = rec.next;
- }
-
- /* not found or last in hash: look for next non-empty hash chain */
- while (rec_ptr == 0) {
- tdb_unlock(tdb, hbucket);
-
- if (++hbucket >= tdb->header.hash_size - 1)
- return null_data;
-
- offset = tdb_hash_top(tdb, hbucket);
- tdb_lock(tdb, hbucket, F_RDLCK);
- /* read in the hash top */
- if (ofs_read(tdb, offset, &rec_ptr) == -1) {
- tdb_unlock(tdb, hbucket);
- return null_data;
+ char *k = NULL;
+
+ /* Is locked key the old key? If so, traverse will be reliable. */
+ if (tdb->travlocks.off) {
+ if (tdb_lock(tdb,tdb->travlocks.hash,F_WRLCK)) return tdb_null;
+ if (rec_read(tdb, tdb->travlocks.off, &rec) == -1
+ || !(k = tdb_alloc_read(tdb,tdb->travlocks.off+sizeof(rec),
+ rec.key_len))
+ || memcmp(k, oldkey.dptr, oldkey.dsize) != 0) {
+ /* No, it wasn't: unlock it and start from scratch */
+ free(k);
+ unlock_record(tdb, tdb->travlocks.off);
+ tdb_unlock(tdb, tdb->travlocks.hash, F_WRLCK);
+ tdb->travlocks.off = 0;
}
}
- /* Read the record. */
- if (rec_read(tdb, rec_ptr, &rec) == -1) {
- tdb_unlock(tdb, hbucket);
- return null_data;
+ if (!tdb->travlocks.off) {
+ /* No previous element: do normal find, and lock record */
+ tdb->travlocks.off = tdb_find_lock(tdb, oldkey, F_WRLCK, &rec);
+ if (!tdb->travlocks.off) return tdb_null;
+ tdb->travlocks.hash = BUCKET(rec.full_hash);
+ lock_record(tdb, tdb->travlocks.off);
}
- /* allocate and read the key */
- ret.dptr = tdb_alloc_read(tdb, rec_ptr + sizeof(rec), rec.key_len);
- ret.dsize = rec.key_len;
- tdb_unlock(tdb, hbucket);
+ oldhash = tdb->travlocks.hash;
- return ret;
+ /* Grab next record: locks chain and returned record,
+ unlocks old record */
+ if (tdb_next_lock(tdb, &tdb->travlocks, &rec) > 0) {
+ key.dsize = rec.key_len;
+ key.dptr = tdb_alloc_read(tdb, tdb->travlocks.off+sizeof(rec),
+ key.dsize);
+ /* Unlock the chain of this new record */
+ tdb_unlock(tdb, tdb->travlocks.hash, F_WRLCK);
+ }
+ /* Unlock the chain of old record */
+ tdb_unlock(tdb, BUCKET(oldhash), F_WRLCK);
+ return key;
}
/* delete an entry in the database given a key */
int tdb_delete(TDB_CONTEXT *tdb, TDB_DATA key)
{
- unsigned hash;
- tdb_off offset, rec_ptr, last_ptr;
- struct list_struct rec, lastrec;
- char *data = NULL;
-
- if (tdb == NULL) {
-#ifdef TDB_DEBUG
- printf("tdb_delete() called with null context\n");
-#endif
- return -1;
- }
-
- /* find which hash bucket it is in */
- hash = tdb_hash(&key);
-
- tdb_lock(tdb, BUCKET(hash), F_WRLCK);
-
- /* find the top of the hash chain */
- offset = tdb_hash_top(tdb, hash);
-
- /* read in the hash top */
- if (ofs_read(tdb, offset, &rec_ptr) == -1) {
- goto fail;
- }
-
- last_ptr = 0;
-
- /* keep looking until we find the right record */
- while (rec_ptr) {
- if (rec_read(tdb, rec_ptr, &rec) == -1) {
- goto fail;
- }
-
- if (hash == rec.full_hash && key.dsize == rec.key_len) {
- /* a very likely hit - read the record and full key */
- data = tdb_alloc_read(tdb, rec_ptr + sizeof(rec),
- rec.key_len);
- if (!data) {
- goto fail;
- }
-
- if (memcmp(key.dptr, data, key.dsize) == 0) {
- /* a definite match - delete it */
- if (last_ptr == 0) {
- offset = tdb_hash_top(tdb, hash);
- if (ofs_write(tdb, offset, &rec.next) == -1) {
- goto fail;
- }
- } else {
- lastrec.next = rec.next;
- if (rec_write(tdb, last_ptr, &lastrec) == -1) {
- goto fail;
- }
- }
- tdb_unlock(tdb, BUCKET(hash));
-
- /* and recover the space */
- if (tdb_free(tdb, rec_ptr, &rec) == -1)
- goto fail2;
-
- /* yipee - all done */
- free(data);
- return 0;
- }
-
- /* a miss - drat */
- free(data);
- data = NULL;
- }
-
- /* move to the next record */
- last_ptr = rec_ptr;
- lastrec = rec;
- rec_ptr = rec.next;
- }
-
- fail:
- if (data) free(data);
- tdb_unlock(tdb, BUCKET(hash));
- return -1;
+ tdb_off rec_ptr;
+ struct list_struct rec;
+ int ret;
- fail2:
- if (data) free(data);
- return -1;
+ if (!(rec_ptr = tdb_find_lock(tdb, key, F_WRLCK, &rec))) return -1;
+ ret = do_delete(tdb, rec_ptr, &rec);
+ tdb_unlock(tdb, BUCKET(rec.full_hash), F_WRLCK);
+ return ret;
}
-
/* store an element in the database, replacing any existing element
with the same key
@@ -1200,318 +957,265 @@ int tdb_delete(TDB_CONTEXT *tdb, TDB_DATA key)
int tdb_store(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, int flag)
{
struct list_struct rec;
- unsigned hash;
- tdb_off rec_ptr, offset;
+ u32 hash;
+ tdb_off rec_ptr;
char *p = NULL;
-
- if (tdb == NULL) {
-#ifdef TDB_DEBUG
- printf("tdb_store() called with null context\n");
-#endif
- return -1;
- }
+ int ret = 0;
/* find which hash bucket it is in */
hash = tdb_hash(&key);
-
+ if (!tdb_keylocked(tdb, hash)) return -1;
tdb_lock(tdb, BUCKET(hash), F_WRLCK);
/* check for it existing, on insert. */
- if (flag == TDB_INSERT && tdb_exists(tdb, key)) {
- tdb->ecode = TDB_ERR_EXISTS;
- goto fail;
- }
-
- /* first try in-place update, on modify or replace. */
- if (flag != TDB_INSERT && tdb_update(tdb, key, dbuf) == 0) {
- tdb_unlock(tdb, BUCKET(hash));
- return 0;
- }
-
- /* check for it _not_ existing, from error code of the update. */
- if (flag == TDB_MODIFY && tdb->ecode == TDB_ERR_NOEXIST) {
- goto fail;
+ if (flag == TDB_INSERT) {
+ if (tdb_exists(tdb, key)) {
+ tdb->ecode = TDB_ERR_EXISTS;
+ goto fail;
+ }
+ } else {
+ /* first try in-place update, on modify or replace. */
+ if (tdb_update(tdb, key, dbuf) == 0) goto out;
+ if (flag == TDB_MODIFY && tdb->ecode == TDB_ERR_NOEXIST)
+ goto fail;
}
-
/* reset the error code potentially set by the tdb_update() */
- tdb->ecode = 0;
-
- /*
- * now we're into insert / modify / replace of a record
- * which we know could not be optimised by an in-place
- * store (for various reasons).
- */
-
- rec_ptr = tdb_allocate(tdb, key.dsize + dbuf.dsize);
- if (rec_ptr == 0) {
- goto fail;
- }
-
- /* delete any existing record - if it doesn't exist we don't care */
- if (flag != TDB_INSERT) {
- tdb_delete(tdb, key);
- }
+ tdb->ecode = TDB_SUCCESS;
- /* read the newly created record */
- if (tdb_read(tdb, rec_ptr, (char *)&rec, sizeof(rec)) == -1) {
- goto fail;
- }
+ /* delete any existing record - if it doesn't exist we don't
+ care. Doing this first reduces fragmentation, and avoids
+ coalescing with `allocated' block before it's updated. */
+ if (flag != TDB_INSERT) tdb_delete(tdb, key);
- if (rec.magic != TDB_FREE_MAGIC) goto fail;
+ /* now we're into insert / modify / replace of a record which
+ * we know could not be optimised by an in-place store (for
+ * various reasons). */
+ if (!(rec_ptr = tdb_allocate(tdb, key.dsize + dbuf.dsize))) goto fail;
- /* find the top of the hash chain */
- offset = tdb_hash_top(tdb, hash);
-
- /* read in the hash top diretcly into our next pointer */
- if (ofs_read(tdb, offset, &rec.next) == -1) {
- goto fail;
- }
+ /* read the newly created record, then read hash top into next ptr */
+ if (rec_free_read(tdb, rec_ptr, &rec) == -1) goto fail;
+ if (ofs_read(tdb, TDB_HASH_TOP(hash), &rec.next) == -1) goto fail;
rec.key_len = key.dsize;
rec.data_len = dbuf.dsize;
rec.full_hash = hash;
rec.magic = TDB_MAGIC;
- p = (char *)malloc(sizeof(rec) + key.dsize + dbuf.dsize);
- if (!p) {
+ if (!(p = (char *)malloc(key.dsize + dbuf.dsize))) {
tdb->ecode = TDB_ERR_OOM;
goto fail;
}
- memcpy(p, &rec, sizeof(rec));
- memcpy(p+sizeof(rec), key.dptr, key.dsize);
- if (dbuf.dsize)
- memcpy(p+sizeof(rec)+key.dsize, dbuf.dptr, dbuf.dsize);
-
- if (tdb_write(tdb, rec_ptr, p, sizeof(rec)+key.dsize+dbuf.dsize) == -1)
- goto fail;
-
+ memcpy(p, key.dptr, key.dsize);
+ memcpy(p+key.dsize, dbuf.dptr, dbuf.dsize);
+ /* write out and point the top of the hash chain at it */
+ if (rec_write(tdb, rec_ptr, &rec) == -1
+ || tdb_write(tdb, rec_ptr+sizeof(rec), p, key.dsize+dbuf.dsize)==-1
+ || ofs_write(tdb, TDB_HASH_TOP(hash), &rec_ptr) == -1) {
+ fail:
+ ret = -1;
+ }
+ out:
free(p);
- p = NULL;
-
- /* and point the top of the hash chain at it */
- if (ofs_write(tdb, offset, &rec_ptr) == -1) goto fail;
-
- tdb_unlock(tdb, BUCKET(hash));
- return 0;
-
- fail:
-#if TDB_DEBUG
- printf("store failed for hash 0x%08x in bucket %u\n", hash, BUCKET(hash));
-#endif
- if (p) free(p);
- tdb_unlock(tdb, BUCKET(hash));
- return -1;
+ tdb_unlock(tdb, BUCKET(hash), F_WRLCK);
+ return ret;
}
-
/* open the database, creating it if necessary
- The open_flags and mode are passed straight to the open call on the database
- file. A flags value of O_WRONLY is invalid
+ The open_flags and mode are passed straight to the open call on the
+ database file. A flags value of O_WRONLY is invalid. The hash size
+ is advisory, use zero for a default value.
- The hash size is advisory, use zero for a default value.
-
- return is NULL on error
-*/
+ return is NULL on error */
TDB_CONTEXT *tdb_open(char *name, int hash_size, int tdb_flags,
int open_flags, mode_t mode)
{
- TDB_CONTEXT tdb, *ret;
+ TDB_CONTEXT tdb, *ret, *i;
struct stat st;
+ int rev = 0, locked;
memset(&tdb, 0, sizeof(tdb));
-
tdb.fd = -1;
tdb.name = NULL;
tdb.map_ptr = NULL;
+ tdb.lockedkeys = NULL;
tdb.flags = tdb_flags;
- if ((open_flags & O_ACCMODE) == O_WRONLY) {
- goto fail;
- }
-
+ if ((open_flags & O_ACCMODE) == O_WRONLY) goto fail;
if (hash_size == 0) hash_size = DEFAULT_HASH_SIZE;
+ if ((open_flags & O_ACCMODE) == O_RDONLY) {
+ tdb.read_only = 1;
+ /* read only databases don't do locking */
+ tdb.flags |= TDB_NOLOCK;
+ }
- tdb.read_only = ((open_flags & O_ACCMODE) == O_RDONLY);
-
- /* internal databases don't use mmap or locking,
- and start off cleared */
+ /* internal databases don't mmap or lock, and start off cleared */
if (tdb.flags & TDB_INTERNAL) {
tdb.flags |= (TDB_NOLOCK | TDB_NOMMAP);
tdb.flags &= ~TDB_CLEAR_IF_FIRST;
- }
-
- /* read only databases don't do locking */
- if (tdb.read_only) tdb.flags |= TDB_NOLOCK;
-
- if (tdb.flags & TDB_INTERNAL) {
tdb_new_database(&tdb, hash_size);
goto internal;
}
- tdb.fd = open(name, open_flags, mode);
- if (tdb.fd == -1) {
- goto fail;
- }
+ if ((tdb.fd = open(name, open_flags, mode)) == -1) goto fail;
/* ensure there is only one process initialising at once */
tdb_brlock(&tdb, GLOBAL_LOCK, F_WRLCK, F_SETLKW);
- if (tdb_flags & TDB_CLEAR_IF_FIRST) {
- /* we need to zero the database if we are the only
- one with it open */
- if (tdb_brlock(&tdb, ACTIVE_LOCK, F_WRLCK, F_SETLK) == 0) {
- ftruncate(tdb.fd, 0);
- tdb_brlock(&tdb, ACTIVE_LOCK, F_UNLCK, F_SETLK);
- }
+ /* we need to zero database if we are the only one with it open */
+ if ((locked = (tdb_brlock(&tdb, ACTIVE_LOCK, F_WRLCK, F_SETLK) == 0))
+ && (tdb_flags & TDB_CLEAR_IF_FIRST)) {
+ open_flags |= O_CREAT;
+ ftruncate(tdb.fd, 0);
}
- /* leave this lock in place */
- tdb_brlock(&tdb, ACTIVE_LOCK, F_RDLCK, F_SETLKW);
-
- if (read(tdb.fd, &tdb.header, sizeof(tdb.header)) != sizeof(tdb.header) ||
- strcmp(tdb.header.magic_food, TDB_MAGIC_FOOD) != 0 ||
- tdb.header.version != TDB_VERSION) {
+ if (read(tdb.fd, &tdb.header, sizeof(tdb.header)) != sizeof(tdb.header)
+ || strcmp(tdb.header.magic_food, TDB_MAGIC_FOOD) != 0
+ || (tdb.header.version != TDB_VERSION
+ && !(rev = (tdb.header.version==TDB_BYTEREV(TDB_VERSION))))) {
/* its not a valid database - possibly initialise it */
- if (!(open_flags & O_CREAT)) {
- goto fail;
- }
- if (tdb_new_database(&tdb, hash_size) == -1) goto fail;
-
- lseek(tdb.fd, 0, SEEK_SET);
- if (read(tdb.fd, &tdb.header, sizeof(tdb.header)) != sizeof(tdb.header))
- goto fail;
+ if (!(open_flags & O_CREAT)
+ || tdb_new_database(&tdb, hash_size) == -1) goto fail;
+ rev = (tdb.flags & TDB_CONVERT);
+ }
+ if (!rev) tdb.flags &= ~TDB_CONVERT;
+ else {
+ tdb.flags |= TDB_CONVERT;
+ convert(&tdb.header, sizeof(tdb.header));
}
-
fstat(tdb.fd, &st);
+ /* Is it already in the open list? If so, fail. */
+ for (i = tdbs; i; i = i->next) {
+ if (i->device == st.st_dev && i->inode == st.st_ino) {
+ errno = EBUSY;
+ close(tdb.fd);
+ return NULL;
+ }
+ }
/* map the database and fill in the return structure */
tdb.name = (char *)strdup(name);
tdb.map_size = st.st_size;
-
- tdb.locked = (struct tdb_lock_type *)calloc(tdb.header.hash_size+1,
- sizeof(tdb.locked[0]));
- if (!tdb.locked) {
- goto fail;
- }
-
-#if HAVE_MMAP
- if (!(tdb.flags & TDB_NOMMAP)) {
- tdb.map_ptr = (void *)mmap(NULL, st.st_size,
- tdb.read_only? PROT_READ : PROT_READ|PROT_WRITE,
- MAP_SHARED | MAP_FILE, tdb.fd, 0);
- }
-#endif
+ tdb.device = st.st_dev;
+ tdb.inode = st.st_ino;
+ tdb.locked = calloc(tdb.header.hash_size+1, sizeof(tdb.locked[0]));
+ if (!tdb.locked) goto fail;
+ if (!(tdb.flags & TDB_NOMMAP))
+ tdb.map_ptr = tdb_mmap(st.st_size, tdb.read_only, tdb.fd);
+ if (locked) {
+ tdb_clear_spinlocks(&tdb);
+ tdb_brlock(&tdb, ACTIVE_LOCK, F_UNLCK, F_SETLK);
+ }
+ /* leave this lock in place to indicate it's in use */
+ tdb_brlock(&tdb, ACTIVE_LOCK, F_RDLCK, F_SETLKW);
internal:
- ret = (TDB_CONTEXT *)malloc(sizeof(tdb));
- if (!ret) goto fail;
-
+ if (!(ret = malloc(sizeof(tdb)))) goto fail;
*ret = tdb;
-
-#if TDB_DEBUG
- printf("mapped database of hash_size %u map_size=%u\n",
- hash_size, tdb.map_size);
-#endif
-
tdb_brlock(&tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW);
+ ret->next = tdbs;
+ tdbs = ret;
return ret;
fail:
if (tdb.name) free(tdb.name);
if (tdb.fd != -1) close(tdb.fd);
- if (tdb.map_ptr) munmap(tdb.map_ptr, tdb.map_size);
-
+ if (tdb.map_ptr) tdb_munmap(tdb.map_ptr, tdb.map_size);
return NULL;
}
/* close a database */
int tdb_close(TDB_CONTEXT *tdb)
{
- if (!tdb) return -1;
+ TDB_CONTEXT **i;
+ int ret = 0;
+ if (tdb->map_ptr) {
+ if (tdb->flags & TDB_INTERNAL) free(tdb->map_ptr);
+ else tdb_munmap(tdb->map_ptr, tdb->map_size);
+ }
if (tdb->name) free(tdb->name);
- if (tdb->fd != -1) close(tdb->fd);
+ if (tdb->fd != -1) {
+ ret = close(tdb->fd);
+ }
if (tdb->locked) free(tdb->locked);
+ if (tdb->lockedkeys) free(tdb->lockedkeys);
- if (tdb->map_ptr) {
- if (tdb->flags & TDB_INTERNAL) {
- free(tdb->map_ptr);
- } else {
- munmap(tdb->map_ptr, tdb->map_size);
+ /* Remove from contexts list */
+ for (i = &tdbs; *i; i = &(*i)->next) {
+ if (*i == tdb) {
+ *i = tdb->next;
+ break;
}
- }
+ }
memset(tdb, 0, sizeof(*tdb));
free(tdb);
- return 0;
+ return ret;
}
-
-/* lock one hash chain. This is meant to be used to reduce locking
- contention - it cannot guarantee how many records will be locked */
-int tdb_lockchain(TDB_CONTEXT *tdb, TDB_DATA key)
+/* lock/unlock entire database */
+int tdb_lockall(TDB_CONTEXT *tdb)
{
- if (tdb == NULL) {
-#ifdef TDB_DEBUG
- printf("tdb_lockchain() called with null context\n");
-#endif
- return -1;
- }
+ u32 i;
- return tdb_lock(tdb, BUCKET(tdb_hash(&key)), F_WRLCK);
+ /* There are no locks on read-only dbs */
+ if (tdb->read_only) return TDB_ERRCODE(TDB_ERR_LOCK, -1);
+ if (tdb->lockedkeys) return TDB_ERRCODE(TDB_ERR_NOLOCK, -1);
+ for (i = 0; i < tdb->header.hash_size; i++) tdb_lock(tdb, i, F_WRLCK);
+ return 0;
}
-
-
-/* unlock one hash chain */
-int tdb_unlockchain(TDB_CONTEXT *tdb, TDB_DATA key)
+void tdb_unlockall(TDB_CONTEXT *tdb)
{
- if (tdb == NULL) {
-#ifdef TDB_DEBUG
- printf("tdb_unlockchain() called with null context\n");
-#endif
- return -1;
- }
-
- return tdb_unlock(tdb, BUCKET(tdb_hash(&key)));
+ u32 i;
+ for (i=0; i < tdb->header.hash_size; i++) tdb_unlock(tdb, i, F_WRLCK);
}
-
-#if TDB_DEBUG
-void tdb_printfreelist(TDB_CONTEXT *tdb)
+int tdb_lockkeys(TDB_CONTEXT *tdb, u32 number, TDB_DATA keys[])
{
- tdb_off offset, rec_ptr, last_ptr;
- struct list_struct rec, lastrec, newrec;
-
- tdb_lock(tdb, -1, F_WRLCK);
-
- last_ptr = 0;
- offset = FREELIST_TOP;
-
- /* read in the freelist top */
- if (ofs_read(tdb, offset, &rec_ptr) == -1) {
- return;
- }
-
- printf("freelist top=[0x%08x]\n", rec_ptr );
- while (rec_ptr) {
- if (tdb_read(tdb, rec_ptr, (char *)&rec, sizeof(rec)) == -1) {
- return;
- }
-
- if (rec.magic != TDB_FREE_MAGIC) {
- printf("bad magic 0x%08x in free list\n", rec.magic);
- return;
- }
-
- printf("entry offset=[0x%08x], rec.rec_len = [0x%08x]\n", rec.next, rec.rec_len );
+ u32 i, j, hash;
+
+ /* Can't lock more keys if already locked */
+ if (tdb->lockedkeys) return TDB_ERRCODE(TDB_ERR_NOLOCK, -1);
+ if (!(tdb->lockedkeys = malloc(sizeof(u32) * (number+1))))
+ return TDB_ERRCODE(TDB_ERR_OOM, -1);
+ /* First number in array is # keys */
+ tdb->lockedkeys[0] = number;
+
+ /* Insertion sort by bucket */
+ for (i = 0; i < number; i++) {
+ hash = tdb_hash(&keys[i]);
+ for (j = 0;
+ j < i && BUCKET(tdb->lockedkeys[j+1]) < BUCKET(hash);
+ j++);
+ memmove(&tdb->lockedkeys[j+2], &tdb->lockedkeys[j+1],
+ sizeof(u32) * (i-j));
+ tdb->lockedkeys[j+1] = hash;
+ }
+ /* Finally, lock in order */
+ for (i = 0; i < number; i++) tdb_lock(tdb, i, F_WRLCK);
+ return 0;
+}
- /* move to the next record */
- rec_ptr = rec.next;
- }
+/* Unlock the keys previously locked by tdb_lockkeys() */
+void tdb_unlockkeys(TDB_CONTEXT *tdb)
+{
+ u32 i;
+ for (i = 0; i < tdb->lockedkeys[0]; i++)
+ tdb_unlock(tdb, tdb->lockedkeys[i+1], F_WRLCK);
+ free(tdb->lockedkeys);
+ tdb->lockedkeys = NULL;
+}
- tdb_unlock(tdb, -1);
+/* lock/unlock one hash chain. This is meant to be used to reduce
+ contention - it cannot guarantee how many records will be locked */
+int tdb_chainlock(TDB_CONTEXT *tdb, TDB_DATA key)
+{
+ return tdb_lock(tdb, BUCKET(tdb_hash(&key)), F_WRLCK);
+}
+void tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key)
+{
+ tdb_unlock(tdb, BUCKET(tdb_hash(&key)), F_WRLCK);
}
-#endif
diff --git a/source3/tdb/tdb.h b/source3/tdb/tdb.h
index fd770cc5b9..f09c6453b5 100644
--- a/source3/tdb/tdb.h
+++ b/source3/tdb/tdb.h
@@ -1,3 +1,6 @@
+#ifndef __TDB_H__
+#define __TDB_H__
+
/*
Unix SMB/Netbios implementation.
Version 3.0
@@ -19,73 +22,105 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-typedef unsigned tdb_len;
-typedef unsigned tdb_off;
+#ifdef __cplusplus
+extern "C" {
+#endif
-#define TDB_MAGIC_FOOD "TDB file\n"
-/* this is stored at the front of every database */
-struct tdb_header {
- char magic_food[32]; /* for /etc/magic */
- unsigned version; /* version of the code */
- unsigned hash_size; /* number of hash entries */
- tdb_off reserved[32];
-};
+/* flags to tdb_store() */
+#define TDB_REPLACE 1
+#define TDB_INSERT 2
+#define TDB_MODIFY 3
+
+/* flags for tdb_open() */
+#define TDB_DEFAULT 0 /* just a readability place holder */
+#define TDB_CLEAR_IF_FIRST 1
+#define TDB_INTERNAL 2 /* don't store on disk */
+#define TDB_NOLOCK 4 /* don't do any locking */
+#define TDB_NOMMAP 8 /* don't use mmap */
+#define TDB_CONVERT 16 /* convert endian (internal use) */
+
+#define TDB_ERRCODE(code, ret) ((tdb->ecode = (code)), ret)
+
+/* error codes */
+enum TDB_ERROR {TDB_SUCCESS=0, TDB_ERR_CORRUPT, TDB_ERR_IO, TDB_ERR_LOCK,
+ TDB_ERR_OOM, TDB_ERR_EXISTS, TDB_ERR_NOEXIST, TDB_ERR_NOLOCK };
+
+#ifndef u32
+#define u32 unsigned
+#endif
typedef struct {
char *dptr;
size_t dsize;
} TDB_DATA;
+typedef u32 tdb_len;
+typedef u32 tdb_off;
+
+/* this is stored at the front of every database */
+struct tdb_header {
+ char magic_food[32]; /* for /etc/magic */
+ u32 version; /* version of the code */
+ u32 hash_size; /* number of hash entries */
+ tdb_off rwlocks;
+ tdb_off reserved[31];
+};
+
struct tdb_lock_type {
- unsigned count;
- unsigned ltype;
+ u32 count;
+ u32 ltype;
+};
+
+struct tdb_traverse_lock {
+ struct tdb_traverse_lock *next;
+ u32 off;
+ u32 hash;
};
/* this is the context structure that is returned from a db open */
-typedef struct {
+typedef struct tdb_context {
char *name; /* the name of the database */
void *map_ptr; /* where it is currently mapped */
int fd; /* open file descriptor for the database */
tdb_len map_size; /* how much space has been mapped */
int read_only; /* opened read-only */
- struct tdb_lock_type *locked; /* set if we have a chain locked */
- int ecode; /* error code for last tdb error */
+ struct tdb_lock_type *locked; /* array of chain locks */
+ enum TDB_ERROR ecode; /* error code for last tdb error */
struct tdb_header header; /* a cached copy of the header */
- unsigned flags; /* the flags passed to tdb_open */
+ u32 flags; /* the flags passed to tdb_open */
+ u32 *lockedkeys; /* array of locked keys: first is #keys */
+ struct tdb_traverse_lock travlocks; /* current traversal locks */
+ struct tdb_context *next; /* all tdbs to avoid multiple opens */
+ dev_t device; /* uniquely identifies this tdb */
+ ino_t inode; /* uniquely identifies this tdb */
} TDB_CONTEXT;
-/* flags to tdb_store() */
-#define TDB_REPLACE 1
-#define TDB_INSERT 2
-#define TDB_MODIFY 3
-
-/* flags for tdb_open() */
-#define TDB_CLEAR_IF_FIRST 1
-#define TDB_INTERNAL 2 /* don't store on disk */
-#define TDB_NOLOCK 4 /* don't do any locking */
-#define TDB_NOMMAP 8 /* don't use mmap */
-
-/* error codes */
-enum TDB_ERROR {TDB_SUCCESS=0, TDB_ERR_CORRUPT, TDB_ERR_IO, TDB_ERR_LOCK,
- TDB_ERR_OOM, TDB_ERR_EXISTS, TDB_ERR_NOEXIST };
-
typedef int (*tdb_traverse_func)(TDB_CONTEXT *, TDB_DATA, TDB_DATA, void *);
-#if STANDALONE
TDB_CONTEXT *tdb_open(char *name, int hash_size, int tdb_flags,
int open_flags, mode_t mode);
-char *tdb_error(TDB_CONTEXT *tdb);
-int tdb_writelock(TDB_CONTEXT *tdb);
-int tdb_writeunlock(TDB_CONTEXT *tdb);
+enum TDB_ERROR tdb_error(TDB_CONTEXT *tdb);
+const char *tdb_errorstr(TDB_CONTEXT *tdb);
TDB_DATA tdb_fetch(TDB_CONTEXT *tdb, TDB_DATA key);
int tdb_delete(TDB_CONTEXT *tdb, TDB_DATA key);
int tdb_store(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, int flag);
int tdb_close(TDB_CONTEXT *tdb);
TDB_DATA tdb_firstkey(TDB_CONTEXT *tdb);
TDB_DATA tdb_nextkey(TDB_CONTEXT *tdb, TDB_DATA key);
-int tdb_traverse(TDB_CONTEXT *tdb,
- int (*fn)(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, void *state),
- void *state);
+int tdb_traverse(TDB_CONTEXT *tdb, tdb_traverse_func fn, void *state);
int tdb_exists(TDB_CONTEXT *tdb, TDB_DATA key);
+int tdb_lockkeys(TDB_CONTEXT *tdb, u32 number, TDB_DATA keys[]);
+void tdb_unlockkeys(TDB_CONTEXT *tdb);
+int tdb_lockall(TDB_CONTEXT *tdb);
+void tdb_unlockall(TDB_CONTEXT *tdb);
+
+/* Low level locking functions: use with care */
+int tdb_chainlock(TDB_CONTEXT *tdb, TDB_DATA key);
+void tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key);
+extern TDB_DATA tdb_null;
+#ifdef __cplusplus
+}
#endif
+
+#endif /* tdb.h */
diff --git a/source3/tdb/tdbutil.c b/source3/tdb/tdbutil.c
index 92b8f9cbfb..3f17c0274e 100644
--- a/source3/tdb/tdbutil.c
+++ b/source3/tdb/tdbutil.c
@@ -32,7 +32,7 @@ int tdb_lock_bystring(TDB_CONTEXT *tdb, char *keyval)
key.dptr = keyval;
key.dsize = strlen(keyval)+1;
- return tdb_lockchain(tdb, key);
+ return tdb_chainlock(tdb, key);
}
/* unlock a chain by string */
@@ -43,7 +43,7 @@ int tdb_unlock_bystring(TDB_CONTEXT *tdb, char *keyval)
key.dptr = keyval;
key.dsize = strlen(keyval)+1;
- return tdb_unlockchain(tdb, key);
+ return tdb_chainunlock(tdb, key);
}
/* lock a chain by string key */