/* 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
/* 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
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>
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
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>
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
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() {
; 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
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*
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*
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*
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*
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
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*
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>
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
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() {
; 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
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 6179 "configure"
+#line 6209 "configure"
#include "confdefs.h"
#include <signal.h>
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
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 6198 "configure"
+#line 6228 "configure"
#include "confdefs.h"
#include <signal.h>
; 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
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
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
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
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
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
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
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
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
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
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
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
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>
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
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>
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
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>
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
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() {
; 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
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
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()
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
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
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()
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
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
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()
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
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
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()
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
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
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()
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
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
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()
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
# 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
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
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
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
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
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
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
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
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
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() {
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
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() {
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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
# 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. */
; 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
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
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
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
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
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
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
# 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. */
; 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
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
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
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
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
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
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
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
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
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
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. */
; 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
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. */
; 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
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
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
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
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. */
; 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
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. */
; 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
# 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
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__
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
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
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. */
; 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
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
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 8445 "configure"
+#line 8475 "configure"
#include "confdefs.h"
find_stack_direction ()
{
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
# 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
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
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
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
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
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
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
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
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
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. */
; 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
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
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
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
{ 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
}
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
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
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
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
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
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
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
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
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
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*
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
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
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
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
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
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
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
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
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
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
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
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
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. */
; 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
*/
/*
- 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
*
*/
Dmsg0(110, "Open connection with storage daemon\n");
- jcr->JobStatus = JS_Blocked;
+ set_jcr_job_status(jcr, JS_Blocked);
/*
* Start conversation with Storage daemon
*/
}
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)) {
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);
}
}
{
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;
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 */
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\
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,
jcr->VolSessionId,
jcr->VolSessionTime,
edit_uint64_with_commas(mr.VolBytes, ec3),
+ fd_term_msg,
+ sd_term_msg,
term_msg);
_("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;
}
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 */
} 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;
return 1;
bail_out:
- jcr->JobStatus = JS_ErrorTerminated;
+ set_jcr_job_status(jcr, JS_ErrorTerminated);
return 0;
}
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;
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;
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;
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;
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;
}
/* 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;
}
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;
}
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;
}
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);
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);
* 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
{
/* 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;
pthread_cond_timedwait(&jcr->term_wait, &jcr->mutex, &timeout);
}
V(jcr->mutex);
- jcr->JobStatus = jcr->SDJobStatus;
+ set_jcr_job_status(jcr, jcr->SDJobStatus);
}
*/
/*
- 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
*
*/
Dmsg0(10, "Open connection with storage daemon\n");
- jcr->JobStatus = JS_Blocked;
+ set_jcr_job_status(jcr, JS_Blocked);
/*
* Start conversation with Storage daemon
*/
}
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);
* 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;
}
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
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;
}
double kbps;
Dmsg0(20, "In restore_cleanup\n");
- jcr->JobStatus = TermCode;
+ set_jcr_job_status(jcr, TermCode);
update_job_end_record(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);
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;
*/
/*
- 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
*/
/*
- 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
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);
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)) {
*/
/*
- 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
/*
* 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;
}
* 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");
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;
Dmsg0(100, "Enter verify_cleanup()\n");
JobId = jcr->jr.JobId;
- jcr->JobStatus = TermCode;
+ set_jcr_job_status(jcr, TermCode);
update_job_end_record(jcr);
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;
}
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);
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 */
}
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;
}
*/
-#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"
}
}
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");
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);
}
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);
/* 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);
}
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;
}
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;
}
*/
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;
}
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;
}
}
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);
}
}
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;
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);
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;
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;
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);
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 */
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;
#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 */
*
*/
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 */
}
}
#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];
};
* 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"
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 */
#if HAVE_UTIME_H
# include <utime.h>
#else
-struct utimbuf
- {
+struct utimbuf {
long actime;
long modtime;
- };
+};
#endif
* 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;
*/
rtn_stat = 1;
entry = (struct dirent *)malloc(sizeof(struct dirent) + name_max + 100);
- for ( ;; ) {
+ for ( ; !job_cancelled(jcr); ) {
char *p, *q;
int i;
*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);
*/
/* 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 */
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);
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 */
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;
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);
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");
}
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
*/
#include "bacula.h"
-#ifdef sgi
-#define HIGHFIRST
-#endif
-
-#ifdef sun
-#define HIGHFIRST
-#endif
-
-#ifndef HIGHFIRST
+#ifndef HAVE_BIGENDIAN
#define byteReverse(buf, len) /* Nothing */
#else
/*
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;
}
*/
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;
}
* 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;
}
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"),
}
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;
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;
#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
/*
* !!!!!!!!!!!!!!!!!! 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. !!!
+ * !!! !!!
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/
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 {
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;
*/
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;
}
* 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;
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));
} 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);
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;
/* 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;
* 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);
* => 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;
* => 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;
#ifndef __STORED_H_
#define __STORED_H_
+#define STORAGE_DAEMON 1
+
#include <sys/mtio.h>
#include "block.h"
#include "record.h"
#define uLongf uint32_t
#endif
+#include "findlib/find.h"
+
extern char errmsg[]; /* general error message */
#endif /* __STORED_H_ */
* 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 */
/* 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;
#include "bacula.h"
#include "findlib/find.h"
-#include "jcr.h"
/* Global variables */
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);
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(_("\
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);