From b6ea60eceb02a50b161e91f841b82213e4dd4af2 Mon Sep 17 00:00:00 2001 From: Mike McGreevy Date: Thu, 15 May 2008 12:36:23 -0500 Subject: [svn-r15008] Purpose: configure and source code cleanup Description: cleaning up configure related to removal of --disable-hsizet flag, which we no longer support. Furthermore, the H5_HAVE_LARGE_HSIZET macros in the source code have been removed. Tested: kagiso --- c++/configure | 2 +- config/gnu-flags | 14 +++++--------- configure | 34 +++++++--------------------------- configure.in | 13 ------------- fortran/config/gnu-flags | 14 +++++--------- fortran/configure | 2 +- src/H5Osdspace.c | 5 ----- src/H5config.h.in | 3 --- src/H5private.h | 5 ----- src/H5public.h | 6 ------ src/libhdf5.settings.in | 1 - test/big.c | 6 ------ test/istore.c | 4 ---- test/tfile.c | 8 -------- 14 files changed, 19 insertions(+), 98 deletions(-) diff --git a/c++/configure b/c++/configure index c2ff84f..74f4baa 100755 --- a/c++/configure +++ b/c++/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From c++/configure.in Id: configure.in 14929 2008-05-04 22:56:16Z hdftest . +# From c++/configure.in Id: configure.in 14966 2008-05-11 23:06:42Z hdftest . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for HDF5 C++ 1.6.7-snap6. # diff --git a/config/gnu-flags b/config/gnu-flags index 251d575..0bfd365 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -52,11 +52,10 @@ if test gcc = "$cc_vendor" -a "$cc_vers_all" -lt 2008001; then cat <&5 -echo $ECHO_N "checking for sizeof hsize_t and hssize_t... $ECHO_C" >&6; } - -{ echo "$as_me:$LINENO: result: large" >&5 -echo "${ECHO_T}large" >&6; } -HSIZET=large - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LARGE_HSIZET 1 -_ACEOF - - host_config="none" for f in $host_cpu-$host_vendor-$host_os \ $host_cpu-$host_vendor-$host_os_novers \ @@ -5293,7 +5280,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 5296 "configure"' > conftest.$ac_ext + echo '#line 5283 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5850,7 +5837,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:5853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:5840: \"$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 @@ -7725,7 +7712,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <conf$$subs.sed <<_ACEOF -TRACE_API!$TRACE_API$ac_delim INSTRUMENT_LIBRARY!$INSTRUMENT_LIBRARY$ac_delim CLEARFILEBUF!$CLEARFILEBUF$ac_delim MPE!$MPE$ac_delim @@ -37249,7 +37235,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 23; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 @@ -38048,12 +38034,6 @@ IF_ENABLED_DISABLED "$STRICT_FORMAT_CHECKS" PRINT_N " HDF5 v1.4 Compatibility" IF_YES_NO "$HDF5_V1_4_COMPAT" -PRINT_N " hsize_t" -case "$HSIZET" in - no|small) PRINT "Small" ;; - *) PRINT "Large" ;; -esac - PRINT_N " I/O filters (external)" PRINT "$EXTERNAL_FILTERS" diff --git a/configure.in b/configure.in index 0b02238..56be2fd 100644 --- a/configure.in +++ b/configure.in @@ -167,13 +167,6 @@ case $host_os in ;; esac -AC_MSG_CHECKING([for sizeof hsize_t and hssize_t]) -AC_SUBST(HSIZET) -AC_MSG_RESULT([large]) -HSIZET=large -AC_DEFINE([HAVE_LARGE_HSIZET], [1], - [Define if it's safe to use `long long' for hsize_t and hssize_t]) - host_config="none" for f in $host_cpu-$host_vendor-$host_os \ $host_cpu-$host_vendor-$host_os_novers \ @@ -2713,12 +2706,6 @@ IF_ENABLED_DISABLED "$STRICT_FORMAT_CHECKS" PRINT_N " HDF5 v1.4 Compatibility" IF_YES_NO "$HDF5_V1_4_COMPAT" -PRINT_N " hsize_t" -case "$HSIZET" in - no|small) PRINT "Small" ;; - *) PRINT "Large" ;; -esac - PRINT_N " I/O filters (external)" PRINT "$EXTERNAL_FILTERS" diff --git a/fortran/config/gnu-flags b/fortran/config/gnu-flags index 00ed622..b391ebb 100644 --- a/fortran/config/gnu-flags +++ b/fortran/config/gnu-flags @@ -52,11 +52,10 @@ if test gcc = "$cc_vendor" -a "$cc_vers_all" -lt 2008001; then cat <rank; i++) { H5F_DECODE_LENGTH (f, p, sdim->size[i]); -#ifndef H5_HAVE_LARGE_HSIZET - /* Rudimentary check for overflow of the dimension size */ - if(sdim->size[i] == 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, NULL, "invalid size detected"); -#endif /* H5_HAVE_LARGE_HSIZET */ } /* end for */ if (flags & H5S_VALID_MAX) { diff --git a/src/H5config.h.in b/src/H5config.h.in index 85456f5..b87764a 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -121,9 +121,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_IO_H -/* Define if it's safe to use `long long' for hsize_t and hssize_t */ -#undef HAVE_LARGE_HSIZET - /* Define to 1 if you have the `crypto' library (-lcrypto). */ #undef HAVE_LIBCRYPTO diff --git a/src/H5private.h b/src/H5private.h index 4005b4d..6be0cfa 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -436,13 +436,8 @@ # define SIZET_MAX ((size_t)(ssize_t)(-1)) # define SSIZET_MAX ((ssize_t)(((size_t)1<<(8*sizeof(ssize_t)-1))-1)) #endif -#ifdef H5_HAVE_LARGE_HSIZET #define HSIZET_MAX ((hsize_t)ULLONG_MAX) #define HSSIZET_MAX ((hssize_t)LLONG_MAX) -#else /* H5_HAVE_LARGE_HSIZET */ -#define HSIZET_MAX ((hsize_t)SIZET_MAX) -#define HSSIZET_MAX ((hssize_t)SSIZET_MAX) -#endif /* H5_HAVE_LARGE_HSIZET */ #define HSSIZET_MIN (~(HSSIZET_MAX)) /* diff --git a/src/H5public.h b/src/H5public.h index 65ba74a..2784ad4 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -141,7 +141,6 @@ typedef __int64 ssize_t; * sizes are enabled then use a 64-bit data type, otherwise use the size of * memory objects. */ -#ifdef H5_HAVE_LARGE_HSIZET # if H5_SIZEOF_LONG_LONG>=8 typedef unsigned long long hsize_t; typedef signed long long hssize_t; @@ -151,11 +150,6 @@ typedef unsigned __int64 hsize_t; typedef signed __int64 hssize_t; # define H5_SIZEOF_HSIZE_T H5_SIZEOF___INT64 # endif -#else /* H5_HAVE_LARGE_HSIZET */ -typedef size_t hsize_t; -typedef ssize_t hssize_t; -# define H5_SIZEOF_HSIZE_T H5_SIZEOF_SIZE_T -#endif /* H5_HAVE_LARGE_HSIZET */ /* * File addresses have there own types. diff --git a/src/libhdf5.settings.in b/src/libhdf5.settings.in index 7a59673..0a54c4e 100644 --- a/src/libhdf5.settings.in +++ b/src/libhdf5.settings.in @@ -17,4 +17,3 @@ Archiver: @AR@ Ranlib: @RANLIB@ Debugged Packages: @DEBUG_PKG@ API Tracing: @TRACE_API@ -File addresses: @HSIZET@ diff --git a/test/big.c b/test/big.c index 1c0c9d8..477537a 100644 --- a/test/big.c +++ b/test/big.c @@ -579,12 +579,6 @@ main (int ac, char **av) usage(); goto quit; } - if (sizeof(hsize_t)<=4) { - puts("Test skipped because the hdf5 library was configured with the"); - puts("--disable-hsizet flag in order to work around a compiler bug."); - usage(); - goto quit; - } } /* Do the test with the Family Driver */ diff --git a/test/istore.c b/test/istore.c index 8fd55bf..4386bd1 100644 --- a/test/istore.c +++ b/test/istore.c @@ -47,11 +47,7 @@ const char *FILENAME[] = { #define TEST_DATATYPE H5T_NATIVE_UCHAR #define TEST_CHUNK_SIZE 50 -#ifdef H5_HAVE_LARGE_HSIZET #define TEST_SPARSE_SIZE 1000000 -#else /* H5_HAVE_LARGE_HSIZET */ -#define TEST_SPARSE_SIZE 1200 -#endif /* H5_HAVE_LARGE_HSIZET */ hsize_t chunk_dims[H5O_LAYOUT_NDIMS]; hsize_t zero[H5O_LAYOUT_NDIMS]; diff --git a/test/tfile.c b/test/tfile.c index 15a4373..f04e116 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -1220,11 +1220,7 @@ test_file_freespace(void) /* Check that there is the right amount of free space in the file */ free_space = H5Fget_freespace(file); CHECK(free_space, FAIL, "H5Fget_freespace"); -#ifdef H5_HAVE_LARGE_HSIZET VERIFY(free_space, 168, "H5Fget_freespace"); -#else /* H5_HAVE_LARGE_HSIZET */ - VERIFY(free_space, 76, "H5Fget_freespace"); -#endif /* H5_HAVE_LARGE_HSIZET */ /* Delete datasets in file */ for(u=0; u<10; u++) { @@ -1236,11 +1232,7 @@ test_file_freespace(void) /* Check that there is the right amount of free space in the file */ free_space = H5Fget_freespace(file); CHECK(free_space, FAIL, "H5Fget_freespace"); -#ifdef H5_HAVE_LARGE_HSIZET VERIFY(free_space, 3584, "H5Fget_freespace"); -#else /* H5_HAVE_LARGE_HSIZET */ - VERIFY(free_space, 3428, "H5Fget_freespace"); -#endif /* H5_HAVE_LARGE_HSIZET */ /* Close file */ ret = H5Fclose(file); -- cgit v0.12