From 8626b962a18f0ba292d00e9e95adaac1815a89c9 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 3 Jun 2002 08:10:31 +0000 Subject: [PATCH] Implement GZIP, new tape format, -- see kes03Jun02 git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@33 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/Makefile.in | 2 +- bacula/autoconf/config.h.in | 3 + bacula/autoconf/configure.in | 7 +- bacula/configure | 905 +++++++++++++++++++---------------- bacula/src/dird/backup.c | 10 +- bacula/src/dird/dird_conf.c | 29 +- bacula/src/dird/job.c | 20 +- bacula/src/dird/msgchan.c | 8 +- bacula/src/dird/scheduler.c | 2 +- bacula/src/dird/ua_cmds.c | 1 - bacula/src/dird/ua_dotcmds.c | 1 - bacula/src/dird/ua_output.c | 5 +- bacula/src/dird/ua_prune.c | 4 +- bacula/src/dird/ua_run.c | 26 +- bacula/src/dird/ua_select.c | 2 +- bacula/src/dird/ua_server.c | 1 - bacula/src/dird/verify.c | 20 +- bacula/src/filed/backup.c | 66 ++- bacula/src/filed/job.c | 108 +++-- bacula/src/filed/protos.h | 2 +- bacula/src/filed/restore.c | 78 ++- bacula/src/findlib/find.h | 2 + bacula/src/findlib/match.c | 3 + bacula/src/jcr.h | 20 +- bacula/src/lib/bnet.c | 2 +- bacula/src/lib/jcr.c | 2 +- bacula/src/lib/message.c | 7 +- bacula/src/stored/bextract.c | 32 ++ bacula/src/stored/bls.c | 360 ++++---------- bacula/src/stored/fd_cmds.c | 4 +- bacula/src/stored/job.c | 53 +- bacula/src/stored/label.c | 29 +- bacula/src/stored/record.c | 60 ++- bacula/src/stored/record.h | 7 +- bacula/src/stored/stored.h | 7 +- bacula/src/version.h | 6 +- 36 files changed, 998 insertions(+), 896 deletions(-) diff --git a/bacula/Makefile.in b/bacula/Makefile.in index d6495b358e..4b29146442 100755 --- a/bacula/Makefile.in +++ b/bacula/Makefile.in @@ -142,7 +142,7 @@ clean: distclean: @for I in $(subdirs); do (cd $$I; $(MAKE) $@ || exit 1); done @for I in $(subdirs); do (cd $$I; $(RMF) startit stopit btraceback btraceback.gdb); done - @(cd $(srcdir); $(RMF) *~ config.cache config.h config.log config.status) + @(cd $(srcdir); $(RMF) *~ config.cache config.h config.log config.status config.out) @(cd $(srcdir); $(RMF) Makefile autoconf/Make.common) @(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1) @$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback diff --git a/bacula/autoconf/config.h.in b/bacula/autoconf/config.h.in index 66845723ee..4959b611c4 100644 --- a/bacula/autoconf/config.h.in +++ b/bacula/autoconf/config.h.in @@ -233,6 +233,9 @@ /* Directory for PID files */ #undef _PATH_BACULA_PIDDIR +/* Define if you have zlib */ +#undef HAVE_LIBZ + /* File daemon specif libraries */ #undef FDLIBS diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index d49de02a5f..3986759ad9 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -965,6 +965,7 @@ AC_CHECK_LIB(sun, getpwnam) AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"]) have_zlib=no if test x$FDLIBS = x-lz; then + AC_DEFINE(HAVE_LIBZ) have_zlib=yes fi @@ -1203,7 +1204,7 @@ chmod 755 src/cats/sqlite echo " -Configuration: +Configuration on `date`: Host: ${DISTNAME} ${DISTVER} Bacula version: ${VERSION} (${DATE}) @@ -1235,4 +1236,6 @@ Configuration: enable-gnome: ${support_gnome} gmp support: ${got_gmp} ${GMP_SRC} - " + " > config.out + +cat config.out diff --git a/bacula/configure b/bacula/configure index 5268fbf4f6..18970ed46e 100755 --- a/bacula/configure +++ b/bacula/configure @@ -1089,12 +1089,63 @@ else fi fi +for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat > conftest.$ac_ext < +$ac_declaration +int main() { +exit (42); +; return 0; } +EOF +if { (eval echo configure:1111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + continue +fi +rm -f conftest* + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +done +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + + 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:1095: checking whether $CC and cc understand -c and -o together" >&5 +echo "configure:1146: 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:1098: checking whether cc understands -c and -o together" >&5 +echo "configure:1149: 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]/_/'`" @@ -1106,16 +1157,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:1110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:1111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; +if { (eval echo configure:1161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1162: \"$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:1116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1167: \"$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:1118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:1119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; + if { (eval echo configure:1169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then # cc works too. : @@ -1141,7 +1192,7 @@ EOF fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1145: checking how to run the C preprocessor" >&5 +echo "configure:1196: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1156,13 +1207,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1217: \"$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 : @@ -1173,13 +1224,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1234: \"$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 : @@ -1190,13 +1241,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1251: \"$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 : @@ -1222,13 +1273,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1226: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:1277: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -1246,7 +1297,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -1287,7 +1338,7 @@ fi # 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:1291: checking for a BSD compatible install" >&5 +echo "configure:1342: 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 @@ -1342,7 +1393,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # 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:1346: checking for $ac_word" >&5 +echo "configure:1397: 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 @@ -1372,7 +1423,7 @@ fi # Extract the first word of "mv", so it can be a program name with args. set dummy mv; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1376: checking for $ac_word" >&5 +echo "configure:1427: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1408,7 +1459,7 @@ fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1412: checking for $ac_word" >&5 +echo "configure:1463: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1444,7 +1495,7 @@ fi # Extract the first word of "cp", so it can be a program name with args. set dummy cp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1448: checking for $ac_word" >&5 +echo "configure:1499: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1480,7 +1531,7 @@ fi # Extract the first word of "sed", so it can be a program name with args. set dummy sed; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1484: checking for $ac_word" >&5 +echo "configure:1535: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1516,7 +1567,7 @@ fi # Extract the first word of "awk", so it can be a program name with args. set dummy awk; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1520: checking for $ac_word" >&5 +echo "configure:1571: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1552,7 +1603,7 @@ fi # Extract the first word of "echo", so it can be a program name with args. set dummy echo; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1556: checking for $ac_word" >&5 +echo "configure:1607: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ECHO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1588,7 +1639,7 @@ fi # Extract the first word of "cmp", so it can be a program name with args. set dummy cmp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1592: checking for $ac_word" >&5 +echo "configure:1643: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1624,7 +1675,7 @@ fi # Extract the first word of "tbl", so it can be a program name with args. set dummy tbl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1628: checking for $ac_word" >&5 +echo "configure:1679: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TBL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1660,7 +1711,7 @@ fi # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1664: checking for $ac_word" >&5 +echo "configure:1715: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1696,7 +1747,7 @@ fi # 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:1700: checking for $ac_word" >&5 +echo "configure:1751: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1732,7 +1783,7 @@ fi # Extract the first word of "openssl", so it can be a program name with args. set dummy openssl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1736: checking for $ac_word" >&5 +echo "configure:1787: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_OPENSSL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1780,14 +1831,14 @@ MAKE_SHELL=/bin/sh echo $ac_n "checking for Operating System""... $ac_c" 1>&6 -echo "configure:1784: checking for Operating System" >&5 +echo "configure:1835: checking for Operating System" >&5 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:1786: checking for Cygwin environment" >&5 +echo "configure:1837: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -2089,7 +2140,7 @@ echo "$ac_t""" "" 1>&6 # ----------------------------------------------------------- # ---------------------------------------------------------- echo $ac_n "checking for Operating System Distribution""... $ac_c" 1>&6 -echo "configure:2093: checking for Operating System Distribution" >&5 +echo "configure:2144: checking for Operating System Distribution" >&5 if test "x$DISTNAME" != "x" then echo "distname set to $DISTNAME" @@ -2203,7 +2254,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:2207: checking for $ac_word" >&5 +echo "configure:2258: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2333,7 +2384,7 @@ fi # Extract the first word of "gnome-config", so it can be a program name with args. set dummy gnome-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2337: checking for $ac_word" >&5 +echo "configure:2388: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2370,7 +2421,7 @@ fi no_gnome_config="yes" else echo $ac_n "checking if $GNOME_CONFIG works""... $ac_c" 1>&6 -echo "configure:2374: checking if $GNOME_CONFIG works" >&5 +echo "configure:2425: checking if $GNOME_CONFIG works" >&5 if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then echo "$ac_t""yes" 1>&6 @@ -2378,7 +2429,7 @@ echo "configure:2374: checking if $GNOME_CONFIG works" >&5 # Extract the first word of "orbit-config", so it can be a program name with args. set dummy orbit-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2382: checking for $ac_word" >&5 +echo "configure:2433: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2414,7 +2465,7 @@ fi # Extract the first word of "orbit-idl", so it can be a program name with args. set dummy orbit-idl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2418: checking for $ac_word" >&5 +echo "configure:2469: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_IDL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2448,7 +2499,7 @@ else fi echo $ac_n "checking for working ORBit environment""... $ac_c" 1>&6 -echo "configure:2452: checking for working ORBit environment" >&5 +echo "configure:2503: checking for working ORBit environment" >&5 if eval "test \"`echo '$''{'gnome_cv_orbit_found'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2484,7 +2535,7 @@ fi fi echo $ac_n "checking for gnorba libraries""... $ac_c" 1>&6 -echo "configure:2488: checking for gnorba libraries" >&5 +echo "configure:2539: checking for gnorba libraries" >&5 if eval "test \"`echo '$''{'gnome_cv_gnorba_found'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2548,7 +2599,7 @@ fi if test "$no_gnome_config" = "yes"; then echo $ac_n "checking for gnomeConf.sh file in $gnome_prefix""... $ac_c" 1>&6 -echo "configure:2552: checking for gnomeConf.sh file in $gnome_prefix" >&5 +echo "configure:2603: checking for gnomeConf.sh file in $gnome_prefix" >&5 if test -f $gnome_prefix/gnomeConf.sh; then echo "$ac_t""found" 1>&6 echo "loading gnome configuration from" \ @@ -2568,7 +2619,7 @@ echo "configure:2552: checking for gnomeConf.sh file in $gnome_prefix" >&5 n="" for i in $n; do echo $ac_n "checking extra library \"$i\"""... $ac_c" 1>&6 -echo "configure:2572: checking extra library \"$i\"" >&5 +echo "configure:2623: checking extra library \"$i\"" >&5 case $i in applets) @@ -2649,17 +2700,17 @@ if test "${with_readline+set}" = set; then fi ac_safe=`echo "$with_readline/readline.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $with_readline/readline.h""... $ac_c" 1>&6 -echo "configure:2653: checking for $with_readline/readline.h" >&5 +echo "configure:2704: checking for $with_readline/readline.h" >&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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2714: \"$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* @@ -2698,17 +2749,17 @@ else # check for standard readline library ac_safe=`echo "/usr/include/readline/readline.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for /usr/include/readline/readline.h""... $ac_c" 1>&6 -echo "configure:2702: checking for /usr/include/readline/readline.h" >&5 +echo "configure:2753: checking for /usr/include/readline/readline.h" >&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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2712: \"$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* @@ -2765,12 +2816,12 @@ MAKE_SHELL=/bin/sh echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 -echo "configure:2769: checking whether stat file-mode macros are broken" >&5 +echo "configure:2820: checking whether stat file-mode macros are broken" >&5 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2825,12 +2876,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:2829: checking for $ac_hdr that defines DIR" >&5 +echo "configure:2880: 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 < #include <$ac_hdr> @@ -2838,7 +2889,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:2842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2863,7 +2914,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:2867: checking for opendir in -ldir" >&5 +echo "configure:2918: 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 @@ -2871,7 +2922,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2937: \"$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 @@ -2904,7 +2955,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2908: checking for opendir in -lx" >&5 +echo "configure:2959: 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 @@ -2912,7 +2963,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2978: \"$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 @@ -2949,12 +3000,12 @@ fi for ac_func in strcasecmp select setenv putenv tcgetattr setlocale lstat lchown do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2953: checking for $ac_func" >&5 +echo "configure:3004: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3032: \"$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 @@ -3007,12 +3058,12 @@ done # EXTRAOBJ="$EXTRAOBJ lib/getopt.o lib/getopt1.o"]) echo $ac_n "checking for getopt_long""... $ac_c" 1>&6 -echo "configure:3011: checking for getopt_long" >&5 +echo "configure:3062: checking for getopt_long" >&5 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getopt_long=yes" else @@ -3060,7 +3111,7 @@ fi echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 -echo "configure:3064: checking for working strcoll" >&5 +echo "configure:3115: checking for working strcoll" >&5 if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3068,7 +3119,7 @@ else ac_cv_func_strcoll_works=no else cat > conftest.$ac_ext < main () @@ -3078,7 +3129,7 @@ main () strcoll ("123", "456") >= 0); } EOF -if { (eval echo configure:3082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_strcoll_works=yes else @@ -3106,17 +3157,17 @@ for ac_hdr in varargs.h \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3110: checking for $ac_hdr" >&5 +echo "configure:3161: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3171: \"$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* @@ -3168,17 +3219,17 @@ if test "${with_gmp+set}" = set; then fi ac_safe=`echo "$with_gmp/gmp.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $with_gmp/gmp.h""... $ac_c" 1>&6 -echo "configure:3172: checking for $with_gmp/gmp.h" >&5 +echo "configure:3223: checking for $with_gmp/gmp.h" >&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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3233: \"$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* @@ -3217,17 +3268,17 @@ else # check for standard gmp library ac_safe=`echo "/usr/include/gmp.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for /usr/include/gmp.h""... $ac_c" 1>&6 -echo "configure:3221: checking for /usr/include/gmp.h" >&5 +echo "configure:3272: checking for /usr/include/gmp.h" >&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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3282: \"$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* @@ -3305,17 +3356,17 @@ if test "${with_cweb+set}" = set; then fi ac_safe=`echo "$with_cweb/cweb.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $with_cweb/cweb.h""... $ac_c" 1>&6 -echo "configure:3309: checking for $with_cweb/cweb.h" >&5 +echo "configure:3360: checking for $with_cweb/cweb.h" >&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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3370: \"$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* @@ -3354,17 +3405,17 @@ else # check for standard cweb library ac_safe=`echo "/usr/include/cweb.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for /usr/include/cweb.h""... $ac_c" 1>&6 -echo "configure:3358: checking for /usr/include/cweb.h" >&5 +echo "configure:3409: checking for /usr/include/cweb.h" >&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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3419: \"$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* @@ -3435,9 +3486,9 @@ if test "${with_tcp_wrappers+set}" = set; then saved_LIBS="$LIBS" LIBS="$LIBS -lwrap -lnsl" echo $ac_n "checking for libwrap""... $ac_c" 1>&6 -echo "configure:3439: checking for libwrap" >&5 +echo "configure:3490: checking for libwrap" >&5 cat > conftest.$ac_ext < int deny_severity = 0; @@ -3447,7 +3498,7 @@ int main() { hosts_access(req); ; return 0; } EOF -if { (eval echo configure:3451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -3714,7 +3765,7 @@ fi have_db=no db_name=none echo $ac_n "checking for MySQL support""... $ac_c" 1>&6 -echo "configure:3718: checking for MySQL support" >&5 +echo "configure:3769: checking for MySQL support" >&5 # Check whether --with-mysql or --without-mysql was given. if test "${with_mysql+set}" = set; then withval="$with_mysql" @@ -3796,7 +3847,7 @@ fi have_db=no db_name=none echo $ac_n "checking for SQLite support""... $ac_c" 1>&6 -echo "configure:3800: checking for SQLite support" >&5 +echo "configure:3851: checking for SQLite support" >&5 # Check whether --with-sqlite or --without-sqlite was given. if test "${with_sqlite+set}" = set; then withval="$with_sqlite" @@ -3869,19 +3920,19 @@ fi echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:3873: checking for mingw32 environment" >&5 +echo "configure:3924: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -3900,7 +3951,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:3904: checking for executable suffix" >&5 +echo "configure:3955: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3910,7 +3961,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:3914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:3965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -3938,7 +3989,7 @@ ac_exeext=$EXEEXT # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:3942: checking for X" >&5 +echo "configure:3993: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -4000,12 +4051,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4060: \"$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* @@ -4074,14 +4125,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -4187,17 +4238,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:4191: checking whether -R must be followed by a space" >&5 +echo "configure:4242: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -4213,14 +4264,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -4252,7 +4303,7 @@ rm -f conftest* # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:4256: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:4307: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4260,7 +4311,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4326: \"$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 @@ -4293,7 +4344,7 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:4297: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:4348: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4301,7 +4352,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4367: \"$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 @@ -4341,12 +4392,12 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:4345: checking for gethostbyname" >&5 +echo "configure:4396: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -4390,7 +4441,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:4394: checking for gethostbyname in -lnsl" >&5 +echo "configure:4445: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4398,7 +4449,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4464: \"$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 @@ -4439,12 +4490,12 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:4443: checking for connect" >&5 +echo "configure:4494: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -4488,7 +4539,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:4492: checking for connect in -lsocket" >&5 +echo "configure:4543: 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 @@ -4496,7 +4547,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4562: \"$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 @@ -4531,12 +4582,12 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:4535: checking for remove" >&5 +echo "configure:4586: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -4580,7 +4631,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:4584: checking for remove in -lposix" >&5 +echo "configure:4635: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4588,7 +4639,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4654: \"$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 @@ -4623,12 +4674,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:4627: checking for shmat" >&5 +echo "configure:4678: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -4672,7 +4723,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:4676: checking for shmat in -lipc" >&5 +echo "configure:4727: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4680,7 +4731,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4746: \"$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 @@ -4724,7 +4775,7 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:4728: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:4779: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4732,7 +4783,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4798: \"$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 @@ -4788,17 +4839,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4792: checking for $ac_hdr" >&5 +echo "configure:4843: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4853: \"$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* @@ -4825,12 +4876,12 @@ fi done echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4829: checking for ANSI C header files" >&5 +echo "configure:4880: 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 < #include @@ -4838,7 +4889,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4893: \"$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* @@ -4855,7 +4906,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 @@ -4873,7 +4924,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 @@ -4894,7 +4945,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4905,7 +4956,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -4929,19 +4980,19 @@ EOF fi echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6 -echo "configure:4933: checking whether sys/types.h defines makedev" >&5 +echo "configure:4984: checking whether sys/types.h defines makedev" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return makedev(0, 0); ; return 0; } EOF -if { (eval echo configure:4945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_sys_types_h_makedev=yes else @@ -4959,17 +5010,17 @@ echo "$ac_t""$ac_cv_header_sys_types_h_makedev" 1>&6 if test $ac_cv_header_sys_types_h_makedev = no; then ac_safe=`echo "sys/mkdev.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&6 -echo "configure:4963: checking for sys/mkdev.h" >&5 +echo "configure:5014: checking for sys/mkdev.h" >&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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5024: \"$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* @@ -4997,17 +5048,17 @@ fi if test $ac_cv_header_sys_mkdev_h = no; then ac_safe=`echo "sys/sysmacros.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6 -echo "configure:5001: checking for sys/sysmacros.h" >&5 +echo "configure:5052: checking for sys/sysmacros.h" >&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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5062: \"$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* @@ -5039,12 +5090,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:5043: checking for $ac_hdr that defines DIR" >&5 +echo "configure:5094: 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 < #include <$ac_hdr> @@ -5052,7 +5103,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:5056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -5077,7 +5128,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:5081: checking for opendir in -ldir" >&5 +echo "configure:5132: 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 @@ -5085,7 +5136,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5151: \"$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 @@ -5118,7 +5169,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:5122: checking for opendir in -lx" >&5 +echo "configure:5173: 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 @@ -5126,7 +5177,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5192: \"$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 @@ -5160,12 +5211,12 @@ fi fi echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 -echo "configure:5164: checking whether stat file-mode macros are broken" >&5 +echo "configure:5215: checking whether stat file-mode macros are broken" >&5 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5216,12 +5267,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:5220: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:5271: 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 < #include @@ -5237,7 +5288,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:5241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -5258,12 +5309,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:5262: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:5313: 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 < #include @@ -5272,7 +5323,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:5276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -5293,12 +5344,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:5297: checking for st_blksize in struct stat" >&5 +echo "configure:5348: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5306,7 +5357,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:5310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -5327,12 +5378,12 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:5331: checking for st_blocks in struct stat" >&5 +echo "configure:5382: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5340,7 +5391,7 @@ int main() { struct stat s; s.st_blocks; ; return 0; } EOF -if { (eval echo configure:5344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blocks=yes else @@ -5363,12 +5414,12 @@ else fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:5367: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:5418: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5376,7 +5427,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:5380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -5397,12 +5448,12 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:5401: checking for tm_zone in struct tm" >&5 +echo "configure:5452: checking for tm_zone in struct tm" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> @@ -5410,7 +5461,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:5414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -5430,12 +5481,12 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:5434: checking for tzname" >&5 +echo "configure:5485: checking for tzname" >&5 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ @@ -5445,7 +5496,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:5449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -5472,12 +5523,12 @@ fi # be POSIX, POSIX_C, ALL, HPUX or whatever, depending on the machine. echo $ac_n "checking for utime.h""... $ac_c" 1>&6 -echo "configure:5476: checking for utime.h" >&5 +echo "configure:5527: checking for utime.h" >&5 if eval "test \"`echo '$''{'tar_cv_header_utime_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5486,7 +5537,7 @@ int main() { struct utimbuf foo ; return 0; } EOF -if { (eval echo configure:5490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tar_cv_header_utime_h=yes else @@ -5505,12 +5556,12 @@ EOF echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:5509: checking for working const" >&5 +echo "configure:5560: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -5582,17 +5633,17 @@ fi echo $ac_n "checking how to get filesystem type""... $ac_c" 1>&6 -echo "configure:5586: checking how to get filesystem type" >&5 +echo "configure:5637: checking how to get filesystem type" >&5 fstype=no # The order of these tests is important. cat > conftest.$ac_ext < #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5647: \"$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* @@ -5608,13 +5659,13 @@ fi rm -f conftest* if test $fstype = no; then cat > conftest.$ac_ext < #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5669: \"$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* @@ -5631,13 +5682,13 @@ rm -f conftest* fi if test $fstype = no; then cat > conftest.$ac_ext < #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5692: \"$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* @@ -5654,12 +5705,12 @@ rm -f conftest* fi if test $fstype = no; then cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5714: \"$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* @@ -5676,7 +5727,7 @@ rm -f conftest* fi if test $fstype = no; then cat > conftest.$ac_ext < EOF @@ -5693,13 +5744,13 @@ rm -f conftest* fi if test $fstype = no; then cat > conftest.$ac_ext < #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5754: \"$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* @@ -5717,12 +5768,12 @@ fi echo "$ac_t""$fstype" 1>&6 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:5721: checking return type of signal handlers" >&5 +echo "configure:5772: 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 < #include @@ -5739,7 +5790,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:5743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -5759,13 +5810,13 @@ EOF echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6 -echo "configure:5763: checking for type of signal functions" >&5 +echo "configure:5814: checking for type of signal functions" >&5 if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -5778,7 +5829,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* bash_cv_signal_vintage=posix else @@ -5787,7 +5838,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < int main() { @@ -5797,7 +5848,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* bash_cv_signal_vintage=4.2bsd else @@ -5806,7 +5857,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -5819,7 +5870,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* bash_cv_signal_vintage=svr3 else @@ -5858,12 +5909,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:5862: checking for mode_t" >&5 +echo "configure:5913: 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 < #if STDC_HEADERS @@ -5891,12 +5942,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5895: checking for uid_t in sys/types.h" >&5 +echo "configure:5946: 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 @@ -5925,12 +5976,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:5929: checking for size_t" >&5 +echo "configure:5980: 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 < #if STDC_HEADERS @@ -5958,12 +6009,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:5962: checking for pid_t" >&5 +echo "configure:6013: 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 < #if STDC_HEADERS @@ -5991,12 +6042,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:5995: checking for off_t" >&5 +echo "configure:6046: 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 < #if STDC_HEADERS @@ -6024,12 +6075,12 @@ EOF fi echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:6028: checking for ino_t" >&5 +echo "configure:6079: 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 < #if STDC_HEADERS @@ -6057,12 +6108,12 @@ EOF fi echo $ac_n "checking for dev_t""... $ac_c" 1>&6 -echo "configure:6061: checking for dev_t" >&5 +echo "configure:6112: checking for dev_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_dev_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -6090,12 +6141,12 @@ EOF fi echo $ac_n "checking for daddr_t""... $ac_c" 1>&6 -echo "configure:6094: checking for daddr_t" >&5 +echo "configure:6145: checking for daddr_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_daddr_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -6123,12 +6174,12 @@ EOF fi echo $ac_n "checking for major_t""... $ac_c" 1>&6 -echo "configure:6127: checking for major_t" >&5 +echo "configure:6178: checking for major_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_major_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -6156,12 +6207,12 @@ EOF fi echo $ac_n "checking for minor_t""... $ac_c" 1>&6 -echo "configure:6160: checking for minor_t" >&5 +echo "configure:6211: checking for minor_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_minor_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -6189,12 +6240,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:6193: checking for ssize_t" >&5 +echo "configure:6244: 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 < #if STDC_HEADERS @@ -6222,12 +6273,12 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:6226: checking for st_blocks in struct stat" >&5 +echo "configure:6277: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -6235,7 +6286,7 @@ int main() { struct stat s; s.st_blocks; ; return 0; } EOF -if { (eval echo configure:6239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blocks=yes else @@ -6258,12 +6309,12 @@ else fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:6262: checking for st_rdev in struct stat" >&5 +echo "configure:6313: 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 < #include @@ -6271,7 +6322,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:6275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -6292,12 +6343,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:6296: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:6347: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -6305,7 +6356,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:6309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -6326,12 +6377,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:6330: checking for working const" >&5 +echo "configure:6381: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -6403,7 +6454,7 @@ fi echo $ac_n "checking size of char""... $ac_c" 1>&6 -echo "configure:6407: checking size of char" >&5 +echo "configure:6458: checking size of char" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6411,18 +6462,18 @@ else ac_cv_sizeof_char=1 else cat > conftest.$ac_ext < -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(char)); - exit(0); + return(0); } EOF -if { (eval echo configure:6426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_char=`cat conftestval` else @@ -6442,7 +6493,7 @@ EOF echo $ac_n "checking size of short int""... $ac_c" 1>&6 -echo "configure:6446: checking size of short int" >&5 +echo "configure:6497: checking size of short int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6450,18 +6501,18 @@ else ac_cv_sizeof_short_int=2 else cat > conftest.$ac_ext < -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(short int)); - exit(0); + return(0); } EOF -if { (eval echo configure:6465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short_int=`cat conftestval` else @@ -6481,7 +6532,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:6485: checking size of int" >&5 +echo "configure:6536: 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 @@ -6489,18 +6540,18 @@ else ac_cv_sizeof_int=4 else cat > conftest.$ac_ext < -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(int)); - exit(0); + return(0); } EOF -if { (eval echo configure:6504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6555: \"$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 @@ -6520,7 +6571,7 @@ EOF echo $ac_n "checking size of long int""... $ac_c" 1>&6 -echo "configure:6524: checking size of long int" >&5 +echo "configure:6575: checking size of long int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6528,18 +6579,18 @@ else ac_cv_sizeof_long_int=4 else cat > conftest.$ac_ext < -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(long int)); - exit(0); + return(0); } EOF -if { (eval echo configure:6543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_int=`cat conftestval` else @@ -6559,7 +6610,7 @@ EOF echo $ac_n "checking size of long long int""... $ac_c" 1>&6 -echo "configure:6563: checking size of long long int" >&5 +echo "configure:6614: checking size of long long int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6567,18 +6618,18 @@ else ac_cv_sizeof_long_long_int=8 else cat > conftest.$ac_ext < -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(long long int)); - exit(0); + return(0); } EOF -if { (eval echo configure:6582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long_int=`cat conftestval` else @@ -6598,7 +6649,7 @@ EOF echo $ac_n "checking size of int *""... $ac_c" 1>&6 -echo "configure:6602: checking size of int *" >&5 +echo "configure:6653: checking size of int *" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6606,18 +6657,18 @@ else ac_cv_sizeof_int_p=4 else cat > conftest.$ac_ext < -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(int *)); - exit(0); + return(0); } EOF -if { (eval echo configure:6621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int_p=`cat conftestval` else @@ -6639,20 +6690,20 @@ EOF # Check for sys/types.h types echo $ac_n "checking for u_int type""... $ac_c" 1>&6 -echo "configure:6643: checking for u_int type" >&5 +echo "configure:6694: checking for u_int type" >&5 if eval "test \"`echo '$''{'ac_cv_have_u_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { u_int a; a = 1; ; return 0; } EOF -if { (eval echo configure:6656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_u_int="yes" else @@ -6676,20 +6727,20 @@ EOF fi echo $ac_n "checking for intmax_t type""... $ac_c" 1>&6 -echo "configure:6680: checking for intmax_t type" >&5 +echo "configure:6731: checking for intmax_t type" >&5 if eval "test \"`echo '$''{'ac_cv_have_intmax_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { intmax_t a; a = 1; ; return 0; } EOF -if { (eval echo configure:6693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_intmax_t="yes" else @@ -6698,14 +6749,14 @@ else rm -rf conftest* cat > conftest.$ac_ext < int main() { intmax_t a; a = 1; ; return 0; } EOF -if { (eval echo configure:6709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_intmax_t="yes" else @@ -6735,20 +6786,20 @@ fi echo $ac_n "checking for u_intmax_t type""... $ac_c" 1>&6 -echo "configure:6739: checking for u_intmax_t type" >&5 +echo "configure:6790: checking for u_intmax_t type" >&5 if eval "test \"`echo '$''{'ac_cv_have_u_intmax_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { u_intmax_t a; a = 1; ; return 0; } EOF -if { (eval echo configure:6752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_u_intmax_t="yes" else @@ -6757,14 +6808,14 @@ else rm -rf conftest* cat > conftest.$ac_ext < int main() { u_intmax_t a; a = 1; ; return 0; } EOF -if { (eval echo configure:6768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_u_intmax_t="yes" else @@ -6793,20 +6844,20 @@ fi echo $ac_n "checking for intXX_t types""... $ac_c" 1>&6 -echo "configure:6797: checking for intXX_t types" >&5 +echo "configure:6848: checking for intXX_t types" >&5 if eval "test \"`echo '$''{'ac_cv_have_intxx_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int8_t a; int16_t b; int32_t c; a = b = c = 1; ; return 0; } EOF -if { (eval echo configure:6810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_intxx_t="yes" else @@ -6830,20 +6881,20 @@ EOF fi echo $ac_n "checking for int64_t type""... $ac_c" 1>&6 -echo "configure:6834: checking for int64_t type" >&5 +echo "configure:6885: checking for int64_t type" >&5 if eval "test \"`echo '$''{'ac_cv_have_int64_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int64_t a; a = 1; ; return 0; } EOF -if { (eval echo configure:6847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_int64_t="yes" else @@ -6867,20 +6918,20 @@ EOF fi echo $ac_n "checking for u_intXX_t types""... $ac_c" 1>&6 -echo "configure:6871: checking for u_intXX_t types" >&5 +echo "configure:6922: checking for u_intXX_t types" >&5 if eval "test \"`echo '$''{'ac_cv_have_u_intxx_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1; ; return 0; } EOF -if { (eval echo configure:6884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_u_intxx_t="yes" else @@ -6904,20 +6955,20 @@ EOF fi echo $ac_n "checking for u_int64_t types""... $ac_c" 1>&6 -echo "configure:6908: checking for u_int64_t types" >&5 +echo "configure:6959: checking for u_int64_t types" >&5 if eval "test \"`echo '$''{'ac_cv_have_u_int64_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { u_int64_t a; a = 1; ; return 0; } EOF -if { (eval echo configure:6921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_u_int64_t="yes" else @@ -6944,9 +6995,9 @@ if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \ test "x$ac_cv_header_sys_bitypes_h" = "xyes") then echo $ac_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h""... $ac_c" 1>&6 -echo "configure:6948: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5 +echo "configure:6999: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5 cat > conftest.$ac_ext < int main() { @@ -6955,7 +7006,7 @@ int main() { a = b = c = e = f = g = 1; ; return 0; } EOF -if { (eval echo configure:6959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_U_INTXX_T 1 @@ -6982,13 +7033,13 @@ fi if test -z "$have_u_intxx_t" ; then echo $ac_n "checking for uintXX_t types""... $ac_c" 1>&6 -echo "configure:6986: checking for uintXX_t types" >&5 +echo "configure:7037: checking for uintXX_t types" >&5 if eval "test \"`echo '$''{'ac_cv_have_uintxx_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -6996,7 +7047,7 @@ int main() { uint32_t c; a = b = c = 1; ; return 0; } EOF -if { (eval echo configure:7000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_uintxx_t="yes" else @@ -7036,12 +7087,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7040: checking for $ac_func" >&5 +echo "configure:7091: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7119: \"$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 @@ -7094,12 +7145,12 @@ done for ac_func in fchdir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7098: checking for $ac_func" >&5 +echo "configure:7149: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7177: \"$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 @@ -7153,12 +7204,12 @@ done for ac_func in snprintf vsnprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7157: checking for $ac_func" >&5 +echo "configure:7208: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7236: \"$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 @@ -7209,12 +7260,12 @@ done for ac_func in localtime_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7213: checking for $ac_func" >&5 +echo "configure:7264: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7292: \"$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 @@ -7268,12 +7319,12 @@ done for ac_func in readdir_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7272: checking for $ac_func" >&5 +echo "configure:7323: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7351: \"$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 @@ -7326,12 +7377,12 @@ done # Find where sockets are (especially for Solaris) echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:7330: checking for socket" >&5 +echo "configure:7381: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -7372,7 +7423,7 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lxnet""... $ac_c" 1>&6 -echo "configure:7376: checking for socket in -lxnet" >&5 +echo "configure:7427: checking for socket in -lxnet" >&5 ac_lib_var=`echo xnet'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7380,7 +7431,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lxnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7446: \"$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 @@ -7419,7 +7470,7 @@ else fi echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:7423: checking for socket in -lsocket" >&5 +echo "configure:7474: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7427,7 +7478,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7493: \"$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 @@ -7466,7 +7517,7 @@ else fi echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6 -echo "configure:7470: checking for socket in -linet" >&5 +echo "configure:7521: checking for socket in -linet" >&5 ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7474,7 +7525,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7540: \"$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 @@ -7517,12 +7568,12 @@ fi # If resolver functions are not in libc check for -lnsl or -lresolv. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:7521: checking for gethostbyname" >&5 +echo "configure:7572: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -7563,7 +7614,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:7567: checking for gethostbyname in -lnsl" >&5 +echo "configure:7618: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7571,7 +7622,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7637: \"$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 @@ -7610,7 +7661,7 @@ else fi echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6 -echo "configure:7614: checking for gethostbyname in -lresolv" >&5 +echo "configure:7665: checking for gethostbyname in -lresolv" >&5 ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7618,7 +7669,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7684: \"$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 @@ -7661,12 +7712,12 @@ fi echo $ac_n "checking for strftime""... $ac_c" 1>&6 -echo "configure:7665: checking for strftime" >&5 +echo "configure:7716: checking for strftime" >&5 if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strftime=yes" else @@ -7711,7 +7762,7 @@ else echo "$ac_t""no" 1>&6 # strftime is in -lintl on SCO UNIX. echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6 -echo "configure:7715: checking for strftime in -lintl" >&5 +echo "configure:7766: checking for strftime in -lintl" >&5 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7719,7 +7770,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7785: \"$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 @@ -7757,12 +7808,12 @@ fi fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:7761: checking for vprintf" >&5 +echo "configure:7812: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -7809,12 +7860,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:7813: checking for _doprnt" >&5 +echo "configure:7864: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -7864,19 +7915,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:7868: checking for working alloca.h" >&5 +echo "configure:7919: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:7880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -7897,12 +7948,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:7901: checking for alloca" >&5 +echo "configure:7952: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -7962,12 +8013,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:7966: checking whether alloca needs Cray hooks" >&5 +echo "configure:8017: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7996: checking for $ac_func" >&5 +echo "configure:8047: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8075: \"$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 @@ -8047,7 +8098,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:8051: checking stack direction for C alloca" >&5 +echo "configure:8102: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8055,7 +8106,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -8097,7 +8148,7 @@ fi # getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware. echo $ac_n "checking for getmntent in -lsun""... $ac_c" 1>&6 -echo "configure:8101: checking for getmntent in -lsun" >&5 +echo "configure:8152: checking for getmntent in -lsun" >&5 ac_lib_var=`echo sun'_'getmntent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8105,7 +8156,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsun $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8171: \"$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 @@ -8135,7 +8186,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for getmntent in -lseq""... $ac_c" 1>&6 -echo "configure:8139: checking for getmntent in -lseq" >&5 +echo "configure:8190: checking for getmntent in -lseq" >&5 ac_lib_var=`echo seq'_'getmntent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8143,7 +8194,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lseq $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8209: \"$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 @@ -8173,7 +8224,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for getmntent in -lgen""... $ac_c" 1>&6 -echo "configure:8177: checking for getmntent in -lgen" >&5 +echo "configure:8228: checking for getmntent in -lgen" >&5 ac_lib_var=`echo gen'_'getmntent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8181,7 +8232,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8247: \"$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 @@ -8217,12 +8268,12 @@ fi fi echo $ac_n "checking for getmntent""... $ac_c" 1>&6 -echo "configure:8221: checking for getmntent" >&5 +echo "configure:8272: checking for getmntent" >&5 if eval "test \"`echo '$''{'ac_cv_func_getmntent'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getmntent=yes" else @@ -8268,7 +8319,7 @@ else fi echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6 -echo "configure:8272: checking whether closedir returns void" >&5 +echo "configure:8323: checking whether closedir returns void" >&5 if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8276,13 +8327,13 @@ else ac_cv_func_closedir_void=yes else cat > conftest.$ac_ext < #include <$ac_header_dirent> int closedir(); main() { exit(closedir(opendir(".")) != 0); } 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:8337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_closedir_void=no else @@ -8305,7 +8356,7 @@ EOF fi echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:8309: checking whether setpgrp takes no argument" >&5 +echo "configure:8360: checking whether setpgrp takes no argument" >&5 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8313,7 +8364,7 @@ else { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_setpgrp_void=no else @@ -8356,7 +8407,7 @@ EOF fi echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6 -echo "configure:8360: checking for working fnmatch" >&5 +echo "configure:8411: checking for working fnmatch" >&5 if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8367,11 +8418,11 @@ if test "$cross_compiling" = yes; then ac_cv_func_fnmatch_works=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_fnmatch_works=yes else @@ -8396,7 +8447,7 @@ fi echo $ac_n "checking for setlocale in -lxpg4""... $ac_c" 1>&6 -echo "configure:8400: checking for setlocale in -lxpg4" >&5 +echo "configure:8451: checking for setlocale in -lxpg4" >&5 ac_lib_var=`echo xpg4'_'setlocale | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8404,7 +8455,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lxpg4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8470: \"$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 @@ -8438,7 +8489,7 @@ fi echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6 -echo "configure:8442: checking for getpwnam in -lsun" >&5 +echo "configure:8493: checking for getpwnam in -lsun" >&5 ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8446,7 +8497,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsun $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8512: \"$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 @@ -8485,7 +8536,7 @@ else fi echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6 -echo "configure:8489: checking for deflate in -lz" >&5 +echo "configure:8540: checking for deflate in -lz" >&5 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8493,7 +8544,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8559: \"$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 @@ -8526,12 +8577,16 @@ fi have_zlib=no if test x$FDLIBS = x-lz; then + cat >> confdefs.h <<\EOF +#define HAVE_LIBZ 1 +EOF + have_zlib=yes fi PTHREAD_LIB="" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:8535: checking for pthread_create in -lpthread" >&5 +echo "configure:8590: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8539,7 +8594,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8609: \"$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 @@ -8569,7 +8624,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:8573: checking for pthread_create in -lpthreads" >&5 +echo "configure:8628: checking for pthread_create in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8577,7 +8632,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8647: \"$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 @@ -8607,7 +8662,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:8611: checking for pthread_create in -lc_r" >&5 +echo "configure:8666: checking for pthread_create in -lc_r" >&5 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8615,7 +8670,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8685: \"$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 @@ -8645,12 +8700,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create""... $ac_c" 1>&6 -echo "configure:8649: checking for pthread_create" >&5 +echo "configure:8704: checking for pthread_create" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pthread_create=yes" else @@ -9445,7 +9500,7 @@ chmod 755 src/cats/sqlite echo " -Configuration: +Configuration on `date`: Host: ${DISTNAME} ${DISTVER} Bacula version: ${VERSION} (${DATE}) @@ -9477,4 +9532,6 @@ Configuration: enable-gnome: ${support_gnome} gmp support: ${got_gmp} ${GMP_SRC} - " + " > config.out + +cat config.out diff --git a/bacula/src/dird/backup.c b/bacula/src/dird/backup.c index 3c726a49d6..aca3aa1b30 100644 --- a/bacula/src/dird/backup.c +++ b/bacula/src/dird/backup.c @@ -110,14 +110,14 @@ int do_backup(JCR *jcr) jcr->stime = (char *) get_pool_memory(PM_MESSAGE); jcr->stime[0] = 0; since[0] = 0; - switch (jcr->level) { + switch (jcr->JobLevel) { case L_DIFFERENTIAL: case L_INCREMENTAL: /* Look up start time of last job */ jcr->jr.JobId = 0; if (!db_find_job_start_time(jcr->db, &jcr->jr, jcr->stime)) { Jmsg(jcr, M_INFO, 0, _("Last FULL backup time not found. Doing FULL backup.\n")); - jcr->level = L_FULL; + jcr->JobLevel = L_FULL; jcr->jr.Level = L_FULL; } else { strcpy(since, ", since="); @@ -246,7 +246,7 @@ int do_backup(JCR *jcr) /* * Send Level command to File daemon */ - switch (jcr->level) { + switch (jcr->JobLevel) { case L_FULL: bnet_fsend(fd, levelcmd, "full", " "); break; @@ -258,7 +258,7 @@ int do_backup(JCR *jcr) break; case L_SINCE: default: - Emsg1(M_FATAL, 0, _("Unimplemented backup level %d\n"), jcr->level); + Emsg1(M_FATAL, 0, _("Unimplemented backup level %d\n"), jcr->JobLevel); backup_cleanup(jcr, JS_ErrorTerminated, since); return 0; } @@ -404,7 +404,7 @@ Termination: %s\n\n"), jcr->jr.JobId, jcr->jr.Job, jcr->fileset->hdr.name, - level_to_str(jcr->level), since, + level_to_str(jcr->JobLevel), since, jcr->client->hdr.name, sdt, edt, diff --git a/bacula/src/dird/dird_conf.c b/bacula/src/dird/dird_conf.c index b1145ce37e..7193bafd72 100644 --- a/bacula/src/dird/dird_conf.c +++ b/bacula/src/dird/dird_conf.c @@ -336,15 +336,24 @@ static struct s_kw FS_option_kw[] = { struct s_fs_opt { char *name; int keyword; - char option; + char *option; }; /* Options permitted for each keyword and resulting value */ static struct s_fs_opt FS_options[] = { - {"md5", FS_KW_SIGNATURE, 'M'}, - {"gzip", FS_KW_COMPRESSION, 'Z'}, - {"blowfish", FS_KW_ENCRYPTION, 'B'}, /* ***FIXME*** not implemented */ - {"3des", FS_KW_ENCRYPTION, '3'}, /* ***FIXME*** not implemented */ + {"md5", FS_KW_SIGNATURE, "M"}, + {"gzip", FS_KW_COMPRESSION, "Z6"}, + {"gzip1", FS_KW_COMPRESSION, "Z1"}, + {"gzip2", FS_KW_COMPRESSION, "Z2"}, + {"gzip3", FS_KW_COMPRESSION, "Z3"}, + {"gzip4", FS_KW_COMPRESSION, "Z4"}, + {"gzip5", FS_KW_COMPRESSION, "Z5"}, + {"gzip6", FS_KW_COMPRESSION, "Z6"}, + {"gzip7", FS_KW_COMPRESSION, "Z7"}, + {"gzip8", FS_KW_COMPRESSION, "Z8"}, + {"gzip9", FS_KW_COMPRESSION, "Z9"}, + {"blowfish", FS_KW_ENCRYPTION, "B"}, /* ***FIXME*** not implemented */ + {"3des", FS_KW_ENCRYPTION, "3"}, /* ***FIXME*** not implemented */ {NULL, 0, 0} }; @@ -1104,16 +1113,17 @@ static void store_restore(LEX *lc, struct res_items *item, int index, int pass) /* - * Scan for FileSet options + * Scan for FileSet options (keyword=option) is converted into one or + * two characters. Verifyopts=xxxx is Vxxxx: */ static char *scan_fs_options(LEX *lc, int keyword) { int token, i; static char opts[100]; - char option[2]; + char option[3]; option[0] = 0; /* default option = none */ - opts[0] = option[1] = 0; /* terminate options */ + opts[0] = option[2] = 0; /* terminate options */ for (;;) { token = lex_get_token(lc); /* expect at least one option */ if (token != T_IDENTIFIER && token != T_STRING && token != T_QUOTED_STRING) { @@ -1127,7 +1137,8 @@ static char *scan_fs_options(LEX *lc, int keyword) } else { for (i=0; FS_options[i].name; i++) { if (strcasecmp(lc->str, FS_options[i].name) == 0 && FS_options[i].keyword == keyword) { - option[0] = FS_options[i].option; + option[0] = FS_options[i].option[0]; + option[1] = FS_options[i].option[1]; i = 0; break; } diff --git a/bacula/src/dird/job.c b/bacula/src/dird/job.c index dee93224df..fbb76047e9 100644 --- a/bacula/src/dird/job.c +++ b/bacula/src/dird/job.c @@ -74,7 +74,7 @@ void run_job(JCR *jcr) jcr->jr.SchedTime = jcr->sched_time; jcr->jr.StartTime = jcr->start_time; jcr->jr.Type = jcr->JobType; - jcr->jr.Level = jcr->level; + jcr->jr.Level = jcr->JobLevel; strcpy(jcr->jr.Name, jcr->job->hdr.name); strcpy(jcr->jr.Job, jcr->Job); @@ -194,9 +194,10 @@ int get_or_create_client_record(JCR *jcr) cr.FileRetention = jcr->client->FileRetention; cr.JobRetention = jcr->client->JobRetention; if (jcr->client_name) { - free(jcr->client_name); + free_pool_memory(jcr->client_name); } - jcr->client_name = bstrdup(jcr->client->hdr.name); + jcr->client_name = get_memory(strlen(jcr->client->hdr.name) + 1); + strcpy(jcr->client_name, jcr->client->hdr.name); if (!db_create_client_record(jcr->db, &cr)) { Jmsg(jcr, M_ERROR, 0, _("Could not create Client record. %s"), db_strerror(jcr->db)); @@ -320,25 +321,26 @@ void set_jcr_defaults(JCR *jcr, JOB *job) { jcr->job = job; jcr->JobType = job->JobType; - jcr->level = job->level; + jcr->JobLevel = job->level; jcr->store = job->storage; jcr->client = job->client; if (jcr->client_name) { - free(jcr->client_name); + free_pool_memory(jcr->client_name); } - jcr->client_name = bstrdup(job->client->hdr.name); + jcr->client_name = get_memory(strlen(jcr->client->hdr.name) + 1); + strcpy(jcr->client_name, jcr->client->hdr.name); jcr->pool = job->pool; jcr->catalog = job->client->catalog; jcr->fileset = job->fs; jcr->msgs = job->messages; /* If no default level given, set one */ - if (jcr->level == 0) { + if (jcr->JobLevel == 0) { switch (jcr->JobType) { case JT_VERIFY: - jcr->level = L_VERIFY_CATALOG; + jcr->JobLevel = L_VERIFY_CATALOG; break; case JT_BACKUP: - jcr->level = L_INCREMENTAL; + jcr->JobLevel = L_INCREMENTAL; break; default: break; diff --git a/bacula/src/dird/msgchan.c b/bacula/src/dird/msgchan.c index e832e95dde..444491601f 100644 --- a/bacula/src/dird/msgchan.c +++ b/bacula/src/dird/msgchan.c @@ -39,7 +39,8 @@ #include "dird.h" /* Commands sent to Storage daemon */ -static char jobcmd[] = "JobId=%d job=%s job_name=%s client_name=%s Allow=%s Session=%s\n"; +static char jobcmd[] = "JobId=%d job=%s job_name=%s client_name=%s \ +type=%d level=%d FileSet=%s Allow=%s Session=%s\n"; static char use_device[] = "use device=%s media_type=%s pool_name=%s pool_type=%s\n"; /* Response from Storage daemon */ @@ -103,10 +104,13 @@ int start_storage_daemon_job(JCR *jcr) */ bash_spaces(jcr->job->hdr.name); bash_spaces(jcr->client->hdr.name); + bash_spaces(jcr->client->hdr.name); bnet_fsend(sd, jobcmd, jcr->JobId, jcr->Job, jcr->job->hdr.name, - jcr->client->hdr.name, "append", "*"); + jcr->client->hdr.name, jcr->JobType, jcr->JobLevel, + jcr->fileset->hdr.name, "append", "*"); unbash_spaces(jcr->job->hdr.name); unbash_spaces(jcr->client->hdr.name); + unbash_spaces(jcr->fileset->hdr.name); if (bnet_recv(sd) > 0) { Dmsg1(10, "msg); if (sscanf(sd->msg, OKjob, &jcr->VolSessionId, diff --git a/bacula/src/dird/scheduler.c b/bacula/src/dird/scheduler.c index 79d2b4fc6a..835f7e9840 100644 --- a/bacula/src/dird/scheduler.c +++ b/bacula/src/dird/scheduler.c @@ -134,7 +134,7 @@ JCR *wait_for_next_job(char *job_to_run) sm_check(__FILE__, __LINE__, False); set_jcr_defaults(jcr, job); if (run->level) { - jcr->level = run->level; /* override run level */ + jcr->JobLevel = run->level; /* override run level */ } if (run->pool) { jcr->pool = run->pool; /* override pool */ diff --git a/bacula/src/dird/ua_cmds.c b/bacula/src/dird/ua_cmds.c index bb683b4a7c..f8de24d92d 100644 --- a/bacula/src/dird/ua_cmds.c +++ b/bacula/src/dird/ua_cmds.c @@ -39,7 +39,6 @@ extern int r_first; extern int r_last; extern struct s_res resources[]; extern int console_msg_pending; -extern FILE *con_fd; extern char my_name[]; /* Imported functions */ diff --git a/bacula/src/dird/ua_dotcmds.c b/bacula/src/dird/ua_dotcmds.c index 3ecd6eb39e..da22767ad3 100644 --- a/bacula/src/dird/ua_dotcmds.c +++ b/bacula/src/dird/ua_dotcmds.c @@ -40,7 +40,6 @@ extern int r_first; extern int r_last; extern struct s_res resources[]; extern int console_msg_pending; -extern FILE *con_fd; extern char my_name[]; /* Imported functions */ diff --git a/bacula/src/dird/ua_output.c b/bacula/src/dird/ua_output.c index cfeadeca1c..1da05280c9 100644 --- a/bacula/src/dird/ua_output.c +++ b/bacula/src/dird/ua_output.c @@ -41,6 +41,7 @@ extern int r_last; extern struct s_res resources[]; extern int console_msg_pending; extern FILE *con_fd; +extern pthread_mutex_t con_mutex; /* Imported functions */ @@ -325,7 +326,7 @@ void do_messages(UAContext *ua, char *cmd) char msg[2000]; int mlen; - fcntl(fileno(con_fd), F_SETLKW); + P(con_mutex); rewind(con_fd); while (fgets(msg, sizeof(msg), con_fd)) { mlen = strlen(msg); @@ -336,8 +337,8 @@ void do_messages(UAContext *ua, char *cmd) } ftruncate(fileno(con_fd), 0L); console_msg_pending = FALSE; - fcntl(fileno(con_fd), F_UNLCK); ua->user_notified_msg_pending = FALSE; + V(con_mutex); } diff --git a/bacula/src/dird/ua_prune.c b/bacula/src/dird/ua_prune.c index 8f78f0ebda..5034b4ffe7 100644 --- a/bacula/src/dird/ua_prune.c +++ b/bacula/src/dird/ua_prune.c @@ -582,8 +582,8 @@ int prune_volume(UAContext *ua, POOL_DBR *pr, MEDIA_DBR *mr) free(del.JobId); } if (ua->verbose && del.num_del != 0) { - bsendmsg(ua, _("Pruned %d Jobs on Volume %s from catalog.\n"), del.num_del, - mr->VolumeName); + bsendmsg(ua, _("Pruned %d %s on Volume %s from catalog.\n"), del.num_del, + del.num_del == 1 ? "Job" : "Jobs", mr->VolumeName); } /* If purged, mark it so */ diff --git a/bacula/src/dird/ua_run.c b/bacula/src/dird/ua_run.c index ad4e8c2326..913743d543 100644 --- a/bacula/src/dird/ua_run.c +++ b/bacula/src/dird/ua_run.c @@ -213,7 +213,7 @@ try_again: found = 0; for (i=0; joblevels[i].level_name; i++) { if (strcasecmp(level_name, _(joblevels[i].level_name)) == 0) { - jcr->level = joblevels[i].level; + jcr->JobLevel = joblevels[i].level; found = 1; break; } @@ -234,7 +234,7 @@ Storage: %s\n"), jcr->JobType==JT_BACKUP?_("Backup"):_("Verify"), job->hdr.name, jcr->fileset->hdr.name, - level_to_str(jcr->level), + level_to_str(jcr->JobLevel), jcr->client->hdr.name, jcr->store->hdr.name); break; @@ -250,7 +250,7 @@ Storage: %s\n"), jcr->RestoreJobId = atoi(ua->cmd); } } - jcr->level = 'F'; /* ***FIXME*** */ + jcr->JobLevel = 'F'; /* ***FIXME*** */ Dmsg1(20, "JobId to restore=%d\n", jcr->RestoreJobId); bsendmsg(ua, _("Run Restore job\n\ JobName: %s\n\ @@ -263,7 +263,7 @@ Storage: %s\n"), job->hdr.name, jcr->RestoreWhere?jcr->RestoreWhere:job->RestoreWhere, jcr->RestoreJobId, - level_to_str(jcr->level), + level_to_str(jcr->JobLevel), jcr->fileset->hdr.name, jcr->client->hdr.name, jcr->store->hdr.name); @@ -309,19 +309,19 @@ Storage: %s\n"), add_prompt(ua, _("Since")); switch (do_prompt(ua, _("Select level"), NULL)) { case 0: - jcr->level = L_FULL; + jcr->JobLevel = L_FULL; break; case 1: - jcr->level = L_INCREMENTAL; + jcr->JobLevel = L_INCREMENTAL; break; case 2: - jcr->level = L_DIFFERENTIAL; + jcr->JobLevel = L_DIFFERENTIAL; break; case 3: - jcr->level = L_LEVEL; + jcr->JobLevel = L_LEVEL; break; case 4: - jcr->level = L_SINCE; + jcr->JobLevel = L_SINCE; break; default: break; @@ -335,16 +335,16 @@ Storage: %s\n"), add_prompt(ua, _("Verify Volume Data")); switch (do_prompt(ua, _("Select level"), NULL)) { case 0: - jcr->level = L_VERIFY_INIT; + jcr->JobLevel = L_VERIFY_INIT; break; case 1: - jcr->level = L_VERIFY_CATALOG; + jcr->JobLevel = L_VERIFY_CATALOG; break; case 2: - jcr->level = L_VERIFY_VOLUME; + jcr->JobLevel = L_VERIFY_VOLUME; break; case 3: - jcr->level = L_VERIFY_DATA; + jcr->JobLevel = L_VERIFY_DATA; break; default: break; diff --git a/bacula/src/dird/ua_select.c b/bacula/src/dird/ua_select.c index 91f7f84962..12ac318d3d 100644 --- a/bacula/src/dird/ua_select.c +++ b/bacula/src/dird/ua_select.c @@ -350,7 +350,7 @@ int select_pool_and_media_dbr(UAContext *ua, POOL_DBR *pr, MEDIA_DBR *mr) strcpy(mr->VolumeName, ua->argv[i]); } else { db_list_media_records(ua->db, mr, prtit, ua); - if (!get_cmd(ua, _("Enter the Volume name to delete: "))) { + if (!get_cmd(ua, _("Enter the Volume name: "))) { return 01; } strcpy(mr->VolumeName, ua->cmd); diff --git a/bacula/src/dird/ua_server.c b/bacula/src/dird/ua_server.c index 86dbc0f36d..0628df3df4 100644 --- a/bacula/src/dird/ua_server.c +++ b/bacula/src/dird/ua_server.c @@ -39,7 +39,6 @@ extern int r_first; extern int r_last; extern struct s_res resources[]; extern int console_msg_pending; -extern FILE *con_fd; extern char my_name[]; /* Static variables */ diff --git a/bacula/src/dird/verify.c b/bacula/src/dird/verify.c index e4b9f62390..1039dbb9f1 100644 --- a/bacula/src/dird/verify.c +++ b/bacula/src/dird/verify.c @@ -47,7 +47,7 @@ extern int debug_level; /* Commands sent to File daemon */ -static char verifycmd[] = "verify"; +static char verifycmd[] = "verify level=%s\n"; static char levelcmd[] = "level = %s%s\n"; /* Responses received from File daemon */ @@ -82,7 +82,7 @@ int do_verify(JCR *jcr) * we must look up the time and date of the * last full verify. */ - if (jcr->level == L_VERIFY_CATALOG) { + if (jcr->JobLevel == L_VERIFY_CATALOG) { memcpy(&jr, &(jcr->jr), sizeof(jr)); if (!db_find_last_full_verify(jcr->db, &jr)) { Jmsg(jcr, M_FATAL, 0, _("Unable to find last full verify. %s"), @@ -95,7 +95,7 @@ int do_verify(JCR *jcr) jcr->jr.JobId = jcr->JobId; jcr->jr.StartTime = jcr->start_time; - jcr->jr.Level = jcr->level; + jcr->jr.Level = jcr->JobLevel; if (!db_update_job_start_record(jcr->db, &jcr->jr)) { Jmsg(jcr, M_ERROR, 0, "%s", db_strerror(jcr->db)); goto bail_out; @@ -111,7 +111,7 @@ int do_verify(JCR *jcr) Jmsg(jcr, M_INFO, 0, _("Start Verify JobId %d Job=%s\n"), jcr->JobId, jcr->Job); - if (jcr->level == L_VERIFY_CATALOG) { + if (jcr->JobLevel == L_VERIFY_CATALOG) { memset(&jr, 0, sizeof(jr)); jr.JobId = last_full_id; if (!db_get_job_record(jcr->db, &jr)) { @@ -147,7 +147,7 @@ int do_verify(JCR *jcr) * Send Level command to File daemon * */ - switch (jcr->level) { + switch (jcr->JobLevel) { case L_VERIFY_INIT: level = "init"; break; @@ -161,7 +161,7 @@ int do_verify(JCR *jcr) level = "data"; break; default: - Jmsg1(jcr, M_FATAL, 0, _("Unimplemented save level %d\n"), jcr->level); + Jmsg1(jcr, M_FATAL, 0, _("Unimplemented save level %d\n"), jcr->JobLevel); goto bail_out; } Dmsg1(20, ">filed: %s", fd->msg); @@ -173,7 +173,7 @@ int do_verify(JCR *jcr) /* * Send verify command to File daemon */ - bnet_fsend(fd, verifycmd); + bnet_fsend(fd, verifycmd, level); if (!response(fd, OKverify, "Verify")) { goto bail_out; } @@ -184,7 +184,7 @@ int do_verify(JCR *jcr) * catalog depending on the run type. */ /* Compare to catalog */ - switch (jcr->level) { + switch (jcr->JobLevel) { case L_VERIFY_CATALOG: Dmsg0(10, "Verify level=catalog\n"); get_attributes_and_compare_to_catalog(jcr, last_full_id); @@ -197,7 +197,7 @@ int do_verify(JCR *jcr) break; default: - Jmsg1(jcr, M_FATAL, 0, _("Unimplemented save level %d\n"), jcr->level); + Jmsg1(jcr, M_FATAL, 0, _("Unimplemented verify level %d\n"), jcr->JobLevel); goto bail_out; } @@ -266,7 +266,7 @@ Termination: %s\n\n"), jcr->jr.JobId, jcr->jr.Job, jcr->fileset->hdr.name, - level_to_str(jcr->level), + level_to_str(jcr->JobLevel), jcr->client->hdr.name, sdt, edt, diff --git a/bacula/src/filed/backup.c b/bacula/src/filed/backup.c index 58b1cb427b..85002d9a79 100644 --- a/bacula/src/filed/backup.c +++ b/bacula/src/filed/backup.c @@ -51,9 +51,15 @@ int blast_data_to_storage_daemon(JCR *jcr, char *addr, int port) if (!bnet_set_buffer_size(sd, MAX_NETWORK_BUFFER_SIZE, BNET_SETBUF_WRITE)) { return 0; } - jcr->buf_size = sd->msglen; - jcr->compress_buf = (char *) bmalloc(jcr->buf_size); + jcr->buf_size = sd->msglen; + /* Adjust for compression so that output buffer is + * 12 bytes + 0.1% larger than input buffer plus 2 bytes. + * Note, we adjust the read size to be smaller so that the + * same output buffer can be used without growing it. + */ + jcr->compress_buf_size = jcr->buf_size + ((jcr->buf_size+999) / 1000) + 14; + jcr->compress_buf = get_memory(jcr->compress_buf_size); Dmsg1(100, "set_find_options ff=%p\n", jcr->ff); set_find_options(jcr->ff, jcr->incremental, jcr->mtime); @@ -72,7 +78,7 @@ int blast_data_to_storage_daemon(JCR *jcr, char *addr, int port) jcr->big_buf = NULL; } if (jcr->compress_buf) { - free(jcr->compress_buf); + free_pool_memory(jcr->compress_buf); jcr->compress_buf = NULL; } return stat; @@ -89,13 +95,12 @@ static int save_file(FF_PKT *ff_pkt, void *ijcr) { char attribs[MAXSTRING]; int fid, stat, stream; - size_t read_size; struct MD5Context md5c; int gotMD5 = 0; unsigned char signature[16]; BSOCK *sd, *dir; JCR *jcr = (JCR *)ijcr; - char *msgsave; + POOLMEM *msgsave; sd = jcr->store_bsock; dir = jcr->dir_bsock; @@ -227,16 +232,15 @@ static int save_file(FF_PKT *ff_pkt, void *ijcr) * Send Data header to Storage daemon * */ + + stream = STREAM_FILE_DATA; + +#ifdef HAVE_LIBZ if (ff_pkt->flags & FO_GZIP) { stream = STREAM_GZIP_DATA; - /* Adjust for compression so that output buffer is - * 12 bytes + 0.1% larger than input buffer - */ - read_size = jcr->buf_size - 12 - (jcr->buf_size / 1000) - 1; - } else { - stream = STREAM_FILE_DATA; - read_size = jcr->buf_size; } +#endif + if (!bnet_fsend(sd, "%ld %d 0", jcr->JobFiles, stream)) { close(fid); return 0; @@ -248,44 +252,54 @@ static int save_file(FF_PKT *ff_pkt, void *ijcr) } msgsave = sd->msg; - while ((sd->msglen=read(fid, sd->msg, read_size)) > 0) { -#ifdef HAVE_LIBZ - uLongf compress_len; -#endif - + while ((sd->msglen=read(fid, sd->msg, jcr->buf_size)) > 0) { if (ff_pkt->flags & FO_MD5) { - MD5Update(&md5c, (unsigned char *) (sd->msg), sd->msglen); + MD5Update(&md5c, (unsigned char *)(sd->msg), sd->msglen); gotMD5 = 1; } - /* ***FIXME*** add compression level options */ #ifdef HAVE_LIBZ + /* ***FIXME*** add compression level options */ if (ff_pkt->flags & FO_GZIP) { - if (compress((Bytef *)jcr->compress_buf, &compress_len, - (const Bytef *)sd->msg, (uLong)sd->msglen) != Z_OK) { + uLong compress_len; + compress_len = jcr->compress_buf_size; /* set max length */ + if (compress2((Bytef *)jcr->compress_buf, &compress_len, + (const Bytef *)sd->msg, (uLong)sd->msglen, + ff_pkt->GZIP_level) != Z_OK) { Jmsg(jcr, M_ERROR, 0, _("Compression error\n")); sd->msg = msgsave; sd->msglen = 0; close(fid); return 0; } - sd->msg = jcr->compress_buf; + Dmsg2(100, "compressed len=%d uncompressed len=%d\n", + compress_len, sd->msglen); + + sd->msg = jcr->compress_buf; /* write compressed buffer */ sd->msglen = compress_len; + if (!bnet_send(sd)) { + sd->msg = msgsave; /* restore read buffer */ + sd->msglen = 0; + close(fid); + return 0; + } + Dmsg1(30, "Send data to FD len=%d\n", sd->msglen); + jcr->JobBytes += sd->msglen; + sd->msg = msgsave; /* restore read buffer */ + continue; } #endif if (!bnet_send(sd)) { - sd->msg = msgsave; - sd->msglen = 0; close(fid); return 0; } Dmsg1(30, "Send data to FD len=%d\n", sd->msglen); jcr->JobBytes += sd->msglen; - } + } /* end while */ + if (sd->msglen < 0) { Jmsg(jcr, M_ERROR, 0, _("Error during save reading ERR=%s\n"), ff_pkt->fname, strerror(ff_pkt->ff_errno)); } - sd->msg = msgsave; /* Send data termination poll signal to Storage daemon. * NOTE possibly put this poll on a counter as specified diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index 5ec027e62c..b797bc3481 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -50,7 +50,7 @@ static int storage_cmd(JCR *jcr); static int session_cmd(JCR *jcr); static int response(BSOCK *sd, char *resp, char *cmd); static void filed_free_jcr(JCR *jcr); - +static int open_sd_read_session(JCR *jcr); /* Exported functions */ @@ -86,6 +86,7 @@ static char jobcmd[] = "JobId=%d Job=%127s SDid=%d SDtime=%d Authorization=% static char storaddr[] = "storage address=%s port=%d\n"; static char sessioncmd[] = "session %s %ld %ld %ld %ld %ld %ld\n"; static char restorecmd[] = "restore where=%s\n"; +static char verifycmd[] = "verify level=%20s\n"; /* Responses sent to Director */ static char errmsg[] = "2999 Invalid command\n"; @@ -146,8 +147,9 @@ void *handle_client_request(void *dirp) jcr->dir_bsock = dir; jcr->ff = init_find_files(); jcr->start_time = time(NULL); - jcr->last_fname = (char *) get_pool_memory(PM_FNAME); - jcr->client_name = bstrdup(my_name); + jcr->last_fname = get_pool_memory(PM_FNAME); + jcr->client_name = get_memory(strlen(my_name) + 1); + strcpy(jcr->client_name, my_name); /**********FIXME******* add command handler error code */ @@ -240,7 +242,7 @@ static int setdebug_cmd(JCR *jcr) Dmsg1(10, "setdebug_cmd: %s", dir->msg); if (sscanf(dir->msg, "setdebug=%d", &level) != 1 || level < 0) { bnet_fsend(dir, "2991 Bad setdebug command: %s\n", dir->msg); - return 0; + return 0; } debug_level = level; return bnet_fsend(dir, OKsetdebug, level); @@ -365,10 +367,6 @@ static int level_cmd(JCR *jcr) Dmsg1(90, "Got since time: %s", ctime(&mtime)); jcr->incremental = 1; jcr->mtime = mtime; - } else if (strcmp(level, "catalog") == 0) { - /* nothing for now */ - } else if (strcmp(level, "init") == 0) { - /* nothing for now */ } else { Jmsg1(jcr, M_FATAL, 0, "Unknown backup level: %s\n", level); free_memory(level); @@ -553,8 +551,26 @@ cleanup: static int verify_cmd(JCR *jcr) { BSOCK *dir = jcr->dir_bsock; + char level[100]; jcr->JobType = JT_VERIFY; + if (sscanf(dir->msg, verifycmd, level) != 1) { + bnet_fsend(dir, "2994 Bad verify command: %s\n", dir->msg); + return 0; + } + if (strcasecmp(level, "init") == 0) { + jcr->JobLevel = L_VERIFY_INIT; + } else if (strcasecmp(level, "catalog") == 0){ + jcr->JobLevel = L_VERIFY_CATALOG; + } else if (strcasecmp(level, "volume") == 0){ + jcr->JobLevel = L_VERIFY_VOLUME; + } else if (strcasecmp(level, "data") == 0){ + jcr->JobLevel = L_VERIFY_DATA; + } else { + bnet_fsend(dir, "2994 Bad verify command: %s\n", dir->msg); + return 0; + } + bnet_fsend(dir, OKverify); Dmsg1(10, "bfiled>dird: %s", dir->msg); @@ -570,19 +586,16 @@ static int verify_cmd(JCR *jcr) */ static int restore_cmd(JCR *jcr) { - int len; - char *ip_addr; - int data_port; BSOCK *dir = jcr->dir_bsock; BSOCK *sd = jcr->store_bsock; - char *where; + POOLMEM *where; /* * Scan WHERE (base directory for restore) from command */ Dmsg0(50, "restore command\n"); /* Pickup where string */ - where = (char *) get_memory(dir->msglen+1); + where = get_memory(dir->msglen+1); *where = 0; sscanf(dir->msg, restorecmd, where); Dmsg1(50, "Got where=%s\n", where); @@ -593,12 +606,47 @@ static int restore_cmd(JCR *jcr) jcr->JobType = JT_RESTORE; jcr->JobStatus = JS_Blocked; - ip_addr = (char *) get_pool_memory(PM_FNAME); + if (!open_sd_read_session(jcr)) { + return 0; + } + + /* + * Do restore of files and data + */ + do_restore(jcr); + + /* + * Send Close session command to Storage daemon + */ + bnet_fsend(sd, read_close, jcr->Ticket); + Dmsg1(30, "bfiled>stored: %s", sd->msg); + + /* ****FIXME**** check response */ + bnet_recv(sd); /* get OK */ + + /* Inform Storage daemon that we are done */ + bnet_sig(sd, BNET_EOF); + + /* Inform Director that we are done */ + bnet_sig(dir, BNET_EOF); + + Dmsg0(30, "Done in job.c\n"); + return 1; +} + +static int open_sd_read_session(JCR *jcr) +{ + int len; + BSOCK *sd = jcr->store_bsock; + + if (!sd) { + Jmsg(jcr, M_FATAL, 0, _("Improper calling sequence.\n")); + return 0; + } Dmsg4(20, "VolSessId=%ld VolsessT=%ld SF=%ld EF=%ld\n", jcr->VolSessionId, jcr->VolSessionTime, jcr->StartFile, jcr->EndFile); Dmsg2(20, "JobId=%d vol=%s\n", jcr->JobId, "DummyVolume"); - /* * Open Read Session with Storage daemon */ @@ -613,12 +661,12 @@ static int restore_cmd(JCR *jcr) if ((len = bnet_recv(sd)) > 0) { Dmsg1(10, "bfiledmsg); if (sscanf(sd->msg, OK_open, &jcr->Ticket) != 1) { - Emsg1(M_FATAL, 0, _("Bad response to read open: %s\n"), sd->msg); + Jmsg(jcr, M_FATAL, 0, _("Bad response to SD read open: %s\n"), sd->msg); return 0; } Dmsg1(10, "bfiled: got Ticket=%d\n", jcr->Ticket); } else { - Emsg0(M_FATAL, 0, _("Bad response from stored to read open command\n")); + Jmsg(jcr, M_FATAL, 0, _("Bad response from stored to read open command\n")); return 0; } @@ -634,35 +682,9 @@ static int restore_cmd(JCR *jcr) if (!response(sd, OK_data, "Read Data")) { return 0; } - - /* - * Do restore of files and data - */ - do_restore(jcr, ip_addr, data_port); - - /* - * Send Close session command to Storage daemon - */ - bnet_fsend(sd, read_close, jcr->Ticket); - Dmsg1(30, "bfiled>stored: %s", sd->msg); - - /* ****FIXME**** check response */ - bnet_recv(sd); /* get OK */ - - /* Inform Storage daemon that we are done */ - bnet_sig(sd, BNET_EOF); - - /* Inform Director that we are done */ - bnet_sig(dir, BNET_EOF); - - /* Clean up */ - free_pool_memory(ip_addr); - Dmsg0(30, "Done in job.c\n"); return 1; } - - /* * Destroy the Job Control Record and associated * resources (sockets). diff --git a/bacula/src/filed/protos.h b/bacula/src/filed/protos.h index 286eb2644d..7072b44f06 100644 --- a/bacula/src/filed/protos.h +++ b/bacula/src/filed/protos.h @@ -24,7 +24,7 @@ extern int blast_data_to_storage_daemon(JCR *jcr, char *addr, int port); extern void do_verify(JCR *jcr); -extern void do_restore(JCR *jcr, char *addr, int port); +extern void do_restore(JCR *jcr); extern int authenticate_director(JCR *jcr); extern int authenticate_storagedaemon(JCR *jcr); extern int make_estimate(JCR *jcr); diff --git a/bacula/src/filed/restore.c b/bacula/src/filed/restore.c index 2d57ef5bcc..43ef5e9c83 100644 --- a/bacula/src/filed/restore.c +++ b/bacula/src/filed/restore.c @@ -41,13 +41,13 @@ static void print_ls_output(JCR *jcr, char *fname, char *lname, int type, struct * Restore the requested files. * */ -void do_restore(JCR *jcr, char *addr, int port) +void do_restore(JCR *jcr) { int wherelen; BSOCK *sd; - char *fname; /* original file name */ - char *ofile; /* output name with possible prefix */ - char *lname; /* link name */ + POOLMEM *fname; /* original file name */ + POOLMEM *ofile; /* output name with possible prefix */ + POOLMEM *lname; /* link name */ int32_t stream; uint32_t size; uint32_t VolSessionId, VolSessionTime, file_index; @@ -66,10 +66,16 @@ void do_restore(JCR *jcr, char *addr, int port) if (!bnet_set_buffer_size(sd, MAX_NETWORK_BUFFER_SIZE, BNET_SETBUF_READ)) { return; } + jcr->buf_size = sd->msglen; - fname = (char *) get_pool_memory(PM_FNAME); - ofile = (char *) get_pool_memory(PM_FNAME); - lname = (char *) get_pool_memory(PM_FNAME); + fname = get_pool_memory(PM_FNAME); + ofile = get_pool_memory(PM_FNAME); + lname = get_pool_memory(PM_FNAME); + +#ifdef HAVE_LIBZ + uint32_t compress_buf_size = jcr->buf_size + 12 + ((jcr->buf_size+999) / 1000) + 100; + jcr->compress_buf = (char *)bmalloc(compress_buf_size); +#endif /* * Get a record from the Storage daemon @@ -81,10 +87,7 @@ void do_restore(JCR *jcr, char *addr, int port) if (sscanf(sd->msg, rec_header, &VolSessionId, &VolSessionTime, &file_index, &stream, &size) != 5) { Jmsg1(jcr, M_FATAL, 0, _("Record header scan error: %s\n"), sd->msg); - free_pool_memory(fname); - free_pool_memory(ofile); - free_pool_memory(lname); - return; + goto bail_out; } Dmsg2(30, "Got hdr: FilInx=%d Stream=%d.\n", file_index, stream); @@ -96,10 +99,7 @@ void do_restore(JCR *jcr, char *addr, int port) } if (size != ((uint32_t) sd->msglen)) { Jmsg2(jcr, M_FATAL, 0, _("Actual data size %d not same as header %d\n"), sd->msglen, size); - free_pool_memory(fname); - free_pool_memory(ofile); - free_pool_memory(lname); - return; + goto bail_out; } Dmsg1(30, "Got stream data, len=%d\n", sd->msglen); @@ -144,17 +144,17 @@ void do_restore(JCR *jcr, char *addr, int port) * */ if (sscanf(sd->msg, "%d %d %s", &record_file_index, &type, fname) != 3) { - Emsg1(M_FATAL, 0, _("Error scanning record header: %s\n"), sd->msg); - /** ****FIXME**** need to cleanup */ + Jmsg(jcr, M_FATAL, 0, _("Error scanning record header: %s\n"), sd->msg); Dmsg0(0, "\nError scanning header\n"); - return; + goto bail_out; } Dmsg3(30, "Got Attr: FilInx=%d type=%d fname=%s\n", record_file_index, type, fname); if (record_file_index != file_index) { - Emsg2(M_ABORT, 0, _("Record header file index %ld not equal record index %ld\n"), + Jmsg(jcr, M_FATAL, 0, _("Record header file index %ld not equal record index %ld\n"), file_index, record_file_index); Dmsg0(0, "File index error\n"); + goto bail_out; } ap = sd->msg; /* Skip to attributes */ @@ -215,15 +215,42 @@ void do_restore(JCR *jcr, char *addr, int port) if (write(ofd, sd->msg, sd->msglen) != sd->msglen) { Dmsg0(0, "===Write error===\n"); Jmsg2(jcr, M_ERROR, 0, "Write error on %s: %s\n", ofile, strerror(errno)); - free_pool_memory(fname); - free_pool_memory(ofile); - free_pool_memory(lname); - return; + goto bail_out; } total += sd->msglen; jcr->JobBytes += sd->msglen; } + + /* GZIP data stream */ + } else if (stream == STREAM_GZIP_DATA) { +#ifdef HAVE_LIBZ + if (extract) { + uLong compress_len; + int stat; + + compress_len = compress_buf_size; + Dmsg2(100, "Comp_len=%d msglen=%d\n", compress_len, sd->msglen); + if ((stat=uncompress((Byte *)jcr->compress_buf, &compress_len, + (const Byte *)sd->msg, (uLong)sd->msglen)) != Z_OK) { + Jmsg(jcr, M_ERROR, 0, _("Uncompression error. ERR=%d\n"), stat); + goto bail_out; + } + Dmsg2(100, "Write uncompressed %d bytes, total before write=%d\n", compress_len, total); + if ((uLong)write(ofd, jcr->compress_buf, compress_len) != compress_len) { + Dmsg0(0, "===Write error===\n"); + Jmsg2(jcr, M_ERROR, 0, "Write error on %s: %s\n", ofile, strerror(errno)); + goto bail_out; + } + total += compress_len; + jcr->JobBytes += compress_len; + } +#else + if (extract) { + Jmsg(jcr, M_ERROR, 0, "GZIP data stream found, but GZIP not configured!\n"); + goto bail_out; + } +#endif /* If extracting, wierd stream (not 1 or 2), close output file anyway */ } else if (extract) { Dmsg1(30, "Found wierd stream %d\n", stream); @@ -247,6 +274,11 @@ void do_restore(JCR *jcr, char *addr, int port) set_statp(jcr, fname, ofile, lname, type, &statp); } +bail_out: + if (jcr->compress_buf) { + free(jcr->compress_buf); + jcr->compress_buf = NULL; + } free_pool_memory(fname); free_pool_memory(ofile); free_pool_memory(lname); diff --git a/bacula/src/findlib/find.h b/bacula/src/findlib/find.h index 15d9b11614..1408f17a2b 100755 --- a/bacula/src/findlib/find.h +++ b/bacula/src/findlib/find.h @@ -64,6 +64,7 @@ struct s_included_file { struct s_included_file *next; int options; /* backup options */ + int level; /* compression level */ int len; /* length of fname */ int pattern; /* set if pattern */ char VerifyOpts[20]; /* Options for verify */ @@ -95,6 +96,7 @@ typedef struct ff { int dereference; /* follow links */ int compute_MD5; /* compute MD5 checksum */ int GZIP_compression; /* compress the file */ + int GZIP_level; /* compression level */ int one_file_system; /* do not traverse file systems */ int atime_preserve; /* preserve access times */ int null_output_device; /* using null output device */ diff --git a/bacula/src/findlib/match.c b/bacula/src/findlib/match.c index 7b42e8ef2c..2dd9700d6f 100644 --- a/bacula/src/findlib/match.c +++ b/bacula/src/findlib/match.c @@ -111,6 +111,8 @@ void add_fname_to_include_list(FF_PKT *ff, int prefixed, char *fname) break; case 'Z': /* gzip compression */ inc->options |= OPT_GZIP_compression; + inc->level = *++p - '0'; + Dmsg1(200, "Compression level=%d\n", inc->level); break; case 'h': /* no recursion */ inc->options |= OPT_no_recursion; @@ -205,6 +207,7 @@ struct s_included_file *get_next_included_file(FF_PKT *ff, struct s_included_fil } if (inc->options & OPT_GZIP_compression) { ff->GZIP_compression = 1; + ff->GZIP_level = inc->level; } else { ff->GZIP_compression = 0; } diff --git a/bacula/src/jcr.h b/bacula/src/jcr.h index dc94829887..31a3536069 100644 --- a/bacula/src/jcr.h +++ b/bacula/src/jcr.h @@ -85,7 +85,7 @@ struct s_jcr { JCR_free_HANDLER *daemon_free_jcr; /* Local free routine */ int use_count; /* use count */ POOLMEM *errmsg; /* edited error message */ - char Job[MAX_NAME_LENGTH]; /* Job name */ + char Job[MAX_NAME_LENGTH]; /* Unique name of this Job */ uint32_t JobId; /* Director's JobId */ uint32_t VolSessionId; uint32_t VolSessionTime; @@ -95,14 +95,14 @@ struct s_jcr { uint32_t Errors; /* Number of non-fatal errors */ int JobStatus; /* ready, running, blocked, terminated */ int JobType; /* backup, restore, verify ... */ - int level; + int JobLevel; /* Job level */ int authenticated; /* set when client authenticated */ time_t sched_time; /* job schedule time, i.e. when it should start */ time_t start_time; /* when job actually started */ time_t run_time; /* used for computing speed */ time_t end_time; /* job end time */ POOLMEM *VolumeName; /* Volume name desired -- pool_memory */ - char *client_name; /* client name */ + POOLMEM *client_name; /* client name */ char *sd_auth_key; /* SD auth key */ MSGS *msgs; /* Message resource */ @@ -149,7 +149,8 @@ struct s_jcr { long Ticket; /* Ticket */ int save_level; /* save level */ char *big_buf; /* I/O buffer */ - char *compress_buf; /* Compression buffer */ + POOLMEM *compress_buf; /* Compression buffer */ + int32_t compress_buf_size; /* Length of compression buffer */ char *where; /* Root where to restore */ int buf_size; /* length of buffer */ FF_PKT *ff; /* Find Files packet */ @@ -166,11 +167,12 @@ struct s_jcr { int type; DEVRES *device; /* device to use */ VOLUME_CAT_INFO VolCatInfo; /* Catalog info for desired volume */ - char *pool_name; /* pool to use */ - char *pool_type; /* pool type to use */ - char *job_name; /* job name */ - char *media_type; /* media type */ - char *dev_name; /* device name */ + POOLMEM *job_name; /* base Job name (not unique) */ + POOLMEM *fileset_name; /* FileSet */ + POOLMEM *pool_name; /* pool to use */ + POOLMEM *pool_type; /* pool type to use */ + POOLMEM *media_type; /* media type */ + POOLMEM *dev_name; /* device name */ long NumVolumes; /* number of volumes used */ long CurVolume; /* current volume number */ int mode; /* manual/auto run */ diff --git a/bacula/src/lib/bnet.c b/bacula/src/lib/bnet.c index 34caee4277..adec5062a9 100644 --- a/bacula/src/lib/bnet.c +++ b/bacula/src/lib/bnet.c @@ -181,7 +181,7 @@ bnet_recv(BSOCK *bsock) } /* always add a zero by to properly terminate any * string that was send to us. Note, we ensured above that the - * buffer is atleast one byte longer than the message length. + * buffer is at least one byte longer than the message length. */ bsock->msg[nbytes] = 0; /* terminate in case it is a string */ sm_check(__FILE__, __LINE__, False); diff --git a/bacula/src/lib/jcr.c b/bacula/src/lib/jcr.c index ea3b94bf01..eec5fcd7b8 100755 --- a/bacula/src/lib/jcr.c +++ b/bacula/src/lib/jcr.c @@ -124,7 +124,7 @@ static void free_common_jcr(JCR *jcr) /* do this after closing messages */ if (jcr->client_name) { - free(jcr->client_name); + free_pool_memory(jcr->client_name); jcr->client_name = NULL; } diff --git a/bacula/src/lib/message.c b/bacula/src/lib/message.c index 481e460f53..c071e532f0 100755 --- a/bacula/src/lib/message.c +++ b/bacula/src/lib/message.c @@ -43,6 +43,7 @@ char *exename = (char *)NULL; int console_msg_pending = 0; char con_fname[1000]; FILE *con_fd = NULL; +pthread_mutex_t con_mutex = PTHREAD_MUTEX_INITIALIZER; /* Forward referenced functions */ @@ -434,7 +435,7 @@ static char *edit_job_codes(JCR *jcr, char *omsg, char *imsg, char *to) str = to; break; case 'l': - str = job_level_to_str(jcr->level); + str = job_level_to_str(jcr->JobLevel); break; case 'c': str = jcr->client_name; @@ -666,7 +667,7 @@ void dispatch_message(void *vjcr, int type, int level, char *msg) Dmsg0(200, "Console file not open.\n"); } if (con_fd) { - fcntl(fileno(con_fd), F_SETLKW); + P(con_mutex); errno = 0; bstrftime(cmd, sizeof(cmd), time(NULL)); len = strlen(cmd); @@ -679,8 +680,8 @@ void dispatch_message(void *vjcr, int type, int level, char *msg) } fwrite(msg, len, 1, con_fd); fflush(con_fd); - fcntl(fileno(con_fd), F_UNLCK); console_msg_pending = TRUE; + V(con_mutex); } break; case MD_SYSLOG: diff --git a/bacula/src/stored/bextract.c b/bacula/src/stored/bextract.c index 963fdd95aa..17e6dd570a 100644 --- a/bacula/src/stored/bextract.c +++ b/bacula/src/stored/bextract.c @@ -183,6 +183,7 @@ static void do_extract(char *devname, char *where) block = new_block(dev); strcpy(jcr->VolumeName, VolName); + Dmsg1(100, "Volume=%s\n", jcr->VolumeName); if (!acquire_device_for_read(jcr, dev, block)) { Emsg1(M_ABORT, 0, "Cannot open %s\n", devname); @@ -191,6 +192,9 @@ static void do_extract(char *devname, char *where) memset(&rec, 0, sizeof(rec)); rec.data = get_memory(70000); + uint32_t compress_buf_size = 70000; + POOLMEM *compress_buf = get_memory(compress_buf_size); + for ( ;; ) { if (!read_record(dev, block, &rec)) { @@ -357,6 +361,33 @@ static void do_extract(char *devname, char *where) Emsg1(M_ABORT, 0, "Write error: %s\n", strerror(errno)); } } + + } else if (rec.Stream == STREAM_GZIP_DATA) { +#ifdef HAVE_LIBZ + if (extract) { + uLongf compress_len; + + compress_len = compress_buf_size; + if (uncompress((Bytef *)compress_buf, &compress_len, + (const Bytef *)rec.data, (uLong)rec.data_len) != Z_OK) { + Emsg0(M_ABORT, 0, _("Uncompression error.\n")); + } + + Dmsg2(100, "Write uncompressed %d bytes, total before write=%d\n", compress_len, total); + if ((uLongf)write(ofd, compress_buf, (size_t)compress_len) != compress_len) { + Dmsg0(0, "===Write error===\n"); + Emsg2(M_ABORT, 0, "Write error on %s: %s\n", ofile, strerror(errno)); + } + total += compress_len; + Dmsg2(100, "Compress len=%d uncompressed=%d\n", rec.data_len, + compress_len); + } +#else + if (extract) { + Emsg0(M_ABORT, 0, "GZIP data stream found, but GZIP not configured!\n"); + } +#endif + /* If extracting, wierd stream (not 1 or 2), close output file anyway */ } else if (extract) { @@ -384,6 +415,7 @@ static void do_extract(char *devname, char *where) free_pool_memory(fname); free_pool_memory(ofile); free_pool_memory(lname); + free_pool_memory(compress_buf); term_dev(dev); free_block(block); return; diff --git a/bacula/src/stored/bls.c b/bacula/src/stored/bls.c index d8c3cefeb5..48ba910934 100644 --- a/bacula/src/stored/bls.c +++ b/bacula/src/stored/bls.c @@ -32,6 +32,8 @@ static void do_blocks(char *infname); static void do_jobs(char *infname); static void do_ls(char *fname); static void print_ls_output(char *fname, char *link, int type, struct stat *statp); +static void do_setup(char *infname); +static void do_close(); static DEVICE *dev; static int default_tape = FALSE; @@ -39,6 +41,14 @@ static int dump_label = FALSE; static int list_blocks = FALSE; static int list_jobs = FALSE; static int verbose = 0; +static char Vol[2000]; +static char *VolName; +static char *p; +static DEV_RECORD *rec; +static DEV_BLOCK *block; +static int NumVolumes, CurVolume; +static JCR *jcr; + extern char BaculaId[]; @@ -153,6 +163,7 @@ int main (int argc, char *argv[]) } for (i=0; i < argc; i++) { + do_setup(argv[i]); if (list_blocks) { do_blocks(argv[i]); } else if (list_jobs) { @@ -160,8 +171,8 @@ int main (int argc, char *argv[]) } else { do_ls(argv[i]); } + do_close(); } - return 0; } @@ -170,17 +181,11 @@ static void my_free_jcr(JCR *jcr) return; } -/* List just block information */ -static void do_blocks(char *infname) +/* + * Setup device, jcr, and prepare to read + */ +static void do_setup(char *infname) { - char Vol[2000]; - char *VolName; - char *p; - DEV_RECORD *rec; - DEV_BLOCK *block; - int NumVolumes, CurVolume; - JCR *jcr; - jcr = new_jcr(sizeof(JCR), my_free_jcr); VolName = Vol; VolName[0] = 0; @@ -224,6 +229,74 @@ static void do_blocks(char *infname) Emsg0(M_ERROR, 0, dev->errmsg); exit(1); } +} + +static void do_close() +{ + term_dev(dev); + free_record(rec); + free_block(block); + free_jcr(jcr); +} + +static int mount_next_volume(char *infname) +{ + if (rec->remainder) { + Dmsg0(20, "Not end of record. Next volume has more data for current record.\n"); + } + Dmsg2(20, "NumVolumes=%d CurVolume=%d\n", NumVolumes, CurVolume); + if (NumVolumes > 1 && CurVolume < NumVolumes) { + p = VolName; + while (*p++) + { } + CurVolume++; + Dmsg1(20, "There is another volume %s.\n", p); + VolName = p; + close_dev(dev); + jcr->VolumeName = check_pool_memory_size(jcr->VolumeName, + strlen(VolName)+1); + strcpy(jcr->VolumeName, VolName); + printf("Mount Volume %s on device %s and press return when ready.", + VolName, infname); + getchar(); + block->binbuf = 0; /* consumed all bytes */ + if (!ready_dev_for_read(jcr, dev, block)) { + Emsg2(M_ABORT, 0, "Cannot open Dev=%s, Vol=%s\n", infname, VolName); + } + return 1; /* Next volume mounted */ + } + printf("End of Device reached.\n"); + return 0; /* EOT */ +} + +/* + * Device got an error, attempt to analyse it + */ +static void display_error_status() +{ + uint32_t status; + + Emsg0(M_ERROR, 0, dev->errmsg); + status_dev(dev, &status); + Dmsg1(20, "Device status: %x\n", status); + if (status & MT_EOD) + Emsg0(M_ABORT, 0, "Unexpected End of Data\n"); + else if (status & MT_EOT) + Emsg0(M_ABORT, 0, "Unexpected End of Tape\n"); + else if (status & MT_EOF) + Emsg0(M_ABORT, 0, "Unexpected End of File\n"); + else if (status & MT_DR_OPEN) + Emsg0(M_ABORT, 0, "Tape Door is Open\n"); + else if (!(status & MT_ONLINE)) + Emsg0(M_ABORT, 0, "Unexpected Tape is Off-line\n"); + else + Emsg2(M_ABORT, 0, "Read error on Record Header %s: %s\n", dev_name(dev), strerror(errno)); +} + + +/* List just block information */ +static void do_blocks(char *infname) +{ dump_volume_label(dev); @@ -239,35 +312,12 @@ Warning, this Volume is a continuation of Volume %s\n", for ( ;; ) { if (!read_block_from_device(dev, block)) { - uint32_t status; Dmsg0(20, "!read_record()\n"); if (dev->state & ST_EOT) { - if (rec->remainder) { - Dmsg0(20, "Not end of record.\n"); - } - Dmsg2(20, "NumVolumes=%d CurVolume=%d\n", NumVolumes, CurVolume); - if (NumVolumes > 1 && CurVolume < NumVolumes) { - p = VolName; - while (*p++) - { } - CurVolume++; - Dmsg1(20, "There is another volume %s.\n", p); - VolName = p; - close_dev(dev); - jcr->VolumeName = (char *)check_pool_memory_size(jcr->VolumeName, - strlen(VolName)+1); - strcpy(jcr->VolumeName, VolName); - printf("Mount Volume %s on device %s and press return when ready.", - VolName, infname); - getchar(); - block->binbuf = 0; /* consumed all bytes */ - if (!ready_dev_for_read(jcr, dev, block)) { - Emsg2(M_ABORT, 0, "Cannot open Dev=%s, Vol=%s\n", infname, VolName); - } - continue; + if (!mount_next_volume(infname)) { + break; } - printf("End of Device reached.\n"); - break; + continue; } if (dev->state & ST_EOF) { Emsg1(M_INFO, 0, "Got EOF on device %s\n", dev_name(dev)); @@ -278,88 +328,19 @@ Warning, this Volume is a continuation of Volume %s\n", Emsg0(M_INFO, 0, dev->errmsg); continue; } - Emsg0(M_ERROR, 0, dev->errmsg); - status_dev(dev, &status); - Dmsg1(20, "Device status: %x\n", status); - if (status & MT_EOD) - Emsg0(M_ABORT, 0, "Unexpected End of Data\n"); - else if (status & MT_EOT) - Emsg0(M_ABORT, 0, "Unexpected End of Tape\n"); - else if (status & MT_EOF) - Emsg0(M_ABORT, 0, "Unexpected End of File\n"); - else if (status & MT_DR_OPEN) - Emsg0(M_ABORT, 0, "Tape Door is Open\n"); - else if (!(status & MT_ONLINE)) - Emsg0(M_ABORT, 0, "Unexpected Tape is Off-line\n"); - else - Emsg2(M_ABORT, 0, "Read error on Record Header %s: %s\n", dev_name(dev), strerror(errno)); + display_error_status(); break; } printf("Block: %d size=%d\n", block->BlockNumber, block->block_len); } - term_dev(dev); - free_record(rec); - free_block(block); - free_jcr(jcr); return; } /* Do list job records */ static void do_jobs(char *infname) { - char Vol[2000]; - char *VolName; - char *p; - DEV_RECORD *rec; - DEV_BLOCK *block; - int NumVolumes, CurVolume; - JCR *jcr; - - jcr = new_jcr(sizeof(JCR), my_free_jcr); - VolName = Vol; - VolName[0] = 0; - if (strncmp(infname, "/dev/", 5) != 0) { - /* Try stripping file part */ - p = infname + strlen(infname); - while (p >= infname && *p != '/') - p--; - if (*p == '/') { - strcpy(VolName, p+1); - *p = 0; - } - } - Dmsg2(10, "Device=%s, Vol=%s.\n", infname, VolName); - dev = init_dev(NULL, infname); - if (!dev) { - Emsg1(M_ABORT, 0, "Cannot open %s\n", infname); - } - /* ***FIXME**** init capabilities */ - if (!open_device(dev)) { - Emsg1(M_ABORT, 0, "Cannot open %s\n", infname); - } - Dmsg0(90, "Device opened for read.\n"); - - rec = new_record(); - block = new_block(dev); - - NumVolumes = 0; - CurVolume = 1; - for (p = VolName; p && *p; ) { - p = strchr(p, '^'); - if (p) { - *p++ = 0; - } - NumVolumes++; - } - - jcr->VolumeName = (char *)check_pool_memory_size(jcr->VolumeName, strlen(VolName)+1); - strcpy(jcr->VolumeName, VolName); - if (!acquire_device_for_read(jcr, dev, block)) { - Emsg0(M_ERROR, 0, dev->errmsg); - exit(1); - } /* Assume that we have already read the volume label. * If on second or subsequent volume, adjust buffer pointer @@ -371,41 +352,13 @@ Warning, this Volume is a continuation of Volume %s\n", } for ( ;; ) { - DEV_RECORD *record; - if (!read_record(dev, block, rec)) { - uint32_t status; Dmsg0(20, "!read_record()\n"); if (dev->state & ST_EOT) { - if (rec->remainder) { - Dmsg0(20, "Not end of record.\n"); + if (!mount_next_volume(infname)) { + break; } - Dmsg2(20, "NumVolumes=%d CurVolume=%d\n", NumVolumes, CurVolume); - if (NumVolumes > 1 && CurVolume < NumVolumes) { - p = VolName; - while (*p++) - { } - CurVolume++; - Dmsg1(20, "There is another volume %s.\n", p); - VolName = p; - close_dev(dev); - jcr->VolumeName = (char *)check_pool_memory_size(jcr->VolumeName, - strlen(VolName)+1); - strcpy(jcr->VolumeName, VolName); - printf("Mount Volume %s on device %s and press return when ready.", - VolName, infname); - getchar(); - if (!ready_dev_for_read(jcr, dev, block)) { - Emsg2(M_ABORT, 0, "Cannot open Dev=%s, Vol=%s\n", infname, VolName); - } - record = new_record(); - read_record(dev, block, record); /* read vol label */ - dump_label_record(dev, record, verbose); - free_record(record); - continue; - } - printf("End of Device reached.\n"); - break; + continue; } if (dev->state & ST_EOF) { Emsg1(M_INFO, 0, "Got EOF on device %s\n", dev_name(dev)); @@ -416,21 +369,7 @@ Warning, this Volume is a continuation of Volume %s\n", Emsg0(M_INFO, 0, dev->errmsg); continue; } - Emsg0(M_ERROR, 0, dev->errmsg); - status_dev(dev, &status); - Dmsg1(20, "Device status: %x\n", status); - if (status & MT_EOD) - Emsg0(M_ABORT, 0, "Unexpected End of Data\n"); - else if (status & MT_EOT) - Emsg0(M_ABORT, 0, "Unexpected End of Tape\n"); - else if (status & MT_EOF) - Emsg0(M_ABORT, 0, "Unexpected End of File\n"); - else if (status & MT_DR_OPEN) - Emsg0(M_ABORT, 0, "Tape Door is Open\n"); - else if (!(status & MT_ONLINE)) - Emsg0(M_ABORT, 0, "Unexpected Tape is Off-line\n"); - else - Emsg2(M_ABORT, 0, "Read error on Record Header %s: %s\n", dev_name(dev), strerror(errno)); + display_error_status(); break; } @@ -458,78 +397,19 @@ Warning, this Volume is a continuation of Volume %s\n", continue; } } - term_dev(dev); - free_record(rec); - free_block(block); - free_jcr(jcr); return; } /* Do an ls type listing of an archive */ static void do_ls(char *infname) { - char fname[1000]; - char Vol[2000]; - char *VolName; - char *p; + char fname[2000]; struct stat statp; int type; long record_file_index; - DEV_RECORD *rec; - DEV_BLOCK *block; - int NumVolumes, CurVolume; - JCR *jcr; - - jcr = new_jcr(sizeof(JCR), my_free_jcr); - VolName = Vol; - VolName[0] = 0; - if (strncmp(infname, "/dev/", 5) != 0) { - /* Try stripping file part */ - p = infname + strlen(infname); - while (p >= infname && *p != '/') - p--; - if (*p == '/') { - strcpy(VolName, p+1); - *p = 0; - } - } - Dmsg2(10, "Device=%s, Vol=%s.\n", infname, VolName); - dev = init_dev(NULL, infname); - if (!dev) { - Emsg1(M_ABORT, 0, "Cannot open %s\n", infname); - } - /* ***FIXME**** init capabilities */ - if (!open_device(dev)) { - Emsg1(M_ERROR, 0, "Cannot open %s\n", infname); - exit(1); - } - Dmsg0(90, "Device opened for read.\n"); - - rec = new_record(); - block = new_block(dev); - - NumVolumes = 0; - CurVolume = 1; - for (p = VolName; p && *p; ) { - p = strchr(p, '^'); - if (p) { - *p++ = 0; - } - NumVolumes++; - } - - jcr->VolumeName = (char *)check_pool_memory_size(jcr->VolumeName, strlen(VolName)+1); - strcpy(jcr->VolumeName, VolName); - if (!acquire_device_for_read(jcr, dev, block)) { - Emsg0(M_ERROR, 0, dev->errmsg); - exit(1); - } if (dump_label) { dump_volume_label(dev); - term_dev(dev); - free_record(rec); - free_block(block); return; } @@ -543,41 +423,13 @@ Warning, this Volume is a continuation of Volume %s\n", } for ( ;; ) { - DEV_RECORD *record; - if (!read_record(dev, block, rec)) { - uint32_t status; Dmsg0(20, "!read_record()\n"); if (dev->state & ST_EOT) { - if (rec->remainder) { - Dmsg0(20, "Not end of record.\n"); - } - Dmsg2(20, "NumVolumes=%d CurVolume=%d\n", NumVolumes, CurVolume); - if (NumVolumes > 1 && CurVolume < NumVolumes) { - p = VolName; - while (*p++) - { } - CurVolume++; - Dmsg1(20, "There is another volume %s.\n", p); - VolName = p; - close_dev(dev); - jcr->VolumeName = (char *)check_pool_memory_size(jcr->VolumeName, - strlen(VolName)+1); - strcpy(jcr->VolumeName, VolName); - printf("Mount Volume %s on device %s and press return when ready.", - VolName, infname); - getchar(); - if (!ready_dev_for_read(jcr, dev, block)) { - Emsg2(M_ABORT, 0, "Cannot open Dev=%s, Vol=%s\n", infname, VolName); - } - record = new_record(); - read_record(dev, block, record); /* read vol label */ - dump_label_record(dev, record, 0); - free_record(record); - continue; + if (!mount_next_volume(infname)) { + break; } - printf("End of Device reached.\n"); - break; + continue; } if (dev->state & ST_EOF) { Emsg1(M_INFO, 0, "Got EOF on device %s\n", dev_name(dev)); @@ -588,21 +440,7 @@ Warning, this Volume is a continuation of Volume %s\n", Emsg0(M_INFO, 0, dev->errmsg); continue; } - Emsg0(M_ERROR, 0, dev->errmsg); - status_dev(dev, &status); - Dmsg1(20, "Device status: %x\n", status); - if (status & MT_EOD) - Emsg0(M_ABORT, 0, "Unexpected End of Data\n"); - else if (status & MT_EOT) - Emsg0(M_ABORT, 0, "Unexpected End of Tape\n"); - else if (status & MT_EOF) - Emsg0(M_ABORT, 0, "Unexpected End of File\n"); - else if (status & MT_DR_OPEN) - Emsg0(M_ABORT, 0, "Tape Door is Open\n"); - else if (!(status & MT_ONLINE)) - Emsg0(M_ABORT, 0, "Unexpected Tape is Off-line\n"); - else - Emsg2(M_ABORT, 0, "Read error on Record Header %s: %s\n", dev_name(dev), strerror(errno)); + display_error_status(); break; } @@ -649,10 +487,6 @@ Warning, this Volume is a continuation of Volume %s\n", print_ls_output(fname, ap, type, &statp); } } - term_dev(dev); - free_record(rec); - free_block(block); - free_jcr(jcr); return; } diff --git a/bacula/src/stored/fd_cmds.c b/bacula/src/stored/fd_cmds.c index 6280a8a12f..af1867c75a 100644 --- a/bacula/src/stored/fd_cmds.c +++ b/bacula/src/stored/fd_cmds.c @@ -283,10 +283,10 @@ static int read_open_session(JCR *jcr) bnet_fsend(fd, NOT_opened); return 0; } - Dmsg4(0, "Got: JobId=%d Vol=%s VolSessId=%ld VolSessT=%ld\n", + Dmsg4(100, "read_open_session got: JobId=%d Vol=%s VolSessId=%ld VolSessT=%ld\n", jcr->JobId, jcr->VolumeName, jcr->read_VolSessionId, jcr->read_VolSessionTime); - Dmsg4(0, " StartF=%ld EndF=%ld StartB=%ld EndB=%ld\n", + Dmsg4(100, " StartF=%ld EndF=%ld StartB=%ld EndB=%ld\n", jcr->read_StartFile, jcr->read_EndFile, jcr->read_StartBlock, jcr->read_EndBlock); } diff --git a/bacula/src/stored/job.c b/bacula/src/stored/job.c index 9533f702ee..47c9f24d54 100644 --- a/bacula/src/stored/job.c +++ b/bacula/src/stored/job.c @@ -37,7 +37,8 @@ extern uint32_t newVolSessionId(); static int use_device_cmd(JCR *jcr); /* Requests from the Director daemon */ -static char jobcmd[] = "JobId=%d job=%127s job_name=%127s client_name=%127s Allow="; +static char jobcmd[] = "JobId=%d job=%127s job_name=%127s client_name=%127s \ +type=%d level=%d FileSet=%127s Allow="; static char use_device[] = "use device=%s media_type=%s pool_name=%s pool_type=%s\n"; /* Responses sent to Director daemon */ @@ -64,7 +65,8 @@ int job_cmd(JCR *jcr) int JobId, errstat; char auth_key[100]; BSOCK *dir = jcr->dir_bsock; - char *job_name, *client_name, *job; + POOLMEM *job_name, *client_name, *job, *fileset_name; + int JobType, level; struct timeval tv; struct timezone tz; struct timespec timeout; @@ -74,15 +76,18 @@ int job_cmd(JCR *jcr) */ Dmsg1(30, "Job_cmd: %s\n", dir->msg); - job = (char *) get_memory(dir->msglen); - job_name = (char *) get_memory(dir->msglen); - client_name = (char *)get_memory(dir->msglen); - if (sscanf(dir->msg, jobcmd, &JobId, job, job_name, client_name) != 4) { + job = get_memory(dir->msglen); + job_name = get_memory(dir->msglen); + client_name = get_memory(dir->msglen); + fileset_name = get_memory(dir->msglen); + if (sscanf(dir->msg, jobcmd, &JobId, job, job_name, client_name, + &JobType, &level, fileset_name) != 7) { bnet_fsend(dir, BAD_job); Emsg1(M_FATAL, 0, _("Bad Job Command from Director: %s\n"), dir->msg); free_memory(job); free_memory(job_name); free_memory(client_name); + free_memory(fileset_name); jcr->JobStatus = JS_ErrorTerminated; return 0; } @@ -91,13 +96,20 @@ int job_cmd(JCR *jcr) jcr->VolSessionTime = VolSessionTime; strcpy(jcr->Job, job); unbash_spaces(job_name); - jcr->job_name = (char *) get_memory(strlen(job_name) + 1); + jcr->job_name = get_memory(strlen(job_name) + 1); strcpy(jcr->job_name, job_name); unbash_spaces(client_name); - jcr->client_name = bstrdup(client_name); + jcr->client_name = get_memory(strlen(client_name) + 1); + strcpy(jcr->client_name, client_name); + unbash_spaces(fileset_name); + jcr->fileset_name = get_memory(strlen(fileset_name) + 1); + strcpy(jcr->fileset_name, fileset_name); + jcr->JobType = JobType; + jcr->JobLevel = level; free_memory(job); free_memory(job_name); free_memory(client_name); + free_memory(fileset_name); /* Initialize FD start condition variable */ if ((errstat = pthread_cond_init(&jcr->job_start_wait, NULL)) != 0) { @@ -225,7 +237,7 @@ void handle_filed_connection(BSOCK *fd, char *job_name) */ static int use_device_cmd(JCR *jcr) { - char *dev_name, *media_type, *pool_name, *pool_type; + POOLMEM *dev_name, *media_type, *pool_name, *pool_type; BSOCK *dir = jcr->dir_bsock; DEVRES *device; @@ -235,10 +247,10 @@ static int use_device_cmd(JCR *jcr) } Dmsg1(20, "Use device: %s", dir->msg); - dev_name = (char *) get_memory(dir->msglen); - media_type = (char *) get_memory(dir->msglen); - pool_name = (char *) get_memory(dir->msglen); - pool_type = (char *) get_memory(dir->msglen); + dev_name = get_memory(dir->msglen); + media_type = get_memory(dir->msglen); + pool_name = get_memory(dir->msglen); + pool_type = get_memory(dir->msglen); if (sscanf(dir->msg, use_device, dev_name, media_type, pool_name, pool_type) == 4) { unbash_spaces(dev_name); unbash_spaces(media_type); @@ -250,13 +262,13 @@ static int use_device_cmd(JCR *jcr) /* Find resource, and make sure we were able to open it */ if (strcmp(device->hdr.name, dev_name) == 0 && device->dev) { Dmsg1(20, "Found device %s\n", device->hdr.name); - jcr->pool_name = (char *) get_memory(strlen(pool_name) + 1); + jcr->pool_name = get_memory(strlen(pool_name) + 1); strcpy(jcr->pool_name, pool_name); - jcr->pool_type = (char *) get_memory(strlen(pool_type) + 1); + jcr->pool_type = get_memory(strlen(pool_type) + 1); strcpy(jcr->pool_type, pool_type); - jcr->media_type = (char *) get_memory(strlen(media_type) + 1); + jcr->media_type = get_memory(strlen(media_type) + 1); strcpy(jcr->media_type, media_type); - jcr->dev_name = (char *) get_memory(strlen(dev_name) + 1); + jcr->dev_name = get_memory(strlen(dev_name) + 1); strcpy(jcr->dev_name, dev_name); jcr->device = device; Dmsg4(20, use_device, dev_name, media_type, pool_name, pool_type); @@ -308,5 +320,12 @@ void stored_free_jcr(JCR *jcr) if (jcr->job_name) { free_pool_memory(jcr->job_name); } + if (jcr->client_name) { + free_memory(jcr->client_name); + jcr->client_name = NULL; + } + if (jcr->fileset_name) { + free_memory(jcr->fileset_name); + } return; } diff --git a/bacula/src/stored/label.c b/bacula/src/stored/label.c index 8be64279fd..ff9f5b05d2 100644 --- a/bacula/src/stored/label.c +++ b/bacula/src/stored/label.c @@ -38,7 +38,8 @@ extern char my_name[]; extern int debug_level; char BaculaId[] = "Bacula 0.9 mortal\n"; -unsigned int BaculaTapeVersion = 9; +unsigned int BaculaTapeVersion = 10; +unsigned int OldCompatableBaculaTapeVersion = 9; /* @@ -116,7 +117,8 @@ because:\n %s"), dev_name(dev), strerror_dev(dev)); empty_block(block); rewind_dev(dev); - if (dev->VolHdr.VerNum != BaculaTapeVersion) { + if (dev->VolHdr.VerNum != BaculaTapeVersion && + dev->VolHdr.VerNum != OldCompatableBaculaTapeVersion) { Mmsg(&jcr->errmsg, _("Volume on %s has wrong Bacula version. Wanted %d got %d\n"), dev_name(dev), BaculaTapeVersion, dev->VolHdr.VerNum); return jcr->label_status = VOL_VERSION_ERROR; @@ -431,8 +433,14 @@ void create_session_label(JCR *jcr, DEV_RECORD *rec, int label) ser_string(jcr->pool_name); ser_string(jcr->pool_type); - ser_string(jcr->job_name); + ser_string(jcr->job_name); /* base Job name */ ser_string(jcr->client_name); + /* Added in VerNum 10 */ + ser_string(jcr->Job); /* Unique name of this Job */ + ser_string(jcr->fileset_name); + ser_uint32(jcr->JobType); + ser_uint32(jcr->JobLevel); + if (label == EOS_LABEL) { ser_uint32(jcr->JobFiles); ser_uint64(jcr->JobBytes); @@ -569,6 +577,12 @@ int unser_session_label(SESSION_LABEL *label, DEV_RECORD *rec) unser_string(label->PoolType); unser_string(label->JobName); unser_string(label->ClientName); + if (label->VerNum > 9) { + unser_string(label->Job); /* Unique name of this Job */ + unser_string(label->FileSetName); + unser_uint32(label->JobType); + unser_uint32(label->JobLevel); + } if (rec->FileIndex == EOS_LABEL) { unser_uint32(label->JobFiles); unser_uint64(label->JobBytes); @@ -604,6 +618,15 @@ ClientName : %s\n\ label.JobId, label.PoolName, label.PoolType, label.JobName, label.ClientName); + if (label.VerNum >= 10) { + Dmsg4(-1, "\ +Job (unique name) : %s\n\ +FileSet : %s\n\ +JobType : %c\n\ +JobLevel : %c\n\ +", label.Job, label.FileSetName, label.JobType, label.JobLevel); + } + if (rec->FileIndex == EOS_LABEL) { Dmsg7(-1, "\ JobFiles : %s\n\ diff --git a/bacula/src/stored/record.c b/bacula/src/stored/record.c index 3e4dedb2f3..5ed343aff5 100644 --- a/bacula/src/stored/record.c +++ b/bacula/src/stored/record.c @@ -35,7 +35,10 @@ extern int debug_level; /* * Convert a FileIndex into a printable - * ASCII string. Not reentrant. + * ASCII string. Not reentrant. + * If the FileIndex is negative, it flags the + * record as a Label, otherwise it is simply + * the FileIndex of the current file. */ char *FI_to_ascii(int fi) { @@ -126,7 +129,6 @@ int read_record(DEVICE *dev, DEV_BLOCK *block, DEV_RECORD *record) Dmsg2(90, "!read_record_from_block data_len=%d rem=%d\n", record->data_len, record->remainder); if (!read_block_from_dev(dev, block)) { - /**** ****FIXME**** handle getting a new Volume */ Dmsg0(200, "===== Got read block I/O error ======\n"); return 0; } @@ -195,6 +197,11 @@ rem=%d remainder=%d\n", stream_to_ascii(rec->Stream), rec->data_len, remlen, rec->remainder); + /* + * If rec->remainder is non-zero, we have been called a + * second (or subsequent) time to finish writing a record + * that did not previously fit into the block. + */ if (rec->remainder == 0) { /* Require enough room to write a full header */ if (remlen >= RECHDR_LENGTH) { @@ -224,8 +231,12 @@ rem=%d remainder=%d\n", * an error. Note, we may have to continue splitting the * data record though. * - * First, write the header, then write as much as + * First, write the header, then write as much as * possible of the data record. + * + * Every time we write a header and it is a continuation + * of a previous partially written record, we store the + * Stream as -Stream in the record header. */ ser_begin(block->bufp, RECHDR_LENGTH); ser_uint32(rec->VolSessionId); @@ -253,7 +264,8 @@ rem=%d remainder=%d\n", return 0; /* partial transfer */ } - /* Now deal with data record. + /* + * Now deal with data record. * Part of it may have already been transferred, and we * may not have enough room to transfer the whole this time. */ @@ -303,9 +315,12 @@ rem=%d remainder=%d\n", int read_record_from_block(DEV_BLOCK *block, DEV_RECORD *rec) { ser_declare; - uint32_t data_bytes; - int32_t Stream; uint32_t remlen; + uint32_t VolSessionId; + uint32_t VolSessionTime; + int32_t FileIndex; + int32_t Stream; + uint32_t data_bytes; remlen = block->binbuf; @@ -316,12 +331,11 @@ int read_record_from_block(DEV_BLOCK *block, DEV_RECORD *rec) if (remlen >= RECHDR_LENGTH) { Dmsg3(90, "read_record_block: remlen=%d data_len=%d rem=%d\n", remlen, rec->data_len, rec->remainder); -/* memcpy(rec->ser_buf, block->bufp, RECHDR_LENGTH); */ unser_begin(block->bufp, RECHDR_LENGTH); - unser_uint32(rec->VolSessionId); - unser_uint32(rec->VolSessionTime); - unser_int32(rec->FileIndex); + unser_uint32(VolSessionId); + unser_uint32(VolSessionTime); + unser_int32(FileIndex); unser_int32(Stream); unser_uint32(data_bytes); @@ -330,26 +344,42 @@ int read_record_from_block(DEV_BLOCK *block, DEV_RECORD *rec) block->binbuf -= RECHDR_LENGTH; remlen -= RECHDR_LENGTH; + /* + * if Stream is negative, it means that this is a continuation + * of a previous partially written record. + */ if (Stream < 0) { /* continuation record? */ Dmsg1(500, "Got negative Stream => continuation. remainder=%d\n", rec->remainder); - /* ****FIXME**** add code to verify that this - * is the correct continuation of the previous - * record. - */ if (!rec->remainder) { /* if we didn't read previously */ - rec->data_len = 0; /* simply return data */ + rec->data_len = 0; /* return data as if no continuation */ + } else if (rec->VolSessionId != VolSessionId || + rec->VolSessionTime != VolSessionTime || + rec->Stream != -Stream) { + return 0; /* This is from some other Session */ } rec->Stream = -Stream; /* set correct Stream */ } else { /* Regular record */ rec->Stream = Stream; rec->data_len = 0; /* transfer to beginning of data */ } + rec->VolSessionId = VolSessionId; + rec->VolSessionTime = VolSessionTime; + rec->FileIndex = FileIndex; + Dmsg6(90, "rd_rec_blk() got FI=%s SessId=%d Strm=%s len=%d\n\ remlen=%d data_len=%d\n", FI_to_ascii(rec->FileIndex), rec->VolSessionId, stream_to_ascii(rec->Stream), data_bytes, remlen, rec->data_len); } else { + /* + * No more records in this block because the number + * of remaining bytes are less than a record header + * length, so return empty handed, but indicate that + * he must read again. By returning, we allow the + * higher level routine to fetch the next block and + * then reread. + */ Dmsg0(90, "read_record_block: nothing\n"); if (!rec->remainder) { rec->remainder = 1; /* set to expect continuation */ diff --git a/bacula/src/stored/record.h b/bacula/src/stored/record.h index 7d070fd3d1..2d88056fa2 100644 --- a/bacula/src/stored/record.h +++ b/bacula/src/stored/record.h @@ -146,8 +146,13 @@ struct Session_Label { char PoolName[MAX_NAME_LENGTH]; /* Pool name */ char PoolType[MAX_NAME_LENGTH]; /* Pool type */ - char JobName[MAX_NAME_LENGTH]; + char JobName[MAX_NAME_LENGTH]; /* base Job name */ char ClientName[MAX_NAME_LENGTH]; + char Job[MAX_NAME_LENGTH]; /* Unique name of this Job */ + char FileSetName[MAX_NAME_LENGTH]; + uint32_t JobType; + uint32_t JobLevel; + /* The remainder are part of EOS label only */ uint32_t JobFiles; uint64_t JobBytes; uint32_t start_block; diff --git a/bacula/src/stored/stored.h b/bacula/src/stored/stored.h index 7744daff6a..285aa5b5ce 100644 --- a/bacula/src/stored/stored.h +++ b/bacula/src/stored/stored.h @@ -33,6 +33,11 @@ #include "stored_conf.h" #include "jcr.h" #include "protos.h" +#ifdef HAVE_LIBZ +#include /* compression headers */ +#else +#define uLongf uint32_t +#endif /* **** FIXME make this dynamic ****/ #define MAX_DEVICES 20 @@ -47,6 +52,6 @@ struct s_shm { DEVICE dev[MAX_DEVICES]; }; -extern char errmsg[]; /* general error message */ +extern char errmsg[]; /* general error message */ #endif /* __STORED_H_ */ diff --git a/bacula/src/version.h b/bacula/src/version.h index fbf94e1f31..566250e86b 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -1,8 +1,8 @@ /* */ -#define VERSION "1.20" +#define VERSION "1.21" #define VSTRING "1" -#define DATE "26 May 2002" -#define LSMDATE "26May02" +#define DATE "2 June 2002" +#define LSMDATE "02Jun02" /* Debug flags */ #define DEBUG 1 -- 2.39.5