diff -Naur mbuffer-20010528/CHANGES mbuffer-20010619/CHANGES --- mbuffer-20010528/CHANGES Mon May 28 15:24:19 2001 +++ mbuffer-20010619/CHANGES Tue Jun 19 09:55:17 2001 @@ -1,3 +1,8 @@ +20010619: +- multi-volume support is now enabled by default +- minor docu updates +- fix for configure to work on Solaris 5.1 + 20010528: - semantic fix for option -p to be consistend with buffer - bugfix: for dropped blocks in multi-volumen code diff -Naur mbuffer-20010528/README mbuffer-20010619/README --- mbuffer-20010528/README Fri May 18 13:52:04 2001 +++ mbuffer-20010619/README Tue Jun 19 10:16:21 2001 @@ -1,5 +1,5 @@ -m(easuring)buffer version 20010430 -================================== +m(easuring) buffer +================== AUTHOR: Thomas Maier-Komor e-mail: software@maier-komor.de @@ -16,9 +16,24 @@ # display of i/o speed # optional use of memory mapped i/o for huge buffers # multithreaded instead of sharedmemory ipc +# multi-volume support # compatible command-line options # --? bugs to hunt ?-- :-(( + +INSTALL: +======== +To install run +# ./configure +with the options you desire. +To get a list of the possible options, run: +# ./configure --help +HINT: for solaris workstations you need to run: +# ./configure --host sparc-sun-solaris +Then just do a: +# make; make install + + EXPERIMENTAL: ============= This version of mbuffer includes new code which is experimental. @@ -27,6 +42,11 @@ multi-volume usage on the output stream. Please test it and send comments and bug reports if you are interested that such a thing should be included. +(currently no experimental code is included - + coming soon: networking code) + +In this version there is no experimental code. Soon networking +stuff will be added here... TESTING: @@ -49,3 +69,9 @@ ===== # fix: warnings for tru64 compilation # fix: unknown bugs + + +FEEDBACK: +========= +It is always nice to get feedback. If you encounter +a problem or a bug, send me a note. diff -Naur mbuffer-20010528/acconfig.h mbuffer-20010619/acconfig.h --- mbuffer-20010528/acconfig.h Fri May 18 13:32:59 2001 +++ mbuffer-20010619/acconfig.h Tue Jun 12 11:00:52 2001 @@ -10,4 +10,16 @@ /* Undefine if you want asserts enabled. */ #undef NDEBUG +/* multi-support is enabled by default now */ +#undef MULTIVOLUME + +/* needed to include experimental code */ +#undef EXPERIMENTAL + +/* Define if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define as the return type of signal handlers (int or void). */ +#undef RETSIGTYPE + #endif diff -Naur mbuffer-20010528/config.h.in mbuffer-20010619/config.h.in --- mbuffer-20010528/config.h.in Fri May 18 13:52:05 2001 +++ mbuffer-20010619/config.h.in Tue Jun 12 11:00:52 2001 @@ -3,6 +3,9 @@ /* Define if you have a working `mmap' system call. */ #undef HAVE_MMAP +/* Define if your struct stat has st_blksize. */ +#undef HAVE_ST_BLKSIZE + /* Define as the return type of signal handlers (int or void). */ #undef RETSIGTYPE @@ -21,6 +24,18 @@ /* Undefine if you want asserts enabled. */ #undef NDEBUG +/* multi-support is enabled by default now */ +#undef MULTIVOLUME + +/* needed to include experimental code */ +#undef EXPERIMENTAL + +/* Define if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define as the return type of signal handlers (int or void). */ +#undef RETSIGTYPE + /* Define if you have the getpagesize function. */ #undef HAVE_GETPAGESIZE @@ -42,8 +57,3 @@ /* Needed for thread safe compilation */ #undef _REENTRANT -/* needed for determination of the blocksize of the output device */ -#undef HAVE_ST_BLKSIZE - -/* needed to include experimental code */ -#undef EXPERIMENTAL diff -Naur mbuffer-20010528/configure mbuffer-20010619/configure --- mbuffer-20010528/configure Mon May 28 15:24:19 2001 +++ mbuffer-20010619/configure Tue Jun 19 09:55:17 2001 @@ -15,6 +15,8 @@ ac_help="$ac_help --enable-debug enable verbose logging to console for debugging purpose" ac_help="$ac_help +--disable-multi-volume disable multi-volume support" +ac_help="$ac_help --enable-experimental enable experimental code" # Initialize some variables set by options. @@ -575,7 +577,7 @@ fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:579: checking host system type" >&5 +echo "configure:581: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -596,7 +598,7 @@ echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:600: checking target system type" >&5 +echo "configure:602: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -614,7 +616,7 @@ echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:618: checking build system type" >&5 +echo "configure:620: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -643,7 +645,7 @@ PACKAGE=mbuffer -VERSION=20010528 +VERSION=20010619 cat >> confdefs.h <&6 -echo "configure:669: checking for $ac_word" >&5 +echo "configure:671: 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 @@ -695,7 +697,7 @@ # 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:699: checking for $ac_word" >&5 +echo "configure:701: 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 @@ -746,7 +748,7 @@ # 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:750: checking for $ac_word" >&5 +echo "configure:752: 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 @@ -778,7 +780,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:782: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:784: 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. @@ -789,12 +791,12 @@ cat > conftest.$ac_ext << EOF -#line 793 "configure" +#line 795 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:800: \"$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 @@ -820,12 +822,12 @@ { 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:824: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:826: 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:829: checking whether we are using GNU C" >&5 +echo "configure:831: 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 @@ -834,7 +836,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:838: \"$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:840: \"$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 @@ -853,7 +855,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:857: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:859: 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 @@ -896,7 +898,7 @@ # 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:900: checking for a BSD compatible install" >&5 +echo "configure:902: 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 @@ -952,7 +954,7 @@ # 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:956: checking for $ac_word" >&5 +echo "configure:958: 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 @@ -987,7 +989,7 @@ # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:991: checking for $ac_word" >&5 +echo "configure:993: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1021,7 +1023,7 @@ echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6 -echo "configure:1025: checking for pthread_attr_init in -lpthread" >&5 +echo "configure:1027: checking for pthread_attr_init in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1029,7 +1031,7 @@ ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1046: \"$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 @@ -1070,14 +1072,14 @@ echo $ac_n "checking for library containing sem_init""... $ac_c" 1>&6 -echo "configure:1074: checking for library containing sem_init" >&5 +echo "configure:1076: checking for library containing sem_init" >&5 if eval "test \"`echo '$''{'ac_cv_search_sem_init'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_sem_init="no" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_sem_init="none required" else @@ -1096,10 +1098,10 @@ cat conftest.$ac_ext >&5 fi rm -f conftest* -test "$ac_cv_search_sem_init" = "no" && for i in rt; do +test "$ac_cv_search_sem_init" = "no" && for i in rt posix; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_sem_init="-l$i" break @@ -1155,12 +1157,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1159: checking return type of signal handlers" >&5 +echo "configure:1161: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1177,7 +1179,7 @@ int i; ; return 0; } EOF -if { (eval echo configure:1181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -1196,7 +1198,7 @@ echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1200: checking how to run the C preprocessor" >&5 +echo "configure:1202: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1211,13 +1213,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1223: \"$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 : @@ -1228,13 +1230,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1240: \"$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 : @@ -1245,13 +1247,13 @@ rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1257: \"$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 : @@ -1279,17 +1281,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1283: checking for $ac_hdr" >&5 +echo "configure:1285: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1295: \"$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* @@ -1318,12 +1320,12 @@ for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1322: checking for $ac_func" >&5 +echo "configure:1324: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1352: \"$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 @@ -1371,7 +1373,7 @@ done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:1375: checking for working mmap" >&5 +echo "configure:1377: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1379,7 +1381,7 @@ ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -1542,12 +1544,12 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1546: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1548: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1556,7 +1558,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1577,12 +1579,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1581: checking for ANSI C header files" >&5 +echo "configure:1583: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1590,7 +1592,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1596: \"$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* @@ -1607,7 +1609,7 @@ 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 @@ -1625,7 +1627,7 @@ 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 @@ -1646,7 +1648,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1657,7 +1659,7 @@ exit (0); } EOF -if { (eval echo configure:1661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1683,12 +1685,12 @@ for ac_func in strerror memcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1687: checking for $ac_func" >&5 +echo "configure:1689: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1717: \"$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 @@ -1739,17 +1741,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1743: checking for $ac_hdr" >&5 +echo "configure:1745: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1755: \"$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* @@ -1776,12 +1778,12 @@ done echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:1780: checking for st_blksize in struct stat" >&5 +echo "configure:1782: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1789,7 +1791,7 @@ struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:1793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -1828,6 +1830,19 @@ +# Check whether --enable-multi-volume or --disable-multi-volume was given. +if test "${enable_multi_volume+set}" = set; then + enableval="$enable_multi_volume" + : +else + cat >> confdefs.h <> 10) / diff; fprintf(Terminal,"summary: %i kB in %.1f sec - %.1f kB/sec average\n", @@ -173,20 +174,20 @@ exit(0); } -#ifdef EXPERIMENTAL +#ifdef MULTIVOLUME void requestInputVolume() { close(In); - fprintf(Terminal,"\ninsert next volume..."); - fflush(Terminal); - tcflush(fileno(Terminal),TCIFLUSH); - fgetc(Terminal); - fprintf(Terminal,"\nOK - continuing..."); + do { + fprintf(Terminal,"\ninsert next volume..."); + fflush(Terminal); + tcflush(fileno(Terminal),TCIFLUSH); + fgetc(Terminal); + if (-1 == (In = open(Infile,O_RDONLY))) + errormsg("could not reopen input: %s\n",strerror(errno)); + } while (In == -1); Multivolume--; - if (-1 == (In = open(Infile,O_RDONLY))) { - errormsg("could not reopen input: %s\n",strerror(errno)); - pthread_exit((void *)-1); - } + fprintf(Terminal,"\nOK - continuing..."); } #endif @@ -203,7 +204,7 @@ do { debugmsg("inputThread: read %i\n",num); err = read(In,Buffer[at] + num,Blocksize - num); -#ifdef EXPERIMENTAL +#ifdef MULTIVOLUME if ((!err) && (Terminal) && (Multivolume)) { requestInputVolume(); } else @@ -242,7 +243,7 @@ infomsg("inputThread: exiting..."); } -#ifdef EXPERIMENTAL +#ifdef MULTIVOLUME void requestOutputVolume() { if (!Outfile) { @@ -292,7 +293,7 @@ do { debugmsg("outputThread: write %i\n",-num); err = write(Out,Buffer[at] + num, Outsize > rest ? Outsize : rest ); -#ifdef EXPERIMENTAL +#ifdef MULTIVOLUME if ((-1 == err) && (Terminal) && ((errno == ENOMEM) || (errno == ENOSPC))) { requestOutputVolume(); continue; @@ -347,7 +348,7 @@ "-p : start writing after buffer has been filled %%\n" "-i : use for input\n" "-o : use for output\n" -#ifdef EXPERIMENTAL +#ifdef MULTIVOLUME "-n : volumes for input\n" #endif "-T : as -t but uses as buffer\n" @@ -428,7 +429,7 @@ } else if (!argcheck("-u",argv,&c)) { Pause = (atoi(argv[c])) ? (atoi(argv[c])) : Pause; debugmsg("Pause set to %i\n",Pause); -#ifdef EXPERIMENTAL +#ifdef MULTIVOLUME } else if (!argcheck("-n",argv,&c)) { Multivolume = atoi(argv[c]) - 1; if (Multivolume <= 0) @@ -489,7 +490,7 @@ Blocksize = totalmem / Numblocks; infomsg("blocksize set to %i\n",Blocksize); } -#ifdef EXPERIMENTAL +#ifdef MULTIVOLUME /* multi volume input consistency checking */ if ((Multivolume) && (!Infile)) fatal("multi volume support for input needs an explicit given input device (option -i)\n");