summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MANIFEST4
-rwxr-xr-xc++/configure242
-rw-r--r--c++/configure.in41
-rw-r--r--c++/src/H5FaccProp.cpp42
-rw-r--r--c++/src/H5FaccProp.h8
-rwxr-xr-xconfigure465
-rw-r--r--configure.in65
-rwxr-xr-xfortran/configure270
-rw-r--r--fortran/configure.in65
-rw-r--r--fortran/src/H5_f.c1
-rw-r--r--fortran/src/H5f90global.f904
-rw-r--r--src/H5F.c1
-rw-r--r--src/H5FD.c4
-rw-r--r--src/H5FDstream.c1154
-rw-r--r--src/H5FDstream.h101
-rw-r--r--src/H5config.h.in15
-rw-r--r--src/Makefile.in4
-rw-r--r--src/hdf5.h1
-rw-r--r--test/Makefile.in7
-rw-r--r--test/stream_test.c494
-rw-r--r--tools/h5dump/h5dump.c6
-rw-r--r--tools/lib/h5tools.c19
-rw-r--r--tools/testfiles/tnofilename.ddl2
23 files changed, 23 insertions, 2992 deletions
diff --git a/MANIFEST b/MANIFEST
index 321b19d..8de8b9c 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1198,8 +1198,6 @@
./src/H5FDsrb.h
./src/H5FDstdio.c
./src/H5FDstdio.h
-./src/H5FDstream.c
-./src/H5FDstream.h
./src/H5FL.c
./src/H5FLprivate.h
./src/H5FO.c
@@ -1390,8 +1388,6 @@
./test/srb_read.c
./test/srb_write.c
./test/stab.c
-./test/stream_test.c
-./test/tarray.c
./test/tarrold.h5
./test/tattr.c
./test/tbogus.h5
diff --git a/c++/configure b/c++/configure
index 948dd45..ede5834 100755
--- a/c++/configure
+++ b/c++/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From c++/configure.in Id: configure.in 14263 2007-11-16 03:36:25Z hdftest .
+# From c++/configure.in Id: configure.in 14314 2007-12-02 23:53:13Z hdftest .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for HDF5 C++ 1.6.6-post2.
#
@@ -1456,7 +1456,6 @@ Optional Features:
[default=no]
--enable-linux-lfs Enable support for large (64-bit) files on Linux.
[default=check]
- --enable-stream-vfd Build the Stream Virtual File Driver [default=no]
--enable-hl Enable the high level library [default=yes]
Optional Packages:
@@ -5505,7 +5504,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 5508 "configure"' > conftest.$ac_ext
+ echo '#line 5507 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -6062,7 +6061,7 @@ chmod -w .
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
compiler_c_o=no
-if { (eval echo configure:6065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+if { (eval echo configure:6064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
if test -s out/conftest.err; then
@@ -7937,7 +7936,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 7940 "configure"
+#line 7939 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -8035,7 +8034,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 8038 "configure"
+#line 8037 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10846,237 +10845,6 @@ _ACEOF
fi
-{ echo "$as_me:$LINENO: checking for Stream Virtual File Driver support" >&5
-echo $ECHO_N "checking for Stream Virtual File Driver support... $ECHO_C" >&6; }
-# Check whether --enable-stream-vfd was given.
-if test "${enable_stream_vfd+set}" = set; then
- enableval=$enable_stream_vfd; STREAM_VFD=$enableval
-fi
-
-
-if test "$STREAM_VFD" = "yes"; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-
-for ac_header in netinet/tcp.h sys/filio.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
- # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## -------------------------------- ##
-## Report this to help@hdfgroup.org ##
-## -------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STREAM 1
-_ACEOF
-
-
- { echo "$as_me:$LINENO: checking if socklen_t is defined" >&5
-echo $ECHO_N "checking if socklen_t is defined... $ECHO_C" >&6; }
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-int
-main ()
-{
-socklen_t foo; return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SOCKLEN_T 1
-_ACEOF
-
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- { echo "$as_me:$LINENO: result: not configured" >&5
-echo "${ECHO_T}not configured" >&6; }
-fi
-
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
diff --git a/c++/configure.in b/c++/configure.in
index a271fdf..c330206 100644
--- a/c++/configure.in
+++ b/c++/configure.in
@@ -672,47 +672,6 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
fi
dnl ----------------------------------------------------------------------
-dnl Should the Stream Virtual File Driver be compiled in ?
-dnl
-AC_MSG_CHECKING([for Stream Virtual File Driver support])
-AC_ARG_ENABLE([stream-vfd],
- [AC_HELP_STRING([--enable-stream-vfd],
- [Build the Stream Virtual File Driver
- [default=no]])],
- [STREAM_VFD=$enableval])
-
-if test "$STREAM_VFD" = "yes"; then
- AC_MSG_RESULT([yes])
- AC_CHECK_HEADERS([netinet/tcp.h sys/filio.h])
- AC_DEFINE([HAVE_STREAM], [1],
- [Define if the stream virtual file driver should be compiled])
-
- dnl Check if 'socklen_t' available
- AC_MSG_CHECKING([if socklen_t is defined])
- AC_TRY_COMPILE([
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
- ],
- [socklen_t foo; return 0;],
- AC_DEFINE([HAVE_SOCKLEN_T], 1,
- [Define if \`socklen_t' is defined])
- AC_MSG_RESULT([yes]),
- AC_MSG_RESULT([no])
- )
-else
- AC_MSG_RESULT([not configured])
-fi
-
-dnl ----------------------------------------------------------------------
dnl Checks for header files.
dnl
diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp
index 9dd115c..7c9b33a 100644
--- a/c++/src/H5FaccProp.cpp
+++ b/c++/src/H5FaccProp.cpp
@@ -292,48 +292,6 @@ void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& ra
setSplit( meta_plist, raw_plist, meta_ext.c_str(), raw_ext.c_str() );
}
-#ifdef H5_HAVE_STREAM // for Stream Virtual File Driver
-//--------------------------------------------------------------------------
-// Function: FileAccPropList::getStream
-///\brief Retrieves the streaming I/O driver settings
-///\return The streaming I/O file access property list structure
-/// For detail on this structure, please refer to
-/// <A HREF="../RM_H5P.html#Property-SetFaplStream">../RM_H5P.html#Property-SetFaplStream</A>
-///\exception H5::PropListIException
-// Programmer: Binh-Minh Ribler - April, 2004
-//--------------------------------------------------------------------------
-H5FD_stream_fapl_t FileAccPropList::getStream() const
-{
- H5FD_stream_fapl_t fapl;
- herr_t ret_value = H5Pget_fapl_stream(id, &fapl);
- if( ret_value < 0 )
- {
- throw PropListIException("FileAccPropList::getStream", "H5Pget_fapl_stream failed");
- }
- return(fapl);
-}
-
-//--------------------------------------------------------------------------
-// Function: FileAccPropList::setStream
-///\brief Modifies this file access property list to use the Stream
-/// driver.
-///\param fapl - IN: The streaming I/O file access property list
-///\exception H5::PropListIException
-///\par Description
-/// For detail on \a fapl, please refer to
-/// <A HREF="../RM_H5P.html#Property-SetFaplStream">../RM_H5P.html#Property-SetFaplStream</A>
-// Programmer: Binh-Minh Ribler - April, 2004
-//--------------------------------------------------------------------------
-void FileAccPropList::setStream(H5FD_stream_fapl_t &fapl) const
-{
- herr_t ret_value = H5Pset_fapl_stream (id, &fapl);
- if( ret_value < 0 )
- {
- throw PropListIException("FileAccPropList::setStream", "H5Pset_fapl_stream failed");
- }
-}
-#endif // Stream Virtual File Driver
-
//--------------------------------------------------------------------------
// Function: FileAccPropList::getSieveBufSize
///\brief Returns the current settings for the data sieve buffer size
diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h
index 7f133bb..5a0a14f 100644
--- a/c++/src/H5FaccProp.h
+++ b/c++/src/H5FaccProp.h
@@ -67,14 +67,6 @@ class H5_DLLCPP FileAccPropList : public PropList {
void setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist,
const H5std_string& meta_ext, const H5std_string& raw_ext ) const;
-#ifdef H5_HAVE_STREAM // for Stream Virtual File Driver
- // Modifies this file access property list to use the Stream driver.
- void setStream(H5FD_stream_fapl_t &fapl) const;
-
- // Retrieves the streaming I/O driver settings
- H5FD_stream_fapl_t getStream() const;
-#endif
-
// Sets the maximum size of the data sieve buffer.
void setSieveBufSize(size_t bufsize) const;
diff --git a/configure b/configure
index 3850a3a..08ceebe 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Id: configure.in 14263 2007-11-16 03:36:25Z hdftest .
+# From configure.in Id: configure.in 14314 2007-12-02 23:53:13Z hdftest .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for HDF5 1.6.6-post2.
#
@@ -1508,7 +1508,6 @@ Optional Features:
disabling this function, the library will replace it
with stat to get the correct file size.
[default=yes]
- --enable-stream-vfd Build the Stream Virtual File Driver [default=yes]
--enable-filters=all Turn on all internal I/O filters. One may also
specify a comma-separated list of filters or the
word no. The default is all internal I/O filters.
@@ -5290,7 +5289,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 5293 "configure"' > conftest.$ac_ext
+ echo '#line 5292 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5847,7 +5846,7 @@ chmod -w .
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
compiler_c_o=no
-if { (eval echo configure:5850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+if { (eval echo configure:5849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
if test -s out/conftest.err; then
@@ -7722,7 +7721,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 7725 "configure"
+#line 7724 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -7820,7 +7819,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 7823 "configure"
+#line 7822 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -36114,457 +36113,6 @@ echo "${ECHO_T}no" >&6; }
fi
fi
-{ echo "$as_me:$LINENO: checking for Stream Virtual File Driver support" >&5
-echo $ECHO_N "checking for Stream Virtual File Driver support... $ECHO_C" >&6; }
-# Check whether --enable-stream-vfd was given.
-if test "${enable_stream_vfd+set}" = set; then
- enableval=$enable_stream_vfd; STREAM_VFD=$enableval
-else
- STREAM_VFD=yes
-fi
-
-
-if test "$STREAM_VFD" != "yes"; then
- { echo "$as_me:$LINENO: result: not configured" >&5
-echo "${ECHO_T}not configured" >&6; }
-fi
-
-if test "$STREAM_VFD" = "yes" -a "X${enable_parallel}" = "Xyes"; then
- { echo "$as_me:$LINENO: result: not supported in parallel" >&5
-echo "${ECHO_T}not supported in parallel" >&6; }
- echo " warning! Stream-VFD is not supported in parallel"
- STREAM_VFD=no
-fi
-if test "$STREAM_VFD" = "yes" -a "X${PARALLEL}" != "X"; then
- { echo "$as_me:$LINENO: result: not supported in parallel" >&5
-echo "${ECHO_T}not supported in parallel" >&6; }
- echo " warning! Stream-VFD is not supported when a parallel compiler is being used"
- STREAM_VFD=no
-fi
-
-if test "$STREAM_VFD" = "yes"; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-for ac_header in netinet/in.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
- # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## -------------------------------- ##
-## Report this to help@hdfgroup.org ##
-## -------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_header in netinet/tcp.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <netinet/in.h>
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_header in sys/filio.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
- # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## -------------------------------- ##
-## Report this to help@hdfgroup.org ##
-## -------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STREAM 1
-_ACEOF
-
-
- { echo "$as_me:$LINENO: checking if socklen_t is defined" >&5
-echo $ECHO_N "checking if socklen_t is defined... $ECHO_C" >&6; }
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-int
-main ()
-{
-socklen_t foo; return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SOCKLEN_T 1
-_ACEOF
-
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-
USE_FILTER_SHUFFLE="no"
USE_FILTER_FLETCHER32="no"
@@ -38484,9 +38032,6 @@ fi
PRINT_N " SRB"
IF_YES_NO "$SRB"
-PRINT_N " Stream VFD"
-IF_ENABLED_DISABLED "$STREAM_VFD"
-
PRINT_N " Threadsafety"
IF_ENABLED_DISABLED "$THREADSAFE"
diff --git a/configure.in b/configure.in
index 1f69072..d5e72b5 100644
--- a/configure.in
+++ b/configure.in
@@ -2148,68 +2148,6 @@ fi
fi
dnl ----------------------------------------------------------------------
-dnl Should the Stream Virtual File Driver be compiled in ?
-dnl
-AC_MSG_CHECKING([for Stream Virtual File Driver support])
-AC_ARG_ENABLE([stream-vfd],
- [AC_HELP_STRING([--enable-stream-vfd],
- [Build the Stream Virtual File Driver
- [default=yes]])],
- [STREAM_VFD=$enableval],
- [STREAM_VFD=yes])
-
-dnl If the user explicitly disabled Stream VFD, say so.
-if test "$STREAM_VFD" != "yes"; then
- AC_MSG_RESULT([not configured])
-fi
-
-dnl If the stream VFD is being used with parallel, disable it.
-dnl Using both stream VFD and parallel is a weird case and seems to cause errors on some
-dnl platforms.
-if test "$STREAM_VFD" = "yes" -a "X${enable_parallel}" = "Xyes"; then
- AC_MSG_RESULT([not supported in parallel])
- echo " warning! Stream-VFD is not supported in parallel"
- STREAM_VFD=no
-fi
-if test "$STREAM_VFD" = "yes" -a "X${PARALLEL}" != "X"; then
- AC_MSG_RESULT([not supported in parallel])
- echo " warning! Stream-VFD is not supported when a parallel compiler is being used"
- STREAM_VFD=no
-fi
-
-dnl Otherwise, use Stream VFD.
-if test "$STREAM_VFD" = "yes"; then
- AC_MSG_RESULT([yes])
- AC_CHECK_HEADERS([netinet/in.h])
- AC_CHECK_HEADERS([netinet/tcp.h], , , [#include <netinet/in.h>])
- AC_CHECK_HEADERS([sys/filio.h])
- AC_DEFINE([HAVE_STREAM], [1],
- [Define if the stream virtual file driver should be compiled])
-
- dnl Check if 'socklen_t' available
- AC_MSG_CHECKING([if socklen_t is defined])
- AC_TRY_COMPILE([
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
- ],
- [socklen_t foo; return 0;],
- AC_DEFINE([HAVE_SOCKLEN_T], 1, [Define if `socklen_t' is defined])
- AC_MSG_RESULT([yes]),
- AC_MSG_RESULT([no])
- )
-fi
-
-
-dnl ----------------------------------------------------------------------
dnl Turn on internal I/O filters by setting macros in header files
dnl Internal I/O filters are contained entirely within the library and do
dnl not depend on external headers or libraries. The shuffle filter is
@@ -2766,9 +2704,6 @@ fi
PRINT_N " SRB"
IF_YES_NO "$SRB"
-PRINT_N " Stream VFD"
-IF_ENABLED_DISABLED "$STREAM_VFD"
-
PRINT_N " Threadsafety"
IF_ENABLED_DISABLED "$THREADSAFE"
diff --git a/fortran/configure b/fortran/configure
index daeb78b..13d463a 100755
--- a/fortran/configure
+++ b/fortran/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From fortran/configure.in Id: configure.in 14263 2007-11-16 03:36:25Z hdftest .
+# From fortran/configure.in Id: configure.in 14314 2007-12-02 23:53:13Z hdftest .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for HDF5 Fortran 1.6.6-post2.
#
@@ -1482,7 +1482,6 @@ Optional Features:
--enable-parallel Search for MPI-IO and MPI support files
--enable-gpfs Enable GPFS hints for the MPI/POSIX file driver.
[default=no]
- --enable-stream-vfd Build the Stream Virtual File Driver [default=no]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -5016,7 +5015,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 5019 "configure"' > conftest.$ac_ext
+ echo '#line 5018 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5573,7 +5572,7 @@ chmod -w .
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
compiler_c_o=no
-if { (eval echo configure:5576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+if { (eval echo configure:5575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
if test -s out/conftest.err; then
@@ -7448,7 +7447,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 7451 "configure"
+#line 7450 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -7546,7 +7545,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 7549 "configure"
+#line 7548 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12015,265 +12014,6 @@ esac
rm -f conftest core core.* *.core conftest.o conftest.c dummy.o $ac_clean_files
-{ echo "$as_me:$LINENO: checking for Stream Virtual File Driver support" >&5
-echo $ECHO_N "checking for Stream Virtual File Driver support... $ECHO_C" >&6; }
-# Check whether --enable-stream-vfd was given.
-if test "${enable_stream_vfd+set}" = set; then
- enableval=$enable_stream_vfd; STREAM_VFD=$enableval
-fi
-
-
-if test "$STREAM_VFD" != "yes"; then
- { echo "$as_me:$LINENO: result: not configured" >&5
-echo "${ECHO_T}not configured" >&6; }
-fi
-
-if test "$STREAM_VFD" = "yes" -a "X${enable_parallel}" = "Xyes"; then
- { echo "$as_me:$LINENO: result: not supported in parallel" >&5
-echo "${ECHO_T}not supported in parallel" >&6; }
- echo " warning! Stream-VFD is not supported in parallel"
- STREAM_VFD=no
-fi
-if test "$STREAM_VFD" = "yes" -a "X${PARALLEL}" != "X"; then
- { echo "$as_me:$LINENO: result: not supported in parallel" >&5
-echo "${ECHO_T}not supported in parallel" >&6; }
- echo " warning! Stream-VFD is not supported when a parallel compiler is being used"
- STREAM_VFD=no
-fi
-
-if test "$STREAM_VFD" = "yes"; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-for ac_header in netinet/tcp.h sys/filio.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-else
- # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## -------------------------------- ##
-## Report this to help@hdfgroup.org ##
-## -------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STREAM 1
-_ACEOF
-
-
- { echo "$as_me:$LINENO: checking if socklen_t is defined" >&5
-echo $ECHO_N "checking if socklen_t is defined... $ECHO_C" >&6; }
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-int
-main ()
-{
-socklen_t foo; return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SOCKLEN_T 1
-_ACEOF
-
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
- ac_ext=f90
-ac_compile='${F9X-f90} -c $FFLAGS conftest.$ac_ext 1>&5'
-ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_f9x_cross
-
-fi
-
H5_VERSION="`cut -d' ' -f3 $srcdir/../README.txt | head -1`"
diff --git a/fortran/configure.in b/fortran/configure.in
index 48b08c2..1aa1417 100644
--- a/fortran/configure.in
+++ b/fortran/configure.in
@@ -1086,71 +1086,6 @@ dnl Some cleanup stuff
rm -f conftest core core.* *.core conftest.o conftest.c dummy.o $ac_clean_files
dnl ----------------------------------------------------------------------
-dnl Should the Stream Virtual File Driver be compiled in ?
-dnl
-AC_MSG_CHECKING([for Stream Virtual File Driver support])
-AC_ARG_ENABLE([stream-vfd],
- [AC_HELP_STRING([--enable-stream-vfd],
- [Build the Stream Virtual File Driver
- [default=no]])],
- [STREAM_VFD=$enableval])
-
-dnl If the Stream VFD should not be used, say so.
-if test "$STREAM_VFD" != "yes"; then
- AC_MSG_RESULT([not configured])
-fi
-
-dnl If the stream VFD is being used with parallel, disable it.
-dnl Using both stream VFD and parallel is a weird case and seems to cause errors on some
-dnl platforms.
-if test "$STREAM_VFD" = "yes" -a "X${enable_parallel}" = "Xyes"; then
- AC_MSG_RESULT([not supported in parallel])
- echo " warning! Stream-VFD is not supported in parallel"
- STREAM_VFD=no
-fi
-if test "$STREAM_VFD" = "yes" -a "X${PARALLEL}" != "X"; then
- AC_MSG_RESULT([not supported in parallel])
- echo " warning! Stream-VFD is not supported when a parallel compiler is being used"
- STREAM_VFD=no
-fi
-
-dnl Otherwise, use Stream VFD.
-if test "$STREAM_VFD" = "yes"; then
- AC_MSG_RESULT([yes])
-
- dnl Change to the C language
- AC_LANG_C
- AC_CHECK_HEADERS([netinet/tcp.h sys/filio.h])
- AC_DEFINE([HAVE_STREAM], [1],
- [Define if the stream virtual file driver should be compiled])
-
- dnl Check if 'socklen_t' available
- AC_MSG_CHECKING([if socklen_t is defined])
- AC_TRY_COMPILE([
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
- ],
- [socklen_t foo; return 0;],
- AC_DEFINE([HAVE_SOCKLEN_T], 1,
- [Define if \`socklen_t' is defined])
- AC_MSG_RESULT([yes]),
- AC_MSG_RESULT([no])
- )
-
- dnl Change back to the Fortran 90 language
- AC_LANG_FORTRAN9X
-fi
-
-dnl ----------------------------------------------------------------------
dnl Set some variables for general configuration information to be saved
dnl and installed with the libraries.
dnl
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index 10433b8..a963f1e 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -292,7 +292,6 @@ nh5init_flags_c( int_f *h5d_flags, int_f *h5e_flags, int_f *h5f_flags,
h5fd_hid_flags[4] = H5FD_MULTI;
h5fd_hid_flags[5] = H5FD_SEC2;
h5fd_hid_flags[6] = H5FD_STDIO;
- h5fd_hid_flags[7] = H5FD_STREAM;
/*
* H5G flags
diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90
index e8f4c5c..43006aa 100644
--- a/fortran/src/H5f90global.f90
+++ b/fortran/src/H5f90global.f90
@@ -315,7 +315,7 @@
!
! H5FD file drivers flags declaration
!
- INTEGER, PARAMETER :: H5FD_HID_FLAGS_LEN = 8
+ INTEGER, PARAMETER :: H5FD_HID_FLAGS_LEN = 7
INTEGER H5FD_hid_flags(H5FD_HID_FLAGS_LEN)
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$ ATTRIBUTES DLLEXPORT :: /H5FD_HID_FLAGS/
@@ -329,7 +329,6 @@
INTEGER(HID_T) :: H5FD_MULTI_F
INTEGER(HID_T) :: H5FD_SEC2_F
INTEGER(HID_T) :: H5FD_STDIO_F
- INTEGER(HID_T) :: H5FD_STREAM_F
EQUIVALENCE(H5FD_hid_flags(1), H5FD_CORE_F)
EQUIVALENCE(H5FD_hid_flags(2), H5FD_FAMILY_F)
@@ -338,7 +337,6 @@
EQUIVALENCE(H5FD_hid_flags(5), H5FD_MULTI_F)
EQUIVALENCE(H5FD_hid_flags(6), H5FD_SEC2_F)
EQUIVALENCE(H5FD_hid_flags(7), H5FD_STDIO_F)
- EQUIVALENCE(H5FD_hid_flags(8), H5FD_STREAM_F)
!
diff --git a/src/H5F.c b/src/H5F.c
index 5fde395..4a7caa6 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -44,7 +44,6 @@
#include "H5FDsec2.h" /*Posix unbuffered I/O */
#include "H5FDsrb.h" /*SRB I/O */
#include "H5FDstdio.h" /* Standard C buffered I/O */
-#include "H5FDstream.h" /*in-memory files streamed via sockets */
/* Struct only used by functions H5F_get_objects and H5F_get_objects_cb */
typedef struct H5F_olist_t {
diff --git a/src/H5FD.c b/src/H5FD.c
index c3705f2..9b2c21f 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -45,7 +45,6 @@
#include "H5FDsec2.h" /* POSIX unbuffered file I/O */
#include "H5FDsrb.h" /* Remote access using SRB */
#include "H5FDstdio.h" /* Standard C buffered I/O */
-#include "H5FDstream.h" /* In-memory files streamed via sockets */
#include "H5FLprivate.h" /* Free lists */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
@@ -176,9 +175,6 @@ H5FD_term_interface(void)
H5FD_mpio_term();
H5FD_mpiposix_term();
#endif /* H5_HAVE_PARALLEL */
-#ifdef H5_HAVE_STREAM
- H5FD_stream_term();
-#endif
} /* end if */
} else {
H5I_destroy_group(H5I_VFL);
diff --git a/src/H5FDstream.c b/src/H5FDstream.c
deleted file mode 100644
index 1e0fa42..0000000
--- a/src/H5FDstream.c
+++ /dev/null
@@ -1,1154 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Copyright © 2000 The author.
- * The author prefers this code not be used for military purposes.
- *
- *
- * Author: Thomas Radke <tradke@aei-potsdam.mpg.de>
- * Tuesday, September 12, 2000
- *
- * Purpose: This code provides the Stream Virtual File Driver.
- * It is very much based on the core VFD which keeps an
- * entire HDF5 data file to be processed in main memory.
- * In addition to that, the memory image of the file is
- * read from/written to a socket during an open/flush operation.
- *
- * Modifications:
- * Thomas Radke, Thursday, October 26, 2000
- * Added support for Windows.
- * Catch SIGPIPE on an open socket.
- *
- */
-
-/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5FD_stream_init_interface
-
-
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDstream.h" /* Stream file driver */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
-
-/* Only build this driver if it was configured with --with-Stream-VFD */
-#ifdef H5_HAVE_STREAM
-
-#ifdef H5FD_STREAM_HAVE_UNIX_SOCKETS
-#ifdef H5_HAVE_SYS_TYPES_H
-#include <sys/types.h> /* socket stuff */
-#endif
-#ifdef H5_HAVE_SYS_SOCKET_H
-#include <sys/socket.h> /* socket stuff */
-#endif
-#include <netdb.h> /* gethostbyname */
-#include <netinet/in.h> /* socket stuff */
-#ifdef H5_HAVE_NETINET_TCP_H
-#include <netinet/tcp.h> /* socket stuff */
-#endif
-#ifdef H5_HAVE_SYS_FILIO_H
-#include <sys/filio.h> /* socket stuff */
-#endif
-#endif
-
-#ifndef H5_HAVE_SOCKLEN_T
-typedef int socklen_t;
-#endif
-
-/* Some useful macros */
-#ifdef MIN
-#undef MIN
-#endif
-#ifdef MAX
-#undef MAX
-#endif
-#define MIN(x,y) ((x) < (y) ? (x) : (y))
-#define MAX(x,y) ((x) > (y) ? (x) : (y))
-
-/* Uncomment this to switch on debugging output */
-/* #define DEBUG 1 */
-
-/* Define some socket stuff which is different for UNIX and Windows */
-#ifdef H5FD_STREAM_HAVE_UNIX_SOCKETS
-#define H5FD_STREAM_CLOSE_SOCKET(a) close(a)
-#define H5FD_STREAM_IOCTL_SOCKET(a, b, c) ioctl(a, b, c)
-#define H5FD_STREAM_ERROR_CHECK(rc) ((rc) < 0)
-#else
-#define H5FD_STREAM_CLOSE_SOCKET(a) closesocket (a)
-#define H5FD_STREAM_IOCTL_SOCKET(a, b, c) ioctlsocket (a, b, (u_long *) (c))
-#define H5FD_STREAM_ERROR_CHECK(rc) ((rc) == (SOCKET) (SOCKET_ERROR))
-#endif
-
-
-/* The driver identification number, initialized at runtime */
-static hid_t H5FD_STREAM_g = 0;
-
-/*
- * The description of a file belonging to this driver. The `eoa' and `eof'
- * determine the amount of hdf5 address space in use and the high-water mark
- * of the file (the current size of the underlying memory).
- */
-typedef struct H5FD_stream_t
-{
- H5FD_t pub; /* public stuff, must be first */
- H5FD_stream_fapl_t fapl; /* file access property list */
- unsigned char *mem; /* the underlying memory */
- haddr_t eoa; /* end of allocated region */
- haddr_t eof; /* current allocated size */
- H5FD_STREAM_SOCKET_TYPE socket; /* socket to write / read from */
- hbool_t dirty; /* flag indicating unflushed data */
- hbool_t internal_socket; /* flag indicating an internal socket */
-} H5FD_stream_t;
-
-/* Allocate memory in multiples of this size (in bytes) by default */
-#define H5FD_STREAM_INCREMENT 8192
-
-/* default backlog argument for listen call */
-#define H5FD_STREAM_BACKLOG 1
-
-/* number of successive ports to hunt for until bind(2) succeeds
- (default 0 means no port hunting - only try the one given in the filename) */
-#define H5FD_STREAM_MAXHUNT 0
-
-/* default file access property list */
-static const H5FD_stream_fapl_t default_fapl =
-{
- H5FD_STREAM_INCREMENT, /* address space allocation blocksize */
- H5FD_STREAM_INVALID_SOCKET, /* no external socket descriptor */
- TRUE, /* enable I/O on socket */
- H5FD_STREAM_BACKLOG, /* default backlog for listen(2) */
- NULL, /* do not broadcast received files */
- NULL, /* argument to READ broadcast routine */
- H5FD_STREAM_MAXHUNT, /* default number of ports to hunt */
- 0 /* unknown port for unbound socket */
-};
-
-/*
- * These macros check for overflow of various quantities. These macros
- * assume that file_offset_t is signed and haddr_t and size_t are unsigned.
- *
- * ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
- * is too large to be represented by the second argument
- * of the file seek function.
- *
- * SIZE_OVERFLOW: Checks whether a buffer size of type `hsize_t' is too
- * large to be represented by the `size_t' type.
- *
- * REGION_OVERFLOW: Checks whether an address and size pair describe data
- * which can be addressed entirely in memory.
- */
-#ifdef H5_HAVE_LSEEK64
-# define file_offset_t off64_t
-#else
-# define file_offset_t off_t
-#endif
-#define MAXADDR (((haddr_t)1<<(8*sizeof(file_offset_t)-1))-1)
-#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || \
- ((A) & ~(haddr_t)MAXADDR))
-#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
-#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
- HADDR_UNDEF==(A)+(Z) || \
- (size_t)((A)+(Z))<(size_t)(A))
-
-/* Function prototypes */
-static void *H5FD_stream_fapl_get (H5FD_t *_stream);
-static H5FD_t *H5FD_stream_open (const char *name, unsigned flags,
- hid_t fapl_id, haddr_t maxaddr);
-static herr_t H5FD_stream_flush (H5FD_t *_stream, hid_t dxpl_id, unsigned closing);
-static herr_t H5FD_stream_close (H5FD_t *_stream);
-static herr_t H5FD_stream_query(const H5FD_t *_f1, unsigned long *flags);
-static haddr_t H5FD_stream_get_eoa (H5FD_t *_stream);
-static herr_t H5FD_stream_set_eoa (H5FD_t *_stream, haddr_t addr);
-static haddr_t H5FD_stream_get_eof (H5FD_t *_stream);
-static herr_t H5FD_stream_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
-static herr_t H5FD_stream_read (H5FD_t *_stream, H5FD_mem_t type,
- hid_t fapl_id, haddr_t addr,
- size_t size, void *buf);
-static herr_t H5FD_stream_write (H5FD_t *_stream, H5FD_mem_t type,
- hid_t fapl_id, haddr_t addr,
- size_t size, const void *buf);
-
-/* The Stream VFD's class information structure */
-static const H5FD_class_t H5FD_stream_g = {
- "stream", /*name */
- MAXADDR, /*maxaddr */
- H5F_CLOSE_WEAK, /*fc_degree */
- NULL, /*sb_size */
- NULL, /*sb_encode */
- NULL, /*sb_decode */
- sizeof (H5FD_stream_fapl_t), /*fapl_size */
- H5FD_stream_fapl_get, /*fapl_get */
- NULL, /*fapl_copy */
- NULL, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_stream_open, /*open */
- H5FD_stream_close, /*close */
- NULL, /*cmp */
- H5FD_stream_query, /*query */
- NULL, /*alloc */
- NULL, /*free */
- H5FD_stream_get_eoa, /*get_eoa */
- H5FD_stream_set_eoa, /*set_eoa */
- H5FD_stream_get_eof, /*get_eof */
- H5FD_stream_get_handle, /*get_handle */
- H5FD_stream_read, /*read */
- H5FD_stream_write, /*write */
- H5FD_stream_flush, /*flush */
- NULL, /*lock */
- NULL, /*unlock */
- H5FD_FLMAP_SINGLE /*fl_map */
-};
-
-
-/*--------------------------------------------------------------------------
-NAME
- H5FD_stream_init_interface -- Initialize interface-specific information
-USAGE
- herr_t H5FD_stream_init_interface()
-
-RETURNS
- Non-negative on success/Negative on failure
-DESCRIPTION
- Initializes any interface-specific data or routines. (Just calls
- H5FD_stream_init currently).
-
---------------------------------------------------------------------------*/
-static herr_t
-H5FD_stream_init_interface(void)
-{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_stream_init_interface)
-
- FUNC_LEAVE_NOAPI(H5FD_stream_init())
-} /* H5FD_stream_init_interface() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_stream_init
- *
- * Purpose: Initialize this driver by registering it with the library.
- *
- * Return: Success: The driver ID for the Stream driver.
- * Failure: Negative.
- *
- * Programmer: Thomas Radke
- * Tuesday, September 12, 2000
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-hid_t H5FD_stream_init (void)
-{
- hid_t ret_value=H5FD_STREAM_g; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_stream_init, FAIL)
-
- if (H5I_VFL != H5Iget_type (H5FD_STREAM_g)) {
- H5FD_STREAM_g = H5FD_register (&H5FD_stream_g,sizeof(H5FD_class_t));
-
- /* set the process signal mask to ignore SIGPIPE signals */
- /* NOTE: Windows doesn't know SIGPIPE signals that's why the #ifdef */
-#ifdef SIGPIPE
- if (signal (SIGPIPE, SIG_IGN) == SIG_ERR)
- fprintf (stderr, "Stream VFD warning: failed to set the process signal "
- "mask to ignore SIGPIPE signals\n");
-#endif
- }
-
- /* Set return value */
- ret_value=H5FD_STREAM_g;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-
-/*---------------------------------------------------------------------------
- * Function: H5FD_stream_term
- *
- * Purpose: Shut down the VFD
- *
- * Return: <none>
- *
- * Programmer: Quincey Koziol
- * Friday, Jan 30, 2004
- *
- * Modification:
- *
- *---------------------------------------------------------------------------
- */
-void
-H5FD_stream_term(void)
-{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_stream_term)
-
- /* Reset VFL ID */
- H5FD_STREAM_g=0;
-
- FUNC_LEAVE_NOAPI_VOID
-} /* end H5FD_stream_term() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_stream
- *
- * Purpose: Modify the file access property list to use the Stream
- * driver defined in this source file. The INCREMENT specifies
- * how much to grow the memory each time we need more.
- * If a valid socket argument is given this will be used
- * by the driver instead of parsing the 'hostname:port' filename
- * and opening a socket internally.
- *
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Thomas Radke
- * Tuesday, September 12, 2000
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t H5Pset_fapl_stream (hid_t fapl_id, H5FD_stream_fapl_t *fapl)
-{
- H5FD_stream_fapl_t user_fapl;
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_API(H5Pset_fapl_stream, FAIL)
- H5TRACE2 ("e", "ix", fapl_id, fapl);
-
- if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
- HGOTO_ERROR (H5E_PLIST, H5E_BADTYPE, FAIL, "not a fapl")
-
- if (fapl) {
- if (! fapl->do_socket_io && fapl->broadcast_fn == NULL)
- HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "read broadcast function pointer is NULL")
-
- user_fapl = *fapl;
- if (fapl->increment == 0)
- user_fapl.increment = H5FD_STREAM_INCREMENT;
- user_fapl.port = 0;
- ret_value = H5P_set_driver (plist, H5FD_STREAM, &user_fapl);
- }
- else
- ret_value = H5P_set_driver (plist, H5FD_STREAM, &default_fapl);
-
-done:
- FUNC_LEAVE_API(ret_value)
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5Pget_fapl_stream
- *
- * Purpose: Queries properties set by the H5Pset_fapl_stream() function.
- *
- * Return: Success: Non-negative
- * Failure: Negative
- *
- * Programmer: Thomas Radke
- * Tuesday, September 12, 2000
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t H5Pget_fapl_stream(hid_t fapl_id, H5FD_stream_fapl_t *fapl /* out */)
-{
- H5FD_stream_fapl_t *this_fapl;
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_API(H5Pget_fapl_stream, FAIL)
- H5TRACE2("e","ix",fapl_id,fapl);
-
- if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
- HGOTO_ERROR (H5E_PLIST, H5E_BADTYPE, FAIL, "not a fapl")
- if (H5FD_STREAM != H5P_get_driver (plist))
- HGOTO_ERROR (H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver")
- if (NULL == (this_fapl = H5P_get_driver_info (plist)))
- HGOTO_ERROR (H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info")
-
- if (fapl)
- *fapl = *this_fapl;
-
-done:
- FUNC_LEAVE_API(ret_value)
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_stream_fapl_get
- *
- * Purpose: Returns a copy of the file access properties
- *
- * Return: Success: Ptr to new file access properties
- * Failure: NULL
- *
- * Programmer: Thomas Radke
- * Tuesday, September 12, 2000
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static void *
-H5FD_stream_fapl_get (H5FD_t *_stream)
-{
- H5FD_stream_t *stream = (H5FD_stream_t *) _stream;
- H5FD_stream_fapl_t *fapl;
- void *ret_value;
-
- FUNC_ENTER_NOAPI(H5FD_stream_fapl_get, NULL)
-
- if ((fapl = H5MM_calloc (sizeof (H5FD_stream_fapl_t))) == NULL)
- HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
-
- *fapl = stream->fapl;
-
- /* Set return value */
- ret_value=fapl;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-
-static H5FD_STREAM_SOCKET_TYPE
-H5FD_stream_open_socket (const char *filename, int o_flags,
- H5FD_stream_fapl_t *fapl)
-{
- struct sockaddr_in server;
- struct hostent *he;
- H5FD_STREAM_SOCKET_TYPE sock=H5FD_STREAM_INVALID_SOCKET;
- char *hostname=NULL;
- unsigned short int first_port;
- const char *separator, *tmp;
- int on = 1;
- H5FD_STREAM_SOCKET_TYPE ret_value=H5FD_STREAM_INVALID_SOCKET;
-
- FUNC_ENTER_NOAPI_NOINIT(H5FD_stream_open_socket)
-
- /* Parse "hostname:port" from filename argument */
- for (separator = filename; *separator != ':' && *separator; separator++)
- ;
- if (separator == filename || !*separator) {
- HGOTO_ERROR(H5E_ARGS,H5E_BADVALUE,H5FD_STREAM_INVALID_SOCKET,"invalid host address")
- } else {
- tmp = separator;
- if (! tmp[1])
- HGOTO_ERROR(H5E_ARGS,H5E_BADVALUE,H5FD_STREAM_INVALID_SOCKET,"no port number")
- while (*++tmp) {
- if (! isdigit (*tmp))
- HGOTO_ERROR(H5E_ARGS,H5E_BADVALUE,H5FD_STREAM_INVALID_SOCKET,"invalid port number")
- }
- }
-
- hostname = (char *) H5MM_malloc ((size_t)(separator - filename + 1));
-
- /* Return if out of memory */
- if (hostname == NULL)
- HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,H5FD_STREAM_INVALID_SOCKET,"memory allocation failed")
-
- HDstrncpy (hostname, filename, (size_t)(separator - filename));
- hostname[separator - filename] = 0;
- fapl->port = atoi (separator + 1);
-
- HDmemset (&server, 0, sizeof (server));
- server.sin_family = AF_INET;
- server.sin_port = htons (fapl->port);
-
- if (! (he = gethostbyname (hostname))) {
- HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,H5FD_STREAM_INVALID_SOCKET,"unable to get host address")
- } else if (H5FD_STREAM_ERROR_CHECK (sock = socket (AF_INET, SOCK_STREAM, 0)))
- HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,H5FD_STREAM_INVALID_SOCKET,"unable to open socket")
-
- if (O_RDONLY == o_flags) {
- HDmemcpy (&server.sin_addr, he->h_addr, (size_t)he->h_length);
-#ifdef DEBUG
- fprintf (stderr, "Stream VFD: connecting to host '%s' port %d\n",
- hostname, fapl->port);
-#endif
- if (connect (sock, (struct sockaddr *) &server, sizeof (server)) < 0)
- HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,H5FD_STREAM_INVALID_SOCKET,"unable to connect")
- }
- else {
- server.sin_addr.s_addr = INADDR_ANY;
- if (H5FD_STREAM_IOCTL_SOCKET (sock, FIONBIO, &on) < 0) {
- HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,H5FD_STREAM_INVALID_SOCKET,"unable to set non-blocking mode for socket")
- } else if (setsockopt (sock, IPPROTO_TCP, TCP_NODELAY, (const char *) &on,
- sizeof(on)) < 0) {
- HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,H5FD_STREAM_INVALID_SOCKET,"unable to set socket option TCP_NODELAY")
- } else if (setsockopt (sock, SOL_SOCKET, SO_REUSEADDR, (const char *) &on,
- sizeof(on)) < 0) {
- HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,H5FD_STREAM_INVALID_SOCKET,"unable to set socket option SO_REUSEADDR")
- } else {
- /* Try to bind the socket to the given port.
- If maxhunt is given try some successive ports also. */
- first_port = fapl->port;
- while (fapl->port <= first_port + fapl->maxhunt) {
-#ifdef DEBUG
- fprintf (stderr, "Stream VFD: binding to port %d\n", fapl->port);
-#endif
- server.sin_port = htons (fapl->port);
- if (bind (sock, (struct sockaddr *) &server, sizeof (server)) < 0)
- fapl->port++;
- else
- break;
- }
- if (fapl->port > first_port + fapl->maxhunt) {
- fapl->port = 0;
- HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,H5FD_STREAM_INVALID_SOCKET,"unable to bind socket")
- }
- else if (listen (sock, fapl->backlog) < 0)
- HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,H5FD_STREAM_INVALID_SOCKET,"unable to listen on socket")
- }
- }
-
- /* Set return value for success */
- ret_value=sock;
-
-done:
- /* Cleanup variables */
- if(hostname!=NULL)
- hostname=H5MM_xfree(hostname);
-
- /* Clean up on error */
- if(ret_value==H5FD_STREAM_INVALID_SOCKET) {
- if (!H5FD_STREAM_ERROR_CHECK(sock))
- H5FD_STREAM_CLOSE_SOCKET(sock);
- } /* end if */
-
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-
-static herr_t
-H5FD_stream_read_from_socket (H5FD_stream_t *stream)
-{
- int size;
- size_t max_size = 0;
- unsigned char *ptr=NULL;
- herr_t ret_value=SUCCEED;
-
- FUNC_ENTER_NOAPI_NOINIT(H5FD_stream_read_from_socket)
-
- stream->eof = 0;
- stream->mem = NULL;
-
- while (1) {
- if (max_size <= 0) {
- /*
- * Allocate initial buffer as increment + 1
- * to prevent unnecessary reallocation
- * if increment is exactly a multiple of the filesize
- */
- max_size = stream->fapl.increment;
- if (! stream->mem)
- max_size++;
- ptr = H5MM_realloc (stream->mem, (size_t) (stream->eof + max_size));
- if (! ptr)
- HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,FAIL,"unable to allocate file space buffer")
- stream->mem = ptr;
- ptr += stream->eof;
- }
-
- /* now receive the next chunk of data */
- size = recv (stream->socket, ptr, max_size, 0);
-
- if (size < 0 && (EINTR == errno || EAGAIN == errno || EWOULDBLOCK))
- continue;
- if (size < 0)
- HGOTO_ERROR(H5E_IO,H5E_READERROR,FAIL,"error reading from file from socket")
- if (! size)
- break;
- max_size -= (size_t) size;
- stream->eof += (haddr_t) size;
- ptr += size;
-#ifdef DEBUG
- fprintf (stderr, "Stream VFD: read %d bytes (%d total) from socket\n",
- size, (int) stream->eof);
-#endif
- }
-
-#ifdef DEBUG
- fprintf (stderr, "Stream VFD: read total of %d bytes from socket\n",
- (int) stream->eof);
-#endif
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_stream_open
- *
- * Purpose: Opens an HDF5 file in memory.
- *
- * Return: Success: A pointer to a new file data structure. The
- * public fields will be initialized by the
- * caller, which is always H5FD_open().
- * Failure: NULL
- *
- * Programmer: Thomas Radke
- * Tuesday, September 12, 2000
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static H5FD_t *
-H5FD_stream_open (const char *filename,
- unsigned flags,
- hid_t fapl_id,
- haddr_t maxaddr)
-{
- H5FD_stream_t *stream=NULL;
- const H5FD_stream_fapl_t *fapl;
- int o_flags;
-#ifdef WIN32
- WSADATA wsadata;
-#endif
- H5P_genplist_t *plist=NULL; /* Property list pointer */
- H5FD_t *ret_value; /* Function return value */
-
- FUNC_ENTER_NOAPI(H5FD_stream_open, NULL)
-
- /* Check arguments */
- if (filename == NULL|| *filename == '\0')
- HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, NULL,"invalid file name")
- if (maxaddr == 0 || HADDR_UNDEF == maxaddr)
- HGOTO_ERROR (H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr")
- if (ADDR_OVERFLOW (maxaddr))
- HGOTO_ERROR (H5E_ARGS, H5E_OVERFLOW, NULL, "maxaddr overflow")
-
- /* Build the open flags */
- o_flags = (H5F_ACC_RDWR & flags) ? O_RDWR : O_RDONLY;
- if (H5F_ACC_TRUNC & flags) o_flags |= O_TRUNC;
- if (H5F_ACC_CREAT & flags) o_flags |= O_CREAT;
- if (H5F_ACC_EXCL & flags) o_flags |= O_EXCL;
-
- if ((O_RDWR & o_flags) && ! (O_CREAT & o_flags))
- HGOTO_ERROR (H5E_ARGS, H5E_UNSUPPORTED, NULL, "open stream for read/write not supported")
-
-#ifdef WIN32
- if (WSAStartup (MAKEWORD (2, 0), &wsadata))
- HGOTO_ERROR (H5E_IO, H5E_CANTINIT, NULL, "Couldn't start Win32 socket layer")
-#endif
-
- fapl = NULL;
- if (H5P_FILE_ACCESS_DEFAULT != fapl_id) {
- if(NULL == (plist = H5P_object_verify(fapl_id,H5P_FILE_ACCESS)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list")
- fapl = H5P_get_driver_info (plist);
- }
- if (fapl == NULL)
- fapl = &default_fapl;
-
- /* Create the new file struct */
- stream = (H5FD_stream_t *) H5MM_calloc (sizeof (H5FD_stream_t));
- if (stream == NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct")
- stream->fapl = *fapl;
- stream->socket = H5FD_STREAM_INVALID_SOCKET;
-
- /* if an external socket is provided with the file access property list
- we use that, otherwise the filename argument is parsed and a socket
- is opened internally */
- if (fapl->do_socket_io) {
- if (! H5FD_STREAM_ERROR_CHECK (fapl->socket)) {
- stream->internal_socket = FALSE;
- stream->socket = fapl->socket;
- }
- else {
- stream->internal_socket = TRUE;
- stream->socket = H5FD_stream_open_socket (filename, o_flags, &stream->fapl);
- if (stream->socket != H5FD_STREAM_INVALID_SOCKET) {
- /* update the port ID in the file access property
- so that it can be queried via H5P_get_fapl_stream() later on */
- H5P_set_driver (plist, H5FD_STREAM, &stream->fapl);
- }
- else
- HGOTO_ERROR(H5E_IO, H5E_CANTOPENFILE, NULL, "can't open internal socket")
- }
- }
-
- /* read the data from socket into memory */
- if (O_RDONLY == o_flags) {
- if (fapl->do_socket_io) {
-#ifdef DEBUG
- fprintf (stderr, "Stream VFD: reading file from socket\n");
-#endif
- if(H5FD_stream_read_from_socket (stream)<0)
- HGOTO_ERROR(H5E_IO, H5E_READERROR, NULL, "can't read file from socket")
- }
-
- /* Now call the user's broadcast routine if given */
- if (fapl->broadcast_fn) {
- if ((fapl->broadcast_fn) (&stream->mem, &stream->eof,
- fapl->broadcast_arg) < 0)
- HGOTO_ERROR(H5E_IO, H5E_READERROR, NULL, "broadcast error")
-
- /* check for filesize of zero bytes */
- if (stream->eof == 0)
- HGOTO_ERROR(H5E_IO, H5E_READERROR, NULL, "zero filesize")
- }
-
- /* For files which are read from a socket:
- the opened socket is not needed anymore */
- if (stream->internal_socket && ! H5FD_STREAM_ERROR_CHECK (stream->socket))
- H5FD_STREAM_CLOSE_SOCKET (stream->socket);
- stream->socket = H5FD_STREAM_INVALID_SOCKET;
- }
-
- /* Set return value on success */
- ret_value=(H5FD_t*)stream;
-
-done:
- if(ret_value==NULL) {
- if(stream!=NULL) {
- if (stream->mem)
- H5MM_xfree (stream->mem);
- if (stream->internal_socket && ! H5FD_STREAM_ERROR_CHECK (stream->socket))
- H5FD_STREAM_CLOSE_SOCKET (stream->socket);
- H5MM_xfree(stream);
- } /* end if */
- }
-
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_stream_flush
- *
- * Purpose: Flushes the file via sockets to any connected clients
- * if its dirty flag is set.
- *
- * Return: Success: 0
- * Failure: -1
- *
- * Programmer: Thomas Radke
- * Tuesday, September 12, 2000
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5FD_stream_flush (H5FD_t *_stream, hid_t UNUSED dxpl_id, unsigned UNUSED closing)
-{
- H5FD_stream_t *stream = (H5FD_stream_t *) _stream;
- size_t size;
- ssize_t bytes_send;
- int on = 1;
- unsigned char *ptr;
- struct sockaddr from;
- socklen_t fromlen;
- H5FD_STREAM_SOCKET_TYPE sock;
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_stream_flush, FAIL)
-
- /* Write to backing store */
- if (stream->dirty && ! H5FD_STREAM_ERROR_CHECK (stream->socket)) {
-#ifdef DEBUG
- fprintf (stderr, "Stream VFD: accepting client connections\n");
-#endif
- fromlen = sizeof (from);
- while (! H5FD_STREAM_ERROR_CHECK (sock = accept (stream->socket,
- &from, &fromlen))) {
- if (H5FD_STREAM_IOCTL_SOCKET (sock, FIONBIO, &on) < 0) {
- H5FD_STREAM_CLOSE_SOCKET (sock);
- continue; /* continue the loop for other clients to connect */
- }
-
- size = stream->eof;
- ptr = stream->mem;
-
- while (size) {
- bytes_send = send (sock, ptr, size, 0);
- if (bytes_send < 0) {
- if (EINTR == errno || EAGAIN == errno || EWOULDBLOCK == errno)
- continue;
-
- /* continue the outermost loop for other clients to connect */
- break;
- }
- ptr += bytes_send;
- size -= bytes_send;
-#ifdef DEBUG
- fprintf (stderr, "Stream VFD: wrote %d bytes to socket, %d in total, "
- "%d left\n", bytes_send, (int) (ptr - stream->mem), size);
-#endif
- }
- H5FD_STREAM_CLOSE_SOCKET (sock);
- }
- stream->dirty = FALSE;
- }
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_stream_close
- *
- * Purpose: Closes the file.
- *
- * Return: Success: 0
- * Failure: -1
- *
- * Programmer: Thomas Radke
- * Tuesday, September 12, 2000
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5FD_stream_close (H5FD_t *_stream)
-{
- H5FD_stream_t *stream = (H5FD_stream_t *) _stream;
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_stream_close, FAIL)
-
- /* Release resources */
- if (! H5FD_STREAM_ERROR_CHECK (stream->socket) && stream->internal_socket)
- H5FD_STREAM_CLOSE_SOCKET (stream->socket);
- if (stream->mem)
- H5MM_xfree (stream->mem);
- HDmemset (stream, 0, sizeof (H5FD_stream_t));
- H5MM_xfree (stream);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_stream_query
- *
- * Purpose: Set the flags that this VFL driver is capable of supporting.
- * (listed in H5FDpublic.h)
- *
- * Return: Success: non-negative
- *
- * Failure: negative
- *
- * Programmer: Quincey Koziol
- * Tuesday, September 26, 2000
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5FD_stream_query(const H5FD_t UNUSED * _f,
- unsigned long *flags/*out*/)
-{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_stream_query, SUCCEED)
-
- /* Set the VFL feature flags that this driver supports */
- if (flags) {
- *flags = 0;
- /* OK to perform data sieving for faster raw data reads & writes */
- *flags |= H5FD_FEAT_DATA_SIEVE;
- *flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
- }
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_stream_get_eoa
- *
- * Purpose: Gets the end-of-address marker for the file. The EOA marker
- * is the first address past the last byte allocated in the
- * format address space.
- *
- * Return: Success: The end-of-address marker.
- * Failure: HADDR_UNDEF
- *
- * Programmer: Thomas Radke
- * Tuesday, September 12, 2000
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static haddr_t
-H5FD_stream_get_eoa (H5FD_t *_stream)
-{
- H5FD_stream_t *stream = (H5FD_stream_t *) _stream;
- haddr_t ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_stream_get_eoa, HADDR_UNDEF)
-
- /* Set return value */
- ret_value=stream->eoa;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_stream_set_eoa
- *
- * Purpose: Set the end-of-address marker for the file. This function is
- * called shortly after an existing HDF5 file is opened in order
- * to tell the driver where the end of the HDF5 data is located.
- *
- * Return: Success: 0
- * Failure: -1
- *
- * Programmer: Thomas Radke
- * Tuesday, September 12, 2000
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5FD_stream_set_eoa (H5FD_t *_stream, haddr_t addr)
-{
- H5FD_stream_t *stream = (H5FD_stream_t *) _stream;
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_stream_set_eoa, FAIL)
-
- if (ADDR_OVERFLOW (addr))
- HGOTO_ERROR (H5E_ARGS, H5E_OVERFLOW, FAIL, "address overflow")
-
- stream->eoa = addr;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_stream_get_eof
- *
- * Purpose: Returns the end-of-file marker, which is the greater of
- * either the size of the underlying memory or the HDF5
- * end-of-address markers.
- *
- * Return: Success: End of file address, the first address past
- * the end of the "file", either the memory
- * or the HDF5 file.
- * Failure: HADDR_UNDEF
- *
- * Programmer: Thomas Radke
- * Tuesday, September 12, 2000
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static haddr_t
-H5FD_stream_get_eof (H5FD_t *_stream)
-{
- H5FD_stream_t *stream = (H5FD_stream_t *) _stream;
- haddr_t ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_stream_get_eof, HADDR_UNDEF)
-
- /* Set return value */
- ret_value= MAX (stream->eof, stream->eoa);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_stream_get_handle
- *
- * Purpose: Returns the file handle of stream file driver.
- *
- * Returns: Non-negative if succeed or negative if fails.
- *
- * Programmer: Raymond Lu
- * Sept. 16, 2002
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5FD_stream_get_handle(H5FD_t *_file, hid_t UNUSED fapl, void** file_handle)
-{
- H5FD_stream_t *file = (H5FD_stream_t *)_file;
- herr_t ret_value = SUCCEED;
-
- FUNC_ENTER_NOAPI(H5FD_stream_get_handle, FAIL)
-
- if(!file_handle)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
-
- *file_handle = &(file->socket);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_stream_read
- *
- * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
- * into buffer BUF according to data transfer properties in
- * DXPL_ID.
- *
- * Return: Success: 0
- * Result is stored in caller-supplied buffer BUF
- * Failure: -1
- * Contents of buffer BUF are undefined
- *
- * Programmer: Thomas Radke
- * Tuesday, September 12, 2000
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5FD_stream_read (H5FD_t *_stream,
- H5FD_mem_t UNUSED type,
- hid_t UNUSED dxpl_id,
- haddr_t addr,
- size_t size,
- void *buf /*out*/)
-{
- H5FD_stream_t *stream = (H5FD_stream_t *) _stream;
- size_t nbytes;
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_stream_read, FAIL)
-
- assert (stream && stream->pub.cls);
- assert (buf);
-
- /* Check for overflow conditions */
- if (HADDR_UNDEF == addr)
- HGOTO_ERROR (H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed")
- if (REGION_OVERFLOW (addr, size))
- HGOTO_ERROR (H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed")
- if (addr + size > stream->eoa)
- HGOTO_ERROR (H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed")
-
- /* Read the part which is before the EOF marker */
- if (addr < stream->eof) {
- nbytes = MIN (size, stream->eof - addr);
- HDmemcpy (buf, stream->mem + addr, nbytes);
- size -= nbytes;
- addr += nbytes;
- buf = (char *) buf + nbytes;
- }
-
- /* Read zeros for the part which is after the EOF markers */
- if (size > 0)
- HDmemset (buf, 0, size);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: H5FD_stream_write
- *
- * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
- * from buffer BUF according to data transfer properties in
- * DXPL_ID.
- *
- * Return: Success: Zero
- * Failure: -1
- *
- * Programmer: Thomas Radke
- * Tuesday, September 12, 2000
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5FD_stream_write (H5FD_t *_stream,
- H5FD_mem_t UNUSED type,
- hid_t UNUSED dxpl_id,
- haddr_t addr,
- size_t size,
- const void *buf)
-{
- H5FD_stream_t *stream = (H5FD_stream_t *) _stream;
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5FD_stream_write, FAIL)
-
- assert (stream && stream->pub.cls);
- assert (buf);
-
- /* Check for overflow conditions */
- if (REGION_OVERFLOW (addr, size))
- HGOTO_ERROR (H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed")
- if (addr + size > stream->eoa)
- HGOTO_ERROR (H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed")
-
- /*
- * Allocate more memory if necessary, careful of overflow. Also, if the
- * allocation fails then the file should remain in a usable state. Be
- * careful of non-Posix realloc() that doesn't understand what to do when
- * the first argument is null.
- */
- if (addr + size > stream->eof) {
- unsigned char *x;
- haddr_t new_eof = stream->fapl.increment *
- ((addr+size) / stream->fapl.increment);
-
- if ((addr+size) % stream->fapl.increment)
- new_eof += stream->fapl.increment;
- if (stream->mem == NULL)
- x = H5MM_malloc ((size_t) new_eof);
- else
- x = H5MM_realloc (stream->mem, (size_t) new_eof);
- if (x == NULL)
- HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate memory block")
- stream->mem = x;
- stream->eof = new_eof;
- }
-
- /* Write from BUF to memory */
- HDmemcpy (stream->mem + addr, buf, size);
- stream->dirty = TRUE;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-}
-
-#endif /* H5_HAVE_STREAM */
diff --git a/src/H5FDstream.h b/src/H5FDstream.h
deleted file mode 100644
index 00eea12..0000000
--- a/src/H5FDstream.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Copyright © 2000 The author.
- * The author prefers this code not be used for military purposes.
- *
- *
- * Author: Thomas Radke <tradke@aei-potsdam.mpg.de>
- * Tuesday, September 12, 2000
- *
- * Purpose: The public header file for the Stream Virtual File Driver.
- *
- * Modifications:
- * Thomas Radke, Thursday, October 26, 2000
- * Added support for Windows.
- *
- */
-#ifndef H5FDstream_H
-#define H5FDstream_H
-
-#ifdef H5_HAVE_STREAM
-# define H5FD_STREAM (H5FD_stream_init())
-#else
-# define H5FD_STREAM (-1)
-#endif /*H5_HAVE_STREAM */
-
-#ifdef H5_HAVE_STREAM
-
-/* check what sockets type we have (Unix or Windows sockets)
- Note that only MS compilers require to use Windows sockets
- but gcc under Windows does not. */
-#if ! defined(H5_HAVE_WINSOCK_H) || defined(__GNUC__)
-#define H5FD_STREAM_HAVE_UNIX_SOCKETS 1
-#endif
-
-/* define the data type for socket descriptors
- and the constant indicating an invalid descriptor */
-#ifdef H5FD_STREAM_HAVE_UNIX_SOCKETS
-
-#define H5FD_STREAM_SOCKET_TYPE int
-#define H5FD_STREAM_INVALID_SOCKET -1
-
-#else
-#include <winsock.h>
-
-#define H5FD_STREAM_SOCKET_TYPE SOCKET
-#define H5FD_STREAM_INVALID_SOCKET INVALID_SOCKET
-
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* prototype for read broadcast callback routine */
-typedef int (*H5FD_stream_broadcast_t) (unsigned char **file,
- haddr_t *len,
- void *arg);
-
-/* driver-specific file access properties */
-typedef struct H5FD_stream_fapl_t
-{
- size_t increment; /* how much to grow memory in reallocs */
- H5FD_STREAM_SOCKET_TYPE socket; /* externally provided socket descriptor*/
- hbool_t do_socket_io; /* do I/O on socket */
- int backlog; /* backlog argument for listen call */
- H5FD_stream_broadcast_t broadcast_fn; /* READ broadcast callback */
- void *broadcast_arg; /* READ broadcast callback user argument*/
- unsigned int maxhunt; /* how many more ports to try to bind to*/
- unsigned short int port; /* port a socket was bound/connected to */
-} H5FD_stream_fapl_t;
-
-
-/* prototypes of exported functions */
-H5_DLL hid_t H5FD_stream_init (void);
-H5_DLL void H5FD_stream_term(void);
-H5_DLL herr_t H5Pset_fapl_stream (hid_t fapl_id,
- H5FD_stream_fapl_t *fapl);
-H5_DLL herr_t H5Pget_fapl_stream (hid_t fapl_id,
- H5FD_stream_fapl_t *fapl /*out*/ );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* H5_HAVE_STREAM */
-
-#endif /* H5FDstream_H */
diff --git a/src/H5config.h.in b/src/H5config.h.in
index c34a7c0..56794cd 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -222,12 +222,6 @@
/* Define if MPI_File_get_size works correctly */
#undef HAVE_MPI_GET_SIZE
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#undef HAVE_NETINET_IN_H
-
-/* Define to 1 if you have the <netinet/tcp.h> header file. */
-#undef HAVE_NETINET_TCP_H
-
/* Define if we have parallel support */
#undef HAVE_PARALLEL
@@ -249,9 +243,6 @@
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
-/* Define if `socklen_t' is defined */
-#undef HAVE_SOCKLEN_T
-
/* Define if the SRB is defined */
#undef HAVE_SRB
@@ -273,9 +264,6 @@
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
-/* Define if the stream virtual file driver should be compiled */
-#undef HAVE_STREAM
-
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
@@ -297,9 +285,6 @@
/* Define to 1 if you have the `system' function. */
#undef HAVE_SYSTEM
-/* Define to 1 if you have the <sys/filio.h> header file. */
-#undef HAVE_SYS_FILIO_H
-
/* Define to 1 if you have the <sys/fpu.h> header file. */
#undef HAVE_SYS_FPU_H
diff --git a/src/Makefile.in b/src/Makefile.in
index 4d9b78d..fdeb98f 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -37,7 +37,7 @@ LIB_SRC=H5.c H5A.c H5AC.c H5B.c H5Bcache.c H5C.c H5D.c H5Dcontig.c \
H5Fdbg.c H5Fmount.c H5Fsfile.c H5Fsuper.c H5FD.c \
H5FDcore.c H5FDfamily.c H5FDgass.c H5FDlog.c H5FDmpi.c H5FDmpio.c \
H5FDmpiposix.c H5FDmulti.c H5FDsec2.c H5FDsrb.c H5FDstdio.c \
- H5FDstream.c H5FL.c H5FO.c H5FS.c H5G.c H5Gent.c H5Gname.c \
+ H5FL.c H5FO.c H5FS.c H5G.c H5Gent.c H5Gname.c \
H5Gnode.c H5Gstab.c \
H5Gtest.c H5Gtraverse.c \
H5HG.c H5HGdbg.c H5HL.c H5HLdbg.c H5HP.c H5I.c H5MF.c H5MM.c H5O.c \
@@ -63,7 +63,7 @@ PUB_HDR=H5public.h H5Apublic.h H5ACpublic.h H5Bpublic.h H5Cpublic.h \
H5Dpublic.h \
H5Epublic.h H5Fpublic.h H5FDpublic.h H5FDcore.h H5FDfamily.h \
H5FDgass.h H5FDlog.h H5FDmpi.h H5FDmpio.h H5FDmpiposix.h \
- H5FDmulti.h H5FDsec2.h H5FDsrb.h H5FDstdio.h H5FDstream.h \
+ H5FDmulti.h H5FDsec2.h H5FDsrb.h H5FDstdio.h \
H5Gpublic.h H5HGpublic.h H5HLpublic.h H5Ipublic.h \
H5MMpublic.h H5Opublic.h H5Ppublic.h H5Rpublic.h H5Spublic.h \
H5Tpublic.h H5Zpublic.h H5pubconf.h hdf5.h H5api_adpt.h
diff --git a/src/hdf5.h b/src/hdf5.h
index 29df6c2..8757022 100644
--- a/src/hdf5.h
+++ b/src/hdf5.h
@@ -51,6 +51,5 @@
#include "H5FDsec2.h" /* POSIX unbuffered file I/O */
#include "H5FDsrb.h" /* Remote access using SRB */
#include "H5FDstdio.h" /* Standard C buffered I/O */
-#include "H5FDstream.h" /* In-memory files streamed via sockets */
#endif
diff --git a/test/Makefile.in b/test/Makefile.in
index 297d06b..d2e4814 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -28,7 +28,7 @@ CPPFLAGS=-I. -I$(srcdir) -I../src -I$(top_srcdir)/src @CPPFLAGS@
TEST_PROGS=testhdf5 lheap ohdr stab gheap cache hyperslab istore bittests \
dtypes dsets cmpd_dset extend external links unlink big mtime fillval \
mount flush1 flush2 enum gass_write gass_read gass_append set_extent \
- srb_write srb_append srb_read ttsafe stream_test getname file_handle \
+ srb_write srb_append srb_read ttsafe getname file_handle \
ntypes dangle reserved
TIMINGS=testmeta
@@ -79,7 +79,7 @@ TEST_SRC=big.c bittests.c cache.c cmpd_dset.c dsets.c dtypes.c extend.c \
tselect.c tskiplist.c ttime.c ttst.c tvltypes.c tvlstr.c \
unlink.c enum.c ttsafe.c ttsafe_dcreate.c ttsafe_error.c \
ttsafe_cancel.c ttsafe_acreate.c gass_write.c gass_read.c \
- gass_append.c srb_read.c srb_write.c srb_append.c stream_test.c \
+ gass_append.c srb_read.c srb_write.c srb_append.c \
set_extent.c getname.c file_handle.c ntypes.c dangle.c reserved.c
TEST_OBJ=$(TEST_SRC:.c=.lo)
@@ -207,9 +207,6 @@ srb_write: srb_write.lo
srb_append: srb_append.lo
@$(LT_LINK_EXE) $(CFLAGS) -o $@ srb_append.lo $(LIB) $(LIBHDF5) $(LDFLAGS) $(LIBS)
-stream_test: stream_test.lo
- @$(LT_LINK_EXE) $(CFLAGS) -o $@ stream_test.lo $(LIB) $(LIBHDF5) $(LDFLAGS) $(LIBS)
-
testmeta: testmeta.lo
@$(LT_LINK_EXE) $(CFLAGS) -o $@ testmeta.lo $(LIB) $(LIBHDF5) $(LDFLAGS) $(LIBS)
diff --git a/test/stream_test.c b/test/stream_test.c
deleted file mode 100644
index 3051d3b..0000000
--- a/test/stream_test.c
+++ /dev/null
@@ -1,494 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Copyright © 2000 The author.
- * The author prefers this code not be used for military purposes.
- *
- *
- * Author: Thomas Radke <tradke@aei-potsdam.mpg.de>
- * Tuesday, September 12, 2000
- *
- * Modifications:
- * Thomas Radke, Thursday, October 26, 2000
- * Made it compiling under Windows.
- *
- */
-
-/*
- * This program tests the functionality of the Stream Virtual File Driver.
- * 1. It spawns two new processes, a sender and a receiver.
- * 2. The sender opens an HDF5 file for writing using the Stream driver.
- * It will use a reserved port which should fail to be bound.
- * Then it will try a couple of successive ports until bind succeeds.
- * This final "hostname:port" information is written into a temporary
- * file as a single line of text.
- * The sender then writes a sample dataset to the HDF5 file.
- * On closing the file the Stream VFD would send the file
- * contents to any connected client.
- * 3. The receiver serves as a client attempting to open an
- * HDF5 file for reading. On opening the file the Stream VFD
- * would establish a socket connection to the sender process,
- * identified by its hostname and a port number (which is obtained
- * from the temporary text file the sender should have created),
- * and read the file contents via this socket.
- * Aftwerwards the dataset is read from the file into memory
- * and verified.
- * 4. The main program waits for termination of its two child
- * processes and returns their exit code.
- */
-
-#include <stdio.h>
-#include "hdf5.h"
-
-#ifndef H5_HAVE_STREAM
-
-int main (void)
-{
- printf ("Test skipped because Stream Virtual File Driver not available\n");
- return (0);
-}
-
-#elif ! defined (H5_HAVE_FORK) || ! defined (H5_HAVE_WAITPID)
-
-int main (void)
-{
- printf ("Test skipped because this architecture doesn't provide "
- "fork(2) and waitpid(2)\n");
- return (0);
-}
-
-#else
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-
-
-#define SLEEPTIME 10 /* sleeping time in seconds */
-#define RANK 2 /* sample dataset rank */
-#define DIMS 50 /* sample dataset dimensions */
-#define DATASETNAME "IntArray" /* sample dataset name */
-#define HOSTNAME "localhost" /* hostname of this machine */
-#define PORT "5678" /* default port to use */
-#define MAXHUNT 500 /* max number of ports to hunt */
-#define HDF5_FILENAME HOSTNAME ":" PORT /* name of the streamed file */
-#define TEMPFILENAME "stream_test.tmp" /* temporary filename */
-
-
-static int sender (void)
-{
- int i;
- hsize_t dims[RANK];
- int *data;
- herr_t status;
- hid_t fapl, file;
- hid_t dataspace, dataset;
- H5FD_stream_fapl_t stream_fapl;
- FILE *tempfile;
-
-
- /*
- * Create access property list and set it to use the Stream driver.
- */
- fapl = H5Pcreate (H5P_FILE_ACCESS);
- if (fapl < 0)
- {
- fprintf (stderr, "sender: couldn't create file access property list\n");
- return (-1);
- }
-
- /*
- * Setup file access property list and select Stream VFD.
- *
- * - block increment for realloc() should be chosen by the driver
- * - no external socket is provided (should be created internally)
- * - do I/O on this processor on this socket
- * - only one client is allowed to connect at a time
- * - no READ broadcast function is provided (since we only send data)
- * - if bind to default port (given in the filename argument) fails
- * do port hunting on the following MAXHUNT ports
- */
- stream_fapl.increment = 0;
- stream_fapl.socket = H5FD_STREAM_INVALID_SOCKET;
- stream_fapl.do_socket_io = 1;
- stream_fapl.backlog = 1;
- stream_fapl.broadcast_fn = NULL;
- stream_fapl.broadcast_arg = NULL;
- stream_fapl.maxhunt = MAXHUNT;
-
- status = H5Pset_fapl_stream (fapl, &stream_fapl);
- if (status < 0)
- {
- fprintf (stderr, "sender: couldn't set file access property list "
- "for Stream VFD\n");
- H5Pclose (fapl);
- return (-2);
- }
-
- /*
- * Create the data space for fixed size dataset.
- */
- for (i = 0; i < RANK; i++)
- {
- dims[i] = DIMS;
- }
- dataspace = H5Screate_simple (RANK, dims, NULL);
- if (dataspace < 0)
- {
- fprintf (stderr, "sender: couldn't create dataspace\n");
- H5Pclose (fapl);
- return (-3);
- }
-
- /*
- * Data buffer initialization.
- */
- i = (int) H5Sget_simple_extent_npoints (dataspace);
- data = (int *) malloc (i * sizeof (int));
- if (data == NULL)
- {
- fprintf (stderr, "sender: cannot allocate buffer for dataset with "
- "%d integers\n", i);
- H5Sclose (dataspace);
- H5Pclose (fapl);
- return (-4);
- }
- while (--i >= 0)
- {
- data[i] = i;
- }
-
- /*
- * Create a new file using H5F_ACC_TRUNC access,
- * default file creation properties, and STREAM file
- * access properties.
- */
- printf (" sender: opening file on host '%s' port %s for writing...\n",
- HOSTNAME, PORT);
- file = H5Fcreate (HDF5_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- if (file < 0)
- {
- fprintf (stderr, "sender: couldn't create file on '%s' using port %s and "
- "following %d\n", HOSTNAME, PORT, MAXHUNT);
- free (data);
- H5Sclose (dataspace);
- H5Pclose (fapl);
- return (-5);
- }
-
- /*
- * Get the file access property list to find out what port is actually used.
- */
- status = H5Pget_fapl_stream (fapl, &stream_fapl);
- if (status < 0)
- {
- fprintf (stderr, "sender: couldn't get file access property list "
- "for Stream VFD\n");
- free (data);
- H5Sclose (dataspace);
- H5Pclose (fapl);
- return (-6);
- }
- printf (" sender: using port %d...\n", (int) stream_fapl.port);
-
- /*
- * Write the "hostname:port" information to a temporary file
- * which can be read by the receiver process.
- */
- tempfile = fopen (TEMPFILENAME, "w");
- if (tempfile == NULL)
- {
- fprintf (stderr, "sender: couldn't open temporary file to write "
- "\"hostname:port\" information\n");
- free (data);
- H5Sclose (dataspace);
- H5Pclose (fapl);
- return (-7);
- }
- fprintf (tempfile, "%s:%d", HOSTNAME, (int) stream_fapl.port);
- fclose (tempfile);
-
- /*
- * Create a new dataset within the file using defined dataspace and
- * default dataset creation properties.
- */
- dataset = H5Dcreate (file, DATASETNAME, H5T_NATIVE_INT, dataspace,
- H5P_DEFAULT);
- if (dataset < 0)
- {
- fprintf (stderr, "sender: couldn't create dataset '%s'\n", DATASETNAME);
- free (data);
- H5Fclose (file);
- H5Sclose (dataspace);
- H5Pclose (fapl);
- return (-8);
- }
-
- /*
- * Write the data to the dataset using default transfer properties.
- */
- printf (" sender: writing dataset '%s' of type INTEGER to file '%s:%d'...\n",
- DATASETNAME, HOSTNAME, (int) stream_fapl.port);
- status = H5Dwrite (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
- data);
- if (status < 0)
- {
- free (data);
- H5Fclose (file);
- H5Dclose (dataset);
- H5Sclose (dataspace);
- H5Pclose (fapl);
- fprintf (stderr, "sender: couldn't write dataset\n");
- return (-9);
- }
-
- /*
- * Now give the receiver some time to connect before closing the file
- * and releasing resources.
- */
- printf (" sender: sleeping for %d seconds...\n", SLEEPTIME);
- sleep (SLEEPTIME);
- printf (" sender: closing file '%s:%d'\n", HOSTNAME, (int) stream_fapl.port);
- H5Sclose (dataspace);
- H5Dclose (dataset);
- H5Fclose (file);
- H5Pclose (fapl);
- free (data);
-
- return (0);
-}
-
-
-static int receiver (void)
-{
- int i; /* looper */
- hid_t fapl; /* file access property list */
- hid_t file; /* file handle */
- hid_t dataset; /* dataset handle */
- hid_t datatype; /* datatype handle */
- hid_t dataspace; /* dataspace handle */
- hsize_t nelems; /* total number of elements in the dataset */
- hsize_t *dims; /* dataset dimensions */
- int rank; /* dataset rank */
- int *data; /* read buffer */
- int nerrors; /* total number of errors during verify */
- int status; /* return code of HDF5 routines */
- char filename[50]; /* filename of the streamed HDF5 file */
- FILE *tempfile; /* descriptor for temporary file */
-
-
- /*
- * Create access property list and set it to use the Stream driver.
- */
- fapl = H5Pcreate (H5P_FILE_ACCESS);
- if (fapl < 0)
- {
- fprintf (stderr, "receiver: couldn't create file access property list\n");
- return (-1);
- }
-
- status = H5Pset_fapl_stream (fapl, NULL);
- if (status < 0)
- {
- fprintf (stderr, "receiver: couldn't set file access property list "
- "for Stream VFD\n");
- H5Pclose (fapl);
- return (-2);
- }
-
- /*
- * Now give the sender some time to open the file and accepting connections.
- */
- printf (" receiver: sleeping for %d seconds...\n", SLEEPTIME / 2);
- sleep (SLEEPTIME / 2);
-
- /*
- * Read the "hostname:port" information from the temporary file
- * the sender should have created.
- */
- tempfile = fopen (TEMPFILENAME, "r");
- if (tempfile == NULL)
- {
- fprintf (stderr, "receiver: couldn't open temporary file to read "
- "\"hostname:port\" information\n");
- H5Pclose (fapl);
- return (-3);
- }
- fgets (filename, sizeof (filename) - 1, tempfile);
- fclose (tempfile);
- unlink (TEMPFILENAME);
-
- /*
- * Open the streamed HDF5 file for reading.
- */
- printf (" receiver: opening file '%s' for reading...\n", filename);
- file = H5Fopen (filename, H5F_ACC_RDONLY, fapl);
- H5Pclose (fapl);
- if (file < 0)
- {
- fprintf (stderr, "receiver: couldn't open file from '%s'\n", filename);
- return (-4);
- }
-
- /*
- * Open the file and the dataset.
- */
- printf (" receiver: reading dataset '%s'...\n", DATASETNAME);
- dataset = H5Dopen (file, DATASETNAME);
- if (dataset < 0)
- {
- fprintf (stderr, "receiver: couldn't open dataset '%s'\n", DATASETNAME);
- return (-5);
- }
-
- /*
- * Get dataset class, order, and size information
- */
- datatype = H5Dget_type (dataset);
- if (H5Tget_class (datatype) == H5T_INTEGER)
- {
- printf (" receiver: dataset is of type INTEGER\n");
- }
- printf (" receiver: datatype size is %d bytes\n",
- (int) H5Tget_size (datatype));
- printf (" receiver: byte ordering is %s endian\n",
- H5Tget_order (datatype) == H5T_ORDER_LE ? "little" : "big");
- H5Tclose(datatype);
-
- /*
- * Get dataset dimensions
- */
- dataspace = H5Dget_space (dataset);
- rank = H5Sget_simple_extent_ndims (dataspace);
- dims = (hsize_t *) malloc (rank * sizeof (hsize_t));
- H5Sget_simple_extent_dims (dataspace, dims, NULL);
- H5Sclose (dataspace);
-
- printf (" receiver: rank %d, dimensions %u", rank, (unsigned int) dims[0]);
- nelems = dims[0];
- for (i = 1; i < rank; i++)
- {
- printf (" x %u", (unsigned int) dims[i]);
- nelems *= dims[i];
- }
- printf ("\n receiver: total number of elements: %d\n", (int) nelems);
- free (dims);
-
- /*
- * Read dataset from file into memory.
- */
- data = (int *) malloc ((size_t) nelems * sizeof (int));
- status = H5Dread (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
- data);
- H5Dclose (dataset);
-
- /*
- * Close the file.
- */
- printf (" receiver: closing file '%s'...\n", filename);
- H5Fclose (file);
-
- /*
- * Verify the dataset contents
- */
- printf (" receiver: verifying contents of dataset '%s'...\n", DATASETNAME);
- for (i = nerrors = 0; i < (int) nelems; i++)
- {
- if (data[i] != i)
- {
- fprintf (stderr, "receiver: data error at offset %d: "
- "expected %d got %d\n", i, i, data[i]);
- nerrors++;
- }
- }
- printf (" receiver: dataset verified, %d errors found\n", nerrors);
-
- free (data);
-
- return (-nerrors);
-}
-
-
-int main (void)
-{
- int main_status, sender_status, receiver_status;
- pid_t sender_pid, receiver_pid;
-
-
- sender_pid = receiver_pid = 0;
-
- /* main's return code for success */
- main_status = 0;
-
- /* spawn off the sender and the receiver process */
- printf ("main: starting sender process...\n");
- sender_pid = fork ();
- if (sender_pid == 0)
- {
- return (sender ());
- }
- else if (sender_pid < 0)
- {
- perror ("Failed to spawn sender");
- main_status = -1;
- }
- else
- {
- printf ("main: starting receiver process...\n");
- receiver_pid = fork ();
- if (receiver_pid == 0)
- {
- return (receiver ());
- }
- else if (sender_pid < 0)
- {
- perror ("Failed to spawn receiver");
- main_status = -1;
- }
- }
-
- /* wait for the termination of sender and receiver and check their status */
- printf ("main: waiting for termination of sender and receiver process...\n");
- if (sender_pid > 0 &&
- waitpid (sender_pid, &sender_status, 0) != sender_pid)
- {
- perror ("Failed to wait for termination of sender");
- main_status = -1;
- }
- else
- {
- main_status |= sender_status;
- }
- if (receiver_pid > 0 &&
- waitpid (receiver_pid, &receiver_status, 0) != receiver_pid)
- {
- perror ("Failed to wait for termination of receiver");
- main_status = -1;
- }
- else
- {
- main_status |= receiver_status;
- }
-
- printf (main_status == 0 ?
- "Stream Virtual File Driver test passed.\n" :
- "*** Stream Virtual File Driver TEST FAILED ***\n");
-
- return (main_status);
-}
-
-#endif /* H5_HAVE_STREAM */
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 73a9f34..1e6b3c8 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -633,7 +633,7 @@ usage(const char *prog)
fprintf(stdout, " -k L, --block=L Size of block in hyperslab\n");
fprintf(stdout, "\n");
fprintf(stdout, " D - is the file driver to use in opening the file. Acceptable values\n");
- fprintf(stdout, " are \"sec2\", \"family\", \"split\", \"multi\", and \"stream\". Without\n");
+ fprintf(stdout, " are \"sec2\", \"family\", \"split\", and \"multi\". Without\n");
fprintf(stdout, " the file driver flag, the file will be opened with each driver in\n");
fprintf(stdout, " turn and in the order specified above until one driver succeeds\n");
fprintf(stdout, " in opening the file.\n");
@@ -2614,10 +2614,6 @@ dump_fcpl(hid_t fid)
HDstrcpy(dname,"H5FD_SEC2");
else if (H5FD_STDIO==fdriver)
HDstrcpy(dname,"H5FD_STDIO");
-#ifdef H5_HAVE_STREAM
- else if (H5FD_STREAM==fdriver)
- HDstrcpy(dname,"H5FD_STREAM");
-#endif
indentation(indent + COL);
printf("%s %s\n","FILE_DRIVER", dname);
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 5baac5f..ab844cc 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -57,9 +57,6 @@ static const char *drivernames[]={
"family",
"split",
"multi",
-#ifdef H5_HAVE_STREAM
- "stream",
-#endif /* H5_HAVE_STREAM */
#ifdef H5_HAVE_PARALLEL
"mpio",
"mpiposix"
@@ -73,9 +70,6 @@ enum {
,FAMILY_IDX
,SPLIT_IDX
,MULTI_IDX
-#ifdef H5_HAVE_STREAM
- ,STREAM_IDX
-#endif /* H5_HAVE_STREAM */
#ifdef H5_HAVE_PARALLEL
,MPIO_IDX
,MPIPOSIX_IDX
@@ -196,16 +190,6 @@ h5tools_get_fapl(const char *driver, unsigned *drivernum)
if(drivernum)
*drivernum = MULTI_IDX;
} /* end if */
-#ifdef H5_HAVE_STREAM
- } else if (!strcmp(driver, drivernames[STREAM_IDX])) {
- /* STREAM Driver */
- if((fapl = H5Pcreate(H5P_FILE_ACCESS))>=0) {
- H5Pset_fapl_stream(fapl, NULL);
-
- if(drivernum)
- *drivernum = STREAM_IDX;
- } /* end if */
-#endif /* H5_HAVE_STREAM */
#ifdef H5_HAVE_PARALLEL
} else if (!strcmp(driver, drivernames[MPIO_IDX])) {
/* MPI-I/O Driver */
@@ -256,8 +240,7 @@ error:
* Loop through the various types of VFL drivers trying to open FNAME.
* If the HDF5 library is version 1.2 or less, then we have only the SEC2
* driver to try out. If the HDF5 library is greater than version 1.2,
- * then we have the FAMILY, SPLIT, and MULTI drivers to play with (and
- * the STREAM driver if H5_HAVE_STREAM is defined, that is).
+ * then we have the FAMILY, SPLIT, and MULTI drivers to play with.
*
* If DRIVER is non-NULL, then it will try to open the file with that
* driver first. We assume that the user knows what they are doing so, if
diff --git a/tools/testfiles/tnofilename.ddl b/tools/testfiles/tnofilename.ddl
index 4c25bc6..570def4 100644
--- a/tools/testfiles/tnofilename.ddl
+++ b/tools/testfiles/tnofilename.ddl
@@ -47,7 +47,7 @@ usage: h5dump [OPTIONS] file
-k L, --block=L Size of block in hyperslab
D - is the file driver to use in opening the file. Acceptable values
- are "sec2", "family", "split", "multi", and "stream". Without
+ are "sec2", "family", "split", and "multi". Without
the file driver flag, the file will be opened with each driver in
turn and in the order specified above until one driver succeeds
in opening the file.