startmysql
stopit
stopmysql
+console.log
+console.sum
@for I in ${subdirs}; \
do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
@(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
- @$(RMF) *~ 1 2 3 core core.*
+ @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
+
# distclean goal is for making a clean source tree, but if you have run
# configure from a different directory, then doesn't destroy all your
@(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
@$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
@$(RMF) console gconsole
- @$(RMF) *~ 1 2 3 core core.*
+ @$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
@$(RMF) working/*
distdirs:
distrib: configure autoconf/config.h.in distdirs distcopy
+test:
+ $(CP) ./autoconf/config.guess .
+ runtest
+ $(RMF) config.guess
+ cat console.sum
+
+
tar.gz: ../$(VERNAME).tar.gz
../$(VERNAME).tar.gz:
(cd ..; tar cvf - $(VERNAME) | gzip -f9 > $(VERNAME).tar.gz)
-# autoconf/Make.common.in -*- Makefile -*-
+# autoconf/Make.common.in -*- Makefile -*-
# release date (man), LSM date, version number/name, current maintainer
DATE="@DATE@"
LSMDATE=@LSMDATE@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
+TTOOL_LDFLAGS = @TTOOL_LDFLAGS@
#DEFS = @DEFS@
LIBS = @LIBS@
DINCLUDE = @DINCLUDE@
dnl
-dnl If available, use support for large files unless the user specified
-dnl one of the CPPFLAGS, LDFLAGS, or LIBS variables (<eggert@twinsun.com>
-dnl via GNU patch 2.5)
-dnl
-AC_DEFUN(LARGE_FILE_SUPPORT,
-[AC_MSG_CHECKING(whether large file support needs explicit enabling)
-ac_getconfs=''
-ac_result=yes
-ac_set=''
-ac_shellvars='CPPFLAGS LDFLAGS LIBS'
-for ac_shellvar in $ac_shellvars; do
- case $ac_shellvar in
- CPPFLAGS) ac_lfsvar=LFS_CFLAGS ac_lfs64var=LFS64_CFLAGS ;;
- *) ac_lfsvar=LFS_$ac_shellvar ac_lfs64var=LFS64_$ac_shellvar ;;
- esac
- eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar
- (getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; }
- ac_getconf=`getconf $ac_lfsvar`
- ac_getconf64=`getconf $ac_lfs64var`
- ac_getconfs=$ac_getconfs$ac_getconf\ $ac_getconf64
- eval ac_test_$ac_shellvar="\$ac_getconf\ \$ac_getconf64"
-done
-case "$ac_result$ac_getconfs" in
-yes) ac_result=no ;;
-esac
-case "$ac_result$ac_set" in
-yes?*) ac_result="yes, but $ac_set is already set, so use its settings"
-esac
-AC_MSG_RESULT($ac_result)
-case $ac_result in
-yes)
- for ac_shellvar in $ac_shellvars; do
- eval $ac_shellvar=\$ac_test_$ac_shellvar
- done ;;
-esac
-])
+dnl ========= Large File Support ==============
+dnl By default, many hosts won't let programs access large files;
+dnl one must use special compiler options to get large-file access to work.
+dnl For more details about this brain damage please see:
+dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
+
+dnl Written by Paul Eggert <eggert@twinsun.com>.
+
+dnl Internal subroutine of AC_SYS_LARGEFILE.
+dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
+AC_DEFUN(AC_SYS_LARGEFILE_FLAGS,
+ [AC_CACHE_CHECK([for $1 value to request large file support],
+ ac_cv_sys_largefile_$1,
+ [ac_cv_sys_largefile_$1=`($GETCONF LFS_$1) 2>/dev/null` || {
+ ac_cv_sys_largefile_$1=no
+ ifelse($1, CFLAGS,
+ [case "$host_os" in
+ # IRIX 6.2 and later require cc -n32.
+changequote(, )dnl
+ irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
+changequote([, ])dnl
+ if test "$GCC" != yes; then
+ ac_cv_sys_largefile_CFLAGS=-n32
+ fi
+ ac_save_CC="$CC"
+ CC="$CC $ac_cv_sys_largefile_CFLAGS"
+ AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
+ CC="$ac_save_CC"
+ esac])
+ }])])
+
+dnl Internal subroutine of AC_SYS_LARGEFILE.
+dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
+AC_DEFUN(AC_SYS_LARGEFILE_SPACE_APPEND,
+ [case $2 in
+ no) ;;
+ ?*)
+ case "[$]$1" in
+ '') $1=$2 ;;
+ *) $1=[$]$1' '$2 ;;
+ esac ;;
+ esac])
+
+dnl Internal subroutine of AC_SYS_LARGEFILE.
+dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT)
+AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
+ [AC_CACHE_CHECK([for $1], $2,
+ [$2=no
+changequote(, )dnl
+ $4
+ for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
+ case "$ac_flag" in
+ -D$1)
+ $2=1 ;;
+ -D$1=*)
+ $2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
+ esac
+ done
+changequote([, ])dnl
+ ])
+ if test "[$]$2" != no; then
+ AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
+ fi])
+
+AC_DEFUN(AC_SYS_LARGEFILE,
+ [AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_ARG_ENABLE(largefile,
+ [ --disable-largefile omit support for large files])
+ if test "$enable_largefile" != no; then
+ AC_CHECK_TOOL(GETCONF, getconf)
+ AC_SYS_LARGEFILE_FLAGS(CFLAGS)
+ AC_SYS_LARGEFILE_FLAGS(LDFLAGS)
+ AC_SYS_LARGEFILE_FLAGS(LIBS)
+
+ for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
+ case "$ac_flag" in
+ no) ;;
+ -D_FILE_OFFSET_BITS=*) ;;
+ -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
+ -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
+ -D?* | -I?*)
+ AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
+ *)
+ AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
+ esac
+ done
+ AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS")
+ AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
+ AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
+ ac_cv_sys_file_offset_bits,
+ [Number of bits in a file offset, on hosts where this is settable.],
+ [case "$host_os" in
+ # HP-UX 10.20 and later
+ hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
+ ac_cv_sys_file_offset_bits=64 ;;
+ esac])
+ AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
+ ac_cv_sys_largefile_source,
+ [Define to make fseeko etc. visible, on some hosts.],
+ [case "$host_os" in
+ # HP-UX 10.20 and later
+ hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
+ ac_cv_sys_largefile_source=1 ;;
+ esac])
+ AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
+ ac_cv_sys_large_files,
+ [Define for large files, on AIX-style hosts.],
+ [case "$host_os" in
+ # AIX 4.2 and later
+ aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
+ ac_cv_sys_large_files=1 ;;
+ esac])
+ fi
+ ])
+dnl ==========================================================
dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7)
AC_DEFUN(SIGNAL_CHECK,
fi
fi
SQL_INCLUDE=-I$MYSQL_INCDIR
- SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient"
+ SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient -lz"
SQL_BINDIR=$MYSQL_BINDIR
AC_DEFINE(HAVE_MYSQL)
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
+/* Define if you have the getdomainname function. */
+#undef HAVE_GETDOMAINNAME
+
/* Define if you have the gethostbyname_r function. */
#undef HAVE_GETHOSTBYNAME_R
+/* Define if you have the gethostid function. */
+#undef HAVE_GETHOSTID
+
/* Define if you have the gethostname function. */
#undef HAVE_GETHOSTNAME
/* Define if you have the xnet library (-lxnet). */
#undef HAVE_LIBXNET
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define to make fseeko etc. visible, on some hosts. */
+#undef _LARGEFILE_SOURCE
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
AC_CONFIG_HEADER(src/config.h:autoconf/config.h.in)
dnl require a recent autoconf
-AC_PREREQ(2.12)
+AC_PREREQ(2.13)
dnl search for true and false programs.
support_mysql=no
support_sqlite=no
support_smartalloc=yes
+support_readline=yes
+support_gnome=no
+support_static_tools=yes
cats=
db_name=Internal
DB_NAME=bdb
# -------------------------------------------
# gnome (default off)
# -------------------------------------------
-support_gnome=no
AC_ARG_ENABLE(gnome,
[ --enable-gnome enable build of gnome-console GUI *],
[if test x$enableval = xyes; then
AC_DEFINE(SMARTALLOC)
fi
+# -------------------------------------------
+# static-tools (default on)
+# -------------------------------------------
+AC_ARG_ENABLE(static-tools,
+ [ --enable-static-tools enable static tape tools *],
+ [if test x$enableval = xno; then
+ support_static_tools=no
+ fi])
+
+TTOOL_LDFLAGS=
+if test x$support_static_tools = xyes; then
+ TTOOL_LDFLAGS="-static"
+fi
+AC_SUBST(TTOOL_LDFLAGS)
+
+
# ---------------------------------------------------
# Check for readline support/directory (default on)
# ---------------------------------------------------
-support_readline=yes
# this allows you to turn it completely off
AC_ARG_ENABLE(readline,
[ --disable-readline disable readline support ],
if test "x$dir_password" = "x" ; then
if test "x$OPENSSL" = "xnone" ; then
- key=`date | uuencode 1 | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
+# key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
+ key=`./randpass 33`
else
key=`openssl rand -base64 33`
fi
if test "x$fd_password" = "x" ; then
if test "x$OPENSSL" = "xnone" ; then
- key=`date | uuencode 1 | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
+# key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
+ key=`./randpass 37`
else
key=`openssl rand -base64 33`
fi
if test "x$sd_password" = "x" ; then
if test "x$OPENSSL" = "xnone" ; then
- key=`date | uuencode 1 | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
+# key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
+ key=`./randpass 41`
else
key=`openssl rand -base64 33`
fi
dnl A few others
AC_EXEEXT
-dnl # AC_SYS_LARGEFILE must modify aclocal.m4
-dnl LARGE_FILE_SUPPORT
-
+
+dnl See if we can use 64 bit file addresses
+AC_SYS_LARGEFILE
AC_PATH_XTRA
AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
-AC_CHECK_FUNCS(snprintf vsnprintf)
+AC_CHECK_FUNCS(snprintf vsnprintf gethostid getdomainname)
dnl# --------------------------------------------------------------------------
dnl# CHECKING FOR THREAD SAFE FUNCTIONS
platforms/freebsd/bacula-sd \
platforms/freebsd/bacula-dir"
hostname=`hostname -s`
+ ac_cv_sys_largefile_CFLAGS="yes"
;;
hpux)
DISTVER=`uname -r`
src/cats/create_bdb_database \
src/cats/make_bdb_tables \
src/cats/drop_bdb_tables \
+ src/cats/make_bacula_tables \
+ src/cats/drop_bacula_tables \
src/findlib/Makefile \
src/tools/Makefile \
$PFILES ],
Compiler flags: ${CFLAGS}
Linker flags: ${LDFLAGS}
Libraries: ${LIBS}
+ Statically Linked Tools: ${support_static_tools}
Database found: ${have_db}
Database type: ${db_name}
Database lib: ${DB_LIBS}
Working directory ${working_dir}
SQL binaries Directory ${SQL_BINDIR}
+ Large file support: $ac_cv_sys_largefile_CFLAGS
readline support: ${got_readline} ${PRTREADLINE_SRC}
cweb support: ${got_cweb} ${CWEB_SRC}
TCP Wrappers support: ${TCPW_MSG}
--with-gnome Specify prefix for GNOME files"
ac_help="$ac_help
--enable-smartalloc enable smartalloc debugging support *"
+ac_help="$ac_help
+ --enable-static-tools enable static tape tools *"
ac_help="$ac_help
--disable-readline disable readline support "
ac_help="$ac_help
--with-sqlite[=DIR] Include SQLite support. DIR is the SQLite base
install directory, default is to search through
a number of common places for the SQLite files."
+ac_help="$ac_help
+ --disable-largefile omit support for large files"
ac_help="$ac_help
--with-x use the X Window System"
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:621: checking for $ac_word" >&5
+echo "configure:625: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_TRUEPRG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:662: checking for $ac_word" >&5
+echo "configure:666: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_FALSEPRG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:706: checking host system type" >&5
+echo "configure:710: checking host system type" >&5
host_alias=$host
case "$host_alias" in
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:737: checking for $ac_word" >&5
+echo "configure:741: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:767: checking for $ac_word" >&5
+echo "configure:771: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:818: checking for $ac_word" >&5
+echo "configure:822: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:850: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:854: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
cat > conftest.$ac_ext << EOF
-#line 861 "configure"
+#line 865 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:892: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:896: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:897: checking whether we are using GNU C" >&5
+echo "configure:901: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:925: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:929: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:961: checking for $ac_word" >&5
+echo "configure:965: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:993: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:997: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
cat > conftest.$ac_ext << EOF
-#line 1004 "configure"
+#line 1008 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
-if { (eval echo configure:1009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1035: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1039: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1040: checking whether we are using GNU C++" >&5
+echo "configure:1044: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1068: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1072: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
'void exit (int);'
do
cat > conftest.$ac_ext <<EOF
-#line 1109 "configure"
+#line 1113 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
exit (42);
; return 0; }
EOF
-if { (eval echo configure:1117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
:
else
echo "configure: failed program was:" >&5
fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 1127 "configure"
+#line 1131 "configure"
#include "confdefs.h"
$ac_declaration
int main() {
exit (42);
; return 0; }
EOF
-if { (eval echo configure:1134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
break
else
if test "x$CC" != xcc; then
echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
-echo "configure:1152: checking whether $CC and cc understand -c and -o together" >&5
+echo "configure:1156: checking whether $CC and cc understand -c and -o together" >&5
else
echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
-echo "configure:1155: checking whether cc understands -c and -o together" >&5
+echo "configure:1159: checking whether cc understands -c and -o together" >&5
fi
set dummy $CC; ac_cc="`echo $2 |
sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
# We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one.
ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
-if { (eval echo configure:1167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
- test -f conftest.o && { (eval echo configure:1168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+if { (eval echo configure:1171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+ test -f conftest.o && { (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
then
eval ac_cv_prog_cc_${ac_cc}_c_o=yes
if test "x$CC" != xcc; then
# Test first that cc exists at all.
- if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
ac_try='cc -c conftest.c -o conftest.o 1>&5'
- if { (eval echo configure:1175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
- test -f conftest.o && { (eval echo configure:1176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+ if { (eval echo configure:1179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+ test -f conftest.o && { (eval echo configure:1180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
then
# cc works too.
:
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1202: checking how to run the C preprocessor" >&5
+echo "configure:1206: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1217 "configure"
+#line 1221 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1227: \"$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*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1234 "configure"
+#line 1238 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1244: \"$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*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1251 "configure"
+#line 1255 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1261: \"$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
:
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:1283: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:1287: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <<EOF
-#line 1289 "configure"
+#line 1293 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 1307 "configure"
+#line 1311 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1348: checking for a BSD compatible install" >&5
+echo "configure:1352: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1403: checking for $ac_word" >&5
+echo "configure:1407: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "mv", so it can be a program name with args.
set dummy mv; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1433: checking for $ac_word" >&5
+echo "configure:1437: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "rm", so it can be a program name with args.
set dummy rm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1469: checking for $ac_word" >&5
+echo "configure:1473: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cp", so it can be a program name with args.
set dummy cp; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1505: checking for $ac_word" >&5
+echo "configure:1509: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "sed", so it can be a program name with args.
set dummy sed; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1541: checking for $ac_word" >&5
+echo "configure:1545: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "awk", so it can be a program name with args.
set dummy awk; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1577: checking for $ac_word" >&5
+echo "configure:1581: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "echo", so it can be a program name with args.
set dummy echo; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1613: checking for $ac_word" >&5
+echo "configure:1617: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ECHO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cmp", so it can be a program name with args.
set dummy cmp; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1649: checking for $ac_word" >&5
+echo "configure:1653: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "tbl", so it can be a program name with args.
set dummy tbl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1685: checking for $ac_word" >&5
+echo "configure:1689: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_TBL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1721: checking for $ac_word" >&5
+echo "configure:1725: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1757: checking for $ac_word" >&5
+echo "configure:1761: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "openssl", so it can be a program name with args.
set dummy openssl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1793: checking for $ac_word" >&5
+echo "configure:1797: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_OPENSSL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for Operating System""... $ac_c" 1>&6
-echo "configure:1841: checking for Operating System" >&5
+echo "configure:1845: checking for Operating System" >&5
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1843: checking for Cygwin environment" >&5
+echo "configure:1847: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1848 "configure"
+#line 1852 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:1859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
# -----------------------------------------------------------
# ----------------------------------------------------------
echo $ac_n "checking for Operating System Distribution""... $ac_c" 1>&6
-echo "configure:2178: checking for Operating System Distribution" >&5
+echo "configure:2182: checking for Operating System Distribution" >&5
if test "x$DISTNAME" != "x"
then
echo "distname set to $DISTNAME"
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2295: checking for $ac_word" >&5
+echo "configure:2299: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
support_mysql=no
support_sqlite=no
support_smartalloc=yes
+support_readline=yes
+support_gnome=no
+support_static_tools=yes
cats=
db_name=Internal
DB_NAME=bdb
# -------------------------------------------
# gnome (default off)
# -------------------------------------------
-support_gnome=no
# Check whether --enable-gnome or --disable-gnome was given.
if test "${enable_gnome+set}" = set; then
enableval="$enable_gnome"
# Extract the first word of "gnome-config", so it can be a program name with args.
set dummy gnome-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2427: checking for $ac_word" >&5
+echo "configure:2433: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
no_gnome_config="yes"
else
echo $ac_n "checking if $GNOME_CONFIG works""... $ac_c" 1>&6
-echo "configure:2464: checking if $GNOME_CONFIG works" >&5
+echo "configure:2470: checking if $GNOME_CONFIG works" >&5
if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
echo "$ac_t""yes" 1>&6
# Extract the first word of "orbit-config", so it can be a program name with args.
set dummy orbit-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2472: checking for $ac_word" >&5
+echo "configure:2478: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ORBIT_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "orbit-idl", so it can be a program name with args.
set dummy orbit-idl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2508: checking for $ac_word" >&5
+echo "configure:2514: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ORBIT_IDL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking for working ORBit environment""... $ac_c" 1>&6
-echo "configure:2542: checking for working ORBit environment" >&5
+echo "configure:2548: checking for working ORBit environment" >&5
if eval "test \"`echo '$''{'gnome_cv_orbit_found'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking for gnorba libraries""... $ac_c" 1>&6
-echo "configure:2578: checking for gnorba libraries" >&5
+echo "configure:2584: checking for gnorba libraries" >&5
if eval "test \"`echo '$''{'gnome_cv_gnorba_found'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$no_gnome_config" = "yes"; then
echo $ac_n "checking for gnomeConf.sh file in $gnome_prefix""... $ac_c" 1>&6
-echo "configure:2642: checking for gnomeConf.sh file in $gnome_prefix" >&5
+echo "configure:2648: checking for gnomeConf.sh file in $gnome_prefix" >&5
if test -f $gnome_prefix/gnomeConf.sh; then
echo "$ac_t""found" 1>&6
echo "loading gnome configuration from" \
n=""
for i in $n; do
echo $ac_n "checking extra library \"$i\"""... $ac_c" 1>&6
-echo "configure:2662: checking extra library \"$i\"" >&5
+echo "configure:2668: checking extra library \"$i\"" >&5
case $i in
applets)
fi
+# -------------------------------------------
+# static-tools (default on)
+# -------------------------------------------
+# Check whether --enable-static-tools or --disable-static-tools was given.
+if test "${enable_static_tools+set}" = set; then
+ enableval="$enable_static_tools"
+ if test x$enableval = xno; then
+ support_static_tools=no
+ fi
+fi
+
+
+TTOOL_LDFLAGS=
+if test x$support_static_tools = xyes; then
+ TTOOL_LDFLAGS="-static"
+fi
+
+
+
# ---------------------------------------------------
# Check for readline support/directory (default on)
# ---------------------------------------------------
-support_readline=yes
# this allows you to turn it completely off
# Check whether --enable-readline or --disable-readline was given.
if test "${enable_readline+set}" = set; then
fi
ac_safe=`echo "$with_readline/readline.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $with_readline/readline.h""... $ac_c" 1>&6
-echo "configure:2743: checking for $with_readline/readline.h" >&5
+echo "configure:2767: checking for $with_readline/readline.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2748 "configure"
+#line 2772 "configure"
#include "confdefs.h"
#include <$with_readline/readline.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2777: \"$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*
# check for standard readline library
ac_safe=`echo "/usr/include/readline/readline.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for /usr/include/readline/readline.h""... $ac_c" 1>&6
-echo "configure:2792: checking for /usr/include/readline/readline.h" >&5
+echo "configure:2816: checking for /usr/include/readline/readline.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2797 "configure"
+#line 2821 "configure"
#include "confdefs.h"
#include </usr/include/readline/readline.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2826: \"$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_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:2859: checking whether stat file-mode macros are broken" >&5
+echo "configure:2883: checking whether stat file-mode macros are broken" >&5
if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2864 "configure"
+#line 2888 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:2919: checking for $ac_hdr that defines DIR" >&5
+echo "configure:2943: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2924 "configure"
+#line 2948 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:2932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:2957: checking for opendir in -ldir" >&5
+echo "configure:2981: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2965 "configure"
+#line 2989 "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
opendir()
; return 0; }
EOF
-if { (eval echo configure:2976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3000: \"$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_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:2998: checking for opendir in -lx" >&5
+echo "configure:3022: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3006 "configure"
+#line 3030 "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
opendir()
; return 0; }
EOF
-if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3041: \"$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 strcasecmp select setenv putenv tcgetattr setlocale lstat lchown
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3043: checking for $ac_func" >&5
+echo "configure:3067: 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 3048 "configure"
+#line 3072 "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:3071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3095: \"$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
# EXTRAOBJ="$EXTRAOBJ lib/getopt.o lib/getopt1.o"])
echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
-echo "configure:3101: checking for getopt_long" >&5
+echo "configure:3125: checking for getopt_long" >&5
if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3106 "configure"
+#line 3130 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char getopt_long(); below. */
; return 0; }
EOF
-if { (eval echo configure:3129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_getopt_long=yes"
else
echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
-echo "configure:3154: checking for working strcoll" >&5
+echo "configure:3178: checking for working strcoll" >&5
if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_func_strcoll_works=no
else
cat > conftest.$ac_ext <<EOF
-#line 3162 "configure"
+#line 3186 "configure"
#include "confdefs.h"
#include <string.h>
main ()
strcoll ("123", "456") >= 0);
}
EOF
-if { (eval echo configure:3172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_strcoll_works=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3200: checking for $ac_hdr" >&5
+echo "configure:3224: 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 3205 "configure"
+#line 3229 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3234: \"$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
ac_safe=`echo "$with_gmp/gmp.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $with_gmp/gmp.h""... $ac_c" 1>&6
-echo "configure:3262: checking for $with_gmp/gmp.h" >&5
+echo "configure:3286: checking for $with_gmp/gmp.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3267 "configure"
+#line 3291 "configure"
#include "confdefs.h"
#include <$with_gmp/gmp.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3296: \"$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*
# check for standard gmp library
ac_safe=`echo "/usr/include/gmp.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for /usr/include/gmp.h""... $ac_c" 1>&6
-echo "configure:3311: checking for /usr/include/gmp.h" >&5
+echo "configure:3335: checking for /usr/include/gmp.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3316 "configure"
+#line 3340 "configure"
#include "confdefs.h"
#include </usr/include/gmp.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3345: \"$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
ac_safe=`echo "$with_cweb/cweb.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $with_cweb/cweb.h""... $ac_c" 1>&6
-echo "configure:3399: checking for $with_cweb/cweb.h" >&5
+echo "configure:3423: checking for $with_cweb/cweb.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3404 "configure"
+#line 3428 "configure"
#include "confdefs.h"
#include <$with_cweb/cweb.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3433: \"$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*
# check for standard cweb library
ac_safe=`echo "/usr/include/cweb.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for /usr/include/cweb.h""... $ac_c" 1>&6
-echo "configure:3448: checking for /usr/include/cweb.h" >&5
+echo "configure:3472: checking for /usr/include/cweb.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3453 "configure"
+#line 3477 "configure"
#include "confdefs.h"
#include </usr/include/cweb.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3482: \"$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*
saved_LIBS="$LIBS"
LIBS="$LIBS -lwrap -lnsl"
echo $ac_n "checking for libwrap""... $ac_c" 1>&6
-echo "configure:3529: checking for libwrap" >&5
+echo "configure:3553: checking for libwrap" >&5
cat > conftest.$ac_ext <<EOF
-#line 3531 "configure"
+#line 3555 "configure"
#include "confdefs.h"
#include <tcpd.h>
int deny_severity = 0;
hosts_access(req);
; return 0; }
EOF
-if { (eval echo configure:3541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
if test "x$dir_password" = "x" ; then
if test "x$OPENSSL" = "xnone" ; then
- key=`date | uuencode 1 | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
+# key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
+ key=`./randpass 33`
else
key=`openssl rand -base64 33`
fi
if test "x$fd_password" = "x" ; then
if test "x$OPENSSL" = "xnone" ; then
- key=`date | uuencode 1 | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
+# key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
+ key=`./randpass 37`
else
key=`openssl rand -base64 33`
fi
if test "x$sd_password" = "x" ; then
if test "x$OPENSSL" = "xnone" ; then
- key=`date | uuencode 1 | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
+# key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
+ key=`./randpass 41`
else
key=`openssl rand -base64 33`
fi
have_db=no
echo $ac_n "checking for MySQL support""... $ac_c" 1>&6
-echo "configure:3806: checking for MySQL support" >&5
+echo "configure:3833: checking for MySQL support" >&5
# Check whether --with-mysql or --without-mysql was given.
if test "${with_mysql+set}" = set; then
withval="$with_mysql"
fi
fi
SQL_INCLUDE=-I$MYSQL_INCDIR
- SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient"
+ SQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient -lz"
SQL_BINDIR=$MYSQL_BINDIR
cat >> confdefs.h <<\EOF
have_db=no
echo $ac_n "checking for SQLite support""... $ac_c" 1>&6
-echo "configure:3963: checking for SQLite support" >&5
+echo "configure:3990: checking for SQLite support" >&5
# Check whether --with-sqlite or --without-sqlite was given.
if test "${with_sqlite+set}" = set; then
withval="$with_sqlite"
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:4039: checking for mingw32 environment" >&5
+echo "configure:4066: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4044 "configure"
+#line 4071 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:4051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:4070: checking for executable suffix" >&5
+echo "configure:4097: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:4080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj) ;;
echo "$ac_t""${ac_cv_exeext}" 1>&6
ac_exeext=$EXEEXT
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:4129: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+if test $host != $build; then
+ ac_tool_prefix=${host_alias}-
+else
+ ac_tool_prefix=
+fi
+
+
+ # Check whether --enable-largefile or --disable-largefile was given.
+if test "${enable_largefile+set}" = set; then
+ enableval="$enable_largefile"
+ :
+fi
+
+ if test "$enable_largefile" != no; then
+ # Extract the first word of "${ac_tool_prefix}getconf", so it can be a program name with args.
+set dummy ${ac_tool_prefix}getconf; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4163: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_GETCONF'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$GETCONF"; then
+ ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_GETCONF="${ac_tool_prefix}getconf"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="getconf"
+fi
+fi
+GETCONF="$ac_cv_prog_GETCONF"
+if test -n "$GETCONF"; then
+ echo "$ac_t""$GETCONF" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+
+ echo $ac_n "checking for CFLAGS value to request large file support""... $ac_c" 1>&6
+echo "configure:4193: checking for CFLAGS value to request large file support" >&5
+if eval "test \"`echo '$''{'ac_cv_sys_largefile_CFLAGS'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_sys_largefile_CFLAGS=`($GETCONF LFS_CFLAGS) 2>/dev/null` || {
+ ac_cv_sys_largefile_CFLAGS=no
+ case "$host_os" in
+ # IRIX 6.2 and later require cc -n32.
+ irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
+ if test "$GCC" != yes; then
+ ac_cv_sys_largefile_CFLAGS=-n32
+ fi
+ ac_save_CC="$CC"
+ CC="$CC $ac_cv_sys_largefile_CFLAGS"
+ cat > conftest.$ac_ext <<EOF
+#line 4208 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:4215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_sys_largefile_CFLAGS=no
+fi
+rm -f conftest*
+ CC="$ac_save_CC"
+ esac
+ }
+fi
+
+echo "$ac_t""$ac_cv_sys_largefile_CFLAGS" 1>&6
+ echo $ac_n "checking for LDFLAGS value to request large file support""... $ac_c" 1>&6
+echo "configure:4231: checking for LDFLAGS value to request large file support" >&5
+if eval "test \"`echo '$''{'ac_cv_sys_largefile_LDFLAGS'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_sys_largefile_LDFLAGS=`($GETCONF LFS_LDFLAGS) 2>/dev/null` || {
+ ac_cv_sys_largefile_LDFLAGS=no
+
+ }
+fi
+
+echo "$ac_t""$ac_cv_sys_largefile_LDFLAGS" 1>&6
+ echo $ac_n "checking for LIBS value to request large file support""... $ac_c" 1>&6
+echo "configure:4243: checking for LIBS value to request large file support" >&5
+if eval "test \"`echo '$''{'ac_cv_sys_largefile_LIBS'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_sys_largefile_LIBS=`($GETCONF LFS_LIBS) 2>/dev/null` || {
+ ac_cv_sys_largefile_LIBS=no
+
+ }
+fi
+
+echo "$ac_t""$ac_cv_sys_largefile_LIBS" 1>&6
+
+ for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
+ case "$ac_flag" in
+ no) ;;
+ -D_FILE_OFFSET_BITS=*) ;;
+ -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
+ -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
+ -D?* | -I?*)
+ case "$ac_flag" in
+ no) ;;
+ ?*)
+ case "$CPPFLAGS" in
+ '') CPPFLAGS="$ac_flag" ;;
+ *) CPPFLAGS=$CPPFLAGS' '"$ac_flag" ;;
+ esac ;;
+ esac ;;
+ *)
+ case "$ac_flag" in
+ no) ;;
+ ?*)
+ case "$CFLAGS" in
+ '') CFLAGS="$ac_flag" ;;
+ *) CFLAGS=$CFLAGS' '"$ac_flag" ;;
+ esac ;;
+ esac ;;
+ esac
+ done
+ case "$ac_cv_sys_largefile_LDFLAGS" in
+ no) ;;
+ ?*)
+ case "$LDFLAGS" in
+ '') LDFLAGS="$ac_cv_sys_largefile_LDFLAGS" ;;
+ *) LDFLAGS=$LDFLAGS' '"$ac_cv_sys_largefile_LDFLAGS" ;;
+ esac ;;
+ esac
+ case "$ac_cv_sys_largefile_LIBS" in
+ no) ;;
+ ?*)
+ case "$LIBS" in
+ '') LIBS="$ac_cv_sys_largefile_LIBS" ;;
+ *) LIBS=$LIBS' '"$ac_cv_sys_largefile_LIBS" ;;
+ esac ;;
+ esac
+ echo $ac_n "checking for _FILE_OFFSET_BITS""... $ac_c" 1>&6
+echo "configure:4298: checking for _FILE_OFFSET_BITS" >&5
+if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_sys_file_offset_bits=no
+ case "$host_os" in
+ # HP-UX 10.20 and later
+ hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
+ ac_cv_sys_file_offset_bits=64 ;;
+ esac
+ for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
+ case "$ac_flag" in
+ -D_FILE_OFFSET_BITS)
+ ac_cv_sys_file_offset_bits=1 ;;
+ -D_FILE_OFFSET_BITS=*)
+ ac_cv_sys_file_offset_bits=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
+ esac
+ done
+
+fi
+
+echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
+ if test "$ac_cv_sys_file_offset_bits" != no; then
+ cat >> confdefs.h <<EOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+EOF
+
+ fi
+ echo $ac_n "checking for _LARGEFILE_SOURCE""... $ac_c" 1>&6
+echo "configure:4327: checking for _LARGEFILE_SOURCE" >&5
+if eval "test \"`echo '$''{'ac_cv_sys_largefile_source'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_sys_largefile_source=no
+ case "$host_os" in
+ # HP-UX 10.20 and later
+ hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
+ ac_cv_sys_largefile_source=1 ;;
+ esac
+ for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
+ case "$ac_flag" in
+ -D_LARGEFILE_SOURCE)
+ ac_cv_sys_largefile_source=1 ;;
+ -D_LARGEFILE_SOURCE=*)
+ ac_cv_sys_largefile_source=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
+ esac
+ done
+
+fi
+
+echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
+ if test "$ac_cv_sys_largefile_source" != no; then
+ cat >> confdefs.h <<EOF
+#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+EOF
+
+ fi
+ echo $ac_n "checking for _LARGE_FILES""... $ac_c" 1>&6
+echo "configure:4356: checking for _LARGE_FILES" >&5
+if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_sys_large_files=no
+ case "$host_os" in
+ # AIX 4.2 and later
+ aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
+ ac_cv_sys_large_files=1 ;;
+ esac
+ for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
+ case "$ac_flag" in
+ -D_LARGE_FILES)
+ ac_cv_sys_large_files=1 ;;
+ -D_LARGE_FILES=*)
+ ac_cv_sys_large_files=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
+ esac
+ done
+
+fi
+
+echo "$ac_t""$ac_cv_sys_large_files" 1>&6
+ if test "$ac_cv_sys_large_files" != no; then
+ cat >> confdefs.h <<EOF
+#define _LARGE_FILES $ac_cv_sys_large_files
+EOF
+
+ fi
+ fi
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:4108: checking for X" >&5
+echo "configure:4393: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 4170 "configure"
+#line 4455 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4460: \"$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*
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4244 "configure"
+#line 4529 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:4251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
case "`(uname -sr) 2>/dev/null`" in
"SunOS 5"*)
echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:4357: checking whether -R must be followed by a space" >&5
+echo "configure:4642: checking whether -R must be followed by a space" >&5
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 4360 "configure"
+#line 4645 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:4367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_nospace=yes
else
else
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 4383 "configure"
+#line 4668 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:4390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_space=yes
else
# libraries were built with DECnet support. And karl@cs.umb.edu says
# the Alpha needs dnet_stub (dnet does not exist).
echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:4422: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:4707: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldnet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4430 "configure"
+#line 4715 "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
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:4441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4726: \"$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
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:4463: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:4748: checking for dnet_ntoa in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4471 "configure"
+#line 4756 "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
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:4482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4767: \"$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
# The nsl library prevents programs from opening the X display
# on Irix 5.2, according to dickey@clark.net.
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:4511: checking for gethostbyname" >&5
+echo "configure:4796: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4516 "configure"
+#line 4801 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
; return 0; }
EOF
-if { (eval echo configure:4539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
if test $ac_cv_func_gethostbyname = no; then
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:4560: checking for gethostbyname in -lnsl" >&5
+echo "configure:4845: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4568 "configure"
+#line 4853 "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()
; return 0; }
EOF
-if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4864: \"$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
# -lsocket must be given before -lnsl if both are needed.
# We assume that if connect needs -lnsl, so does gethostbyname.
echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:4609: checking for connect" >&5
+echo "configure:4894: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4614 "configure"
+#line 4899 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
; return 0; }
EOF
-if { (eval echo configure:4637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
if test $ac_cv_func_connect = no; then
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:4658: checking for connect in -lsocket" >&5
+echo "configure:4943: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4666 "configure"
+#line 4951 "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
connect()
; return 0; }
EOF
-if { (eval echo configure:4677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4962: \"$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
# gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:4701: checking for remove" >&5
+echo "configure:4986: checking for remove" >&5
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4706 "configure"
+#line 4991 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove(); below. */
; return 0; }
EOF
-if { (eval echo configure:4729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_remove=yes"
else
if test $ac_cv_func_remove = no; then
echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:4750: checking for remove in -lposix" >&5
+echo "configure:5035: checking for remove in -lposix" >&5
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lposix $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4758 "configure"
+#line 5043 "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
remove()
; return 0; }
EOF
-if { (eval echo configure:4769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5054: \"$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
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:4793: checking for shmat" >&5
+echo "configure:5078: checking for shmat" >&5
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4798 "configure"
+#line 5083 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat(); below. */
; return 0; }
EOF
-if { (eval echo configure:4821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_shmat=yes"
else
if test $ac_cv_func_shmat = no; then
echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:4842: checking for shmat in -lipc" >&5
+echo "configure:5127: checking for shmat in -lipc" >&5
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lipc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4850 "configure"
+#line 5135 "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
shmat()
; return 0; }
EOF
-if { (eval echo configure:4861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5146: \"$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
# libraries we check for below, so use a different variable.
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:4894: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:5179: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4902 "configure"
+#line 5187 "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
IceConnectionNumber()
; return 0; }
EOF
-if { (eval echo configure:4913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5198: \"$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:4958: checking for $ac_hdr" >&5
+echo "configure:5243: 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 4963 "configure"
+#line 5248 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5253: \"$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 ANSI C header files""... $ac_c" 1>&6
-echo "configure:4995: checking for ANSI C header files" >&5
+echo "configure:5280: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5000 "configure"
+#line 5285 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5293: \"$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*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 5025 "configure"
+#line 5310 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 5043 "configure"
+#line 5328 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 5064 "configure"
+#line 5349 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:5075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
fi
echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6
-echo "configure:5099: checking whether sys/types.h defines makedev" >&5
+echo "configure:5384: checking whether sys/types.h defines makedev" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5104 "configure"
+#line 5389 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
return makedev(0, 0);
; return 0; }
EOF
-if { (eval echo configure:5111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_sys_types_h_makedev=yes
else
if test $ac_cv_header_sys_types_h_makedev = no; then
ac_safe=`echo "sys/mkdev.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&6
-echo "configure:5129: checking for sys/mkdev.h" >&5
+echo "configure:5414: checking for sys/mkdev.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5134 "configure"
+#line 5419 "configure"
#include "confdefs.h"
#include <sys/mkdev.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5424: \"$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*
if test $ac_cv_header_sys_mkdev_h = no; then
ac_safe=`echo "sys/sysmacros.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6
-echo "configure:5167: checking for sys/sysmacros.h" >&5
+echo "configure:5452: checking for sys/sysmacros.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5172 "configure"
+#line 5457 "configure"
#include "confdefs.h"
#include <sys/sysmacros.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5462: \"$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*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:5209: checking for $ac_hdr that defines DIR" >&5
+echo "configure:5494: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5214 "configure"
+#line 5499 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:5222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:5247: checking for opendir in -ldir" >&5
+echo "configure:5532: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5255 "configure"
+#line 5540 "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
opendir()
; return 0; }
EOF
-if { (eval echo configure:5266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5551: \"$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_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:5288: checking for opendir in -lx" >&5
+echo "configure:5573: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5296 "configure"
+#line 5581 "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
opendir()
; return 0; }
EOF
-if { (eval echo configure:5307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5592: \"$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 whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:5330: checking whether stat file-mode macros are broken" >&5
+echo "configure:5615: checking whether stat file-mode macros are broken" >&5
if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5335 "configure"
+#line 5620 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:5386: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:5671: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5391 "configure"
+#line 5676 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:5407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:5428: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:5713: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5433 "configure"
+#line 5718 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:5442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
fi
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
-echo "configure:5463: checking for st_blksize in struct stat" >&5
+echo "configure:5748: checking for st_blksize in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5468 "configure"
+#line 5753 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
struct stat s; s.st_blksize;
; return 0; }
EOF
-if { (eval echo configure:5476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blksize=yes
else
fi
echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
-echo "configure:5497: checking for st_blocks in struct stat" >&5
+echo "configure:5782: 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 5502 "configure"
+#line 5787 "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:5510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5795: \"$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 whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:5533: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:5818: 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 5538 "configure"
+#line 5823 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:5546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5831: \"$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 tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:5567: checking for tm_zone in struct tm" >&5
+echo "configure:5852: checking for tm_zone in struct tm" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5572 "configure"
+#line 5857 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>
struct tm tm; tm.tm_zone;
; return 0; }
EOF
-if { (eval echo configure:5580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm_zone=yes
else
else
echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:5600: checking for tzname" >&5
+echo "configure:5885: checking for tzname" >&5
if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5605 "configure"
+#line 5890 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI. */
atoi(*tzname);
; return 0; }
EOF
-if { (eval echo configure:5615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_var_tzname=yes
else
# 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:5642: checking for utime.h" >&5
+echo "configure:5927: 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 5647 "configure"
+#line 5932 "configure"
#include "confdefs.h"
#include <sys/types.h>
struct utimbuf foo
; return 0; }
EOF
-if { (eval echo configure:5656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tar_cv_header_utime_h=yes
else
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:5675: checking for working const" >&5
+echo "configure:5960: 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 5680 "configure"
+#line 5965 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:5729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6014: \"$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:5752: checking how to get filesystem type" >&5
+echo "configure:6037: checking how to get filesystem type" >&5
fstype=no
# The order of these tests is important.
cat > conftest.$ac_ext <<EOF
-#line 5756 "configure"
+#line 6041 "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:5762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6047: \"$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 5778 "configure"
+#line 6063 "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:5784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6069: \"$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 5801 "configure"
+#line 6086 "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:5807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6092: \"$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 5824 "configure"
+#line 6109 "configure"
#include "confdefs.h"
#include <mntent.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6114: \"$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 5846 "configure"
+#line 6131 "configure"
#include "confdefs.h"
#include <sys/mount.h>
EOF
fi
if test $fstype = no; then
cat > conftest.$ac_ext <<EOF
-#line 5863 "configure"
+#line 6148 "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:5869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6154: \"$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:5887: checking return type of signal handlers" >&5
+echo "configure:6172: 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 5892 "configure"
+#line 6177 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:5909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6194: \"$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:5929: checking for type of signal functions" >&5
+echo "configure:6214: 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 5935 "configure"
+#line 6220 "configure"
#include "confdefs.h"
#include <signal.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:5948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6233: \"$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 5957 "configure"
+#line 6242 "configure"
#include "confdefs.h"
#include <signal.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:5967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6252: \"$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 5976 "configure"
+#line 6261 "configure"
#include "confdefs.h"
#include <signal.h>
; return 0; }
EOF
-if { (eval echo configure:5989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6274: \"$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:6028: checking for mode_t" >&5
+echo "configure:6313: 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 6033 "configure"
+#line 6318 "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:6061: checking for uid_t in sys/types.h" >&5
+echo "configure:6346: 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 6066 "configure"
+#line 6351 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:6095: checking for size_t" >&5
+echo "configure:6380: 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 6100 "configure"
+#line 6385 "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:6128: checking for pid_t" >&5
+echo "configure:6413: 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 6133 "configure"
+#line 6418 "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:6161: checking for off_t" >&5
+echo "configure:6446: 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 6166 "configure"
+#line 6451 "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:6194: checking for ino_t" >&5
+echo "configure:6479: 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 6199 "configure"
+#line 6484 "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:6227: checking for dev_t" >&5
+echo "configure:6512: 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 6232 "configure"
+#line 6517 "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:6260: checking for daddr_t" >&5
+echo "configure:6545: 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 6265 "configure"
+#line 6550 "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:6293: checking for major_t" >&5
+echo "configure:6578: 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 6298 "configure"
+#line 6583 "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:6326: checking for minor_t" >&5
+echo "configure:6611: 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 6331 "configure"
+#line 6616 "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:6359: checking for ssize_t" >&5
+echo "configure:6644: 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 6364 "configure"
+#line 6649 "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:6392: checking for st_blocks in struct stat" >&5
+echo "configure:6677: 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 6397 "configure"
+#line 6682 "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:6405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6690: \"$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:6428: checking for st_rdev in struct stat" >&5
+echo "configure:6713: 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 6433 "configure"
+#line 6718 "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:6441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6726: \"$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:6462: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:6747: 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 6467 "configure"
+#line 6752 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:6475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:6496: checking for working const" >&5
+echo "configure:6781: 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 6501 "configure"
+#line 6786 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:6550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6835: \"$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:6573: checking size of char" >&5
+echo "configure:6858: 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 6581 "configure"
+#line 6866 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
return(0);
}
EOF
-if { (eval echo configure:6592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6877: \"$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:6612: checking size of short int" >&5
+echo "configure:6897: 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 6620 "configure"
+#line 6905 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
return(0);
}
EOF
-if { (eval echo configure:6631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6916: \"$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:6651: checking size of int" >&5
+echo "configure:6936: 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 6659 "configure"
+#line 6944 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
return(0);
}
EOF
-if { (eval echo configure:6670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6955: \"$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:6690: checking size of long int" >&5
+echo "configure:6975: 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 6698 "configure"
+#line 6983 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
return(0);
}
EOF
-if { (eval echo configure:6709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6994: \"$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:6729: checking size of long long int" >&5
+echo "configure:7014: 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 6737 "configure"
+#line 7022 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
return(0);
}
EOF
-if { (eval echo configure:6748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7033: \"$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:6768: checking size of int *" >&5
+echo "configure:7053: 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 6776 "configure"
+#line 7061 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
return(0);
}
EOF
-if { (eval echo configure:6787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7072: \"$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:6809: checking for u_int type" >&5
+echo "configure:7094: 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 6815 "configure"
+#line 7100 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
u_int a; a = 1;
; return 0; }
EOF
-if { (eval echo configure:6822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7107: \"$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:6846: checking for intmax_t type" >&5
+echo "configure:7131: 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 6852 "configure"
+#line 7137 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
intmax_t a; a = 1;
; return 0; }
EOF
-if { (eval echo configure:6859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7144: \"$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 6868 "configure"
+#line 7153 "configure"
#include "confdefs.h"
#include <stdint.h>
int main() {
intmax_t a; a = 1;
; return 0; }
EOF
-if { (eval echo configure:6875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7160: \"$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:6905: checking for u_intmax_t type" >&5
+echo "configure:7190: 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 6911 "configure"
+#line 7196 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
u_intmax_t a; a = 1;
; return 0; }
EOF
-if { (eval echo configure:6918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7203: \"$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 6927 "configure"
+#line 7212 "configure"
#include "confdefs.h"
#include <stdint.h>
int main() {
u_intmax_t a; a = 1;
; return 0; }
EOF
-if { (eval echo configure:6934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7219: \"$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:6963: checking for intXX_t types" >&5
+echo "configure:7248: 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 6969 "configure"
+#line 7254 "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:6976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7261: \"$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:7000: checking for int64_t type" >&5
+echo "configure:7285: 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 7006 "configure"
+#line 7291 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
int64_t a; a = 1;
; return 0; }
EOF
-if { (eval echo configure:7013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7298: \"$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:7037: checking for u_intXX_t types" >&5
+echo "configure:7322: 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 7043 "configure"
+#line 7328 "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:7050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7335: \"$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:7074: checking for u_int64_t types" >&5
+echo "configure:7359: 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 7080 "configure"
+#line 7365 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
u_int64_t a; a = 1;
; return 0; }
EOF
-if { (eval echo configure:7087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7372: \"$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:7114: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
+echo "configure:7399: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7116 "configure"
+#line 7401 "configure"
#include "confdefs.h"
#include <sys/bitypes.h>
int main() {
a = b = c = e = f = g = 1;
; return 0; }
EOF
-if { (eval echo configure:7125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7410: \"$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:7152: checking for uintXX_t types" >&5
+echo "configure:7437: 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 7158 "configure"
+#line 7443 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
uint32_t c; a = b = c = 1;
; return 0; }
EOF
-if { (eval echo configure:7166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7451: \"$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:7206: checking for $ac_func" >&5
+echo "configure:7491: 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 7211 "configure"
+#line 7496 "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:7234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7519: \"$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:7264: checking for $ac_func" >&5
+echo "configure:7549: 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 7269 "configure"
+#line 7554 "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:7292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7577: \"$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
done
-for ac_func in snprintf vsnprintf
+for ac_func in snprintf vsnprintf gethostid getdomainname
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7323: checking for $ac_func" >&5
+echo "configure:7608: 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 7328 "configure"
+#line 7613 "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:7351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7636: \"$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:7379: checking for $ac_func" >&5
+echo "configure:7664: 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 7384 "configure"
+#line 7669 "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:7407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7692: \"$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:7434: checking for gethostbyname_r" >&5
+echo "configure:7719: 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 7439 "configure"
+#line 7724 "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:7462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7747: \"$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:7480: checking for gethostbyname_r in -lnsl" >&5
+echo "configure:7765: 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 7488 "configure"
+#line 7773 "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:7499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7784: \"$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:7527: checking for gethostbyname_r in -lresolv" >&5
+echo "configure:7812: 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 7535 "configure"
+#line 7820 "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:7546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7831: \"$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:7579: checking for socket" >&5
+echo "configure:7864: 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 7584 "configure"
+#line 7869 "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:7607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_socket=yes"
else
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for socket in -lxnet""... $ac_c" 1>&6
-echo "configure:7625: checking for socket in -lxnet" >&5
+echo "configure:7910: 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 7633 "configure"
+#line 7918 "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:7644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7929: \"$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:7672: checking for socket in -lsocket" >&5
+echo "configure:7957: 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 7680 "configure"
+#line 7965 "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:7691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7976: \"$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:7719: checking for socket in -linet" >&5
+echo "configure:8004: 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 7727 "configure"
+#line 8012 "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:7738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8023: \"$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 strftime""... $ac_c" 1>&6
-echo "configure:7770: checking for strftime" >&5
+echo "configure:8055: 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 7775 "configure"
+#line 8060 "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:7798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8083: \"$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:7820: checking for strftime in -lintl" >&5
+echo "configure:8105: 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 7828 "configure"
+#line 8113 "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:7839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8124: \"$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:7866: checking for vprintf" >&5
+echo "configure:8151: 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 7871 "configure"
+#line 8156 "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:7894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8179: \"$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:7918: checking for _doprnt" >&5
+echo "configure:8203: 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 7923 "configure"
+#line 8208 "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:7946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8231: \"$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:7973: checking for working alloca.h" >&5
+echo "configure:8258: 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 7978 "configure"
+#line 8263 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:7985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8270: \"$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:8006: checking for alloca" >&5
+echo "configure:8291: 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 8011 "configure"
+#line 8296 "configure"
#include "confdefs.h"
#ifdef __GNUC__
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:8039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8324: \"$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:8071: checking whether alloca needs Cray hooks" >&5
+echo "configure:8356: 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 8076 "configure"
+#line 8361 "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:8101: checking for $ac_func" >&5
+echo "configure:8386: 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 8106 "configure"
+#line 8391 "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:8129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8414: \"$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:8156: checking stack direction for C alloca" >&5
+echo "configure:8441: 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 8164 "configure"
+#line 8449 "configure"
#include "confdefs.h"
find_stack_direction ()
{
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:8183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8468: \"$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:8206: checking for getmntent in -lsun" >&5
+echo "configure:8491: 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 8214 "configure"
+#line 8499 "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:8225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8510: \"$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:8244: checking for getmntent in -lseq" >&5
+echo "configure:8529: 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 8252 "configure"
+#line 8537 "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:8263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8548: \"$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:8282: checking for getmntent in -lgen" >&5
+echo "configure:8567: 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 8290 "configure"
+#line 8575 "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:8301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8586: \"$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:8326: checking for getmntent" >&5
+echo "configure:8611: 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 8331 "configure"
+#line 8616 "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:8354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8639: \"$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:8377: checking whether closedir returns void" >&5
+echo "configure:8662: 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 8385 "configure"
+#line 8670 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }
EOF
-if { (eval echo configure:8391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8676: \"$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:8414: checking whether setpgrp takes no argument" >&5
+echo "configure:8699: 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 8422 "configure"
+#line 8707 "configure"
#include "confdefs.h"
#ifdef HAVE_UNISTD_H
}
EOF
-if { (eval echo configure:8442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8727: \"$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:8465: checking for working fnmatch" >&5
+echo "configure:8750: 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 8476 "configure"
+#line 8761 "configure"
#include "confdefs.h"
main() { exit (fnmatch ("a*", "abc", 0) != 0); }
EOF
-if { (eval echo configure:8480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8765: \"$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:8505: checking for setlocale in -lxpg4" >&5
+echo "configure:8790: 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 8513 "configure"
+#line 8798 "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:8524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8809: \"$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:8547: checking for getpwnam in -lsun" >&5
+echo "configure:8832: 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 8555 "configure"
+#line 8840 "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:8566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8851: \"$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:8598: checking for $ac_hdr" >&5
+echo "configure:8883: 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 8603 "configure"
+#line 8888 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8893: \"$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:8635: checking for deflate in -lz" >&5
+echo "configure:8920: 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 8643 "configure"
+#line 8928 "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:8654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8939: \"$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:8685: checking for pthread_create in -lpthread" >&5
+echo "configure:8970: 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 8693 "configure"
+#line 8978 "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:8704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8989: \"$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:8723: checking for pthread_create in -lpthreads" >&5
+echo "configure:9008: 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 8731 "configure"
+#line 9016 "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:8742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9027: \"$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:8761: checking for pthread_create in -lc_r" >&5
+echo "configure:9046: 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 8769 "configure"
+#line 9054 "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:8780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9065: \"$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:8799: checking for pthread_create" >&5
+echo "configure:9084: 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 8804 "configure"
+#line 9089 "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:8827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9112: \"$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
platforms/freebsd/bacula-sd \
platforms/freebsd/bacula-dir"
hostname=`hostname -s`
+ ac_cv_sys_largefile_CFLAGS="yes"
;;
hpux)
DISTVER=`uname -r`
src/cats/create_bdb_database \
src/cats/make_bdb_tables \
src/cats/drop_bdb_tables \
+ src/cats/make_bacula_tables \
+ src/cats/drop_bacula_tables \
src/findlib/Makefile \
src/tools/Makefile \
$PFILES src/config.h:autoconf/config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
s%@GNOME_DOCKLETS_LIBS@%$GNOME_DOCKLETS_LIBS%g
s%@GNOME_CAPPLET_LIBS@%$GNOME_CAPPLET_LIBS%g
s%@GNOME_DIR@%$GNOME_DIR%g
+s%@TTOOL_LDFLAGS@%$TTOOL_LDFLAGS%g
s%@CONS_INC@%$CONS_INC%g
s%@CONS_LIBS@%$CONS_LIBS%g
s%@CONS_LDFLAGS@%$CONS_LDFLAGS%g
s%@cats@%$cats%g
s%@DB_NAME@%$DB_NAME%g
s%@EXEEXT@%$EXEEXT%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+s%@GETCONF@%$GETCONF%g
s%@X_CFLAGS@%$X_CFLAGS%g
s%@X_PRE_LIBS@%$X_PRE_LIBS%g
s%@X_LIBS@%$X_LIBS%g
src/cats/create_bdb_database \
src/cats/make_bdb_tables \
src/cats/drop_bdb_tables \
+ src/cats/make_bacula_tables \
+ src/cats/drop_bacula_tables \
src/findlib/Makefile \
src/tools/Makefile \
$PFILES "}
Compiler flags: ${CFLAGS}
Linker flags: ${LDFLAGS}
Libraries: ${LIBS}
+ Statically Linked Tools: ${support_static_tools}
Database found: ${have_db}
Database type: ${db_name}
Database lib: ${DB_LIBS}
Working directory ${working_dir}
SQL binaries Directory ${SQL_BINDIR}
+ Large file support: $ac_cv_sys_largefile_CFLAGS
readline support: ${got_readline} ${PRTREADLINE_SRC}
cweb support: ${got_cweb} ${CWEB_SRC}
TCP Wrappers support: ${TCPW_MSG}
Kern's ToDo List
- 04 September 2002
+ 14 September 2002
Irix conversion notes:
- no uuencode
--should be able to specify e.g. --with-sqlite=/opt/local and have it find
lib, bin, sbin for itself
I tried this and it didn't find sqlite.h
---sd.conf password does not match dir.conf storage password
=======
-- Apparently Description records are not freed. Storage daemon
- Device reported orphaned buffer 45 bytes probably for a Description.
+- Take another stab at 64 bit file addresses
+- When Marking a file in Restore that is a hard link, also
+ mark the link so that the data will be reloaded.
+- Restore program that errors in SD due to no tape reports
+ OK incorrectly in output.
- Write updated bootstrap after every Job.
-- Correct Warning: Volume name mismatch. Wanted test2 got test1
- when reading a tape and want the next one.
-- Implement autochanger for restore. ARRRGGG! I forgot!
- Make BSR accept count (total files to be restored).
- Make BSR return next_block when it knows record is not
in block, done when count is reached, and possibly other
- When we are at EOM, we must ask each job to write JobMedia
record (update_volume_info).
- Create all pools when Director starts
-
+- Correct Warning: Volume name mismatch. Wanted test2 got test1
+ when reading a tape and want the next one.
+- Implement autochanger for restore. ARRRGGG! I forgot!
+- sd.conf password does not match dir.conf storage password
+- Apparently Description records are not freed. Storage daemon
+ Device reported orphaned buffer 45 bytes probably for a Description.
#define socklen_t int
#endif
+#ifdef HAVE_CYGWIN
+/* They don't really have it */
+#undef HAVE_GETDOMAINNAME
+#endif
+
+
#define ALIGN_SIZE (sizeof(double))
#define BALIGN(x) (((x) + ALIGN_SIZE - 1) & ~(ALIGN_SIZE -1))
make_sqlite_tables
mysql
sqlite
+make_bacula_tables
+drop_bacula_tables
char ed1[30];
Mmsg1(&mdb->errmsg, _("Got %s FileSets expected only one!\n"),
edit_uint64(mdb->num_rows, ed1));
- Jmsg(mdb->jcr, M_ERROR, 0, "%s", mdb->errmsg);
sql_data_seek(mdb, mdb->num_rows-1);
}
if ((row = sql_fetch_row(mdb)) == NULL) {
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include <termios.h>
#include "bacula.h"
#include "console_conf.h"
#include "jcr.h"
-
+#include <termios.h>
+
/* Imported functions */
int authenticate_director(JCR *jcr, DIRRES *director);
/* common stuff -- free the resource name */
nres = (RES *)res->res_dir.hdr.next;
- if (res->res_dir.hdr.name)
+ if (res->res_dir.hdr.name) {
free(res->res_dir.hdr.name);
- if (res->res_dir.hdr.desc)
+ }
+ if (res->res_dir.hdr.desc) {
free(res->res_dir.hdr.desc);
+ }
switch (type) {
case R_CONSOLE:
int authenticate_storage_daemon(JCR *jcr)
{
BSOCK *sd = jcr->store_bsock;
+ char dirname[MAX_NAME_LENGTH];
/*
* Send my name to the Storage daemon then do authentication
*/
- if (!bnet_fsend(sd, hello, director->hdr.name)) {
+ strcpy(dirname, director->hdr.name);
+ bash_spaces(dirname);
+ if (!bnet_fsend(sd, hello, dirname)) {
Jmsg(jcr, M_FATAL, 0, _("Error sending Hello to Storage daemon. ERR=%s\n"), bnet_strerror(sd));
return 0;
}
int authenticate_file_daemon(JCR *jcr)
{
BSOCK *fd = jcr->file_bsock;
+ char dirname[MAX_NAME_LENGTH];
/*
* Send my name to the File daemon then do authentication
*/
+ strcpy(dirname, director->hdr.name);
+ bash_spaces(dirname);
if (!bnet_fsend(fd, hello, director->hdr.name)) {
Jmsg(jcr, M_FATAL, 0, _("Error sending Hello to File daemon. ERR=%s\n"), bnet_strerror(fd));
return 0;
int msg_type;
MEDIA_DBR mr;
double kbps;
+ btime_t RunTime;
Dmsg0(100, "Enter backup_cleanup()\n");
memset(&mr, 0, sizeof(mr));
}
bstrftime(sdt, sizeof(sdt), jcr->jr.StartTime);
bstrftime(edt, sizeof(edt), jcr->jr.EndTime);
- kbps = (double)jcr->jr.JobBytes / (1000 * (jcr->jr.EndTime - jcr->jr.StartTime));
+ RunTime = jcr->jr.EndTime - jcr->jr.StartTime;
+ if (RunTime <= 0) {
+ RunTime = 1;
+ }
+ kbps = (double)jcr->jr.JobBytes / (1000 * RunTime);
if (!db_get_job_volume_names(jcr->db, jcr->jr.JobId, &jcr->VolumeName)) {
jcr->VolumeName[0] = 0; /* none */
}
edit_uint64_with_commas(mr.VolBytes, ec3),
term_msg);
+
+ /* Now update the bootstrap file if any */
+ if (jcr->job->WriteBootstrap) {
+ FILE *fd;
+ int got_pipe = 0;
+ char *fname = jcr->job->WriteBootstrap;
+
+ if (*fname == '|') {
+ fname++;
+ got_pipe = 1;
+ fd = popen(fname, "w");
+ } else {
+ fd = fopen(fname, jcr->JobLevel==L_FULL?"w+":"a+");
+ }
+ if (!fd) {
+ Jmsg(jcr, M_ERROR, 0, _("Could not open WriteBootstrap file:\n"
+ "%s: ERR=%s\n"), fname, strerror(errno));
+ return;
+ }
+ fprintf(fd, "Volume=\"%s\"\n", jcr->VolumeName);
+ fprintf(fd, "VolSessionId=%u\n", jcr->VolSessionId);
+ fprintf(fd, "VolSessionTime=%u\n", jcr->VolSessionTime);
+ if (got_pipe) {
+ pclose(fd);
+ } else {
+ fclose(fd);
+ }
+ }
Dmsg0(100, "Leave backup_cleanup()\n");
}
/* Requests from the Storage daemon */
static char Find_media[] = "CatReq Job=%127s FindMedia=%d\n";
-static char Get_Vol_Info[] = "CatReq Job=%127s GetVolInfo VolName=%127s\n";
+static char Get_Vol_Info[] = "CatReq Job=%127s GetVolInfo VolName=%127s write=%d\n";
static char Update_media[] = "CatReq Job=%127s UpdateMedia VolName=%s\
VolJobs=%d VolFiles=%d VolBlocks=%d VolBytes=%" lld " VolMounts=%d\
MEDIA_DBR mr;
JOBMEDIA_DBR jm;
char Job[MAX_NAME_LENGTH];
- int index, ok, relabel;
+ int index, ok, relabel, writing;
char *omsg;
memset(&mr, 0, sizeof(mr));
/*
* Request to find specific Volume information
*/
- } else if (sscanf(bs->msg, Get_Vol_Info, &Job, &mr.VolumeName) == 2) {
+ } else if (sscanf(bs->msg, Get_Vol_Info, &Job, &mr.VolumeName, &writing) == 3) {
Dmsg1(120, "CatReq GetVolInfo Vol=%s\n", mr.VolumeName);
/*
* Find the Volume
*/
unbash_spaces(mr.VolumeName);
if (db_get_media_record(jcr->db, &mr)) {
+ int VolSuitable = 0;
jcr->MediaId = mr.MediaId;
Dmsg1(120, "VolumeInfo MediaId=%d\n", jcr->MediaId);
strcpy(jcr->VolumeName, mr.VolumeName);
- /*
- * Make sure this volume is suitable for this job, i.e.
- * it is either Append or Recycle and Media Type matches.
- */
- if (mr.PoolId == jcr->PoolId &&
- (strcmp(mr.VolStatus, "Append") == 0 ||
- strcmp(mr.VolStatus, "Recycle") == 0) &&
- strcmp(mr.MediaType, jcr->store->media_type) == 0) {
+ if (!writing) {
+ VolSuitable = 1; /* accept anything for read */
+ } else {
+ /*
+ * Make sure this volume is suitable for this job, i.e.
+ * it is either Append or Recycle and Media Type matches.
+ */
+ if (mr.PoolId == jcr->PoolId &&
+ (strcmp(mr.VolStatus, "Append") == 0 ||
+ strcmp(mr.VolStatus, "Recycle") == 0 ||
+ strcmp(mr.MediaType, jcr->store->media_type) == 0)) {
+ VolSuitable = 1;
+ }
+ }
+ if (VolSuitable) {
/*
* Send Find Media response to Storage daemon
*/
mr.VolFiles, mr.VolBlocks, mr.VolBytes, mr.VolMounts, mr.VolErrors,
mr.VolWrites, mr.VolMaxBytes, mr.VolCapacityBytes,
mr.VolStatus, mr.Slot);
- Dmsg4(100, "get_media_record PoolId=%d wanted %d, Status=%s, \
-MediaType=%s\n", mr.PoolId, jcr->PoolId, mr.VolStatus, mr.MediaType);
+ Dmsg5(200, "get_media_record PoolId=%d wanted %d, Status=%s, Slot=%d \
+MediaType=%s\n", mr.PoolId, jcr->PoolId, mr.VolStatus, mr.Slot, mr.MediaType);
} else {
/* Not suitable volume */
bnet_fsend(bs, "1998 Volume not appropriate.\n");
catalog->db_password);
if (!db_open_database(db)) {
Jmsg(NULL, M_FATAL, 0, "%s", db_strerror(db));
+ } else {
+ /* If a pool is defined for this job, create the pool DB
+ * record if it is not already created.
+ */
+ if (job->pool) {
+ create_pool(db, job->pool);
+ }
+ db_close_database(db);
}
- /* If a pool is defined for this job, create the pool DB
- * record if it is not already created.
- */
- if (job->pool) {
- create_pool(db, job->pool);
- }
- db_close_database(db);
} else {
if (job->client) {
Jmsg(NULL, M_FATAL, 0, _("No Catalog resource defined for client %s\n"),
{"runbeforejob", store_str, ITEM(res_job.RunBeforeJob), 0, 0, 0},
{"runafterjob", store_str, ITEM(res_job.RunAfterJob), 0, 0, 0},
{"spoolattributes", store_yesno, ITEM(res_job.SpoolAttributes), 1, ITEM_DEFAULT, 0},
+ {"writebootstrap", store_dir, ITEM(res_job.WriteBootstrap), 0, 0, 0},
{NULL, NULL, NULL, 0, 0, 0}
};
if (res->res_job.RunAfterJob) {
sendit(sock, " --> RunAfter=%s\n", NPRT(res->res_job.RunAfterJob));
}
+ if (res->res_job.WriteBootstrap) {
+ sendit(sock, " --> WriteBootstrap=%s\n", NPRT(res->res_job.WriteBootstrap));
+ }
if (res->res_job.storage) {
sendit(sock, " --> ");
dump_resource(-R_STORAGE, (RES *)res->res_job.storage, sendit, sock);
if (res->res_job.RestoreBootstrap) {
free(res->res_job.RestoreBootstrap);
}
+ if (res->res_job.WriteBootstrap) {
+ free(res->res_job.WriteBootstrap);
+ }
if (res->res_job.RunBeforeJob) {
free(res->res_job.RunBeforeJob);
}
/*
* Resource codes -- they must be sequential for indexing
*/
-#define R_FIRST 1001
-
-#define R_DIRECTOR 1001
-#define R_CLIENT 1002
-#define R_JOB 1003
-#define R_STORAGE 1004
-#define R_CATALOG 1005
-#define R_SCHEDULE 1006
-#define R_FILESET 1007
-#define R_GROUP 1008
-#define R_POOL 1009
-#define R_MSGS 1010
-#define R_COUNTER 1011
-
-#define R_LAST R_COUNTER
+#define R_FIRST 1001
+
+#define R_DIRECTOR 1001
+#define R_CLIENT 1002
+#define R_JOB 1003
+#define R_STORAGE 1004
+#define R_CATALOG 1005
+#define R_SCHEDULE 1006
+#define R_FILESET 1007
+#define R_GROUP 1008
+#define R_POOL 1009
+#define R_MSGS 1010
+#define R_COUNTER 1011
+
+#define R_LAST R_COUNTER
/*
* Some resource attributes
*/
-#define R_NAME 1020
-#define R_ADDRESS 1021
-#define R_PASSWORD 1022
-#define R_TYPE 1023
-#define R_BACKUP 1024
+#define R_NAME 1020
+#define R_ADDRESS 1021
+#define R_PASSWORD 1022
+#define R_TYPE 1023
+#define R_BACKUP 1024
/* Used for certain KeyWord tables */
-struct s_kw {
+struct s_kw {
char *name;
- int token;
+ int token;
};
/* Job Level keyword structure */
struct s_jl {
- char *level_name; /* level keyword */
- int level; /* level */
- int job_type; /* JobType permitting this level */
+ char *level_name; /* level keyword */
+ int level; /* level */
+ int job_type; /* JobType permitting this level */
};
/* Job Type keyword structure */
/* Definition of the contents of each Resource */
/*
- * Director Resource
+ * Director Resource
*
*/
struct s_res_dir {
- RES hdr;
- int DIRport; /* where we listen -- UA port server port */
- char *password; /* Password for UA access */
- char *query_file; /* SQL query file */
- char *working_directory; /* WorkingDirectory */
- char *pid_directory; /* PidDirectory */
- char *subsys_directory; /* SubsysDirectory */
+ RES hdr;
+ int DIRport; /* where we listen -- UA port server port */
+ char *password; /* Password for UA access */
+ char *query_file; /* SQL query file */
+ char *working_directory; /* WorkingDirectory */
+ char *pid_directory; /* PidDirectory */
+ char *subsys_directory; /* SubsysDirectory */
struct s_res_msgs *messages; /* Daemon message handler */
- int MaxConcurrentJobs;
- btime_t FDConnectTimeout; /* timeout for connect in seconds */
- btime_t SDConnectTimeout; /* timeout in seconds */
+ int MaxConcurrentJobs;
+ btime_t FDConnectTimeout; /* timeout for connect in seconds */
+ btime_t SDConnectTimeout; /* timeout in seconds */
};
typedef struct s_res_dir DIRRES;
*
*/
struct s_res_client {
- RES hdr;
+ RES hdr;
- int FDport; /* Where File daemon listens */
- int AutoPrune; /* Do automatic pruning? */
- btime_t FileRetention; /* file retention period in seconds */
- btime_t JobRetention; /* job retention period in seconds */
+ int FDport; /* Where File daemon listens */
+ int AutoPrune; /* Do automatic pruning? */
+ btime_t FileRetention; /* file retention period in seconds */
+ btime_t JobRetention; /* job retention period in seconds */
char *address;
char *password;
struct s_res_cat *catalog; /* Catalog resource */
*
*/
struct s_res_store {
- RES hdr;
+ RES hdr;
- int SDport; /* port where Directors connect */
- int SDDport; /* data port for File daemon */
+ int SDport; /* port where Directors connect */
+ int SDDport; /* data port for File daemon */
char *address;
char *password;
char *media_type;
char *dev_name;
- int autochanger; /* set if autochanger */
+ int autochanger; /* set if autochanger */
};
typedef struct s_res_store STORE;
*
*/
struct s_res_cat {
- RES hdr;
+ RES hdr;
- int DBport; /* Port -- not yet implemented */
+ int DBport; /* Port -- not yet implemented */
char *address;
char *db_password;
char *db_user;
*
*/
struct s_res_job {
- RES hdr;
-
- int JobType; /* job type (backup, verify, restore */
- int level; /* default backup/verify level */
- int RestoreJobId; /* What -- JobId to restore */
- char *RestoreWhere; /* Where on disk to restore -- directory */
- char *RestoreBootstrap; /* Bootstrap file */
- char *RunBeforeJob; /* Run program before Job */
- char *RunAfterJob; /* Run program after Job */
- int RestoreOptions; /* How (overwrite, ..) */
- btime_t MaxRunTime; /* max run time in seconds */
- btime_t MaxStartDelay; /* max start delay in seconds */
- int PruneJobs; /* Force pruning of Jobs */
- int PruneFiles; /* Force pruning of Files */
- int PruneVolumes; /* Force pruning of Volumes */
- int SpoolAttributes; /* Set to spool attributes in SD */
+ RES hdr;
+
+ int JobType; /* job type (backup, verify, restore */
+ int level; /* default backup/verify level */
+ int RestoreJobId; /* What -- JobId to restore */
+ char *RestoreWhere; /* Where on disk to restore -- directory */
+ char *RestoreBootstrap; /* Bootstrap file */
+ char *RunBeforeJob; /* Run program before Job */
+ char *RunAfterJob; /* Run program after Job */
+ char *WriteBootstrap; /* Where to write bootstrap Job updates */
+ int RestoreOptions; /* How (overwrite, ..) */
+ btime_t MaxRunTime; /* max run time in seconds */
+ btime_t MaxStartDelay; /* max start delay in seconds */
+ int PruneJobs; /* Force pruning of Jobs */
+ int PruneFiles; /* Force pruning of Files */
+ int PruneVolumes; /* Force pruning of Volumes */
+ int SpoolAttributes; /* Set to spool attributes in SD */
struct s_res_msgs *messages; /* How and where to send messages */
struct s_res_sch *schedule; /* When -- Automatic schedule */
struct s_res_client *client; /* Who to backup */
struct s_res_fs *fileset; /* What to backup -- Fileset */
struct s_res_store *storage; /* Where is device -- Storage daemon */
- struct s_res_pool *pool; /* Where is media -- Media Pool */
+ struct s_res_pool *pool; /* Where is media -- Media Pool */
};
typedef struct s_res_job JOB;
*
*/
struct s_res_fs {
- RES hdr;
+ RES hdr;
char **include_array;
int num_includes;
char **exclude_array;
int num_excludes;
int exclude_size;
- int have_MD5; /* set if MD5 initialized */
- struct MD5Context md5c; /* MD5 of include/exclude */
+ int have_MD5; /* set if MD5 initialized */
+ struct MD5Context md5c; /* MD5 of include/exclude */
};
typedef struct s_res_fs FILESET;
*
*/
struct s_res_sch {
- RES hdr;
+ RES hdr;
struct s_run *run;
};
*
*/
struct s_res_group {
- RES hdr;
+ RES hdr;
};
typedef struct s_res_group GROUP;
* Counter Resource
*/
struct s_res_counter {
- RES hdr;
+ RES hdr;
- int32_t MinValue; /* Minimum value */
- int32_t MaxValue; /* Maximum value */
- int Global; /* global/local */
- char *WrapCounter; /* Wrap counter name */
+ int32_t MinValue; /* Minimum value */
+ int32_t MaxValue; /* Maximum value */
+ int Global; /* global/local */
+ char *WrapCounter; /* Wrap counter name */
};
typedef struct s_res_counter COUNTER;
*
*/
struct s_res_pool {
- RES hdr;
+ RES hdr;
struct s_res_counter counter; /* Counter resources */
- char *pool_type; /* Pool type */
- char *label_format; /* Label format string */
- int use_catalog; /* maintain catalog for media */
- int catalog_files; /* maintain file entries in catalog */
- int use_volume_once; /* write on volume only once */
- int accept_any_volume; /* accept any volume */
- int max_volumes; /* max number of volumes */
- btime_t VolRetention; /* volume retention period in seconds */
- int AutoPrune; /* default for pool auto prune */
- int Recycle; /* default for media recycle yes/no */
+ char *pool_type; /* Pool type */
+ char *label_format; /* Label format string */
+ int use_catalog; /* maintain catalog for media */
+ int catalog_files; /* maintain file entries in catalog */
+ int use_volume_once; /* write on volume only once */
+ int accept_any_volume; /* accept any volume */
+ int max_volumes; /* max number of volumes */
+ btime_t VolRetention; /* volume retention period in seconds */
+ int AutoPrune; /* default for pool auto prune */
+ int Recycle; /* default for media recycle yes/no */
};
typedef struct s_res_pool POOL;
* resource structure definitions.
*/
union u_res {
- struct s_res_dir res_dir;
- struct s_res_client res_client;
- struct s_res_store res_store;
- struct s_res_cat res_cat;
- struct s_res_job res_job;
- struct s_res_fs res_fs;
- struct s_res_sch res_sch;
- struct s_res_group res_group;
- struct s_res_pool res_pool;
- struct s_res_msgs res_msgs;
+ struct s_res_dir res_dir;
+ struct s_res_client res_client;
+ struct s_res_store res_store;
+ struct s_res_cat res_cat;
+ struct s_res_job res_job;
+ struct s_res_fs res_fs;
+ struct s_res_sch res_sch;
+ struct s_res_group res_group;
+ struct s_res_pool res_pool;
+ struct s_res_msgs res_msgs;
struct s_res_counter res_counter;
RES hdr;
};
/* Run structure contained in Schedule Resource */
struct s_run {
- struct s_run *next; /* points to next run record */
- int level; /* level override */
+ struct s_run *next; /* points to next run record */
+ int level; /* level override */
int job_type;
- POOL *pool; /* Pool override */
- STORE *storage; /* Storage override */
- MSGS *msgs; /* Messages override */
+ POOL *pool; /* Pool override */
+ STORE *storage; /* Storage override */
+ MSGS *msgs; /* Messages override */
char *since;
int level_no;
- int minute; /* minute to run job */
- time_t last_run; /* last time run */
- time_t next_run; /* next time to run */
+ int minute; /* minute to run job */
+ time_t last_run; /* last time run */
+ time_t next_run; /* next time to run */
char hour[nbytes_for_bits(24)]; /* bit set for each hour */
char mday[nbytes_for_bits(31)]; /* bit set for each day of month */
char month[nbytes_for_bits(12)]; /* bit set for each month */
int status;
STORE *storage;
BSOCK *sd;
- char auth_key[100]; /* max 17 chars */
+ char auth_key[100];
char *device_name, *pool_name, *pool_type, *media_type;
int device_name_len, pool_name_len, pool_type_len, media_type_len;
"SELECT JobId,Client.Name as Client,StartTime,Type as "
"JobType,JobFiles,JobBytes "
"FROM Client,Job WHERE Client.ClientId=Job.ClientId AND JobStatus='T' "
- "LIMIT 20";
+ "AND Type='B' LIMIT 20";
#ifdef HAVE_MYSQL
/* MYSQL IS NOT STANDARD SQL !!!!! */
bsendmsg(tree->ua, _(
"\nYou are now entering file selection mode where you add and\n"
"remove files to be restored. All files are initially added.\n"
- "Enter done to leave this mode.\n\n"));
+ "Enter \"done\" to leave this mode.\n\n"));
/*
* Enter interactive command handler allowing selection
* of individual files.
static void ls_output(char *buf, char *fname, struct stat *statp)
{
char *p, *f;
+ char ec1[30];
int n;
p = encode_mode(statp->st_mode, buf);
p += n;
n = sprintf(p, "%-8.8s %-8.8s", getuser(statp->st_uid), getgroup(statp->st_gid));
p += n;
- n = sprintf(p, "%8ld ", statp->st_size);
+ n = sprintf(p, "%8.8s ", edit_uint64(statp->st_size, ec1));
p += n;
p = encode_time(statp->st_ctime, p);
*p++ = ' ';
start_prompt(ua, _("The defined Storage resources are:\n"));
LockRes();
while ((store = (STORE *)GetNextRes(R_STORAGE, (RES *)store))) {
- if (strcmp(store->hdr.name, name_list->name[0]) == 0) {
+ if (strcmp(store->media_type, name_list->name[0]) == 0) {
add_prompt(ua, store->hdr.name);
}
}
*/
static int authenticate(int rcode, BSOCK *bs)
{
- char *name;
+ POOLMEM *dirname;
DIRRES *director;
if (rcode != R_DIRECTOR) {
Emsg1(M_FATAL, 0, _("I only authenticate directors, not %d\n"), rcode);
return 0;
}
- name = (char *) get_pool_memory(PM_MESSAGE);
- name = (char *) check_pool_memory_size(name, bs->msglen);
+ dirname = get_pool_memory(PM_MESSAGE);
+ dirname = check_pool_memory_size(dirname, bs->msglen);
- if (sscanf(bs->msg, "Hello Director %s calling\n", name) != 1) {
- free_pool_memory(name);
+ if (sscanf(bs->msg, "Hello Director %s calling\n", dirname) != 1) {
+ free_pool_memory(dirname);
Emsg1(M_FATAL, 0, _("Bad Hello command from Director: %s"), bs->msg);
return 0;
}
director = NULL;
+ unbash_spaces(dirname);
LockRes();
while ((director=(DIRRES *)GetNextRes(rcode, (RES *)director))) {
- if (strcmp(director->hdr.name, name) == 0)
+ if (strcmp(director->hdr.name, dirname) == 0)
break;
}
UnlockRes();
if (!director) {
- Emsg1(M_FATAL, 0, _("Connection from unknown Director %s rejected.\n"), name);
- free_pool_memory(name);
+ Emsg1(M_FATAL, 0, _("Connection from unknown Director %s rejected.\n"), dirname);
+ free_pool_memory(dirname);
return 0;
}
if (!cram_md5_auth(bs, director->password) ||
Emsg0(M_FATAL, 0, _("Incorrect password given by Director.\n"));
director = NULL;
}
- free_pool_memory(name);
+ free_pool_memory(dirname);
return (director != NULL);
}
/* common stuff -- free the resource name */
nres = (RES *)res->res_dir.hdr.next;
- if (res->res_dir.hdr.name)
+ if (res->res_dir.hdr.name) {
free(res->res_dir.hdr.name);
- if (res->res_dir.hdr.desc)
+ }
+ if (res->res_dir.hdr.desc) {
free(res->res_dir.hdr.desc);
+ }
switch (type) {
case R_DIRECTOR:
set_bit(index, res_all.hdr.item_present);
}
-/* Store a directory name at specified address */
+/*
+ * Store a directory name at specified address. Note, we do
+ * shell expansion except if the string begins with a vertical
+ * bar (i.e. it will likely be passed to the shell later).
+ */
void store_dir(LEX *lc, struct res_items *item, int index, int pass)
{
lex_get_token(lc, T_STRING);
if (pass == 1) {
- do_shell_expansion(lc->str);
+ if (lc->str[0] != '|') {
+ do_shell_expansion(lc->str);
+ }
*(item->value) = bstrdup(lc->str);
}
scan_to_eol(lc);
*/
/* base64.c */
-void base64_init (void);
-int to_base64 (intmax_t value, char *where);
-int from_base64 (intmax_t *value, char *where);
-void encode_stat (char *buf, struct stat *statp);
-void decode_stat (char *buf, struct stat *statp);
-int bin_to_base64 (char *buf, char *bin, int len);
+void base64_init (void);
+int to_base64 (intmax_t value, char *where);
+int from_base64 (intmax_t *value, char *where);
+void encode_stat (char *buf, struct stat *statp);
+void decode_stat (char *buf, struct stat *statp);
+int bin_to_base64 (char *buf, char *bin, int len);
/* bmisc.c */
-char *bstrncpy (char *dest, char *src, int maxlen);
-void *b_malloc (char *file, int line, size_t size);
+char *bstrncpy (char *dest, char *src, int maxlen);
+void *b_malloc (char *file, int line, size_t size);
#ifndef DEBUG
-void *bmalloc (size_t size);
+void *bmalloc (size_t size);
#endif
-void *brealloc (void *buf, size_t size);
-void *bcalloc (size_t size1, size_t size2);
-int bsnprintf (char *str, size_t size, const char *format, ...);
-int bvsnprintf (char *str, size_t size, const char *format, va_list ap);
-int pool_sprintf (char *pool_buf, char *fmt, ...);
-void create_pid_file (char *dir, char *progname, int port);
-int delete_pid_file (char *dir, char *progname, int port);
+void *brealloc (void *buf, size_t size);
+void *bcalloc (size_t size1, size_t size2);
+int bsnprintf (char *str, size_t size, const char *format, ...);
+int bvsnprintf (char *str, size_t size, const char *format, va_list ap);
+int pool_sprintf (char *pool_buf, char *fmt, ...);
+void create_pid_file (char *dir, char *progname, int port);
+int delete_pid_file (char *dir, char *progname, int port);
#ifndef HAVE_STRERROR_R
-int strerror_r (int errnum, char *buf, size_t bufsiz);
+int strerror_r (int errnum, char *buf, size_t bufsiz);
#endif
/* bnet.c */
-int32_t bnet_recv (BSOCK *bsock);
-int bnet_send (BSOCK *bsock);
-int bnet_fsend (BSOCK *bs, char *fmt, ...);
-int bnet_set_buffer_size (BSOCK *bs, uint32_t size, int rw);
-int bnet_sig (BSOCK *bs, int sig);
-BSOCK * bnet_connect (void *jcr, int retry_interval,
- int max_retry_time, char *name, char *host, char *service,
- int port, int verbose);
-int bnet_wait_data (BSOCK *bsock, int sec);
-void bnet_close (BSOCK *bsock);
-BSOCK * init_bsock (void *jcr, int sockfd, char *who, char *ip, int port);
-BSOCK * dup_bsock (BSOCK *bsock);
-void term_bsock (BSOCK *bsock);
-char * bnet_strerror (BSOCK *bsock);
-char * bnet_sig_to_ascii (BSOCK *bsock);
-int bnet_wait_data (BSOCK *bsock, int sec);
-int bnet_despool (BSOCK *bsock);
+int32_t bnet_recv (BSOCK *bsock);
+int bnet_send (BSOCK *bsock);
+int bnet_fsend (BSOCK *bs, char *fmt, ...);
+int bnet_set_buffer_size (BSOCK *bs, uint32_t size, int rw);
+int bnet_sig (BSOCK *bs, int sig);
+BSOCK * bnet_connect (void *jcr, int retry_interval,
+ int max_retry_time, char *name, char *host, char *service,
+ int port, int verbose);
+int bnet_wait_data (BSOCK *bsock, int sec);
+void bnet_close (BSOCK *bsock);
+BSOCK * init_bsock (void *jcr, int sockfd, char *who, char *ip, int port);
+BSOCK * dup_bsock (BSOCK *bsock);
+void term_bsock (BSOCK *bsock);
+char * bnet_strerror (BSOCK *bsock);
+char * bnet_sig_to_ascii (BSOCK *bsock);
+int bnet_wait_data (BSOCK *bsock, int sec);
+int bnet_despool (BSOCK *bsock);
/* cram-md5.c */
int cram_md5_get_auth(BSOCK *bs, char *password);
int cram_md5_auth(BSOCK *bs, char *password);
void hmac_md5(uint8_t* text, int text_len, uint8_t* key,
- int key_len, uint8_t *hmac);
+ int key_len, uint8_t *hmac);
/* create_file.c */
int create_file(void *jcr, char *fname, char *ofile, char *lname,
- int type, struct stat *statp, int *ofd);
+ int type, struct stat *statp, int *ofd);
int set_statp(void *jcr, char *fname, char *ofile, char *lname, int type,
- struct stat *statp);
+ struct stat *statp);
/* crc32.c */
uint32_t bcrc32(uint8_t *buf, int len);
/* daemon.c */
-void daemon_start ();
+void daemon_start ();
/* lex.c */
-LEX * lex_close_file (LEX *lf);
-LEX * lex_open_file (LEX *lf, char *fname, LEX_ERROR_HANDLER *scan_error);
-int lex_get_char (LEX *lf);
-void lex_unget_char (LEX *lf);
-char * lex_tok_to_str (int token);
-int lex_get_token (LEX *lf, int expect);
+LEX * lex_close_file (LEX *lf);
+LEX * lex_open_file (LEX *lf, char *fname, LEX_ERROR_HANDLER *scan_error);
+int lex_get_char (LEX *lf);
+void lex_unget_char (LEX *lf);
+char * lex_tok_to_str (int token);
+int lex_get_token (LEX *lf, int expect);
/* 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);
+ void *jcr,
+ const char *argpath,
+ int mode,
+ int parent_mode,
+ uid_t owner,
+ gid_t group,
+ int preserve_existing,
+ char *verbose_fmt_string);
/* message.c */
-void my_name_is (int argc, char *argv[], char *name);
-void init_msg (void *jcr, MSGS *msg);
-void term_msg (void);
-void close_msg (void *jcr);
-void add_msg_dest (MSGS *msg, int dest, int type, char *where, char *dest_code);
-void rem_msg_dest (MSGS *msg, int dest, int type, char *where);
-void Jmsg (void *jcr, int type, int level, char *fmt, ...);
-void dispatch_message (void *jcr, int type, int level, char *buf);
-void init_console_msg (char *wd);
-void free_msgs_res (MSGS *msgs);
-int open_spool_file (void *jcr, BSOCK *bs);
-int close_spool_file (void *vjcr, BSOCK *bs);
+void my_name_is (int argc, char *argv[], char *name);
+void init_msg (void *jcr, MSGS *msg);
+void term_msg (void);
+void close_msg (void *jcr);
+void add_msg_dest (MSGS *msg, int dest, int type, char *where, char *dest_code);
+void rem_msg_dest (MSGS *msg, int dest, int type, char *where);
+void Jmsg (void *jcr, int type, int level, char *fmt, ...);
+void dispatch_message (void *jcr, int type, int level, char *buf);
+void init_console_msg (char *wd);
+void free_msgs_res (MSGS *msgs);
+int open_spool_file (void *jcr, BSOCK *bs);
+int close_spool_file (void *vjcr, BSOCK *bs);
/* bnet_server.c */
-void bnet_thread_server(int port, int max_clients, workq_t *client_wq,
- void handle_client_request(void *bsock));
-void bnet_server (int port, void handle_client_request(BSOCK *bsock));
-int net_connect (int port);
-BSOCK * bnet_bind (int port);
-BSOCK * bnet_accept (BSOCK *bsock, char *who);
+void bnet_thread_server(int port, int max_clients, workq_t *client_wq,
+ void handle_client_request(void *bsock));
+void bnet_server (int port, void handle_client_request(BSOCK *bsock));
+int net_connect (int port);
+BSOCK * bnet_bind (int port);
+BSOCK * bnet_accept (BSOCK *bsock, char *who);
/* signal.c */
-void init_signals (void terminate(int sig));
-void init_stack_dump (void);
+void init_signals (void terminate(int sig));
+void init_stack_dump (void);
/* util.c */
-void lcase (char *str);
-void bash_spaces (char *str);
-void unbash_spaces (char *str);
-void strip_trailing_junk (char *str);
-void strip_trailing_slashes (char *dir);
-int skip_spaces (char **msg);
-int skip_nonspaces (char **msg);
-int fstrsch (char *a, char *b);
-char * encode_time (time_t time, char *buf);
-char * encode_mode (mode_t mode, char *buf);
-char * edit_uint64_with_commas (uint64_t val, char *buf);
-char * add_commas (char *val, char *buf);
-char * edit_uint64 (uint64_t val, char *buf);
-int do_shell_expansion (char *name);
-int is_a_number (const char *num);
-int string_to_btime (char *str, btime_t *value);
-char *edit_btime (btime_t val, char *buf);
-void jobstatus_to_ascii (int JobStatus, char *msg, int maxlen);
-void pm_strcat (POOLMEM **pm, char *str);
-void pm_strcpy (POOLMEM **pm, char *str);
-int run_program (char *prog, int wait, POOLMEM *results);
-char * job_type_to_str (int type);
-char * job_status_to_str (int stat);
-char * job_level_to_str (int level);
+void lcase (char *str);
+void bash_spaces (char *str);
+void unbash_spaces (char *str);
+void strip_trailing_junk (char *str);
+void strip_trailing_slashes (char *dir);
+int skip_spaces (char **msg);
+int skip_nonspaces (char **msg);
+int fstrsch (char *a, char *b);
+char * encode_time (time_t time, char *buf);
+char * encode_mode (mode_t mode, char *buf);
+char * edit_uint64_with_commas (uint64_t val, char *buf);
+char * add_commas (char *val, char *buf);
+char * edit_uint64 (uint64_t val, char *buf);
+int do_shell_expansion (char *name);
+int is_a_number (const char *num);
+int string_to_btime (char *str, btime_t *value);
+char *edit_btime (btime_t val, char *buf);
+void jobstatus_to_ascii (int JobStatus, char *msg, int maxlen);
+void pm_strcat (POOLMEM **pm, char *str);
+void pm_strcpy (POOLMEM **pm, char *str);
+int run_program (char *prog, int wait, POOLMEM *results);
+char * job_type_to_str (int type);
+char * job_status_to_str (int stat);
+char * job_level_to_str (int level);
+void makeSessionKey (char *key, char *seed, int mode);
sigaction(SIGXCPU, &sigdefault, NULL);
sigaction(SIGXFSZ, &sigdefault, NULL);
- sigaction(SIGHUP, &sighandle, NULL);
+ sigaction(SIGHUP, &sigignore, NULL);
sigaction(SIGQUIT, &sighandle, NULL);
sigaction(SIGILL, &sighandle, NULL);
sigaction(SIGTRAP, &sighandle, NULL);
}
*bargc = argc;
}
+
+/* MAKESESSIONKEY -- Generate session key with optional start
+ key. If mode is TRUE, the key will be
+ translated to a string, otherwise it is
+ returned as 16 binary bytes.
+
+ from SpeakFreely by John Walker */
+
+void makeSessionKey(char *key, char *seed, int mode)
+{
+ int j, k;
+ struct MD5Context md5c;
+ unsigned char md5key[16], md5key1[16];
+ char s[1024];
+
+ s[0] = 0;
+ if (seed != NULL) {
+ strcat(s, seed);
+ }
+
+ /* The following creates a seed for the session key generator
+ based on a collection of volatile and environment-specific
+ information unlikely to be vulnerable (as a whole) to an
+ exhaustive search attack. If one of these items isn't
+ available on your machine, replace it with something
+ equivalent or, if you like, just delete it. */
+
+ sprintf(s + strlen(s), "%lu", (unsigned long) getpid());
+ sprintf(s + strlen(s), "%lu", (unsigned long) getppid());
+ getcwd(s + strlen(s), 256);
+ sprintf(s + strlen(s), "%lu", (unsigned long) clock());
+ sprintf(s + strlen(s), "%lu", (unsigned long) time(NULL));
+#ifdef Solaris
+ sysinfo(SI_HW_SERIAL,s + strlen(s), 12);
+#endif
+#ifdef HAVE_GETHOSTID
+ sprintf(s + strlen(s), "%lu", (unsigned long) gethostid());
+#endif
+#ifdef HAVE_GETDOMAINNAME
+ getdomainname(s + strlen(s), 256);
+#endif
+ gethostname(s + strlen(s), 256);
+ sprintf(s + strlen(s), "%u", (unsigned)getuid());
+ sprintf(s + strlen(s), "%u", (unsigned)getgid());
+ MD5Init(&md5c);
+ MD5Update(&md5c, (unsigned char *)s, strlen(s));
+ MD5Final(md5key, &md5c);
+ sprintf(s + strlen(s), "%lu", (unsigned long) ((time(NULL) + 65121) ^ 0x375F));
+ MD5Init(&md5c);
+ MD5Update(&md5c, (unsigned char *)s, strlen(s));
+ MD5Final(md5key1, &md5c);
+#define nextrand (md5key[j] ^ md5key1[j])
+ if (mode) {
+ for (j = k = 0; j < 16; j++) {
+ unsigned char rb = nextrand;
+
+#define Rad16(x) ((x) + 'A')
+ key[k++] = Rad16((rb >> 4) & 0xF);
+ key[k++] = Rad16(rb & 0xF);
+#undef Rad16
+ if (j & 1) {
+ key[k++] = '-';
+ }
+ }
+ key[--k] = 0;
+ } else {
+ for (j = 0; j < 16; j++) {
+ key[j] = nextrand;
+ }
+ }
+}
+#undef nextrand
# $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ $(POOLOBJS) -lsql $(LIBS) $(DLIB) -lbac -lm
btape: $(TAPEOBJS) ../lib/libbac.a ../cats/libsql.a
- $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ $(TAPEOBJS) -lsql $(LIBS) $(DLIB) -lbac -lm
+ $(CXX) $(TTOOL_LDFLSGS) $(LDFLAGS) -L../lib -L../cats -o $@ $(TAPEOBJS) -lsql $(LIBS) $(DLIB) -lbac -lm
bls: ../findlib/libfind.a $(BLSOBJS) ../lib/libbac.a
- $(CXX) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BLSOBJS) $(LIBS) $(DLIB) -lbac -lfind -lm
+ $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BLSOBJS) $(LIBS) $(DLIB) -lbac -lfind -lm
bextract: ../findlib/libfind.a $(BEXTOBJS) ../lib/libbac.a
- $(CXX) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BEXTOBJS) $(LIBS) $(DLIB) $(FDLIBS) -lbac -lfind -lm
+ $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BEXTOBJS) $(LIBS) $(DLIB) $(FDLIBS) -lbac -lfind -lm
bscan: ../findlib/libfind.a $(SCNOBJS) ../cats/libsql.a
- $(CXX) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SCNOBJS) -lsql $(LIBS) $(DB_LIBS) $(FDLIBS) -lbac -lfind -lm
+ $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SCNOBJS) -lsql $(LIBS) $(DB_LIBS) $(FDLIBS) -lbac -lfind -lm
*/
int acquire_device_for_read(JCR *jcr, DEVICE *dev, DEV_BLOCK *block)
{
- int stat;
+ int stat = 0;
+ int tape_previously_mounted;
lock_device(dev);
- if (dev->state & ST_READ || dev->num_writers > 0) {
- Jmsg(jcr, M_FATAL, 0, _("Device %s is busy.\n"), dev_name(dev));
- new_unlock_device(dev);
- unlock_device(dev);
- return 0;
- }
- dev->state &= ~ST_LABEL; /* force reread of label */
block_device(dev, BST_DOING_ACQUIRE);
unlock_device(dev);
- stat = ready_dev_for_read(jcr, dev, block);
+
+ tape_previously_mounted = (dev->state & ST_READ) || (dev->state & ST_APPEND);
+
+ if (dev->state & ST_READ || dev->num_writers > 0) {
+ Jmsg1(jcr, M_FATAL, 0, _("Device %s is busy. Job cancelled.\n"), dev_name(dev));
+ goto get_out;
+ }
+
+ for (;;) {
+ if (job_cancelled(jcr)) {
+ Mmsg0(&dev->errmsg, _("Job cancelled.\n"));
+ goto get_out; /* error return */
+ }
+ /*
+ * This code ensures that the device is ready for
+ * reading. If it is a file, it opens it.
+ * If it is a tape, it checks the volume name
+ */
+ for ( ; !(dev->state & ST_OPENED); ) {
+ Dmsg1(120, "bstored: open vol=%s\n", jcr->VolumeName);
+ if (open_dev(dev, jcr->VolumeName, READ_ONLY) < 0) {
+ Jmsg(jcr, M_FATAL, 0, _("Open device %s volume %s failed, ERR=%s\n"),
+ dev_name(dev), jcr->VolumeName, strerror_dev(dev));
+ goto get_out;
+ }
+ Dmsg1(129, "open_dev %s OK\n", dev_name(dev));
+ }
+ /* ***FIXME*** this is probably not necessary */
+ dev->state &= ~ST_LABEL; /* force reread of label */
+ Dmsg0(200, "calling read-vol-label\n");
+ switch (read_dev_volume_label(jcr, dev, block)) {
+ case VOL_OK:
+ break; /* got it */
+ case VOL_IO_ERROR:
+ /*
+ * Send error message generated by read_dev_volume_label()
+ * only we really had a tape mounted. This supresses superfluous
+ * error messages when nothing is mounted.
+ */
+ if (tape_previously_mounted) {
+ Jmsg1(jcr, M_WARNING, 0, "%s", jcr->errmsg);
+ }
+ goto default_path;
+ default:
+ Jmsg1(jcr, M_WARNING, 0, "%s", jcr->errmsg);
+default_path:
+ tape_previously_mounted = 0;
+ Dmsg0(200, "dir_get_volume_info\n");
+ dir_get_volume_info(jcr, 0);
+ Dmsg2(200, "calling autoload Vol=%s Slot=%d\n",
+ jcr->VolumeName, jcr->VolCatInfo.Slot);
+ if (autoload_device(jcr, dev, 0)) {
+ continue;
+ }
+ /* Mount a specific volume and no other */
+ Dmsg0(200, "calling dir_ask_sysop\n");
+ if (!dir_ask_sysop_to_mount_volume(jcr, dev)) {
+ goto get_out; /* error return */
+ }
+ continue; /* try reading again */
+ }
+ break;
+ }
+
+ dev->state |= ST_READ;
+ attach_jcr_to_device(dev, jcr); /* attach jcr to device */
+ stat = 1; /* good return */
+
+get_out:
P(dev->mutex);
unblock_device(dev);
V(dev->mutex);
{
int release = 0;
int do_mount = 0;
+ int stat = 0;
lock_device(dev);
+ block_device(dev, BST_DOING_ACQUIRE);
+ unlock_device(dev);
Dmsg1(190, "acquire_append device is %s\n", dev_is_tape(dev)?"tape":"disk");
*/
strcpy(jcr->VolumeName, dev->VolHdr.VolName);
if (((dev->capabilities & CAP_ANONVOLS) &&
- !dir_get_volume_info(jcr)) ||
+ !dir_get_volume_info(jcr, 1)) ||
(!dir_find_next_appendable_volume(jcr) ||
strcmp(dev->VolHdr.VolName, jcr->VolumeName) != 0)) { /* wrong tape mounted */
if (dev->num_writers != 0) {
Jmsg(jcr, M_FATAL, 0, _("Device %s is busy writing with another Volume.\n"), dev_name(dev));
- unlock_device(dev);
- return 0;
+ goto get_out;
}
/* Wrong tape mounted, release it, then fall through to get correct one */
release = 1;
/* Not already in append mode, so mount the device */
if (dev->state & ST_READ) {
Jmsg(jcr, M_FATAL, 0, _("Device %s is busy reading.\n"), dev_name(dev));
- unlock_device(dev);
- return 0;
+ goto get_out;
}
ASSERT(dev->num_writers == 0);
do_mount = 1;
}
if (do_mount) {
- block_device(dev, BST_DOING_ACQUIRE);
- unlock_device(dev);
if (!mount_next_write_volume(jcr, dev, block, release)) {
Jmsg(jcr, M_FATAL, 0, _("Could not ready device %s for append.\n"),
dev_name(dev));
- P(dev->mutex);
- unblock_device(dev);
- unlock_device(dev);
- return 0;
+ goto get_out;
}
- P(dev->mutex);
- unblock_device(dev);
}
dev->num_writers++;
jcr->NumVolumes = 1;
}
attach_jcr_to_device(dev, jcr); /* attach jcr to device */
- unlock_device(dev);
- return 1; /* got it */
+ stat = 1; /* good return */
+
+get_out:
+ P(dev->mutex);
+ unblock_device(dev);
+ V(dev->mutex);
+ return stat;
}
/*
*/
int release_device(JCR *jcr, DEVICE *dev)
{
- P(dev->mutex);
+ lock_device(dev);
Dmsg1(100, "release_device device is %s\n", dev_is_tape(dev)?"tape":"disk");
if (dev->state & ST_READ) {
dev->state &= ~ST_READ; /* clear read bit */
Jmsg1(jcr, M_ERROR, 0, _("BAD ERROR: release_device %s not in use.\n"), dev_name(dev));
}
detach_jcr_from_device(dev, jcr);
- V(dev->mutex);
- new_unlock_device(dev);
+ unlock_device(dev);
return 1;
}
-
-
-
-/*
- * This routine ensures that the device is ready for
- * reading. If it is a file, it opens it.
- * If it is a tape, it checks the volume name
- *
- * Returns 0 on failure
- * Returns 1 on success
- */
-int ready_dev_for_read(JCR *jcr, DEVICE *dev, DEV_BLOCK *block)
-{
- if (!(dev->state & ST_OPENED)) {
- Dmsg1(120, "bstored: open vol=%s\n", jcr->VolumeName);
- if (open_dev(dev, jcr->VolumeName, READ_ONLY) < 0) {
- Jmsg(jcr, M_FATAL, 0, _("Open device %s volume %s failed, ERR=%s\n"),
- dev_name(dev), jcr->VolumeName, strerror_dev(dev));
- return 0;
- }
- Dmsg1(129, "open_dev %s OK\n", dev_name(dev));
- }
-
- for (;;) {
- if (job_cancelled(jcr)) {
- Mmsg0(&dev->errmsg, _("Job cancelled.\n"));
- return 0;
- }
- if (!rewind_dev(dev)) {
- Jmsg2(jcr, M_WARNING, 0, _("Rewind error on device %s. ERR=%s\n"),
- dev_name(dev), strerror_dev(dev));
- }
- switch (read_dev_volume_label(jcr, dev, block)) {
- case VOL_OK:
- break; /* got it */
- default:
- /* Send error message generated by read_dev_volume_label() */
- Jmsg(jcr, M_WARNING, 0, "%s", jcr->errmsg);
- if (!rewind_dev(dev)) {
- Jmsg2(jcr, M_WARNING, 0, _("Rewind error on device %s. ERR=%s\n"),
- dev_name(dev), strerror_dev(dev));
- }
- /* Mount a specific volume and no other */
- if (!dir_ask_sysop_to_mount_volume(jcr, dev)) {
- return 0; /* error return */
- }
- continue; /* try reading again */
- }
- break;
- }
-
- dev->state |= ST_READ;
- return 1;
-}
/* Requests sent to the Director */
static char Find_media[] = "CatReq Job=%s FindMedia=%d\n";
-static char Get_Vol_Info[] = "CatReq Job=%s GetVolInfo VolName=%s\n";
+static char Get_Vol_Info[] = "CatReq Job=%s GetVolInfo VolName=%s write=%d\n";
static char Update_media[] = "CatReq Job=%s UpdateMedia VolName=%s\
VolJobs=%d VolFiles=%d VolBlocks=%d VolBytes=%" lld " VolMounts=%d\
jcr->VolumeName[0] = 0; /* No volume */
if (bnet_recv(dir) <= 0) {
- Dmsg0(130, "getvolname error bnet_recv\n");
+ Dmsg0(200, "getvolname error bnet_recv\n");
return 0;
}
if (sscanf(dir->msg, OK_media, vol->VolCatName,
&vol->VolCatWrites, &vol->VolCatMaxBytes,
&vol->VolCatCapacityBytes, vol->VolCatStatus,
&vol->Slot) != 12) {
- Dmsg1(130, "Bad response from Dir: %s\n", dir->msg);
+ Dmsg1(200, "Bad response from Dir: %s\n", dir->msg);
return 0;
}
unbash_spaces(vol->VolCatName);
strcpy(jcr->VolumeName, vol->VolCatName); /* set desired VolumeName */
- Dmsg2(130, "do_reqest_vol_info got slot=%d Volume=%s\n",
+ Dmsg2(200, "do_reqest_vol_info got slot=%d Volume=%s\n",
vol->Slot, vol->VolCatName);
return 1;
}
*
* Volume information returned in jcr
*/
-int dir_get_volume_info(JCR *jcr)
+int dir_get_volume_info(JCR *jcr, int writing)
{
BSOCK *dir = jcr->dir_bsock;
strcpy(jcr->VolCatInfo.VolCatName, jcr->VolumeName);
Dmsg1(200, "dir_get_volume_info=%s\n", jcr->VolCatInfo.VolCatName);
bash_spaces(jcr->VolCatInfo.VolCatName);
- bnet_fsend(dir, Get_Vol_Info, jcr->Job, jcr->VolCatInfo.VolCatName);
+ bnet_fsend(dir, Get_Vol_Info, jcr->Job, jcr->VolCatInfo.VolCatName, writing);
return do_request_volume_info(jcr);
}
} else {
msg = "Please mount";
}
- Jmsg(jcr, M_MOUNT, 0, _("%s Volume \"%s\" on Storage Device \"%s\" for Job %s\n"),
+ Jmsg(jcr, M_MOUNT, 0, _(
+"%s Volume \"%s\" on Storage Device \"%s\" for Job %s\n"
+"Use \"mount\" command to release Job.\n"),
msg, jcr->VolumeName, jcr->dev_name, jcr->Job);
Dmsg3(190, "Mount %s on %s for Job %s\n",
jcr->VolumeName, jcr->dev_name, jcr->Job);
jstat = JS_WaitMedia;
Jmsg(jcr, M_MOUNT, 0, _(
"Job %s waiting. Cannot find any appendable volumes.\n\
-Please use the \"label\" command to create new Volumes for:\n\
- Storage Device \"%s\" with Pool \"%s\" and Media type \"%s\".\n\
-Use \"mount\" to resume the job.\n"),
- jcr->Job, jcr->dev_name, jcr->pool_name, jcr->media_type);
+Please use the \"label\" command to create a new Volume for:\n\
+ Storage: %s\n\
+ Media type: %s\n\
+ Pool: %s\n"),
+ jcr->Job,
+ jcr->dev_name,
+ jcr->media_type,
+ jcr->pool_name);
}
/*
* Wait then send message again
*/
static int authenticate(int rcode, BSOCK *bs)
{
- POOLMEM *name;
+ POOLMEM *dirname;
DIRRES *director = NULL;
if (rcode != R_DIRECTOR) {
Emsg1(M_FATAL, 0, _("I only authenticate Directors, not %d\n"), rcode);
return 0;
}
- name = get_pool_memory(PM_MESSAGE);
- name = check_pool_memory_size(name, bs->msglen);
+ dirname = get_pool_memory(PM_MESSAGE);
+ dirname = check_pool_memory_size(dirname, bs->msglen);
- if (sscanf(bs->msg, "Hello Director %127s calling\n", name) != 1) {
+ if (sscanf(bs->msg, "Hello Director %127s calling\n", dirname) != 1) {
Emsg1(M_FATAL, 0, _("Bad Hello command from Director: %s\n"), bs->msg);
return 0;
}
director = NULL;
+ unbash_spaces(dirname);
LockRes();
while ((director=(DIRRES *)GetNextRes(rcode, (RES *)director))) {
- if (strcmp(director->hdr.name, name) == 0)
+ if (strcmp(director->hdr.name, dirname) == 0)
break;
}
UnlockRes();
if (!director) {
- Emsg1(M_FATAL, 0, _("Connection from unknown Director %s rejected.\n"), name);
+ Emsg1(M_FATAL, 0, _("Connection from unknown Director %s rejected.\n"), dirname);
goto bail_out;
}
if (!cram_md5_auth(bs, director->password) ||
Emsg0(M_FATAL, 0, _("Incorrect password given by Director.\n"));
goto bail_out;
}
- free_pool_memory(name);
+ free_pool_memory(dirname);
return 1;
bail_out:
- free_pool_memory(name);
+ free_pool_memory(dirname);
return 0;
}
static FF_PKT my_ff;
static FF_PKT *ff = &my_ff;
static BSR *bsr = NULL;
-static DEV_BLOCK *block;
static int extract = FALSE;
static long record_file_index;
static long total = 0;
/* Dummies to replace askdir.c */
-int dir_get_volume_info(JCR *jcr) { return 1;}
+int dir_get_volume_info(JCR *jcr, int writing) { return 1;}
int dir_find_next_appendable_volume(JCR *jcr) { return 1;}
int dir_update_volume_info(JCR *jcr, VOLUME_CAT_INFO *vol, int relabel) { return 1; }
int dir_create_jobmedia_record(JCR *jcr) { return 1; }
switch (ch) {
case 'b':
bsr = parse_bsr(NULL, optarg);
+// dump_bsr(bsr);
break;
case 'd': /* debug level */
/* Dummies to replace askdir.c */
-int dir_get_volume_info(JCR *jcr) { return 1;}
+int dir_get_volume_info(JCR *jcr, int writing) { return 1;}
int dir_find_next_appendable_volume(JCR *jcr) { return 1;}
int dir_update_volume_info(JCR *jcr, VOLUME_CAT_INFO *vol, int relabel) { return 1; }
int dir_create_jobmedia_record(JCR *jcr) { return 1; }
/*
*
- * Program to scan a Bacula tape and compare it with
+ * Program to scan a Bacula Volume and compare it with
* the catalog and optionally synchronize the catalog
* with the tape.
*
#include "findlib/find.h"
#include "cats/cats.h"
+/* Forward referenced functions */
static void do_scan(char *fname);
-
-
+static void record_cb(JCR *jcr, DEVICE *dev, DEV_BLOCK *block, DEV_RECORD *rec);
+static void create_file_attributes_record(B_DB *db, char *fname, char *lname, int type,
+ char *ap, DEV_RECORD *rec);
+static void create_media_record(B_DB *db, MEDIA_DBR *mr, VOLUME_LABEL *vl);
+static void create_pool_record(B_DB *db, POOL_DBR *pr);
+static void create_job_record(B_DB *db, JOB_DBR *mr, SESSION_LABEL *label);
+static void update_job_record(B_DB *db, JOB_DBR *mr, SESSION_LABEL *elabel,
+ DEV_RECORD *rec);
+static void create_client_record(B_DB *db, CLIENT_DBR *cr);
+static void create_fileset_record(B_DB *db, FILESET_DBR *fsr);
+static void create_jobmedia_record(B_DB *db, JOBMEDIA_DBR *jmr, SESSION_LABEL *elabel);
+
+
+/* Global variables */
static DEVICE *dev = NULL;
static B_DB *db;
static JCR *jcr;
static BSR *bsr;
+static struct stat statp;
+static int type;
+static long record_file_index;
+static POOLMEM *fname; /* original file name */
+static POOLMEM *ofile; /* output name with prefix */
+static POOLMEM *lname; /* link name */
+static MEDIA_DBR mr;
+static POOL_DBR pr;
+static JOB_DBR jr;
+static CLIENT_DBR cr;
+static JOBMEDIA_DBR jmr;
+static FILESET_DBR fsr;
+static ATTR_DBR ar;
+static SESSION_LABEL label;
+static SESSION_LABEL elabel;
+static uint32_t FirstIndex = 0;
+static uint32_t LastIndex = 0;
+
+static char *db_name = "bacula";
+static char *db_user = "bacula";
+static char *db_password = "";
+static char *wd = "/tmp";
+static int verbose = 0;
+static int update_db = 0;
static void usage()
{
fprintf(stderr,
"\nVersion: " VERSION " (" DATE ")\n\n"
"Usage: bscan [-d debug_level] <bacula-archive>\n"
-" -dnn set debug level to nn\n"
-" -? print this message\n\n");
+" -b bootstrap specify a bootstrap file\n"
+" -dnn set debug level to nn\n"
+" -n name specify the database name (default bacula)\n"
+" -u user specify database user name (default bacula)\n"
+" -p password specify database password (default none)\n"
+" -s synchronize or store in database\n"
+" -v verbose\n"
+" -w dir specify working directory (default /tmp)\n"
+" -? print this message\n\n");
exit(1);
}
init_msg(NULL, NULL);
- while ((ch = getopt(argc, argv, "b:d:?")) != -1) {
+ while ((ch = getopt(argc, argv, "b:d:n:p:u:vw:?")) != -1) {
switch (ch) {
case 'b':
bsr = parse_bsr(NULL, optarg);
debug_level = 1;
break;
+ case 'n':
+ db_name = optarg;
+ break;
+
+ case 'u':
+ db_user = optarg;
+ break;
+
+ case 'p':
+ db_password = optarg;
+ break;
+
+ case 's':
+ update_db = 1;
+ break;
+
+ case 'v':
+ verbose++;
+ break;
+
+ case 'w':
+ wd = optarg;
+ break;
+
case '?':
default:
usage();
usage();
}
+ working_directory = wd;
+
jcr = setup_jcr("bscan", argv[0], bsr);
- /* *** FIXME **** need to put in corect db, user, and password */
- if ((db=db_init_database(NULL, "bacula", "bacula", "")) == NULL) {
+ if ((db=db_init_database(NULL, db_name, db_user, db_password)) == NULL) {
Emsg0(M_ABORT, 0, "Could not init Bacula database\n");
}
if (!db_open_database(db)) {
static void do_scan(char *devname)
{
- struct stat statp;
- int type;
- long record_file_index;
- DEV_RECORD *rec;
- DEV_BLOCK *block;
- POOLMEM *fname; /* original file name */
- POOLMEM *ofile; /* output name with prefix */
- POOLMEM *lname; /* link name */
- MEDIA_DBR mr;
- POOL_DBR pr;
- JOB_DBR jr;
dev = setup_to_read_device(jcr);
if (!dev) {
ofile = get_pool_memory(PM_FNAME);
lname = get_pool_memory(PM_FNAME);
- block = new_block(dev);
-
- rec = new_record();
- free_pool_memory(rec->data);
- rec->data = get_memory(70000);
-
+ memset(&ar, 0, sizeof(ar));
memset(&mr, 0, sizeof(mr));
memset(&pr, 0, sizeof(pr));
+ memset(&jr, 0, sizeof(jr));
+ memset(&cr, 0, sizeof(cr));
+ memset(&jmr, 0, sizeof(jmr));
+ memset(&fsr, 0, sizeof(fsr));
- for ( ;; ) {
- if (!read_block_from_device(dev, block)) {
- uint32_t status;
- if (dev->state & ST_EOT) {
- if (!mount_next_read_volume(jcr, dev, block)) {
- break;
- }
- continue;
- }
- if (dev->state & ST_EOF) {
- continue; /* try again */
- }
- if (dev->state & ST_SHORT) {
- continue;
- }
- Pmsg0(0, "Read Record got a bad record\n");
- status_dev(dev, &status);
- Dmsg1(20, "Device status: %x\n", status);
- if (status & MT_EOD)
- Emsg0(M_ABORT, 0, "Unexpected End of Data\n");
- else if (status & MT_EOT)
- Emsg0(M_ABORT, 0, "Unexpected End of Tape\n");
- else if (status & MT_EOF)
- Emsg0(M_ABORT, 0, "Unexpected End of File\n");
- else if (status & MT_DR_OPEN)
- Emsg0(M_ABORT, 0, "Tape Door is Open\n");
- else if (!(status & MT_ONLINE))
- Emsg0(M_ABORT, 0, "Unexpected Tape is Off-line\n");
- else
- Emsg3(M_ABORT, 0, "Read error %d on Record Header %s: %s\n",
- status, dev_name(dev), strerror(errno));
- }
-
- for (rec->state=0; !is_block_empty(rec); ) {
- SESSION_LABEL label, elabel;
- if (!read_record_from_block(block, rec)) {
- break;
- }
-
+ read_records(jcr, dev, record_cb, mount_next_read_volume);
+ release_device(jcr, dev);
- /* This is no longer used */
- if (rec->VolSessionId == 0 && rec->VolSessionTime == 0) {
- Emsg0(M_ERROR, 0, "Zero header record. This shouldn't happen.\n");
- break; /* END OF FILE */
- }
+ free_pool_memory(fname);
+ free_pool_memory(ofile);
+ free_pool_memory(lname);
+ term_dev(dev);
+}
- /*
- * Check for Start or End of Session Record
- *
- */
- if (rec->FileIndex < 0) {
+static void record_cb(JCR *jcr, DEVICE *dev, DEV_BLOCK *block, DEV_RECORD *rec)
+{
+ /*
+ * Check for Start or End of Session Record
+ *
+ */
+ if (rec->FileIndex < 0) {
+
+ if (verbose > 1) {
+ dump_label_record(dev, rec, 1);
+ }
+ switch (rec->FileIndex) {
+ case PRE_LABEL:
+ Pmsg0(000, "Volume is prelabeled. This tape cannot be scanned.\n");
+ return;
+ break;
+ case VOL_LABEL:
+ unser_volume_label(dev, rec);
+ /* Check Pool info */
+ strcpy(pr.Name, dev->VolHdr.PoolName);
+ strcpy(pr.PoolType, dev->VolHdr.PoolType);
+ if (!db_get_pool_record(db, &pr)) {
+ Pmsg1(000, "VOL_LABEL: Pool record not found for Pool: %s\n",
+ pr.Name);
+ create_pool_record(db, &pr);
+ return;
+ } else if (verbose) {
+ Pmsg1(000, "Pool record for %s found in DB.\n", pr.Name);
+ }
+ if (strcmp(pr.PoolType, dev->VolHdr.PoolType) != 0) {
+ Pmsg2(000, "VOL_LABEL: PoolType mismatch. DB=%s Vol=%s\n",
+ pr.PoolType, dev->VolHdr.PoolType);
+ return;
+ } else if (verbose) {
+ Pmsg1(000, "Pool type \"%s\" is OK.\n", pr.PoolType);
+ }
- if (debug_level > 1) {
- dump_label_record(dev, rec, 1);
+ /* Check Media Info */
+ strcpy(mr.VolumeName, dev->VolHdr.VolName);
+ mr.PoolId = pr.PoolId;
+ if (!db_get_media_record(db, &mr)) {
+ Pmsg1(000, "VOL_LABEL: Media record not found for Volume: %s\n",
+ mr.VolumeName);
+ strcpy(mr.MediaType, dev->VolHdr.MediaType);
+ create_media_record(db, &mr, &dev->VolHdr);
+ return;
+ } else if (verbose) {
+ Pmsg1(000, "Media record for %s found in DB.\n", mr.VolumeName);
}
- switch (rec->FileIndex) {
- case PRE_LABEL:
- Pmsg0(000, "Volume is prelabeled. This tape cannot be scanned.\n");
- return;
- break;
- case VOL_LABEL:
- unser_volume_label(dev, rec);
- strcpy(mr.VolumeName, dev->VolHdr.VolName);
- if (!db_get_media_record(db, &mr)) {
- Pmsg1(000, "VOL_LABEL: Media record not found for Volume: %s\n",
- mr.VolumeName);
- continue;
- }
- if (strcmp(mr.MediaType, dev->VolHdr.MediaType) != 0) {
- Pmsg2(000, "VOL_LABEL: MediaType mismatch. DB=%s Vol=%s\n",
- mr.MediaType, dev->VolHdr.MediaType);
- continue;
- }
- strcpy(pr.Name, dev->VolHdr.PoolName);
- if (!db_get_pool_record(db, &pr)) {
- Pmsg1(000, "VOL_LABEL: Pool record not found for Pool: %s\n",
- pr.Name);
- continue;
- }
- if (strcmp(pr.PoolType, dev->VolHdr.PoolType) != 0) {
- Pmsg2(000, "VOL_LABEL: PoolType mismatch. DB=%s Vol=%s\n",
- pr.PoolType, dev->VolHdr.PoolType);
- continue;
- }
- Pmsg1(000, "VOL_LABEL: OK for Volume: %s\n", mr.VolumeName);
- break;
- case SOS_LABEL:
- unser_session_label(&label, rec);
- memset(&jr, 0, sizeof(jr));
- jr.JobId = label.JobId;
- if (!db_get_job_record(db, &jr)) {
- Pmsg1(000, "SOS_LABEL: Job record not found for JobId: %d\n",
- jr.JobId);
- continue;
- }
- if (rec->VolSessionId != jr.VolSessionId) {
- Pmsg2(000, "SOS_LABEL: VolSessId mismatch. DB=%d Vol=%d\n",
- jr.VolSessionId, rec->VolSessionId);
- continue;
- }
- if (rec->VolSessionTime != jr.VolSessionTime) {
- Pmsg2(000, "SOS_LABEL: VolSessTime mismatch. DB=%d Vol=%d\n",
- jr.VolSessionTime, rec->VolSessionTime);
- continue;
- }
- if (jr.PoolId != pr.PoolId) {
- Pmsg2(000, "SOS_LABEL: PoolId mismatch. DB=%d Vol=%d\n",
- jr.PoolId, pr.PoolId);
- continue;
- }
- break;
- case EOS_LABEL:
- unser_session_label(&elabel, rec);
- if (elabel.JobId != label.JobId) {
- Pmsg2(000, "EOS_LABEL: Start/End JobId mismatch. Start=%d End=%d\n",
- label.JobId, elabel.JobId);
- continue;
- }
- if (elabel.JobFiles != jr.JobFiles) {
- Pmsg2(000, "EOS_LABEL: JobFiles mismatch. DB=%d EOS=%d\n",
- jr.JobFiles, elabel.JobFiles);
- continue;
- }
- if (elabel.JobBytes != jr.JobBytes) {
- Pmsg2(000, "EOS_LABEL: JobBytes mismatch. DB=%d EOS=%d\n",
- jr.JobBytes, elabel.JobBytes);
- continue;
- }
- Pmsg1(000, "EOS_LABEL: OK for JobId=%d\n", elabel.JobId);
- break;
- case EOM_LABEL:
- break;
- default:
- break;
+ if (strcmp(mr.MediaType, dev->VolHdr.MediaType) != 0) {
+ Pmsg2(000, "VOL_LABEL: MediaType mismatch. DB=%s Vol=%s\n",
+ mr.MediaType, dev->VolHdr.MediaType);
+ return;
+ } else if (verbose) {
+ Pmsg1(000, "Media type \"%s\" is OK.\n", mr.MediaType);
}
- continue;
- }
-
- /* Is this the file we want? */
- if (bsr && !match_bsr(bsr, rec, &dev->VolHdr, &label)) {
- rec->remainder = 0;
- continue;
- }
- if (is_partial_record(rec)) {
+ Pmsg1(000, "VOL_LABEL: OK for Volume: %s\n", mr.VolumeName);
break;
- }
-
- /* File Attributes stream */
- if (rec->Stream == STREAM_UNIX_ATTRIBUTES) {
- char *ap, *lp, *fp;
-
- if (sizeof_pool_memory(fname) < rec->data_len) {
- fname = realloc_pool_memory(fname, rec->data_len + 1);
+ case SOS_LABEL:
+ unser_session_label(&label, rec);
+ FirstIndex = LastIndex = 0;
+ memset(&jr, 0, sizeof(jr));
+ jr.JobId = label.JobId;
+ if (!db_get_job_record(db, &jr)) {
+ Pmsg1(000, "SOS_LABEL: Job record not found for JobId: %d\n",
+ jr.JobId);
+ create_job_record(db, &jr, &label);
+ jr.PoolId = pr.PoolId;
+ jr.VolSessionId = rec->VolSessionId;
+ jr.VolSessionTime = rec->VolSessionTime;
+ return;
}
- if (sizeof_pool_memory(lname) < rec->data_len) {
- lname = realloc_pool_memory(lname, rec->data_len + 1);
+ if (rec->VolSessionId != jr.VolSessionId) {
+ Pmsg3(000, "SOS_LABEL: VolSessId mismatch for JobId=%u. DB=%d Vol=%d\n",
+ jr.JobId,
+ jr.VolSessionId, rec->VolSessionId);
+ return;
}
- *fname = 0;
- *lname = 0;
-
- /*
- * An Attributes record consists of:
- * File_index
- * Type (FT_types)
- * Filename
- * Attributes
- * Link name (if file linked i.e. FT_LNK)
- *
- */
- sscanf(rec->data, "%ld %d", &record_file_index, &type);
- if (record_file_index != rec->FileIndex)
- Emsg2(M_ERROR_TERM, 0, "Record header file index %ld not equal record index %ld\n",
- rec->FileIndex, record_file_index);
- ap = rec->data;
- while (*ap++ != ' ') /* skip record file index */
- ;
- while (*ap++ != ' ') /* skip type */
- ;
- /* Save filename and position to attributes */
- fp = fname;
- while (*ap != 0) {
- *fp++ = *ap++;
+ if (rec->VolSessionTime != jr.VolSessionTime) {
+ Pmsg3(000, "SOS_LABEL: VolSessTime mismatch for JobId=%u. DB=%d Vol=%d\n",
+ jr.JobId,
+ jr.VolSessionTime, rec->VolSessionTime);
+ return;
}
- *fp = *ap++; /* terminate filename & point to attribs */
-
- /* Skip through attributes to link name */
- if (type == FT_LNK) {
- lp = ap;
- while (*lp++ != 0) {
- ;
- }
- strcat(lname, lp); /* "save" link name */
- } else {
- *lname = 0;
+ if (jr.PoolId != pr.PoolId) {
+ Pmsg3(000, "SOS_LABEL: PoolId mismatch for JobId=%u. DB=%d Vol=%d\n",
+ jr.JobId,
+ jr.PoolId, pr.PoolId);
+ return;
}
+ break;
+ case EOS_LABEL:
+ unser_session_label(&elabel, rec);
+
+ /* Create Client record */
+ strcpy(cr.Name, label.ClientName);
+ create_client_record(db, &cr);
+ jr.ClientId = cr.ClientId;
+
+ /* Create FileSet record */
+ strcpy(fsr.FileSet, label.FileSetName);
+ create_fileset_record(db, &fsr);
+ jr.FileSetId = fsr.FileSetId;
+
+ /* Update Job record */
+ update_job_record(db, &jr, &elabel, rec);
+
+ /* Create JobMedia record */
+ jmr.JobId = jr.JobId;
+ jmr.MediaId = mr.MediaId;
+ create_jobmedia_record(db, &jmr, &elabel);
+ if (elabel.JobId != label.JobId) {
+ Pmsg2(000, "EOS_LABEL: Start/End JobId mismatch. Start=%d End=%d\n",
+ label.JobId, elabel.JobId);
+ return;
+ }
+ if (elabel.JobFiles != jr.JobFiles) {
+ Pmsg3(000, "EOS_LABEL: JobFiles mismatch for JobId=%u. DB=%d EOS=%d\n",
+ elabel.JobId,
+ jr.JobFiles, elabel.JobFiles);
+ return;
+ }
+ if (elabel.JobBytes != jr.JobBytes) {
+ Pmsg3(000, "EOS_LABEL: JobBytes mismatch for JobId=%u. DB=%d EOS=%d\n",
+ elabel.JobId,
+ jr.JobBytes, elabel.JobBytes);
+ return;
+ }
+ Pmsg1(000, "EOS_LABEL: OK for JobId=%d\n", elabel.JobId);
+ break;
+ case EOM_LABEL:
+ break;
+ default:
+ break;
+ }
+ return;
+ }
- decode_stat(ap, &statp);
- if (debug_level > 1) {
- print_ls_output(fname, lname, type, &statp);
- }
+ /* File Attributes stream */
+ if (rec->Stream == STREAM_UNIX_ATTRIBUTES) {
+ char *ap, *lp, *fp;
- /* Data stream and extracting */
- } else if (rec->Stream == STREAM_FILE_DATA) {
+ if (sizeof_pool_memory(fname) < rec->data_len) {
+ fname = realloc_pool_memory(fname, rec->data_len + 1);
+ }
+ if (sizeof_pool_memory(lname) < rec->data_len) {
+ lname = realloc_pool_memory(lname, rec->data_len + 1);
+ }
+ *fname = 0;
+ *lname = 0;
+
+ /*
+ * An Attributes record consists of:
+ * File_index
+ * Type (FT_types)
+ * Filename
+ * Attributes
+ * Link name (if file linked i.e. FT_LNK)
+ *
+ */
+ sscanf(rec->data, "%ld %d", &record_file_index, &type);
+ if (record_file_index != rec->FileIndex)
+ Emsg2(M_ERROR_TERM, 0, "Record header file index %ld not equal record index %ld\n",
+ rec->FileIndex, record_file_index);
+ ap = rec->data;
+ while (*ap++ != ' ') /* skip record file index */
+ ;
+ while (*ap++ != ' ') /* skip type */
+ ;
+ /* Save filename and position to attributes */
+ fp = fname;
+ while (*ap != 0) {
+ *fp++ = *ap++;
+ }
+ *fp = *ap++; /* terminate filename & point to attribs */
- } else if (rec->Stream != STREAM_MD5_SIGNATURE) {
- Pmsg2(0, "None of above!!! stream=%d data=%s\n", rec->Stream, rec->data);
- }
+ /* Skip through attributes to link name */
+ lp = ap;
+ while (*lp++ != 0) {
+ ;
}
- }
+ strcat(lname, lp); /* "save" link name */
- release_device(jcr, dev);
- free_pool_memory(fname);
- free_pool_memory(ofile);
- free_pool_memory(lname);
- term_dev(dev);
- free_block(block);
- free_record(rec);
+ if (verbose > 1) {
+ decode_stat(ap, &statp);
+ print_ls_output(fname, lname, type, &statp);
+ }
+ create_file_attributes_record(db, fname, lname, type, ap, rec);
+ if (FirstIndex == 0) {
+ FirstIndex = rec->FileIndex;
+ }
+ LastIndex = rec->FileIndex;
+
+ /* Data stream and extracting */
+ } else if (rec->Stream == STREAM_FILE_DATA) {
+
+ } else if (rec->Stream != STREAM_MD5_SIGNATURE) {
+ Pmsg2(0, "None of above!!! stream=%d data=%s\n", rec->Stream, rec->data);
+ }
+
return;
}
+static void create_file_attributes_record(B_DB *db, char *fname, char *lname, int type,
+ char *ap, DEV_RECORD *rec)
+{
+ if (!update_db) {
+ return;
+ }
+ ar.fname = fname;
+ ar.link = lname;
+ ar.ClientId = cr.ClientId;
+ ar.JobId = jr.JobId;
+ ar.Stream = rec->Stream;
+ ar.FileIndex = rec->FileIndex;
+ ar.attr = ap;
+ if (!db_create_file_attributes_record(db, &ar)) {
+ Pmsg1(0, _("Could not create File Attributes record. ERR=%s\n"), db_strerror(db));
+ }
+
+}
+
+static void create_media_record(B_DB *db, MEDIA_DBR *mr, VOLUME_LABEL *vl)
+{
+ struct date_time dt;
+ struct tm tm;
+ if (!update_db) {
+ return;
+ }
+ strcpy(mr->VolStatus, "Full");
+ mr->VolRetention = 355 * 3600 * 24; /* 1 year */
+ dt.julian_day_number = vl->write_date;
+ dt.julian_day_fraction = vl->write_time;
+ tm_decode(&dt, &tm);
+ mr->FirstWritten = mktime(&tm);
+ dt.julian_day_number = vl->label_date;
+ dt.julian_day_fraction = vl->label_time;
+ tm_decode(&dt, &tm);
+ mr->LabelDate = mktime(&tm);
+ if (!db_create_media_record(db, mr)) {
+ Pmsg1(0, _("Could not create media record. ERR=%s\n"), db_strerror(db));
+ }
+ if (!db_update_media_record(db, mr)) {
+ Pmsg1(0, _("Could not update media record. ERR=%s\n"), db_strerror(db));
+ }
+
+}
+
+static void create_pool_record(B_DB *db, POOL_DBR *pr)
+{
+ if (!update_db) {
+ return;
+ }
+ pr->NumVols++;
+ pr->UseCatalog = 1;
+ pr->VolRetention = 355 * 3600 * 24; /* 1 year */
+ if (!db_create_pool_record(db, pr)) {
+ Pmsg1(0, _("Could not create pool record. ERR=%s\n"), db_strerror(db));
+ }
+
+}
+
+
+static void create_client_record(B_DB *db, CLIENT_DBR *cr)
+{
+ if (!update_db) {
+ return;
+ }
+ if (!db_create_client_record(db, cr)) {
+ Pmsg1(0, _("Could not create Client record. ERR=%s\n"), db_strerror(db));
+ }
+}
+
+static void create_fileset_record(B_DB *db, FILESET_DBR *fsr)
+{
+ if (!update_db) {
+ return;
+ }
+ if (!db_create_fileset_record(db, fsr)) {
+ Pmsg1(0, _("Could not create FileSet record. ERR=%s\n"), db_strerror(db));
+ }
+}
+
+static void create_job_record(B_DB *db, JOB_DBR *jr, SESSION_LABEL *label)
+{
+ struct date_time dt;
+ struct tm tm;
+
+ if (!update_db) {
+ return;
+ }
+ jr->JobId = label->JobId;
+ jr->Type = label->JobType;
+ jr->Level = label->JobLevel;
+ strcpy(jr->Name, label->JobName);
+ strcpy(jr->Job, label->Job);
+ dt.julian_day_number = label->write_date;
+ dt.julian_day_fraction = label->write_time;
+ tm_decode(&dt, &tm);
+ jr->SchedTime = mktime(&tm);
+ jr->StartTime = jr->SchedTime;
+ jr->JobTDate = (btime_t)jr->SchedTime;
+ if (!db_create_job_record(db, jr)) {
+ Pmsg1(0, _("Could not create job record. ERR=%s\n"), db_strerror(db));
+ }
+
+
+}
+
+static void update_job_record(B_DB *db, JOB_DBR *jr, SESSION_LABEL *elabel,
+ DEV_RECORD *rec)
+{
+ struct date_time dt;
+ struct tm tm;
+
+ if (!update_db) {
+ return;
+ }
+ dt.julian_day_number = elabel->write_date;
+ dt.julian_day_fraction = elabel->write_time;
+ tm_decode(&dt, &tm);
+ jr->JobStatus = JS_Terminated;
+ jr->EndTime = mktime(&tm);
+ jr->JobFiles = elabel->JobFiles;
+ jr->JobBytes = elabel->JobBytes;
+ jr->VolSessionId = rec->VolSessionId;
+ jr->VolSessionTime = rec->VolSessionTime;
+ if (!db_create_job_record(db, jr)) {
+ Pmsg1(0, _("Could not create job record. ERR=%s\n"), db_strerror(db));
+ }
+
+}
+
+static void create_jobmedia_record(B_DB *db, JOBMEDIA_DBR *jmr, SESSION_LABEL *elabel)
+{
+ if (!update_db) {
+ return;
+ }
+ jmr->FirstIndex = FirstIndex;
+ jmr->LastIndex = LastIndex;
+ jmr->StartFile = elabel->start_file;
+ jmr->EndFile = elabel->end_file;
+ jmr->StartBlock = elabel->start_block;
+ jmr->EndBlock = elabel->end_block;
+ if (!db_create_jobmedia_record(db, jmr)) {
+ Pmsg1(0, _("Could not create JobMedia record. ERR=%s\n"), db_strerror(db));
+ }
+
+}
+
/* Dummies to replace askdir.c */
-int dir_get_volume_info(JCR *jcr) { return 1;}
+int dir_get_volume_info(JCR *jcr, int writing) { return 1;}
int dir_find_next_appendable_volume(JCR *jcr) { return 1;}
int dir_update_volume_info(JCR *jcr, VOLUME_CAT_INFO *vol, int relabel) { return 1; }
int dir_create_jobmedia_record(JCR *jcr) { return 1; }
/*
* !!!!!!!!!!!!!!!!!! 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. !!!
+ * !!! !!!
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/
typedef struct s_bsr_volfile {
struct s_bsr_volfile *next;
- uint32_t sfile; /* start file */
- uint32_t efile; /* end file */
+ uint32_t sfile; /* start file */
+ uint32_t efile; /* end file */
int found;
} BSR_VOLFILE;
typedef struct s_bsr_findex {
struct s_bsr_findex *next;
- int32_t findex; /* start file index */
- int32_t findex2; /* end file index */
+ int32_t findex; /* start file index */
+ int32_t findex2; /* end file index */
int found;
} BSR_FINDEX;
typedef struct s_bsr_stream {
struct s_bsr_stream *next;
- int32_t stream; /* stream desired */
+ int32_t stream; /* stream desired */
int found;
} 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 */
- BSR_VOLFILE *volfile;
+ struct s_bsr *next; /* pointer to next one */
+ int done; /* set when everything found */
+ BSR_VOLUME *volume;
+ int32_t Slot; /* Slot */
+ int32_t count; /* count of files to restore this volume */
+ BSR_VOLFILE *volfile;
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;
+// FF_PKT *ff; /* include/exclude */
} BSR;
#ifdef xxxx
struct mtget mt_stat;
#endif
- int32_t pos;
+ int64_t pos;
int stat = 0;
if (dev->fd < 0) {
dev->no_wait_id = pthread_self(); /* allow us to continue */
}
+
+
/*
* Unblock the device, and wake up anyone who went to sleep.
*/
* subcommands that are handled
* in job.c.
*
+ * N.B. in this file, in general we must use P(dev->mutex) rather
+ * than lock_device(dev) so that we can examine the blocked
+ * state rather than blocking ourselves. In some "safe" cases,
+ * we can do things to a blocked device. CAREFUL!!!!
+ *
* File daemon commands are handled in fdcmd.c
*
* Kern Sibbald, May MMI
static int mount_cmd(JCR *jcr);
static int unmount_cmd(JCR *jcr);
static int status_cmd(JCR *sjcr);
-static void label_volume_if_ok(JCR *jcr, DEVICE *dev, char *vname, char *poolname);
+static void label_volume_if_ok(JCR *jcr, DEVICE *dev, char *vname, char *poolname,
+ int Slot);
struct s_cmds {
char *cmd;
jcr->device = device;
dev = device->dev;
-/* *****FIXME***** add autochanger code */
-
-#ifdef NEW_LOCK
- P(dev->lock.mutex);
- if (!(dev->state & ST_OPENED)) {
- label_it = TRUE;
- } else if (dev->dev_blocked &&
- dev->dev_blocked != BST_DOING_ACQUIRE) { /* device blocked? */
- label_it = TRUE;
- } else if (dev->state & ST_READ || dev->num_writers) {
- if (dev->state & ST_READ) {
- bnet_fsend(dir, _("3901 Device %s is busy with 1 reader.\n"),
- dev_name(dev));
- } else {
- bnet_fsend(dir, _("3902 Device %s is busy with %d writer(s).\n"),
- dev_name(dev), dev->num_writers);
- }
- } else { /* device not being used */
- label_it = TRUE;
- }
- if (label_it) {
- new_steal_device_lock(dev, &hold, BST_WRITING_LABEL);
- if (!(dev->state & ST_OPENED)) {
- if (open_dev(dev, volname, READ_WRITE) < 0) {
- bnet_fsend(dir, _("3994 Connot open device: %s\n"), strerror_dev(dev));
- } else {
- label_volume_if_ok(jcr, dev, volname, poolname);
- force_close_dev(dev);
- }
- } else {
- label_volume_if_ok(jcr, dev, volname, poolname);
- }
- new_return_device_lock(dev, &hold);
- }
- V(dev->lock.mutex);
-#else
- P(dev->mutex);
+ P(dev->mutex); /* Use P to avoid indefinite block */
if (!(dev->state & ST_OPENED)) {
if (open_dev(dev, volname, READ_WRITE) < 0) {
bnet_fsend(dir, _("3994 Connot open device: %s\n"), strerror_dev(dev));
} else {
- label_volume_if_ok(jcr, dev, volname, poolname);
+ label_volume_if_ok(jcr, dev, volname, poolname, slot);
force_close_dev(dev);
}
+ /* Under certain "safe" conditions, we can steal the lock */
} else if (dev->dev_blocked &&
- dev->dev_blocked != BST_DOING_ACQUIRE) { /* device blocked? */
- label_volume_if_ok(jcr, dev, volname, poolname);
+ (dev->dev_blocked == BST_UNMOUNTED ||
+ dev->dev_blocked == BST_WAITING_FOR_SYSOP ||
+ dev->dev_blocked == BST_UNMOUNTED_WAITING_FOR_SYSOP)) {
+ label_volume_if_ok(jcr, dev, volname, poolname, slot);
} else if (dev->state & ST_READ || dev->num_writers) {
if (dev->state & ST_READ) {
bnet_fsend(dir, _("3901 Device %s is busy with 1 reader.\n"),
dev_name(dev), dev->num_writers);
}
} else { /* device not being used */
- label_volume_if_ok(jcr, dev, volname, poolname);
+ label_volume_if_ok(jcr, dev, volname, poolname, slot);
}
V(dev->mutex);
-#endif
} else {
bnet_fsend(dir, _("3999 Device %s not found\n"), dname);
}
*
* Enter with the mutex set
*/
-static void label_volume_if_ok(JCR *jcr, DEVICE *dev, char *vname, char *poolname)
+static void label_volume_if_ok(JCR *jcr, DEVICE *dev, char *vname, char *poolname,
+ int slot)
{
BSOCK *dir = jcr->dir_bsock;
DEV_BLOCK *block;
steal_device_lock(dev, &hold, BST_WRITING_LABEL);
strcpy(jcr->VolumeName, vname);
+ jcr->VolCatInfo.Slot = slot;
+ autoload_device(jcr, dev, 0); /* autoload if possible */
block = new_block(dev);
+
+ /* See what we have for a Volume */
switch (read_dev_volume_label(jcr, dev, block)) {
case VOL_NAME_ERROR:
case VOL_VERSION_ERROR:
if (found) {
jcr->device = device;
dev = device->dev;
- P(dev->mutex);
+ P(dev->mutex); /* Use P to avoid indefinite block */
switch (dev->dev_blocked) { /* device blocked? */
DEV_BLOCK *block;
case BST_WAITING_FOR_SYSOP:
if (dev->dev_blocked == BST_UNMOUNTED) {
Dmsg0(90, "Unmounted unblocking device\n");
read_label(jcr, dev);
- new_unlock_device(dev);
unblock_device(dev);
} else {
Dmsg0(90, "Unmounted waiting for mount attempt to wake thread\n");
if (found) {
jcr->device = device;
dev = device->dev;
- P(dev->mutex);
+ P(dev->mutex); /* Use P to avoid indefinite block */
if (!(dev->state & ST_OPENED)) {
Dmsg0(90, "Device already unmounted\n");
bnet_fsend(dir, _("3901 Device %s is already unmounted.\n"), dev_name(dev));
} else { /* device not being used */
Dmsg0(90, "Device not in use, unmounting\n");
- new_lock_device_state(dev, BST_UNMOUNTED);
block_device(dev, BST_UNMOUNTED);
if (dev->capabilities & CAP_OFFLINEUNMOUNT) {
offline_dev(dev);
/*
* Pass back an authorization key for the File daemon
*/
+#ifdef Old_way_not_so_good
gettimeofday(&tv, &tz);
srandom(tv.tv_usec + tv.tv_sec);
sprintf(auth_key, "%ld", (long)random());
+#endif
+ makeSessionKey(auth_key, NULL, 1);
bnet_fsend(dir, OKjob, jcr->VolSessionId, jcr->VolSessionTime, auth_key);
Dmsg1(110, ">dird: %s", dir->msg);
jcr->sd_auth_key = bstrdup(auth_key);
Dmsg1(200, "%s waiting on job_start_wait\n", jcr->Job);
+ /* Wait for the File daemon to contact us to start the Job,
+ * when he does, we will be released, unless the 30 minutes
+ * expires.
+ */
P(jcr->mutex);
for ( ;!job_cancelled(jcr); ) {
errstat = pthread_cond_timedwait(&jcr->job_start_wait, &jcr->mutex, &timeout);
jcr->VolFirstFile = jcr->JobFiles; /* first update of Vol FileIndex */
for ( ;; ) {
- int slot = jcr->VolCatInfo.Slot;
-
- /*
- * Handle autoloaders here. If we cannot autoload it, we
- * will fall through to ask the sysop.
- */
- if (dev->capabilities && CAP_AUTOCHANGER && slot <= 0) {
- if (dir_find_next_appendable_volume(jcr)) {
- slot = jcr->VolCatInfo.Slot;
- }
+ autochanger = autoload_device(jcr, dev, 1);
+ if (autochanger) {
+ ask = 0; /* if autochange no need to ask sysop */
}
- Dmsg1(100, "Want changer slot=%d\n", slot);
-
- if (slot > 0 && jcr->device->changer_name && jcr->device->changer_command) {
- uint32_t timeout = jcr->device->max_changer_wait;
- POOLMEM *changer, *results;
- int status, loaded;
-
- results = get_pool_memory(PM_MESSAGE);
- changer = get_pool_memory(PM_FNAME);
- /* Find out what is loaded */
- changer = edit_device_codes(jcr, changer, jcr->device->changer_command,
- "loaded");
- status = run_program(changer, timeout, results);
- if (status == 0) {
- loaded = atoi(results);
- } else {
- loaded = -1; /* force unload */
- }
- Dmsg1(100, "loaded=%s\n", results);
-
- /* If bad status or tape we want is not loaded, load it. */
- if (status != 0 || loaded != slot) {
- if (dev->capabilities & CAP_OFFLINEUNMOUNT) {
- offline_dev(dev);
- }
- /* We are going to load a new tape, so close the device */
- force_close_dev(dev);
- if (loaded != 0) { /* must unload drive */
- Dmsg0(100, "Doing changer unload.\n");
- Jmsg(jcr, M_INFO, 0, _("Issuing autochanger \"unload\" command.\n"));
- changer = edit_device_codes(jcr, changer,
- jcr->device->changer_command, "unload");
- status = run_program(changer, timeout, NULL);
- Dmsg1(100, "unload status=%d\n", status);
- }
- /*
- * Load the desired cassette
- */
- Dmsg1(100, "Doing changer load slot %d\n", slot);
- Jmsg(jcr, M_INFO, 0, _("Issuing autochanger \"load slot %d\" command.\n"),
- slot);
- changer = edit_device_codes(jcr, changer,
- jcr->device->changer_command, "load");
- status = run_program(changer, timeout, NULL);
- Dmsg2(100, "load slot %d status=%d\n", slot, status);
- }
- free_pool_memory(changer);
- free_pool_memory(results);
- Dmsg1(100, "After changer, status=%d\n", status);
- if (status == 0) { /* did we succeed? */
- ask = 0; /* yes, got vol, no need to ask sysop */
- autochanger = 1; /* tape loaded by changer */
- }
- }
-
if (ask && !dir_ask_sysop_to_mount_next_volume(jcr, dev)) {
return 0; /* error return */
Dmsg1(500, "Vol NAME Error Name=%s\n", jcr->VolumeName);
/* Check if we can accept this as an anonymous volume */
strcpy(jcr->VolumeName, dev->VolHdr.VolName);
- if (!dev->capabilities & CAP_ANONVOLS || !dir_get_volume_info(jcr)) {
+ if (!dev->capabilities & CAP_ANONVOLS || !dir_get_volume_info(jcr, 1)) {
goto mount_next_vol;
}
Dmsg1(200, "want new name=%s\n", jcr->VolumeName);
/* NOTE! Fall-through wanted. */
default:
/* Send error message */
- Jmsg(jcr, M_WARNING, 0, "%s", jcr->errmsg);
+ Jmsg1(jcr, M_WARNING, 0, "%s", jcr->errmsg);
if (autochanger) {
Jmsg(jcr, M_ERROR, 0, _("Autochanger Volume %s not found in slot %d.\n\
Setting slot to zero in catalog.\n"),
return 0;
}
+/*
+ * Called here to do an autoload using the autochanger, if
+ * configured, and if a Slot has been defined for this Volume.
+ * On success this routine loads the indicated tape, but the
+ * label is not read, so it must be verified.
+ *
+ * Returns: 1 on success
+ * 0 on failure
+ */
+int autoload_device(JCR *jcr, DEVICE *dev, int writing)
+{
+ int slot = jcr->VolCatInfo.Slot;
+ int rtn_stat = 0;
+
+ /*
+ * Handle autoloaders here. If we cannot autoload it, we
+ * will return FALSE to ask the sysop.
+ */
+ if (writing && dev->capabilities && CAP_AUTOCHANGER && slot <= 0) {
+ if (dir_find_next_appendable_volume(jcr)) {
+ slot = jcr->VolCatInfo.Slot;
+ }
+ }
+ Dmsg1(100, "Want changer slot=%d\n", slot);
+
+ if (slot > 0 && jcr->device->changer_name && jcr->device->changer_command) {
+ uint32_t timeout = jcr->device->max_changer_wait;
+ POOLMEM *changer, *results;
+ int status, loaded;
+
+ results = get_pool_memory(PM_MESSAGE);
+ changer = get_pool_memory(PM_FNAME);
+
+ /* Find out what is loaded, zero means device is unloaded */
+ changer = edit_device_codes(jcr, changer, jcr->device->changer_command,
+ "loaded");
+ status = run_program(changer, timeout, results);
+ if (status == 0) {
+ loaded = atoi(results);
+ } else {
+ loaded = -1; /* force unload */
+ }
+ Dmsg1(100, "loaded=%s\n", results);
+
+ /* If bad status or tape we want is not loaded, load it. */
+ if (status != 0 || loaded != slot) {
+ if (dev->capabilities & CAP_OFFLINEUNMOUNT) {
+ offline_dev(dev);
+ }
+ /* We are going to load a new tape, so close the device */
+ force_close_dev(dev);
+ if (loaded != 0) { /* must unload drive */
+ Dmsg0(100, "Doing changer unload.\n");
+ Jmsg(jcr, M_INFO, 0, _("Issuing autochanger \"unload\" command.\n"));
+ changer = edit_device_codes(jcr, changer,
+ jcr->device->changer_command, "unload");
+ status = run_program(changer, timeout, NULL);
+ Dmsg1(100, "unload status=%d\n", status);
+ }
+ /*
+ * Load the desired cassette
+ */
+ Dmsg1(100, "Doing changer load slot %d\n", slot);
+ Jmsg(jcr, M_INFO, 0, _("Issuing autochanger \"load slot %d\" command.\n"),
+ slot);
+ changer = edit_device_codes(jcr, changer,
+ jcr->device->changer_command, "load");
+ status = run_program(changer, timeout, NULL);
+ Dmsg2(100, "load slot %d status=%d\n", slot, status);
+ }
+ free_pool_memory(changer);
+ free_pool_memory(results);
+ Dmsg1(100, "After changer, status=%d\n", status);
+ if (status == 0) { /* did we succeed? */
+ rtn_stat = 1; /* tape loaded by changer */
+ }
+ }
+ return rtn_stat;
+}
+
+
/*
* Edit codes into ChangerCommand
static BSR *store_client(LEX *lc, BSR *bsr);
static BSR *store_job(LEX *lc, BSR *bsr);
static BSR *store_jobid(LEX *lc, BSR *bsr);
+static BSR *store_count(LEX *lc, BSR *bsr);
static BSR *store_jobtype(LEX *lc, BSR *bsr);
static BSR *store_joblevel(LEX *lc, BSR *bsr);
static BSR *store_findex(LEX *lc, BSR *bsr);
{"client", store_client},
{"job", store_job},
{"jobid", store_jobid},
+ {"count", store_count},
{"fileindex", store_findex},
{"jobtype", store_jobtype},
{"joblevel", store_joblevel},
if (token == T_ERROR) {
return NULL;
}
+ if (bsr->volume) {
+ bsr->next = new_bsr();
+ bsr = bsr->next;
+ }
/* This may actually be more than one volume separated by a |
* If so, separate them.
*/
return bsr;
}
+
+static BSR *store_count(LEX *lc, BSR *bsr)
+{
+ int token;
+
+ token = lex_get_token(lc, T_PINT32);
+ if (token == T_ERROR) {
+ return NULL;
+ }
+ bsr->count = lc->pint32_val;
+ scan_to_eol(lc);
+ return bsr;
+}
+
+
static BSR *store_jobtype(LEX *lc, BSR *bsr)
{
/* *****FIXME****** */
dump_jobid(bsr->JobId);
dump_job(bsr->job);
dump_findex(bsr->FileIndex);
+ if (bsr->Slot) {
+ Dmsg1(-1, "Slot : %u\n", bsr->Slot);
+ }
+ if (bsr->count) {
+ Dmsg1(-1, "count : %u\n", bsr->count);
+ }
if (bsr->next) {
Dmsg0(-1, "\n");
dump_bsr(bsr->next);
uint32_t new_VolSessionId();
/* From acquire.c */
-int acquire_device_for_append(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
-int acquire_device_for_read(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
-int ready_dev_for_read(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
-int release_device(JCR *jcr, DEVICE *dev);
+int acquire_device_for_append(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
+int acquire_device_for_read(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
+int release_device(JCR *jcr, DEVICE *dev);
/* From askdir.c */
-int dir_get_volume_info(JCR *jcr);
-int dir_find_next_appendable_volume(JCR *jcr);
-int dir_update_volume_info(JCR *jcr, VOLUME_CAT_INFO *vol, int relabel);
-int dir_ask_sysop_to_mount_next_volume(JCR *jcr, DEVICE *dev);
-int dir_ask_sysop_to_mount_volume(JCR *jcr, DEVICE *dev);
-int dir_update_file_attributes(JCR *jcr, DEV_RECORD *rec);
-int dir_send_job_status(JCR *jcr);
-int dir_create_jobmedia_record(JCR *jcr);
+int dir_get_volume_info(JCR *jcr, int writing);
+int dir_find_next_appendable_volume(JCR *jcr);
+int dir_update_volume_info(JCR *jcr, VOLUME_CAT_INFO *vol, int relabel);
+int dir_ask_sysop_to_mount_next_volume(JCR *jcr, DEVICE *dev);
+int dir_ask_sysop_to_mount_volume(JCR *jcr, DEVICE *dev);
+int dir_update_file_attributes(JCR *jcr, DEV_RECORD *rec);
+int dir_send_job_status(JCR *jcr);
+int dir_create_jobmedia_record(JCR *jcr);
/* authenticate.c */
-int authenticate_director(JCR *jcr);
-int authenticate_filed(JCR *jcr);
+int authenticate_director(JCR *jcr);
+int authenticate_filed(JCR *jcr);
/* From block.c */
-void dump_block(DEV_BLOCK *b, char *msg);
+void dump_block(DEV_BLOCK *b, char *msg);
DEV_BLOCK *new_block(DEVICE *dev);
-void init_block_write(DEV_BLOCK *block);
-void empty_block(DEV_BLOCK *block);
-void free_block(DEV_BLOCK *block);
-int write_block_to_device(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
-int write_block_to_dev(DEVICE *dev, DEV_BLOCK *block);
-int read_block_from_device(DEVICE *dev, DEV_BLOCK *block);
-int read_block_from_dev(DEVICE *dev, DEV_BLOCK *block);
+void init_block_write(DEV_BLOCK *block);
+void empty_block(DEV_BLOCK *block);
+void free_block(DEV_BLOCK *block);
+int write_block_to_device(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
+int write_block_to_dev(DEVICE *dev, DEV_BLOCK *block);
+int read_block_from_device(DEVICE *dev, DEV_BLOCK *block);
+int read_block_from_dev(DEVICE *dev, DEV_BLOCK *block);
/* From butil.c */
void print_ls_output(char *fname, char *link, int type, struct stat *statp);
/* From dev.c */
-DEVICE *init_dev(DEVICE *dev, char *device);
-int open_dev(DEVICE *dev, char *VolName, int mode);
-void close_dev(DEVICE *dev);
-void force_close_dev(DEVICE *dev);
-int truncate_dev(DEVICE *dev);
-void term_dev(DEVICE *dev);
-char * strerror_dev(DEVICE *dev);
-void clrerror_dev(DEVICE *dev, int func);
-int update_pos_dev(DEVICE *dev);
-int rewind_dev(DEVICE *dev);
-int load_dev(DEVICE *dev);
-int offline_dev(DEVICE *dev);
-int flush_dev(DEVICE *dev);
-int weof_dev(DEVICE *dev, int num);
-int write_block(DEVICE *dev);
-int write_dev(DEVICE *dev, char *buf, size_t len);
-int read_dev(DEVICE *dev, char *buf, size_t len);
-int status_dev(DEVICE *dev, uint32_t *status);
-int eod_dev(DEVICE *dev);
-int fsf_dev(DEVICE *dev, int num);
-int fsr_dev(DEVICE *dev, int num);
-int bsf_dev(DEVICE *dev, int num);
-int bsr_dev(DEVICE *dev, int num);
-void attach_jcr_to_device(DEVICE *dev, JCR *jcr);
-void detach_jcr_from_device(DEVICE *dev, JCR *jcr);
-JCR *next_attached_jcr(DEVICE *dev, JCR *jcr);
+DEVICE *init_dev(DEVICE *dev, char *device);
+int open_dev(DEVICE *dev, char *VolName, int mode);
+void close_dev(DEVICE *dev);
+void force_close_dev(DEVICE *dev);
+int truncate_dev(DEVICE *dev);
+void term_dev(DEVICE *dev);
+char * strerror_dev(DEVICE *dev);
+void clrerror_dev(DEVICE *dev, int func);
+int update_pos_dev(DEVICE *dev);
+int rewind_dev(DEVICE *dev);
+int load_dev(DEVICE *dev);
+int offline_dev(DEVICE *dev);
+int flush_dev(DEVICE *dev);
+int weof_dev(DEVICE *dev, int num);
+int write_block(DEVICE *dev);
+int write_dev(DEVICE *dev, char *buf, size_t len);
+int read_dev(DEVICE *dev, char *buf, size_t len);
+int status_dev(DEVICE *dev, uint32_t *status);
+int eod_dev(DEVICE *dev);
+int fsf_dev(DEVICE *dev, int num);
+int fsr_dev(DEVICE *dev, int num);
+int bsf_dev(DEVICE *dev, int num);
+int bsr_dev(DEVICE *dev, int num);
+void attach_jcr_to_device(DEVICE *dev, JCR *jcr);
+void detach_jcr_from_device(DEVICE *dev, JCR *jcr);
+JCR *next_attached_jcr(DEVICE *dev, JCR *jcr);
/* Get info about device */
-char * dev_name(DEVICE *dev);
-char * dev_vol_name(DEVICE *dev);
+char * dev_name(DEVICE *dev);
+char * dev_vol_name(DEVICE *dev);
uint32_t dev_block(DEVICE *dev);
uint32_t dev_file(DEVICE *dev);
-int dev_is_tape(DEVICE *dev);
+int dev_is_tape(DEVICE *dev);
/* From device.c */
-int open_device(DEVICE *dev);
-int fixup_device_block_write_error(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
+int open_device(DEVICE *dev);
+int fixup_device_block_write_error(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
void _lock_device(char *file, int line, DEVICE *dev);
void _unlock_device(char *file, int line, DEVICE *dev);
void _block_device(char *file, int line, DEVICE *dev, int state);
void new_return_device_lock(DEVICE *dev, brwsteal_t *hold);
/* From dircmd.c */
-void connection_request(void *arg);
+void connection_request(void *arg);
/* From fd_cmds.c */
-void run_job(JCR *jcr);
+void run_job(JCR *jcr);
/* From fdmsg.c */
-int bget_msg(BSOCK *sock);
+int bget_msg(BSOCK *sock);
/* From job.c */
-void stored_free_jcr(JCR *jcr);
-void connection_from_filed(void *arg);
-void handle_filed_connection(BSOCK *fd, char *job_name);
+void stored_free_jcr(JCR *jcr);
+void connection_from_filed(void *arg);
+void handle_filed_connection(BSOCK *fd, char *job_name);
/* From label.c */
-int read_dev_volume_label(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
-void create_session_label(JCR *jcr, DEV_RECORD *rec, int label);
-int write_volume_label_to_dev(JCR *jcr, DEVRES *device, char *VolName, char *PoolName);
-int write_session_label(JCR *jcr, DEV_BLOCK *block, int label);
-int write_volume_label_to_block(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
-void dump_volume_label(DEVICE *dev);
-void dump_label_record(DEVICE *dev, DEV_RECORD *rec, int verbose);
-int unser_volume_label(DEVICE *dev, DEV_RECORD *rec);
-int unser_session_label(SESSION_LABEL *label, DEV_RECORD *rec);
+int read_dev_volume_label(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
+void create_session_label(JCR *jcr, DEV_RECORD *rec, int label);
+int write_volume_label_to_dev(JCR *jcr, DEVRES *device, char *VolName, char *PoolName);
+int write_session_label(JCR *jcr, DEV_BLOCK *block, int label);
+int write_volume_label_to_block(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
+void dump_volume_label(DEVICE *dev);
+void dump_label_record(DEVICE *dev, DEV_RECORD *rec, int verbose);
+int unser_volume_label(DEVICE *dev, DEV_RECORD *rec);
+int unser_session_label(SESSION_LABEL *label, DEV_RECORD *rec);
/* From match_bsr.c */
int match_bsr(BSR *bsr, DEV_RECORD *rec, VOLUME_LABEL *volrec,
- SESSION_LABEL *sesrec);
+ SESSION_LABEL *sesrec);
/* From mount.c */
-int mount_next_write_volume(JCR *jcr, DEVICE *dev, DEV_BLOCK *block, int release);
-int mount_next_read_volume(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
+int mount_next_write_volume(JCR *jcr, DEVICE *dev, DEV_BLOCK *block, int release);
+int mount_next_read_volume(JCR *jcr, DEVICE *dev, DEV_BLOCK *block);
+int autoload_device(JCR *jcr, DEVICE *dev, int writing);
/* From parse_bsr.c */
/* From record.c */
char *FI_to_ascii(int fi);
char *stream_to_ascii(int stream);
-int write_record_to_block(DEV_BLOCK *block, DEV_RECORD *rec);
-int can_write_record_to_block(DEV_BLOCK *block, DEV_RECORD *rec);
-int read_record_from_block(DEV_BLOCK *block, DEV_RECORD *rec);
+int write_record_to_block(DEV_BLOCK *block, DEV_RECORD *rec);
+int can_write_record_to_block(DEV_BLOCK *block, DEV_RECORD *rec);
+int read_record_from_block(DEV_BLOCK *block, DEV_RECORD *rec);
DEV_RECORD *new_record();
-void free_record(DEV_RECORD *rec);
+void free_record(DEV_RECORD *rec);
/* From read_record.c */
int read_records(JCR *jcr, DEVICE *dev,
block = new_block(dev);
create_vol_list(jcr);
+ if (jcr->NumVolumes == 0) {
+ Jmsg(jcr, M_FATAL, 0, _("No Volume names found for restore.\n"));
+ free_block(block);
+ free_vol_list(jcr);
+ return 0;
+ }
+
+ Dmsg2(200, "Found %d volumes names to restore. First=%s\n", jcr->NumVolumes,
+ jcr->VolList->VolumeName);
- Dmsg1(20, "Found %d volumes names to restore.\n", jcr->NumVolumes);
+ pm_strcpy(&jcr->VolumeName, jcr->VolList->VolumeName);
/*
* Ready device for reading, and read records
/* common stuff -- free the resource name */
nres = (URES *)res->res_dir.hdr.next;
- if (res->res_dir.hdr.name)
+ if (res->res_dir.hdr.name) {
free(res->res_dir.hdr.name);
+ }
+ if (res->res_dir.hdr.desc) {
+ free(res->res_dir.hdr.desc);
+ }
+
switch (type) {
case R_DIRECTOR:
/* */
#define VERSION "1.26"
#define VSTRING "1"
-#define DATE "05 September 2002"
-#define LSMDATE "05Sep02"
+#define DATE "14 September 2002"
+#define LSMDATE "14Sep02"
/* Debug flags */
#define DEBUG 1