]> git.sur5r.net Git - bacula/bacula/commitdiff
JobStatus updates
authorKern Sibbald <kern@sibbald.com>
Tue, 14 Jan 2003 16:41:21 +0000 (16:41 +0000)
committerKern Sibbald <kern@sibbald.com>
Tue, 14 Jan 2003 16:41:21 +0000 (16:41 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@288 91ce42f0-d328-0410-95d8-f526ca767f89

36 files changed:
bacula/autoconf/acconfig.h
bacula/autoconf/config.h.in
bacula/autoconf/configure.in
bacula/configure
bacula/src/dird/backup.c
bacula/src/dird/fd_cmds.c
bacula/src/dird/job.c
bacula/src/dird/msgchan.c
bacula/src/dird/restore.c
bacula/src/dird/sql_cmds.c
bacula/src/dird/ua_cmds.c
bacula/src/dird/verify.c
bacula/src/filed/backup.c
bacula/src/filed/estimate.c
bacula/src/filed/filed.h
bacula/src/filed/job.c
bacula/src/filed/restore.c
bacula/src/filed/verify.c
bacula/src/filed/verify_vol.c
bacula/src/findlib/find.c
bacula/src/findlib/find.h
bacula/src/findlib/find_one.c
bacula/src/findlib/protos.h
bacula/src/jcr.h
bacula/src/lib/jcr.c
bacula/src/lib/md5.c
bacula/src/stored/append.c
bacula/src/stored/askdir.c
bacula/src/stored/bsr.h
bacula/src/stored/btape.c
bacula/src/stored/dircmd.c
bacula/src/stored/job.c
bacula/src/stored/label.c
bacula/src/stored/stored.h
bacula/src/stored/stored_conf.h
bacula/src/tools/testfind.c

index 250f8b7a8fffdf860c5d38b0706cf14531b48bbb..87d1815c785a7df1020012dab71867884c79deae 100644 (file)
@@ -26,7 +26,6 @@
 /* Define if you want to use embedded MySQL */
 #undef HAVE_EMBEDDED_MYSQL
 
-
 /* Define if you want to use SQLite */
 #undef HAVE_SQLITE
 
 
 #undef HAVE_INET_PTON
  
+#undef HAVE_BIGENDIAN
index 667c89f3559a14c90d196b3bb228ec587fe1673b..b5bf67c9d1ef2066d50bbc427a550e6a45c05489 100644 (file)
@@ -27,7 +27,6 @@
 /* Define if you want to use embedded MySQL */
 #undef HAVE_EMBEDDED_MYSQL
 
-
 /* Define if you want to use SQLite */
 #undef HAVE_SQLITE
 
 
 #undef HAVE_INET_PTON
 
+#undef HAVE_BIGENDIAN
+
 /* The number of bytes in a char.  */
 #undef SIZEOF_CHAR
 
index e7172e06030504477c6c899f6f25b40b73247c96..deb101adde6081d137d5cedf0700e700f0e012c8 100644 (file)
@@ -791,10 +791,9 @@ AC_STRUCT_ST_BLKSIZE
 AC_STRUCT_ST_BLOCKS
 AC_STRUCT_TIMEZONE
 
-# It seems that that many machines where <utime.h> seems to be
-# broken just require something like -D_XXX_SOURCE, where XXX might
-# be POSIX, POSIX_C, ALL, HPUX or whatever, depending on the machine.
-
+dnl# --------------------------------------------------------------------------
+dnl# Check for utime.h structure 
+dnl# --------------------------------------------------------------------------
 AC_CACHE_CHECK(for utime.h, tar_cv_header_utime_h,
   [AC_TRY_COMPILE([
 #include <sys/types.h>
@@ -802,6 +801,18 @@ AC_CACHE_CHECK(for utime.h, tar_cv_header_utime_h,
   tar_cv_header_utime_h=yes, tar_cv_header_utime_h=no)])
 test $tar_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
 
+dnl# --------------------------------------------------------------------------
+dnl# Check for bigendian
+dnl# --------------------------------------------------------------------------
+AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
+  [AC_TRY_RUN(
+    [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
+    [ba_cv_bigendian=yes], 
+    [ba_cv_bigendian=no], 
+    [ba_cv_bigendian=no])])
+test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
+
+
 AC_C_CONST
 
 
index a62ae40943f4b3e5ff7887d2c700063487e2b68b..5b2d2c2b9bcaf4bf1bb5a8b83ad991c4b7a17640 100755 (executable)
@@ -5855,17 +5855,13 @@ EOF
 fi
 
 
-# It seems that that many machines where <utime.h> seems to be
-# broken just require something like -D_XXX_SOURCE, where XXX might
-# 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:5864: checking for utime.h" >&5
+echo "configure:5860: 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 <<EOF
-#line 5869 "configure"
+#line 5865 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -5874,7 +5870,7 @@ int main() {
 struct utimbuf foo
 ; return 0; }
 EOF
-if { (eval echo configure:5878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   tar_cv_header_utime_h=yes
 else
@@ -5892,13 +5888,47 @@ test $tar_cv_header_utime_h = yes && cat >> confdefs.h <<\EOF
 EOF
 
 
+echo $ac_n "checking for bigendian""... $ac_c" 1>&6
+echo "configure:5893: checking for bigendian" >&5
+if eval "test \"`echo '$''{'ba_cv_bigendian'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ba_cv_bigendian=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 5901 "configure"
+#include "confdefs.h"
+main(){long a=1L; char *p=(char *)&a; exit(*p);}
+EOF
+if { (eval echo configure:5905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ba_cv_bigendian=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ba_cv_bigendian=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ba_cv_bigendian" 1>&6
+test $ba_cv_bigendian = yes && cat >> confdefs.h <<\EOF
+#define HAVE_BIGENDIAN 1
+EOF
+
+
+
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:5897: checking for working const" >&5
+echo "configure:5927: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5902 "configure"
+#line 5932 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -5947,7 +5977,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:5951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -5970,17 +6000,17 @@ fi
 
 
 echo $ac_n "checking how to get filesystem type""... $ac_c" 1>&6
-echo "configure:5974: checking how to get filesystem type" >&5
+echo "configure:6004: checking how to get filesystem type" >&5
 fstype=no
 # The order of these tests is important.
 cat > conftest.$ac_ext <<EOF
-#line 5978 "configure"
+#line 6008 "configure"
 #include "confdefs.h"
 #include <sys/statvfs.h>
 #include <sys/fstyp.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6014: \"$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*
@@ -5996,13 +6026,13 @@ fi
 rm -f conftest*
 if test $fstype = no; then
 cat > conftest.$ac_ext <<EOF
-#line 6000 "configure"
+#line 6030 "configure"
 #include "confdefs.h"
 #include <sys/statfs.h>
 #include <sys/fstyp.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6036: \"$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*
@@ -6019,13 +6049,13 @@ rm -f conftest*
 fi
 if test $fstype = no; then
 cat > conftest.$ac_ext <<EOF
-#line 6023 "configure"
+#line 6053 "configure"
 #include "confdefs.h"
 #include <sys/statfs.h>
 #include <sys/vmount.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6059: \"$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*
@@ -6042,12 +6072,12 @@ rm -f conftest*
 fi
 if test $fstype = no; then  
 cat > conftest.$ac_ext <<EOF
-#line 6046 "configure"
+#line 6076 "configure"
 #include "confdefs.h"
 #include <mntent.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6081: \"$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*
@@ -6064,7 +6094,7 @@ rm -f conftest*
 fi
 if test $fstype = no; then  
 cat > conftest.$ac_ext <<EOF
-#line 6068 "configure"
+#line 6098 "configure"
 #include "confdefs.h"
 #include <sys/mount.h>
 EOF
@@ -6081,13 +6111,13 @@ rm -f conftest*
 fi
 if test $fstype = no; then  
 cat > conftest.$ac_ext <<EOF
-#line 6085 "configure"
+#line 6115 "configure"
 #include "confdefs.h"
 #include <sys/mount.h>
 #include <sys/fs_types.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6121: \"$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*
@@ -6105,12 +6135,12 @@ fi
 echo "$ac_t""$fstype" 1>&6
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:6109: checking return type of signal handlers" >&5
+echo "configure:6139: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6114 "configure"
+#line 6144 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -6127,7 +6157,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:6131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -6147,13 +6177,13 @@ EOF
 
 
 echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
-echo "configure:6151: checking for type of signal functions" >&5
+echo "configure:6181: 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 <<EOF
-#line 6157 "configure"
+#line 6187 "configure"
 #include "confdefs.h"
 #include <signal.h>
 int main() {
@@ -6166,7 +6196,7 @@ int main() {
   
 ; return 0; }
 EOF
-if { (eval echo configure:6170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   bash_cv_signal_vintage=posix
 else
@@ -6175,7 +6205,7 @@ else
   rm -rf conftest*
   
     cat > conftest.$ac_ext <<EOF
-#line 6179 "configure"
+#line 6209 "configure"
 #include "confdefs.h"
 #include <signal.h>
 int main() {
@@ -6185,7 +6215,7 @@ int main() {
     
 ; return 0; }
 EOF
-if { (eval echo configure:6189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6219: \"$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
@@ -6194,7 +6224,7 @@ else
   rm -rf conftest*
   
       cat > conftest.$ac_ext <<EOF
-#line 6198 "configure"
+#line 6228 "configure"
 #include "confdefs.h"
 
         #include <signal.h>
@@ -6207,7 +6237,7 @@ int main() {
         
 ; return 0; }
 EOF
-if { (eval echo configure:6211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   bash_cv_signal_vintage=svr3
 else
@@ -6246,12 +6276,12 @@ EOF
 fi
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:6250: checking for mode_t" >&5
+echo "configure:6280: checking for mode_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6255 "configure"
+#line 6285 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6279,12 +6309,12 @@ EOF
 fi
 
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:6283: checking for uid_t in sys/types.h" >&5
+echo "configure:6313: checking for uid_t in sys/types.h" >&5
 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6288 "configure"
+#line 6318 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
@@ -6313,12 +6343,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:6317: checking for size_t" >&5
+echo "configure:6347: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6322 "configure"
+#line 6352 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6346,12 +6376,12 @@ EOF
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:6350: checking for pid_t" >&5
+echo "configure:6380: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6355 "configure"
+#line 6385 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6379,12 +6409,12 @@ EOF
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:6383: checking for off_t" >&5
+echo "configure:6413: checking for off_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6388 "configure"
+#line 6418 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6412,12 +6442,12 @@ EOF
 fi
 
 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
-echo "configure:6416: checking for ino_t" >&5
+echo "configure:6446: checking for ino_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6421 "configure"
+#line 6451 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6445,12 +6475,12 @@ EOF
 fi
 
 echo $ac_n "checking for dev_t""... $ac_c" 1>&6
-echo "configure:6449: checking for dev_t" >&5
+echo "configure:6479: 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 <<EOF
-#line 6454 "configure"
+#line 6484 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6478,12 +6508,12 @@ EOF
 fi
 
 echo $ac_n "checking for daddr_t""... $ac_c" 1>&6
-echo "configure:6482: checking for daddr_t" >&5
+echo "configure:6512: 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 <<EOF
-#line 6487 "configure"
+#line 6517 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6511,12 +6541,12 @@ EOF
 fi
 
 echo $ac_n "checking for major_t""... $ac_c" 1>&6
-echo "configure:6515: checking for major_t" >&5
+echo "configure:6545: 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 <<EOF
-#line 6520 "configure"
+#line 6550 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6544,12 +6574,12 @@ EOF
 fi
 
 echo $ac_n "checking for minor_t""... $ac_c" 1>&6
-echo "configure:6548: checking for minor_t" >&5
+echo "configure:6578: 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 <<EOF
-#line 6553 "configure"
+#line 6583 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6577,12 +6607,12 @@ EOF
 fi
 
 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:6581: checking for ssize_t" >&5
+echo "configure:6611: checking for ssize_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6586 "configure"
+#line 6616 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6610,12 +6640,12 @@ EOF
 fi
 
 echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
-echo "configure:6614: checking for st_blocks in struct stat" >&5
+echo "configure:6644: 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 <<EOF
-#line 6619 "configure"
+#line 6649 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -6623,7 +6653,7 @@ int main() {
 struct stat s; s.st_blocks;
 ; return 0; }
 EOF
-if { (eval echo configure:6627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_st_blocks=yes
 else
@@ -6646,12 +6676,12 @@ else
 fi
 
 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
-echo "configure:6650: checking for st_rdev in struct stat" >&5
+echo "configure:6680: checking for st_rdev in struct stat" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6655 "configure"
+#line 6685 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -6659,7 +6689,7 @@ int main() {
 struct stat s; s.st_rdev;
 ; return 0; }
 EOF
-if { (eval echo configure:6663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_st_rdev=yes
 else
@@ -6680,12 +6710,12 @@ EOF
 fi
 
 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:6684: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:6714: 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 <<EOF
-#line 6689 "configure"
+#line 6719 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -6693,7 +6723,7 @@ int main() {
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:6697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -6714,12 +6744,12 @@ EOF
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:6718: checking for working const" >&5
+echo "configure:6748: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6723 "configure"
+#line 6753 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -6768,7 +6798,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:6772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -6791,7 +6821,7 @@ fi
 
 
 echo $ac_n "checking size of char""... $ac_c" 1>&6
-echo "configure:6795: checking size of char" >&5
+echo "configure:6825: 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
@@ -6799,7 +6829,7 @@ else
   ac_cv_sizeof_char=1
 else
   cat > conftest.$ac_ext <<EOF
-#line 6803 "configure"
+#line 6833 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main()
@@ -6810,7 +6840,7 @@ int main()
   return(0);
 }
 EOF
-if { (eval echo configure:6814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6844: \"$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
@@ -6830,7 +6860,7 @@ EOF
 
 
 echo $ac_n "checking size of short int""... $ac_c" 1>&6
-echo "configure:6834: checking size of short int" >&5
+echo "configure:6864: 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
@@ -6838,7 +6868,7 @@ else
   ac_cv_sizeof_short_int=2
 else
   cat > conftest.$ac_ext <<EOF
-#line 6842 "configure"
+#line 6872 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main()
@@ -6849,7 +6879,7 @@ int main()
   return(0);
 }
 EOF
-if { (eval echo configure:6853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6883: \"$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
@@ -6869,7 +6899,7 @@ EOF
 
 
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:6873: checking size of int" >&5
+echo "configure:6903: 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
@@ -6877,7 +6907,7 @@ else
   ac_cv_sizeof_int=4
 else
   cat > conftest.$ac_ext <<EOF
-#line 6881 "configure"
+#line 6911 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main()
@@ -6888,7 +6918,7 @@ int main()
   return(0);
 }
 EOF
-if { (eval echo configure:6892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6922: \"$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
@@ -6908,7 +6938,7 @@ EOF
 
 
 echo $ac_n "checking size of long int""... $ac_c" 1>&6
-echo "configure:6912: checking size of long int" >&5
+echo "configure:6942: 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
@@ -6916,7 +6946,7 @@ else
   ac_cv_sizeof_long_int=4
 else
   cat > conftest.$ac_ext <<EOF
-#line 6920 "configure"
+#line 6950 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main()
@@ -6927,7 +6957,7 @@ int main()
   return(0);
 }
 EOF
-if { (eval echo configure:6931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6961: \"$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
@@ -6947,7 +6977,7 @@ EOF
 
 
 echo $ac_n "checking size of long long int""... $ac_c" 1>&6
-echo "configure:6951: checking size of long long int" >&5
+echo "configure:6981: 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
@@ -6955,7 +6985,7 @@ else
   ac_cv_sizeof_long_long_int=8
 else
   cat > conftest.$ac_ext <<EOF
-#line 6959 "configure"
+#line 6989 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main()
@@ -6966,7 +6996,7 @@ int main()
   return(0);
 }
 EOF
-if { (eval echo configure:6970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7000: \"$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
@@ -6986,7 +7016,7 @@ EOF
 
 
 echo $ac_n "checking size of int *""... $ac_c" 1>&6
-echo "configure:6990: checking size of int *" >&5
+echo "configure:7020: 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
@@ -6994,7 +7024,7 @@ else
   ac_cv_sizeof_int_p=4
 else
   cat > conftest.$ac_ext <<EOF
-#line 6998 "configure"
+#line 7028 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int main()
@@ -7005,7 +7035,7 @@ int main()
   return(0);
 }
 EOF
-if { (eval echo configure:7009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7039: \"$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
@@ -7027,20 +7057,20 @@ EOF
 
 # Check for sys/types.h types
 echo $ac_n "checking for u_int type""... $ac_c" 1>&6
-echo "configure:7031: checking for u_int type" >&5
+echo "configure:7061: 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 <<EOF
-#line 7037 "configure"
+#line 7067 "configure"
 #include "confdefs.h"
  #include <sys/types.h> 
 int main() {
  u_int a; a = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:7044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
    ac_cv_have_u_int="yes" 
 else
@@ -7064,20 +7094,20 @@ EOF
 fi
 
 echo $ac_n "checking for intmax_t type""... $ac_c" 1>&6
-echo "configure:7068: checking for intmax_t type" >&5
+echo "configure:7098: 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 <<EOF
-#line 7074 "configure"
+#line 7104 "configure"
 #include "confdefs.h"
  #include <sys/types.h> 
 int main() {
  intmax_t a; a = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:7081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
    ac_cv_have_intmax_t="yes" 
 else
@@ -7086,14 +7116,14 @@ else
   rm -rf conftest*
    
         cat > conftest.$ac_ext <<EOF
-#line 7090 "configure"
+#line 7120 "configure"
 #include "confdefs.h"
  #include <stdint.h> 
 int main() {
  intmax_t a; a = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:7097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
    ac_cv_have_intmax_t="yes" 
 else
@@ -7123,20 +7153,20 @@ fi
 
 
 echo $ac_n "checking for u_intmax_t type""... $ac_c" 1>&6
-echo "configure:7127: checking for u_intmax_t type" >&5
+echo "configure:7157: 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 <<EOF
-#line 7133 "configure"
+#line 7163 "configure"
 #include "confdefs.h"
  #include <sys/types.h> 
 int main() {
  u_intmax_t a; a = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:7140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
    ac_cv_have_u_intmax_t="yes" 
 else
@@ -7145,14 +7175,14 @@ else
   rm -rf conftest*
    
         cat > conftest.$ac_ext <<EOF
-#line 7149 "configure"
+#line 7179 "configure"
 #include "confdefs.h"
  #include <stdint.h> 
 int main() {
  u_intmax_t a; a = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:7156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
    ac_cv_have_u_intmax_t="yes" 
 else
@@ -7181,20 +7211,20 @@ fi
 
 
 echo $ac_n "checking for intXX_t types""... $ac_c" 1>&6
-echo "configure:7185: checking for intXX_t types" >&5
+echo "configure:7215: 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 <<EOF
-#line 7191 "configure"
+#line 7221 "configure"
 #include "confdefs.h"
  #include <sys/types.h> 
 int main() {
  int8_t a; int16_t b; int32_t c; a = b = c = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:7198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
    ac_cv_have_intxx_t="yes" 
 else
@@ -7218,20 +7248,20 @@ EOF
 fi
        
 echo $ac_n "checking for int64_t type""... $ac_c" 1>&6
-echo "configure:7222: checking for int64_t type" >&5
+echo "configure:7252: 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 <<EOF
-#line 7228 "configure"
+#line 7258 "configure"
 #include "confdefs.h"
  #include <sys/types.h> 
 int main() {
  int64_t a; a = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:7235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
    ac_cv_have_int64_t="yes" 
 else
@@ -7255,20 +7285,20 @@ EOF
 fi
        
 echo $ac_n "checking for u_intXX_t types""... $ac_c" 1>&6
-echo "configure:7259: checking for u_intXX_t types" >&5
+echo "configure:7289: 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 <<EOF
-#line 7265 "configure"
+#line 7295 "configure"
 #include "confdefs.h"
  #include <sys/types.h> 
 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:7272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
    ac_cv_have_u_intxx_t="yes" 
 else
@@ -7292,20 +7322,20 @@ EOF
 fi
 
 echo $ac_n "checking for u_int64_t types""... $ac_c" 1>&6
-echo "configure:7296: checking for u_int64_t types" >&5
+echo "configure:7326: 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 <<EOF
-#line 7302 "configure"
+#line 7332 "configure"
 #include "confdefs.h"
  #include <sys/types.h> 
 int main() {
  u_int64_t a; a = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:7309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
    ac_cv_have_u_int64_t="yes" 
 else
@@ -7332,9 +7362,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:7336: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
+echo "configure:7366: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
    cat > conftest.$ac_ext <<EOF
-#line 7338 "configure"
+#line 7368 "configure"
 #include "confdefs.h"
  #include <sys/bitypes.h>  
 int main() {
@@ -7343,7 +7373,7 @@ int main() {
        a = b = c = e = f = g = 1;  
 ; return 0; }
 EOF
-if { (eval echo configure:7347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
    cat >> confdefs.h <<\EOF
 #define HAVE_U_INTXX_T 1
@@ -7370,13 +7400,13 @@ fi
 
 if test -z "$have_u_intxx_t" ; then
    echo $ac_n "checking for uintXX_t types""... $ac_c" 1>&6
-echo "configure:7374: checking for uintXX_t types" >&5
+echo "configure:7404: 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 <<EOF
-#line 7380 "configure"
+#line 7410 "configure"
 #include "confdefs.h"
  #include <sys/types.h> 
 int main() {
@@ -7384,7 +7414,7 @@ int main() {
           uint32_t c; a = b = c = 1; 
 ; return 0; }
 EOF
-if { (eval echo configure:7388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
    ac_cv_have_uintxx_t="yes" 
 else
@@ -7425,12 +7455,12 @@ for ac_func in \
        
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7429: checking for $ac_func" >&5
+echo "configure:7459: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7434 "configure"
+#line 7464 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7453,7 +7483,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7487: \"$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
@@ -7483,12 +7513,12 @@ done
 for ac_func in fchdir
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7487: checking for $ac_func" >&5
+echo "configure:7517: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7492 "configure"
+#line 7522 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7511,7 +7541,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7545: \"$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
@@ -7542,12 +7572,12 @@ done
 for ac_func in snprintf vsnprintf gethostid getdomainname
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7546: checking for $ac_func" >&5
+echo "configure:7576: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7551 "configure"
+#line 7581 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7570,7 +7600,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7604: \"$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
@@ -7598,12 +7628,12 @@ done
 for ac_func in localtime_r readdir_r strerror_r gethostbyname_r
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7602: checking for $ac_func" >&5
+echo "configure:7632: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7607 "configure"
+#line 7637 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7626,7 +7656,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7660: \"$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
@@ -7653,12 +7683,12 @@ done
 
 # If resolver functions are not in libc check for -lnsl or -lresolv.
 echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
-echo "configure:7657: checking for gethostbyname_r" >&5
+echo "configure:7687: checking for gethostbyname_r" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7662 "configure"
+#line 7692 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname_r(); below.  */
@@ -7681,7 +7711,7 @@ gethostbyname_r();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname_r=yes"
 else
@@ -7699,7 +7729,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for gethostbyname_r in -lnsl""... $ac_c" 1>&6
-echo "configure:7703: checking for gethostbyname_r in -lnsl" >&5
+echo "configure:7733: checking for gethostbyname_r in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname_r | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7707,7 +7737,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7711 "configure"
+#line 7741 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7718,7 +7748,7 @@ int main() {
 gethostbyname_r()
 ; return 0; }
 EOF
-if { (eval echo configure:7722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7752: \"$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
@@ -7746,7 +7776,7 @@ else
 fi
 
     echo $ac_n "checking for gethostbyname_r in -lresolv""... $ac_c" 1>&6
-echo "configure:7750: checking for gethostbyname_r in -lresolv" >&5
+echo "configure:7780: checking for gethostbyname_r in -lresolv" >&5
 ac_lib_var=`echo resolv'_'gethostbyname_r | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7754,7 +7784,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7758 "configure"
+#line 7788 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7765,7 +7795,7 @@ int main() {
 gethostbyname_r()
 ; return 0; }
 EOF
-if { (eval echo configure:7769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7799: \"$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
@@ -7798,12 +7828,12 @@ fi
 
 # Find where sockets are (especially for Solaris)
 echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:7802: checking for socket" >&5
+echo "configure:7832: 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 <<EOF
-#line 7807 "configure"
+#line 7837 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char socket(); below.  */
@@ -7826,7 +7856,7 @@ socket();
 
 ; return 0; }
 EOF
-if { (eval echo configure:7830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7860: \"$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
@@ -7844,7 +7874,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:7848: checking for socket in -lxnet" >&5
+echo "configure:7878: 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
@@ -7852,7 +7882,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lxnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7856 "configure"
+#line 7886 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7863,7 +7893,7 @@ int main() {
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:7867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7897: \"$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
@@ -7891,7 +7921,7 @@ else
 fi
 
     echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:7895: checking for socket in -lsocket" >&5
+echo "configure:7925: 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
@@ -7899,7 +7929,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7903 "configure"
+#line 7933 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7910,7 +7940,7 @@ int main() {
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:7914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7944: \"$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
@@ -7938,7 +7968,7 @@ else
 fi
 
     echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
-echo "configure:7942: checking for socket in -linet" >&5
+echo "configure:7972: 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
@@ -7946,7 +7976,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-linet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7950 "configure"
+#line 7980 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7957,7 +7987,7 @@ int main() {
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:7961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7991: \"$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
@@ -7990,12 +8020,12 @@ fi
 for ac_func in inet_pton
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7994: checking for $ac_func" >&5
+echo "configure:8024: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7999 "configure"
+#line 8029 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8018,7 +8048,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:8022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8052: \"$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,12 +8077,12 @@ done
 
 
 echo $ac_n "checking for strftime""... $ac_c" 1>&6
-echo "configure:8051: checking for strftime" >&5
+echo "configure:8081: 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 <<EOF
-#line 8056 "configure"
+#line 8086 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char strftime(); below.  */
@@ -8075,7 +8105,7 @@ strftime();
 
 ; return 0; }
 EOF
-if { (eval echo configure:8079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8109: \"$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
@@ -8097,7 +8127,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:8101: checking for strftime in -lintl" >&5
+echo "configure:8131: 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
@@ -8105,7 +8135,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8109 "configure"
+#line 8139 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8116,7 +8146,7 @@ int main() {
 strftime()
 ; return 0; }
 EOF
-if { (eval echo configure:8120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8150: \"$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
@@ -8143,12 +8173,12 @@ fi
 fi
 
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:8147: checking for vprintf" >&5
+echo "configure:8177: 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 <<EOF
-#line 8152 "configure"
+#line 8182 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -8171,7 +8201,7 @@ vprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:8175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8205: \"$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
@@ -8195,12 +8225,12 @@ fi
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:8199: checking for _doprnt" >&5
+echo "configure:8229: 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 <<EOF
-#line 8204 "configure"
+#line 8234 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
@@ -8223,7 +8253,7 @@ _doprnt();
 
 ; return 0; }
 EOF
-if { (eval echo configure:8227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8257: \"$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
@@ -8250,19 +8280,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:8254: checking for working alloca.h" >&5
+echo "configure:8284: 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 <<EOF
-#line 8259 "configure"
+#line 8289 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:8266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8296: \"$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
@@ -8283,12 +8313,12 @@ EOF
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:8287: checking for alloca" >&5
+echo "configure:8317: 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 <<EOF
-#line 8292 "configure"
+#line 8322 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -8316,7 +8346,7 @@ int main() {
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:8320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8350: \"$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
@@ -8348,12 +8378,12 @@ EOF
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:8352: checking whether alloca needs Cray hooks" >&5
+echo "configure:8382: 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 <<EOF
-#line 8357 "configure"
+#line 8387 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -8378,12 +8408,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&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:8382: checking for $ac_func" >&5
+echo "configure:8412: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8387 "configure"
+#line 8417 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8406,7 +8436,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:8410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8440: \"$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
@@ -8433,7 +8463,7 @@ done
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:8437: checking stack direction for C alloca" >&5
+echo "configure:8467: 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
@@ -8441,7 +8471,7 @@ else
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 8445 "configure"
+#line 8475 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -8460,7 +8490,7 @@ main ()
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:8464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8494: \"$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
@@ -8483,7 +8513,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:8487: checking for getmntent in -lsun" >&5
+echo "configure:8517: 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
@@ -8491,7 +8521,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsun  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8495 "configure"
+#line 8525 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8502,7 +8532,7 @@ int main() {
 getmntent()
 ; return 0; }
 EOF
-if { (eval echo configure:8506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8536: \"$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
@@ -8521,7 +8551,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:8525: checking for getmntent in -lseq" >&5
+echo "configure:8555: 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
@@ -8529,7 +8559,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lseq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8533 "configure"
+#line 8563 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8540,7 +8570,7 @@ int main() {
 getmntent()
 ; return 0; }
 EOF
-if { (eval echo configure:8544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8574: \"$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
@@ -8559,7 +8589,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:8563: checking for getmntent in -lgen" >&5
+echo "configure:8593: 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
@@ -8567,7 +8597,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8571 "configure"
+#line 8601 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8578,7 +8608,7 @@ int main() {
 getmntent()
 ; return 0; }
 EOF
-if { (eval echo configure:8582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8612: \"$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
@@ -8603,12 +8633,12 @@ fi
 fi
 
 echo $ac_n "checking for getmntent""... $ac_c" 1>&6
-echo "configure:8607: checking for getmntent" >&5
+echo "configure:8637: 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 <<EOF
-#line 8612 "configure"
+#line 8642 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getmntent(); below.  */
@@ -8631,7 +8661,7 @@ getmntent();
 
 ; return 0; }
 EOF
-if { (eval echo configure:8635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8665: \"$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
@@ -8654,7 +8684,7 @@ else
 fi
 
 echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
-echo "configure:8658: checking whether closedir returns void" >&5
+echo "configure:8688: 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
@@ -8662,13 +8692,13 @@ else
   ac_cv_func_closedir_void=yes
 else
   cat > conftest.$ac_ext <<EOF
-#line 8666 "configure"
+#line 8696 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_header_dirent>
 int closedir(); main() { exit(closedir(opendir(".")) != 0); }
 EOF
-if { (eval echo configure:8672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8702: \"$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
@@ -8691,7 +8721,7 @@ EOF
 fi
 
 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:8695: checking whether setpgrp takes no argument" >&5
+echo "configure:8725: 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
@@ -8699,7 +8729,7 @@ else
   { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 8703 "configure"
+#line 8733 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_UNISTD_H
@@ -8719,7 +8749,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:8723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8753: \"$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
@@ -8742,7 +8772,7 @@ EOF
 
 fi
                      echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
-echo "configure:8746: checking for working fnmatch" >&5
+echo "configure:8776: 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
@@ -8753,11 +8783,11 @@ if test "$cross_compiling" = yes; then
   ac_cv_func_fnmatch_works=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 8757 "configure"
+#line 8787 "configure"
 #include "confdefs.h"
 main() { exit (fnmatch ("a*", "abc", 0) != 0); }
 EOF
-if { (eval echo configure:8761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8791: \"$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
@@ -8782,7 +8812,7 @@ fi
 
 
 echo $ac_n "checking for setlocale in -lxpg4""... $ac_c" 1>&6
-echo "configure:8786: checking for setlocale in -lxpg4" >&5
+echo "configure:8816: 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
@@ -8790,7 +8820,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lxpg4  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8794 "configure"
+#line 8824 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8801,7 +8831,7 @@ int main() {
 setlocale()
 ; return 0; }
 EOF
-if { (eval echo configure:8805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8835: \"$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
@@ -8824,7 +8854,7 @@ fi
 
 
 echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6
-echo "configure:8828: checking for getpwnam in -lsun" >&5
+echo "configure:8858: 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
@@ -8832,7 +8862,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsun  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8836 "configure"
+#line 8866 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8843,7 +8873,7 @@ int main() {
 getpwnam()
 ; return 0; }
 EOF
-if { (eval echo configure:8847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8877: \"$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
@@ -8875,17 +8905,17 @@ for ac_hdr in zlib.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:8879: checking for $ac_hdr" >&5
+echo "configure:8909: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8884 "configure"
+#line 8914 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8919: \"$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*
@@ -8912,7 +8942,7 @@ fi
 done
 
 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
-echo "configure:8916: checking for deflate in -lz" >&5
+echo "configure:8946: 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
@@ -8920,7 +8950,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lz  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8924 "configure"
+#line 8954 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8931,7 +8961,7 @@ int main() {
 deflate()
 ; return 0; }
 EOF
-if { (eval echo configure:8935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8965: \"$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
@@ -8962,7 +8992,7 @@ fi
 
 PTHREAD_LIB=""
 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:8966: checking for pthread_create in -lpthread" >&5
+echo "configure:8996: 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
@@ -8970,7 +9000,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8974 "configure"
+#line 9004 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -8981,7 +9011,7 @@ int main() {
 pthread_create()
 ; return 0; }
 EOF
-if { (eval echo configure:8985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9015: \"$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
@@ -9000,7 +9030,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:9004: checking for pthread_create in -lpthreads" >&5
+echo "configure:9034: 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
@@ -9008,7 +9038,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthreads  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9012 "configure"
+#line 9042 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9019,7 +9049,7 @@ int main() {
 pthread_create()
 ; return 0; }
 EOF
-if { (eval echo configure:9023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9053: \"$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
@@ -9038,7 +9068,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:9042: checking for pthread_create in -lc_r" >&5
+echo "configure:9072: 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
@@ -9046,7 +9076,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lc_r  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9050 "configure"
+#line 9080 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9057,7 +9087,7 @@ int main() {
 pthread_create()
 ; return 0; }
 EOF
-if { (eval echo configure:9061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9091: \"$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
@@ -9076,12 +9106,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:9080: checking for pthread_create" >&5
+echo "configure:9110: 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 <<EOF
-#line 9085 "configure"
+#line 9115 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char pthread_create(); below.  */
@@ -9104,7 +9134,7 @@ pthread_create();
 
 ; return 0; }
 EOF
-if { (eval echo configure:9108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9138: \"$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
index 7b00d97c9aeb1fa8f5900a5ad1344dd1ed4fa978..27c165b9b97348305af8916d144f95d36b8ed05b 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 /*
-   Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
+   Copyright (C) 2000-2003 Kern Sibbald and John Walker
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -166,7 +166,7 @@ int do_backup(JCR *jcr)
     *
     */
    Dmsg0(110, "Open connection with storage daemon\n");
-   jcr->JobStatus = JS_Blocked;
+   set_jcr_job_status(jcr, JS_Blocked);
    /*
     * Start conversation with Storage daemon  
     */
@@ -187,12 +187,12 @@ int do_backup(JCR *jcr)
    }
    Dmsg0(150, "Storage daemon connection OK\n");
 
-   jcr->JobStatus = JS_Blocked;
+   set_jcr_job_status(jcr, JS_Blocked);
    if (!connect_to_file_daemon(jcr, 10, FDConnectTimeout, 1)) {
       goto bail_out;
    }
 
-   jcr->JobStatus = JS_Running;
+   set_jcr_job_status(jcr, JS_Running);
    fd = jcr->file_bsock;
 
    if (!send_include_list(jcr)) {
@@ -270,12 +270,13 @@ static int wait_for_job_termination(JCR *jcr)
    BSOCK *fd = jcr->file_bsock;
    int fd_ok = FALSE;
 
-   jcr->JobStatus = JS_WaitFD;
+   set_jcr_job_status(jcr, JS_WaitFD);
    /* Wait for Client to terminate */
    while ((n = bget_msg(fd, 0)) >= 0 && !job_cancelled(jcr)) {
-      if (sscanf(fd->msg, EndBackup, &jcr->JobStatus, &jcr->JobFiles,
+      if (sscanf(fd->msg, EndBackup, &jcr->FDJobStatus, &jcr->JobFiles,
          &jcr->ReadBytes, &jcr->JobBytes) == 4) {
         fd_ok = TRUE;
+        set_jcr_job_status(jcr, jcr->FDJobStatus);
          Dmsg1(100, "FDStatus=%c\n", (char)jcr->JobStatus);
       }
    }
@@ -304,7 +305,7 @@ static void backup_cleanup(JCR *jcr, int TermCode, char *since)
 {
    char sdt[50], edt[50];
    char ec1[30], ec2[30], ec3[30], compress[50];
-   char term_code[100];
+   char term_code[100], fd_term_msg[100], sd_term_msg[100];
    char *term_msg;
    int msg_type;
    MEDIA_DBR mr;
@@ -313,7 +314,7 @@ static void backup_cleanup(JCR *jcr, int TermCode, char *since)
 
    Dmsg0(100, "Enter backup_cleanup()\n");
    memset(&mr, 0, sizeof(mr));
-   jcr->JobStatus = TermCode;
+   set_jcr_job_status(jcr, TermCode);
 
    update_job_end_record(jcr);       /* update database */
    
@@ -438,6 +439,8 @@ static void backup_cleanup(JCR *jcr, int TermCode, char *since)
          sprintf(compress, "%.1f %%", (float)compression);
       }
    }
+   jobstatus_to_ascii(jcr->FDJobStatus, fd_term_msg, sizeof(fd_term_msg));
+   jobstatus_to_ascii(jcr->SDJobStatus, sd_term_msg, sizeof(sd_term_msg));
 
    Jmsg(jcr, msg_type, 0, _("Bacula " VERSION " (" LSMDATE "): %s\n\
 JobId:                  %d\n\
@@ -455,6 +458,8 @@ Volume names(s):        %s\n\
 Volume Session Id:      %d\n\
 Volume Session Time:    %d\n\
 Last Volume Bytes:      %s\n\
+FD termination status:  %s\n\
+SD termination status:  %s\n\
 Termination:            %s\n\n"),
        edt,
        jcr->jr.JobId,
@@ -472,6 +477,8 @@ Termination:            %s\n\n"),
        jcr->VolSessionId,
        jcr->VolSessionTime,
        edit_uint64_with_commas(mr.VolBytes, ec3),
+       fd_term_msg,
+       sd_term_msg,
        term_msg);
 
 
index a668d3c7931376a028b7428785806c1b88cb18a9..c44b15e63d29c2a9a1f810cb0e976527d5c89836 100644 (file)
@@ -67,16 +67,16 @@ int connect_to_file_daemon(JCR *jcr, int retry_interval, int max_retry_time,
         _("File daemon"), jcr->client->address, 
        NULL, jcr->client->FDport, verbose);
    if (fd == NULL) {
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       return 0;
    }
    Dmsg0(10, "Opened connection with File daemon\n");
    fd->res = (RES *)jcr->client;      /* save resource in BSOCK */
    jcr->file_bsock = fd;
-   jcr->JobStatus = JS_Running;
+   set_jcr_job_status(jcr, JS_Running);
 
    if (!authenticate_file_daemon(jcr)) {
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       return 0;
    }
        
@@ -90,7 +90,7 @@ int connect_to_file_daemon(JCR *jcr, int retry_interval, int max_retry_time,
        Dmsg1(110, "<filed: %s", fd->msg);
        if (strncmp(fd->msg, OKjob, strlen(OKjob)) != 0) {
           Jmsg(jcr, M_FATAL, 0, _("File daemon rejected Job command: %s\n"), fd->msg);
-         jcr->JobStatus = JS_ErrorTerminated;
+         set_jcr_job_status(jcr, JS_ErrorTerminated);
          return 0;
        } else {
          /***** ***FIXME***** update Client Uname */
@@ -98,7 +98,7 @@ int connect_to_file_daemon(JCR *jcr, int retry_interval, int max_retry_time,
    } else {
       Jmsg(jcr, M_FATAL, 0, _("<filed: bad response to JobId command: %s\n"),
         bnet_strerror(fd));
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       return 0;
    }
    return 1;
@@ -199,7 +199,7 @@ int send_include_list(JCR *jcr)
    return 1;
 
 bail_out:
-   jcr->JobStatus = JS_ErrorTerminated;
+   set_jcr_job_status(jcr, JS_ErrorTerminated);
    return 0;
 
 }
@@ -226,14 +226,14 @@ int send_exclude_list(JCR *jcr)
       fd->msg = fileset->exclude_array[i];
       if (!bnet_send(fd)) {
          Jmsg(jcr, M_FATAL, 0, _(">filed: write error on socket\n"));
-        jcr->JobStatus = JS_ErrorTerminated;
+        set_jcr_job_status(jcr, JS_ErrorTerminated);
         return 0;
       }
    }
    bnet_sig(fd, BNET_EOD);
    fd->msg = msgsave;
    if (!response(fd, OKexc, "Exclude")) {
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       return 0;
    }
    return 1;
@@ -273,7 +273,7 @@ int get_attributes_and_put_in_catalog(JCR *jcr)
       if ((len = sscanf(fd->msg, "%ld %d %s", &file_index, &stream, Opts_MD5)) != 3) {
          Jmsg(jcr, M_FATAL, 0, _("<filed: bad attributes, expected 3 fields got %d\n\
 msglen=%d msg=%s\n"), len, fd->msglen, fd->msg);
-        jcr->JobStatus = JS_ErrorTerminated;
+        set_jcr_job_status(jcr, JS_ErrorTerminated);
         return 0;
       }
       p = fd->msg;
@@ -308,7 +308,7 @@ msglen=%d msg=%s\n"), len, fd->msglen, fd->msg);
 
         if (!db_create_file_attributes_record(jcr->db, &ar)) {
             Jmsg1(jcr, M_ERROR, 0, "%s", db_strerror(jcr->db));
-           jcr->JobStatus = JS_Error;
+           set_jcr_job_status(jcr, JS_Error);
            continue;
         }
         jcr->FileId = ar.FileId;
@@ -316,14 +316,14 @@ msglen=%d msg=%s\n"), len, fd->msglen, fd->msg);
         if (jcr->FileIndex != (uint32_t)file_index) {
             Jmsg2(jcr, M_ERROR, 0, _("MD5 index %d not same as attributes %d\n"),
               file_index, jcr->FileIndex);
-           jcr->JobStatus = JS_Error;
+           set_jcr_job_status(jcr, JS_Error);
            continue;
         }
         db_escape_string(MD5, Opts_MD5, strlen(Opts_MD5));
          Dmsg2(120, "MD5len=%d MD5=%s\n", strlen(MD5), MD5);
         if (!db_add_MD5_to_file_record(jcr->db, jcr->FileId, MD5)) {
             Jmsg1(jcr, M_ERROR, 0, "%s", db_strerror(jcr->db));
-           jcr->JobStatus = JS_Error;
+           set_jcr_job_status(jcr, JS_Error);
         }
       }
       jcr->jr.JobFiles = jcr->JobFiles = file_index;
@@ -332,10 +332,10 @@ msglen=%d msg=%s\n"), len, fd->msglen, fd->msg);
    if (is_bnet_error(fd)) {
       Jmsg1(jcr, M_FATAL, 0, _("<filed: Network error getting attributes. ERR=%s\n"),
                        bnet_strerror(fd));
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       return 0;
    }
 
-   jcr->JobStatus = JS_Terminated;
+   set_jcr_job_status(jcr, JS_Terminated);
    return 1;
 }
index 68ed80a35a160c222407dba25507a451dde391a7..00579eaf8916ab3ecc73065567c2a65d592944e2 100644 (file)
@@ -82,7 +82,7 @@ void run_job(JCR *jcr)
    /* Initialize termination condition variable */
    if ((errstat = pthread_cond_init(&jcr->term_wait, NULL)) != 0) {
       Jmsg1(jcr, M_FATAL, 0, _("Unable to init job cond variable: ERR=%s\n"), strerror(errstat));
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       free_jcr(jcr);
       return;
    }
@@ -96,7 +96,7 @@ void run_job(JCR *jcr)
    if (!db_open_database(jcr->db)) {
       Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db));
       db_close_database(jcr->db);
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       free_jcr(jcr);
       return;
    }
@@ -109,7 +109,7 @@ void run_job(JCR *jcr)
    if (!db_create_job_record(jcr->db, &jcr->jr)) {
       Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db));
       db_close_database(jcr->db);
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       free_jcr(jcr);
       return;
    }
@@ -145,12 +145,12 @@ static void job_thread(void *arg)
    if (jcr->job->MaxStartDelay != 0 && jcr->job->MaxStartDelay <
        (utime_t)(jcr->start_time - jcr->sched_time)) {
       Jmsg(jcr, M_FATAL, 0, _("Job cancelled because max delay time exceeded.\n"));
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       update_job_end_record(jcr);
    } else {
 
       /* Run Job */
-      jcr->JobStatus = JS_Running;
+      set_jcr_job_status(jcr, JS_Running);
 
       if (jcr->job->RunBeforeJob) {
         POOLMEM *before = get_pool_memory(PM_FNAME);
@@ -182,7 +182,7 @@ static void job_thread(void *arg)
         case JT_ADMIN:
            /* No actual job */
            do_autoprune(jcr);
-           jcr->JobStatus = JS_Terminated;
+           set_jcr_job_status(jcr, JS_Terminated);
            break;
         default:
             Pmsg1(0, "Unimplemented job type: %d\n", jcr->JobType);
index deff677137dee8ddec6cbf0aaa506616d99d6825..c8d768296177e6630dce38353af2d7bc554e4598 100644 (file)
@@ -16,7 +16,7 @@
  *   Version $Id$
  */
 /*
-   Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
+   Copyright (C) 2000-2003 Kern Sibbald and John Walker
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -248,7 +248,7 @@ void wait_for_storage_daemon_termination(JCR *jcr)
 {
    /* Now wait for Storage daemon to terminate our message thread */
    P(jcr->mutex);
-   jcr->JobStatus = JS_WaitSD;
+   set_jcr_job_status(jcr, JS_WaitSD);
    while (!jcr->msg_thread_done && !job_cancelled(jcr)) {
       struct timeval tv;
       struct timezone tz;
@@ -261,5 +261,5 @@ void wait_for_storage_daemon_termination(JCR *jcr)
       pthread_cond_timedwait(&jcr->term_wait, &jcr->mutex, &timeout);
    }
    V(jcr->mutex);
-   jcr->JobStatus = jcr->SDJobStatus;
+   set_jcr_job_status(jcr, jcr->SDJobStatus);
 }
index 9fae901c524ebd6cf5b405b637eb8eb5aa4cf995..80ba26a383d691ed40e3fc45cd6f1553c0438a25 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 /*
-   Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
+   Copyright (C) 2000-2003 Kern Sibbald and John Walker
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -137,7 +137,7 @@ int do_restore(JCR *jcr)
     *
     */
    Dmsg0(10, "Open connection with storage daemon\n");
-   jcr->JobStatus = JS_Blocked;
+   set_jcr_job_status(jcr, JS_Blocked);
    /*
     * Start conversation with Storage daemon  
     */
@@ -170,7 +170,7 @@ int do_restore(JCR *jcr)
    }
 
    fd = jcr->file_bsock;
-   jcr->JobStatus = JS_Running;
+   set_jcr_job_status(jcr, JS_Running);
 
    if (!send_include_list(jcr)) {
       restore_cleanup(jcr, JS_ErrorTerminated);
@@ -188,7 +188,7 @@ int do_restore(JCR *jcr)
     *  then wait for File daemon to make connection
     *  with Storage daemon.
     */
-   jcr->JobStatus = JS_Blocked;
+   set_jcr_job_status(jcr, JS_Blocked);
    if (jcr->store->SDDport == 0) {
       jcr->store->SDDport = jcr->store->SDport;
    }
@@ -198,7 +198,7 @@ int do_restore(JCR *jcr)
       restore_cleanup(jcr, JS_ErrorTerminated);
       return 0;
    }
-   jcr->JobStatus = JS_Running;
+   set_jcr_job_status(jcr, JS_Running);
 
    /* 
     * Send the bootstrap file -- what Volumes/files to restore
@@ -257,13 +257,13 @@ int do_restore(JCR *jcr)
    Dmsg0(20, "wait for job termination\n");
    while (bget_msg(fd, 0) >= 0) {
       Dmsg1(100, "dird<filed: %s\n", fd->msg);
-      if (sscanf(fd->msg, EndRestore, &jcr->JobStatus, &jcr->JobFiles,
+      if (sscanf(fd->msg, EndRestore, &jcr->FDJobStatus, &jcr->JobFiles,
          &jcr->JobBytes) == 3) {
         ok = TRUE;
       }
    }
 
-   restore_cleanup(jcr, ok?jcr->JobStatus:JS_ErrorTerminated);
+   restore_cleanup(jcr, ok?jcr->FDJobStatus:JS_ErrorTerminated);
 
    return 1;
 }
@@ -282,7 +282,7 @@ static void restore_cleanup(JCR *jcr, int TermCode)
    double kbps;
 
    Dmsg0(20, "In restore_cleanup\n");
-   jcr->JobStatus = TermCode;
+   set_jcr_job_status(jcr, TermCode);
 
    update_job_end_record(jcr);
 
@@ -355,7 +355,7 @@ static int send_bootstrap_file(JCR *jcr)
    if (!bs) {
       Jmsg(jcr, M_FATAL, 0, _("Could not open bootstrap file %s: ERR=%s\n"), 
         jcr->RestoreBootstrap, strerror(errno));
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       return 0;
    }
    strcpy(fd->msg, bootstrap); 
@@ -368,7 +368,7 @@ static int send_bootstrap_file(JCR *jcr)
    bnet_sig(fd, BNET_EOD);
    fclose(bs);
    if (!response(fd, OKbootstrap, "Bootstrap")) {
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       return 0;
    }
    return 1;
index c8999c36efa0ebda4d676b9e2cb62852db154599..f2e7b3abca538dfd7df1e4780affa02802fa0acb 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 /*
-   Copyright (C) 2002 Kern Sibbald and John Walker
+   Copyright (C) 2002-2003  Kern Sibbald and John Walker
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
index b5c91b5b86fbad2a78b40957fa62d0038de45977..72f72aa309237e71da874d9860b13ff770dcff55 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 /*
-   Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
+   Copyright (C) 2000-2003 Kern Sibbald and John Walker
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -411,7 +411,7 @@ static int cancelcmd(UAContext *ua, char *cmd)
      
    switch (jcr->JobStatus) {
    case JS_Created:
-      jcr->JobStatus = JS_Cancelled;
+      set_jcr_job_status(jcr, JS_Cancelled);
       bsendmsg(ua, _("JobId %d, Job %s marked to be cancelled.\n"),
              jcr->JobId, jcr->Job);
       free_jcr(jcr);
@@ -419,7 +419,7 @@ static int cancelcmd(UAContext *ua, char *cmd)
         
    default:
 
-      jcr->JobStatus = JS_Cancelled;
+      set_jcr_job_status(jcr, JS_Cancelled);
       /* Cancel File daemon */
       ua->jcr->client = jcr->client;
       if (!connect_to_file_daemon(ua->jcr, 10, FDConnectTimeout, 1)) {
index 626cd89edd5895fb021123d31f16fb61c8ed4757..56793efa2563ed6a9d7a8a22ff7f12b5487d8a54 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 /*
-   Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
+   Copyright (C) 2000-2003 Kern Sibbald and John Walker
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -153,7 +153,7 @@ int do_verify(JCR *jcr)
       /*
        * Start conversation with Storage daemon  
        */
-      jcr->JobStatus = JS_Blocked;
+      set_jcr_job_status(jcr, JS_Blocked);
       if (!connect_to_storage_daemon(jcr, 10, SDConnectTimeout, 1)) {
         goto bail_out;
       }
@@ -177,12 +177,12 @@ int do_verify(JCR *jcr)
     * OK, now connect to the File daemon
     *  and ask him for the files.
     */
-   jcr->JobStatus = JS_Blocked;
+   set_jcr_job_status(jcr, JS_Blocked);
    if (!connect_to_file_daemon(jcr, 10, FDConnectTimeout, 1)) {
       goto bail_out;
    }
 
-   jcr->JobStatus = JS_Running;
+   set_jcr_job_status(jcr, JS_Running);
    fd = jcr->file_bsock;
 
    Dmsg0(30, ">filed: Send include list\n");
@@ -264,13 +264,13 @@ int do_verify(JCR *jcr)
       Dmsg0(10, "Verify level=volume\n");
       get_attributes_and_compare_to_catalog(jcr, JobId);
       stat = jcr->JobStatus;
-      jcr->JobStatus = JS_WaitSD;
+      set_jcr_job_status(jcr, JS_WaitSD);
       wait_for_storage_daemon_termination(jcr);
       /* If we terminate normally, use SD term code, else, use ours */
       if (stat == JS_Terminated) {
-        jcr->JobStatus = jcr->SDJobStatus;
+        set_jcr_job_status(jcr, jcr->SDJobStatus);
       } else {
-        jcr->JobStatus = stat;
+        set_jcr_job_status(jcr, stat);
       }
       break;
 
@@ -309,7 +309,7 @@ static void verify_cleanup(JCR *jcr, int TermCode)
    Dmsg0(100, "Enter verify_cleanup()\n");
 
    JobId = jcr->jr.JobId;
-   jcr->JobStatus = TermCode;
+   set_jcr_job_status(jcr, TermCode);
 
    update_job_end_record(jcr);
 
@@ -608,12 +608,12 @@ int get_attributes_and_compare_to_catalog(JCR *jcr, JobId_t JobId)
       stat = JS_Differences;
    }
    free_pool_memory(fname);
-   jcr->JobStatus = stat;
+   set_jcr_job_status(jcr, stat);
    return 1;
     
 bail_out:
    free_pool_memory(fname);
-   jcr->JobStatus = JS_ErrorTerminated;
+   set_jcr_job_status(jcr, JS_ErrorTerminated);
    return 0;
 }
 
index ee06f268e5e09dff4bdf935c5930dab66090c273..b2aaf2649a23a5236e56d671f3be40b76542e709 100644 (file)
@@ -44,7 +44,7 @@ int blast_data_to_storage_daemon(JCR *jcr, char *addr)
 
    sd = jcr->store_bsock;
 
-   jcr->JobStatus = JS_Running;
+   set_jcr_job_status(jcr, JS_Running);
 
    Dmsg1(110, "bfiled: opened data connection %d to stored\n", sd->fd);
 
@@ -63,11 +63,11 @@ int blast_data_to_storage_daemon(JCR *jcr, char *addr)
    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);
+   set_find_options((FF_PKT *)jcr->ff, jcr->incremental, jcr->mtime);
    Dmsg0(110, "start find files\n");
 
    /* Subroutine save_file() is called for each file */
-   if (!find_files(jcr->ff, save_file, (void *)jcr)) {
+   if (!find_files(jcr, (FF_PKT *)jcr->ff, save_file, (void *)jcr)) {
       stat = 0;                      /* error */
    }
 
index ccd5d5763ffdbc77512818de69c1bdfc717fc8f1..dbec154325c59eebfabb23747bf089d14b453b39 100644 (file)
@@ -41,9 +41,9 @@ int make_estimate(JCR *jcr)
 
    jcr->JobStatus = JS_Running;
 
-   set_find_options(jcr->ff, jcr->incremental, jcr->mtime);
+   set_find_options((FF_PKT *)jcr->ff, jcr->incremental, jcr->mtime);
 
-   stat = find_files(jcr->ff, tally_file, (void *)jcr);
+   stat = find_files(jcr, (FF_PKT *)jcr->ff, tally_file, (void *)jcr);
 
    return stat;
 }         
index e16d10318dfa2df4def5388ae7c2f732e9628a1d..749dfd8dad6e09f6d5c3e7c66ae19797ea1b97b9 100644 (file)
@@ -25,8 +25,8 @@
 
  */
 
-#include "findlib/find.h"
 #define FILE_DAEMON 1
+#include "findlib/find.h"
 #include "jcr.h"
 #include "protos.h"                   /* file daemon prototypes */
 #include "filed_conf.h"
index b0418bdcb08f99977243c41f634379efa9d4f0bc..f475e1c2dc650ea2b0056251f266a0ba99de221c 100644 (file)
@@ -196,7 +196,7 @@ void *handle_client_request(void *dirp)
       }
    }
    Dmsg0(100, "Calling term_find_files\n");
-   term_find_files(jcr->ff);
+   term_find_files((FF_PKT *)jcr->ff);
    Dmsg0(100, "Done with term_find_files\n");
    free_jcr(jcr);                    /* destroy JCR record */
    Dmsg0(100, "Done with free_jcr\n");
@@ -231,7 +231,7 @@ static int cancel_cmd(JCR *jcr)
       if (!(cjcr=get_jcr_by_full_name(Job))) {
          bnet_fsend(dir, "2901 Job %s not found.\n", Job);
       } else {
-        cjcr->JobStatus = JS_Cancelled;
+        set_jcr_job_status(cjcr, JS_Cancelled);
         free_jcr(cjcr);
          bnet_fsend(dir, "2001 Job %s marked to be cancelled.\n", Job);
       }
@@ -305,7 +305,7 @@ static int include_cmd(JCR *jcr)
        dir->msg[dir->msglen] = 0;
        strip_trailing_junk(dir->msg);
        Dmsg1(010, "include file: %s\n", dir->msg);
-       add_fname_to_include_list(jcr->ff, 1, dir->msg);
+       add_fname_to_include_list((FF_PKT *)jcr->ff, 1, dir->msg);
    }
 
    return bnet_fsend(dir, OKinc);
@@ -329,7 +329,7 @@ static int exclude_cmd(JCR *jcr)
        /* Skip spaces */
        for ( ; *p && *p == ' '; p++)
          { }
-       add_fname_to_exclude_list(jcr->ff, p);
+       add_fname_to_exclude_list((FF_PKT *)jcr->ff, p);
        Dmsg1(110, "<dird: exclude file %s\n", dir->msg);
    }
 
@@ -492,13 +492,13 @@ static int backup_cmd(JCR *jcr)
    int ok = 0;
    int SDJobStatus;
 
-   jcr->JobStatus = JS_Blocked;
+   set_jcr_job_status(jcr, JS_Blocked);
    jcr->JobType = JT_BACKUP;
-   Dmsg1(100, "begin backup ff=%p\n", jcr->ff);
+   Dmsg1(100, "begin backup ff=%p\n", (FF_PKT *)jcr->ff);
 
    if (sd == NULL) {
       Jmsg(jcr, M_FATAL, 0, _("Cannot contact Storage daemon\n"));
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       goto cleanup;
    }
 
@@ -517,13 +517,13 @@ static int backup_cmd(JCR *jcr)
       Dmsg1(110, "<stored: %s", sd->msg);
       if (sscanf(sd->msg, OK_open, &jcr->Ticket) != 1) {
          Jmsg(jcr, M_FATAL, 0, _("Bad response to append open: %s\n"), sd->msg);
-        jcr->JobStatus = JS_ErrorTerminated;
+        set_jcr_job_status(jcr, JS_ErrorTerminated);
         goto cleanup;
       }
       Dmsg1(110, "Got Ticket=%d\n", jcr->Ticket);
    } else {
       Jmsg(jcr, M_FATAL, 0, _("Bad response from stored to open command\n"));
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       goto cleanup;
    }
 
@@ -538,23 +538,23 @@ static int backup_cmd(JCR *jcr)
     */
    Dmsg1(110, "<stored: %s", sd->msg);
    if (!response(jcr, sd, OK_data, "Append Data")) {
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       goto cleanup;
    }
       
    /*
     * Send Files to Storage daemon
     */
-   Dmsg1(110, "begin blast ff=%p\n", jcr->ff);
+   Dmsg1(110, "begin blast ff=%p\n", (FF_PKT *)jcr->ff);
    if (!blast_data_to_storage_daemon(jcr, NULL)) {
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
    } else {
-      jcr->JobStatus = JS_Terminated;
+      set_jcr_job_status(jcr, JS_Terminated);
       /* 
        * Expect to get response to append_data from Storage daemon
        */
       if (!response(jcr, sd, OK_append, "Append Data")) {
-        jcr->JobStatus = JS_ErrorTerminated;
+        set_jcr_job_status(jcr, JS_ErrorTerminated);
         goto cleanup;
       }
      
@@ -564,7 +564,7 @@ static int backup_cmd(JCR *jcr)
       bnet_fsend(sd, append_end, jcr->Ticket);
       /* Get end OK */
       if (!response(jcr, sd, OK_end, "Append End")) {
-        jcr->JobStatus = JS_ErrorTerminated;
+        set_jcr_job_status(jcr, JS_ErrorTerminated);
         goto cleanup;
       }
 
@@ -580,13 +580,13 @@ static int backup_cmd(JCR *jcr)
       }
       if (!ok) {
          Jmsg(jcr, M_FATAL, 0, _("Append Close with SD failed.\n"));
-        jcr->JobStatus = JS_ErrorTerminated;
+        set_jcr_job_status(jcr, JS_ErrorTerminated);
         goto cleanup;
       }
       if (SDJobStatus != JS_Terminated) {
          Jmsg(jcr, M_FATAL, 0, _("Bad status %d returned from Storage Daemon.\n"),
            SDJobStatus);
-        jcr->JobStatus = JS_ErrorTerminated;
+        set_jcr_job_status(jcr, JS_ErrorTerminated);
       }
    }
 
@@ -708,7 +708,7 @@ static int restore_cmd(JCR *jcr)
    Dmsg1(110, "bfiled>dird: %s", dir->msg);
 
    jcr->JobType = JT_RESTORE;
-   jcr->JobStatus = JS_Blocked;
+   set_jcr_job_status(jcr, JS_Blocked);
 
    if (!open_sd_read_session(jcr)) {
       return 0;
@@ -860,7 +860,7 @@ static int send_bootstrap_file(JCR *jcr)
    if (!bs) {
       Jmsg(jcr, M_FATAL, 0, _("Could not open bootstrap file %s: ERR=%s\n"), 
         jcr->RestoreBootstrap, strerror(errno));
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       return 0;
    }
    strcpy(sd->msg, bootstrap); 
@@ -873,7 +873,7 @@ static int send_bootstrap_file(JCR *jcr)
    bnet_sig(sd, BNET_EOD);
    fclose(bs);
    if (!response(jcr, sd, OKSDbootstrap, "Bootstrap")) {
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       return 0;
    }
    return 1;
index e6b83112fe8f9b2914de56f69a685c9bba2423ae..b4d2ec631aa162444dce6dd5fe80411cac2fb24a 100644 (file)
@@ -65,7 +65,7 @@ void do_restore(JCR *jcr)
    wherelen = strlen(jcr->where);
 
    sd = jcr->store_bsock;
-   jcr->JobStatus = JS_Running;
+   set_jcr_job_status(jcr, JS_Running);
 
    if (!bnet_set_buffer_size(sd, MAX_NETWORK_BUFFER_SIZE, BNET_SETBUF_READ)) {
       return;
@@ -376,11 +376,11 @@ void do_restore(JCR *jcr)
       set_attributes(jcr, fname, ofile, lname, type, stream, 
                     &statp, attribsEx, &ofd);
    }
-   jcr->JobStatus = JS_Terminated;
+   set_jcr_job_status(jcr, JS_Terminated);
    goto ok_out;
 
 bail_out:
-   jcr->JobStatus = JS_ErrorTerminated;
+   set_jcr_job_status(jcr, JS_ErrorTerminated);
 ok_out:
    if (jcr->compress_buf) {
       free(jcr->compress_buf);
index 231dc7686ea4439182158a943ce1d9ad738985b8..f089e23062de3b330eea581ab0c2b0980bc5a773 100644 (file)
@@ -44,10 +44,10 @@ void do_verify(JCR *jcr)
    if ((jcr->big_buf = (char *) malloc(jcr->buf_size)) == NULL) {
       Emsg1(M_ABORT, 0, _("Cannot malloc %d network read buffer\n"), MAX_NETWORK_BUFFER_SIZE);
    }
-   set_find_options(jcr->ff, jcr->incremental, jcr->mtime);
+   set_find_options((FF_PKT *)jcr->ff, jcr->incremental, jcr->mtime);
    Dmsg0(10, "Start find files\n");
    /* Subroutine verify_file() is called for each file */
-   find_files(jcr->ff, verify_file, (void *)jcr);  
+   find_files(jcr, (FF_PKT *)jcr->ff, verify_file, (void *)jcr);  
    Dmsg0(10, "End find files\n");
 
    bnet_sig(dir, BNET_EOD);          /* signal end of data */
index 61a15198a6be4d0f04cb891a83d76ac76b9589c7..7386777da6f99c214bbe3ca0307be51cb864470d 100644 (file)
@@ -57,14 +57,14 @@ void do_verify_volume(JCR *jcr)
    sd = jcr->store_bsock;
    if (!sd) {
       Jmsg(jcr, M_FATAL, 0, _("Storage command not issued before Verify.\n"));
-      jcr->JobStatus = JS_FatalError;
+      set_jcr_job_status(jcr, JS_FatalError);
       return;
    }
    dir = jcr->dir_bsock;
-   jcr->JobStatus = JS_Running;
+   set_jcr_job_status(jcr, JS_Running);
 
    if (!bnet_set_buffer_size(sd, MAX_NETWORK_BUFFER_SIZE, BNET_SETBUF_READ)) {
-      jcr->JobStatus = JS_FatalError;
+      set_jcr_job_status(jcr, JS_FatalError);
       return;
    }
    jcr->buf_size = sd->msglen;
index 0f3af6176116315131b91b61ce7d5b84034c0ff6..17de805ee7b1dcbfcb3a26562e9683e92bcd9b97 100644 (file)
 #include "bacula.h"
 #include "find.h"
 
-/* Imported functions */
-int find_one_file(FF_PKT *ff, int handle_file(FF_PKT *ff_pkt, void *hpkt), 
-              void *pkt, char *p, dev_t parent_device, int top_level);
-int term_find_one(FF_PKT *ff);
 
 size_t name_max;              /* filename max length */
 size_t path_max;              /* path name max length */
@@ -106,17 +102,17 @@ set_find_options(FF_PKT *ff, int incremental, time_t save_time)
  *
  */
 int
-find_files(FF_PKT *ff, int callback(FF_PKT *ff_pkt, void *hpkt), void *his_pkt) 
+find_files(JCR *jcr, FF_PKT *ff, int callback(FF_PKT *ff_pkt, void *hpkt), void *his_pkt) 
 {
    char *file;
    struct s_included_file *inc = NULL;
 
-   while ((inc = get_next_included_file(ff, inc))) {
+   while (!job_cancelled(jcr) && (inc = get_next_included_file(ff, inc))) {
       file = inc->fname;
       strcpy(ff->VerifyOpts, inc->VerifyOpts); /* Copy options for this file */
       Dmsg1(50, "find_files: file=%s\n", file);
       if (!file_is_excluded(ff, file)) {
-        if (!find_one_file(ff, callback, his_pkt, file, (dev_t)-1, 1)) {
+        if (!find_one_file(jcr, ff, callback, his_pkt, file, (dev_t)-1, 1)) {
            return 0;                  /* error return */
         }
       }
index a696e5156faecd3e8d7c4cbd6d47fe28dcd0b152..31b8e55f78e681b15f7bb653d7fe66e7c6c2093b 100755 (executable)
@@ -26,6 +26,8 @@
 #ifndef __FILES_H
 #define __FILES_H
 
+#include "jcr.h"
+
 #ifdef HAVE_DIRENT_H
 #include <dirent.h>
 #define NAMELEN(dirent) (strlen((dirent)->d_name))
 /* 
  * Status codes returned by create_file()
  */
-#define CF_SKIP       1              /* skip file (not newer or something) */
-#define CF_ERROR      2              /* error creating file */
-#define CF_EXTRACT    3              /* file created, data to extract */
-#define CF_CREATED    4              /* file created, no data to extract */
+#define CF_SKIP       1               /* skip file (not newer or something) */
+#define CF_ERROR      2               /* error creating file */
+#define CF_EXTRACT    3               /* file created, data to extract */
+#define CF_CREATED    4               /* file created, no data to extract */
 
 /* 
  *  NOTE!!! These go on the tape, so don't change them. If 
  *  need be, add to them.
  */
-#define FT_LNKSAVED   1              /* hard link to file already saved */  
-#define FT_REGE       2              /* Regular file but empty */
-#define FT_REG       3               /* Regular file */
-#define FT_LNK       4               /* Soft Link */
-#define FT_DIR       5               /* Directory */
-#define FT_SPEC       6              /* Special file -- chr, blk, fifo, sock */
-#define FT_NOACCESS   7              /* Not able to access */
-#define FT_NOFOLLOW   8              /* Could not follow link */
-#define FT_NOSTAT     9              /* Could not stat file */
-#define FT_NOCHG     10              /* Incremental option, file not changed */
-#define FT_DIRNOCHG  11              /* Incremental option, directory not changed */
-#define FT_ISARCH    12              /* Trying to save archive file */
-#define FT_NORECURSE 13              /* No recursion into directory */
-#define FT_NOFSCHG   14              /* Different file system, prohibited */
-#define FT_NOOPEN    15              /* Could not open directory */
-#define FT_RAW      16               /* Raw block device */
-#define FT_FIFO      17              /* Raw fifo device */
+#define FT_LNKSAVED   1               /* hard link to file already saved */  
+#define FT_REGE       2               /* Regular file but empty */
+#define FT_REG        3               /* Regular file */
+#define FT_LNK        4               /* Soft Link */
+#define FT_DIR        5               /* Directory */
+#define FT_SPEC       6               /* Special file -- chr, blk, fifo, sock */
+#define FT_NOACCESS   7               /* Not able to access */
+#define FT_NOFOLLOW   8               /* Could not follow link */
+#define FT_NOSTAT     9               /* Could not stat file */
+#define FT_NOCHG     10               /* Incremental option, file not changed */
+#define FT_DIRNOCHG  11               /* Incremental option, directory not changed */
+#define FT_ISARCH    12               /* Trying to save archive file */
+#define FT_NORECURSE 13               /* No recursion into directory */
+#define FT_NOFSCHG   14               /* Different file system, prohibited */
+#define FT_NOOPEN    15               /* Could not open directory */
+#define FT_RAW       16               /* Raw block device */
+#define FT_FIFO      17               /* Raw fifo device */
 
 /* Options saved in "flag" of ff packet */
-#define FO_MD5         0x01          /* Do MD5 checksum */
-#define FO_GZIP        0x02          /* Do Zlib compression */
-#define FO_NO_RECURSION 0x04         /* no recursion in directories */
-#define FO_MULTIFS     0x08          /* multiple file systems */
-#define FO_SPARSE      0x10          /* do sparse file checking */
-#define FO_IF_NEWER    0x20          /* replace if newer */
-#define FO_NOREPLACE   0x40          /* never replace */
-#define FO_READFIFO    0x80          /* read data from fifo */
+#define FO_MD5          0x01          /* Do MD5 checksum */
+#define FO_GZIP         0x02          /* Do Zlib compression */
+#define FO_NO_RECURSION 0x04          /* no recursion in directories */
+#define FO_MULTIFS      0x08          /* multiple file systems */
+#define FO_SPARSE       0x10          /* do sparse file checking */
+#define FO_IF_NEWER     0x20          /* replace if newer */
+#define FO_NOREPLACE    0x40          /* never replace */
+#define FO_READFIFO     0x80          /* read data from fifo */
 
 /*
  * Options saved in "options" of include list
 #define OPT_compute_MD5       0x01    /* compute MD5 of file's data */
 #define OPT_GZIP_compression  0x02    /* use GZIP compression */
 #define OPT_no_recursion      0x04    /* no recursion in directories */
-#define OPT_multifs          0x08    /* multiple file systems */
-#define OPT_sparse           0x10    /* do sparse file checking */
+#define OPT_multifs           0x08    /* multiple file systems */
+#define OPT_sparse            0x10    /* do sparse file checking */
 #define OPT_replace_if_newer  0x20    /* replace file if newer */
 #define OPT_never_replace     0x40    /* never replace */
-#define OPT_read_fifo        0x80    /* read data from fifo (named pipe) */
+#define OPT_read_fifo         0x80    /* read data from fifo (named pipe) */
 
 
 
 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 */
+   int options;                       /* backup options */
+   int level;                         /* compression level */
+   int len;                           /* length of fname */
+   int pattern;                       /* set if pattern */
+   char VerifyOpts[20];               /* Options for verify */
    char fname[1];
 };
 
@@ -123,27 +125,27 @@ struct s_excluded_file {
  * first argument to the find_files callback subroutine.
  */
 typedef struct ff {
-   char *fname;                      /* filename */
-   char *link;                       /* link if file linked */
-   POOLMEM *sys_fname;               /* system filename */
-   struct stat statp;                /* stat packet */
-   int type;                         /* FT_ type from above */
-   int fid;                          /* file id if opened */
-   int flags;                        /* control flags */
-   int ff_errno;                     /* errno */
-   int incremental;                  /* do incremental save */
-   time_t save_time;                 /* start of incremental time */
-   int mtime_only;                   /* incremental on mtime_only */
-   int dereference;                  /* follow links */
-   int GZIP_level;                   /* compression level */
-   int atime_preserve;               /* preserve access times */
-   int null_output_device;           /* using null output device */
+   char *fname;                       /* filename */
+   char *link;                        /* link if file linked */
+   POOLMEM *sys_fname;                /* system filename */
+   struct stat statp;                 /* stat packet */
+   int type;                          /* FT_ type from above */
+   int fid;                           /* file id if opened */
+   int flags;                         /* control flags */
+   int ff_errno;                      /* errno */
+   int incremental;                   /* do incremental save */
+   time_t save_time;                  /* start of incremental time */
+   int mtime_only;                    /* incremental on mtime_only */
+   int dereference;                   /* follow links */
+   int GZIP_level;                    /* compression level */
+   int atime_preserve;                /* preserve access times */
+   int null_output_device;            /* using null output device */
    char VerifyOpts[20];
    struct s_included_file *included_files_list;
    struct s_excluded_file *excluded_files_list;
    struct s_excluded_file *excluded_paths_list;
 
-   struct f_link *linklist;          /* hard linked files */
+   struct f_link *linklist;           /* hard linked files */
 } FF_PKT;
 
 #include "protos.h"
index 132de5a40b2d0b516ebc94faeadf5acde3b953f5..d80036fb2309d3b80d8c95ece3bfd8b28364163e 100755 (executable)
    MA 02111-1307, USA.
 
    This file is based on GNU TAR source code. Except for a few key
-   ideas and some key snippets of code, it has been rewritten for Bacula.
+   ideas, it has been rewritten for Bacula.
 
       Kern Sibbald, MM
 
-   Many thanks to the TAR programmers.
+   Thanks to the TAR programmers.
 
  */
 
 #include "bacula.h"
 #include "find.h"
-/*#include "system.h" */
 
 
 extern size_t name_max;              /* filename max length */
@@ -53,11 +52,10 @@ struct f_link {
 #if HAVE_UTIME_H
 # include <utime.h>
 #else
-struct utimbuf
-  {
+struct utimbuf {
     long actime;
     long modtime;
-  };
+};
 #endif
 
 
@@ -70,8 +68,8 @@ struct utimbuf
  *  decending into a directory.
  */
 int
-find_one_file(FF_PKT *ff_pkt, int handle_file(FF_PKT *ff, void *hpkt), void *pkt
-              char *fname, dev_t parent_device, int top_level)
+find_one_file(JCR *jcr, FF_PKT *ff_pkt, int handle_file(FF_PKT *ff, void *hpkt)
+              void *pkt, char *fname, dev_t parent_device, int top_level)
 {
    struct utimbuf restore_times;
    int rtn_stat;
@@ -271,7 +269,7 @@ find_one_file(FF_PKT *ff_pkt, int handle_file(FF_PKT *ff, void *hpkt), void *pkt
        */
        rtn_stat = 1;
        entry = (struct dirent *)malloc(sizeof(struct dirent) + name_max + 100);
-       for ( ;; ) {
+       for ( ; !job_cancelled(jcr); ) {
           char *p, *q;
           int i;
 
@@ -301,7 +299,7 @@ find_one_file(FF_PKT *ff_pkt, int handle_file(FF_PKT *ff, void *hpkt), void *pkt
           *q = 0;
           sm_check(__FILE__, __LINE__, False);
           if (!file_is_excluded(ff_pkt, link)) {
-             rtn_stat = find_one_file(ff_pkt, handle_file, pkt, link, our_device, 0);
+             rtn_stat = find_one_file(jcr, ff_pkt, handle_file, pkt, link, our_device, 0);
           }
        }
        closedir(directory);
index e58e9af2ffccdd04a13a642341e19a2429b62176..3c2c8763623f48e21721eafd2ced921b9ddca05d 100644 (file)
  */
 
 /* from attribs.c */
-void     encode_stat            (char *buf, struct stat *statp);
-void     decode_stat            (char *buf, struct stat *statp);
-int      encode_attribsEx       (void *jcr, char *attribsEx, FF_PKT *ff_pkt);
+void      encode_stat            (char *buf, struct stat *statp);
+void      decode_stat            (char *buf, struct stat *statp);
+int       encode_attribsEx       (void *jcr, char *attribsEx, FF_PKT *ff_pkt);
 int set_attributes(void *jcr, char *fname, char *ofile, char *lname,
-                  int type, int stream, struct stat *statp, 
-                  char *attribsEx, int *ofd);
+                   int type, int stream, struct stat *statp, 
+                   char *attribsEx, int *ofd);
 
 /* from create_file.c */
 int create_file(void *jcr, char *fname, char *ofile, char *lname,
-               int type, int stream, struct stat *statp, 
-               char *attribsEx, int *ofd, int replace);
+                int type, int stream, struct stat *statp, 
+                char *attribsEx, int *ofd, int replace);
 
 /* From find.c */
 FF_PKT *init_find_files();
 void set_find_options(FF_PKT *ff, int incremental, time_t mtime);
-int find_files(FF_PKT *ff, int sub(FF_PKT *ff_pkt, void *hpkt), void *pkt);
+int find_files(JCR *jcr, FF_PKT *ff, int sub(FF_PKT *ff_pkt, void *hpkt), void *pkt);
 int term_find_files(FF_PKT *ff);
 
 /* From match.c */
@@ -50,10 +50,15 @@ void add_fname_to_exclude_list(FF_PKT *ff, char *fname);
 int file_is_excluded(FF_PKT *ff, char *file);
 int file_is_included(FF_PKT *ff, char *file);
 struct s_included_file *get_next_included_file(FF_PKT *ff, 
-                          struct s_included_file *inc);
+                           struct s_included_file *inc);
+
+/* From find_one.c */
+int find_one_file(JCR *jcr, FF_PKT *ff, int handle_file(FF_PKT *ff_pkt, void *hpkt), 
+               void *pkt, char *p, dev_t parent_device, int top_level);
+int term_find_one(FF_PKT *ff);
 
 
 /* from makepath.c */
 int make_path(void *jcr, const char *argpath, int mode,
-          int parent_mode, uid_t owner, gid_t group,
-          int preserve_existing, char *verbose_fmt_string);
+           int parent_mode, uid_t owner, gid_t group,
+           int preserve_existing, char *verbose_fmt_string);
index 2fa0eebe45b2b748fc697a0d285d7b122c189c37..6fea571fc95a8df24018abba422d7e7d46d11c27 100644 (file)
@@ -127,6 +127,7 @@ struct s_jcr {
    CAT *catalog;                      /* Catalog resource */
    MSGS *messages;                    /* Default message handler */
    int SDJobStatus;                   /* Storage Job Status */
+   int FDJobStatus;                   /* File daemon Job Status */
    int mode;                          /* manual/auto run */
    B_DB *db;                          /* database pointer */
    uint32_t MediaId;                  /* DB record IDs associated with this job */
@@ -160,7 +161,7 @@ struct s_jcr {
    POOLMEM *where;                    /* Root where to restore */
    int replace;                       /* Replace options */
    int buf_size;                      /* length of buffer */
-   FF_PKT *ff;                        /* Find Files packet */
+   void *ff;                          /* Find Files packet */
    char stored_addr[MAX_NAME_LENGTH]; /* storage daemon address */
    uint32_t StartFile;
    uint32_t EndFile;
@@ -249,6 +250,7 @@ extern JCR *get_jcr_by_full_name(char *Job);
 extern JCR *get_next_jcr(JCR *jcr);
 extern void lock_jcr_chain();
 extern void unlock_jcr_chain();
+extern void set_jcr_job_status(JCR *jcr, int JobStatus);
 
 #ifdef DEBUG
 extern void b_free_jcr(char *file, int line, JCR *jcr);
index 1ee2787d2290082dc0614a32318788a76187f1c8..918882d05cdb910da8d08f8392f195cd79044b1b 100755 (executable)
@@ -177,7 +177,9 @@ void free_jcr(JCR *jcr)
    remove_jcr(jcr);
    V(mutex);
 
-   jcr->daemon_free_jcr(jcr);        /* call daemon free routine */
+   if (jcr->daemon_free_jcr) {
+      jcr->daemon_free_jcr(jcr);      /* call daemon free routine */
+   }
    free_common_jcr(jcr);
    Dmsg0(200, "Exit free_jcr\n");
 }
@@ -294,6 +296,24 @@ JCR *get_jcr_by_full_name(char *Job)
    return jcr; 
 }
 
+void set_jcr_job_status(JCR *jcr, int JobStatus)
+{
+   /*
+    * For a set of errors, ... keep the current status
+    *   so it isn't lost. For all others, set it.
+    */
+   switch (jcr->JobStatus) {
+   case JS_ErrorTerminated:
+   case JS_Error:
+   case JS_FatalError:
+   case JS_Differences:
+   case JS_Cancelled:
+      break;
+   default:
+      jcr->JobStatus = JobStatus;
+   }
+}
+
 /* 
  * Lock the chain
  */
index 9b4b7b805a8ca05f4f56d6a42da9d350ee07b48b..ec48a43ee4303e1db36fae90dd3948d88d2d8275 100644 (file)
 
 #include "bacula.h"
 
-#ifdef sgi
-#define HIGHFIRST
-#endif
-
-#ifdef sun
-#define HIGHFIRST
-#endif
-
-#ifndef HIGHFIRST
+#ifndef HAVE_BIGENDIAN
 #define byteReverse(buf, len)  /* Nothing */
 #else
 /*
index aa2220ffee8133611ca2999cfd5c00809e97f2e9..f494cd63a7a97fd93726c195fbe9e7c5ac4be857 100644 (file)
@@ -60,7 +60,7 @@ int do_append_data(JCR *jcr)
    ds = fd_sock;
 
    if (!bnet_set_buffer_size(ds, MAX_NETWORK_BUFFER_SIZE, BNET_SETBUF_WRITE)) {
-      jcr->JobStatus = JS_Cancelled;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       Jmsg(jcr, M_FATAL, 0, _("Unable to set network buffer size.\n"));
       return 0;
    }
@@ -76,7 +76,7 @@ int do_append_data(JCR *jcr)
     */
    Dmsg0(100, "just before acquire_device\n");
    if (!acquire_device_for_append(jcr, dev, block)) {
-      jcr->JobStatus = JS_Cancelled;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       free_block(block);
       return 0;
    }
@@ -87,9 +87,9 @@ int do_append_data(JCR *jcr)
     * Write Begin Session Record
     */
    if (!write_session_label(jcr, block, SOS_LABEL)) {
-      jcr->JobStatus = JS_Cancelled;
       Jmsg1(jcr, M_FATAL, 0, _("Write session label failed. ERR=%s\n"),
         strerror_dev(dev));
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       ok = FALSE;
    }
 
@@ -233,9 +233,9 @@ int do_append_data(JCR *jcr)
    Dmsg0(90, "Write_end_session_label()\n");
    /* Create Job status for end of session label */
    if (!job_cancelled(jcr) && ok) {
-      jcr->JobStatus = JS_Terminated;
+      set_jcr_job_status(jcr, JS_Terminated);
    } else if (!ok) {
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
    }
    if (!write_session_label(jcr, block, EOS_LABEL)) {
       Jmsg1(jcr, M_FATAL, 0, _("Error writting end session label. ERR=%s\n"),
index d49ca21df2123bb41d8c179b2a748454685ae0d2..1f9dfe812f1d2e39291945b2426ee7b7e8620308 100644 (file)
@@ -375,7 +375,7 @@ volumes for Job=%s.\n"), jcr->Job);
       }       
       break;
    }
-   jcr->JobStatus = JS_Running;
+   set_jcr_job_status(jcr, JS_Running);
    dir_send_job_status(jcr);
    Dmsg0(130, "leave dir_ask_sysop_to_mount_next_volume\n");
    return 1;
@@ -489,7 +489,7 @@ int dir_ask_sysop_to_mount_volume(JCR *jcr, DEVICE *dev)
       num_wait = 0;
       break;
    }
-   jcr->JobStatus = JS_Running;
+   set_jcr_job_status(jcr, JS_Running);
    dir_send_job_status(jcr);
    Dmsg0(130, "leave dir_ask_sysop_to_mount_next_volume\n");
    return 1;
index 39acdd562450dd5a416c4673720ed5fffddd78ef..7eb09721e34778c7235413f15cdaa1e775826ea1 100644 (file)
@@ -30,8 +30,6 @@
 #ifndef __BSR_H
 #define __BSR_H 1
 
-#include "findlib/find.h"
-
 /*
  * List of Volume names to be read by Storage daemon.
  *  Formed by Storage daemon from BSR  
@@ -47,10 +45,10 @@ typedef struct s_vol_list VOL_LIST;
 
 /*
  * !!!!!!!!!!!!!!!!!! NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- * !!!                                              !!!
- * !!!  All records must have a pointer to          !!!
- * !!!  the next item as the first item defined.    !!!
- * !!!                                              !!!
+ * !!!                                               !!!
+ * !!!   All records must have a pointer to          !!!
+ * !!!   the next item as the first item defined.    !!!
+ * !!!                                               !!!
  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  */
 
@@ -68,35 +66,35 @@ typedef struct s_bsr_sessid {
    struct s_bsr_sessid *next;
    uint32_t sessid;
    uint32_t sessid2;
-   int done;                         /* local done */
+   int done;                          /* local done */
 } BSR_SESSID;
 
 typedef struct s_bsr_sesstime {
    struct s_bsr_sesstime *next;
    uint32_t sesstime;
-   int done;                         /* local done */
+   int done;                          /* local done */
 } BSR_SESSTIME;
 
 typedef struct s_bsr_volfile {
    struct s_bsr_volfile *next;
-   uint32_t sfile;                   /* start file */
-   uint32_t efile;                   /* end file */
-   int done;                         /* local done */
+   uint32_t sfile;                    /* start file */
+   uint32_t efile;                    /* end file */
+   int done;                          /* local done */
 } BSR_VOLFILE;
 
 typedef struct s_bsr_volblock {
    struct s_bsr_volblock *next;
-   uint32_t sblock;                  /* start block */
-   uint32_t eblock;                  /* end block */
-   int done;                         /* local done */
+   uint32_t sblock;                   /* start block */
+   uint32_t eblock;                   /* end block */
+   int done;                          /* local done */
 } BSR_VOLBLOCK;
 
 
 typedef struct s_bsr_findex {
    struct s_bsr_findex *next;
-   int32_t findex;                   /* start file index */
-   int32_t findex2;                  /* end file index */
-   int done;                         /* local done */
+   int32_t findex;                    /* start file index */
+   int32_t findex2;                   /* end file index */
+   int done;                          /* local done */
 } BSR_FINDEX;
 
 typedef struct s_bsr_jobid {
@@ -123,28 +121,27 @@ typedef struct s_bsr_job {
 
 typedef struct s_bsr_stream {
    struct s_bsr_stream *next;
-   int32_t stream;                   /* stream desired */
+   int32_t stream;                    /* stream desired */
 } BSR_STREAM;
 
 typedef struct s_bsr {
-   struct s_bsr *next;               /* pointer to next one */
-   int          done;                /* set when everything found */
-   BSR_VOLUME  *volume;
-   int32_t      Slot;                /* Slot */
-   uint32_t     count;               /* count of files to restore this bsr */
-   uint32_t     found;               /* count of restored files this bsr */
-   BSR_VOLFILE *volfile;
+   struct s_bsr *next;                /* pointer to next one */
+   int           done;                /* set when everything found */
+   BSR_VOLUME   *volume;
+   int32_t       Slot;                /* Slot */
+   uint32_t      count;               /* count of files to restore this bsr */
+   uint32_t      found;               /* count of restored files this bsr */
+   BSR_VOLFILE  *volfile;
    BSR_VOLBLOCK *volblock;
    BSR_SESSTIME *sesstime;
-   BSR_SESSID  *sessid;
-   BSR_JOBID   *JobId;
-   BSR_JOB     *job;
-   BSR_CLIENT  *client;
-   BSR_FINDEX  *FileIndex;
-   BSR_JOBTYPE *JobType;
+   BSR_SESSID   *sessid;
+   BSR_JOBID    *JobId;
+   BSR_JOB      *job;
+   BSR_CLIENT   *client;
+   BSR_FINDEX   *FileIndex;
+   BSR_JOBTYPE  *JobType;
    BSR_JOBLEVEL *JobLevel;
-   BSR_STREAM  *stream;
-// FF_PKT *ff;                       /* include/exclude */
+   BSR_STREAM   *stream;
 } BSR;
 
 
index 4d5c6cf108911462e99b5bf6817d9b0f5a7e29a2..f5ba06b07a369576d00fb0d49d15ba2cf47a8afe 100644 (file)
@@ -1044,7 +1044,7 @@ This may take a long time. I.e. hours! ...\n\n");
     */
    Dmsg0(100, "just before acquire_device\n");
    if (!acquire_device_for_append(jcr, dev, block)) {
-      jcr->JobStatus = JS_Cancelled;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       free_block(block);
       return;
    }
@@ -1054,7 +1054,7 @@ This may take a long time. I.e. hours! ...\n\n");
     * Write Begin Session Record
     */
    if (!write_session_label(jcr, block, SOS_LABEL)) {
-      jcr->JobStatus = JS_Cancelled;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       Jmsg1(jcr, M_FATAL, 0, _("Write session label failed. ERR=%s\n"),
         strerror_dev(dev));
       ok = FALSE;
@@ -1146,9 +1146,9 @@ This may take a long time. I.e. hours! ...\n\n");
       Dmsg0(000, "Write_end_session_label()\n");
       /* Create Job status for end of session label */
       if (!job_cancelled(jcr) && ok) {
-        jcr->JobStatus = JS_Terminated;
+        set_jcr_job_status(jcr, JS_Terminated);
       } else if (!ok) {
-        jcr->JobStatus = JS_ErrorTerminated;
+        set_jcr_job_status(jcr, JS_ErrorTerminated);
       }
       if (!write_session_label(jcr, block, EOS_LABEL)) {
          Pmsg1(000, _("Error writting end session label. ERR=%s\n"), strerror_dev(dev));
index 210f30b8b9606f0be89ba1eb3f92be11e9229cc0..598b8644676e57ee9f284953f1116d56e60d3676 100644 (file)
@@ -208,8 +208,8 @@ static int cancel_cmd(JCR *cjcr)
       } else {
         P(jcr->mutex);
         oldStatus = jcr->JobStatus;
-        jcr->JobStatus = JS_Cancelled;
-        if (!jcr->authenticated && jcr->JobStatus == JS_WaitFD) {
+        set_jcr_job_status(jcr, JS_Cancelled);
+        if (!jcr->authenticated && oldStatus == JS_WaitFD) {
            pthread_cond_signal(&jcr->job_start_wait); /* wake waiting thread */
         }
         V(jcr->mutex);
index e7ebbf56f9fa5560f5e5f2c07c3ff8d094976169..46edf4ecc576f5053d205b6de780a53b950a6b69 100644 (file)
@@ -91,7 +91,7 @@ int job_cmd(JCR *jcr)
       free_memory(client_name);
       free_memory(fileset_name);
       free_memory(fileset_md5);
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       return 0;
    }
    jcr->JobId = JobId;
@@ -122,7 +122,7 @@ int job_cmd(JCR *jcr)
    /* Initialize FD start condition variable */
    if ((errstat = pthread_cond_init(&jcr->job_start_wait, NULL)) != 0) {
       Jmsg1(jcr, M_FATAL, 0, _("Unable to init job cond variable: ERR=%s\n"), strerror(errstat));
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       return 0;
    }
    jcr->authenticated = FALSE;
@@ -144,11 +144,11 @@ int job_cmd(JCR *jcr)
     * Wait for the device, media, and pool information
     */
    if (!use_device_cmd(jcr)) {
-      jcr->JobStatus = JS_ErrorTerminated;
+      set_jcr_job_status(jcr, JS_ErrorTerminated);
       return 0;
    }
 
-   jcr->JobStatus = JS_WaitFD;       /* wait for FD to connect */
+   set_jcr_job_status(jcr, JS_WaitFD);         /* wait for FD to connect */
    dir_send_job_status(jcr);
 
    gettimeofday(&tv, &tz);
index ddaf67d307b2cc7db3d24a22266bde08f5aed66e..06863b33a544f06dca2f94da1b8a20a48ce4c571 100644 (file)
@@ -75,7 +75,7 @@ int read_dev_volume_label(JCR *jcr, DEVICE *dev, DEV_BLOCK *block)
          *  => we are in a loop
          */
         if (jcr->label_errors > 100) {
-           jcr->JobStatus = JS_Cancelled;
+           set_jcr_job_status(jcr, JS_ErrorTerminated);
             Jmsg(jcr, M_FATAL, 0, "%s", jcr->errmsg);
         }
         return jcr->label_status = VOL_NAME_ERROR;
@@ -139,7 +139,7 @@ because:\n   %s"), dev_name(dev), strerror_dev(dev));
        *  => we are in a loop
        */
       if (jcr->label_errors > 100) {
-        jcr->JobStatus = JS_Cancelled;
+        set_jcr_job_status(jcr, JS_ErrorTerminated);
          Jmsg(jcr, M_FATAL, 0, "%s", jcr->errmsg);
       }
       return jcr->label_status = VOL_NAME_ERROR;
index 28a1dcf8595eb68903dcb6b23e319cd53158c62e..2a0ac6aa4948860f3b1b8d9fb5ba5476c2d67dea 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef __STORED_H_
 #define __STORED_H_
 
+#define STORAGE_DAEMON 1
+
 #include <sys/mtio.h>
 #include "block.h"
 #include "record.h"
@@ -40,6 +42,8 @@
 #define uLongf uint32_t
 #endif
 
+#include "findlib/find.h"
+
 extern char errmsg[];                /* general error message */
 
 #endif /* __STORED_H_ */
index 2c333b7656790d08ba9fc9d0f2dbccece2056481..80c0f98a5841c596e3f239f5628ea20186646cbb 100644 (file)
@@ -4,7 +4,7 @@
  *   Version $Id$
  */
 /*
-   Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
+   Copyright (C) 2000-2003 Kern Sibbald and John Walker
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
 
  */
 
-#define R_FIRST                      3001
+#define R_FIRST                       3001
 
-#define R_DIRECTOR                   3001
-#define R_STORAGE                    3002
-#define R_DEVICE                     3003
-#define R_MSGS                       3004
+#define R_DIRECTOR                    3001
+#define R_STORAGE                     3002
+#define R_DEVICE                      3003
+#define R_MSGS                        3004
 
-#define R_LAST                       R_MSGS
+#define R_LAST                        R_MSGS
 
 
-#define R_NAME                       3020
-#define R_ADDRESS                    3021
-#define R_PASSWORD                   3022
-#define R_TYPE                       3023
-#define R_BACKUP                     3024
-
-#define STORAGE_DAEMON 1
+#define R_NAME                        3020
+#define R_ADDRESS                     3021
+#define R_PASSWORD                    3022
+#define R_TYPE                        3023
+#define R_BACKUP                      3024
 
 /* Definition of the contents of each Resource */
 struct s_res_dir {
-   RES  hdr;
+   RES   hdr;
 
-   char *password;                   /* Director password */
-   char *address;                    /* Director IP address or zero */
+   char *password;                    /* Director password */
+   char *address;                     /* Director IP address or zero */
 };
 typedef struct s_res_dir DIRRES;
 
 
 /* Storage daemon "global" definitions */
 struct s_res_store {
-   RES  hdr;
+   RES   hdr;
 
-   char *address;                    /* deprecated */
-   char *SDaddr;                     /* bind address */
-   int  SDport;                      /* Where we listen for Directors */
+   char *address;                     /* deprecated */
+   char *SDaddr;                      /* bind address */
+   int   SDport;                      /* Where we listen for Directors */
    int   SDDport;                     /* "Data" port where we listen for File daemons */
-   char *working_directory;          /* working directory for checkpoints */
+   char *working_directory;           /* working directory for checkpoints */
    char *pid_directory;
    char *subsys_directory;
    uint32_t max_concurrent_jobs;      /* maximum concurrent jobs to run */
@@ -69,32 +67,32 @@ typedef struct s_res_store STORES;
 
 /* Device specific definitions */
 struct s_res_dev {
-   RES  hdr;
-
-   char *media_type;                 /* User assigned media type */
-   char *device_name;                /* Archive device name */
-   char *changer_name;               /* Changer device name */
-   char *changer_command;            /* Changer command  -- external program */
-   int cap_bits;                     /* Capabilities of this device */
-   uint32_t max_changer_wait;        /* Changer timeout */
-   uint32_t max_rewind_wait;         /* maximum secs to wait for rewind */
-   uint32_t max_open_wait;           /* maximum secs to wait for open */
-   uint32_t min_block_size;          /* min block size */
-   uint32_t max_block_size;          /* max block size */
-   uint32_t max_volume_jobs;         /* max jobs to put on one volume */
-   int64_t max_volume_files;         /* max files to put on one volume */
-   int64_t max_volume_size;          /* max bytes to put on one volume */
-   int64_t max_file_size;            /* max file size in bytes */
-   int64_t volume_capacity;          /* advisory capacity */
-   DEVICE *dev;                      /* Pointer to phyical dev -- set at runtime */
+   RES   hdr;
+
+   char *media_type;                  /* User assigned media type */
+   char *device_name;                 /* Archive device name */
+   char *changer_name;                /* Changer device name */
+   char *changer_command;             /* Changer command  -- external program */
+   int  cap_bits;                     /* Capabilities of this device */
+   uint32_t max_changer_wait;         /* Changer timeout */
+   uint32_t max_rewind_wait;          /* maximum secs to wait for rewind */
+   uint32_t max_open_wait;            /* maximum secs to wait for open */
+   uint32_t min_block_size;           /* min block size */
+   uint32_t max_block_size;           /* max block size */
+   uint32_t max_volume_jobs;          /* max jobs to put on one volume */
+   int64_t max_volume_files;          /* max files to put on one volume */
+   int64_t max_volume_size;           /* max bytes to put on one volume */
+   int64_t max_file_size;             /* max file size in bytes */
+   int64_t volume_capacity;           /* advisory capacity */
+   DEVICE *dev;                       /* Pointer to phyical dev -- set at runtime */
 };
 typedef struct s_res_dev DEVRES;
 
 union u_res {
-   struct s_res_dir    res_dir;
-   struct s_res_store  res_store;
-   struct s_res_dev    res_dev;
-   struct s_res_msgs   res_msgs;
+   struct s_res_dir     res_dir;
+   struct s_res_store   res_store;
+   struct s_res_dev     res_dev;
+   struct s_res_msgs    res_msgs;
    RES hdr;
 };
 typedef union u_res URES;
index 5680a6cc06a0d777b58c71b7a2c923fdf97c5277..5549a3059e19559282c3ab8db0bb78e8d5a4ad6f 100644 (file)
@@ -24,7 +24,6 @@
 
 #include "bacula.h"
 #include "findlib/find.h"
-#include "jcr.h"
 
 
 /* Global variables */
@@ -35,6 +34,7 @@ static int trunc_fname = 0;
 static int trunc_path = 0;
 static int attrs = 0;
 
+static JCR *jcr;
 
 static int print_file(FF_PKT *ff, void *pkt);
 static void count_files(FF_PKT *ff);
@@ -90,23 +90,25 @@ main (int argc, char *const *argv)
    argc -= optind;
    argv += optind;
 
-  ff = init_find_files();
+   jcr = new_jcr(sizeof(JCR), NULL);
+
+   ff = init_find_files();
    if (argc == 0) {
-     add_fname_to_include_list(ff, 0, "/"); /* default to / */
-  } else {   
+      add_fname_to_include_list(ff, 0, "/"); /* default to / */
+   } else {   
       for (i=0; i < argc; i++) {
-        if (strcmp(argv[i], "-") == 0) {
-          while (fgets(name, sizeof(name)-1, stdin)) {
-             strip_trailing_junk(name);
-             add_fname_to_include_list(ff, 0, name); 
-          }
-          continue;
-       }
-       add_fname_to_include_list(ff, 0, argv[i]); 
-     }
-  }
+         if (strcmp(argv[i], "-") == 0) {
+            while (fgets(name, sizeof(name)-1, stdin)) {
+               strip_trailing_junk(name);
+               add_fname_to_include_list(ff, 0, name); 
+             }
+             continue;
+        }
+        add_fname_to_include_list(ff, 0, argv[i]); 
+      }
+   }
 
-  find_files(ff, print_file, NULL);
+  find_files(jcr, ff, print_file, NULL);
   hard_links = term_find_files(ff);
   
    printf(_("\
@@ -119,6 +121,7 @@ Hard links     : %d\n"),
      num_files, max_file_len, max_path_len,
      trunc_fname, trunc_path, hard_links);
   
+  free_jcr(jcr);
   close_memory_pool();
   sm_dump(False);
   exit(0);