summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2016-02-29 00:27:00 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2016-02-29 00:27:00 (GMT)
commit8249dc6e3d45b58aa734c1269c4735922cb5a168 (patch)
treea35fb122ef48436d1161dc2cbfffcb65e437990e
parent594189a67300329207f21198a2606175acc4b89e (diff)
parent8cd0b0aff8551345c84f75ea3c504a97cd87778b (diff)
downloadhdf5-8249dc6e3d45b58aa734c1269c4735922cb5a168.zip
hdf5-8249dc6e3d45b58aa734c1269c4735922cb5a168.tar.gz
hdf5-8249dc6e3d45b58aa734c1269c4735922cb5a168.tar.bz2
[svn-r29224] Brought alpha2 branch in sync with revise_chunks (up to r29219)
Note: generated autotools files are from a VM and not THG machines. These will be updated immediately after check-in. Tested on: 64-bit Ubuntu 15.10 w/ gcc 5.2.1 autotools serial w/ Fortran & C++ autotools parallel (MPICH 3.1.4) w/ Fortran CMake serial (cmakehdf5 w/ CMake 3.3.2)
-rw-r--r--MANIFEST48
-rw-r--r--Makefile.in14
-rwxr-xr-xbin/cmakehdf510
-rwxr-xr-xbin/config.guess11
-rwxr-xr-xbin/config.sub12
-rw-r--r--bin/ltmain.sh5446
-rw-r--r--c++/Makefile.in11
-rw-r--r--c++/examples/Makefile.in11
-rw-r--r--c++/src/H5AbstractDs.cpp3
-rw-r--r--c++/src/H5ArrayType.cpp123
-rw-r--r--c++/src/H5ArrayType.h3
-rw-r--r--c++/src/H5CompType.cpp11
-rw-r--r--c++/src/H5Library.cpp4
-rw-r--r--c++/src/Makefile.in11
-rw-r--r--c++/test/CMakeLists.txt1
-rw-r--r--c++/test/Makefile.am7
-rw-r--r--c++/test/Makefile.in28
-rw-r--r--c++/test/h5cpputil.h2
-rw-r--r--c++/test/tarray.cpp312
-rw-r--r--c++/test/testhdf5.cpp2
-rw-r--r--c++/test/ttypes.cpp1
-rw-r--r--config/cce-fflags19
-rw-r--r--config/cce-flags24
-rw-r--r--config/cmake/ConfigureChecks.cmake9
-rw-r--r--config/cmake/H5pubconf.h.in4
-rw-r--r--config/cmake/vfdTest.cmake4
-rw-r--r--config/cmake_ext_mod/prunTest.cmake4
-rw-r--r--config/cmake_ext_mod/runTest.cmake12
-rw-r--r--config/gnu-cxxflags819
-rw-r--r--config/gnu-fflags21
-rw-r--r--config/gnu-flags47
-rw-r--r--config/i686-pc-cygwin22
-rw-r--r--config/ibm-aix49
-rw-r--r--config/ibm-flags29
-rw-r--r--config/intel-fflags17
-rw-r--r--config/intel-flags25
-rw-r--r--config/linux-gnulibc131
-rw-r--r--config/pgi-fflags19
-rw-r--r--config/pgi-flags42
-rw-r--r--config/solaris91
-rw-r--r--config/x86_64-pc-cygwin23
-rwxr-xr-xconfigure5619
-rw-r--r--configure.ac862
-rw-r--r--examples/Makefile.in11
-rw-r--r--fortran/Makefile.in11
-rw-r--r--fortran/examples/Makefile.in11
-rw-r--r--fortran/src/CMakeLists.txt1
-rw-r--r--fortran/src/H5Dff.F902
-rw-r--r--fortran/src/H5Eff.F902
-rw-r--r--fortran/src/H5Fff.F902
-rw-r--r--fortran/src/H5Gff.F902
-rw-r--r--fortran/src/H5Off.F902
-rw-r--r--fortran/src/H5Pf.c2
-rw-r--r--fortran/src/H5Pff.F90517
-rw-r--r--fortran/src/H5Rff.F902
-rw-r--r--fortran/src/H5Sff.F90122
-rw-r--r--fortran/src/H5_buildiface.F902
-rw-r--r--fortran/src/H5_f.c4
-rw-r--r--fortran/src/H5f90.h2
-rw-r--r--fortran/src/H5f90global.F9023
-rw-r--r--fortran/src/H5fortkit.F9058
-rw-r--r--fortran/src/HDF5.F902
-rw-r--r--fortran/src/Makefile.am6
-rw-r--r--fortran/src/Makefile.in36
-rw-r--r--fortran/src/hdf5_fortrandll.def.in12
-rw-r--r--fortran/test/Makefile.in11
-rw-r--r--fortran/test/fortranlib_test_F03.F908
-rw-r--r--fortran/test/tH5P_F03.F90472
-rw-r--r--fortran/testpar/Makefile.in11
-rw-r--r--hl/Makefile.in11
-rw-r--r--hl/c++/Makefile.in11
-rw-r--r--hl/c++/examples/Makefile.in11
-rw-r--r--hl/c++/src/Makefile.in11
-rw-r--r--hl/c++/test/Makefile.in11
-rw-r--r--hl/examples/Makefile.in11
-rw-r--r--hl/fortran/Makefile.in11
-rw-r--r--hl/fortran/examples/Makefile.in11
-rw-r--r--hl/fortran/src/Makefile.in11
-rw-r--r--hl/fortran/test/Makefile.in11
-rw-r--r--hl/src/Makefile.in11
-rw-r--r--hl/test/Makefile.in11
-rw-r--r--hl/tools/Makefile.in11
-rw-r--r--hl/tools/gif2h5/Makefile.in11
-rw-r--r--hl/tools/gif2h5/h52giftest.sh.in2
-rw-r--r--hl/tools/h5watch/Makefile.in11
-rw-r--r--m4/libtool.m42546
-rw-r--r--m4/ltoptions.m4127
-rw-r--r--m4/ltsugar.m47
-rw-r--r--m4/ltversion.m412
-rw-r--r--m4/lt~obsolete.m47
-rw-r--r--src/CMakeLists.txt6
-rw-r--r--src/H5.c138
-rw-r--r--src/H5A.c174
-rw-r--r--src/H5AC.c90
-rw-r--r--src/H5ACmpio.c42
-rw-r--r--src/H5ACprivate.h11
-rw-r--r--src/H5Abtree2.c8
-rw-r--r--src/H5Adeprec.c8
-rw-r--r--src/H5Aint.c4
-rw-r--r--src/H5Atest.c2
-rw-r--r--src/H5B.c11
-rw-r--r--src/H5B2.c90
-rw-r--r--src/H5B2cache.c4
-rw-r--r--src/H5B2dbg.c44
-rw-r--r--src/H5B2hdr.c4
-rw-r--r--src/H5B2int.c578
-rw-r--r--src/H5B2pkg.h34
-rw-r--r--src/H5B2private.h5
-rw-r--r--src/H5B2test.c168
-rw-r--r--src/H5Bcache.c2
-rw-r--r--src/H5C.c201
-rw-r--r--src/H5Cmpio.c5
-rw-r--r--src/H5Cprivate.h8
-rw-r--r--src/H5D.c84
-rw-r--r--src/H5Dbtree2.c166
-rw-r--r--src/H5Dchunk.c169
-rw-r--r--src/H5Dcontig.c9
-rw-r--r--src/H5Ddbg.c2
-rw-r--r--src/H5Ddeprec.c2
-rw-r--r--src/H5Dfill.c2
-rw-r--r--src/H5Dint.c139
-rw-r--r--src/H5Dpkg.h13
-rw-r--r--src/H5Edefin.h234
-rw-r--r--src/H5Einit.h766
-rw-r--r--src/H5Epubgen.h428
-rw-r--r--src/H5Eterm.h236
-rw-r--r--src/H5F.c82
-rw-r--r--src/H5FDcore.c4
-rw-r--r--src/H5FDmpio.c9
-rw-r--r--src/H5FDprivate.h8
-rw-r--r--src/H5FDstdio.c21
-rw-r--r--src/H5Faccum.c35
-rw-r--r--src/H5Fdeprec.c4
-rw-r--r--src/H5Fint.c22
-rw-r--r--src/H5Fmpi.c69
-rw-r--r--src/H5Fpkg.h3
-rw-r--r--src/H5Fprivate.h3
-rw-r--r--src/H5Fpublic.h24
-rw-r--r--src/H5Fsuper_cache.c3
-rw-r--r--src/H5Ftest.c2
-rw-r--r--src/H5G.c69
-rw-r--r--src/H5Gbtree2.c8
-rw-r--r--src/H5Gcache.c2
-rw-r--r--src/H5Gdeprec.c22
-rw-r--r--src/H5Gint.c12
-rw-r--r--src/H5Gprivate.h7
-rw-r--r--src/H5Gtest.c16
-rw-r--r--src/H5HFbtree2.c57
-rw-r--r--src/H5HFdblock.c4
-rw-r--r--src/H5HFtiny.c5
-rw-r--r--src/H5HG.c16
-rw-r--r--src/H5HLcache.c2
-rw-r--r--src/H5I.c2
-rw-r--r--src/H5Itest.c2
-rw-r--r--src/H5L.c364
-rw-r--r--src/H5Lexternal.c11
-rw-r--r--src/H5Lprivate.h2
-rw-r--r--src/H5MF.c185
-rw-r--r--src/H5MFprivate.h10
-rw-r--r--src/H5O.c107
-rw-r--r--src/H5Ocache.c6
-rw-r--r--src/H5Ocopy.c26
-rw-r--r--src/H5Ofill.c4
-rw-r--r--src/H5Olayout.c2
-rw-r--r--src/H5Oproxy.c6
-rw-r--r--src/H5Otest.c50
-rw-r--r--src/H5Pdcpl.c33
-rw-r--r--src/H5Pfapl.c14
-rw-r--r--src/H5Pint.c100
-rw-r--r--src/H5Ppkg.h27
-rw-r--r--src/H5Pprivate.h46
-rw-r--r--src/H5Ppublic.h4
-rw-r--r--src/H5R.c8
-rw-r--r--src/H5Rdeprec.c4
-rw-r--r--src/H5SM.c14
-rw-r--r--src/H5SMbtree2.c44
-rw-r--r--src/H5SMcache.c3
-rw-r--r--src/H5STprivate.h4
-rw-r--r--src/H5T.c362
-rw-r--r--src/H5TS.c17
-rw-r--r--src/H5Tcommit.c39
-rw-r--r--src/H5Tdeprec.c2
-rw-r--r--src/H5Tvlen.c8
-rw-r--r--src/H5Zscaleoffset.c6
-rw-r--r--src/H5Ztrans.c4
-rw-r--r--src/H5config.h.in44
-rw-r--r--src/H5private.h77
-rw-r--r--src/Makefile.in11
-rw-r--r--src/libhdf5.settings.in71
-rw-r--r--test/CMakeLists.txt81
-rw-r--r--test/Makefile.in11
-rw-r--r--test/btree2.c2626
-rw-r--r--test/cache_common.c4
-rw-r--r--test/cache_tagging.c14
-rw-r--r--test/dsets.c276
-rw-r--r--test/dtypes.c99
-rw-r--r--test/external.c1216
-rw-r--r--test/fheap.c10
-rw-r--r--test/file_image.c4
-rw-r--r--test/gen_udlinks.c3
-rw-r--r--test/h5test.c294
-rw-r--r--test/h5test.h17
-rw-r--r--test/links.c59
-rw-r--r--test/objcopy.c162
-rw-r--r--test/swmr_addrem_writer.c68
-rw-r--r--test/swmr_check_compat_vfd.c9
-rw-r--r--test/swmr_common.c46
-rw-r--r--test/swmr_common.h12
-rw-r--r--test/swmr_generator.c56
-rw-r--r--test/swmr_reader.c117
-rw-r--r--test/swmr_remove_reader.c119
-rw-r--r--test/swmr_remove_writer.c80
-rw-r--r--test/swmr_sparse_reader.c102
-rw-r--r--test/swmr_sparse_writer.c57
-rw-r--r--test/swmr_start_write.c166
-rw-r--r--test/swmr_writer.c76
-rw-r--r--test/testswmr.sh.in24
-rw-r--r--test/tgenprop.c4
-rw-r--r--test/tmisc.c16
-rw-r--r--test/tvlstr.c11
-rw-r--r--test/vds_swmr_reader.c2
-rw-r--r--test/vds_swmr_writer.c6
-rw-r--r--testpar/Makefile.in11
-rw-r--r--tools/Makefile.in11
-rw-r--r--tools/h5copy/Makefile.in11
-rw-r--r--tools/h5diff/Makefile.in11
-rw-r--r--tools/h5dump/CMakeTestsVDS.cmake28
-rw-r--r--tools/h5dump/Makefile.in11
-rw-r--r--tools/h5dump/errfiles/tdset-2.err2
-rw-r--r--tools/h5dump/errfiles/tperror.err2
-rw-r--r--tools/h5dump/h5dump.c16
-rw-r--r--tools/h5dump/h5dump.h2
-rw-r--r--tools/h5dump/h5dump_ddl.c306
-rw-r--r--tools/h5dump/h5dump_extern.h2
-rw-r--r--tools/h5dump/testh5dumpvds.sh.in18
-rw-r--r--tools/h5format_convert/Makefile.in11
-rw-r--r--tools/h5format_convert/h5fc_gentest.c649
-rw-r--r--tools/h5format_convert/h5format_convert.c136
-rw-r--r--tools/h5format_convert/testfiles/h5fc_d_file.ddl14
-rw-r--r--tools/h5format_convert/testfiles/h5fc_dname.ddl14
-rw-r--r--tools/h5format_convert/testfiles/h5fc_ext1_f.ddl58
-rw-r--r--tools/h5format_convert/testfiles/h5fc_ext1_f.h5bin0 -> 6760 bytes
-rw-r--r--tools/h5format_convert/testfiles/h5fc_ext1_i.ddl58
-rw-r--r--tools/h5format_convert/testfiles/h5fc_ext1_i.h5bin0 -> 6526 bytes
-rw-r--r--tools/h5format_convert/testfiles/h5fc_ext1_s.ddl58
-rw-r--r--tools/h5format_convert/testfiles/h5fc_ext1_s.h5bin0 -> 6592 bytes
-rw-r--r--tools/h5format_convert/testfiles/h5fc_ext2_if.ddl58
-rw-r--r--tools/h5format_convert/testfiles/h5fc_ext2_if.h5bin0 -> 6526 bytes
-rw-r--r--tools/h5format_convert/testfiles/h5fc_ext2_is.ddl58
-rw-r--r--tools/h5format_convert/testfiles/h5fc_ext2_is.h5bin0 -> 6642 bytes
-rw-r--r--tools/h5format_convert/testfiles/h5fc_ext2_sf.ddl58
-rw-r--r--tools/h5format_convert/testfiles/h5fc_ext2_sf.h5bin0 -> 5076 bytes
-rw-r--r--tools/h5format_convert/testfiles/h5fc_ext3_isf.ddl58
-rw-r--r--tools/h5format_convert/testfiles/h5fc_ext3_isf.h5bin0 -> 6679 bytes
-rw-r--r--tools/h5format_convert/testfiles/h5fc_ext_none.h5 (renamed from tools/h5format_convert/testfiles/h5fc_latest_v3.h5)bin6130 -> 6474 bytes
-rw-r--r--tools/h5format_convert/testfiles/h5fc_help.ddl14
-rw-r--r--tools/h5format_convert/testfiles/h5fc_non_v3.h5bin4336 -> 6896 bytes
-rw-r--r--tools/h5format_convert/testfiles/h5fc_nooption.ddl14
-rw-r--r--tools/h5format_convert/testfiles/h5fc_v_all.ddl68
-rw-r--r--tools/h5format_convert/testfiles/h5fc_v_bt1.ddl8
-rw-r--r--tools/h5format_convert/testfiles/h5fc_v_n_1d.ddl6
-rw-r--r--tools/h5format_convert/testfiles/h5fc_v_n_all.ddl34
-rw-r--r--tools/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl8
-rw-r--r--tools/h5format_convert/testfiles/h5fc_v_non_chunked.ddl8
-rw-r--r--tools/h5format_convert/testfiles/old_h5fc_ext1_f.ddl58
-rw-r--r--tools/h5format_convert/testfiles/old_h5fc_ext1_f.h5bin0 -> 19987 bytes
-rw-r--r--tools/h5format_convert/testfiles/old_h5fc_ext1_i.ddl58
-rw-r--r--tools/h5format_convert/testfiles/old_h5fc_ext1_i.h5bin0 -> 32716 bytes
-rw-r--r--tools/h5format_convert/testfiles/old_h5fc_ext1_s.ddl58
-rw-r--r--tools/h5format_convert/testfiles/old_h5fc_ext1_s.h5bin0 -> 20032 bytes
-rw-r--r--tools/h5format_convert/testfiles/old_h5fc_ext2_if.ddl58
-rw-r--r--tools/h5format_convert/testfiles/old_h5fc_ext2_if.h5bin0 -> 32720 bytes
-rw-r--r--tools/h5format_convert/testfiles/old_h5fc_ext2_is.ddl58
-rw-r--r--tools/h5format_convert/testfiles/old_h5fc_ext2_is.h5bin0 -> 32872 bytes
-rw-r--r--tools/h5format_convert/testfiles/old_h5fc_ext2_sf.ddl58
-rw-r--r--tools/h5format_convert/testfiles/old_h5fc_ext2_sf.h5bin0 -> 18512 bytes
-rw-r--r--tools/h5format_convert/testfiles/old_h5fc_ext3_isf.ddl58
-rw-r--r--tools/h5format_convert/testfiles/old_h5fc_ext3_isf.h5bin0 -> 32896 bytes
-rw-r--r--tools/h5format_convert/testfiles/old_h5fc_ext_none.h5bin0 -> 19912 bytes
-rw-r--r--tools/h5format_convert/testh5fc.sh.in188
-rw-r--r--tools/h5import/Makefile.in11
-rw-r--r--tools/h5jam/Makefile.in11
-rw-r--r--tools/h5ls/Makefile.in11
-rw-r--r--tools/h5ls/h5ls.c5
-rw-r--r--tools/h5repack/CMakeLists.txt6
-rw-r--r--tools/h5repack/Makefile.in11
-rw-r--r--tools/h5stat/Makefile.in11
-rw-r--r--tools/lib/CMakeLists.txt2
-rw-r--r--tools/lib/Makefile.in11
-rw-r--r--tools/misc/Makefile.in11
-rw-r--r--tools/misc/h5debug.c4
-rw-r--r--tools/misc/vds/Makefile.in11
-rw-r--r--tools/perform/Makefile.in11
-rw-r--r--tools/testfiles/h5dump-help.txt2
-rw-r--r--tools/testfiles/pbits/tnofilename-with-packed-bits.ddl2
-rw-r--r--tools/testfiles/pbits/tpbitsIncomplete.ddl2
-rw-r--r--tools/testfiles/pbits/tpbitsLengthExceeded.ddl2
-rw-r--r--tools/testfiles/pbits/tpbitsLengthPositive.ddl2
-rw-r--r--tools/testfiles/pbits/tpbitsMaxExceeded.ddl2
-rw-r--r--tools/testfiles/pbits/tpbitsOffsetExceeded.ddl2
-rw-r--r--tools/testfiles/pbits/tpbitsOffsetNegative.ddl2
-rw-r--r--tools/testfiles/vds/a.h5 (renamed from tools/h5format_convert/testfiles/h5fc_v1.h5)bin8252 -> 7736 bytes
-rw-r--r--tools/testfiles/vds/b.h5bin0 -> 7736 bytes
-rw-r--r--tools/testfiles/vds/c.h5bin0 -> 7736 bytes
-rw-r--r--tools/testfiles/vds/d.h5bin0 -> 7736 bytes
-rw-r--r--tools/testfiles/vds/f-0.h5bin0 -> 4144 bytes
-rw-r--r--tools/testfiles/vds/f-3.h5bin0 -> 4144 bytes
-rw-r--r--tools/testfiles/vds/vds-eiger.h5bin0 -> 5496 bytes
-rw-r--r--tools/testfiles/vds/vds-first.ddl210
-rw-r--r--tools/testfiles/vds/vds-gap1.ddl58
-rw-r--r--tools/testfiles/vds/vds-gap2.ddl210
-rw-r--r--tools/testfiles/vds/vds-percival-unlim-maxmin.h5bin0 -> 5496 bytes
-rw-r--r--tools/testfiles/vds/vds_layout-eiger.ddl87
-rw-r--r--tools/testfiles/vds/vds_layout-maxmin.ddl422
314 files changed, 20113 insertions, 13446 deletions
diff --git a/MANIFEST b/MANIFEST
index 78405b9..a5f3dac 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -81,6 +81,7 @@
./config/conclude_fc.am
./config/examples.am
./config/freebsd
+./config/gnu-cxxflags
./config/gnu-fflags
./config/gnu-flags
./config/i386-pc-cygwin32
@@ -215,6 +216,7 @@
./fortran/src/H5f90global.F90
./fortran/src/H5f90i.h
./fortran/src/H5f90kit.c
+./fortran/src/H5fortkit.F90
./fortran/src/H5f90proto.h
./fortran/src/H5match_types.c
./fortran/src/HDF5.F90
@@ -381,6 +383,7 @@
./c++/test/dsets.cpp
./c++/test/h5cpputil.cpp
./c++/test/h5cpputil.h
+./c++/test/tarray.cpp
./c++/test/tattr.cpp
./c++/test/tcompound.cpp
./c++/test/tdspl.cpp
@@ -1282,9 +1285,37 @@
./tools/h5format_convert/testfiles/h5fc_v_n_1d.ddl
./tools/h5format_convert/testfiles/h5fc_nonexistfile.ddl
./tools/h5format_convert/testfiles/h5fc_non_v3.h5
-./tools/h5format_convert/testfiles/h5fc_latest_v3.h5
./tools/h5format_convert/testfiles/h5fc_edge_v3.h5
-./tools/h5format_convert/testfiles/h5fc_v1.h5
+./tools/h5format_convert/testfiles/h5fc_ext1_f.h5
+./tools/h5format_convert/testfiles/h5fc_ext1_i.h5
+./tools/h5format_convert/testfiles/h5fc_ext1_s.h5
+./tools/h5format_convert/testfiles/h5fc_ext2_if.h5
+./tools/h5format_convert/testfiles/h5fc_ext2_is.h5
+./tools/h5format_convert/testfiles/h5fc_ext2_sf.h5
+./tools/h5format_convert/testfiles/h5fc_ext3_isf.h5
+./tools/h5format_convert/testfiles/h5fc_ext_none.h5
+./tools/h5format_convert/testfiles/old_h5fc_ext1_f.h5
+./tools/h5format_convert/testfiles/old_h5fc_ext1_i.h5
+./tools/h5format_convert/testfiles/old_h5fc_ext1_s.h5
+./tools/h5format_convert/testfiles/old_h5fc_ext2_if.h5
+./tools/h5format_convert/testfiles/old_h5fc_ext2_is.h5
+./tools/h5format_convert/testfiles/old_h5fc_ext2_sf.h5
+./tools/h5format_convert/testfiles/old_h5fc_ext3_isf.h5
+./tools/h5format_convert/testfiles/old_h5fc_ext_none.h5
+./tools/h5format_convert/testfiles/h5fc_ext1_f.ddl
+./tools/h5format_convert/testfiles/h5fc_ext1_i.ddl
+./tools/h5format_convert/testfiles/h5fc_ext1_s.ddl
+./tools/h5format_convert/testfiles/h5fc_ext2_if.ddl
+./tools/h5format_convert/testfiles/h5fc_ext2_is.ddl
+./tools/h5format_convert/testfiles/h5fc_ext2_sf.ddl
+./tools/h5format_convert/testfiles/h5fc_ext3_isf.ddl
+./tools/h5format_convert/testfiles/old_h5fc_ext1_f.ddl
+./tools/h5format_convert/testfiles/old_h5fc_ext1_i.ddl
+./tools/h5format_convert/testfiles/old_h5fc_ext1_s.ddl
+./tools/h5format_convert/testfiles/old_h5fc_ext2_if.ddl
+./tools/h5format_convert/testfiles/old_h5fc_ext2_is.ddl
+./tools/h5format_convert/testfiles/old_h5fc_ext2_sf.ddl
+./tools/h5format_convert/testfiles/old_h5fc_ext3_isf.ddl
./tools/h5format_convert/testh5fc.sh.in
# h5repack sources
@@ -1813,6 +1844,11 @@
./tools/testfiles/vds/tvds_layout-3_2.ddl
./tools/testfiles/vds/tvds_layout-4.ddl
./tools/testfiles/vds/tvds_layout-5.ddl
+./tools/testfiles/vds/vds-first.ddl
+./tools/testfiles/vds/vds-gap1.ddl
+./tools/testfiles/vds/vds-gap2.ddl
+./tools/testfiles/vds/vds_layout-eiger.ddl
+./tools/testfiles/vds/vds_layout-maxmin.ddl
./tools/testfiles/vds/1_a.h5
./tools/testfiles/vds/1_b.h5
./tools/testfiles/vds/1_c.h5
@@ -1836,6 +1872,14 @@
./tools/testfiles/vds/5_b.h5
./tools/testfiles/vds/5_c.h5
./tools/testfiles/vds/5_vds.h5
+./tools/testfiles/vds/a.h5
+./tools/testfiles/vds/b.h5
+./tools/testfiles/vds/c.h5
+./tools/testfiles/vds/d.h5
+./tools/testfiles/vds/vds-percival-unlim-maxmin.h5
+./tools/testfiles/vds/f-0.h5
+./tools/testfiles/vds/f-3.h5
+./tools/testfiles/vds/vds-eiger.h5
# h5dump h5import validation
./tools/testfiles/out3.h5import
diff --git a/Makefile.in b/Makefile.in
index caef5fb..93cfbef 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -198,7 +198,8 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/bin/compile \
$(top_srcdir)/bin/install-sh $(top_srcdir)/bin/ltmain.sh \
$(top_srcdir)/bin/missing $(top_srcdir)/config/commence.am \
COPYING bin/COPYING bin/README bin/compile bin/config.guess \
- bin/config.sub bin/install-sh bin/ltmain.sh bin/missing
+ bin/config.sub bin/depcomp bin/install-sh bin/ltmain.sh \
+ bin/missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -257,16 +258,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -279,7 +281,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -341,8 +342,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -353,11 +354,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -365,6 +366,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -388,6 +390,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -403,6 +406,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/bin/cmakehdf5 b/bin/cmakehdf5
index 7d9caa8..ccef469 100755
--- a/bin/cmakehdf5
+++ b/bin/cmakehdf5
@@ -46,6 +46,7 @@ cacheinit=$srcdir/config/cmake/cacheinit.cmake
build_cpp_lib=-DHDF5_BUILD_CPP_LIB:BOOL=OFF # C++ interface default off
build_fortran=-DHDF5_BUILD_FORTRAN:BOOL=OFF # Fortran interface default off
build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=ON # High Level interface default on
+build_threadsafe=-DHDF5_ENABLE_THREADSAFE:BOOL=OFF # Threadsafe feature default off
build_testing=-DBUILD_TESTING:BOOL=ON # Build tests default on
build_tools=-DHDF5_BUILD_TOOLS:BOOL=ON # Build tools default on
with_zlib=-DHDF5_ENABLE_Z_LIB_SUPPORT=ON # enable zlib filter default on
@@ -82,6 +83,8 @@ Usage: $progname [<options>]
enable or disable c++ API. Default is off.
--enable-hl | --disable-hl:
enable or disable high level API. Default is on.
+ --enable-threadsafe | --disable-threadsafe:
+ enable or disable threadsafe feature. Default is off
--enable-shared | --disable-shared:
enable or disable shared lib. Default is on.
--enable-tools | --disable-tools:
@@ -229,6 +232,12 @@ while [ $# -gt 0 ]; do
--disable-hl)
build_hl_lib=-DHDF5_BUILD_HL_LIB:BOOL=OFF
;;
+ --enable-threadsafe)
+ build_threadsafe=-DHDF5_ENABLE_THREADSAFE:BOOL=ON
+ ;;
+ --disable-threadsafe)
+ build_threadsafe=-DHDF5_ENABLE_THREADSAFE:BOOL=OFF
+ ;;
--enable-shared)
shared_lib=-DBUILD_SHARED_LIBS:BOOL=ON
;;
@@ -330,6 +339,7 @@ STEP "Configure..." \
$build_cpp_lib \
$build_fortran \
$build_hl_lib \
+ $build_threadsafe \
$shared_lib \
$build_testing \
$build_tools \
diff --git a/bin/config.guess b/bin/config.guess
index 6c32c86..1f5c50c 100755
--- a/bin/config.guess
+++ b/bin/config.guess
@@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2014 Free Software Foundation, Inc.
-timestamp='2014-11-04'
+timestamp='2014-03-23'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -24,12 +24,12 @@ timestamp='2014-11-04'
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
-# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+# Originally written by Per Bothner.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
#
-# Please send patches to <config-patches@gnu.org>.
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -579,9 +579,8 @@ EOF
else
IBM_ARCH=powerpc
fi
- if [ -x /usr/bin/lslpp ] ; then
- IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
- awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
diff --git a/bin/config.sub b/bin/config.sub
index 7ffe373..bba4efb 100755
--- a/bin/config.sub
+++ b/bin/config.sub
@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2014 Free Software Foundation, Inc.
-timestamp='2014-12-03'
+timestamp='2014-09-11'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ timestamp='2014-12-03'
# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches to <config-patches@gnu.org>.
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -313,7 +313,6 @@ case $basic_machine in
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
- | visium \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
@@ -328,9 +327,6 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
- leon|leon[3-9])
- basic_machine=sparc-$basic_machine
- ;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
@@ -441,7 +437,6 @@ case $basic_machine in
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
- | visium-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -779,9 +774,6 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
- leon-*|leon[3-9]-*)
- basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
- ;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
diff --git a/bin/ltmain.sh b/bin/ltmain.sh
index 0f0a2da..bffda54 100644
--- a/bin/ltmain.sh
+++ b/bin/ltmain.sh
@@ -1,12 +1,9 @@
-#! /bin/sh
-## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
-## by inline-source v2014-01-03.01
-# libtool (GNU libtool) 2.4.6
-# Provide generalized library-building support services.
+# libtool (GNU libtool) 2.4.2
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-# Copyright (C) 1996-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -26,2112 +23,881 @@
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
-PROGRAM=libtool
-PACKAGE=libtool
-VERSION=2.4.6
-package_revision=2.4.6
-
-
-## ------ ##
-## Usage. ##
-## ------ ##
-
-# Run './libtool --help' for help with using this script from the
-# command line.
-
-
-## ------------------------------- ##
-## User overridable command paths. ##
-## ------------------------------- ##
-
-# After configure completes, it has a better idea of some of the
-# shell tools we need than the defaults used by the functions shared
-# with bootstrap, so set those here where they can still be over-
-# ridden by the user, but otherwise take precedence.
-
-: ${AUTOCONF="autoconf"}
-: ${AUTOMAKE="automake"}
-
-
-## -------------------------- ##
-## Source external libraries. ##
-## -------------------------- ##
-
-# Much of our low-level functionality needs to be sourced from external
-# libraries, which are installed to $pkgauxdir.
-
-# Set a version string for this script.
-scriptversion=2015-01-20.17; # UTC
-
-# General shell script boiler plate, and helper functions.
-# Written by Gary V. Vaughan, 2004
-
-# Copyright (C) 2004-2015 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions. There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-
-# As a special exception to the GNU General Public License, if you distribute
-# this file as part of a program or library that is built using GNU Libtool,
-# you may include this file under the same distribution terms that you use
-# for the rest of that program.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Please report bugs or propose patches to gary@gnu.org.
-
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-## ------ ##
-## Usage. ##
-## ------ ##
-
-# Evaluate this file near the top of your script to gain access to
-# the functions and variables defined here:
+# Usage: $progname [OPTION]... [MODE-ARG]...
#
-# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
+# Provide generalized library-building support services.
#
-# If you need to override any of the default environment variable
-# settings, do that before evaluating this file.
-
-
-## -------------------- ##
-## Shell normalisation. ##
-## -------------------- ##
+# --config show all configuration variables
+# --debug enable verbose shell tracing
+# -n, --dry-run display commands without modifying any files
+# --features display basic configuration information and exit
+# --mode=MODE use operation mode MODE
+# --preserve-dup-deps don't remove duplicate dependency libraries
+# --quiet, --silent don't print informational messages
+# --no-quiet, --no-silent
+# print informational messages (default)
+# --no-warn don't display warning messages
+# --tag=TAG use configuration variables from tag TAG
+# -v, --verbose print more informational messages than default
+# --no-verbose don't print the extra informational messages
+# --version print version information
+# -h, --help, --help-all print short, long, or detailed help message
+#
+# MODE must be one of the following:
+#
+# clean remove files from the build directory
+# compile compile a source file into a libtool object
+# execute automatically set library path, then run a program
+# finish complete the installation of libtool libraries
+# install install libraries or executables
+# link create a library or an executable
+# uninstall remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE. When passed as first option,
+# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+# host-triplet: $host
+# shell: $SHELL
+# compiler: $LTCC
+# compiler flags: $LTCFLAGS
+# linker: $LD (gnu? $with_gnu_ld)
+# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.11
+# automake: $automake_version
+# autoconf: $autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+# General help using GNU software: <http://www.gnu.org/gethelp/>.
-# Some shells need a little help to be as Bourne compatible as possible.
-# Before doing anything else, make sure all that help has been provided!
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION="2.4.2 Debian-2.4.2-1.11"
+TIMESTAMP=""
+package_revision=1.3337
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
-# NLS nuisances: We save the old values in case they are required later.
-_G_user_locale=
-_G_safe_locale=
-for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-do
- eval "if test set = \"\${$_G_var+set}\"; then
- save_$_G_var=\$$_G_var
- $_G_var=C
- export $_G_var
- _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
- _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
- fi"
-done
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-# Make sure IFS has a sensible default
-sp=' '
-nl='
-'
-IFS="$sp $nl"
-
-# There are apparently some retarded systems that use ';' as a PATH separator!
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-
-
-## ------------------------- ##
-## Locate command utilities. ##
-## ------------------------- ##
-
-
-# func_executable_p FILE
-# ----------------------
-# Check that FILE is an executable regular file.
-func_executable_p ()
-{
- test -f "$1" && test -x "$1"
-}
-
-
-# func_path_progs PROGS_LIST CHECK_FUNC [PATH]
-# --------------------------------------------
-# Search for either a program that responds to --version with output
-# containing "GNU", or else returned by CHECK_FUNC otherwise, by
-# trying all the directories in PATH with each of the elements of
-# PROGS_LIST.
-#
-# CHECK_FUNC should accept the path to a candidate program, and
-# set $func_check_prog_result if it truncates its output less than
-# $_G_path_prog_max characters.
-func_path_progs ()
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
{
- _G_progs_list=$1
- _G_check_func=$2
- _G_PATH=${3-"$PATH"}
-
- _G_path_prog_max=0
- _G_path_prog_found=false
- _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
- for _G_dir in $_G_PATH; do
- IFS=$_G_save_IFS
- test -z "$_G_dir" && _G_dir=.
- for _G_prog_name in $_G_progs_list; do
- for _exeext in '' .EXE; do
- _G_path_prog=$_G_dir/$_G_prog_name$_exeext
- func_executable_p "$_G_path_prog" || continue
- case `"$_G_path_prog" --version 2>&1` in
- *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
- *) $_G_check_func $_G_path_prog
- func_path_progs_result=$func_check_prog_result
- ;;
- esac
- $_G_path_prog_found && break 3
- done
- done
- done
- IFS=$_G_save_IFS
- test -z "$func_path_progs_result" && {
- echo "no acceptable sed could be found in \$PATH" >&2
- exit 1
- }
-}
-
-
-# We want to be able to use the functions in this file before configure
-# has figured out where the best binaries are kept, which means we have
-# to search for them ourselves - except when the results are already set
-# where we skip the searches.
-
-# Unless the user overrides by setting SED, search the path for either GNU
-# sed, or the sed that truncates its output the least.
-test -z "$SED" && {
- _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
- for _G_i in 1 2 3 4 5 6 7; do
- _G_sed_script=$_G_sed_script$nl$_G_sed_script
- done
- echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
- _G_sed_script=
-
- func_check_prog_sed ()
- {
- _G_path_prog=$1
-
- _G_count=0
- printf 0123456789 >conftest.in
- while :
- do
- cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
- cp conftest.in conftest.nl
- echo '' >> conftest.nl
- "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
- diff conftest.out conftest.nl >/dev/null 2>&1 || break
- _G_count=`expr $_G_count + 1`
- if test "$_G_count" -gt "$_G_path_prog_max"; then
- # Best one so far, save it but keep looking for a better one
- func_check_prog_result=$_G_path_prog
- _G_path_prog_max=$_G_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test 10 -lt "$_G_count" && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out
- }
-
- func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
- rm -f conftest.sed
- SED=$func_path_progs_result
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
}
+# NLS nuisances: We save the old values to restore during execute mode.
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+ fi"
+done
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
-# Unless the user overrides by setting GREP, search the path for either GNU
-# grep, or the grep that truncates its output the least.
-test -z "$GREP" && {
- func_check_prog_grep ()
- {
- _G_path_prog=$1
-
- _G_count=0
- _G_path_prog_max=0
- printf 0123456789 >conftest.in
- while :
- do
- cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
- cp conftest.in conftest.nl
- echo 'GREP' >> conftest.nl
- "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
- diff conftest.out conftest.nl >/dev/null 2>&1 || break
- _G_count=`expr $_G_count + 1`
- if test "$_G_count" -gt "$_G_path_prog_max"; then
- # Best one so far, save it but keep looking for a better one
- func_check_prog_result=$_G_path_prog
- _G_path_prog_max=$_G_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test 10 -lt "$_G_count" && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out
- }
+$lt_unset CDPATH
- func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
- GREP=$func_path_progs_result
-}
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
-## ------------------------------- ##
-## User overridable command paths. ##
-## ------------------------------- ##
-# All uppercase variable names are used for environment variables. These
-# variables can be overridden by the user before calling a script that
-# uses them if a suitable command of that name is not already available
-# in the command search PATH.
: ${CP="cp -f"}
-: ${ECHO="printf %s\n"}
-: ${EGREP="$GREP -E"}
-: ${FGREP="$GREP -F"}
-: ${LN_S="ln -s"}
+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
: ${MAKE="make"}
: ${MKDIR="mkdir"}
: ${MV="mv -f"}
: ${RM="rm -f"}
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
-## -------------------- ##
-## Useful sed snippets. ##
-## -------------------- ##
+exit_status=$EXIT_SUCCESS
-sed_dirname='s|/[^/]*$||'
-sed_basename='s|^.*/||'
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" $lt_nl"
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
-# Same as above, but do not quote variable references.
-sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+} # func_dirname may be replaced by extended shell implementation
-# Sed substitution that turns a string into a regex matching for the
-# string literally.
-sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
-# Sed substitution that converts a w32 file name or path
-# that contains forward slashes, into one that contains
-# (escaped) backslashes. A very naive implementation.
-sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
-
-# Re-'\' parameter expansions in output of sed_double_quote_subst that
-# were '\'-ed in input to the same. If an odd number of '\' preceded a
-# '$' in input to sed_double_quote_subst, that '$' was protected from
-# expansion. Since each input '\' is now two '\'s, look for any number
-# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'.
-_G_bs='\\'
-_G_bs2='\\\\'
-_G_bs4='\\\\\\\\'
-_G_dollar='\$'
-sed_double_backslash="\
- s/$_G_bs4/&\\
-/g
- s/^$_G_bs2$_G_dollar/$_G_bs&/
- s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
- s/\n//g"
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+} # func_basename may be replaced by extended shell implementation
+
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
+} # func_dirname_and_basename may be replaced by extended shell implementation
-## ----------------- ##
-## Global variables. ##
-## ----------------- ##
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+ esac
+} # func_stripname may be replaced by extended shell implementation
-# Except for the global variables explicitly listed below, the following
-# functions in the '^func_' namespace, and the '^require_' namespace
-# variables initialised in the 'Resource management' section, sourcing
-# this file will not pollute your global namespace with anything
-# else. There's no portable way to scope variables in Bourne shell
-# though, so actually running these functions will sometimes place
-# results into a variable named after the function, and often use
-# temporary variables in the '^_G_' namespace. If you are careful to
-# avoid using those namespaces casually in your sourcing script, things
-# should continue to work as you expect. And, of course, you can freely
-# overwrite any of the functions or variables defined here before
-# calling anything to customize them.
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
-EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+# These SED scripts presuppose an absolute path with a trailing slash.
+pathcar='s,^/\([^/]*\).*$,\1,'
+pathcdr='s,^/[^/]*,,'
+removedotparts=':dotsl
+ s@/\./@/@g
+ t dotsl
+ s,/\.$,/,'
+collapseslashes='s@/\{1,\}@/@g'
+finalslash='s,/*$,/,'
-# Allow overriding, eg assuming that you follow the convention of
-# putting '$debug_cmd' at the start of all your functions, you can get
-# bash to show function call trace with:
-#
-# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
-debug_cmd=${debug_cmd-":"}
-exit_cmd=:
+# func_normal_abspath PATH
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+# value returned in "$func_normal_abspath_result"
+func_normal_abspath ()
+{
+ # Start from root dir and reassemble the path.
+ func_normal_abspath_result=
+ func_normal_abspath_tpath=$1
+ func_normal_abspath_altnamespace=
+ case $func_normal_abspath_tpath in
+ "")
+ # Empty path, that just means $cwd.
+ func_stripname '' '/' "`pwd`"
+ func_normal_abspath_result=$func_stripname_result
+ return
+ ;;
+ # The next three entries are used to spot a run of precisely
+ # two leading slashes without using negated character classes;
+ # we take advantage of case's first-match behaviour.
+ ///*)
+ # Unusual form of absolute path, do nothing.
+ ;;
+ //*)
+ # Not necessarily an ordinary path; POSIX reserves leading '//'
+ # and for example Cygwin uses it to access remote file shares
+ # over CIFS/SMB, so we conserve a leading double slash if found.
+ func_normal_abspath_altnamespace=/
+ ;;
+ /*)
+ # Absolute path, do nothing.
+ ;;
+ *)
+ # Relative path, prepend $cwd.
+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+ ;;
+ esac
+ # Cancel out all the simple stuff to save iterations. We also want
+ # the path to end with a slash for ease of parsing, so make sure
+ # there is one (and only one) here.
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
+ while :; do
+ # Processed it all yet?
+ if test "$func_normal_abspath_tpath" = / ; then
+ # If we ascended to the root using ".." the result may be empty now.
+ if test -z "$func_normal_abspath_result" ; then
+ func_normal_abspath_result=/
+ fi
+ break
+ fi
+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$pathcar"`
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$pathcdr"`
+ # Figure out what to do with it
+ case $func_normal_abspath_tcomponent in
+ "")
+ # Trailing empty path component, ignore it.
+ ;;
+ ..)
+ # Parent dir; strip last assembled component from result.
+ func_dirname "$func_normal_abspath_result"
+ func_normal_abspath_result=$func_dirname_result
+ ;;
+ *)
+ # Actual path component, append it.
+ func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
+ ;;
+ esac
+ done
+ # Restore leading double-slash if one was found on entry.
+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
-# By convention, finish your script with:
-#
-# exit $exit_status
-#
-# so that you can set exit_status to non-zero if you want to indicate
-# something went wrong during execution without actually bailing out at
-# the point of failure.
-exit_status=$EXIT_SUCCESS
+# func_relative_path SRCDIR DSTDIR
+# generates a relative path from SRCDIR to DSTDIR, with a trailing
+# slash if non-empty, suitable for immediately appending a filename
+# without needing to append a separator.
+# value returned in "$func_relative_path_result"
+func_relative_path ()
+{
+ func_relative_path_result=
+ func_normal_abspath "$1"
+ func_relative_path_tlibdir=$func_normal_abspath_result
+ func_normal_abspath "$2"
+ func_relative_path_tbindir=$func_normal_abspath_result
+
+ # Ascend the tree starting from libdir
+ while :; do
+ # check if we have found a prefix of bindir
+ case $func_relative_path_tbindir in
+ $func_relative_path_tlibdir)
+ # found an exact match
+ func_relative_path_tcancelled=
+ break
+ ;;
+ $func_relative_path_tlibdir*)
+ # found a matching prefix
+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+ func_relative_path_tcancelled=$func_stripname_result
+ if test -z "$func_relative_path_result"; then
+ func_relative_path_result=.
+ fi
+ break
+ ;;
+ *)
+ func_dirname $func_relative_path_tlibdir
+ func_relative_path_tlibdir=${func_dirname_result}
+ if test "x$func_relative_path_tlibdir" = x ; then
+ # Have to descend all the way to the root!
+ func_relative_path_result=../$func_relative_path_result
+ func_relative_path_tcancelled=$func_relative_path_tbindir
+ break
+ fi
+ func_relative_path_result=../$func_relative_path_result
+ ;;
+ esac
+ done
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath=$0
+ # Now calculate path; take care to avoid doubling-up slashes.
+ func_stripname '' '/' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ func_stripname '/' '/' "$func_relative_path_tcancelled"
+ if test "x$func_stripname_result" != x ; then
+ func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+ fi
-# The name of this program.
-progname=`$ECHO "$progpath" |$SED "$sed_basename"`
+ # Normalisation. If bindir is libdir, return empty string,
+ # else relative path ending with a slash; either way, target
+ # file name can be directly appended.
+ if test ! -z "$func_relative_path_result"; then
+ func_stripname './' '' "$func_relative_path_result/"
+ func_relative_path_result=$func_stripname_result
+ fi
+}
-# Make sure we have an absolute progpath for reexecution:
+# The name of this program:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+
+# Make sure we have an absolute path for reexecution:
case $progpath in
[\\/]*|[A-Za-z]:\\*) ;;
*[\\/]*)
- progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
+ progdir=$func_dirname_result
progdir=`cd "$progdir" && pwd`
- progpath=$progdir/$progname
+ progpath="$progdir/$progname"
;;
*)
- _G_IFS=$IFS
+ save_IFS="$IFS"
IFS=${PATH_SEPARATOR-:}
for progdir in $PATH; do
- IFS=$_G_IFS
+ IFS="$save_IFS"
test -x "$progdir/$progname" && break
done
- IFS=$_G_IFS
+ IFS="$save_IFS"
test -n "$progdir" || progdir=`pwd`
- progpath=$progdir/$progname
+ progpath="$progdir/$progname"
;;
esac
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
-## ----------------- ##
-## Standard options. ##
-## ----------------- ##
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
-# The following options affect the operation of the functions defined
-# below, and should be set appropriately depending on run-time para-
-# meters passed on the command line.
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
+# Sed substitution that converts a w32 file name or path
+# which contains forward slashes, into one that contains
+# (escaped) backslashes. A very naive implementation.
+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+ s/$bs4/&\\
+/g
+ s/^$bs2$dollar/$bs&/
+ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+ s/\n//g"
+
+# Standard options:
opt_dry_run=false
+opt_help=false
opt_quiet=false
opt_verbose=false
+opt_warning=:
-# Categories 'all' and 'none' are always available. Append any others
-# you will pass as the first argument to func_warning from your own
-# code.
-warning_categories=
-
-# By default, display warnings according to 'opt_warning_types'. Set
-# 'warning_func' to ':' to elide all warnings, or func_fatal_error to
-# treat the next displayed warning as a fatal error.
-warning_func=func_warn_and_continue
-
-# Set to 'all' to display all warnings, 'none' to suppress all
-# warnings, or a space delimited list of some subset of
-# 'warning_categories' to display only the listed warnings.
-opt_warning_types=all
-
-
-## -------------------- ##
-## Resource management. ##
-## -------------------- ##
-
-# This section contains definitions for functions that each ensure a
-# particular resource (a file, or a non-empty configuration variable for
-# example) is available, and if appropriate to extract default values
-# from pertinent package files. Call them using their associated
-# 'require_*' variable to ensure that they are executed, at most, once.
-#
-# It's entirely deliberate that calling these functions can set
-# variables that don't obey the namespace limitations obeyed by the rest
-# of this file, in order that that they be as useful as possible to
-# callers.
-
-
-# require_term_colors
-# -------------------
-# Allow display of bold text on terminals that support it.
-require_term_colors=func_require_term_colors
-func_require_term_colors ()
-{
- $debug_cmd
-
- test -t 1 && {
- # COLORTERM and USE_ANSI_COLORS environment variables take
- # precedence, because most terminfo databases neglect to describe
- # whether color sequences are supported.
- test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
-
- if test 1 = "$USE_ANSI_COLORS"; then
- # Standard ANSI escape sequences
- tc_reset=''
- tc_bold=''; tc_standout=''
- tc_red=''; tc_green=''
- tc_blue=''; tc_cyan=''
- else
- # Otherwise trust the terminfo database after all.
- test -n "`tput sgr0 2>/dev/null`" && {
- tc_reset=`tput sgr0`
- test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
- tc_standout=$tc_bold
- test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
- test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
- test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
- test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
- test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
- }
- fi
- }
-
- require_term_colors=:
-}
-
-
-## ----------------- ##
-## Function library. ##
-## ----------------- ##
-
-# This section contains a variety of useful functions to call in your
-# scripts. Take note of the portable wrappers for features provided by
-# some modern shells, which will fall back to slower equivalents on
-# less featureful shells.
-
-
-# func_append VAR VALUE
-# ---------------------
-# Append VALUE onto the existing contents of VAR.
-
- # We should try to minimise forks, especially on Windows where they are
- # unreasonably slow, so skip the feature probes when bash or zsh are
- # being used:
- if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
- : ${_G_HAVE_ARITH_OP="yes"}
- : ${_G_HAVE_XSI_OPS="yes"}
- # The += operator was introduced in bash 3.1
- case $BASH_VERSION in
- [12].* | 3.0 | 3.0*) ;;
- *)
- : ${_G_HAVE_PLUSEQ_OP="yes"}
- ;;
- esac
- fi
-
- # _G_HAVE_PLUSEQ_OP
- # Can be empty, in which case the shell is probed, "yes" if += is
- # useable or anything else if it does not work.
- test -z "$_G_HAVE_PLUSEQ_OP" \
- && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
- && _G_HAVE_PLUSEQ_OP=yes
-
-if test yes = "$_G_HAVE_PLUSEQ_OP"
-then
- # This is an XSI compatible shell, allowing a faster implementation...
- eval 'func_append ()
- {
- $debug_cmd
-
- eval "$1+=\$2"
- }'
-else
- # ...otherwise fall back to using expr, which is often a shell builtin.
- func_append ()
- {
- $debug_cmd
-
- eval "$1=\$$1\$2"
- }
-fi
-
-
-# func_append_quoted VAR VALUE
-# ----------------------------
-# Quote VALUE and append to the end of shell variable VAR, separated
-# by a space.
-if test yes = "$_G_HAVE_PLUSEQ_OP"; then
- eval 'func_append_quoted ()
- {
- $debug_cmd
-
- func_quote_for_eval "$2"
- eval "$1+=\\ \$func_quote_for_eval_result"
- }'
-else
- func_append_quoted ()
- {
- $debug_cmd
-
- func_quote_for_eval "$2"
- eval "$1=\$$1\\ \$func_quote_for_eval_result"
- }
-fi
-
-
-# func_append_uniq VAR VALUE
-# --------------------------
-# Append unique VALUE onto the existing contents of VAR, assuming
-# entries are delimited by the first character of VALUE. For example:
-#
-# func_append_uniq options " --another-option option-argument"
-#
-# will only append to $options if " --another-option option-argument "
-# is not already present somewhere in $options already (note spaces at
-# each end implied by leading space in second argument).
-func_append_uniq ()
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
{
- $debug_cmd
-
- eval _G_current_value='`$ECHO $'$1'`'
- _G_delim=`expr "$2" : '\(.\)'`
-
- case $_G_delim$_G_current_value$_G_delim in
- *"$2$_G_delim"*) ;;
- *) func_append "$@" ;;
- esac
+ $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
}
-
-# func_arith TERM...
-# ------------------
-# Set func_arith_result to the result of evaluating TERMs.
- test -z "$_G_HAVE_ARITH_OP" \
- && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
- && _G_HAVE_ARITH_OP=yes
-
-if test yes = "$_G_HAVE_ARITH_OP"; then
- eval 'func_arith ()
- {
- $debug_cmd
-
- func_arith_result=$(( $* ))
- }'
-else
- func_arith ()
- {
- $debug_cmd
-
- func_arith_result=`expr "$@"`
- }
-fi
-
-
-# func_basename FILE
-# ------------------
-# Set func_basename_result to FILE with everything up to and including
-# the last / stripped.
-if test yes = "$_G_HAVE_XSI_OPS"; then
- # If this shell supports suffix pattern removal, then use it to avoid
- # forking. Hide the definitions single quotes in case the shell chokes
- # on unsupported syntax...
- _b='func_basename_result=${1##*/}'
- _d='case $1 in
- */*) func_dirname_result=${1%/*}$2 ;;
- * ) func_dirname_result=$3 ;;
- esac'
-
-else
- # ...otherwise fall back to using sed.
- _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
- _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"`
- if test "X$func_dirname_result" = "X$1"; then
- func_dirname_result=$3
- else
- func_append func_dirname_result "$2"
- fi'
-fi
-
-eval 'func_basename ()
-{
- $debug_cmd
-
- '"$_b"'
-}'
-
-
-# func_dirname FILE APPEND NONDIR_REPLACEMENT
-# -------------------------------------------
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-eval 'func_dirname ()
-{
- $debug_cmd
-
- '"$_d"'
-}'
-
-
-# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
-# --------------------------------------------------------
-# Perform func_basename and func_dirname in a single function
-# call:
-# dirname: Compute the dirname of FILE. If nonempty,
-# add APPEND to the result, otherwise set result
-# to NONDIR_REPLACEMENT.
-# value returned in "$func_dirname_result"
-# basename: Compute filename of FILE.
-# value retuned in "$func_basename_result"
-# For efficiency, we do not delegate to the functions above but instead
-# duplicate the functionality here.
-eval 'func_dirname_and_basename ()
-{
- $debug_cmd
-
- '"$_b"'
- '"$_d"'
-}'
-
-
-# func_echo ARG...
-# ----------------
-# Echo program name prefixed message.
-func_echo ()
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
{
- $debug_cmd
-
- _G_message=$*
+ $opt_verbose && func_echo ${1+"$@"}
- func_echo_IFS=$IFS
- IFS=$nl
- for _G_line in $_G_message; do
- IFS=$func_echo_IFS
- $ECHO "$progname: $_G_line"
- done
- IFS=$func_echo_IFS
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
}
-
-# func_echo_all ARG...
-# --------------------
+# func_echo_all arg...
# Invoke $ECHO with all args, space-separated.
func_echo_all ()
{
$ECHO "$*"
}
-
-# func_echo_infix_1 INFIX ARG...
-# ------------------------------
-# Echo program name, followed by INFIX on the first line, with any
-# additional lines not showing INFIX.
-func_echo_infix_1 ()
-{
- $debug_cmd
-
- $require_term_colors
-
- _G_infix=$1; shift
- _G_indent=$_G_infix
- _G_prefix="$progname: $_G_infix: "
- _G_message=$*
-
- # Strip color escape sequences before counting printable length
- for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
- do
- test -n "$_G_tc" && {
- _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
- _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
- }
- done
- _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
-
- func_echo_infix_1_IFS=$IFS
- IFS=$nl
- for _G_line in $_G_message; do
- IFS=$func_echo_infix_1_IFS
- $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
- _G_prefix=$_G_indent
- done
- IFS=$func_echo_infix_1_IFS
-}
-
-
-# func_error ARG...
-# -----------------
+# func_error arg...
# Echo program name prefixed message to standard error.
func_error ()
{
- $debug_cmd
+ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
+}
- $require_term_colors
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
- func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2
+ # bash bug again:
+ :
}
-
-# func_fatal_error ARG...
-# -----------------------
+# func_fatal_error arg...
# Echo program name prefixed message to standard error, and exit.
func_fatal_error ()
{
- $debug_cmd
-
- func_error "$*"
+ func_error ${1+"$@"}
exit $EXIT_FAILURE
}
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ func_error ${1+"$@"}
+ func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information." ## default
+
-# func_grep EXPRESSION FILENAME
-# -----------------------------
+# func_grep expression filename
# Check whether EXPRESSION matches any line of FILENAME, without output.
func_grep ()
{
- $debug_cmd
-
$GREP "$1" "$2" >/dev/null 2>&1
}
-# func_len STRING
-# ---------------
-# Set func_len_result to the length of STRING. STRING may not
-# start with a hyphen.
- test -z "$_G_HAVE_XSI_OPS" \
- && (eval 'x=a/b/c;
- test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
- && _G_HAVE_XSI_OPS=yes
-
-if test yes = "$_G_HAVE_XSI_OPS"; then
- eval 'func_len ()
- {
- $debug_cmd
-
- func_len_result=${#1}
- }'
-else
- func_len ()
- {
- $debug_cmd
-
- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
- }
-fi
-
-
-# func_mkdir_p DIRECTORY-PATH
-# ---------------------------
+# func_mkdir_p directory-path
# Make sure the entire path to DIRECTORY-PATH is available.
func_mkdir_p ()
{
- $debug_cmd
-
- _G_directory_path=$1
- _G_dir_list=
+ my_directory_path="$1"
+ my_dir_list=
- if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
- # Protect directory names starting with '-'
- case $_G_directory_path in
- -*) _G_directory_path=./$_G_directory_path ;;
+ # Protect directory names starting with `-'
+ case $my_directory_path in
+ -*) my_directory_path="./$my_directory_path" ;;
esac
# While some portion of DIR does not yet exist...
- while test ! -d "$_G_directory_path"; do
+ while test ! -d "$my_directory_path"; do
# ...make a list in topmost first order. Use a colon delimited
# list incase some portion of path contains whitespace.
- _G_dir_list=$_G_directory_path:$_G_dir_list
+ my_dir_list="$my_directory_path:$my_dir_list"
# If the last portion added has no slash in it, the list is done
- case $_G_directory_path in */*) ;; *) break ;; esac
+ case $my_directory_path in */*) ;; *) break ;; esac
# ...otherwise throw away the child directory and loop
- _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
+ my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
done
- _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
+ my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
- func_mkdir_p_IFS=$IFS; IFS=:
- for _G_dir in $_G_dir_list; do
- IFS=$func_mkdir_p_IFS
- # mkdir can fail with a 'File exist' error if two processes
+ save_mkdir_p_IFS="$IFS"; IFS=':'
+ for my_dir in $my_dir_list; do
+ IFS="$save_mkdir_p_IFS"
+ # mkdir can fail with a `File exist' error if two processes
# try to create one of the directories concurrently. Don't
# stop in that case!
- $MKDIR "$_G_dir" 2>/dev/null || :
+ $MKDIR "$my_dir" 2>/dev/null || :
done
- IFS=$func_mkdir_p_IFS
+ IFS="$save_mkdir_p_IFS"
# Bail out if we (or some other process) failed to create a directory.
- test -d "$_G_directory_path" || \
- func_fatal_error "Failed to create '$1'"
+ test -d "$my_directory_path" || \
+ func_fatal_error "Failed to create \`$1'"
fi
}
-# func_mktempdir [BASENAME]
-# -------------------------
+# func_mktempdir [string]
# Make a temporary directory that won't clash with other running
# libtool processes, and avoids race conditions if possible. If
-# given, BASENAME is the basename for that directory.
+# given, STRING is the basename for that directory.
func_mktempdir ()
{
- $debug_cmd
-
- _G_template=${TMPDIR-/tmp}/${1-$progname}
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
- if test : = "$opt_dry_run"; then
+ if test "$opt_dry_run" = ":"; then
# Return a directory name, but don't create it in dry-run mode
- _G_tmpdir=$_G_template-$$
+ my_tmpdir="${my_template}-$$"
else
# If mktemp works, use that first and foremost
- _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
- if test ! -d "$_G_tmpdir"; then
+ if test ! -d "$my_tmpdir"; then
# Failing that, at least try and use $RANDOM to avoid a race
- _G_tmpdir=$_G_template-${RANDOM-0}$$
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
- func_mktempdir_umask=`umask`
+ save_mktempdir_umask=`umask`
umask 0077
- $MKDIR "$_G_tmpdir"
- umask $func_mktempdir_umask
+ $MKDIR "$my_tmpdir"
+ umask $save_mktempdir_umask
fi
# If we're not in dry-run mode, bomb out on failure
- test -d "$_G_tmpdir" || \
- func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
+ test -d "$my_tmpdir" || \
+ func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
fi
- $ECHO "$_G_tmpdir"
+ $ECHO "$my_tmpdir"
}
-# func_normal_abspath PATH
-# ------------------------
-# Remove doubled-up and trailing slashes, "." path components,
-# and cancel out any ".." path components in PATH after making
-# it an absolute path.
-func_normal_abspath ()
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
{
- $debug_cmd
+ case $1 in
+ *[\\\`\"\$]*)
+ func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
+ *)
+ func_quote_for_eval_unquoted_result="$1" ;;
+ esac
- # These SED scripts presuppose an absolute path with a trailing slash.
- _G_pathcar='s|^/\([^/]*\).*$|\1|'
- _G_pathcdr='s|^/[^/]*||'
- _G_removedotparts=':dotsl
- s|/\./|/|g
- t dotsl
- s|/\.$|/|'
- _G_collapseslashes='s|/\{1,\}|/|g'
- _G_finalslash='s|/*$|/|'
-
- # Start from root dir and reassemble the path.
- func_normal_abspath_result=
- func_normal_abspath_tpath=$1
- func_normal_abspath_altnamespace=
- case $func_normal_abspath_tpath in
- "")
- # Empty path, that just means $cwd.
- func_stripname '' '/' "`pwd`"
- func_normal_abspath_result=$func_stripname_result
- return
- ;;
- # The next three entries are used to spot a run of precisely
- # two leading slashes without using negated character classes;
- # we take advantage of case's first-match behaviour.
- ///*)
- # Unusual form of absolute path, do nothing.
- ;;
- //*)
- # Not necessarily an ordinary path; POSIX reserves leading '//'
- # and for example Cygwin uses it to access remote file shares
- # over CIFS/SMB, so we conserve a leading double slash if found.
- func_normal_abspath_altnamespace=/
- ;;
- /*)
- # Absolute path, do nothing.
+ case $func_quote_for_eval_unquoted_result in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and and variable
+ # expansion for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
;;
*)
- # Relative path, prepend $cwd.
- func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
- ;;
+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
esac
-
- # Cancel out all the simple stuff to save iterations. We also want
- # the path to end with a slash for ease of parsing, so make sure
- # there is one (and only one) here.
- func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
- -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
- while :; do
- # Processed it all yet?
- if test / = "$func_normal_abspath_tpath"; then
- # If we ascended to the root using ".." the result may be empty now.
- if test -z "$func_normal_abspath_result"; then
- func_normal_abspath_result=/
- fi
- break
- fi
- func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
- -e "$_G_pathcar"`
- func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
- -e "$_G_pathcdr"`
- # Figure out what to do with it
- case $func_normal_abspath_tcomponent in
- "")
- # Trailing empty path component, ignore it.
- ;;
- ..)
- # Parent dir; strip last assembled component from result.
- func_dirname "$func_normal_abspath_result"
- func_normal_abspath_result=$func_dirname_result
- ;;
- *)
- # Actual path component, append it.
- func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
- ;;
- esac
- done
- # Restore leading double-slash if one was found on entry.
- func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
}
-# func_notquiet ARG...
-# --------------------
-# Echo program name prefixed message only when not in quiet mode.
-func_notquiet ()
-{
- $debug_cmd
-
- $opt_quiet || func_echo ${1+"$@"}
-
- # A bug in bash halts the script if the last line of a function
- # fails when set -e is in force, so we need another command to
- # work around that:
- :
-}
-
-
-# func_relative_path SRCDIR DSTDIR
-# --------------------------------
-# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
-func_relative_path ()
-{
- $debug_cmd
-
- func_relative_path_result=
- func_normal_abspath "$1"
- func_relative_path_tlibdir=$func_normal_abspath_result
- func_normal_abspath "$2"
- func_relative_path_tbindir=$func_normal_abspath_result
-
- # Ascend the tree starting from libdir
- while :; do
- # check if we have found a prefix of bindir
- case $func_relative_path_tbindir in
- $func_relative_path_tlibdir)
- # found an exact match
- func_relative_path_tcancelled=
- break
- ;;
- $func_relative_path_tlibdir*)
- # found a matching prefix
- func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
- func_relative_path_tcancelled=$func_stripname_result
- if test -z "$func_relative_path_result"; then
- func_relative_path_result=.
- fi
- break
- ;;
- *)
- func_dirname $func_relative_path_tlibdir
- func_relative_path_tlibdir=$func_dirname_result
- if test -z "$func_relative_path_tlibdir"; then
- # Have to descend all the way to the root!
- func_relative_path_result=../$func_relative_path_result
- func_relative_path_tcancelled=$func_relative_path_tbindir
- break
- fi
- func_relative_path_result=../$func_relative_path_result
- ;;
- esac
- done
-
- # Now calculate path; take care to avoid doubling-up slashes.
- func_stripname '' '/' "$func_relative_path_result"
- func_relative_path_result=$func_stripname_result
- func_stripname '/' '/' "$func_relative_path_tcancelled"
- if test -n "$func_stripname_result"; then
- func_append func_relative_path_result "/$func_stripname_result"
- fi
-
- # Normalisation. If bindir is libdir, return '.' else relative path.
- if test -n "$func_relative_path_result"; then
- func_stripname './' '' "$func_relative_path_result"
- func_relative_path_result=$func_stripname_result
- fi
-
- test -n "$func_relative_path_result" || func_relative_path_result=.
-
- :
-}
-
-
-# func_quote_for_eval ARG...
-# --------------------------
-# Aesthetically quote ARGs to be evaled later.
-# This function returns two values:
-# i) func_quote_for_eval_result
-# double-quoted, suitable for a subsequent eval
-# ii) func_quote_for_eval_unquoted_result
-# has all characters that are still active within double
-# quotes backslashified.
-func_quote_for_eval ()
-{
- $debug_cmd
-
- func_quote_for_eval_unquoted_result=
- func_quote_for_eval_result=
- while test 0 -lt $#; do
- case $1 in
- *[\\\`\"\$]*)
- _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
- *)
- _G_unquoted_arg=$1 ;;
- esac
- if test -n "$func_quote_for_eval_unquoted_result"; then
- func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
- else
- func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
- fi
-
- case $_G_unquoted_arg in
- # Double-quote args containing shell metacharacters to delay
- # word splitting, command substitution and variable expansion
- # for a subsequent eval.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- _G_quoted_arg=\"$_G_unquoted_arg\"
- ;;
- *)
- _G_quoted_arg=$_G_unquoted_arg
- ;;
- esac
-
- if test -n "$func_quote_for_eval_result"; then
- func_append func_quote_for_eval_result " $_G_quoted_arg"
- else
- func_append func_quote_for_eval_result "$_G_quoted_arg"
- fi
- shift
- done
-}
-
-
-# func_quote_for_expand ARG
-# -------------------------
+# func_quote_for_expand arg
# Aesthetically quote ARG to be evaled later; same as above,
# but do not quote variable references.
func_quote_for_expand ()
{
- $debug_cmd
-
case $1 in
*[\\\`\"]*)
- _G_arg=`$ECHO "$1" | $SED \
- -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
+ my_arg=`$ECHO "$1" | $SED \
+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
*)
- _G_arg=$1 ;;
+ my_arg="$1" ;;
esac
- case $_G_arg in
+ case $my_arg in
# Double-quote args containing shell metacharacters to delay
# word splitting and command substitution for a subsequent eval.
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- _G_arg=\"$_G_arg\"
+ my_arg="\"$my_arg\""
;;
esac
- func_quote_for_expand_result=$_G_arg
+ func_quote_for_expand_result="$my_arg"
}
-# func_stripname PREFIX SUFFIX NAME
-# ---------------------------------
-# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-if test yes = "$_G_HAVE_XSI_OPS"; then
- eval 'func_stripname ()
- {
- $debug_cmd
-
- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
- # positional parameters, so assign one to ordinary variable first.
- func_stripname_result=$3
- func_stripname_result=${func_stripname_result#"$1"}
- func_stripname_result=${func_stripname_result%"$2"}
- }'
-else
- func_stripname ()
- {
- $debug_cmd
-
- case $2 in
- .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
- *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
- esac
- }
-fi
-
-
-# func_show_eval CMD [FAIL_EXP]
-# -----------------------------
-# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
# is given, then evaluate it.
func_show_eval ()
{
- $debug_cmd
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
- _G_cmd=$1
- _G_fail_exp=${2-':'}
-
- func_quote_for_expand "$_G_cmd"
- eval "func_notquiet $func_quote_for_expand_result"
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
- $opt_dry_run || {
- eval "$_G_cmd"
- _G_status=$?
- if test 0 -ne "$_G_status"; then
- eval "(exit $_G_status); $_G_fail_exp"
+ if ${opt_dry_run-false}; then :; else
+ eval "$my_cmd"
+ my_status=$?
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
fi
- }
+ fi
}
-# func_show_eval_locale CMD [FAIL_EXP]
-# ------------------------------------
-# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
# is given, then evaluate it. Use the saved locale for evaluation.
func_show_eval_locale ()
{
- $debug_cmd
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
- _G_cmd=$1
- _G_fail_exp=${2-':'}
-
- $opt_quiet || {
- func_quote_for_expand "$_G_cmd"
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
eval "func_echo $func_quote_for_expand_result"
}
- $opt_dry_run || {
- eval "$_G_user_locale
- $_G_cmd"
- _G_status=$?
- eval "$_G_safe_locale"
- if test 0 -ne "$_G_status"; then
- eval "(exit $_G_status); $_G_fail_exp"
+ if ${opt_dry_run-false}; then :; else
+ eval "$lt_user_locale
+ $my_cmd"
+ my_status=$?
+ eval "$lt_safe_locale"
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
fi
- }
+ fi
}
-
# func_tr_sh
-# ----------
# Turn $1 into a string suitable for a shell variable name.
# Result is stored in $func_tr_sh_result. All characters
# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
# if $1 begins with a digit, a '_' is prepended as well.
func_tr_sh ()
{
- $debug_cmd
-
- case $1 in
- [0-9]* | *[!a-zA-Z0-9_]*)
- func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
- ;;
- * )
- func_tr_sh_result=$1
- ;;
- esac
-}
-
-
-# func_verbose ARG...
-# -------------------
-# Echo program name prefixed message in verbose mode only.
-func_verbose ()
-{
- $debug_cmd
-
- $opt_verbose && func_echo "$*"
-
- :
-}
-
-
-# func_warn_and_continue ARG...
-# -----------------------------
-# Echo program name prefixed warning message to standard error.
-func_warn_and_continue ()
-{
- $debug_cmd
-
- $require_term_colors
-
- func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
-}
-
-
-# func_warning CATEGORY ARG...
-# ----------------------------
-# Echo program name prefixed warning message to standard error. Warning
-# messages can be filtered according to CATEGORY, where this function
-# elides messages where CATEGORY is not listed in the global variable
-# 'opt_warning_types'.
-func_warning ()
-{
- $debug_cmd
-
- # CATEGORY must be in the warning_categories list!
- case " $warning_categories " in
- *" $1 "*) ;;
- *) func_internal_error "invalid warning category '$1'" ;;
- esac
-
- _G_category=$1
- shift
-
- case " $opt_warning_types " in
- *" $_G_category "*) $warning_func ${1+"$@"} ;;
- esac
-}
-
-
-# func_sort_ver VER1 VER2
-# -----------------------
-# 'sort -V' is not generally available.
-# Note this deviates from the version comparison in automake
-# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
-# but this should suffice as we won't be specifying old
-# version formats or redundant trailing .0 in bootstrap.conf.
-# If we did want full compatibility then we should probably
-# use m4_version_compare from autoconf.
-func_sort_ver ()
-{
- $debug_cmd
-
- printf '%s\n%s\n' "$1" "$2" \
- | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
-}
-
-# func_lt_ver PREV CURR
-# ---------------------
-# Return true if PREV and CURR are in the correct order according to
-# func_sort_ver, otherwise false. Use it like this:
-#
-# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
-func_lt_ver ()
-{
- $debug_cmd
-
- test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
-}
-
-
-# Local variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'before-save-hook 'time-stamp)
-# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
-# time-stamp-time-zone: "UTC"
-# End:
-#! /bin/sh
-
-# Set a version string for this script.
-scriptversion=2014-01-07.03; # UTC
-
-# A portable, pluggable option parser for Bourne shell.
-# Written by Gary V. Vaughan, 2010
-
-# Copyright (C) 2010-2015 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions. There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Please report bugs or propose patches to gary@gnu.org.
-
-
-## ------ ##
-## Usage. ##
-## ------ ##
-
-# This file is a library for parsing options in your shell scripts along
-# with assorted other useful supporting features that you can make use
-# of too.
-#
-# For the simplest scripts you might need only:
-#
-# #!/bin/sh
-# . relative/path/to/funclib.sh
-# . relative/path/to/options-parser
-# scriptversion=1.0
-# func_options ${1+"$@"}
-# eval set dummy "$func_options_result"; shift
-# ...rest of your script...
-#
-# In order for the '--version' option to work, you will need to have a
-# suitably formatted comment like the one at the top of this file
-# starting with '# Written by ' and ending with '# warranty; '.
-#
-# For '-h' and '--help' to work, you will also need a one line
-# description of your script's purpose in a comment directly above the
-# '# Written by ' line, like the one at the top of this file.
-#
-# The default options also support '--debug', which will turn on shell
-# execution tracing (see the comment above debug_cmd below for another
-# use), and '--verbose' and the func_verbose function to allow your script
-# to display verbose messages only when your user has specified
-# '--verbose'.
-#
-# After sourcing this file, you can plug processing for additional
-# options by amending the variables from the 'Configuration' section
-# below, and following the instructions in the 'Option parsing'
-# section further down.
-
-## -------------- ##
-## Configuration. ##
-## -------------- ##
-
-# You should override these variables in your script after sourcing this
-# file so that they reflect the customisations you have added to the
-# option parser.
-
-# The usage line for option parsing errors and the start of '-h' and
-# '--help' output messages. You can embed shell variables for delayed
-# expansion at the time the message is displayed, but you will need to
-# quote other shell meta-characters carefully to prevent them being
-# expanded when the contents are evaled.
-usage='$progpath [OPTION]...'
-
-# Short help message in response to '-h' and '--help'. Add to this or
-# override it after sourcing this library to reflect the full set of
-# options your script accepts.
-usage_message="\
- --debug enable verbose shell tracing
- -W, --warnings=CATEGORY
- report the warnings falling in CATEGORY [all]
- -v, --verbose verbosely report processing
- --version print version information and exit
- -h, --help print short or long help message and exit
-"
-
-# Additional text appended to 'usage_message' in response to '--help'.
-long_help_message="
-Warning categories include:
- 'all' show all warnings
- 'none' turn off all the warnings
- 'error' warnings are treated as fatal errors"
-
-# Help message printed before fatal option parsing errors.
-fatal_help="Try '\$progname --help' for more information."
-
-
-
-## ------------------------- ##
-## Hook function management. ##
-## ------------------------- ##
-
-# This section contains functions for adding, removing, and running hooks
-# to the main code. A hook is just a named list of of function, that can
-# be run in order later on.
-
-# func_hookable FUNC_NAME
-# -----------------------
-# Declare that FUNC_NAME will run hooks added with
-# 'func_add_hook FUNC_NAME ...'.
-func_hookable ()
-{
- $debug_cmd
-
- func_append hookable_fns " $1"
-}
-
-
-# func_add_hook FUNC_NAME HOOK_FUNC
-# ---------------------------------
-# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must
-# first have been declared "hookable" by a call to 'func_hookable'.
-func_add_hook ()
-{
- $debug_cmd
-
- case " $hookable_fns " in
- *" $1 "*) ;;
- *) func_fatal_error "'$1' does not accept hook functions." ;;
- esac
-
- eval func_append ${1}_hooks '" $2"'
-}
-
-
-# func_remove_hook FUNC_NAME HOOK_FUNC
-# ------------------------------------
-# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
-func_remove_hook ()
-{
- $debug_cmd
-
- eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
-}
-
-
-# func_run_hooks FUNC_NAME [ARG]...
-# ---------------------------------
-# Run all hook functions registered to FUNC_NAME.
-# It is assumed that the list of hook functions contains nothing more
-# than a whitespace-delimited list of legal shell function names, and
-# no effort is wasted trying to catch shell meta-characters or preserve
-# whitespace.
-func_run_hooks ()
-{
- $debug_cmd
-
- case " $hookable_fns " in
- *" $1 "*) ;;
- *) func_fatal_error "'$1' does not support hook funcions.n" ;;
- esac
-
- eval _G_hook_fns=\$$1_hooks; shift
-
- for _G_hook in $_G_hook_fns; do
- eval $_G_hook '"$@"'
-
- # store returned options list back into positional
- # parameters for next 'cmd' execution.
- eval _G_hook_result=\$${_G_hook}_result
- eval set dummy "$_G_hook_result"; shift
- done
-
- func_quote_for_eval ${1+"$@"}
- func_run_hooks_result=$func_quote_for_eval_result
-}
-
-
-
-## --------------- ##
-## Option parsing. ##
-## --------------- ##
-
-# In order to add your own option parsing hooks, you must accept the
-# full positional parameter list in your hook function, remove any
-# options that you action, and then pass back the remaining unprocessed
-# options in '<hooked_function_name>_result', escaped suitably for
-# 'eval'. Like this:
-#
-# my_options_prep ()
-# {
-# $debug_cmd
-#
-# # Extend the existing usage message.
-# usage_message=$usage_message'
-# -s, --silent don'\''t print informational messages
-# '
-#
-# func_quote_for_eval ${1+"$@"}
-# my_options_prep_result=$func_quote_for_eval_result
-# }
-# func_add_hook func_options_prep my_options_prep
-#
-#
-# my_silent_option ()
-# {
-# $debug_cmd
-#
-# # Note that for efficiency, we parse as many options as we can
-# # recognise in a loop before passing the remainder back to the
-# # caller on the first unrecognised argument we encounter.
-# while test $# -gt 0; do
-# opt=$1; shift
-# case $opt in
-# --silent|-s) opt_silent=: ;;
-# # Separate non-argument short options:
-# -s*) func_split_short_opt "$_G_opt"
-# set dummy "$func_split_short_opt_name" \
-# "-$func_split_short_opt_arg" ${1+"$@"}
-# shift
-# ;;
-# *) set dummy "$_G_opt" "$*"; shift; break ;;
-# esac
-# done
-#
-# func_quote_for_eval ${1+"$@"}
-# my_silent_option_result=$func_quote_for_eval_result
-# }
-# func_add_hook func_parse_options my_silent_option
-#
-#
-# my_option_validation ()
-# {
-# $debug_cmd
-#
-# $opt_silent && $opt_verbose && func_fatal_help "\
-# '--silent' and '--verbose' options are mutually exclusive."
-#
-# func_quote_for_eval ${1+"$@"}
-# my_option_validation_result=$func_quote_for_eval_result
-# }
-# func_add_hook func_validate_options my_option_validation
-#
-# You'll alse need to manually amend $usage_message to reflect the extra
-# options you parse. It's preferable to append if you can, so that
-# multiple option parsing hooks can be added safely.
-
-
-# func_options [ARG]...
-# ---------------------
-# All the functions called inside func_options are hookable. See the
-# individual implementations for details.
-func_hookable func_options
-func_options ()
-{
- $debug_cmd
-
- func_options_prep ${1+"$@"}
- eval func_parse_options \
- ${func_options_prep_result+"$func_options_prep_result"}
- eval func_validate_options \
- ${func_parse_options_result+"$func_parse_options_result"}
-
- eval func_run_hooks func_options \
- ${func_validate_options_result+"$func_validate_options_result"}
-
- # save modified positional parameters for caller
- func_options_result=$func_run_hooks_result
-}
-
-
-# func_options_prep [ARG]...
-# --------------------------
-# All initialisations required before starting the option parse loop.
-# Note that when calling hook functions, we pass through the list of
-# positional parameters. If a hook function modifies that list, and
-# needs to propogate that back to rest of this script, then the complete
-# modified list must be put in 'func_run_hooks_result' before
-# returning.
-func_hookable func_options_prep
-func_options_prep ()
-{
- $debug_cmd
-
- # Option defaults:
- opt_verbose=false
- opt_warning_types=
-
- func_run_hooks func_options_prep ${1+"$@"}
-
- # save modified positional parameters for caller
- func_options_prep_result=$func_run_hooks_result
-}
-
-
-# func_parse_options [ARG]...
-# ---------------------------
-# The main option parsing loop.
-func_hookable func_parse_options
-func_parse_options ()
-{
- $debug_cmd
-
- func_parse_options_result=
-
- # this just eases exit handling
- while test $# -gt 0; do
- # Defer to hook functions for initial option parsing, so they
- # get priority in the event of reusing an option name.
- func_run_hooks func_parse_options ${1+"$@"}
-
- # Adjust func_parse_options positional parameters to match
- eval set dummy "$func_run_hooks_result"; shift
-
- # Break out of the loop if we already parsed every option.
- test $# -gt 0 || break
-
- _G_opt=$1
- shift
- case $_G_opt in
- --debug|-x) debug_cmd='set -x'
- func_echo "enabling shell trace mode"
- $debug_cmd
- ;;
-
- --no-warnings|--no-warning|--no-warn)
- set dummy --warnings none ${1+"$@"}
- shift
- ;;
-
- --warnings|--warning|-W)
- test $# = 0 && func_missing_arg $_G_opt && break
- case " $warning_categories $1" in
- *" $1 "*)
- # trailing space prevents matching last $1 above
- func_append_uniq opt_warning_types " $1"
- ;;
- *all)
- opt_warning_types=$warning_categories
- ;;
- *none)
- opt_warning_types=none
- warning_func=:
- ;;
- *error)
- opt_warning_types=$warning_categories
- warning_func=func_fatal_error
- ;;
- *)
- func_fatal_error \
- "unsupported warning category: '$1'"
- ;;
- esac
- shift
- ;;
-
- --verbose|-v) opt_verbose=: ;;
- --version) func_version ;;
- -\?|-h) func_usage ;;
- --help) func_help ;;
-
- # Separate optargs to long options (plugins may need this):
- --*=*) func_split_equals "$_G_opt"
- set dummy "$func_split_equals_lhs" \
- "$func_split_equals_rhs" ${1+"$@"}
- shift
- ;;
-
- # Separate optargs to short options:
- -W*)
- func_split_short_opt "$_G_opt"
- set dummy "$func_split_short_opt_name" \
- "$func_split_short_opt_arg" ${1+"$@"}
- shift
- ;;
-
- # Separate non-argument short options:
- -\?*|-h*|-v*|-x*)
- func_split_short_opt "$_G_opt"
- set dummy "$func_split_short_opt_name" \
- "-$func_split_short_opt_arg" ${1+"$@"}
- shift
- ;;
-
- --) break ;;
- -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
- *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
- esac
- done
-
- # save modified positional parameters for caller
- func_quote_for_eval ${1+"$@"}
- func_parse_options_result=$func_quote_for_eval_result
+ case $1 in
+ [0-9]* | *[!a-zA-Z0-9_]*)
+ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+ ;;
+ * )
+ func_tr_sh_result=$1
+ ;;
+ esac
}
-# func_validate_options [ARG]...
-# ------------------------------
-# Perform any sanity checks on option settings and/or unconsumed
-# arguments.
-func_hookable func_validate_options
-func_validate_options ()
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
{
- $debug_cmd
-
- # Display all warnings if -W was not given.
- test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
+ $opt_debug
- func_run_hooks func_validate_options ${1+"$@"}
-
- # Bail if the options were screwed!
- $exit_cmd $EXIT_FAILURE
-
- # save modified positional parameters for caller
- func_validate_options_result=$func_run_hooks_result
+ $SED -n '/(C)/!b go
+ :more
+ /\./!{
+ N
+ s/\n# / /
+ b more
+ }
+ :go
+ /^# '$PROGRAM' (GNU /,/# warranty; / {
+ s/^# //
+ s/^# *$//
+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+ p
+ }' < "$progpath"
+ exit $?
}
-
-
-## ----------------- ##
-## Helper functions. ##
-## ----------------- ##
-
-# This section contains the helper functions used by the rest of the
-# hookable option parser framework in ascii-betical order.
-
-
-# func_fatal_help ARG...
-# ----------------------
-# Echo program name prefixed message to standard error, followed by
-# a help hint, and exit.
-func_fatal_help ()
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
{
- $debug_cmd
+ $opt_debug
- eval \$ECHO \""Usage: $usage"\"
- eval \$ECHO \""$fatal_help"\"
- func_error ${1+"$@"}
- exit $EXIT_FAILURE
+ $SED -n '/^# Usage:/,/^# *.*--help/ {
+ s/^# //
+ s/^# *$//
+ s/\$progname/'$progname'/
+ p
+ }' < "$progpath"
+ echo
+ $ECHO "run \`$progname --help | more' for full usage"
+ exit $?
}
-
-# func_help
-# ---------
-# Echo long help message to standard output and exit.
+# func_help [NOEXIT]
+# Echo long help message to standard output and exit,
+# unless 'noexit' is passed as argument.
func_help ()
{
- $debug_cmd
-
- func_usage_message
- $ECHO "$long_help_message"
- exit 0
+ $opt_debug
+
+ $SED -n '/^# Usage:/,/# Report bugs to/ {
+ :print
+ s/^# //
+ s/^# *$//
+ s*\$progname*'$progname'*
+ s*\$host*'"$host"'*
+ s*\$SHELL*'"$SHELL"'*
+ s*\$LTCC*'"$LTCC"'*
+ s*\$LTCFLAGS*'"$LTCFLAGS"'*
+ s*\$LD*'"$LD"'*
+ s/\$with_gnu_ld/'"$with_gnu_ld"'/
+ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
+ p
+ d
+ }
+ /^# .* home page:/b print
+ /^# General help using/b print
+ ' < "$progpath"
+ ret=$?
+ if test -z "$1"; then
+ exit $ret
+ fi
}
-
-# func_missing_arg ARGNAME
-# ------------------------
+# func_missing_arg argname
# Echo program name prefixed message to standard error and set global
# exit_cmd.
func_missing_arg ()
{
- $debug_cmd
+ $opt_debug
- func_error "Missing argument for '$1'."
+ func_error "missing argument for $1."
exit_cmd=exit
}
-# func_split_equals STRING
-# ------------------------
-# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
-# splitting STRING at the '=' sign.
-test -z "$_G_HAVE_XSI_OPS" \
- && (eval 'x=a/b/c;
- test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
- && _G_HAVE_XSI_OPS=yes
-
-if test yes = "$_G_HAVE_XSI_OPS"
-then
- # This is an XSI compatible shell, allowing a faster implementation...
- eval 'func_split_equals ()
- {
- $debug_cmd
-
- func_split_equals_lhs=${1%%=*}
- func_split_equals_rhs=${1#*=}
- test "x$func_split_equals_lhs" = "x$1" \
- && func_split_equals_rhs=
- }'
-else
- # ...otherwise fall back to using expr, which is often a shell builtin.
- func_split_equals ()
- {
- $debug_cmd
-
- func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
- func_split_equals_rhs=
- test "x$func_split_equals_lhs" = "x$1" \
- || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
- }
-fi #func_split_equals
-
-
-# func_split_short_opt SHORTOPT
-# -----------------------------
+# func_split_short_opt shortopt
# Set func_split_short_opt_name and func_split_short_opt_arg shell
# variables after splitting SHORTOPT after the 2nd character.
-if test yes = "$_G_HAVE_XSI_OPS"
-then
- # This is an XSI compatible shell, allowing a faster implementation...
- eval 'func_split_short_opt ()
- {
- $debug_cmd
-
- func_split_short_opt_arg=${1#??}
- func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
- }'
-else
- # ...otherwise fall back to using expr, which is often a shell builtin.
- func_split_short_opt ()
- {
- $debug_cmd
-
- func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
- func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
- }
-fi #func_split_short_opt
-
-
-# func_usage
-# ----------
-# Echo short help message to standard output and exit.
-func_usage ()
+func_split_short_opt ()
{
- $debug_cmd
+ my_sed_short_opt='1s/^\(..\).*$/\1/;q'
+ my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
- func_usage_message
- $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
- exit 0
-}
+ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
+ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
+} # func_split_short_opt may be replaced by extended shell implementation
-# func_usage_message
-# ------------------
-# Echo short help message to standard output.
-func_usage_message ()
+# func_split_long_opt longopt
+# Set func_split_long_opt_name and func_split_long_opt_arg shell
+# variables after splitting LONGOPT at the `=' sign.
+func_split_long_opt ()
{
- $debug_cmd
+ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+ my_sed_long_arg='1s/^--[^=]*=//'
- eval \$ECHO \""Usage: $usage"\"
- echo
- $SED -n 's|^# ||
- /^Written by/{
- x;p;x
- }
- h
- /^Written by/q' < "$progpath"
- echo
- eval \$ECHO \""$usage_message"\"
-}
+ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
+ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
+} # func_split_long_opt may be replaced by extended shell implementation
+exit_cmd=:
-# func_version
-# ------------
-# Echo version message to standard output and exit.
-func_version ()
-{
- $debug_cmd
- printf '%s\n' "$progname $scriptversion"
- $SED -n '
- /(C)/!b go
- :more
- /\./!{
- N
- s|\n# | |
- b more
- }
- :go
- /^# Written by /,/# warranty; / {
- s|^# ||
- s|^# *$||
- s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
- p
- }
- /^# Written by / {
- s|^# ||
- p
- }
- /^warranty; /q' < "$progpath"
- exit $?
-}
-# Local variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'before-save-hook 'time-stamp)
-# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
-# time-stamp-time-zone: "UTC"
-# End:
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
-# Set a version string.
-scriptversion='(GNU libtool) 2.4.6'
+# Global variables.
+nonopt=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
-# func_echo ARG...
-# ----------------
-# Libtool also displays the current mode in messages, so override
-# funclib.sh func_echo with this custom definition.
-func_echo ()
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
{
- $debug_cmd
-
- _G_message=$*
-
- func_echo_IFS=$IFS
- IFS=$nl
- for _G_line in $_G_message; do
- IFS=$func_echo_IFS
- $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
- done
- IFS=$func_echo_IFS
-}
+ eval "${1}=\$${1}\${2}"
+} # func_append may be replaced by extended shell implementation
-
-# func_warning ARG...
-# -------------------
-# Libtool warnings are not categorized, so override funclib.sh
-# func_warning with this simpler definition.
-func_warning ()
+# func_append_quoted var value
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+func_append_quoted ()
{
- $debug_cmd
+ func_quote_for_eval "${2}"
+ eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
+} # func_append_quoted may be replaced by extended shell implementation
- $warning_func ${1+"$@"}
-}
-
-
-## ---------------- ##
-## Options parsing. ##
-## ---------------- ##
-
-# Hook in the functions to make sure our own options are parsed during
-# the option parsing loop.
-
-usage='$progpath [OPTION]... [MODE-ARG]...'
-
-# Short help message in response to '-h'.
-usage_message="Options:
- --config show all configuration variables
- --debug enable verbose shell tracing
- -n, --dry-run display commands without modifying any files
- --features display basic configuration information and exit
- --mode=MODE use operation mode MODE
- --no-warnings equivalent to '-Wnone'
- --preserve-dup-deps don't remove duplicate dependency libraries
- --quiet, --silent don't print informational messages
- --tag=TAG use configuration variables from tag TAG
- -v, --verbose print more informational messages than default
- --version print version information
- -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
- -h, --help, --help-all print short, long, or detailed help message
-"
-# Additional text appended to 'usage_message' in response to '--help'.
-func_help ()
+# func_arith arithmetic-term...
+func_arith ()
{
- $debug_cmd
-
- func_usage_message
- $ECHO "$long_help_message
-
-MODE must be one of the following:
-
- clean remove files from the build directory
- compile compile a source file into a libtool object
- execute automatically set library path, then run a program
- finish complete the installation of libtool libraries
- install install libraries or executables
- link create a library or an executable
- uninstall remove libraries from an installed directory
-
-MODE-ARGS vary depending on the MODE. When passed as first option,
-'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
-Try '$progname --help --mode=MODE' for a more detailed description of MODE.
-
-When reporting a bug, please describe a test case to reproduce it and
-include the following information:
-
- host-triplet: $host
- shell: $SHELL
- compiler: $LTCC
- compiler flags: $LTCFLAGS
- linker: $LD (gnu? $with_gnu_ld)
- version: $progname (GNU libtool) 2.4.6
- automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
- autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
-
-Report bugs to <bug-libtool@gnu.org>.
-GNU libtool home page: <http://www.gnu.org/software/libtool/>.
-General help using GNU software: <http://www.gnu.org/gethelp/>."
- exit 0
-}
+ func_arith_result=`expr "${@}"`
+} # func_arith may be replaced by extended shell implementation
-# func_lo2o OBJECT-NAME
-# ---------------------
-# Transform OBJECT-NAME from a '.lo' suffix to the platform specific
-# object suffix.
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
+} # func_len may be replaced by extended shell implementation
-lo2o=s/\\.lo\$/.$objext/
-o2lo=s/\\.$objext\$/.lo/
-if test yes = "$_G_HAVE_XSI_OPS"; then
- eval 'func_lo2o ()
- {
- case $1 in
- *.lo) func_lo2o_result=${1%.lo}.$objext ;;
- * ) func_lo2o_result=$1 ;;
- esac
- }'
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
+} # func_lo2o may be replaced by extended shell implementation
- # func_xform LIBOBJ-OR-SOURCE
- # ---------------------------
- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
- # suffix to a '.lo' libtool-object suffix.
- eval 'func_xform ()
- {
- func_xform_result=${1%.*}.lo
- }'
-else
- # ...otherwise fall back to using sed.
- func_lo2o ()
- {
- func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
- }
- func_xform ()
- {
- func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
- }
-fi
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
+} # func_xform may be replaced by extended shell implementation
-# func_fatal_configuration ARG...
-# -------------------------------
+# func_fatal_configuration arg...
# Echo program name prefixed message to standard error, followed by
# a configuration failure hint, and exit.
func_fatal_configuration ()
{
- func__fatal_error ${1+"$@"} \
- "See the $PACKAGE documentation for more information." \
- "Fatal configuration error."
+ func_error ${1+"$@"}
+ func_error "See the $PACKAGE documentation for more information."
+ func_fatal_error "Fatal configuration error."
}
# func_config
-# -----------
# Display the configuration for all the tags in this script.
func_config ()
{
@@ -2149,19 +915,17 @@ func_config ()
exit $?
}
-
# func_features
-# -------------
# Display the features supported by this script.
func_features ()
{
echo "host: $host"
- if test yes = "$build_libtool_libs"; then
+ if test "$build_libtool_libs" = yes; then
echo "enable shared libraries"
else
echo "disable shared libraries"
fi
- if test yes = "$build_old_libs"; then
+ if test "$build_old_libs" = yes; then
echo "enable static libraries"
else
echo "disable static libraries"
@@ -2170,297 +934,289 @@ func_features ()
exit $?
}
-
-# func_enable_tag TAGNAME
-# -----------------------
+# func_enable_tag tagname
# Verify that TAGNAME is valid, and either flag an error and exit, or
# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
# variable here.
func_enable_tag ()
{
- # Global variable:
- tagname=$1
+ # Global variable:
+ tagname="$1"
- re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
- re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
- sed_extractcf=/$re_begincf/,/$re_endcf/p
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf="/$re_begincf/,/$re_endcf/p"
- # Validate tagname.
- case $tagname in
- *[!-_A-Za-z0-9,/]*)
- func_fatal_error "invalid tag name: $tagname"
- ;;
- esac
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
- # Don't test for the "default" C tag, as we know it's
- # there but not specially marked.
- case $tagname in
- CC) ;;
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
*)
- if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
- taglist="$taglist $tagname"
-
- # Evaluate the configuration. Be careful to quote the path
- # and the sed script, to avoid splitting on whitespace, but
- # also don't use non-portable quotes within backquotes within
- # quotes we have to do it in 2 steps:
- extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
- eval "$extractedcf"
- else
- func_error "ignoring unknown tag $tagname"
- fi
- ;;
- esac
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
}
-
# func_check_version_match
-# ------------------------
# Ensure that we are using m4 macros, and libtool script from the same
# release of libtool.
func_check_version_match ()
{
- if test "$package_revision" != "$macro_revision"; then
- if test "$VERSION" != "$macro_version"; then
- if test -z "$macro_version"; then
- cat >&2 <<_LT_EOF
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
$progname: definition of this LT_INIT comes from an older release.
$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
$progname: and run autoconf again.
_LT_EOF
- else
- cat >&2 <<_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
$progname: and run autoconf again.
_LT_EOF
- fi
- else
- cat >&2 <<_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
$progname: but the definition of this LT_INIT comes from revision $macro_revision.
$progname: You should recreate aclocal.m4 with macros from revision $package_revision
$progname: of $PACKAGE $VERSION and run autoconf again.
_LT_EOF
- fi
-
- exit $EXIT_MISMATCH
fi
-}
+ exit $EXIT_MISMATCH
+ fi
+}
-# libtool_options_prep [ARG]...
-# -----------------------------
-# Preparation for options parsed by libtool.
-libtool_options_prep ()
-{
- $debug_mode
- # Option defaults:
- opt_config=false
- opt_dlopen=
- opt_dry_run=false
- opt_help=false
- opt_mode=
- opt_preserve_dup_deps=false
- opt_quiet=false
+# Shorthand for --mode=foo, only valid as the first argument
+case $1 in
+clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+esac
- nonopt=
- preserve_args=
- # Shorthand for --mode=foo, only valid as the first argument
- case $1 in
- clean|clea|cle|cl)
- shift; set dummy --mode clean ${1+"$@"}; shift
- ;;
- compile|compil|compi|comp|com|co|c)
- shift; set dummy --mode compile ${1+"$@"}; shift
- ;;
- execute|execut|execu|exec|exe|ex|e)
- shift; set dummy --mode execute ${1+"$@"}; shift
- ;;
- finish|finis|fini|fin|fi|f)
- shift; set dummy --mode finish ${1+"$@"}; shift
- ;;
- install|instal|insta|inst|ins|in|i)
- shift; set dummy --mode install ${1+"$@"}; shift
- ;;
- link|lin|li|l)
- shift; set dummy --mode link ${1+"$@"}; shift
- ;;
- uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
- shift; set dummy --mode uninstall ${1+"$@"}; shift
- ;;
- esac
- # Pass back the list of options.
- func_quote_for_eval ${1+"$@"}
- libtool_options_prep_result=$func_quote_for_eval_result
-}
-func_add_hook func_options_prep libtool_options_prep
+# Option defaults:
+opt_debug=:
+opt_dry_run=false
+opt_config=false
+opt_preserve_dup_deps=false
+opt_features=false
+opt_finish=false
+opt_help=false
+opt_help_all=false
+opt_silent=:
+opt_warning=:
+opt_verbose=:
+opt_silent=false
+opt_verbose=false
-# libtool_parse_options [ARG]...
-# ---------------------------------
-# Provide handling for libtool specific options.
-libtool_parse_options ()
+# Parse options once, thoroughly. This comes as soon as possible in the
+# script to make things like `--version' happen as quickly as we can.
{
- $debug_cmd
+ # this just eases exit handling
+ while test $# -gt 0; do
+ opt="$1"
+ shift
+ case $opt in
+ --debug|-x) opt_debug='set -x'
+ func_echo "enabling shell trace mode"
+ $opt_debug
+ ;;
+ --dry-run|--dryrun|-n)
+ opt_dry_run=:
+ ;;
+ --config)
+ opt_config=:
+func_config
+ ;;
+ --dlopen|-dlopen)
+ optarg="$1"
+ opt_dlopen="${opt_dlopen+$opt_dlopen
+}$optarg"
+ shift
+ ;;
+ --preserve-dup-deps)
+ opt_preserve_dup_deps=:
+ ;;
+ --features)
+ opt_features=:
+func_features
+ ;;
+ --finish)
+ opt_finish=:
+set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ --help)
+ opt_help=:
+ ;;
+ --help-all)
+ opt_help_all=:
+opt_help=': help-all'
+ ;;
+ --mode)
+ test $# = 0 && func_missing_arg $opt && break
+ optarg="$1"
+ opt_mode="$optarg"
+case $optarg in
+ # Valid mode arguments:
+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $opt"
+ exit_cmd=exit
+ break
+ ;;
+esac
+ shift
+ ;;
+ --no-silent|--no-quiet)
+ opt_silent=false
+func_append preserve_args " $opt"
+ ;;
+ --no-warning|--no-warn)
+ opt_warning=false
+func_append preserve_args " $opt"
+ ;;
+ --no-verbose)
+ opt_verbose=false
+func_append preserve_args " $opt"
+ ;;
+ --silent|--quiet)
+ opt_silent=:
+func_append preserve_args " $opt"
+ opt_verbose=false
+ ;;
+ --verbose|-v)
+ opt_verbose=:
+func_append preserve_args " $opt"
+opt_silent=false
+ ;;
+ --tag)
+ test $# = 0 && func_missing_arg $opt && break
+ optarg="$1"
+ opt_tag="$optarg"
+func_append preserve_args " $opt $optarg"
+func_enable_tag "$optarg"
+ shift
+ ;;
+
+ -\?|-h) func_usage ;;
+ --help) func_help ;;
+ --version) func_version ;;
+
+ # Separate optargs to long options:
+ --*=*)
+ func_split_long_opt "$opt"
+ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate non-argument short options:
+ -\?*|-h*|-n*|-v*)
+ func_split_short_opt "$opt"
+ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ --) break ;;
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
+ *) set dummy "$opt" ${1+"$@"}; shift; break ;;
+ esac
+ done
- # Perform our own loop to consume as many options as possible in
- # each iteration.
- while test $# -gt 0; do
- _G_opt=$1
- shift
- case $_G_opt in
- --dry-run|--dryrun|-n)
- opt_dry_run=:
- ;;
-
- --config) func_config ;;
-
- --dlopen|-dlopen)
- opt_dlopen="${opt_dlopen+$opt_dlopen
-}$1"
- shift
- ;;
-
- --preserve-dup-deps)
- opt_preserve_dup_deps=: ;;
-
- --features) func_features ;;
-
- --finish) set dummy --mode finish ${1+"$@"}; shift ;;
-
- --help) opt_help=: ;;
-
- --help-all) opt_help=': help-all' ;;
-
- --mode) test $# = 0 && func_missing_arg $_G_opt && break
- opt_mode=$1
- case $1 in
- # Valid mode arguments:
- clean|compile|execute|finish|install|link|relink|uninstall) ;;
-
- # Catch anything else as an error
- *) func_error "invalid argument for $_G_opt"
- exit_cmd=exit
- break
- ;;
- esac
- shift
- ;;
-
- --no-silent|--no-quiet)
- opt_quiet=false
- func_append preserve_args " $_G_opt"
- ;;
-
- --no-warnings|--no-warning|--no-warn)
- opt_warning=false
- func_append preserve_args " $_G_opt"
- ;;
-
- --no-verbose)
- opt_verbose=false
- func_append preserve_args " $_G_opt"
- ;;
-
- --silent|--quiet)
- opt_quiet=:
- opt_verbose=false
- func_append preserve_args " $_G_opt"
- ;;
-
- --tag) test $# = 0 && func_missing_arg $_G_opt && break
- opt_tag=$1
- func_append preserve_args " $_G_opt $1"
- func_enable_tag "$1"
- shift
- ;;
-
- --verbose|-v) opt_quiet=false
- opt_verbose=:
- func_append preserve_args " $_G_opt"
- ;;
-
- # An option not handled by this hook function:
- *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
- esac
- done
+ # Validate options:
+ # save first non-option argument
+ if test "$#" -gt 0; then
+ nonopt="$opt"
+ shift
+ fi
- # save modified positional parameters for caller
- func_quote_for_eval ${1+"$@"}
- libtool_parse_options_result=$func_quote_for_eval_result
-}
-func_add_hook func_parse_options libtool_parse_options
+ # preserve --debug
+ test "$opt_debug" = : || func_append preserve_args " --debug"
+ case $host in
+ *cygwin* | *mingw* | *pw32* | *cegcc*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+ ;;
+ esac
+ $opt_help || {
+ # Sanity checks first:
+ func_check_version_match
-# libtool_validate_options [ARG]...
-# ---------------------------------
-# Perform any sanity checks on option settings and/or unconsumed
-# arguments.
-libtool_validate_options ()
-{
- # save first non-option argument
- if test 0 -lt $#; then
- nonopt=$1
- shift
+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ func_fatal_configuration "not configured to build any kind of library"
fi
- # preserve --debug
- test : = "$debug_cmd" || func_append preserve_args " --debug"
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
- case $host in
- # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
- # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
- *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
- # don't eliminate duplications in $postdeps and $predeps
- opt_duplicate_compiler_generated_deps=:
- ;;
- *)
- opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
- ;;
- esac
-
- $opt_help || {
- # Sanity checks first:
- func_check_version_match
-
- test yes != "$build_libtool_libs" \
- && test yes != "$build_old_libs" \
- && func_fatal_configuration "not configured to build any kind of library"
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
+ func_error "unrecognized option \`-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
- # Darwin sucks
- eval std_shrext=\"$shrext_cmds\"
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$progname --help --mode=$opt_mode' for more information."
+ }
- # Only execute mode is allowed to have -dlopen flags.
- if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
- func_error "unrecognized option '-dlopen'"
- $ECHO "$help" 1>&2
- exit $EXIT_FAILURE
- fi
- # Change the help message to a mode-specific one.
- generic_help=$help
- help="Try '$progname --help --mode=$opt_mode' for more information."
- }
-
- # Pass back the unparsed argument list
- func_quote_for_eval ${1+"$@"}
- libtool_validate_options_result=$func_quote_for_eval_result
+ # Bail if the options were screwed
+ $exit_cmd $EXIT_FAILURE
}
-func_add_hook func_validate_options libtool_validate_options
-
-# Process options as early as possible so that --help and --version
-# can return quickly.
-func_options ${1+"$@"}
-eval set dummy "$func_options_result"; shift
@@ -2468,52 +1224,24 @@ eval set dummy "$func_options_result"; shift
## Main. ##
## ----------- ##
-magic='%%%MAGIC variable%%%'
-magic_exe='%%%MAGIC EXE variable%%%'
-
-# Global variables.
-extracted_archives=
-extracted_serial=0
-
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end. This prevents here-documents from being
-# left over by shells.
-exec_cmd=
-
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
- eval 'cat <<_LTECHO_EOF
-$1
-_LTECHO_EOF'
-}
-
-# func_generated_by_libtool
-# True iff stdin has been generated by Libtool. This function is only
-# a basic sanity check; it will hardly flush out determined imposters.
-func_generated_by_libtool_p ()
-{
- $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
-}
-
# func_lalib_p file
-# True iff FILE is a libtool '.la' library or '.lo' object file.
+# True iff FILE is a libtool `.la' library or `.lo' object file.
# This function is only a basic sanity check; it will hardly flush out
# determined imposters.
func_lalib_p ()
{
test -f "$1" &&
- $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
+ $SED -e 4q "$1" 2>/dev/null \
+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
}
# func_lalib_unsafe_p file
-# True iff FILE is a libtool '.la' library or '.lo' object file.
+# True iff FILE is a libtool `.la' library or `.lo' object file.
# This function implements the same check as func_lalib_p without
# resorting to external programs. To this end, it redirects stdin and
# closes it afterwards, without saving the original file descriptor.
# As a safety measure, use it only where a negative result would be
-# fatal anyway. Works if 'file' does not exist.
+# fatal anyway. Works if `file' does not exist.
func_lalib_unsafe_p ()
{
lalib_p=no
@@ -2521,13 +1249,13 @@ func_lalib_unsafe_p ()
for lalib_p_l in 1 2 3 4
do
read lalib_p_line
- case $lalib_p_line in
+ case "$lalib_p_line" in
\#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
esac
done
exec 0<&5 5<&-
fi
- test yes = "$lalib_p"
+ test "$lalib_p" = yes
}
# func_ltwrapper_script_p file
@@ -2536,8 +1264,7 @@ func_lalib_unsafe_p ()
# determined imposters.
func_ltwrapper_script_p ()
{
- test -f "$1" &&
- $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
+ func_lalib_p "$1"
}
# func_ltwrapper_executable_p file
@@ -2562,7 +1289,7 @@ func_ltwrapper_scriptname ()
{
func_dirname_and_basename "$1" "" "."
func_stripname '' '.exe' "$func_basename_result"
- func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
}
# func_ltwrapper_p file
@@ -2581,13 +1308,11 @@ func_ltwrapper_p ()
# FAIL_CMD may read-access the current command in variable CMD!
func_execute_cmds ()
{
- $debug_cmd
-
+ $opt_debug
save_ifs=$IFS; IFS='~'
for cmd in $1; do
- IFS=$sp$nl
- eval cmd=\"$cmd\"
IFS=$save_ifs
+ eval cmd=\"$cmd\"
func_show_eval "$cmd" "${2-:}"
done
IFS=$save_ifs
@@ -2599,11 +1324,10 @@ func_execute_cmds ()
# Note that it is not necessary on cygwin/mingw to append a dot to
# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
# behavior happens only for exec(3), not for open(2)! Also, sourcing
-# 'FILE.' does not work on cygwin managed mounts.
+# `FILE.' does not work on cygwin managed mounts.
func_source ()
{
- $debug_cmd
-
+ $opt_debug
case $1 in
*/* | *\\*) . "$1" ;;
*) . "./$1" ;;
@@ -2630,10 +1354,10 @@ func_resolve_sysroot ()
# store the result into func_replace_sysroot_result.
func_replace_sysroot ()
{
- case $lt_sysroot:$1 in
+ case "$lt_sysroot:$1" in
?*:"$lt_sysroot"*)
func_stripname "$lt_sysroot" '' "$1"
- func_replace_sysroot_result='='$func_stripname_result
+ func_replace_sysroot_result="=$func_stripname_result"
;;
*)
# Including no sysroot.
@@ -2650,8 +1374,7 @@ func_replace_sysroot ()
# arg is usually of the form 'gcc ...'
func_infer_tag ()
{
- $debug_cmd
-
+ $opt_debug
if test -n "$available_tags" && test -z "$tagname"; then
CC_quoted=
for arg in $CC; do
@@ -2670,7 +1393,7 @@ func_infer_tag ()
for z in $available_tags; do
if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
# Evaluate the configuration.
- eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
CC_quoted=
for arg in $CC; do
# Double-quote args containing other shell metacharacters.
@@ -2695,7 +1418,7 @@ func_infer_tag ()
# line option must be used.
if test -z "$tagname"; then
func_echo "unable to infer tagged configuration"
- func_fatal_error "specify a tag with '--tag'"
+ func_fatal_error "specify a tag with \`--tag'"
# else
# func_verbose "using $tagname tagged configuration"
fi
@@ -2711,15 +1434,15 @@ func_infer_tag ()
# but don't create it if we're doing a dry run.
func_write_libtool_object ()
{
- write_libobj=$1
- if test yes = "$build_libtool_libs"; then
- write_lobj=\'$2\'
+ write_libobj=${1}
+ if test "$build_libtool_libs" = yes; then
+ write_lobj=\'${2}\'
else
write_lobj=none
fi
- if test yes = "$build_old_libs"; then
- write_oldobj=\'$3\'
+ if test "$build_old_libs" = yes; then
+ write_oldobj=\'${3}\'
else
write_oldobj=none
fi
@@ -2727,7 +1450,7 @@ func_write_libtool_object ()
$opt_dry_run || {
cat >${write_libobj}T <<EOF
# $write_libobj - a libtool object file
-# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
@@ -2739,7 +1462,7 @@ pic_object=$write_lobj
non_pic_object=$write_oldobj
EOF
- $MV "${write_libobj}T" "$write_libobj"
+ $MV "${write_libobj}T" "${write_libobj}"
}
}
@@ -2759,9 +1482,8 @@ EOF
# be empty on error (or when ARG is empty)
func_convert_core_file_wine_to_w32 ()
{
- $debug_cmd
-
- func_convert_core_file_wine_to_w32_result=$1
+ $opt_debug
+ func_convert_core_file_wine_to_w32_result="$1"
if test -n "$1"; then
# Unfortunately, winepath does not exit with a non-zero error code, so we
# are forced to check the contents of stdout. On the other hand, if the
@@ -2769,9 +1491,9 @@ func_convert_core_file_wine_to_w32 ()
# *an error message* to stdout. So we must check for both error code of
# zero AND non-empty stdout, which explains the odd construction:
func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
- if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
+ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
- $SED -e "$sed_naive_backslashify"`
+ $SED -e "$lt_sed_naive_backslashify"`
else
func_convert_core_file_wine_to_w32_result=
fi
@@ -2792,19 +1514,18 @@ func_convert_core_file_wine_to_w32 ()
# are convertible, then the result may be empty.
func_convert_core_path_wine_to_w32 ()
{
- $debug_cmd
-
+ $opt_debug
# unfortunately, winepath doesn't convert paths, only file names
- func_convert_core_path_wine_to_w32_result=
+ func_convert_core_path_wine_to_w32_result=""
if test -n "$1"; then
oldIFS=$IFS
IFS=:
for func_convert_core_path_wine_to_w32_f in $1; do
IFS=$oldIFS
func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
- if test -n "$func_convert_core_file_wine_to_w32_result"; then
+ if test -n "$func_convert_core_file_wine_to_w32_result" ; then
if test -z "$func_convert_core_path_wine_to_w32_result"; then
- func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
+ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
else
func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
fi
@@ -2833,8 +1554,7 @@ func_convert_core_path_wine_to_w32 ()
# environment variable; do not put it in $PATH.
func_cygpath ()
{
- $debug_cmd
-
+ $opt_debug
if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
if test "$?" -ne 0; then
@@ -2843,7 +1563,7 @@ func_cygpath ()
fi
else
func_cygpath_result=
- func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
+ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
fi
}
#end: func_cygpath
@@ -2854,11 +1574,10 @@ func_cygpath ()
# result in func_convert_core_msys_to_w32_result.
func_convert_core_msys_to_w32 ()
{
- $debug_cmd
-
+ $opt_debug
# awkward: cmd appends spaces to result
func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
- $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
+ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
}
#end: func_convert_core_msys_to_w32
@@ -2869,14 +1588,13 @@ func_convert_core_msys_to_w32 ()
# func_to_host_file_result to ARG1).
func_convert_file_check ()
{
- $debug_cmd
-
- if test -z "$2" && test -n "$1"; then
+ $opt_debug
+ if test -z "$2" && test -n "$1" ; then
func_error "Could not determine host file name corresponding to"
- func_error " '$1'"
+ func_error " \`$1'"
func_error "Continuing, but uninstalled executables may not work."
# Fallback:
- func_to_host_file_result=$1
+ func_to_host_file_result="$1"
fi
}
# end func_convert_file_check
@@ -2888,11 +1606,10 @@ func_convert_file_check ()
# func_to_host_file_result to a simplistic fallback value (see below).
func_convert_path_check ()
{
- $debug_cmd
-
+ $opt_debug
if test -z "$4" && test -n "$3"; then
func_error "Could not determine the host path corresponding to"
- func_error " '$3'"
+ func_error " \`$3'"
func_error "Continuing, but uninstalled executables may not work."
# Fallback. This is a deliberately simplistic "conversion" and
# should not be "improved". See libtool.info.
@@ -2901,7 +1618,7 @@ func_convert_path_check ()
func_to_host_path_result=`echo "$3" |
$SED -e "$lt_replace_pathsep_chars"`
else
- func_to_host_path_result=$3
+ func_to_host_path_result="$3"
fi
fi
}
@@ -2913,10 +1630,9 @@ func_convert_path_check ()
# and appending REPL if ORIG matches BACKPAT.
func_convert_path_front_back_pathsep ()
{
- $debug_cmd
-
+ $opt_debug
case $4 in
- $1 ) func_to_host_path_result=$3$func_to_host_path_result
+ $1 ) func_to_host_path_result="$3$func_to_host_path_result"
;;
esac
case $4 in
@@ -2930,7 +1646,7 @@ func_convert_path_front_back_pathsep ()
##################################################
# $build to $host FILE NAME CONVERSION FUNCTIONS #
##################################################
-# invoked via '$to_host_file_cmd ARG'
+# invoked via `$to_host_file_cmd ARG'
#
# In each case, ARG is the path to be converted from $build to $host format.
# Result will be available in $func_to_host_file_result.
@@ -2941,8 +1657,7 @@ func_convert_path_front_back_pathsep ()
# in func_to_host_file_result.
func_to_host_file ()
{
- $debug_cmd
-
+ $opt_debug
$to_host_file_cmd "$1"
}
# end func_to_host_file
@@ -2954,8 +1669,7 @@ func_to_host_file ()
# in (the comma separated) LAZY, no conversion takes place.
func_to_tool_file ()
{
- $debug_cmd
-
+ $opt_debug
case ,$2, in
*,"$to_tool_file_cmd",*)
func_to_tool_file_result=$1
@@ -2973,7 +1687,7 @@ func_to_tool_file ()
# Copy ARG to func_to_host_file_result.
func_convert_file_noop ()
{
- func_to_host_file_result=$1
+ func_to_host_file_result="$1"
}
# end func_convert_file_noop
@@ -2984,12 +1698,11 @@ func_convert_file_noop ()
# func_to_host_file_result.
func_convert_file_msys_to_w32 ()
{
- $debug_cmd
-
- func_to_host_file_result=$1
+ $opt_debug
+ func_to_host_file_result="$1"
if test -n "$1"; then
func_convert_core_msys_to_w32 "$1"
- func_to_host_file_result=$func_convert_core_msys_to_w32_result
+ func_to_host_file_result="$func_convert_core_msys_to_w32_result"
fi
func_convert_file_check "$1" "$func_to_host_file_result"
}
@@ -3001,9 +1714,8 @@ func_convert_file_msys_to_w32 ()
# func_to_host_file_result.
func_convert_file_cygwin_to_w32 ()
{
- $debug_cmd
-
- func_to_host_file_result=$1
+ $opt_debug
+ func_to_host_file_result="$1"
if test -n "$1"; then
# because $build is cygwin, we call "the" cygpath in $PATH; no need to use
# LT_CYGPATH in this case.
@@ -3019,12 +1731,11 @@ func_convert_file_cygwin_to_w32 ()
# and a working winepath. Returns result in func_to_host_file_result.
func_convert_file_nix_to_w32 ()
{
- $debug_cmd
-
- func_to_host_file_result=$1
+ $opt_debug
+ func_to_host_file_result="$1"
if test -n "$1"; then
func_convert_core_file_wine_to_w32 "$1"
- func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
+ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
fi
func_convert_file_check "$1" "$func_to_host_file_result"
}
@@ -3036,13 +1747,12 @@ func_convert_file_nix_to_w32 ()
# Returns result in func_to_host_file_result.
func_convert_file_msys_to_cygwin ()
{
- $debug_cmd
-
- func_to_host_file_result=$1
+ $opt_debug
+ func_to_host_file_result="$1"
if test -n "$1"; then
func_convert_core_msys_to_w32 "$1"
func_cygpath -u "$func_convert_core_msys_to_w32_result"
- func_to_host_file_result=$func_cygpath_result
+ func_to_host_file_result="$func_cygpath_result"
fi
func_convert_file_check "$1" "$func_to_host_file_result"
}
@@ -3055,14 +1765,13 @@ func_convert_file_msys_to_cygwin ()
# in func_to_host_file_result.
func_convert_file_nix_to_cygwin ()
{
- $debug_cmd
-
- func_to_host_file_result=$1
+ $opt_debug
+ func_to_host_file_result="$1"
if test -n "$1"; then
# convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
func_convert_core_file_wine_to_w32 "$1"
func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
- func_to_host_file_result=$func_cygpath_result
+ func_to_host_file_result="$func_cygpath_result"
fi
func_convert_file_check "$1" "$func_to_host_file_result"
}
@@ -3072,7 +1781,7 @@ func_convert_file_nix_to_cygwin ()
#############################################
# $build to $host PATH CONVERSION FUNCTIONS #
#############################################
-# invoked via '$to_host_path_cmd ARG'
+# invoked via `$to_host_path_cmd ARG'
#
# In each case, ARG is the path to be converted from $build to $host format.
# The result will be available in $func_to_host_path_result.
@@ -3096,11 +1805,10 @@ func_convert_file_nix_to_cygwin ()
to_host_path_cmd=
func_init_to_host_path_cmd ()
{
- $debug_cmd
-
+ $opt_debug
if test -z "$to_host_path_cmd"; then
func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
- to_host_path_cmd=func_convert_path_$func_stripname_result
+ to_host_path_cmd="func_convert_path_${func_stripname_result}"
fi
}
@@ -3110,8 +1818,7 @@ func_init_to_host_path_cmd ()
# in func_to_host_path_result.
func_to_host_path ()
{
- $debug_cmd
-
+ $opt_debug
func_init_to_host_path_cmd
$to_host_path_cmd "$1"
}
@@ -3122,7 +1829,7 @@ func_to_host_path ()
# Copy ARG to func_to_host_path_result.
func_convert_path_noop ()
{
- func_to_host_path_result=$1
+ func_to_host_path_result="$1"
}
# end func_convert_path_noop
@@ -3133,9 +1840,8 @@ func_convert_path_noop ()
# func_to_host_path_result.
func_convert_path_msys_to_w32 ()
{
- $debug_cmd
-
- func_to_host_path_result=$1
+ $opt_debug
+ func_to_host_path_result="$1"
if test -n "$1"; then
# Remove leading and trailing path separator characters from ARG. MSYS
# behavior is inconsistent here; cygpath turns them into '.;' and ';.';
@@ -3143,7 +1849,7 @@ func_convert_path_msys_to_w32 ()
func_stripname : : "$1"
func_to_host_path_tmp1=$func_stripname_result
func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
- func_to_host_path_result=$func_convert_core_msys_to_w32_result
+ func_to_host_path_result="$func_convert_core_msys_to_w32_result"
func_convert_path_check : ";" \
"$func_to_host_path_tmp1" "$func_to_host_path_result"
func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
@@ -3157,9 +1863,8 @@ func_convert_path_msys_to_w32 ()
# func_to_host_file_result.
func_convert_path_cygwin_to_w32 ()
{
- $debug_cmd
-
- func_to_host_path_result=$1
+ $opt_debug
+ func_to_host_path_result="$1"
if test -n "$1"; then
# See func_convert_path_msys_to_w32:
func_stripname : : "$1"
@@ -3178,15 +1883,14 @@ func_convert_path_cygwin_to_w32 ()
# a working winepath. Returns result in func_to_host_file_result.
func_convert_path_nix_to_w32 ()
{
- $debug_cmd
-
- func_to_host_path_result=$1
+ $opt_debug
+ func_to_host_path_result="$1"
if test -n "$1"; then
# See func_convert_path_msys_to_w32:
func_stripname : : "$1"
func_to_host_path_tmp1=$func_stripname_result
func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
- func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
+ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
func_convert_path_check : ";" \
"$func_to_host_path_tmp1" "$func_to_host_path_result"
func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
@@ -3200,16 +1904,15 @@ func_convert_path_nix_to_w32 ()
# Returns result in func_to_host_file_result.
func_convert_path_msys_to_cygwin ()
{
- $debug_cmd
-
- func_to_host_path_result=$1
+ $opt_debug
+ func_to_host_path_result="$1"
if test -n "$1"; then
# See func_convert_path_msys_to_w32:
func_stripname : : "$1"
func_to_host_path_tmp1=$func_stripname_result
func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
- func_to_host_path_result=$func_cygpath_result
+ func_to_host_path_result="$func_cygpath_result"
func_convert_path_check : : \
"$func_to_host_path_tmp1" "$func_to_host_path_result"
func_convert_path_front_back_pathsep ":*" "*:" : "$1"
@@ -3224,9 +1927,8 @@ func_convert_path_msys_to_cygwin ()
# func_to_host_file_result.
func_convert_path_nix_to_cygwin ()
{
- $debug_cmd
-
- func_to_host_path_result=$1
+ $opt_debug
+ func_to_host_path_result="$1"
if test -n "$1"; then
# Remove leading and trailing path separator characters from
# ARG. msys behavior is inconsistent here, cygpath turns them
@@ -3235,7 +1937,7 @@ func_convert_path_nix_to_cygwin ()
func_to_host_path_tmp1=$func_stripname_result
func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
- func_to_host_path_result=$func_cygpath_result
+ func_to_host_path_result="$func_cygpath_result"
func_convert_path_check : : \
"$func_to_host_path_tmp1" "$func_to_host_path_result"
func_convert_path_front_back_pathsep ":*" "*:" : "$1"
@@ -3244,31 +1946,13 @@ func_convert_path_nix_to_cygwin ()
# end func_convert_path_nix_to_cygwin
-# func_dll_def_p FILE
-# True iff FILE is a Windows DLL '.def' file.
-# Keep in sync with _LT_DLL_DEF_P in libtool.m4
-func_dll_def_p ()
-{
- $debug_cmd
-
- func_dll_def_p_tmp=`$SED -n \
- -e 's/^[ ]*//' \
- -e '/^\(;.*\)*$/d' \
- -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \
- -e q \
- "$1"`
- test DEF = "$func_dll_def_p_tmp"
-}
-
-
# func_mode_compile arg...
func_mode_compile ()
{
- $debug_cmd
-
+ $opt_debug
# Get the compilation command and the source file.
base_compile=
- srcfile=$nonopt # always keep a non-empty value in "srcfile"
+ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
suppress_opt=yes
suppress_output=
arg_mode=normal
@@ -3281,12 +1965,12 @@ func_mode_compile ()
case $arg_mode in
arg )
# do not "continue". Instead, add this to base_compile
- lastarg=$arg
+ lastarg="$arg"
arg_mode=normal
;;
target )
- libobj=$arg
+ libobj="$arg"
arg_mode=normal
continue
;;
@@ -3296,7 +1980,7 @@ func_mode_compile ()
case $arg in
-o)
test -n "$libobj" && \
- func_fatal_error "you cannot specify '-o' more than once"
+ func_fatal_error "you cannot specify \`-o' more than once"
arg_mode=target
continue
;;
@@ -3325,12 +2009,12 @@ func_mode_compile ()
func_stripname '-Wc,' '' "$arg"
args=$func_stripname_result
lastarg=
- save_ifs=$IFS; IFS=,
+ save_ifs="$IFS"; IFS=','
for arg in $args; do
- IFS=$save_ifs
+ IFS="$save_ifs"
func_append_quoted lastarg "$arg"
done
- IFS=$save_ifs
+ IFS="$save_ifs"
func_stripname ' ' '' "$lastarg"
lastarg=$func_stripname_result
@@ -3343,8 +2027,8 @@ func_mode_compile ()
# Accept the current argument as the source file.
# The previous "srcfile" becomes the current argument.
#
- lastarg=$srcfile
- srcfile=$arg
+ lastarg="$srcfile"
+ srcfile="$arg"
;;
esac # case $arg
;;
@@ -3359,13 +2043,13 @@ func_mode_compile ()
func_fatal_error "you must specify an argument for -Xcompile"
;;
target)
- func_fatal_error "you must specify a target with '-o'"
+ func_fatal_error "you must specify a target with \`-o'"
;;
*)
# Get the name of the library object.
test -z "$libobj" && {
func_basename "$srcfile"
- libobj=$func_basename_result
+ libobj="$func_basename_result"
}
;;
esac
@@ -3385,7 +2069,7 @@ func_mode_compile ()
case $libobj in
*.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
*)
- func_fatal_error "cannot determine name of library object from '$libobj'"
+ func_fatal_error "cannot determine name of library object from \`$libobj'"
;;
esac
@@ -3394,8 +2078,8 @@ func_mode_compile ()
for arg in $later; do
case $arg in
-shared)
- test yes = "$build_libtool_libs" \
- || func_fatal_configuration "cannot build a shared library"
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
build_old_libs=no
continue
;;
@@ -3421,17 +2105,17 @@ func_mode_compile ()
func_quote_for_eval "$libobj"
test "X$libobj" != "X$func_quote_for_eval_result" \
&& $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
- && func_warning "libobj name '$libobj' may not contain shell special characters."
+ && func_warning "libobj name \`$libobj' may not contain shell special characters."
func_dirname_and_basename "$obj" "/" ""
- objname=$func_basename_result
- xdir=$func_dirname_result
- lobj=$xdir$objdir/$objname
+ objname="$func_basename_result"
+ xdir="$func_dirname_result"
+ lobj=${xdir}$objdir/$objname
test -z "$base_compile" && \
func_fatal_help "you must specify a compilation command"
# Delete any leftover library objects.
- if test yes = "$build_old_libs"; then
+ if test "$build_old_libs" = yes; then
removelist="$obj $lobj $libobj ${libobj}T"
else
removelist="$lobj $libobj ${libobj}T"
@@ -3443,16 +2127,16 @@ func_mode_compile ()
pic_mode=default
;;
esac
- if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
# non-PIC code in shared libraries is not supported
pic_mode=default
fi
# Calculate the filename of the output object if compiler does
# not support -o with -c
- if test no = "$compiler_c_o"; then
- output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
- lockfile=$output_obj.lock
+ if test "$compiler_c_o" = no; then
+ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
+ lockfile="$output_obj.lock"
else
output_obj=
need_locks=no
@@ -3461,12 +2145,12 @@ func_mode_compile ()
# Lock this critical section if it is needed
# We use this script file to make the link, it avoids creating a new file
- if test yes = "$need_locks"; then
+ if test "$need_locks" = yes; then
until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
func_echo "Waiting for $lockfile to be removed"
sleep 2
done
- elif test warn = "$need_locks"; then
+ elif test "$need_locks" = warn; then
if test -f "$lockfile"; then
$ECHO "\
*** ERROR, $lockfile exists and contains:
@@ -3474,7 +2158,7 @@ func_mode_compile ()
This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
-your compiler does not support '-c' and '-o' together. If you
+your compiler does not support \`-c' and \`-o' together. If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."
@@ -3496,11 +2180,11 @@ compiler."
qsrcfile=$func_quote_for_eval_result
# Only build a PIC object if we are building libtool libraries.
- if test yes = "$build_libtool_libs"; then
+ if test "$build_libtool_libs" = yes; then
# Without this assignment, base_compile gets emptied.
fbsd_hideous_sh_bug=$base_compile
- if test no != "$pic_mode"; then
+ if test "$pic_mode" != no; then
command="$base_compile $qsrcfile $pic_flag"
else
# Don't build PIC code
@@ -3517,7 +2201,7 @@ compiler."
func_show_eval_locale "$command" \
'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
- if test warn = "$need_locks" &&
+ if test "$need_locks" = warn &&
test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
$ECHO "\
*** ERROR, $lockfile contains:
@@ -3528,7 +2212,7 @@ $srcfile
This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
-your compiler does not support '-c' and '-o' together. If you
+your compiler does not support \`-c' and \`-o' together. If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."
@@ -3544,20 +2228,20 @@ compiler."
fi
# Allow error messages only from the first compilation.
- if test yes = "$suppress_opt"; then
+ if test "$suppress_opt" = yes; then
suppress_output=' >/dev/null 2>&1'
fi
fi
# Only build a position-dependent object if we build old libraries.
- if test yes = "$build_old_libs"; then
- if test yes != "$pic_mode"; then
+ if test "$build_old_libs" = yes; then
+ if test "$pic_mode" != yes; then
# Don't build PIC code
command="$base_compile $qsrcfile$pie_flag"
else
command="$base_compile $qsrcfile $pic_flag"
fi
- if test yes = "$compiler_c_o"; then
+ if test "$compiler_c_o" = yes; then
func_append command " -o $obj"
fi
@@ -3566,7 +2250,7 @@ compiler."
func_show_eval_locale "$command" \
'$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
- if test warn = "$need_locks" &&
+ if test "$need_locks" = warn &&
test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
$ECHO "\
*** ERROR, $lockfile contains:
@@ -3577,7 +2261,7 @@ $srcfile
This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
-your compiler does not support '-c' and '-o' together. If you
+your compiler does not support \`-c' and \`-o' together. If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."
@@ -3597,7 +2281,7 @@ compiler."
func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
# Unlock the critical section if it was locked
- if test no != "$need_locks"; then
+ if test "$need_locks" != no; then
removelist=$lockfile
$RM "$lockfile"
fi
@@ -3607,7 +2291,7 @@ compiler."
}
$opt_help || {
- test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
+ test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
}
func_mode_help ()
@@ -3627,7 +2311,7 @@ func_mode_help ()
Remove files from the build directory.
RM is the name of the program to use to delete files associated with each FILE
-(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
to RM.
If FILE is a libtool library, object or program, all the files associated
@@ -3646,16 +2330,16 @@ This mode accepts the following additional options:
-no-suppress do not suppress compiler output for multiple passes
-prefer-pic try to build PIC objects only
-prefer-non-pic try to build non-PIC objects only
- -shared do not build a '.o' file suitable for static linking
- -static only build a '.o' file suitable for static linking
+ -shared do not build a \`.o' file suitable for static linking
+ -static only build a \`.o' file suitable for static linking
-Wc,FLAG pass FLAG directly to the compiler
-COMPILE-COMMAND is a command to be used in creating a 'standard' object file
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
from the given SOURCEFILE.
The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix '.c' with the
-library object suffix, '.lo'."
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
;;
execute)
@@ -3668,7 +2352,7 @@ This mode accepts the following additional options:
-dlopen FILE add the directory containing FILE to the library path
-This mode sets the library path environment variable according to '-dlopen'
+This mode sets the library path environment variable according to \`-dlopen'
flags.
If any of the ARGS are libtool executable wrappers, then they are translated
@@ -3687,7 +2371,7 @@ Complete the installation of libtool libraries.
Each LIBDIR is a directory that contains libtool libraries.
The commands that this mode executes may require superuser privileges. Use
-the '--dry-run' option if you just want to see what would be executed."
+the \`--dry-run' option if you just want to see what would be executed."
;;
install)
@@ -3697,7 +2381,7 @@ the '--dry-run' option if you just want to see what would be executed."
Install executables or libraries.
INSTALL-COMMAND is the installation command. The first component should be
-either the 'install' or 'cp' program.
+either the \`install' or \`cp' program.
The following components of INSTALL-COMMAND are treated specially:
@@ -3723,7 +2407,7 @@ The following components of LINK-COMMAND are treated specially:
-avoid-version do not add a version suffix if possible
-bindir BINDIR specify path to binaries directory (for systems where
libraries must be found in the PATH setting at runtime)
- -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-export-symbols SYMFILE
@@ -3737,8 +2421,7 @@ The following components of LINK-COMMAND are treated specially:
-no-install link a not-installable executable
-no-undefined declare that a library does not refer to external symbols
-o OUTPUT-FILE create OUTPUT-FILE from the specified objects
- -objectlist FILE use a list of object files found in FILE to specify objects
- -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes)
+ -objectlist FILE Use a list of object files found in FILE to specify objects
-precious-files-regex REGEX
don't remove output files matching REGEX
-release RELEASE specify package release information
@@ -3758,20 +2441,20 @@ The following components of LINK-COMMAND are treated specially:
-Xlinker FLAG pass linker-specific FLAG directly to the linker
-XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
-All other options (arguments beginning with '-') are ignored.
+All other options (arguments beginning with \`-') are ignored.
-Every other argument is treated as a filename. Files ending in '.la' are
+Every other argument is treated as a filename. Files ending in \`.la' are
treated as uninstalled libtool libraries, other files are standard or library
object files.
-If the OUTPUT-FILE ends in '.la', then a libtool library is created,
-only library objects ('.lo' files) may be specified, and '-rpath' is
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
required, except when creating a convenience library.
-If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
-using 'ar' and 'ranlib', or on Windows using 'lib'.
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
-If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
is created, otherwise an executable program is created."
;;
@@ -3782,7 +2465,7 @@ is created, otherwise an executable program is created."
Remove libraries from an installation directory.
RM is the name of the program to use to delete files associated with each FILE
-(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
to RM.
If FILE is a libtool library, all the files associated with it are deleted.
@@ -3790,17 +2473,17 @@ Otherwise, only FILE itself is deleted using RM."
;;
*)
- func_fatal_help "invalid operation mode '$opt_mode'"
+ func_fatal_help "invalid operation mode \`$opt_mode'"
;;
esac
echo
- $ECHO "Try '$progname --help' for more information about other modes."
+ $ECHO "Try \`$progname --help' for more information about other modes."
}
# Now that we've collected a possible --mode arg, show help if necessary
if $opt_help; then
- if test : = "$opt_help"; then
+ if test "$opt_help" = :; then
func_mode_help
else
{
@@ -3808,7 +2491,7 @@ if $opt_help; then
for opt_mode in compile link execute install finish uninstall clean; do
func_mode_help
done
- } | $SED -n '1p; 2,$s/^Usage:/ or: /p'
+ } | sed -n '1p; 2,$s/^Usage:/ or: /p'
{
func_help noexit
for opt_mode in compile link execute install finish uninstall clean; do
@@ -3816,7 +2499,7 @@ if $opt_help; then
func_mode_help
done
} |
- $SED '1d
+ sed '1d
/^When reporting/,/^Report/{
H
d
@@ -3833,17 +2516,16 @@ fi
# func_mode_execute arg...
func_mode_execute ()
{
- $debug_cmd
-
+ $opt_debug
# The first argument is the command name.
- cmd=$nonopt
+ cmd="$nonopt"
test -z "$cmd" && \
func_fatal_help "you must specify a COMMAND"
# Handle -dlopen flags immediately.
for file in $opt_dlopen; do
test -f "$file" \
- || func_fatal_help "'$file' is not a file"
+ || func_fatal_help "\`$file' is not a file"
dir=
case $file in
@@ -3853,7 +2535,7 @@ func_mode_execute ()
# Check to see that this really is a libtool archive.
func_lalib_unsafe_p "$file" \
- || func_fatal_help "'$lib' is not a valid libtool archive"
+ || func_fatal_help "\`$lib' is not a valid libtool archive"
# Read the libtool library.
dlname=
@@ -3864,18 +2546,18 @@ func_mode_execute ()
if test -z "$dlname"; then
# Warn if it was a shared library.
test -n "$library_names" && \
- func_warning "'$file' was not linked with '-export-dynamic'"
+ func_warning "\`$file' was not linked with \`-export-dynamic'"
continue
fi
func_dirname "$file" "" "."
- dir=$func_dirname_result
+ dir="$func_dirname_result"
if test -f "$dir/$objdir/$dlname"; then
func_append dir "/$objdir"
else
if test ! -f "$dir/$dlname"; then
- func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
+ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
fi
fi
;;
@@ -3883,18 +2565,18 @@ func_mode_execute ()
*.lo)
# Just add the directory containing the .lo file.
func_dirname "$file" "" "."
- dir=$func_dirname_result
+ dir="$func_dirname_result"
;;
*)
- func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
+ func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
continue
;;
esac
# Get the absolute pathname.
absdir=`cd "$dir" && pwd`
- test -n "$absdir" && dir=$absdir
+ test -n "$absdir" && dir="$absdir"
# Now add the directory to shlibpath_var.
if eval "test -z \"\$$shlibpath_var\""; then
@@ -3906,7 +2588,7 @@ func_mode_execute ()
# This variable tells wrapper scripts just to set shlibpath_var
# rather than running their programs.
- libtool_execute_magic=$magic
+ libtool_execute_magic="$magic"
# Check if any of the arguments is a wrapper script.
args=
@@ -3919,12 +2601,12 @@ func_mode_execute ()
if func_ltwrapper_script_p "$file"; then
func_source "$file"
# Transform arg to wrapped name.
- file=$progdir/$program
+ file="$progdir/$program"
elif func_ltwrapper_executable_p "$file"; then
func_ltwrapper_scriptname "$file"
func_source "$func_ltwrapper_scriptname_result"
# Transform arg to wrapped name.
- file=$progdir/$program
+ file="$progdir/$program"
fi
;;
esac
@@ -3932,15 +2614,7 @@ func_mode_execute ()
func_append_quoted args "$file"
done
- if $opt_dry_run; then
- # Display what would be done.
- if test -n "$shlibpath_var"; then
- eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
- echo "export $shlibpath_var"
- fi
- $ECHO "$cmd$args"
- exit $EXIT_SUCCESS
- else
+ if test "X$opt_dry_run" = Xfalse; then
if test -n "$shlibpath_var"; then
# Export the shlibpath_var.
eval "export $shlibpath_var"
@@ -3957,18 +2631,25 @@ func_mode_execute ()
done
# Now prepare to actually exec the command.
- exec_cmd=\$cmd$args
+ exec_cmd="\$cmd$args"
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ echo "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
fi
}
-test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
+test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
# func_mode_finish arg...
func_mode_finish ()
{
- $debug_cmd
-
+ $opt_debug
libs=
libdirs=
admincmds=
@@ -3982,11 +2663,11 @@ func_mode_finish ()
if func_lalib_unsafe_p "$opt"; then
func_append libs " $opt"
else
- func_warning "'$opt' is not a valid libtool archive"
+ func_warning "\`$opt' is not a valid libtool archive"
fi
else
- func_fatal_error "invalid argument '$opt'"
+ func_fatal_error "invalid argument \`$opt'"
fi
done
@@ -4001,12 +2682,12 @@ func_mode_finish ()
# Remove sysroot references
if $opt_dry_run; then
for lib in $libs; do
- echo "removing references to $lt_sysroot and '=' prefixes from $lib"
+ echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
done
else
tmpdir=`func_mktempdir`
for lib in $libs; do
- $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
> $tmpdir/tmp-la
mv -f $tmpdir/tmp-la $lib
done
@@ -4031,7 +2712,7 @@ func_mode_finish ()
fi
# Exit here if they wanted silent mode.
- $opt_quiet && exit $EXIT_SUCCESS
+ $opt_silent && exit $EXIT_SUCCESS
if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
echo "----------------------------------------------------------------------"
@@ -4042,27 +2723,27 @@ func_mode_finish ()
echo
echo "If you ever happen to want to link against installed libraries"
echo "in a given directory, LIBDIR, you must either use libtool, and"
- echo "specify the full pathname of the library, or use the '-LLIBDIR'"
+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
echo "flag during linking and do at least one of the following:"
if test -n "$shlibpath_var"; then
- echo " - add LIBDIR to the '$shlibpath_var' environment variable"
+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
echo " during execution"
fi
if test -n "$runpath_var"; then
- echo " - add LIBDIR to the '$runpath_var' environment variable"
+ echo " - add LIBDIR to the \`$runpath_var' environment variable"
echo " during linking"
fi
if test -n "$hardcode_libdir_flag_spec"; then
libdir=LIBDIR
eval flag=\"$hardcode_libdir_flag_spec\"
- $ECHO " - use the '$flag' linker flag"
+ $ECHO " - use the \`$flag' linker flag"
fi
if test -n "$admincmds"; then
$ECHO " - have your system administrator run these commands:$admincmds"
fi
if test -f /etc/ld.so.conf; then
- echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
fi
echo
@@ -4081,20 +2762,18 @@ func_mode_finish ()
exit $EXIT_SUCCESS
}
-test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
+test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
# func_mode_install arg...
func_mode_install ()
{
- $debug_cmd
-
+ $opt_debug
# There may be an optional sh(1) argument at the beginning of
# install_prog (especially on Windows NT).
- if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
# Allow the use of GNU shtool's install command.
- case $nonopt in *shtool*) :;; *) false;; esac
- then
+ case $nonopt in *shtool*) :;; *) false;; esac; then
# Aesthetically quote it.
func_quote_for_eval "$nonopt"
install_prog="$func_quote_for_eval_result "
@@ -4121,7 +2800,7 @@ func_mode_install ()
opts=
prev=
install_type=
- isdir=false
+ isdir=no
stripme=
no_mode=:
for arg
@@ -4134,7 +2813,7 @@ func_mode_install ()
fi
case $arg in
- -d) isdir=: ;;
+ -d) isdir=yes ;;
-f)
if $install_cp; then :; else
prev=$arg
@@ -4152,7 +2831,7 @@ func_mode_install ()
*)
# If the previous option needed an argument, then skip it.
if test -n "$prev"; then
- if test X-m = "X$prev" && test -n "$install_override_mode"; then
+ if test "x$prev" = x-m && test -n "$install_override_mode"; then
arg2=$install_override_mode
no_mode=false
fi
@@ -4177,7 +2856,7 @@ func_mode_install ()
func_fatal_help "you must specify an install program"
test -n "$prev" && \
- func_fatal_help "the '$prev' option requires an argument"
+ func_fatal_help "the \`$prev' option requires an argument"
if test -n "$install_override_mode" && $no_mode; then
if $install_cp; then :; else
@@ -4199,19 +2878,19 @@ func_mode_install ()
dest=$func_stripname_result
# Check to see that the destination is a directory.
- test -d "$dest" && isdir=:
- if $isdir; then
- destdir=$dest
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
destname=
else
func_dirname_and_basename "$dest" "" "."
- destdir=$func_dirname_result
- destname=$func_basename_result
+ destdir="$func_dirname_result"
+ destname="$func_basename_result"
# Not a directory, so check to see that there is only one file specified.
set dummy $files; shift
test "$#" -gt 1 && \
- func_fatal_help "'$dest' is not a directory"
+ func_fatal_help "\`$dest' is not a directory"
fi
case $destdir in
[\\/]* | [A-Za-z]:[\\/]*) ;;
@@ -4220,7 +2899,7 @@ func_mode_install ()
case $file in
*.lo) ;;
*)
- func_fatal_help "'$destdir' must be an absolute directory name"
+ func_fatal_help "\`$destdir' must be an absolute directory name"
;;
esac
done
@@ -4229,7 +2908,7 @@ func_mode_install ()
# This variable tells wrapper scripts just to set variables rather
# than running their programs.
- libtool_install_magic=$magic
+ libtool_install_magic="$magic"
staticlibs=
future_libdirs=
@@ -4249,7 +2928,7 @@ func_mode_install ()
# Check to see that this really is a libtool archive.
func_lalib_unsafe_p "$file" \
- || func_fatal_help "'$file' is not a valid libtool archive"
+ || func_fatal_help "\`$file' is not a valid libtool archive"
library_names=
old_library=
@@ -4271,7 +2950,7 @@ func_mode_install ()
fi
func_dirname "$file" "/" ""
- dir=$func_dirname_result
+ dir="$func_dirname_result"
func_append dir "$objdir"
if test -n "$relink_command"; then
@@ -4285,7 +2964,7 @@ func_mode_install ()
# are installed into $libdir/../bin (currently, that works fine)
# but it's something to keep an eye on.
test "$inst_prefix_dir" = "$destdir" && \
- func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
+ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
if test -n "$inst_prefix_dir"; then
# Stick the inst_prefix_dir data into the link command.
@@ -4294,36 +2973,29 @@ func_mode_install ()
relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
fi
- func_warning "relinking '$file'"
+ func_warning "relinking \`$file'"
func_show_eval "$relink_command" \
- 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
+ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
fi
# See the names of the shared library.
set dummy $library_names; shift
if test -n "$1"; then
- realname=$1
+ realname="$1"
shift
- srcname=$realname
- test -n "$relink_command" && srcname=${realname}T
+ srcname="$realname"
+ test -n "$relink_command" && srcname="$realname"T
# Install the shared library and build the symlinks.
func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
'exit $?'
- tstripme=$stripme
+ tstripme="$stripme"
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
case $realname in
*.dll.a)
- tstripme=
- ;;
- esac
- ;;
- os2*)
- case $realname in
- *_dll.a)
- tstripme=
+ tstripme=""
;;
esac
;;
@@ -4334,7 +3006,7 @@ func_mode_install ()
if test "$#" -gt 0; then
# Delete the old symlinks, and create new ones.
- # Try 'ln -sf' first, because the 'ln' binary might depend on
+ # Try `ln -sf' first, because the `ln' binary might depend on
# the symlink we replace! Solaris /bin/ln does not understand -f,
# so we also need to try rm && ln -s.
for linkname
@@ -4345,14 +3017,14 @@ func_mode_install ()
fi
# Do each command in the postinstall commands.
- lib=$destdir/$realname
+ lib="$destdir/$realname"
func_execute_cmds "$postinstall_cmds" 'exit $?'
fi
# Install the pseudo-library for information purposes.
func_basename "$file"
- name=$func_basename_result
- instname=$dir/${name}i
+ name="$func_basename_result"
+ instname="$dir/$name"i
func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
# Maybe install the static library, too.
@@ -4364,11 +3036,11 @@ func_mode_install ()
# Figure out destination file name, if it wasn't already specified.
if test -n "$destname"; then
- destfile=$destdir/$destname
+ destfile="$destdir/$destname"
else
func_basename "$file"
- destfile=$func_basename_result
- destfile=$destdir/$destfile
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
fi
# Deduce the name of the destination old-style object file.
@@ -4378,11 +3050,11 @@ func_mode_install ()
staticdest=$func_lo2o_result
;;
*.$objext)
- staticdest=$destfile
+ staticdest="$destfile"
destfile=
;;
*)
- func_fatal_help "cannot copy a libtool object to '$destfile'"
+ func_fatal_help "cannot copy a libtool object to \`$destfile'"
;;
esac
@@ -4391,7 +3063,7 @@ func_mode_install ()
func_show_eval "$install_prog $file $destfile" 'exit $?'
# Install the old object if enabled.
- if test yes = "$build_old_libs"; then
+ if test "$build_old_libs" = yes; then
# Deduce the name of the old-style object file.
func_lo2o "$file"
staticobj=$func_lo2o_result
@@ -4403,23 +3075,23 @@ func_mode_install ()
*)
# Figure out destination file name, if it wasn't already specified.
if test -n "$destname"; then
- destfile=$destdir/$destname
+ destfile="$destdir/$destname"
else
func_basename "$file"
- destfile=$func_basename_result
- destfile=$destdir/$destfile
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
fi
# If the file is missing, and there is a .exe on the end, strip it
# because it is most likely a libtool script we actually want to
# install
- stripped_ext=
+ stripped_ext=""
case $file in
*.exe)
if test ! -f "$file"; then
func_stripname '' '.exe' "$file"
file=$func_stripname_result
- stripped_ext=.exe
+ stripped_ext=".exe"
fi
;;
esac
@@ -4447,19 +3119,19 @@ func_mode_install ()
# Check the variables that should have been set.
test -z "$generated_by_libtool_version" && \
- func_fatal_error "invalid libtool wrapper script '$wrapper'"
+ func_fatal_error "invalid libtool wrapper script \`$wrapper'"
- finalize=:
+ finalize=yes
for lib in $notinst_deplibs; do
# Check to see that each library is installed.
libdir=
if test -f "$lib"; then
func_source "$lib"
fi
- libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
+ libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
if test -n "$libdir" && test ! -f "$libfile"; then
- func_warning "'$lib' has not been installed in '$libdir'"
- finalize=false
+ func_warning "\`$lib' has not been installed in \`$libdir'"
+ finalize=no
fi
done
@@ -4467,29 +3139,29 @@ func_mode_install ()
func_source "$wrapper"
outputname=
- if test no = "$fast_install" && test -n "$relink_command"; then
+ if test "$fast_install" = no && test -n "$relink_command"; then
$opt_dry_run || {
- if $finalize; then
+ if test "$finalize" = yes; then
tmpdir=`func_mktempdir`
func_basename "$file$stripped_ext"
- file=$func_basename_result
- outputname=$tmpdir/$file
+ file="$func_basename_result"
+ outputname="$tmpdir/$file"
# Replace the output file specification.
relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
- $opt_quiet || {
+ $opt_silent || {
func_quote_for_expand "$relink_command"
eval "func_echo $func_quote_for_expand_result"
}
if eval "$relink_command"; then :
else
- func_error "error: relink '$file' with the above command before installing it"
+ func_error "error: relink \`$file' with the above command before installing it"
$opt_dry_run || ${RM}r "$tmpdir"
continue
fi
- file=$outputname
+ file="$outputname"
else
- func_warning "cannot relink '$file'"
+ func_warning "cannot relink \`$file'"
fi
}
else
@@ -4526,10 +3198,10 @@ func_mode_install ()
for file in $staticlibs; do
func_basename "$file"
- name=$func_basename_result
+ name="$func_basename_result"
# Set up the ranlib parameters.
- oldlib=$destdir/$name
+ oldlib="$destdir/$name"
func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
tool_oldlib=$func_to_tool_file_result
@@ -4544,18 +3216,18 @@ func_mode_install ()
done
test -n "$future_libdirs" && \
- func_warning "remember to run '$progname --finish$future_libdirs'"
+ func_warning "remember to run \`$progname --finish$future_libdirs'"
if test -n "$current_libdirs"; then
# Maybe just do a dry run.
$opt_dry_run && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
else
exit $EXIT_SUCCESS
fi
}
-test install = "$opt_mode" && func_mode_install ${1+"$@"}
+test "$opt_mode" = install && func_mode_install ${1+"$@"}
# func_generate_dlsyms outputname originator pic_p
@@ -4563,17 +3235,16 @@ test install = "$opt_mode" && func_mode_install ${1+"$@"}
# a dlpreopen symbol table.
func_generate_dlsyms ()
{
- $debug_cmd
-
- my_outputname=$1
- my_originator=$2
- my_pic_p=${3-false}
- my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
+ $opt_debug
+ my_outputname="$1"
+ my_originator="$2"
+ my_pic_p="${3-no}"
+ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
my_dlsyms=
- if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
if test -n "$NM" && test -n "$global_symbol_pipe"; then
- my_dlsyms=${my_outputname}S.c
+ my_dlsyms="${my_outputname}S.c"
else
func_error "not configured to extract global symbols from dlpreopened files"
fi
@@ -4584,7 +3255,7 @@ func_generate_dlsyms ()
"") ;;
*.c)
# Discover the nlist of each of the dlfiles.
- nlist=$output_objdir/$my_outputname.nm
+ nlist="$output_objdir/${my_outputname}.nm"
func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
@@ -4592,36 +3263,34 @@ func_generate_dlsyms ()
func_verbose "creating $output_objdir/$my_dlsyms"
$opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
-/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
-/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
#ifdef __cplusplus
extern \"C\" {
#endif
-#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
#endif
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
-/* DATA imports from DLLs on WIN32 can't be const, because runtime
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
relocations are performed -- see ld's documentation on pseudo-relocs. */
# define LT_DLSYM_CONST
-#elif defined __osf__
+#elif defined(__osf__)
/* This system does not cope well with relocations in const data. */
# define LT_DLSYM_CONST
#else
# define LT_DLSYM_CONST const
#endif
-#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
-
/* External symbol declarations for the compiler. */\
"
- if test yes = "$dlself"; then
- func_verbose "generating symbol list for '$output'"
+ if test "$dlself" = yes; then
+ func_verbose "generating symbol list for \`$output'"
$opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
@@ -4629,7 +3298,7 @@ extern \"C\" {
progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
for progfile in $progfiles; do
func_to_tool_file "$progfile" func_convert_file_msys_to_w32
- func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
+ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
$opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
done
@@ -4649,10 +3318,10 @@ extern \"C\" {
# Prepare the list of exported symbols
if test -z "$export_symbols"; then
- export_symbols=$output_objdir/$outputname.exp
+ export_symbols="$output_objdir/$outputname.exp"
$opt_dry_run || {
$RM $export_symbols
- eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
case $host in
*cygwin* | *mingw* | *cegcc* )
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
@@ -4662,7 +3331,7 @@ extern \"C\" {
}
else
$opt_dry_run || {
- eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
eval '$MV "$nlist"T "$nlist"'
case $host in
@@ -4676,22 +3345,22 @@ extern \"C\" {
fi
for dlprefile in $dlprefiles; do
- func_verbose "extracting global C symbols from '$dlprefile'"
+ func_verbose "extracting global C symbols from \`$dlprefile'"
func_basename "$dlprefile"
- name=$func_basename_result
+ name="$func_basename_result"
case $host in
*cygwin* | *mingw* | *cegcc* )
# if an import library, we need to obtain dlname
if func_win32_import_lib_p "$dlprefile"; then
func_tr_sh "$dlprefile"
eval "curr_lafile=\$libfile_$func_tr_sh_result"
- dlprefile_dlbasename=
+ dlprefile_dlbasename=""
if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
# Use subshell, to avoid clobbering current variable values
dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
- if test -n "$dlprefile_dlname"; then
+ if test -n "$dlprefile_dlname" ; then
func_basename "$dlprefile_dlname"
- dlprefile_dlbasename=$func_basename_result
+ dlprefile_dlbasename="$func_basename_result"
else
# no lafile. user explicitly requested -dlpreopen <import library>.
$sharedlib_from_linklib_cmd "$dlprefile"
@@ -4699,7 +3368,7 @@ extern \"C\" {
fi
fi
$opt_dry_run || {
- if test -n "$dlprefile_dlbasename"; then
+ if test -n "$dlprefile_dlbasename" ; then
eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
else
func_warning "Could not compute DLL name from $name"
@@ -4755,11 +3424,6 @@ extern \"C\" {
echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
fi
- func_show_eval '$RM "${nlist}I"'
- if test -n "$global_symbol_to_import"; then
- eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
- fi
-
echo >> "$output_objdir/$my_dlsyms" "\
/* The mapping between symbol names and symbols. */
@@ -4768,30 +3432,11 @@ typedef struct {
void *address;
} lt_dlsymlist;
extern LT_DLSYM_CONST lt_dlsymlist
-lt_${my_prefix}_LTX_preloaded_symbols[];\
-"
-
- if test -s "$nlist"I; then
- echo >> "$output_objdir/$my_dlsyms" "\
-static void lt_syminit(void)
-{
- LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
- for (; symbol->name; ++symbol)
- {"
- $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
- echo >> "$output_objdir/$my_dlsyms" "\
- }
-}"
- fi
- echo >> "$output_objdir/$my_dlsyms" "\
+lt_${my_prefix}_LTX_preloaded_symbols[];
LT_DLSYM_CONST lt_dlsymlist
lt_${my_prefix}_LTX_preloaded_symbols[] =
-{ {\"$my_originator\", (void *) 0},"
-
- if test -s "$nlist"I; then
- echo >> "$output_objdir/$my_dlsyms" "\
- {\"@INIT@\", (void *) &lt_syminit},"
- fi
+{\
+ { \"$my_originator\", (void *) 0 },"
case $need_lib_prefix in
no)
@@ -4833,7 +3478,9 @@ static const void *lt_preloaded_setup() {
*-*-hpux*)
pic_flag_for_symtable=" $pic_flag" ;;
*)
- $my_pic_p && pic_flag_for_symtable=" $pic_flag"
+ if test "X$my_pic_p" != Xno; then
+ pic_flag_for_symtable=" $pic_flag"
+ fi
;;
esac
;;
@@ -4850,10 +3497,10 @@ static const void *lt_preloaded_setup() {
func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
# Clean up the generated files.
- func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
# Transform the symbol file into the correct name.
- symfileobj=$output_objdir/${my_outputname}S.$objext
+ symfileobj="$output_objdir/${my_outputname}S.$objext"
case $host in
*cygwin* | *mingw* | *cegcc* )
if test -f "$output_objdir/$my_outputname.def"; then
@@ -4871,7 +3518,7 @@ static const void *lt_preloaded_setup() {
esac
;;
*)
- func_fatal_error "unknown suffix for '$my_dlsyms'"
+ func_fatal_error "unknown suffix for \`$my_dlsyms'"
;;
esac
else
@@ -4885,32 +3532,6 @@ static const void *lt_preloaded_setup() {
fi
}
-# func_cygming_gnu_implib_p ARG
-# This predicate returns with zero status (TRUE) if
-# ARG is a GNU/binutils-style import library. Returns
-# with nonzero status (FALSE) otherwise.
-func_cygming_gnu_implib_p ()
-{
- $debug_cmd
-
- func_to_tool_file "$1" func_convert_file_msys_to_w32
- func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
- test -n "$func_cygming_gnu_implib_tmp"
-}
-
-# func_cygming_ms_implib_p ARG
-# This predicate returns with zero status (TRUE) if
-# ARG is an MS-style import library. Returns
-# with nonzero status (FALSE) otherwise.
-func_cygming_ms_implib_p ()
-{
- $debug_cmd
-
- func_to_tool_file "$1" func_convert_file_msys_to_w32
- func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
- test -n "$func_cygming_ms_implib_tmp"
-}
-
# func_win32_libid arg
# return the library type of file 'arg'
#
@@ -4920,9 +3541,8 @@ func_cygming_ms_implib_p ()
# Despite the name, also deal with 64 bit binaries.
func_win32_libid ()
{
- $debug_cmd
-
- win32_libid_type=unknown
+ $opt_debug
+ win32_libid_type="unknown"
win32_fileres=`file -L $1 2>/dev/null`
case $win32_fileres in
*ar\ archive\ import\ library*) # definitely import
@@ -4932,29 +3552,16 @@ func_win32_libid ()
# Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
$EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
- case $nm_interface in
- "MS dumpbin")
- if func_cygming_ms_implib_p "$1" ||
- func_cygming_gnu_implib_p "$1"
- then
- win32_nmres=import
- else
- win32_nmres=
- fi
- ;;
- *)
- func_to_tool_file "$1" func_convert_file_msys_to_w32
- win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
- $SED -n -e '
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+ $SED -n -e '
1,100{
/ I /{
- s|.*|import|
+ s,.*,import,
p
q
}
}'`
- ;;
- esac
case $win32_nmres in
import*) win32_libid_type="x86 archive import";;
*) win32_libid_type="x86 archive static";;
@@ -4986,8 +3593,7 @@ func_win32_libid ()
# $sharedlib_from_linklib_result
func_cygming_dll_for_implib ()
{
- $debug_cmd
-
+ $opt_debug
sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
}
@@ -5004,8 +3610,7 @@ func_cygming_dll_for_implib ()
# specified import library.
func_cygming_dll_for_implib_fallback_core ()
{
- $debug_cmd
-
+ $opt_debug
match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
$OBJDUMP -s --section "$1" "$2" 2>/dev/null |
$SED '/^Contents of section '"$match_literal"':/{
@@ -5041,8 +3646,8 @@ func_cygming_dll_for_implib_fallback_core ()
/./p' |
# we now have a list, one entry per line, of the stringified
# contents of the appropriate section of all members of the
- # archive that possess that section. Heuristic: eliminate
- # all those that have a first or second character that is
+ # archive which possess that section. Heuristic: eliminate
+ # all those which have a first or second character that is
# a '.' (that is, objdump's representation of an unprintable
# character.) This should work for all archives with less than
# 0x302f exports -- but will fail for DLLs whose name actually
@@ -5053,6 +3658,30 @@ func_cygming_dll_for_implib_fallback_core ()
$SED -e '/^\./d;/^.\./d;q'
}
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+ $opt_debug
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+ test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+ $opt_debug
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+ test -n "$func_cygming_ms_implib_tmp"
+}
+
# func_cygming_dll_for_implib_fallback ARG
# Platform-specific function to extract the
# name of the DLL associated with the specified
@@ -5066,17 +3695,16 @@ func_cygming_dll_for_implib_fallback_core ()
# $sharedlib_from_linklib_result
func_cygming_dll_for_implib_fallback ()
{
- $debug_cmd
-
- if func_cygming_gnu_implib_p "$1"; then
+ $opt_debug
+ if func_cygming_gnu_implib_p "$1" ; then
# binutils import library
sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
- elif func_cygming_ms_implib_p "$1"; then
+ elif func_cygming_ms_implib_p "$1" ; then
# ms-generated import library
sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
else
# unknown
- sharedlib_from_linklib_result=
+ sharedlib_from_linklib_result=""
fi
}
@@ -5084,11 +3712,10 @@ func_cygming_dll_for_implib_fallback ()
# func_extract_an_archive dir oldlib
func_extract_an_archive ()
{
- $debug_cmd
-
- f_ex_an_ar_dir=$1; shift
- f_ex_an_ar_oldlib=$1
- if test yes = "$lock_old_archive_extraction"; then
+ $opt_debug
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+ if test "$lock_old_archive_extraction" = yes; then
lockfile=$f_ex_an_ar_oldlib.lock
until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
func_echo "Waiting for $lockfile to be removed"
@@ -5097,7 +3724,7 @@ func_extract_an_archive ()
fi
func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
'stat=$?; rm -f "$lockfile"; exit $stat'
- if test yes = "$lock_old_archive_extraction"; then
+ if test "$lock_old_archive_extraction" = yes; then
$opt_dry_run || rm -f "$lockfile"
fi
if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
@@ -5111,23 +3738,22 @@ func_extract_an_archive ()
# func_extract_archives gentop oldlib ...
func_extract_archives ()
{
- $debug_cmd
-
- my_gentop=$1; shift
+ $opt_debug
+ my_gentop="$1"; shift
my_oldlibs=${1+"$@"}
- my_oldobjs=
- my_xlib=
- my_xabs=
- my_xdir=
+ my_oldobjs=""
+ my_xlib=""
+ my_xabs=""
+ my_xdir=""
for my_xlib in $my_oldlibs; do
# Extract the objects.
case $my_xlib in
- [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
*) my_xabs=`pwd`"/$my_xlib" ;;
esac
func_basename "$my_xlib"
- my_xlib=$func_basename_result
+ my_xlib="$func_basename_result"
my_xlib_u=$my_xlib
while :; do
case " $extracted_archives " in
@@ -5139,7 +3765,7 @@ func_extract_archives ()
esac
done
extracted_archives="$extracted_archives $my_xlib_u"
- my_xdir=$my_gentop/$my_xlib_u
+ my_xdir="$my_gentop/$my_xlib_u"
func_mkdir_p "$my_xdir"
@@ -5152,23 +3778,22 @@ func_extract_archives ()
cd $my_xdir || exit $?
darwin_archive=$my_xabs
darwin_curdir=`pwd`
- func_basename "$darwin_archive"
- darwin_base_archive=$func_basename_result
+ darwin_base_archive=`basename "$darwin_archive"`
darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
if test -n "$darwin_arches"; then
darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
darwin_arch=
func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
- for darwin_arch in $darwin_arches; do
- func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
- $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
- cd "unfat-$$/$darwin_base_archive-$darwin_arch"
- func_extract_an_archive "`pwd`" "$darwin_base_archive"
+ for darwin_arch in $darwin_arches ; do
+ func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
cd "$darwin_curdir"
- $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
+ $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
done # $darwin_arches
## Okay now we've a bunch of thin objects, gotta fatten them up :)
- darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
darwin_file=
darwin_files=
for darwin_file in $darwin_filelist; do
@@ -5190,7 +3815,7 @@ func_extract_archives ()
my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
done
- func_extract_archives_result=$my_oldobjs
+ func_extract_archives_result="$my_oldobjs"
}
@@ -5205,7 +3830,7 @@ func_extract_archives ()
#
# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
# variable will take. If 'yes', then the emitted script
-# will assume that the directory where it is stored is
+# will assume that the directory in which it is stored is
# the $objdir directory. This is a cygwin/mingw-specific
# behavior.
func_emit_wrapper ()
@@ -5216,7 +3841,7 @@ func_emit_wrapper ()
#! $SHELL
# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
#
# The $output program cannot be directly executed until all the libtool
# libraries that it depends on are installed.
@@ -5273,9 +3898,9 @@ _LTECHO_EOF'
# Very basic option parsing. These options are (a) specific to
# the libtool wrapper, (b) are identical between the wrapper
-# /script/ and the wrapper /executable/ that is used only on
+# /script/ and the wrapper /executable/ which is used only on
# windows platforms, and (c) all begin with the string "--lt-"
-# (application programs are unlikely to have options that match
+# (application programs are unlikely to have options which match
# this pattern).
#
# There are only two supported options: --lt-debug and
@@ -5308,7 +3933,7 @@ func_parse_lt_options ()
# Print the debug banner immediately:
if test -n \"\$lt_option_debug\"; then
- echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
+ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
fi
}
@@ -5319,7 +3944,7 @@ func_lt_dump_args ()
lt_dump_args_N=1;
for lt_arg
do
- \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
done
}
@@ -5333,7 +3958,7 @@ func_exec_program_core ()
*-*-mingw | *-*-os2* | *-cegcc*)
$ECHO "\
if test -n \"\$lt_option_debug\"; then
- \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
func_lt_dump_args \${1+\"\$@\"} 1>&2
fi
exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
@@ -5343,7 +3968,7 @@ func_exec_program_core ()
*)
$ECHO "\
if test -n \"\$lt_option_debug\"; then
- \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
func_lt_dump_args \${1+\"\$@\"} 1>&2
fi
exec \"\$progdir/\$program\" \${1+\"\$@\"}
@@ -5418,13 +4043,13 @@ func_exec_program ()
test -n \"\$absdir\" && thisdir=\"\$absdir\"
"
- if test yes = "$fast_install"; then
+ if test "$fast_install" = yes; then
$ECHO "\
program=lt-'$outputname'$exeext
progdir=\"\$thisdir/$objdir\"
if test ! -f \"\$progdir/\$program\" ||
- { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
test \"X\$file\" != \"X\$progdir/\$program\"; }; then
file=\"\$\$-\$program\"
@@ -5441,7 +4066,7 @@ func_exec_program ()
if test -n \"\$relink_command\"; then
if relink_command_output=\`eval \$relink_command 2>&1\`; then :
else
- \$ECHO \"\$relink_command_output\" >&2
+ $ECHO \"\$relink_command_output\" >&2
$RM \"\$progdir/\$file\"
exit 1
fi
@@ -5476,7 +4101,7 @@ func_exec_program ()
fi
# Export our shlibpath_var if we have one.
- if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
$ECHO "\
# Add our own library path to $shlibpath_var
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
@@ -5496,7 +4121,7 @@ func_exec_program ()
fi
else
# The program doesn't exist.
- \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
\$ECHO \"This script is just a wrapper for \$program.\" 1>&2
\$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
exit 1
@@ -5515,7 +4140,7 @@ func_emit_cwrapperexe_src ()
cat <<EOF
/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
- Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+ Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
The $output program cannot be directly executed until all the libtool
libraries that it depends on are installed.
@@ -5550,45 +4175,47 @@ EOF
#include <fcntl.h>
#include <sys/stat.h>
-#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
-
/* declarations of non-ANSI functions */
-#if defined __MINGW32__
+#if defined(__MINGW32__)
# ifdef __STRICT_ANSI__
int _putenv (const char *);
# endif
-#elif defined __CYGWIN__
+#elif defined(__CYGWIN__)
# ifdef __STRICT_ANSI__
char *realpath (const char *, char *);
int putenv (char *);
int setenv (const char *, const char *, int);
# endif
-/* #elif defined other_platform || defined ... */
+/* #elif defined (other platforms) ... */
#endif
/* portability defines, excluding path handling macros */
-#if defined _MSC_VER
+#if defined(_MSC_VER)
# define setmode _setmode
# define stat _stat
# define chmod _chmod
# define getcwd _getcwd
# define putenv _putenv
# define S_IXUSR _S_IEXEC
-#elif defined __MINGW32__
+# ifndef _INTPTR_T_DEFINED
+# define _INTPTR_T_DEFINED
+# define intptr_t int
+# endif
+#elif defined(__MINGW32__)
# define setmode _setmode
# define stat _stat
# define chmod _chmod
# define getcwd _getcwd
# define putenv _putenv
-#elif defined __CYGWIN__
+#elif defined(__CYGWIN__)
# define HAVE_SETENV
# define FOPEN_WB "wb"
-/* #elif defined other platforms ... */
+/* #elif defined (other platforms) ... */
#endif
-#if defined PATH_MAX
+#if defined(PATH_MAX)
# define LT_PATHMAX PATH_MAX
-#elif defined MAXPATHLEN
+#elif defined(MAXPATHLEN)
# define LT_PATHMAX MAXPATHLEN
#else
# define LT_PATHMAX 1024
@@ -5607,8 +4234,8 @@ int setenv (const char *, const char *, int);
# define PATH_SEPARATOR ':'
#endif
-#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
- defined __OS2__
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
# define HAVE_DOS_BASED_FILE_SYSTEM
# define FOPEN_WB "wb"
# ifndef DIR_SEPARATOR_2
@@ -5641,10 +4268,10 @@ int setenv (const char *, const char *, int);
#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
#define XFREE(stale) do { \
- if (stale) { free (stale); stale = 0; } \
+ if (stale) { free ((void *) stale); stale = 0; } \
} while (0)
-#if defined LT_DEBUGWRAPPER
+#if defined(LT_DEBUGWRAPPER)
static int lt_debug = 1;
#else
static int lt_debug = 0;
@@ -5673,16 +4300,11 @@ void lt_dump_script (FILE *f);
EOF
cat <<EOF
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
-# define externally_visible volatile
-#else
-# define externally_visible __attribute__((externally_visible)) volatile
-#endif
-externally_visible const char * MAGIC_EXE = "$magic_exe";
+volatile const char * MAGIC_EXE = "$magic_exe";
const char * LIB_PATH_VARNAME = "$shlibpath_var";
EOF
- if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
func_to_host_path "$temp_rpath"
cat <<EOF
const char * LIB_PATH_VALUE = "$func_to_host_path_result";
@@ -5706,7 +4328,7 @@ const char * EXE_PATH_VALUE = "";
EOF
fi
- if test yes = "$fast_install"; then
+ if test "$fast_install" = yes; then
cat <<EOF
const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
EOF
@@ -5735,12 +4357,12 @@ main (int argc, char *argv[])
char *actual_cwrapper_name;
char *target_name;
char *lt_argv_zero;
- int rval = 127;
+ intptr_t rval = 127;
int i;
program_name = (char *) xstrdup (base_name (argv[0]));
- newargz = XMALLOC (char *, (size_t) argc + 1);
+ newargz = XMALLOC (char *, argc + 1);
/* very simple arg parsing; don't want to rely on getopt
* also, copy all non cwrapper options to newargz, except
@@ -5749,10 +4371,10 @@ main (int argc, char *argv[])
newargc=0;
for (i = 1; i < argc; i++)
{
- if (STREQ (argv[i], dumpscript_opt))
+ if (strcmp (argv[i], dumpscript_opt) == 0)
{
EOF
- case $host in
+ case "$host" in
*mingw* | *cygwin* )
# make stdout use "unix" line endings
echo " setmode(1,_O_BINARY);"
@@ -5763,12 +4385,12 @@ EOF
lt_dump_script (stdout);
return 0;
}
- if (STREQ (argv[i], debug_opt))
+ if (strcmp (argv[i], debug_opt) == 0)
{
lt_debug = 1;
continue;
}
- if (STREQ (argv[i], ltwrapper_option_prefix))
+ if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
{
/* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
namespace, but it is not one of the ones we know about and
@@ -5791,7 +4413,7 @@ EOF
EOF
cat <<EOF
/* The GNU banner must be the first non-error debug message */
- lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
EOF
cat <<"EOF"
lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
@@ -5902,7 +4524,7 @@ EOF
cat <<"EOF"
/* execv doesn't actually work on mingw as expected on unix */
newargz = prepare_spawn (newargz);
- rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
if (rval == -1)
{
/* failed to start process */
@@ -5947,7 +4569,7 @@ base_name (const char *name)
{
const char *base;
-#if defined HAVE_DOS_BASED_FILE_SYSTEM
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
/* Skip over the disk name in MSDOS pathnames. */
if (isalpha ((unsigned char) name[0]) && name[1] == ':')
name += 2;
@@ -6006,7 +4628,7 @@ find_executable (const char *wrapper)
const char *p_next;
/* static buffer for getcwd */
char tmp[LT_PATHMAX + 1];
- size_t tmp_len;
+ int tmp_len;
char *concat_name;
lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
@@ -6016,7 +4638,7 @@ find_executable (const char *wrapper)
return NULL;
/* Absolute path? */
-#if defined HAVE_DOS_BASED_FILE_SYSTEM
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
{
concat_name = xstrdup (wrapper);
@@ -6034,7 +4656,7 @@ find_executable (const char *wrapper)
return concat_name;
XFREE (concat_name);
}
-#if defined HAVE_DOS_BASED_FILE_SYSTEM
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
}
#endif
@@ -6057,7 +4679,7 @@ find_executable (const char *wrapper)
for (q = p; *q; q++)
if (IS_PATH_SEPARATOR (*q))
break;
- p_len = (size_t) (q - p);
+ p_len = q - p;
p_next = (*q == '\0' ? q : q + 1);
if (p_len == 0)
{
@@ -6176,7 +4798,7 @@ strendzap (char *str, const char *pat)
if (patlen <= len)
{
str += len - patlen;
- if (STREQ (str, pat))
+ if (strcmp (str, pat) == 0)
*str = '\0';
}
return str;
@@ -6241,7 +4863,7 @@ lt_setenv (const char *name, const char *value)
char *str = xstrdup (value);
setenv (name, str, 1);
#else
- size_t len = strlen (name) + 1 + strlen (value) + 1;
+ int len = strlen (name) + 1 + strlen (value) + 1;
char *str = XMALLOC (char, len);
sprintf (str, "%s=%s", name, value);
if (putenv (str) != EXIT_SUCCESS)
@@ -6258,8 +4880,8 @@ lt_extend_str (const char *orig_value, const char *add, int to_end)
char *new_value;
if (orig_value && *orig_value)
{
- size_t orig_value_len = strlen (orig_value);
- size_t add_len = strlen (add);
+ int orig_value_len = strlen (orig_value);
+ int add_len = strlen (add);
new_value = XMALLOC (char, add_len + orig_value_len + 1);
if (to_end)
{
@@ -6290,10 +4912,10 @@ lt_update_exe_path (const char *name, const char *value)
{
char *new_value = lt_extend_str (getenv (name), value, 0);
/* some systems can't cope with a ':'-terminated path #' */
- size_t len = strlen (new_value);
- while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ int len = strlen (new_value);
+ while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
{
- new_value[--len] = '\0';
+ new_value[len-1] = '\0';
}
lt_setenv (name, new_value);
XFREE (new_value);
@@ -6460,47 +5082,27 @@ EOF
# True if ARG is an import lib, as indicated by $file_magic_cmd
func_win32_import_lib_p ()
{
- $debug_cmd
-
+ $opt_debug
case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
*import*) : ;;
*) false ;;
esac
}
-# func_suncc_cstd_abi
-# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
-# Several compiler flags select an ABI that is incompatible with the
-# Cstd library. Avoid specifying it if any are in CXXFLAGS.
-func_suncc_cstd_abi ()
-{
- $debug_cmd
-
- case " $compile_command " in
- *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
- suncc_use_cstd_abi=no
- ;;
- *)
- suncc_use_cstd_abi=yes
- ;;
- esac
-}
-
# func_mode_link arg...
func_mode_link ()
{
- $debug_cmd
-
+ $opt_debug
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
# It is impossible to link a dll without this setting, and
# we shouldn't force the makefile maintainer to figure out
- # what system we are compiling for in order to pass an extra
+ # which system we are compiling for in order to pass an extra
# flag for every libtool invocation.
# allow_undefined=no
# FIXME: Unfortunately, there are problems with the above when trying
- # to make a dll that has undefined symbols, in which case not
+ # to make a dll which has undefined symbols, in which case not
# even a static library is built. For now, we need to specify
# -no-undefined on the libtool link line when we can be certain
# that all symbols are satisfied, otherwise we get a static library.
@@ -6544,11 +5146,10 @@ func_mode_link ()
module=no
no_install=no
objs=
- os2dllname=
non_pic_objects=
precious_files_regex=
prefer_static_libs=no
- preload=false
+ preload=no
prev=
prevarg=
release=
@@ -6560,7 +5161,7 @@ func_mode_link ()
vinfo=
vinfo_number=no
weak_libs=
- single_module=$wl-single_module
+ single_module="${wl}-single_module"
func_infer_tag $base_compile
# We need to know -static, to get the right output filenames.
@@ -6568,15 +5169,15 @@ func_mode_link ()
do
case $arg in
-shared)
- test yes != "$build_libtool_libs" \
- && func_fatal_configuration "cannot build a shared library"
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
build_old_libs=no
break
;;
-all-static | -static | -static-libtool-libs)
case $arg in
-all-static)
- if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
func_warning "complete static linking is impossible in this configuration"
fi
if test -n "$link_static_flag"; then
@@ -6609,7 +5210,7 @@ func_mode_link ()
# Go through the arguments, transforming them on the way.
while test "$#" -gt 0; do
- arg=$1
+ arg="$1"
shift
func_quote_for_eval "$arg"
qarg=$func_quote_for_eval_unquoted_result
@@ -6626,21 +5227,21 @@ func_mode_link ()
case $prev in
bindir)
- bindir=$arg
+ bindir="$arg"
prev=
continue
;;
dlfiles|dlprefiles)
- $preload || {
+ if test "$preload" = no; then
# Add the symbol object into the linking commands.
func_append compile_command " @SYMFILE@"
func_append finalize_command " @SYMFILE@"
- preload=:
- }
+ preload=yes
+ fi
case $arg in
*.la | *.lo) ;; # We handle these cases below.
force)
- if test no = "$dlself"; then
+ if test "$dlself" = no; then
dlself=needless
export_dynamic=yes
fi
@@ -6648,9 +5249,9 @@ func_mode_link ()
continue
;;
self)
- if test dlprefiles = "$prev"; then
+ if test "$prev" = dlprefiles; then
dlself=yes
- elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
dlself=yes
else
dlself=needless
@@ -6660,7 +5261,7 @@ func_mode_link ()
continue
;;
*)
- if test dlfiles = "$prev"; then
+ if test "$prev" = dlfiles; then
func_append dlfiles " $arg"
else
func_append dlprefiles " $arg"
@@ -6671,14 +5272,14 @@ func_mode_link ()
esac
;;
expsyms)
- export_symbols=$arg
+ export_symbols="$arg"
test -f "$arg" \
- || func_fatal_error "symbol file '$arg' does not exist"
+ || func_fatal_error "symbol file \`$arg' does not exist"
prev=
continue
;;
expsyms_regex)
- export_symbols_regex=$arg
+ export_symbols_regex="$arg"
prev=
continue
;;
@@ -6696,13 +5297,7 @@ func_mode_link ()
continue
;;
inst_prefix)
- inst_prefix_dir=$arg
- prev=
- continue
- ;;
- mllvm)
- # Clang does not use LLVM to link, so we can simply discard any
- # '-mllvm $arg' options when doing the link step.
+ inst_prefix_dir="$arg"
prev=
continue
;;
@@ -6726,21 +5321,21 @@ func_mode_link ()
if test -z "$pic_object" ||
test -z "$non_pic_object" ||
- test none = "$pic_object" &&
- test none = "$non_pic_object"; then
- func_fatal_error "cannot find name of object for '$arg'"
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
fi
# Extract subdirectory from the argument.
func_dirname "$arg" "/" ""
- xdir=$func_dirname_result
+ xdir="$func_dirname_result"
- if test none != "$pic_object"; then
+ if test "$pic_object" != none; then
# Prepend the subdirectory the object is found in.
- pic_object=$xdir$pic_object
+ pic_object="$xdir$pic_object"
- if test dlfiles = "$prev"; then
- if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
func_append dlfiles " $pic_object"
prev=
continue
@@ -6751,7 +5346,7 @@ func_mode_link ()
fi
# CHECK ME: I think I busted this. -Ossama
- if test dlprefiles = "$prev"; then
+ if test "$prev" = dlprefiles; then
# Preload the old-style object.
func_append dlprefiles " $pic_object"
prev=
@@ -6759,23 +5354,23 @@ func_mode_link ()
# A PIC object.
func_append libobjs " $pic_object"
- arg=$pic_object
+ arg="$pic_object"
fi
# Non-PIC object.
- if test none != "$non_pic_object"; then
+ if test "$non_pic_object" != none; then
# Prepend the subdirectory the object is found in.
- non_pic_object=$xdir$non_pic_object
+ non_pic_object="$xdir$non_pic_object"
# A standard non-PIC object
func_append non_pic_objects " $non_pic_object"
- if test -z "$pic_object" || test none = "$pic_object"; then
- arg=$non_pic_object
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
fi
else
# If the PIC object exists, use it instead.
# $xdir was prepended to $pic_object above.
- non_pic_object=$pic_object
+ non_pic_object="$pic_object"
func_append non_pic_objects " $non_pic_object"
fi
else
@@ -6783,7 +5378,7 @@ func_mode_link ()
if $opt_dry_run; then
# Extract subdirectory from the argument.
func_dirname "$arg" "/" ""
- xdir=$func_dirname_result
+ xdir="$func_dirname_result"
func_lo2o "$arg"
pic_object=$xdir$objdir/$func_lo2o_result
@@ -6791,29 +5386,24 @@ func_mode_link ()
func_append libobjs " $pic_object"
func_append non_pic_objects " $non_pic_object"
else
- func_fatal_error "'$arg' is not a valid libtool object"
+ func_fatal_error "\`$arg' is not a valid libtool object"
fi
fi
done
else
- func_fatal_error "link input file '$arg' does not exist"
+ func_fatal_error "link input file \`$arg' does not exist"
fi
arg=$save_arg
prev=
continue
;;
- os2dllname)
- os2dllname=$arg
- prev=
- continue
- ;;
precious_regex)
- precious_files_regex=$arg
+ precious_files_regex="$arg"
prev=
continue
;;
release)
- release=-$arg
+ release="-$arg"
prev=
continue
;;
@@ -6825,7 +5415,7 @@ func_mode_link ()
func_fatal_error "only absolute run-paths are allowed"
;;
esac
- if test rpath = "$prev"; then
+ if test "$prev" = rpath; then
case "$rpath " in
*" $arg "*) ;;
*) func_append rpath " $arg" ;;
@@ -6840,7 +5430,7 @@ func_mode_link ()
continue
;;
shrext)
- shrext_cmds=$arg
+ shrext_cmds="$arg"
prev=
continue
;;
@@ -6880,7 +5470,7 @@ func_mode_link ()
esac
fi # test -n "$prev"
- prevarg=$arg
+ prevarg="$arg"
case $arg in
-all-static)
@@ -6894,7 +5484,7 @@ func_mode_link ()
-allow-undefined)
# FIXME: remove this flag sometime in the future.
- func_fatal_error "'-allow-undefined' must not be used because it is the default"
+ func_fatal_error "\`-allow-undefined' must not be used because it is the default"
;;
-avoid-version)
@@ -6926,7 +5516,7 @@ func_mode_link ()
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
func_fatal_error "more than one -exported-symbols argument is not allowed"
fi
- if test X-export-symbols = "X$arg"; then
+ if test "X$arg" = "X-export-symbols"; then
prev=expsyms
else
prev=expsyms_regex
@@ -6960,9 +5550,9 @@ func_mode_link ()
func_stripname "-L" '' "$arg"
if test -z "$func_stripname_result"; then
if test "$#" -gt 0; then
- func_fatal_error "require no space between '-L' and '$1'"
+ func_fatal_error "require no space between \`-L' and \`$1'"
else
- func_fatal_error "need path for '-L' option"
+ func_fatal_error "need path for \`-L' option"
fi
fi
func_resolve_sysroot "$func_stripname_result"
@@ -6973,8 +5563,8 @@ func_mode_link ()
*)
absdir=`cd "$dir" && pwd`
test -z "$absdir" && \
- func_fatal_error "cannot determine absolute directory name of '$dir'"
- dir=$absdir
+ func_fatal_error "cannot determine absolute directory name of \`$dir'"
+ dir="$absdir"
;;
esac
case "$deplibs " in
@@ -7009,7 +5599,7 @@ func_mode_link ()
;;
-l*)
- if test X-lc = "X$arg" || test X-lm = "X$arg"; then
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
# These systems don't actually have a C or math library (as such)
@@ -7017,11 +5607,11 @@ func_mode_link ()
;;
*-*-os2*)
# These systems don't actually have a C library (as such)
- test X-lc = "X$arg" && continue
+ test "X$arg" = "X-lc" && continue
;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r.
- test X-lc = "X$arg" && continue
+ test "X$arg" = "X-lc" && continue
;;
*-*-rhapsody* | *-*-darwin1.[012])
# Rhapsody C and math libraries are in the System framework
@@ -7030,16 +5620,16 @@ func_mode_link ()
;;
*-*-sco3.2v5* | *-*-sco5v6*)
# Causes problems with __ctype
- test X-lc = "X$arg" && continue
+ test "X$arg" = "X-lc" && continue
;;
*-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
# Compiler inserts libc in the correct place for threads to work
- test X-lc = "X$arg" && continue
+ test "X$arg" = "X-lc" && continue
;;
esac
- elif test X-lc_r = "X$arg"; then
+ elif test "X$arg" = "X-lc_r"; then
case $host in
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc_r directly, use -pthread flag.
continue
;;
@@ -7049,11 +5639,6 @@ func_mode_link ()
continue
;;
- -mllvm)
- prev=mllvm
- continue
- ;;
-
-module)
module=yes
continue
@@ -7083,7 +5668,7 @@ func_mode_link ()
;;
-multi_module)
- single_module=$wl-multi_module
+ single_module="${wl}-multi_module"
continue
;;
@@ -7097,8 +5682,8 @@ func_mode_link ()
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
# The PATH hackery in wrapper scripts is required on Windows
# and Darwin in order for the loader to find any dlls it needs.
- func_warning "'-no-install' is ignored for $host"
- func_warning "assuming '-no-fast-install' instead"
+ func_warning "\`-no-install' is ignored for $host"
+ func_warning "assuming \`-no-fast-install' instead"
fast_install=no
;;
*) no_install=yes ;;
@@ -7116,11 +5701,6 @@ func_mode_link ()
continue
;;
- -os2dllname)
- prev=os2dllname
- continue
- ;;
-
-o) prev=output ;;
-precious-files-regex)
@@ -7208,14 +5788,14 @@ func_mode_link ()
func_stripname '-Wc,' '' "$arg"
args=$func_stripname_result
arg=
- save_ifs=$IFS; IFS=,
+ save_ifs="$IFS"; IFS=','
for flag in $args; do
- IFS=$save_ifs
+ IFS="$save_ifs"
func_quote_for_eval "$flag"
func_append arg " $func_quote_for_eval_result"
func_append compiler_flags " $func_quote_for_eval_result"
done
- IFS=$save_ifs
+ IFS="$save_ifs"
func_stripname ' ' '' "$arg"
arg=$func_stripname_result
;;
@@ -7224,15 +5804,15 @@ func_mode_link ()
func_stripname '-Wl,' '' "$arg"
args=$func_stripname_result
arg=
- save_ifs=$IFS; IFS=,
+ save_ifs="$IFS"; IFS=','
for flag in $args; do
- IFS=$save_ifs
+ IFS="$save_ifs"
func_quote_for_eval "$flag"
func_append arg " $wl$func_quote_for_eval_result"
func_append compiler_flags " $wl$func_quote_for_eval_result"
func_append linker_flags " $func_quote_for_eval_result"
done
- IFS=$save_ifs
+ IFS="$save_ifs"
func_stripname ' ' '' "$arg"
arg=$func_stripname_result
;;
@@ -7255,7 +5835,7 @@ func_mode_link ()
# -msg_* for osf cc
-msg_*)
func_quote_for_eval "$arg"
- arg=$func_quote_for_eval_result
+ arg="$func_quote_for_eval_result"
;;
# Flags to be passed through unchanged, with rationale:
@@ -7267,46 +5847,25 @@ func_mode_link ()
# -m*, -t[45]*, -txscale* architecture-specific flags for GCC
# -F/path path to uninstalled frameworks, gcc on darwin
# -p, -pg, --coverage, -fprofile-* profiling flags for GCC
- # -fstack-protector* stack protector flags for GCC
# @file GCC response files
# -tp=* Portland pgcc target processor selection
# --sysroot=* for sysroot support
- # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
- # -stdlib=* select c++ std lib with clang
+ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
func_quote_for_eval "$arg"
- arg=$func_quote_for_eval_result
+ arg="$func_quote_for_eval_result"
func_append compile_command " $arg"
func_append finalize_command " $arg"
func_append compiler_flags " $arg"
continue
;;
- -Z*)
- if test os2 = "`expr $host : '.*\(os2\)'`"; then
- # OS/2 uses -Zxxx to specify OS/2-specific options
- compiler_flags="$compiler_flags $arg"
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- case $arg in
- -Zlinker | -Zstack)
- prev=xcompiler
- ;;
- esac
- continue
- else
- # Otherwise treat like 'Some other compiler flag' below
- func_quote_for_eval "$arg"
- arg=$func_quote_for_eval_result
- fi
- ;;
-
# Some other compiler flag.
-* | +*)
func_quote_for_eval "$arg"
- arg=$func_quote_for_eval_result
+ arg="$func_quote_for_eval_result"
;;
*.$objext)
@@ -7327,21 +5886,21 @@ func_mode_link ()
if test -z "$pic_object" ||
test -z "$non_pic_object" ||
- test none = "$pic_object" &&
- test none = "$non_pic_object"; then
- func_fatal_error "cannot find name of object for '$arg'"
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
fi
# Extract subdirectory from the argument.
func_dirname "$arg" "/" ""
- xdir=$func_dirname_result
+ xdir="$func_dirname_result"
- test none = "$pic_object" || {
+ if test "$pic_object" != none; then
# Prepend the subdirectory the object is found in.
- pic_object=$xdir$pic_object
+ pic_object="$xdir$pic_object"
- if test dlfiles = "$prev"; then
- if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
func_append dlfiles " $pic_object"
prev=
continue
@@ -7352,7 +5911,7 @@ func_mode_link ()
fi
# CHECK ME: I think I busted this. -Ossama
- if test dlprefiles = "$prev"; then
+ if test "$prev" = dlprefiles; then
# Preload the old-style object.
func_append dlprefiles " $pic_object"
prev=
@@ -7360,23 +5919,23 @@ func_mode_link ()
# A PIC object.
func_append libobjs " $pic_object"
- arg=$pic_object
- }
+ arg="$pic_object"
+ fi
# Non-PIC object.
- if test none != "$non_pic_object"; then
+ if test "$non_pic_object" != none; then
# Prepend the subdirectory the object is found in.
- non_pic_object=$xdir$non_pic_object
+ non_pic_object="$xdir$non_pic_object"
# A standard non-PIC object
func_append non_pic_objects " $non_pic_object"
- if test -z "$pic_object" || test none = "$pic_object"; then
- arg=$non_pic_object
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
fi
else
# If the PIC object exists, use it instead.
# $xdir was prepended to $pic_object above.
- non_pic_object=$pic_object
+ non_pic_object="$pic_object"
func_append non_pic_objects " $non_pic_object"
fi
else
@@ -7384,7 +5943,7 @@ func_mode_link ()
if $opt_dry_run; then
# Extract subdirectory from the argument.
func_dirname "$arg" "/" ""
- xdir=$func_dirname_result
+ xdir="$func_dirname_result"
func_lo2o "$arg"
pic_object=$xdir$objdir/$func_lo2o_result
@@ -7392,7 +5951,7 @@ func_mode_link ()
func_append libobjs " $pic_object"
func_append non_pic_objects " $non_pic_object"
else
- func_fatal_error "'$arg' is not a valid libtool object"
+ func_fatal_error "\`$arg' is not a valid libtool object"
fi
fi
;;
@@ -7408,11 +5967,11 @@ func_mode_link ()
# A libtool-controlled library.
func_resolve_sysroot "$arg"
- if test dlfiles = "$prev"; then
+ if test "$prev" = dlfiles; then
# This library was specified with -dlopen.
func_append dlfiles " $func_resolve_sysroot_result"
prev=
- elif test dlprefiles = "$prev"; then
+ elif test "$prev" = dlprefiles; then
# The library was specified with -dlpreopen.
func_append dlprefiles " $func_resolve_sysroot_result"
prev=
@@ -7427,7 +5986,7 @@ func_mode_link ()
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
func_quote_for_eval "$arg"
- arg=$func_quote_for_eval_result
+ arg="$func_quote_for_eval_result"
;;
esac # arg
@@ -7439,9 +5998,9 @@ func_mode_link ()
done # argument parsing loop
test -n "$prev" && \
- func_fatal_help "the '$prevarg' option requires an argument"
+ func_fatal_help "the \`$prevarg' option requires an argument"
- if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
eval arg=\"$export_dynamic_flag_spec\"
func_append compile_command " $arg"
func_append finalize_command " $arg"
@@ -7450,23 +6009,20 @@ func_mode_link ()
oldlibs=
# calculate the name of the file, without its directory
func_basename "$output"
- outputname=$func_basename_result
- libobjs_save=$libobjs
+ outputname="$func_basename_result"
+ libobjs_save="$libobjs"
if test -n "$shlibpath_var"; then
# get the directories listed in $shlibpath_var
- eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
+ eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
else
shlib_search_path=
fi
eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
- # Definition is injected by LT_CONFIG during libtool generation.
- func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
-
func_dirname "$output" "/" ""
- output_objdir=$func_dirname_result$objdir
+ output_objdir="$func_dirname_result$objdir"
func_to_tool_file "$output_objdir/"
tool_output_objdir=$func_to_tool_file_result
# Create the object directory.
@@ -7489,7 +6045,7 @@ func_mode_link ()
# Find all interdependent deplibs by searching for libraries
# that are linked more than once (e.g. -la -lb -la)
for deplib in $deplibs; do
- if $opt_preserve_dup_deps; then
+ if $opt_preserve_dup_deps ; then
case "$libs " in
*" $deplib "*) func_append specialdeplibs " $deplib" ;;
esac
@@ -7497,7 +6053,7 @@ func_mode_link ()
func_append libs " $deplib"
done
- if test lib = "$linkmode"; then
+ if test "$linkmode" = lib; then
libs="$predeps $libs $compiler_lib_search_path $postdeps"
# Compute libraries that are listed more than once in $predeps
@@ -7529,7 +6085,7 @@ func_mode_link ()
case $file in
*.la) ;;
*)
- func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
+ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
;;
esac
done
@@ -7537,7 +6093,7 @@ func_mode_link ()
prog)
compile_deplibs=
finalize_deplibs=
- alldeplibs=false
+ alldeplibs=no
newdlfiles=
newdlprefiles=
passes="conv scan dlopen dlpreopen link"
@@ -7549,29 +6105,32 @@ func_mode_link ()
for pass in $passes; do
# The preopen pass in lib mode reverses $deplibs; put it back here
# so that -L comes before libs that need it for instance...
- if test lib,link = "$linkmode,$pass"; then
+ if test "$linkmode,$pass" = "lib,link"; then
## FIXME: Find the place where the list is rebuilt in the wrong
## order, and fix it there properly
tmp_deplibs=
for deplib in $deplibs; do
tmp_deplibs="$deplib $tmp_deplibs"
done
- deplibs=$tmp_deplibs
+ deplibs="$tmp_deplibs"
fi
- if test lib,link = "$linkmode,$pass" ||
- test prog,scan = "$linkmode,$pass"; then
- libs=$deplibs
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
deplibs=
fi
- if test prog = "$linkmode"; then
+ if test "$linkmode" = prog; then
case $pass in
- dlopen) libs=$dlfiles ;;
- dlpreopen) libs=$dlprefiles ;;
- link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+ dlopen) libs="$dlfiles" ;;
+ dlpreopen) libs="$dlprefiles" ;;
+ link)
+ libs="$deplibs %DEPLIBS%"
+ test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
+ ;;
esac
fi
- if test lib,dlpreopen = "$linkmode,$pass"; then
+ if test "$linkmode,$pass" = "lib,dlpreopen"; then
# Collect and forward deplibs of preopened libtool libs
for lib in $dlprefiles; do
# Ignore non-libtool-libs
@@ -7592,26 +6151,26 @@ func_mode_link ()
esac
done
done
- libs=$dlprefiles
+ libs="$dlprefiles"
fi
- if test dlopen = "$pass"; then
+ if test "$pass" = dlopen; then
# Collect dlpreopened libraries
- save_deplibs=$deplibs
+ save_deplibs="$deplibs"
deplibs=
fi
for deplib in $libs; do
lib=
- found=false
+ found=no
case $deplib in
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
- if test prog,link = "$linkmode,$pass"; then
+ if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
func_append compiler_flags " $deplib"
- if test lib = "$linkmode"; then
+ if test "$linkmode" = lib ; then
case "$new_inherited_linker_flags " in
*" $deplib "*) ;;
* ) func_append new_inherited_linker_flags " $deplib" ;;
@@ -7621,13 +6180,13 @@ func_mode_link ()
continue
;;
-l*)
- if test lib != "$linkmode" && test prog != "$linkmode"; then
- func_warning "'-l' is ignored for archives/objects"
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ func_warning "\`-l' is ignored for archives/objects"
continue
fi
func_stripname '-l' '' "$deplib"
name=$func_stripname_result
- if test lib = "$linkmode"; then
+ if test "$linkmode" = lib; then
searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
else
searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
@@ -7635,22 +6194,31 @@ func_mode_link ()
for searchdir in $searchdirs; do
for search_ext in .la $std_shrext .so .a; do
# Search the libtool library
- lib=$searchdir/lib$name$search_ext
+ lib="$searchdir/lib${name}${search_ext}"
if test -f "$lib"; then
- if test .la = "$search_ext"; then
- found=:
+ if test "$search_ext" = ".la"; then
+ found=yes
else
- found=false
+ found=no
fi
break 2
fi
done
done
- if $found; then
- # deplib is a libtool library
+ if test "$found" != yes; then
+ # deplib doesn't seem to be a libtool library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ else # deplib is a libtool library
# If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
# We need to do some special things here, and not later.
- if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $deplib "*)
if func_lalib_p "$lib"; then
@@ -7658,19 +6226,19 @@ func_mode_link ()
old_library=
func_source "$lib"
for l in $old_library $library_names; do
- ll=$l
+ ll="$l"
done
- if test "X$ll" = "X$old_library"; then # only static version available
- found=false
+ if test "X$ll" = "X$old_library" ; then # only static version available
+ found=no
func_dirname "$lib" "" "."
- ladir=$func_dirname_result
+ ladir="$func_dirname_result"
lib=$ladir/$old_library
- if test prog,link = "$linkmode,$pass"; then
+ if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
deplibs="$deplib $deplibs"
- test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
fi
continue
fi
@@ -7679,25 +6247,15 @@ func_mode_link ()
*) ;;
esac
fi
- else
- # deplib doesn't seem to be a libtool library
- if test prog,link = "$linkmode,$pass"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
- fi
- continue
fi
;; # -l
*.ltframework)
- if test prog,link = "$linkmode,$pass"; then
+ if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
deplibs="$deplib $deplibs"
- if test lib = "$linkmode"; then
+ if test "$linkmode" = lib ; then
case "$new_inherited_linker_flags " in
*" $deplib "*) ;;
* ) func_append new_inherited_linker_flags " $deplib" ;;
@@ -7710,18 +6268,18 @@ func_mode_link ()
case $linkmode in
lib)
deplibs="$deplib $deplibs"
- test conv = "$pass" && continue
+ test "$pass" = conv && continue
newdependency_libs="$deplib $newdependency_libs"
func_stripname '-L' '' "$deplib"
func_resolve_sysroot "$func_stripname_result"
func_append newlib_search_path " $func_resolve_sysroot_result"
;;
prog)
- if test conv = "$pass"; then
+ if test "$pass" = conv; then
deplibs="$deplib $deplibs"
continue
fi
- if test scan = "$pass"; then
+ if test "$pass" = scan; then
deplibs="$deplib $deplibs"
else
compile_deplibs="$deplib $compile_deplibs"
@@ -7732,13 +6290,13 @@ func_mode_link ()
func_append newlib_search_path " $func_resolve_sysroot_result"
;;
*)
- func_warning "'-L' is ignored for archives/objects"
+ func_warning "\`-L' is ignored for archives/objects"
;;
esac # linkmode
continue
;; # -L
-R*)
- if test link = "$pass"; then
+ if test "$pass" = link; then
func_stripname '-R' '' "$deplib"
func_resolve_sysroot "$func_stripname_result"
dir=$func_resolve_sysroot_result
@@ -7756,7 +6314,7 @@ func_mode_link ()
lib=$func_resolve_sysroot_result
;;
*.$libext)
- if test conv = "$pass"; then
+ if test "$pass" = conv; then
deplibs="$deplib $deplibs"
continue
fi
@@ -7767,26 +6325,21 @@ func_mode_link ()
case " $dlpreconveniencelibs " in
*" $deplib "*) ;;
*)
- valid_a_lib=false
+ valid_a_lib=no
case $deplibs_check_method in
match_pattern*)
set dummy $deplibs_check_method; shift
match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
| $EGREP "$match_pattern_regex" > /dev/null; then
- valid_a_lib=:
+ valid_a_lib=yes
fi
;;
pass_all)
- valid_a_lib=:
+ valid_a_lib=yes
;;
esac
- if $valid_a_lib; then
- echo
- $ECHO "*** Warning: Linking the shared library $output against the"
- $ECHO "*** static library $deplib is not portable!"
- deplibs="$deplib $deplibs"
- else
+ if test "$valid_a_lib" != yes; then
echo
$ECHO "*** Warning: Trying to link with static lib archive $deplib."
echo "*** I have the capability to make that library automatically link in when"
@@ -7794,13 +6347,18 @@ func_mode_link ()
echo "*** shared version of the library, which you do not appear to have"
echo "*** because the file extensions .$libext of this argument makes me believe"
echo "*** that it is just a static archive that I should not use here."
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
fi
;;
esac
continue
;;
prog)
- if test link != "$pass"; then
+ if test "$pass" != link; then
deplibs="$deplib $deplibs"
else
compile_deplibs="$deplib $compile_deplibs"
@@ -7811,10 +6369,10 @@ func_mode_link ()
esac # linkmode
;; # *.$libext
*.lo | *.$objext)
- if test conv = "$pass"; then
+ if test "$pass" = conv; then
deplibs="$deplib $deplibs"
- elif test prog = "$linkmode"; then
- if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
+ elif test "$linkmode" = prog; then
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
# If there is no dlopen support or we're linking statically,
# we need to preload.
func_append newdlprefiles " $deplib"
@@ -7827,20 +6385,22 @@ func_mode_link ()
continue
;;
%DEPLIBS%)
- alldeplibs=:
+ alldeplibs=yes
continue
;;
esac # case $deplib
- $found || test -f "$lib" \
- || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
+ if test "$found" = yes || test -f "$lib"; then :
+ else
+ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+ fi
# Check to see that this really is a libtool archive.
func_lalib_unsafe_p "$lib" \
- || func_fatal_error "'$lib' is not a valid libtool archive"
+ || func_fatal_error "\`$lib' is not a valid libtool archive"
func_dirname "$lib" "" "."
- ladir=$func_dirname_result
+ ladir="$func_dirname_result"
dlname=
dlopen=
@@ -7870,36 +6430,36 @@ func_mode_link ()
done
fi
dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
- if test lib,link = "$linkmode,$pass" ||
- test prog,scan = "$linkmode,$pass" ||
- { test prog != "$linkmode" && test lib != "$linkmode"; }; then
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then
test -n "$dlopen" && func_append dlfiles " $dlopen"
test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
fi
- if test conv = "$pass"; then
+ if test "$pass" = conv; then
# Only check for convenience libraries
deplibs="$lib $deplibs"
if test -z "$libdir"; then
if test -z "$old_library"; then
- func_fatal_error "cannot find name of link library for '$lib'"
+ func_fatal_error "cannot find name of link library for \`$lib'"
fi
# It is a libtool convenience library, so add in its objects.
func_append convenience " $ladir/$objdir/$old_library"
func_append old_convenience " $ladir/$objdir/$old_library"
- elif test prog != "$linkmode" && test lib != "$linkmode"; then
- func_fatal_error "'$lib' is not a convenience library"
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_preserve_dup_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ func_fatal_error "\`$lib' is not a convenience library"
fi
- tmp_libs=
- for deplib in $dependency_libs; do
- deplibs="$deplib $deplibs"
- if $opt_preserve_dup_deps; then
- case "$tmp_libs " in
- *" $deplib "*) func_append specialdeplibs " $deplib" ;;
- esac
- fi
- func_append tmp_libs " $deplib"
- done
continue
fi # $pass = conv
@@ -7907,26 +6467,26 @@ func_mode_link ()
# Get the name of the library we link against.
linklib=
if test -n "$old_library" &&
- { test yes = "$prefer_static_libs" ||
- test built,no = "$prefer_static_libs,$installed"; }; then
+ { test "$prefer_static_libs" = yes ||
+ test "$prefer_static_libs,$installed" = "built,no"; }; then
linklib=$old_library
else
for l in $old_library $library_names; do
- linklib=$l
+ linklib="$l"
done
fi
if test -z "$linklib"; then
- func_fatal_error "cannot find name of link library for '$lib'"
+ func_fatal_error "cannot find name of link library for \`$lib'"
fi
# This library was specified with -dlopen.
- if test dlopen = "$pass"; then
- test -z "$libdir" \
- && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
+ if test "$pass" = dlopen; then
+ if test -z "$libdir"; then
+ func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+ fi
if test -z "$dlname" ||
- test yes != "$dlopen_support" ||
- test no = "$build_libtool_libs"
- then
+ test "$dlopen_support" != yes ||
+ test "$build_libtool_libs" = no; then
# If there is no dlname, no dlopen support or we're linking
# statically, we need to preload. We also need to preload any
# dependent libraries so libltdl's deplib preloader doesn't
@@ -7940,40 +6500,40 @@ func_mode_link ()
# We need an absolute path.
case $ladir in
- [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;;
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
*)
abs_ladir=`cd "$ladir" && pwd`
if test -z "$abs_ladir"; then
- func_warning "cannot determine absolute directory name of '$ladir'"
+ func_warning "cannot determine absolute directory name of \`$ladir'"
func_warning "passing it literally to the linker, although it might fail"
- abs_ladir=$ladir
+ abs_ladir="$ladir"
fi
;;
esac
func_basename "$lib"
- laname=$func_basename_result
+ laname="$func_basename_result"
# Find the relevant object directory and library name.
- if test yes = "$installed"; then
+ if test "X$installed" = Xyes; then
if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- func_warning "library '$lib' was moved."
- dir=$ladir
- absdir=$abs_ladir
- libdir=$abs_ladir
+ func_warning "library \`$lib' was moved."
+ dir="$ladir"
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
else
- dir=$lt_sysroot$libdir
- absdir=$lt_sysroot$libdir
+ dir="$lt_sysroot$libdir"
+ absdir="$lt_sysroot$libdir"
fi
- test yes = "$hardcode_automatic" && avoidtemprpath=yes
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
else
if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- dir=$ladir
- absdir=$abs_ladir
+ dir="$ladir"
+ absdir="$abs_ladir"
# Remove this search path later
func_append notinst_path " $abs_ladir"
else
- dir=$ladir/$objdir
- absdir=$abs_ladir/$objdir
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
# Remove this search path later
func_append notinst_path " $abs_ladir"
fi
@@ -7982,11 +6542,11 @@ func_mode_link ()
name=$func_stripname_result
# This library was specified with -dlpreopen.
- if test dlpreopen = "$pass"; then
- if test -z "$libdir" && test prog = "$linkmode"; then
- func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
+ if test "$pass" = dlpreopen; then
+ if test -z "$libdir" && test "$linkmode" = prog; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
fi
- case $host in
+ case "$host" in
# special handling for platforms with PE-DLLs.
*cygwin* | *mingw* | *cegcc* )
# Linker will automatically link against shared library if both
@@ -8030,9 +6590,9 @@ func_mode_link ()
if test -z "$libdir"; then
# Link the convenience library
- if test lib = "$linkmode"; then
+ if test "$linkmode" = lib; then
deplibs="$dir/$old_library $deplibs"
- elif test prog,link = "$linkmode,$pass"; then
+ elif test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$dir/$old_library $compile_deplibs"
finalize_deplibs="$dir/$old_library $finalize_deplibs"
else
@@ -8042,14 +6602,14 @@ func_mode_link ()
fi
- if test prog = "$linkmode" && test link != "$pass"; then
+ if test "$linkmode" = prog && test "$pass" != link; then
func_append newlib_search_path " $ladir"
deplibs="$lib $deplibs"
- linkalldeplibs=false
- if test no != "$link_all_deplibs" || test -z "$library_names" ||
- test no = "$build_libtool_libs"; then
- linkalldeplibs=:
+ linkalldeplibs=no
+ if test "$link_all_deplibs" != no || test -z "$library_names" ||
+ test "$build_libtool_libs" = no; then
+ linkalldeplibs=yes
fi
tmp_libs=
@@ -8061,14 +6621,14 @@ func_mode_link ()
;;
esac
# Need to link against all dependency_libs?
- if $linkalldeplibs; then
+ if test "$linkalldeplibs" = yes; then
deplibs="$deplib $deplibs"
else
# Need to hardcode shared library paths
# or/and link against static libraries
newdependency_libs="$deplib $newdependency_libs"
fi
- if $opt_preserve_dup_deps; then
+ if $opt_preserve_dup_deps ; then
case "$tmp_libs " in
*" $deplib "*) func_append specialdeplibs " $deplib" ;;
esac
@@ -8078,15 +6638,15 @@ func_mode_link ()
continue
fi # $linkmode = prog...
- if test prog,link = "$linkmode,$pass"; then
+ if test "$linkmode,$pass" = "prog,link"; then
if test -n "$library_names" &&
- { { test no = "$prefer_static_libs" ||
- test built,yes = "$prefer_static_libs,$installed"; } ||
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
test -z "$old_library"; }; then
# We need to hardcode the library path
- if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
# Make sure the rpath contains only unique directories.
- case $temp_rpath: in
+ case "$temp_rpath:" in
*"$absdir:"*) ;;
*) func_append temp_rpath "$absdir:" ;;
esac
@@ -8115,9 +6675,9 @@ func_mode_link ()
esac
fi # $linkmode,$pass = prog,link...
- if $alldeplibs &&
- { test pass_all = "$deplibs_check_method" ||
- { test yes = "$build_libtool_libs" &&
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
test -n "$library_names"; }; }; then
# We only need to search for static libraries
continue
@@ -8126,19 +6686,19 @@ func_mode_link ()
link_static=no # Whether the deplib will be linked statically
use_static_libs=$prefer_static_libs
- if test built = "$use_static_libs" && test yes = "$installed"; then
+ if test "$use_static_libs" = built && test "$installed" = yes; then
use_static_libs=no
fi
if test -n "$library_names" &&
- { test no = "$use_static_libs" || test -z "$old_library"; }; then
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
case $host in
- *cygwin* | *mingw* | *cegcc* | *os2*)
+ *cygwin* | *mingw* | *cegcc*)
# No point in relinking DLLs because paths are not encoded
func_append notinst_deplibs " $lib"
need_relink=no
;;
*)
- if test no = "$installed"; then
+ if test "$installed" = no; then
func_append notinst_deplibs " $lib"
need_relink=yes
fi
@@ -8148,24 +6708,24 @@ func_mode_link ()
# Warn about portability, can't link against -module's on some
# systems (darwin). Don't bleat about dlopened modules though!
- dlopenmodule=
+ dlopenmodule=""
for dlpremoduletest in $dlprefiles; do
if test "X$dlpremoduletest" = "X$lib"; then
- dlopenmodule=$dlpremoduletest
+ dlopenmodule="$dlpremoduletest"
break
fi
done
- if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
+ if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
echo
- if test prog = "$linkmode"; then
+ if test "$linkmode" = prog; then
$ECHO "*** Warning: Linking the executable $output against the loadable module"
else
$ECHO "*** Warning: Linking the shared library $output against the loadable module"
fi
$ECHO "*** $linklib is not portable!"
fi
- if test lib = "$linkmode" &&
- test yes = "$hardcode_into_libs"; then
+ if test "$linkmode" = lib &&
+ test "$hardcode_into_libs" = yes; then
# Hardcode the library path.
# Skip directories that are in the system default run-time
# search path.
@@ -8193,43 +6753,43 @@ func_mode_link ()
# figure out the soname
set dummy $library_names
shift
- realname=$1
+ realname="$1"
shift
libname=`eval "\\$ECHO \"$libname_spec\""`
# use dlname if we got it. it's perfectly good, no?
if test -n "$dlname"; then
- soname=$dlname
+ soname="$dlname"
elif test -n "$soname_spec"; then
# bleh windows
case $host in
- *cygwin* | mingw* | *cegcc* | *os2*)
+ *cygwin* | mingw* | *cegcc*)
func_arith $current - $age
major=$func_arith_result
- versuffix=-$major
+ versuffix="-$major"
;;
esac
eval soname=\"$soname_spec\"
else
- soname=$realname
+ soname="$realname"
fi
# Make a new name for the extract_expsyms_cmds to use
- soroot=$soname
+ soroot="$soname"
func_basename "$soroot"
- soname=$func_basename_result
+ soname="$func_basename_result"
func_stripname 'lib' '.dll' "$soname"
newlib=libimp-$func_stripname_result.a
# If the library has no export list, then create one now
if test -f "$output_objdir/$soname-def"; then :
else
- func_verbose "extracting exported symbol list from '$soname'"
+ func_verbose "extracting exported symbol list from \`$soname'"
func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
fi
# Create $newlib
if test -f "$output_objdir/$newlib"; then :; else
- func_verbose "generating import library for '$soname'"
+ func_verbose "generating import library for \`$soname'"
func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
fi
# make sure the library variables are pointing to the new library
@@ -8237,58 +6797,58 @@ func_mode_link ()
linklib=$newlib
fi # test -n "$old_archive_from_expsyms_cmds"
- if test prog = "$linkmode" || test relink != "$opt_mode"; then
+ if test "$linkmode" = prog || test "$opt_mode" != relink; then
add_shlibpath=
add_dir=
add=
lib_linked=yes
case $hardcode_action in
immediate | unsupported)
- if test no = "$hardcode_direct"; then
- add=$dir/$linklib
+ if test "$hardcode_direct" = no; then
+ add="$dir/$linklib"
case $host in
- *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
- *-*-sysv4*uw2*) add_dir=-L$dir ;;
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
*-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
- *-*-unixware7*) add_dir=-L$dir ;;
+ *-*-unixware7*) add_dir="-L$dir" ;;
*-*-darwin* )
- # if the lib is a (non-dlopened) module then we cannot
+ # if the lib is a (non-dlopened) module then we can not
# link against it, someone is ignoring the earlier warnings
if /usr/bin/file -L $add 2> /dev/null |
- $GREP ": [^:]* bundle" >/dev/null; then
+ $GREP ": [^:]* bundle" >/dev/null ; then
if test "X$dlopenmodule" != "X$lib"; then
$ECHO "*** Warning: lib $linklib is a module, not a shared library"
- if test -z "$old_library"; then
+ if test -z "$old_library" ; then
echo
echo "*** And there doesn't seem to be a static archive available"
echo "*** The link will probably fail, sorry"
else
- add=$dir/$old_library
+ add="$dir/$old_library"
fi
elif test -n "$old_library"; then
- add=$dir/$old_library
+ add="$dir/$old_library"
fi
fi
esac
- elif test no = "$hardcode_minus_L"; then
+ elif test "$hardcode_minus_L" = no; then
case $host in
- *-*-sunos*) add_shlibpath=$dir ;;
+ *-*-sunos*) add_shlibpath="$dir" ;;
esac
- add_dir=-L$dir
- add=-l$name
- elif test no = "$hardcode_shlibpath_var"; then
- add_shlibpath=$dir
- add=-l$name
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ add_shlibpath="$dir"
+ add="-l$name"
else
lib_linked=no
fi
;;
relink)
- if test yes = "$hardcode_direct" &&
- test no = "$hardcode_direct_absolute"; then
- add=$dir/$linklib
- elif test yes = "$hardcode_minus_L"; then
- add_dir=-L$absdir
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$absdir"
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
case $libdir in
@@ -8297,10 +6857,10 @@ func_mode_link ()
;;
esac
fi
- add=-l$name
- elif test yes = "$hardcode_shlibpath_var"; then
- add_shlibpath=$dir
- add=-l$name
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+ add="-l$name"
else
lib_linked=no
fi
@@ -8308,7 +6868,7 @@ func_mode_link ()
*) lib_linked=no ;;
esac
- if test yes != "$lib_linked"; then
+ if test "$lib_linked" != yes; then
func_fatal_configuration "unsupported hardcode properties"
fi
@@ -8318,15 +6878,15 @@ func_mode_link ()
*) func_append compile_shlibpath "$add_shlibpath:" ;;
esac
fi
- if test prog = "$linkmode"; then
+ if test "$linkmode" = prog; then
test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
test -n "$add" && compile_deplibs="$add $compile_deplibs"
else
test -n "$add_dir" && deplibs="$add_dir $deplibs"
test -n "$add" && deplibs="$add $deplibs"
- if test yes != "$hardcode_direct" &&
- test yes != "$hardcode_minus_L" &&
- test yes = "$hardcode_shlibpath_var"; then
+ if test "$hardcode_direct" != yes &&
+ test "$hardcode_minus_L" != yes &&
+ test "$hardcode_shlibpath_var" = yes; then
case :$finalize_shlibpath: in
*":$libdir:"*) ;;
*) func_append finalize_shlibpath "$libdir:" ;;
@@ -8335,33 +6895,33 @@ func_mode_link ()
fi
fi
- if test prog = "$linkmode" || test relink = "$opt_mode"; then
+ if test "$linkmode" = prog || test "$opt_mode" = relink; then
add_shlibpath=
add_dir=
add=
# Finalize command for both is simple: just hardcode it.
- if test yes = "$hardcode_direct" &&
- test no = "$hardcode_direct_absolute"; then
- add=$libdir/$linklib
- elif test yes = "$hardcode_minus_L"; then
- add_dir=-L$libdir
- add=-l$name
- elif test yes = "$hardcode_shlibpath_var"; then
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
case :$finalize_shlibpath: in
*":$libdir:"*) ;;
*) func_append finalize_shlibpath "$libdir:" ;;
esac
- add=-l$name
- elif test yes = "$hardcode_automatic"; then
+ add="-l$name"
+ elif test "$hardcode_automatic" = yes; then
if test -n "$inst_prefix_dir" &&
- test -f "$inst_prefix_dir$libdir/$linklib"; then
- add=$inst_prefix_dir$libdir/$linklib
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
+ add="$inst_prefix_dir$libdir/$linklib"
else
- add=$libdir/$linklib
+ add="$libdir/$linklib"
fi
else
# We cannot seem to hardcode it, guess we'll fake it.
- add_dir=-L$libdir
+ add_dir="-L$libdir"
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
case $libdir in
@@ -8370,10 +6930,10 @@ func_mode_link ()
;;
esac
fi
- add=-l$name
+ add="-l$name"
fi
- if test prog = "$linkmode"; then
+ if test "$linkmode" = prog; then
test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
else
@@ -8381,43 +6941,43 @@ func_mode_link ()
test -n "$add" && deplibs="$add $deplibs"
fi
fi
- elif test prog = "$linkmode"; then
+ elif test "$linkmode" = prog; then
# Here we assume that one of hardcode_direct or hardcode_minus_L
# is not unsupported. This is valid on all known static and
# shared platforms.
- if test unsupported != "$hardcode_direct"; then
- test -n "$old_library" && linklib=$old_library
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
compile_deplibs="$dir/$linklib $compile_deplibs"
finalize_deplibs="$dir/$linklib $finalize_deplibs"
else
compile_deplibs="-l$name -L$dir $compile_deplibs"
finalize_deplibs="-l$name -L$dir $finalize_deplibs"
fi
- elif test yes = "$build_libtool_libs"; then
+ elif test "$build_libtool_libs" = yes; then
# Not a shared library
- if test pass_all != "$deplibs_check_method"; then
+ if test "$deplibs_check_method" != pass_all; then
# We're trying link a shared library against a static one
# but the system doesn't support it.
# Just print a warning and add the library to dependency_libs so
# that the program can be linked against the static library.
echo
- $ECHO "*** Warning: This system cannot link to static lib archive $lib."
+ $ECHO "*** Warning: This system can not link to static lib archive $lib."
echo "*** I have the capability to make that library automatically link in when"
echo "*** you link to this library. But I can only do this if you have a"
echo "*** shared version of the library, which you do not appear to have."
- if test yes = "$module"; then
+ if test "$module" = yes; then
echo "*** But as you try to build a module library, libtool will still create "
echo "*** a static module, that should work as long as the dlopening application"
echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
if test -z "$global_symbol_pipe"; then
echo
echo "*** However, this would only work if libtool was able to extract symbol"
- echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
echo "*** not find such a program. So, this module is probably useless."
- echo "*** 'nm' from GNU binutils and a full rebuild may help."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
fi
- if test no = "$build_old_libs"; then
+ if test "$build_old_libs" = no; then
build_libtool_libs=module
build_old_libs=yes
else
@@ -8430,11 +6990,11 @@ func_mode_link ()
fi
fi # link shared/static library?
- if test lib = "$linkmode"; then
+ if test "$linkmode" = lib; then
if test -n "$dependency_libs" &&
- { test yes != "$hardcode_into_libs" ||
- test yes = "$build_old_libs" ||
- test yes = "$link_static"; }; then
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; then
# Extract -R from dependency_libs
temp_deplibs=
for libdir in $dependency_libs; do
@@ -8448,12 +7008,12 @@ func_mode_link ()
*) func_append temp_deplibs " $libdir";;
esac
done
- dependency_libs=$temp_deplibs
+ dependency_libs="$temp_deplibs"
fi
func_append newlib_search_path " $absdir"
# Link against this library
- test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
# ... and its dependency_libs
tmp_libs=
for deplib in $dependency_libs; do
@@ -8463,7 +7023,7 @@ func_mode_link ()
func_resolve_sysroot "$func_stripname_result";;
*) func_resolve_sysroot "$deplib" ;;
esac
- if $opt_preserve_dup_deps; then
+ if $opt_preserve_dup_deps ; then
case "$tmp_libs " in
*" $func_resolve_sysroot_result "*)
func_append specialdeplibs " $func_resolve_sysroot_result" ;;
@@ -8472,12 +7032,12 @@ func_mode_link ()
func_append tmp_libs " $func_resolve_sysroot_result"
done
- if test no != "$link_all_deplibs"; then
+ if test "$link_all_deplibs" != no; then
# Add the search paths of all dependency libraries
for deplib in $dependency_libs; do
path=
case $deplib in
- -L*) path=$deplib ;;
+ -L*) path="$deplib" ;;
*.la)
func_resolve_sysroot "$deplib"
deplib=$func_resolve_sysroot_result
@@ -8485,12 +7045,12 @@ func_mode_link ()
dir=$func_dirname_result
# We need an absolute path.
case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
*)
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
- func_warning "cannot determine absolute directory name of '$dir'"
- absdir=$dir
+ func_warning "cannot determine absolute directory name of \`$dir'"
+ absdir="$dir"
fi
;;
esac
@@ -8498,35 +7058,35 @@ func_mode_link ()
case $host in
*-*-darwin*)
depdepl=
- eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
- if test -n "$deplibrary_names"; then
- for tmp in $deplibrary_names; do
+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names" ; then
+ for tmp in $deplibrary_names ; do
depdepl=$tmp
done
- if test -f "$absdir/$objdir/$depdepl"; then
- depdepl=$absdir/$objdir/$depdepl
- darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -f "$absdir/$objdir/$depdepl" ; then
+ depdepl="$absdir/$objdir/$depdepl"
+ darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
if test -z "$darwin_install_name"; then
- darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
fi
- func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
- func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
+ func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+ func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
path=
fi
fi
;;
*)
- path=-L$absdir/$objdir
+ path="-L$absdir/$objdir"
;;
esac
else
- eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
test -z "$libdir" && \
- func_fatal_error "'$deplib' is not a valid libtool archive"
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
test "$absdir" != "$libdir" && \
- func_warning "'$deplib' seems to be moved"
+ func_warning "\`$deplib' seems to be moved"
- path=-L$absdir
+ path="-L$absdir"
fi
;;
esac
@@ -8538,23 +7098,23 @@ func_mode_link ()
fi # link_all_deplibs != no
fi # linkmode = lib
done # for deplib in $libs
- if test link = "$pass"; then
- if test prog = "$linkmode"; then
+ if test "$pass" = link; then
+ if test "$linkmode" = "prog"; then
compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
else
compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
fi
fi
- dependency_libs=$newdependency_libs
- if test dlpreopen = "$pass"; then
+ dependency_libs="$newdependency_libs"
+ if test "$pass" = dlpreopen; then
# Link the dlpreopened libraries before other libraries
for deplib in $save_deplibs; do
deplibs="$deplib $deplibs"
done
fi
- if test dlopen != "$pass"; then
- test conv = "$pass" || {
+ if test "$pass" != dlopen; then
+ if test "$pass" != conv; then
# Make sure lib_search_path contains only unique directories.
lib_search_path=
for dir in $newlib_search_path; do
@@ -8564,12 +7124,12 @@ func_mode_link ()
esac
done
newlib_search_path=
- }
+ fi
- if test prog,link = "$linkmode,$pass"; then
- vars="compile_deplibs finalize_deplibs"
+ if test "$linkmode,$pass" != "prog,link"; then
+ vars="deplibs"
else
- vars=deplibs
+ vars="compile_deplibs finalize_deplibs"
fi
for var in $vars dependency_libs; do
# Add libraries to $var in reverse order
@@ -8627,93 +7187,62 @@ func_mode_link ()
eval $var=\"$tmp_libs\"
done # for var
fi
-
- # Add Sun CC postdeps if required:
- test CXX = "$tagname" && {
- case $host_os in
- linux*)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*) # Sun C++ 5.9
- func_suncc_cstd_abi
-
- if test no != "$suncc_use_cstd_abi"; then
- func_append postdeps ' -library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-
- solaris*)
- func_cc_basename "$CC"
- case $func_cc_basename_result in
- CC* | sunCC*)
- func_suncc_cstd_abi
-
- if test no != "$suncc_use_cstd_abi"; then
- func_append postdeps ' -library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
- esac
- }
-
# Last step: remove runtime libs from dependency_libs
# (they stay in deplibs)
tmp_libs=
- for i in $dependency_libs; do
+ for i in $dependency_libs ; do
case " $predeps $postdeps $compiler_lib_search_path " in
*" $i "*)
- i=
+ i=""
;;
esac
- if test -n "$i"; then
+ if test -n "$i" ; then
func_append tmp_libs " $i"
fi
done
dependency_libs=$tmp_libs
done # for pass
- if test prog = "$linkmode"; then
- dlfiles=$newdlfiles
+ if test "$linkmode" = prog; then
+ dlfiles="$newdlfiles"
fi
- if test prog = "$linkmode" || test lib = "$linkmode"; then
- dlprefiles=$newdlprefiles
+ if test "$linkmode" = prog || test "$linkmode" = lib; then
+ dlprefiles="$newdlprefiles"
fi
case $linkmode in
oldlib)
- if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
- func_warning "'-dlopen' is ignored for archives"
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for archives"
fi
case " $deplibs" in
*\ -l* | *\ -L*)
- func_warning "'-l' and '-L' are ignored for archives" ;;
+ func_warning "\`-l' and \`-L' are ignored for archives" ;;
esac
test -n "$rpath" && \
- func_warning "'-rpath' is ignored for archives"
+ func_warning "\`-rpath' is ignored for archives"
test -n "$xrpath" && \
- func_warning "'-R' is ignored for archives"
+ func_warning "\`-R' is ignored for archives"
test -n "$vinfo" && \
- func_warning "'-version-info/-version-number' is ignored for archives"
+ func_warning "\`-version-info/-version-number' is ignored for archives"
test -n "$release" && \
- func_warning "'-release' is ignored for archives"
+ func_warning "\`-release' is ignored for archives"
test -n "$export_symbols$export_symbols_regex" && \
- func_warning "'-export-symbols' is ignored for archives"
+ func_warning "\`-export-symbols' is ignored for archives"
# Now set the variables for building old libraries.
build_libtool_libs=no
- oldlibs=$output
+ oldlibs="$output"
func_append objs "$old_deplibs"
;;
lib)
- # Make sure we only generate libraries of the form 'libNAME.la'.
+ # Make sure we only generate libraries of the form `libNAME.la'.
case $outputname in
lib*)
func_stripname 'lib' '.la' "$outputname"
@@ -8722,10 +7251,10 @@ func_mode_link ()
eval libname=\"$libname_spec\"
;;
*)
- test no = "$module" \
- && func_fatal_help "libtool library '$output' must begin with 'lib'"
+ test "$module" = no && \
+ func_fatal_help "libtool library \`$output' must begin with \`lib'"
- if test no != "$need_lib_prefix"; then
+ if test "$need_lib_prefix" != no; then
# Add the "lib" prefix for modules if required
func_stripname '' '.la' "$outputname"
name=$func_stripname_result
@@ -8739,8 +7268,8 @@ func_mode_link ()
esac
if test -n "$objs"; then
- if test pass_all != "$deplibs_check_method"; then
- func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
+ if test "$deplibs_check_method" != pass_all; then
+ func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
else
echo
$ECHO "*** Warning: Linking the shared library $output against the non-libtool"
@@ -8749,21 +7278,21 @@ func_mode_link ()
fi
fi
- test no = "$dlself" \
- || func_warning "'-dlopen self' is ignored for libtool libraries"
+ test "$dlself" != no && \
+ func_warning "\`-dlopen self' is ignored for libtool libraries"
set dummy $rpath
shift
- test 1 -lt "$#" \
- && func_warning "ignoring multiple '-rpath's for a libtool library"
+ test "$#" -gt 1 && \
+ func_warning "ignoring multiple \`-rpath's for a libtool library"
- install_libdir=$1
+ install_libdir="$1"
oldlibs=
if test -z "$rpath"; then
- if test yes = "$build_libtool_libs"; then
+ if test "$build_libtool_libs" = yes; then
# Building a libtool convenience library.
- # Some compilers have problems with a '.al' extension so
+ # Some compilers have problems with a `.al' extension so
# convenience libraries should have the same extension an
# archive normally would.
oldlibs="$output_objdir/$libname.$libext $oldlibs"
@@ -8772,20 +7301,20 @@ func_mode_link ()
fi
test -n "$vinfo" && \
- func_warning "'-version-info/-version-number' is ignored for convenience libraries"
+ func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
test -n "$release" && \
- func_warning "'-release' is ignored for convenience libraries"
+ func_warning "\`-release' is ignored for convenience libraries"
else
# Parse the version information argument.
- save_ifs=$IFS; IFS=:
+ save_ifs="$IFS"; IFS=':'
set dummy $vinfo 0 0 0
shift
- IFS=$save_ifs
+ IFS="$save_ifs"
test -n "$7" && \
- func_fatal_help "too many parameters to '-version-info'"
+ func_fatal_help "too many parameters to \`-version-info'"
# convert absolute version numbers to libtool ages
# this retains compatibility with .la files and attempts
@@ -8793,42 +7322,45 @@ func_mode_link ()
case $vinfo_number in
yes)
- number_major=$1
- number_minor=$2
- number_revision=$3
+ number_major="$1"
+ number_minor="$2"
+ number_revision="$3"
#
# There are really only two kinds -- those that
# use the current revision as the major version
# and those that subtract age and use age as
# a minor version. But, then there is irix
- # that has an extra 1 added just for fun
+ # which has an extra 1 added just for fun
#
case $version_type in
# correct linux to gnu/linux during the next big refactor
- darwin|freebsd-elf|linux|osf|windows|none)
+ darwin|linux|osf|windows|none)
func_arith $number_major + $number_minor
current=$func_arith_result
- age=$number_minor
- revision=$number_revision
+ age="$number_minor"
+ revision="$number_revision"
;;
- freebsd-aout|qnx|sunos)
- current=$number_major
- revision=$number_minor
- age=0
+ freebsd-aout|freebsd-elf|qnx|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
;;
irix|nonstopux)
func_arith $number_major + $number_minor
current=$func_arith_result
- age=$number_minor
- revision=$number_minor
+ age="$number_minor"
+ revision="$number_minor"
lt_irix_increment=no
;;
+ *)
+ func_fatal_configuration "$modename: unknown library version type \`$version_type'"
+ ;;
esac
;;
no)
- current=$1
- revision=$2
- age=$3
+ current="$1"
+ revision="$2"
+ age="$3"
;;
esac
@@ -8836,30 +7368,30 @@ func_mode_link ()
case $current in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
- func_error "CURRENT '$current' must be a nonnegative integer"
- func_fatal_error "'$vinfo' is not valid version information"
+ func_error "CURRENT \`$current' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
;;
esac
case $revision in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
- func_error "REVISION '$revision' must be a nonnegative integer"
- func_fatal_error "'$vinfo' is not valid version information"
+ func_error "REVISION \`$revision' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
;;
esac
case $age in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
- func_error "AGE '$age' must be a nonnegative integer"
- func_fatal_error "'$vinfo' is not valid version information"
+ func_error "AGE \`$age' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
;;
esac
if test "$age" -gt "$current"; then
- func_error "AGE '$age' is greater than the current interface number '$current'"
- func_fatal_error "'$vinfo' is not valid version information"
+ func_error "AGE \`$age' is greater than the current interface number \`$current'"
+ func_fatal_error "\`$vinfo' is not valid version information"
fi
# Calculate the version variables.
@@ -8874,36 +7406,26 @@ func_mode_link ()
# verstring for coding it into the library header
func_arith $current - $age
major=.$func_arith_result
- versuffix=$major.$age.$revision
+ versuffix="$major.$age.$revision"
# Darwin ld doesn't like 0 for these options...
func_arith $current + 1
minor_current=$func_arith_result
- xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
- # On Darwin other compilers
- case $CC in
- nagfor*)
- verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
- ;;
- *)
- verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
- ;;
- esac
;;
freebsd-aout)
- major=.$current
- versuffix=.$current.$revision
+ major=".$current"
+ versuffix=".$current.$revision";
;;
freebsd-elf)
- func_arith $current - $age
- major=.$func_arith_result
- versuffix=$major.$age.$revision
+ major=".$current"
+ versuffix=".$current"
;;
irix | nonstopux)
- if test no = "$lt_irix_increment"; then
+ if test "X$lt_irix_increment" = "Xno"; then
func_arith $current - $age
else
func_arith $current - $age + 1
@@ -8914,74 +7436,69 @@ func_mode_link ()
nonstopux) verstring_prefix=nonstopux ;;
*) verstring_prefix=sgi ;;
esac
- verstring=$verstring_prefix$major.$revision
+ verstring="$verstring_prefix$major.$revision"
# Add in all the interfaces that we are compatible with.
loop=$revision
- while test 0 -ne "$loop"; do
+ while test "$loop" -ne 0; do
func_arith $revision - $loop
iface=$func_arith_result
func_arith $loop - 1
loop=$func_arith_result
- verstring=$verstring_prefix$major.$iface:$verstring
+ verstring="$verstring_prefix$major.$iface:$verstring"
done
- # Before this point, $major must not contain '.'.
+ # Before this point, $major must not contain `.'.
major=.$major
- versuffix=$major.$revision
+ versuffix="$major.$revision"
;;
linux) # correct to gnu/linux during the next big refactor
func_arith $current - $age
major=.$func_arith_result
- versuffix=$major.$age.$revision
+ versuffix="$major.$age.$revision"
;;
osf)
func_arith $current - $age
major=.$func_arith_result
- versuffix=.$current.$age.$revision
- verstring=$current.$age.$revision
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
# Add in all the interfaces that we are compatible with.
loop=$age
- while test 0 -ne "$loop"; do
+ while test "$loop" -ne 0; do
func_arith $current - $loop
iface=$func_arith_result
func_arith $loop - 1
loop=$func_arith_result
- verstring=$verstring:$iface.0
+ verstring="$verstring:${iface}.0"
done
# Make executables depend on our current version.
- func_append verstring ":$current.0"
+ func_append verstring ":${current}.0"
;;
qnx)
- major=.$current
- versuffix=.$current
- ;;
-
- sco)
- major=.$current
- versuffix=.$current
+ major=".$current"
+ versuffix=".$current"
;;
sunos)
- major=.$current
- versuffix=.$current.$revision
+ major=".$current"
+ versuffix=".$current.$revision"
;;
windows)
# Use '-' rather than '.', since we only want one
- # extension on DOS 8.3 file systems.
+ # extension on DOS 8.3 filesystems.
func_arith $current - $age
major=$func_arith_result
- versuffix=-$major
+ versuffix="-$major"
;;
*)
- func_fatal_configuration "unknown library version type '$version_type'"
+ func_fatal_configuration "unknown library version type \`$version_type'"
;;
esac
@@ -8995,45 +7512,42 @@ func_mode_link ()
verstring=
;;
*)
- verstring=0.0
+ verstring="0.0"
;;
esac
- if test no = "$need_version"; then
+ if test "$need_version" = no; then
versuffix=
else
- versuffix=.0.0
+ versuffix=".0.0"
fi
fi
# Remove version info from name if versioning should be avoided
- if test yes,no = "$avoid_version,$need_version"; then
+ if test "$avoid_version" = yes && test "$need_version" = no; then
major=
versuffix=
- verstring=
+ verstring=""
fi
# Check to see if the archive will have undefined symbols.
- if test yes = "$allow_undefined"; then
- if test unsupported = "$allow_undefined_flag"; then
- if test yes = "$build_old_libs"; then
- func_warning "undefined symbols not allowed in $host shared libraries; building static only"
- build_libtool_libs=no
- else
- func_fatal_error "can't build $host shared library unless -no-undefined is specified"
- fi
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ func_warning "undefined symbols not allowed in $host shared libraries"
+ build_libtool_libs=no
+ build_old_libs=yes
fi
else
# Don't allow undefined symbols.
- allow_undefined_flag=$no_undefined_flag
+ allow_undefined_flag="$no_undefined_flag"
fi
fi
- func_generate_dlsyms "$libname" "$libname" :
+ func_generate_dlsyms "$libname" "$libname" "yes"
func_append libobjs " $symfileobj"
- test " " = "$libobjs" && libobjs=
+ test "X$libobjs" = "X " && libobjs=
- if test relink != "$opt_mode"; then
+ if test "$opt_mode" != relink; then
# Remove our outputs, but don't remove object files since they
# may have been created when compiling PIC objects.
removelist=
@@ -9042,8 +7556,8 @@ func_mode_link ()
case $p in
*.$objext | *.gcno)
;;
- $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
- if test -n "$precious_files_regex"; then
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+ if test "X$precious_files_regex" != "X"; then
if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
then
continue
@@ -9059,11 +7573,11 @@ func_mode_link ()
fi
# Now set the variables for building old libraries.
- if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
func_append oldlibs " $output_objdir/$libname.$libext"
# Transform .lo files to .o files.
- oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
+ oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
fi
# Eliminate all temporary directories.
@@ -9084,13 +7598,13 @@ func_mode_link ()
*) func_append finalize_rpath " $libdir" ;;
esac
done
- if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
dependency_libs="$temp_xrpath $dependency_libs"
fi
fi
# Make sure dlfiles contains only unique files that won't be dlpreopened
- old_dlfiles=$dlfiles
+ old_dlfiles="$dlfiles"
dlfiles=
for lib in $old_dlfiles; do
case " $dlprefiles $dlfiles " in
@@ -9100,7 +7614,7 @@ func_mode_link ()
done
# Make sure dlprefiles contains only unique files
- old_dlprefiles=$dlprefiles
+ old_dlprefiles="$dlprefiles"
dlprefiles=
for lib in $old_dlprefiles; do
case "$dlprefiles " in
@@ -9109,7 +7623,7 @@ func_mode_link ()
esac
done
- if test yes = "$build_libtool_libs"; then
+ if test "$build_libtool_libs" = yes; then
if test -n "$rpath"; then
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
@@ -9133,7 +7647,7 @@ func_mode_link ()
;;
*)
# Add libc to deplibs on all other systems if necessary.
- if test yes = "$build_libtool_need_lc"; then
+ if test "$build_libtool_need_lc" = "yes"; then
func_append deplibs " -lc"
fi
;;
@@ -9149,9 +7663,9 @@ func_mode_link ()
# I'm not sure if I'm treating the release correctly. I think
# release should show up in the -l (ie -lgmp5) so we don't want to
# add it in twice. Is that correct?
- release=
- versuffix=
- major=
+ release=""
+ versuffix=""
+ major=""
newdeplibs=
droppeddeps=no
case $deplibs_check_method in
@@ -9180,20 +7694,20 @@ EOF
-l*)
func_stripname -l '' "$i"
name=$func_stripname_result
- if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $i "*)
func_append newdeplibs " $i"
- i=
+ i=""
;;
esac
fi
- if test -n "$i"; then
+ if test -n "$i" ; then
libname=`eval "\\$ECHO \"$libname_spec\""`
deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
set dummy $deplib_matches; shift
deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
func_append newdeplibs " $i"
else
droppeddeps=yes
@@ -9223,20 +7737,20 @@ EOF
$opt_dry_run || $RM conftest
if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
ldd_output=`ldd conftest`
- if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $i "*)
func_append newdeplibs " $i"
- i=
+ i=""
;;
esac
fi
- if test -n "$i"; then
+ if test -n "$i" ; then
libname=`eval "\\$ECHO \"$libname_spec\""`
deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
set dummy $deplib_matches; shift
deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
func_append newdeplibs " $i"
else
droppeddeps=yes
@@ -9273,24 +7787,24 @@ EOF
-l*)
func_stripname -l '' "$a_deplib"
name=$func_stripname_result
- if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $a_deplib "*)
func_append newdeplibs " $a_deplib"
- a_deplib=
+ a_deplib=""
;;
esac
fi
- if test -n "$a_deplib"; then
+ if test -n "$a_deplib" ; then
libname=`eval "\\$ECHO \"$libname_spec\""`
if test -n "$file_magic_glob"; then
libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
else
libnameglob=$libname
fi
- test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
+ test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- if test yes = "$want_nocaseglob"; then
+ if test "$want_nocaseglob" = yes; then
shopt -s nocaseglob
potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
$nocaseglob
@@ -9308,25 +7822,25 @@ EOF
# We might still enter an endless loop, since a link
# loop can be closed while we follow links,
# but so what?
- potlib=$potent_lib
+ potlib="$potent_lib"
while test -h "$potlib" 2>/dev/null; do
- potliblink=`ls -ld $potlib | $SED 's/.* -> //'`
+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
case $potliblink in
- [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;;
- *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
esac
done
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
$SED -e 10q |
$EGREP "$file_magic_regex" > /dev/null; then
func_append newdeplibs " $a_deplib"
- a_deplib=
+ a_deplib=""
break 2
fi
done
done
fi
- if test -n "$a_deplib"; then
+ if test -n "$a_deplib" ; then
droppeddeps=yes
echo
$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
@@ -9334,7 +7848,7 @@ EOF
echo "*** you link to this library. But I can only do this if you have a"
echo "*** shared version of the library, which you do not appear to have"
echo "*** because I did check the linker path looking for a file starting"
- if test -z "$potlib"; then
+ if test -z "$potlib" ; then
$ECHO "*** with $libname but no candidates were found. (...for file magic test)"
else
$ECHO "*** with $libname and none of the candidates passed a file format test"
@@ -9357,30 +7871,30 @@ EOF
-l*)
func_stripname -l '' "$a_deplib"
name=$func_stripname_result
- if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $a_deplib "*)
func_append newdeplibs " $a_deplib"
- a_deplib=
+ a_deplib=""
;;
esac
fi
- if test -n "$a_deplib"; then
+ if test -n "$a_deplib" ; then
libname=`eval "\\$ECHO \"$libname_spec\""`
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
for potent_lib in $potential_libs; do
- potlib=$potent_lib # see symlink-check above in file_magic test
+ potlib="$potent_lib" # see symlink-check above in file_magic test
if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
$EGREP "$match_pattern_regex" > /dev/null; then
func_append newdeplibs " $a_deplib"
- a_deplib=
+ a_deplib=""
break 2
fi
done
done
fi
- if test -n "$a_deplib"; then
+ if test -n "$a_deplib" ; then
droppeddeps=yes
echo
$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
@@ -9388,7 +7902,7 @@ EOF
echo "*** you link to this library. But I can only do this if you have a"
echo "*** shared version of the library, which you do not appear to have"
echo "*** because I did check the linker path looking for a file starting"
- if test -z "$potlib"; then
+ if test -z "$potlib" ; then
$ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
else
$ECHO "*** with $libname and none of the candidates passed a file format test"
@@ -9404,18 +7918,18 @@ EOF
done # Gone through all deplibs.
;;
none | unknown | *)
- newdeplibs=
+ newdeplibs=""
tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
- if test yes = "$allow_libtool_libs_with_static_runtimes"; then
- for i in $predeps $postdeps; do
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ for i in $predeps $postdeps ; do
# can't use Xsed below, because $i might contain '/'
- tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
+ tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
done
fi
case $tmp_deplibs in
*[!\ \ ]*)
echo
- if test none = "$deplibs_check_method"; then
+ if test "X$deplibs_check_method" = "Xnone"; then
echo "*** Warning: inter-library dependencies are not supported in this platform."
else
echo "*** Warning: inter-library dependencies are not known to be supported."
@@ -9439,8 +7953,8 @@ EOF
;;
esac
- if test yes = "$droppeddeps"; then
- if test yes = "$module"; then
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
echo
echo "*** Warning: libtool could not satisfy all declared inter-library"
$ECHO "*** dependencies of module $libname. Therefore, libtool will create"
@@ -9449,12 +7963,12 @@ EOF
if test -z "$global_symbol_pipe"; then
echo
echo "*** However, this would only work if libtool was able to extract symbol"
- echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
echo "*** not find such a program. So, this module is probably useless."
- echo "*** 'nm' from GNU binutils and a full rebuild may help."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
fi
- if test no = "$build_old_libs"; then
- oldlibs=$output_objdir/$libname.$libext
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
build_libtool_libs=module
build_old_libs=yes
else
@@ -9465,14 +7979,14 @@ EOF
echo "*** automatically added whenever a program is linked with this library"
echo "*** or is declared to -dlopen it."
- if test no = "$allow_undefined"; then
+ if test "$allow_undefined" = no; then
echo
echo "*** Since this library must not contain undefined symbols,"
echo "*** because either the platform does not support them or"
echo "*** it was explicitly requested with -no-undefined,"
echo "*** libtool will only create a static version of it."
- if test no = "$build_old_libs"; then
- oldlibs=$output_objdir/$libname.$libext
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
build_libtool_libs=module
build_old_libs=yes
else
@@ -9518,7 +8032,7 @@ EOF
*) func_append new_libs " $deplib" ;;
esac
done
- deplibs=$new_libs
+ deplibs="$new_libs"
# All the library-specific variables (install_libdir is set above).
library_names=
@@ -9526,25 +8040,25 @@ EOF
dlname=
# Test again, we may have decided not to build it any more
- if test yes = "$build_libtool_libs"; then
- # Remove $wl instances when linking with ld.
+ if test "$build_libtool_libs" = yes; then
+ # Remove ${wl} instances when linking with ld.
# FIXME: should test the right _cmds variable.
case $archive_cmds in
*\$LD\ *) wl= ;;
esac
- if test yes = "$hardcode_into_libs"; then
+ if test "$hardcode_into_libs" = yes; then
# Hardcode the library paths
hardcode_libdirs=
dep_rpath=
- rpath=$finalize_rpath
- test relink = "$opt_mode" || rpath=$compile_rpath$rpath
+ rpath="$finalize_rpath"
+ test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
for libdir in $rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
func_replace_sysroot "$libdir"
libdir=$func_replace_sysroot_result
if test -z "$hardcode_libdirs"; then
- hardcode_libdirs=$libdir
+ hardcode_libdirs="$libdir"
else
# Just accumulate the unique libdirs.
case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
@@ -9569,7 +8083,7 @@ EOF
# Substitute the hardcoded libdirs into the rpath.
if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then
- libdir=$hardcode_libdirs
+ libdir="$hardcode_libdirs"
eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
fi
if test -n "$runpath_var" && test -n "$perm_rpath"; then
@@ -9583,8 +8097,8 @@ EOF
test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
fi
- shlibpath=$finalize_shlibpath
- test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath
+ shlibpath="$finalize_shlibpath"
+ test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
if test -n "$shlibpath"; then
eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
fi
@@ -9594,19 +8108,19 @@ EOF
eval library_names=\"$library_names_spec\"
set dummy $library_names
shift
- realname=$1
+ realname="$1"
shift
if test -n "$soname_spec"; then
eval soname=\"$soname_spec\"
else
- soname=$realname
+ soname="$realname"
fi
if test -z "$dlname"; then
dlname=$soname
fi
- lib=$output_objdir/$realname
+ lib="$output_objdir/$realname"
linknames=
for link
do
@@ -9620,7 +8134,7 @@ EOF
delfiles=
if test -n "$export_symbols" && test -n "$include_expsyms"; then
$opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
- export_symbols=$output_objdir/$libname.uexp
+ export_symbols="$output_objdir/$libname.uexp"
func_append delfiles " $export_symbols"
fi
@@ -9629,31 +8143,31 @@ EOF
cygwin* | mingw* | cegcc*)
if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
# exporting using user supplied symfile
- func_dll_def_p "$export_symbols" || {
+ if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
# and it's NOT already a .def file. Must figure out
# which of the given symbols are data symbols and tag
# them as such. So, trigger use of export_symbols_cmds.
# export_symbols gets reassigned inside the "prepare
# the list of exported symbols" if statement, so the
# include_expsyms logic still works.
- orig_export_symbols=$export_symbols
+ orig_export_symbols="$export_symbols"
export_symbols=
always_export_symbols=yes
- }
+ fi
fi
;;
esac
# Prepare the list of exported symbols
if test -z "$export_symbols"; then
- if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
- func_verbose "generating symbol list for '$libname.la'"
- export_symbols=$output_objdir/$libname.exp
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
$opt_dry_run || $RM $export_symbols
cmds=$export_symbols_cmds
- save_ifs=$IFS; IFS='~'
+ save_ifs="$IFS"; IFS='~'
for cmd1 in $cmds; do
- IFS=$save_ifs
+ IFS="$save_ifs"
# Take the normal branch if the nm_file_list_spec branch
# doesn't work or if tool conversion is not needed.
case $nm_file_list_spec~$to_tool_file_cmd in
@@ -9667,7 +8181,7 @@ EOF
try_normal_branch=no
;;
esac
- if test yes = "$try_normal_branch" \
+ if test "$try_normal_branch" = yes \
&& { test "$len" -lt "$max_cmd_len" \
|| test "$max_cmd_len" -le -1; }
then
@@ -9678,7 +8192,7 @@ EOF
output_la=$func_basename_result
save_libobjs=$libobjs
save_output=$output
- output=$output_objdir/$output_la.nm
+ output=${output_objdir}/${output_la}.nm
func_to_tool_file "$output"
libobjs=$nm_file_list_spec$func_to_tool_file_result
func_append delfiles " $output"
@@ -9701,8 +8215,8 @@ EOF
break
fi
done
- IFS=$save_ifs
- if test -n "$export_symbols_regex" && test : != "$skipped_export"; then
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
fi
@@ -9710,16 +8224,16 @@ EOF
fi
if test -n "$export_symbols" && test -n "$include_expsyms"; then
- tmp_export_symbols=$export_symbols
- test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
$opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
fi
- if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
+ if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
# The given exports_symbols file has to be filtered, so filter it.
- func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
# FIXME: $output_objdir/$libname.filter potentially contains lots of
- # 's' commands, which not all seds can handle. GNU sed should be fine
+ # 's' commands which not all seds can handle. GNU sed should be fine
# though. Also, the filter scales superlinearly with the number of
# global variables. join(1) would be nice here, but unfortunately
# isn't a blessed tool.
@@ -9738,11 +8252,11 @@ EOF
;;
esac
done
- deplibs=$tmp_deplibs
+ deplibs="$tmp_deplibs"
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec" &&
- test yes = "$compiler_needs_object" &&
+ test "$compiler_needs_object" = yes &&
test -z "$libobjs"; then
# extract the archives, so we have objects to list.
# TODO: could optimize this to just extract one archive.
@@ -9753,7 +8267,7 @@ EOF
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
test "X$libobjs" = "X " && libobjs=
else
- gentop=$output_objdir/${outputname}x
+ gentop="$output_objdir/${outputname}x"
func_append generated " $gentop"
func_extract_archives $gentop $convenience
@@ -9762,18 +8276,18 @@ EOF
fi
fi
- if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
eval flag=\"$thread_safe_flag_spec\"
func_append linker_flags " $flag"
fi
# Make a backup of the uninstalled library when relinking
- if test relink = "$opt_mode"; then
+ if test "$opt_mode" = relink; then
$opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
fi
# Do each of the archive commands.
- if test yes = "$module" && test -n "$module_cmds"; then
+ if test "$module" = yes && test -n "$module_cmds" ; then
if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
eval test_cmds=\"$module_expsym_cmds\"
cmds=$module_expsym_cmds
@@ -9791,7 +8305,7 @@ EOF
fi
fi
- if test : != "$skipped_export" &&
+ if test "X$skipped_export" != "X:" &&
func_len " $test_cmds" &&
len=$func_len_result &&
test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
@@ -9824,8 +8338,8 @@ EOF
last_robj=
k=1
- if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
- output=$output_objdir/$output_la.lnkscript
+ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+ output=${output_objdir}/${output_la}.lnkscript
func_verbose "creating GNU ld script: $output"
echo 'INPUT (' > $output
for obj in $save_libobjs
@@ -9837,14 +8351,14 @@ EOF
func_append delfiles " $output"
func_to_tool_file "$output"
output=$func_to_tool_file_result
- elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
- output=$output_objdir/$output_la.lnk
+ elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+ output=${output_objdir}/${output_la}.lnk
func_verbose "creating linker input file list: $output"
: > $output
set x $save_libobjs
shift
firstobj=
- if test yes = "$compiler_needs_object"; then
+ if test "$compiler_needs_object" = yes; then
firstobj="$1 "
shift
fi
@@ -9859,7 +8373,7 @@ EOF
else
if test -n "$save_libobjs"; then
func_verbose "creating reloadable object files..."
- output=$output_objdir/$output_la-$k.$objext
+ output=$output_objdir/$output_la-${k}.$objext
eval test_cmds=\"$reload_cmds\"
func_len " $test_cmds"
len0=$func_len_result
@@ -9871,13 +8385,13 @@ EOF
func_len " $obj"
func_arith $len + $func_len_result
len=$func_arith_result
- if test -z "$objlist" ||
+ if test "X$objlist" = X ||
test "$len" -lt "$max_cmd_len"; then
func_append objlist " $obj"
else
# The command $test_cmds is almost too long, add a
# command to the queue.
- if test 1 -eq "$k"; then
+ if test "$k" -eq 1 ; then
# The first file doesn't have a previous command to add.
reload_objs=$objlist
eval concat_cmds=\"$reload_cmds\"
@@ -9887,10 +8401,10 @@ EOF
reload_objs="$objlist $last_robj"
eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
fi
- last_robj=$output_objdir/$output_la-$k.$objext
+ last_robj=$output_objdir/$output_la-${k}.$objext
func_arith $k + 1
k=$func_arith_result
- output=$output_objdir/$output_la-$k.$objext
+ output=$output_objdir/$output_la-${k}.$objext
objlist=" $obj"
func_len " $last_robj"
func_arith $len0 + $func_len_result
@@ -9902,9 +8416,9 @@ EOF
# files will link in the last one created.
test -z "$concat_cmds" || concat_cmds=$concat_cmds~
reload_objs="$objlist $last_robj"
- eval concat_cmds=\"\$concat_cmds$reload_cmds\"
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
if test -n "$last_robj"; then
- eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
fi
func_append delfiles " $output"
@@ -9912,9 +8426,9 @@ EOF
output=
fi
- ${skipped_export-false} && {
- func_verbose "generating symbol list for '$libname.la'"
- export_symbols=$output_objdir/$libname.exp
+ if ${skipped_export-false}; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
$opt_dry_run || $RM $export_symbols
libobjs=$output
# Append the command to create the export file.
@@ -9923,16 +8437,16 @@ EOF
if test -n "$last_robj"; then
eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
fi
- }
+ fi
test -n "$save_libobjs" &&
func_verbose "creating a temporary reloadable object file: $output"
# Loop through the commands generated above and execute them.
- save_ifs=$IFS; IFS='~'
+ save_ifs="$IFS"; IFS='~'
for cmd in $concat_cmds; do
- IFS=$save_ifs
- $opt_quiet || {
+ IFS="$save_ifs"
+ $opt_silent || {
func_quote_for_expand "$cmd"
eval "func_echo $func_quote_for_expand_result"
}
@@ -9940,7 +8454,7 @@ EOF
lt_exit=$?
# Restore the uninstalled library and exit
- if test relink = "$opt_mode"; then
+ if test "$opt_mode" = relink; then
( cd "$output_objdir" && \
$RM "${realname}T" && \
$MV "${realname}U" "$realname" )
@@ -9949,7 +8463,7 @@ EOF
exit $lt_exit
}
done
- IFS=$save_ifs
+ IFS="$save_ifs"
if test -n "$export_symbols_regex" && ${skipped_export-false}; then
func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
@@ -9957,18 +8471,18 @@ EOF
fi
fi
- ${skipped_export-false} && {
+ if ${skipped_export-false}; then
if test -n "$export_symbols" && test -n "$include_expsyms"; then
- tmp_export_symbols=$export_symbols
- test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
$opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
fi
if test -n "$orig_export_symbols"; then
# The given exports_symbols file has to be filtered, so filter it.
- func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
# FIXME: $output_objdir/$libname.filter potentially contains lots of
- # 's' commands, which not all seds can handle. GNU sed should be fine
+ # 's' commands which not all seds can handle. GNU sed should be fine
# though. Also, the filter scales superlinearly with the number of
# global variables. join(1) would be nice here, but unfortunately
# isn't a blessed tool.
@@ -9977,7 +8491,7 @@ EOF
export_symbols=$output_objdir/$libname.def
$opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
fi
- }
+ fi
libobjs=$output
# Restore the value of output.
@@ -9991,7 +8505,7 @@ EOF
# value of $libobjs for piecewise linking.
# Do each of the archive commands.
- if test yes = "$module" && test -n "$module_cmds"; then
+ if test "$module" = yes && test -n "$module_cmds" ; then
if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
cmds=$module_expsym_cmds
else
@@ -10013,7 +8527,7 @@ EOF
# Add any objects from preloaded convenience libraries
if test -n "$dlprefiles"; then
- gentop=$output_objdir/${outputname}x
+ gentop="$output_objdir/${outputname}x"
func_append generated " $gentop"
func_extract_archives $gentop $dlprefiles
@@ -10021,12 +8535,11 @@ EOF
test "X$libobjs" = "X " && libobjs=
fi
- save_ifs=$IFS; IFS='~'
+ save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
- IFS=$sp$nl
+ IFS="$save_ifs"
eval cmd=\"$cmd\"
- IFS=$save_ifs
- $opt_quiet || {
+ $opt_silent || {
func_quote_for_expand "$cmd"
eval "func_echo $func_quote_for_expand_result"
}
@@ -10034,7 +8547,7 @@ EOF
lt_exit=$?
# Restore the uninstalled library and exit
- if test relink = "$opt_mode"; then
+ if test "$opt_mode" = relink; then
( cd "$output_objdir" && \
$RM "${realname}T" && \
$MV "${realname}U" "$realname" )
@@ -10043,10 +8556,10 @@ EOF
exit $lt_exit
}
done
- IFS=$save_ifs
+ IFS="$save_ifs"
# Restore the uninstalled library and exit
- if test relink = "$opt_mode"; then
+ if test "$opt_mode" = relink; then
$opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
if test -n "$convenience"; then
@@ -10066,39 +8579,39 @@ EOF
done
# If -module or -export-dynamic was specified, set the dlname.
- if test yes = "$module" || test yes = "$export_dynamic"; then
+ if test "$module" = yes || test "$export_dynamic" = yes; then
# On all known operating systems, these are identical.
- dlname=$soname
+ dlname="$soname"
fi
fi
;;
obj)
- if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
- func_warning "'-dlopen' is ignored for objects"
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for objects"
fi
case " $deplibs" in
*\ -l* | *\ -L*)
- func_warning "'-l' and '-L' are ignored for objects" ;;
+ func_warning "\`-l' and \`-L' are ignored for objects" ;;
esac
test -n "$rpath" && \
- func_warning "'-rpath' is ignored for objects"
+ func_warning "\`-rpath' is ignored for objects"
test -n "$xrpath" && \
- func_warning "'-R' is ignored for objects"
+ func_warning "\`-R' is ignored for objects"
test -n "$vinfo" && \
- func_warning "'-version-info' is ignored for objects"
+ func_warning "\`-version-info' is ignored for objects"
test -n "$release" && \
- func_warning "'-release' is ignored for objects"
+ func_warning "\`-release' is ignored for objects"
case $output in
*.lo)
test -n "$objs$old_deplibs" && \
- func_fatal_error "cannot build library object '$output' from non-libtool objects"
+ func_fatal_error "cannot build library object \`$output' from non-libtool objects"
libobj=$output
func_lo2o "$libobj"
@@ -10106,7 +8619,7 @@ EOF
;;
*)
libobj=
- obj=$output
+ obj="$output"
;;
esac
@@ -10119,19 +8632,17 @@ EOF
# the extraction.
reload_conv_objs=
gentop=
- # if reload_cmds runs $LD directly, get rid of -Wl from
- # whole_archive_flag_spec and hope we can get by with turning comma
- # into space.
- case $reload_cmds in
- *\$LD[\ \$]*) wl= ;;
- esac
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
+ wl=
+
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
- test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
- reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
+ reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
else
- gentop=$output_objdir/${obj}x
+ gentop="$output_objdir/${obj}x"
func_append generated " $gentop"
func_extract_archives $gentop $convenience
@@ -10140,12 +8651,12 @@ EOF
fi
# If we're not building shared, we need to use non_pic_objs
- test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
+ test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
# Create the old-style object.
- reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
+ reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
- output=$obj
+ output="$obj"
func_execute_cmds "$reload_cmds" 'exit $?'
# Exit if we aren't doing a library object file.
@@ -10157,7 +8668,7 @@ EOF
exit $EXIT_SUCCESS
fi
- test yes = "$build_libtool_libs" || {
+ if test "$build_libtool_libs" != yes; then
if test -n "$gentop"; then
func_show_eval '${RM}r "$gentop"'
fi
@@ -10167,12 +8678,12 @@ EOF
# $show "echo timestamp > $libobj"
# $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
exit $EXIT_SUCCESS
- }
+ fi
- if test -n "$pic_flag" || test default != "$pic_mode"; then
+ if test -n "$pic_flag" || test "$pic_mode" != default; then
# Only do commands if we really have different PIC objects.
reload_objs="$libobjs $reload_conv_objs"
- output=$libobj
+ output="$libobj"
func_execute_cmds "$reload_cmds" 'exit $?'
fi
@@ -10189,14 +8700,16 @@ EOF
output=$func_stripname_result.exe;;
esac
test -n "$vinfo" && \
- func_warning "'-version-info' is ignored for programs"
+ func_warning "\`-version-info' is ignored for programs"
test -n "$release" && \
- func_warning "'-release' is ignored for programs"
+ func_warning "\`-release' is ignored for programs"
- $preload \
- && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
- && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
+ test "$preload" = yes \
+ && test "$dlopen_support" = unknown \
+ && test "$dlopen_self" = unknown \
+ && test "$dlopen_self_static" = unknown && \
+ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
case $host in
*-*-rhapsody* | *-*-darwin1.[012])
@@ -10210,11 +8723,11 @@ EOF
*-*-darwin*)
# Don't allow lazy linking, it breaks C++ global constructors
# But is supposedly fixed on 10.4 or later (yay!).
- if test CXX = "$tagname"; then
+ if test "$tagname" = CXX ; then
case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
10.[0123])
- func_append compile_command " $wl-bind_at_load"
- func_append finalize_command " $wl-bind_at_load"
+ func_append compile_command " ${wl}-bind_at_load"
+ func_append finalize_command " ${wl}-bind_at_load"
;;
esac
fi
@@ -10250,7 +8763,7 @@ EOF
*) func_append new_libs " $deplib" ;;
esac
done
- compile_deplibs=$new_libs
+ compile_deplibs="$new_libs"
func_append compile_command " $compile_deplibs"
@@ -10274,7 +8787,7 @@ EOF
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
- hardcode_libdirs=$libdir
+ hardcode_libdirs="$libdir"
else
# Just accumulate the unique libdirs.
case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
@@ -10297,7 +8810,7 @@ EOF
fi
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
- testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
+ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$libdir:"*) ;;
::) dllsearchpath=$libdir;;
@@ -10314,10 +8827,10 @@ EOF
# Substitute the hardcoded libdirs into the rpath.
if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then
- libdir=$hardcode_libdirs
+ libdir="$hardcode_libdirs"
eval rpath=\" $hardcode_libdir_flag_spec\"
fi
- compile_rpath=$rpath
+ compile_rpath="$rpath"
rpath=
hardcode_libdirs=
@@ -10325,7 +8838,7 @@ EOF
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
- hardcode_libdirs=$libdir
+ hardcode_libdirs="$libdir"
else
# Just accumulate the unique libdirs.
case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
@@ -10350,43 +8863,45 @@ EOF
# Substitute the hardcoded libdirs into the rpath.
if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then
- libdir=$hardcode_libdirs
+ libdir="$hardcode_libdirs"
eval rpath=\" $hardcode_libdir_flag_spec\"
fi
- finalize_rpath=$rpath
+ finalize_rpath="$rpath"
- if test -n "$libobjs" && test yes = "$build_old_libs"; then
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
# Transform all the library objects into standard objects.
compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
fi
- func_generate_dlsyms "$outputname" "@PROGRAM@" false
+ func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
# template prelinking step
if test -n "$prelink_cmds"; then
func_execute_cmds "$prelink_cmds" 'exit $?'
fi
- wrappers_required=:
+ wrappers_required=yes
case $host in
*cegcc* | *mingw32ce*)
# Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
- wrappers_required=false
+ wrappers_required=no
;;
*cygwin* | *mingw* )
- test yes = "$build_libtool_libs" || wrappers_required=false
+ if test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
;;
*)
- if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
- wrappers_required=false
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=no
fi
;;
esac
- $wrappers_required || {
+ if test "$wrappers_required" = no; then
# Replace the output file specification.
compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
- link_command=$compile_command$compile_rpath
+ link_command="$compile_command$compile_rpath"
# We have no uninstalled library dependencies, so finalize right now.
exit_status=0
@@ -10399,12 +8914,12 @@ EOF
fi
# Delete the generated files.
- if test -f "$output_objdir/${outputname}S.$objext"; then
- func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
+ if test -f "$output_objdir/${outputname}S.${objext}"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
fi
exit $exit_status
- }
+ fi
if test -n "$compile_shlibpath$finalize_shlibpath"; then
compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
@@ -10434,9 +8949,9 @@ EOF
fi
fi
- if test yes = "$no_install"; then
+ if test "$no_install" = yes; then
# We don't need to create a wrapper script.
- link_command=$compile_var$compile_command$compile_rpath
+ link_command="$compile_var$compile_command$compile_rpath"
# Replace the output file specification.
link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
# Delete the old output file.
@@ -10453,28 +8968,27 @@ EOF
exit $EXIT_SUCCESS
fi
- case $hardcode_action,$fast_install in
- relink,*)
- # Fast installation is not supported
- link_command=$compile_var$compile_command$compile_rpath
- relink_command=$finalize_var$finalize_command$finalize_rpath
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
- func_warning "this platform does not like uninstalled shared libraries"
- func_warning "'$output' will be relinked during installation"
- ;;
- *,yes)
- link_command=$finalize_var$compile_command$finalize_rpath
- relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
- ;;
- *,no)
- link_command=$compile_var$compile_command$compile_rpath
- relink_command=$finalize_var$finalize_command$finalize_rpath
- ;;
- *,needless)
- link_command=$finalize_var$compile_command$finalize_rpath
- relink_command=
- ;;
- esac
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "\`$output' will be relinked during installation"
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
# Replace the output file specification.
link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
@@ -10531,8 +9045,8 @@ EOF
func_dirname_and_basename "$output" "" "."
output_name=$func_basename_result
output_path=$func_dirname_result
- cwrappersource=$output_path/$objdir/lt-$output_name.c
- cwrapper=$output_path/$output_name.exe
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
$RM $cwrappersource $cwrapper
trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
@@ -10553,7 +9067,7 @@ EOF
trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
$opt_dry_run || {
# note: this script will not be executed, so do not chmod.
- if test "x$build" = "x$host"; then
+ if test "x$build" = "x$host" ; then
$cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
else
func_emit_wrapper no > $func_ltwrapper_scriptname_result
@@ -10576,27 +9090,25 @@ EOF
# See if we need to build an old-fashioned archive.
for oldlib in $oldlibs; do
- case $build_libtool_libs in
- convenience)
- oldobjs="$libobjs_save $symfileobj"
- addlibs=$convenience
- build_libtool_libs=no
- ;;
- module)
- oldobjs=$libobjs_save
- addlibs=$old_convenience
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
build_libtool_libs=no
- ;;
- *)
+ else
oldobjs="$old_deplibs $non_pic_objects"
- $preload && test -f "$symfileobj" \
- && func_append oldobjs " $symfileobj"
- addlibs=$old_convenience
- ;;
- esac
+ if test "$preload" = yes && test -f "$symfileobj"; then
+ func_append oldobjs " $symfileobj"
+ fi
+ fi
+ addlibs="$old_convenience"
+ fi
if test -n "$addlibs"; then
- gentop=$output_objdir/${outputname}x
+ gentop="$output_objdir/${outputname}x"
func_append generated " $gentop"
func_extract_archives $gentop $addlibs
@@ -10604,13 +9116,13 @@ EOF
fi
# Do each command in the archive commands.
- if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
cmds=$old_archive_from_new_cmds
else
# Add any objects from preloaded convenience libraries
if test -n "$dlprefiles"; then
- gentop=$output_objdir/${outputname}x
+ gentop="$output_objdir/${outputname}x"
func_append generated " $gentop"
func_extract_archives $gentop $dlprefiles
@@ -10631,7 +9143,7 @@ EOF
:
else
echo "copying selected object files to avoid basename conflicts..."
- gentop=$output_objdir/${outputname}x
+ gentop="$output_objdir/${outputname}x"
func_append generated " $gentop"
func_mkdir_p "$gentop"
save_oldobjs=$oldobjs
@@ -10640,7 +9152,7 @@ EOF
for obj in $save_oldobjs
do
func_basename "$obj"
- objbase=$func_basename_result
+ objbase="$func_basename_result"
case " $oldobjs " in
" ") oldobjs=$obj ;;
*[\ /]"$objbase "*)
@@ -10709,18 +9221,18 @@ EOF
else
# the above command should be used before it gets too long
oldobjs=$objlist
- if test "$obj" = "$last_oldobj"; then
+ if test "$obj" = "$last_oldobj" ; then
RANLIB=$save_RANLIB
fi
test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\$concat_cmds$old_archive_cmds\"
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
objlist=
len=$len0
fi
done
RANLIB=$save_RANLIB
oldobjs=$objlist
- if test -z "$oldobjs"; then
+ if test "X$oldobjs" = "X" ; then
eval cmds=\"\$concat_cmds\"
else
eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
@@ -10737,7 +9249,7 @@ EOF
case $output in
*.la)
old_library=
- test yes = "$build_old_libs" && old_library=$libname.$libext
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
func_verbose "creating $output"
# Preserve any variables that may affect compiler behavior
@@ -10752,31 +9264,31 @@ EOF
fi
done
# Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
- if test yes = "$hardcode_automatic"; then
+ if test "$hardcode_automatic" = yes ; then
relink_command=
fi
# Only create the output if not a dry run.
$opt_dry_run || {
for installed in no yes; do
- if test yes = "$installed"; then
+ if test "$installed" = yes; then
if test -z "$install_libdir"; then
break
fi
- output=$output_objdir/${outputname}i
+ output="$output_objdir/$outputname"i
# Replace all uninstalled libtool libraries with the installed ones
newdependency_libs=
for deplib in $dependency_libs; do
case $deplib in
*.la)
func_basename "$deplib"
- name=$func_basename_result
+ name="$func_basename_result"
func_resolve_sysroot "$deplib"
- eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
test -z "$libdir" && \
- func_fatal_error "'$deplib' is not a valid libtool archive"
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
;;
-L*)
@@ -10792,23 +9304,23 @@ EOF
*) func_append newdependency_libs " $deplib" ;;
esac
done
- dependency_libs=$newdependency_libs
+ dependency_libs="$newdependency_libs"
newdlfiles=
for lib in $dlfiles; do
case $lib in
*.la)
func_basename "$lib"
- name=$func_basename_result
- eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
test -z "$libdir" && \
- func_fatal_error "'$lib' is not a valid libtool archive"
+ func_fatal_error "\`$lib' is not a valid libtool archive"
func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
;;
*) func_append newdlfiles " $lib" ;;
esac
done
- dlfiles=$newdlfiles
+ dlfiles="$newdlfiles"
newdlprefiles=
for lib in $dlprefiles; do
case $lib in
@@ -10818,34 +9330,34 @@ EOF
# didn't already link the preopened objects directly into
# the library:
func_basename "$lib"
- name=$func_basename_result
- eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
test -z "$libdir" && \
- func_fatal_error "'$lib' is not a valid libtool archive"
+ func_fatal_error "\`$lib' is not a valid libtool archive"
func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
;;
esac
done
- dlprefiles=$newdlprefiles
+ dlprefiles="$newdlprefiles"
else
newdlfiles=
for lib in $dlfiles; do
case $lib in
- [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
*) abs=`pwd`"/$lib" ;;
esac
func_append newdlfiles " $abs"
done
- dlfiles=$newdlfiles
+ dlfiles="$newdlfiles"
newdlprefiles=
for lib in $dlprefiles; do
case $lib in
- [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
*) abs=`pwd`"/$lib" ;;
esac
func_append newdlprefiles " $abs"
done
- dlprefiles=$newdlprefiles
+ dlprefiles="$newdlprefiles"
fi
$RM $output
# place dlname in correct position for cygwin
@@ -10861,9 +9373,10 @@ EOF
case $host,$output,$installed,$module,$dlname in
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
# If a -bindir argument was supplied, place the dll there.
- if test -n "$bindir"; then
+ if test "x$bindir" != x ;
+ then
func_relative_path "$install_libdir" "$bindir"
- tdlname=$func_relative_path_result/$dlname
+ tdlname=$func_relative_path_result$dlname
else
# Otherwise fall back on heuristic.
tdlname=../bin/$dlname
@@ -10872,7 +9385,7 @@ EOF
esac
$ECHO > $output "\
# $outputname - a libtool library file
-# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
@@ -10886,7 +9399,7 @@ library_names='$library_names'
# The name of the static archive.
old_library='$old_library'
-# Linker flags that cannot go in dependency_libs.
+# Linker flags that can not go in dependency_libs.
inherited_linker_flags='$new_inherited_linker_flags'
# Libraries that this one depends upon.
@@ -10912,7 +9425,7 @@ dlpreopen='$dlprefiles'
# Directory that this library needs to be installed in:
libdir='$install_libdir'"
- if test no,yes = "$installed,$need_relink"; then
+ if test "$installed" = no && test "$need_relink" = yes; then
$ECHO >> $output "\
relink_command=\"$relink_command\""
fi
@@ -10927,29 +9440,27 @@ relink_command=\"$relink_command\""
exit $EXIT_SUCCESS
}
-if test link = "$opt_mode" || test relink = "$opt_mode"; then
- func_mode_link ${1+"$@"}
-fi
+{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
+ func_mode_link ${1+"$@"}
# func_mode_uninstall arg...
func_mode_uninstall ()
{
- $debug_cmd
-
- RM=$nonopt
+ $opt_debug
+ RM="$nonopt"
files=
- rmforce=false
+ rmforce=
exit_status=0
# This variable tells wrapper scripts just to set variables rather
# than running their programs.
- libtool_install_magic=$magic
+ libtool_install_magic="$magic"
for arg
do
case $arg in
- -f) func_append RM " $arg"; rmforce=: ;;
+ -f) func_append RM " $arg"; rmforce=yes ;;
-*) func_append RM " $arg" ;;
*) func_append files " $arg" ;;
esac
@@ -10962,18 +9473,18 @@ func_mode_uninstall ()
for file in $files; do
func_dirname "$file" "" "."
- dir=$func_dirname_result
- if test . = "$dir"; then
- odir=$objdir
+ dir="$func_dirname_result"
+ if test "X$dir" = X.; then
+ odir="$objdir"
else
- odir=$dir/$objdir
+ odir="$dir/$objdir"
fi
func_basename "$file"
- name=$func_basename_result
- test uninstall = "$opt_mode" && odir=$dir
+ name="$func_basename_result"
+ test "$opt_mode" = uninstall && odir="$dir"
# Remember odir for removal later, being careful to avoid duplicates
- if test clean = "$opt_mode"; then
+ if test "$opt_mode" = clean; then
case " $rmdirs " in
*" $odir "*) ;;
*) func_append rmdirs " $odir" ;;
@@ -10988,11 +9499,11 @@ func_mode_uninstall ()
elif test -d "$file"; then
exit_status=1
continue
- elif $rmforce; then
+ elif test "$rmforce" = yes; then
continue
fi
- rmfiles=$file
+ rmfiles="$file"
case $name in
*.la)
@@ -11006,7 +9517,7 @@ func_mode_uninstall ()
done
test -n "$old_library" && func_append rmfiles " $odir/$old_library"
- case $opt_mode in
+ case "$opt_mode" in
clean)
case " $library_names " in
*" $dlname "*) ;;
@@ -11017,12 +9528,12 @@ func_mode_uninstall ()
uninstall)
if test -n "$library_names"; then
# Do each command in the postuninstall commands.
- func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
+ func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
fi
if test -n "$old_library"; then
# Do each command in the old_postuninstall commands.
- func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
+ func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
fi
# FIXME: should reinstall the best remaining shared library.
;;
@@ -11038,19 +9549,21 @@ func_mode_uninstall ()
func_source $dir/$name
# Add PIC object to the list of files to remove.
- if test -n "$pic_object" && test none != "$pic_object"; then
+ if test -n "$pic_object" &&
+ test "$pic_object" != none; then
func_append rmfiles " $dir/$pic_object"
fi
# Add non-PIC object to the list of files to remove.
- if test -n "$non_pic_object" && test none != "$non_pic_object"; then
+ if test -n "$non_pic_object" &&
+ test "$non_pic_object" != none; then
func_append rmfiles " $dir/$non_pic_object"
fi
fi
;;
*)
- if test clean = "$opt_mode"; then
+ if test "$opt_mode" = clean ; then
noexename=$name
case $file in
*.exe)
@@ -11077,12 +9590,12 @@ func_mode_uninstall ()
# note $name still contains .exe if it was in $file originally
# as does the version of $file that was added into $rmfiles
- func_append rmfiles " $odir/$name $odir/${name}S.$objext"
- if test yes = "$fast_install" && test -n "$relink_command"; then
+ func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
func_append rmfiles " $odir/lt-$name"
fi
- if test "X$noexename" != "X$name"; then
- func_append rmfiles " $odir/lt-$noexename.c"
+ if test "X$noexename" != "X$name" ; then
+ func_append rmfiles " $odir/lt-${noexename}.c"
fi
fi
fi
@@ -11091,7 +9604,7 @@ func_mode_uninstall ()
func_show_eval "$RM $rmfiles" 'exit_status=1'
done
- # Try to remove the $objdir's in the directories where we deleted files
+ # Try to remove the ${objdir}s in the directories where we deleted files
for dir in $rmdirs; do
if test -d "$dir"; then
func_show_eval "rmdir $dir >/dev/null 2>&1"
@@ -11101,17 +9614,16 @@ func_mode_uninstall ()
exit $exit_status
}
-if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
- func_mode_uninstall ${1+"$@"}
-fi
+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
+ func_mode_uninstall ${1+"$@"}
test -z "$opt_mode" && {
- help=$generic_help
+ help="$generic_help"
func_fatal_help "you must specify a MODE"
}
test -z "$exec_cmd" && \
- func_fatal_help "invalid operation mode '$opt_mode'"
+ func_fatal_help "invalid operation mode \`$opt_mode'"
if test -n "$exec_cmd"; then
eval exec "$exec_cmd"
@@ -11122,7 +9634,7 @@ exit $exit_status
# The TAGs below are defined such that we never get into a situation
-# where we disable both kinds of libraries. Given conflicting
+# in which we disable both kinds of libraries. Given conflicting
# choices, we go for a static library, that is the most portable,
# since we can't tell whether shared libraries were disabled because
# the user asked for that or because the platform doesn't support
@@ -11145,3 +9657,5 @@ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
# mode:shell-script
# sh-indentation:2
# End:
+# vi:sw=2
+
diff --git a/c++/Makefile.in b/c++/Makefile.in
index f3faf3e..d02e062 100644
--- a/c++/Makefile.in
+++ b/c++/Makefile.in
@@ -418,16 +418,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -440,7 +441,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -502,8 +502,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -514,11 +514,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -526,6 +526,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -549,6 +550,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -564,6 +566,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in
index c4f42d1..36cb958 100644
--- a/c++/examples/Makefile.in
+++ b/c++/examples/Makefile.in
@@ -366,16 +366,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -388,7 +389,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -450,8 +450,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -462,11 +462,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -474,6 +474,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -497,6 +498,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -512,6 +514,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/c++/src/H5AbstractDs.cpp b/c++/src/H5AbstractDs.cpp
index 06b3e22..4e9a4d5 100644
--- a/c++/src/H5AbstractDs.cpp
+++ b/c++/src/H5AbstractDs.cpp
@@ -141,8 +141,11 @@ ArrayType AbstractDs::getArrayType() const
// depending on which object invokes getArrayType. Then, create and
// return the ArrayType object
try {
+ // Create ArrayType and set values this way to work around the
+ // problem described in the JIRA issue HDFFV-7947
ArrayType arraytype;
f_DataType_setId(&arraytype, p_get_type());
+ arraytype.setArrayInfo();
return(arraytype);
}
catch (DataSetIException E) {
diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp
index 85340f8..0f09631 100644
--- a/c++/src/H5ArrayType.cpp
+++ b/c++/src/H5ArrayType.cpp
@@ -35,12 +35,7 @@ namespace H5 {
///\brief Default constructor: Creates a stub ArrayType
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
-ArrayType::ArrayType() : DataType()
-{
- // Initialize members
- rank = -1;
- dimensions = NULL;
-}
+ArrayType::ArrayType() : DataType(), rank(-1), dimensions(NULL) {}
//--------------------------------------------------------------------------
// Function: ArrayType overloaded constructor
@@ -51,20 +46,7 @@ ArrayType::ArrayType() : DataType()
//--------------------------------------------------------------------------
ArrayType::ArrayType( const hid_t existing_id ) : DataType( existing_id )
{
- // Get the rank of the existing array and store it in this array
- rank = H5Tget_array_ndims(existing_id);
- if (rank < 0)
- {
- throw DataTypeIException("ArrayType constructor (existing id)", "H5Tget_array_ndims failed");
- }
-
- // Allocate space for the dimensions
- dimensions = new hsize_t[rank];
-
- // Get the dimensions of the existing array and store it in this array
- int ret_value = H5Tget_array_dims2(id, dimensions);
- if (ret_value < 0)
- throw DataTypeIException("ArrayType constructor (existing id)", "H5Tget_array_dims2 failed");
+ setArrayInfo();
}
//--------------------------------------------------------------------------
@@ -111,25 +93,67 @@ ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims)
}
//--------------------------------------------------------------------------
+// Function: ArrayType::setArrayInfo
+///\brief Retrieves the rank and dimensions from the array datatype
+/// and store the info in this ArrayType object.
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - January 2016
+//--------------------------------------------------------------------------
+void ArrayType::setArrayInfo()
+{
+ // Get the rank of the array type specified by id from the C API
+ int ndims = H5Tget_array_ndims(id);
+ if (ndims < 0)
+ {
+ throw DataTypeIException("ArrayType::setArrayInfo", "H5Tget_array_ndims failed");
+ }
+
+ // Get the dimensions from the C API
+ hsize_t* dims;
+ dims = new hsize_t[ndims];
+ if (dims != NULL)
+ {
+ // Get the dimensions
+ ndims = H5Tget_array_dims2(id, dims);
+ if (ndims < 0)
+ throw DataTypeIException("ArrayType::setArrayInfo", "H5Tget_array_dims2 failed");
+
+ // Store the array's info in memory
+ rank = ndims;
+ dimensions = new hsize_t[rank];
+ for (int i = 0; i < rank; i++)
+ dimensions[i] = dims[i];
+ delete []dims;
+ }
+} // setArrayInfo
+
+//--------------------------------------------------------------------------
// Function: ArrayType::getArrayNDims
///\brief Returns the number of dimensions for an array datatype.
///\return Number of dimensions
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
+// Modification
+// Modified to use setArrayInfo().
+// If rank is positive, return rank
+// If rank is invalid but object has a valid identifier, obtain the
+// rank and dimensions, store them in the object, and return rank
+// Otherwise, i.e., rank is invalid and object doesn't have a
+// valid identifier, throw an exception
//--------------------------------------------------------------------------
int ArrayType::getArrayNDims()
{
- // If the array's rank has not been stored, i.e. rank is init to -1,
- // retrieve it via the C API
- if (rank < 0)
- {
- rank = H5Tget_array_ndims(id);
- if (rank < 0)
- {
- throw DataTypeIException("ArrayType::getArrayNDims", "H5Tget_array_ndims failed");
- }
- }
- return(rank);
+ // Validate the id first, this object could be a default object
+ if (!p_valid_id(id))
+ throw DataTypeIException("ArrayType::getArrayNDims", "ArrayType object is not a valid array type.");
+
+ // If the array's info has not been stored, i.e. "rank" still has its
+ // initial value, -1, and "dimensions" is still NULL, retrieve rank and
+ // dimensions via the C API and store them in this ArrayType object.
+ if (rank < 0 && dimensions == NULL)
+ setArrayInfo();
+
+ return(rank);
}
//--------------------------------------------------------------------------
@@ -139,25 +163,30 @@ int ArrayType::getArrayNDims()
///\return Number of dimensions
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
+// Modification
+// Jan, 2016
+// Modified to use setArrayInfo().
+// If the array information has not been stored, retrieve rank and
+// dimensions of the array type identified by "id" via the C API.
+// Copy "dimensions" to the user's buffer
//--------------------------------------------------------------------------
int ArrayType::getArrayDims(hsize_t* dims)
{
- // If the array's dimensions have not been stored, retrieve them via C API
- if (dimensions == NULL)
- {
- int ndims = H5Tget_array_dims2(id, dims);
- if (ndims < 0)
- throw DataTypeIException("ArrayType::getArrayDims", "H5Tget_array_dims2 failed");
- // Store the array's info in memory
- rank = ndims;
- dimensions = new hsize_t[rank];
- for (int i = 0; i < rank; i++)
- dimensions[i] = dims[i];
- }
- // Otherwise, simply copy what's in 'dimensions' to 'dims'
- for (int i = 0; i < rank; i++)
- dims[i] = dimensions[i];
- return(rank);
+ // Validate the id first, this object could be a default object
+ if (!p_valid_id(id))
+ throw DataTypeIException("ArrayType::getArrayDims", "ArrayType object is not a valid array type.");
+
+ // If the array's info has not been stored, i.e. "rank" still has its
+ // initial value, -1, and "dimensions" is still NULL, retrieve rank and
+ // dimensions via the C API and store them in this ArrayType object.
+ if (rank < 0 && dimensions == NULL)
+ setArrayInfo();
+
+ // Copy what's in "dimensions" to user's buffer "dims"
+ for (int i = 0; i < rank; i++)
+ dims[i] = dimensions[i];
+
+ return(rank);
}
//--------------------------------------------------------------------------
diff --git a/c++/src/H5ArrayType.h b/c++/src/H5ArrayType.h
index 6577a6e..c0f4b38 100644
--- a/c++/src/H5ArrayType.h
+++ b/c++/src/H5ArrayType.h
@@ -31,6 +31,9 @@ class H5_DLLCPP ArrayType : public DataType {
// specified base type.
ArrayType(const DataType& base_type, int ndims, const hsize_t* dims);
+ // Stores the rank and dimensions in memory.
+ void setArrayInfo();
+
// Returns the number of dimensions of this array datatype.
int getArrayNDims();
diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp
index 6d31a68..82575d6 100644
--- a/c++/src/H5CompType.cpp
+++ b/c++/src/H5CompType.cpp
@@ -228,12 +228,12 @@ hid_t CompType::p_get_member_type(unsigned member_num) const
DataType CompType::getMemberDataType( unsigned member_num ) const
{
try {
- DataType datatype;
+ DataType datatype;
f_DataType_setId(&datatype, p_get_member_type(member_num));
- return(datatype);
+ return(datatype);
}
catch (DataTypeIException E) {
- throw DataTypeIException("CompType::getMemberDataType", E.getDetailMsg());
+ throw DataTypeIException("CompType::getMemberDataType", E.getDetailMsg());
}
}
@@ -249,9 +249,10 @@ DataType CompType::getMemberDataType( unsigned member_num ) const
ArrayType CompType::getMemberArrayType( unsigned member_num ) const
{
try {
- ArrayType arraytype(p_get_member_type(member_num));
+ ArrayType arraytype;
f_DataType_setId(&arraytype, p_get_member_type(member_num));
- return(arraytype);
+ arraytype.setArrayInfo();
+ return(arraytype);
}
catch (DataTypeIException E) {
throw DataTypeIException("CompType::getMemberArrayType", E.getDetailMsg());
diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp
index 40c766a..be80fe4 100644
--- a/c++/src/H5Library.cpp
+++ b/c++/src/H5Library.cpp
@@ -262,10 +262,10 @@ void H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim,
}
// Default constructor - private
-H5Library::H5Library(){};
+H5Library::H5Library(){}
// Destructor - private
-H5Library::~H5Library(){};
+H5Library::~H5Library(){}
#ifndef H5_NO_NAMESPACE
} // end namespace
diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in
index 82509d1..cec89c0 100644
--- a/c++/src/Makefile.in
+++ b/c++/src/Makefile.in
@@ -431,16 +431,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -453,7 +454,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -515,8 +515,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -527,11 +527,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -539,6 +539,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -562,6 +563,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -577,6 +579,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index 6f1d857..4bebeac 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -13,6 +13,7 @@ PROJECT (HDF5_CPP_TEST)
#-----------------------------------------------------------------------------
set (CPP_TEST_SRCS
${HDF5_CPP_TEST_SOURCE_DIR}/testhdf5.cpp
+ ${HDF5_CPP_TEST_SOURCE_DIR}/tarray.cpp
${HDF5_CPP_TEST_SOURCE_DIR}/tattr.cpp
${HDF5_CPP_TEST_SOURCE_DIR}/tcompound.cpp
${HDF5_CPP_TEST_SOURCE_DIR}/tdspl.cpp
diff --git a/c++/test/Makefile.am b/c++/test/Makefile.am
index 705ec72..07fe533 100644
--- a/c++/test/Makefile.am
+++ b/c++/test/Makefile.am
@@ -31,9 +31,10 @@ check_PROGRAMS=$(TEST_PROG)
# The tests depend on the hdf5 library, test library, and the c++ library
LDADD=$(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5)
-testhdf5_SOURCES=testhdf5.cpp dsets.cpp tattr.cpp tcompound.cpp \
- tdspl.cpp tfile.cpp tfilter.cpp th5s.cpp tlinks.cpp tobject.cpp \
- trefer.cpp ttypes.cpp tvlstr.cpp h5cpputil.cpp
+testhdf5_SOURCES=testhdf5.cpp dsets.cpp tattr.cpp tarray.cpp \
+ tcompound.cpp tdspl.cpp tfile.cpp tfilter.cpp th5s.cpp \
+ tlinks.cpp tobject.cpp trefer.cpp ttypes.cpp tvlstr.cpp \
+ h5cpputil.cpp
# Tell conclude.am that these are C++ tests.
CXX_API=yes
diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in
index cffaa7e..5bc47e7 100644
--- a/c++/test/Makefile.in
+++ b/c++/test/Makefile.in
@@ -123,10 +123,11 @@ CONFIG_CLEAN_FILES = H5srcdir_str.h
CONFIG_CLEAN_VPATH_FILES =
am__EXEEXT_1 = testhdf5$(EXEEXT)
am_testhdf5_OBJECTS = testhdf5.$(OBJEXT) dsets.$(OBJEXT) \
- tattr.$(OBJEXT) tcompound.$(OBJEXT) tdspl.$(OBJEXT) \
- tfile.$(OBJEXT) tfilter.$(OBJEXT) th5s.$(OBJEXT) \
- tlinks.$(OBJEXT) tobject.$(OBJEXT) trefer.$(OBJEXT) \
- ttypes.$(OBJEXT) tvlstr.$(OBJEXT) h5cpputil.$(OBJEXT)
+ tattr.$(OBJEXT) tarray.$(OBJEXT) tcompound.$(OBJEXT) \
+ tdspl.$(OBJEXT) tfile.$(OBJEXT) tfilter.$(OBJEXT) \
+ th5s.$(OBJEXT) tlinks.$(OBJEXT) tobject.$(OBJEXT) \
+ trefer.$(OBJEXT) ttypes.$(OBJEXT) tvlstr.$(OBJEXT) \
+ h5cpputil.$(OBJEXT)
testhdf5_OBJECTS = $(am_testhdf5_OBJECTS)
testhdf5_LDADD = $(LDADD)
testhdf5_DEPENDENCIES = $(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5)
@@ -420,16 +421,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -442,7 +444,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -504,8 +505,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -516,11 +517,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -528,6 +529,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -551,6 +553,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -566,6 +569,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -698,9 +702,10 @@ TEST_PROG = testhdf5
# The tests depend on the hdf5 library, test library, and the c++ library
LDADD = $(LIBH5TEST) $(LIBH5CPP) $(LIBHDF5)
-testhdf5_SOURCES = testhdf5.cpp dsets.cpp tattr.cpp tcompound.cpp \
- tdspl.cpp tfile.cpp tfilter.cpp th5s.cpp tlinks.cpp tobject.cpp \
- trefer.cpp ttypes.cpp tvlstr.cpp h5cpputil.cpp
+testhdf5_SOURCES = testhdf5.cpp dsets.cpp tattr.cpp tarray.cpp \
+ tcompound.cpp tdspl.cpp tfile.cpp tfilter.cpp th5s.cpp \
+ tlinks.cpp tobject.cpp trefer.cpp ttypes.cpp tvlstr.cpp \
+ h5cpputil.cpp
# Tell conclude.am that these are C++ tests.
@@ -783,6 +788,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsets.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5cpputil.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tarray.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tattr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcompound.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdspl.Po@am__quote@
diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h
index 8625213..b615194 100644
--- a/c++/test/h5cpputil.h
+++ b/c++/test/h5cpputil.h
@@ -132,6 +132,7 @@ template <class Type1, class Type2>
#ifdef __cplusplus
extern "C" {
#endif
+void test_array();
void test_attr();
void test_compound();
void test_dsproplist();
@@ -146,6 +147,7 @@ void test_vlstrings();
void test_dset();
/* Prototypes for the cleanup routines */
+void cleanup_array();
void cleanup_attr();
void cleanup_compound();
void cleanup_dsproplist();
diff --git a/c++/test/tarray.cpp b/c++/test/tarray.cpp
new file mode 100644
index 0000000..69b4438
--- /dev/null
+++ b/c++/test/tarray.cpp
@@ -0,0 +1,312 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*****************************************************************************
+ FILE
+ tarray.cpp - HDF5 C++ testing the array datatype functionality
+
+ ***************************************************************************/
+
+#ifdef OLD_HEADER_FILENAME
+#include <iostream.h>
+#else
+#include <iostream>
+#endif
+#include <string>
+
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+ using std::cerr;
+ using std::endl;
+#endif // H5_NO_STD
+#endif
+
+#include "H5Cpp.h" // C++ API header file
+
+#ifndef H5_NO_NAMESPACE
+ using namespace H5;
+#endif
+
+#include "h5cpputil.h" // C++ utilility header file
+
+const H5std_string FILENAME("tarray.h5");
+const hsize_t SPACE1_RANK = 1;
+const hsize_t SPACE1_DIM1 = 4;
+const hsize_t ARRAY1_RANK = 1;
+const hsize_t ARRAY1_DIM1 = 4;
+
+typedef enum flt_t {
+ FLT_FLOAT, FLT_DOUBLE, FLT_LDOUBLE, FLT_OTHER
+} flt_t;
+
+typedef enum int_t {
+ INT_CHAR, INT_UCHAR, INT_SHORT, INT_USHORT, INT_INT, INT_UINT,
+ INT_LONG, INT_ULONG, INT_LLONG, INT_ULLONG, INT_OTHER
+} int_t;
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_array_compound_array
+ *
+ * Purpose: Tests 1-D array of compound datatypes (with array fields)
+ *
+ * Return: None.
+ *
+ * Programmer: Binh-Minh Ribler (using C version)
+ * January, 2016
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void test_array_compound_array()
+{
+ SUBTEST("ArrayType::getArrayNDims & ArrayType::getArrayDims");
+ typedef struct { // Typedef for compound datatype */
+ int i;
+ float f[ARRAY1_DIM1];
+ } s1_t;
+ s1_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; // Information to write
+ s1_t rdata[SPACE1_DIM1][ARRAY1_DIM1]; // Information read in
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ int nmemb; // Number of compound members
+ int ii, jj, kk; // counting variables
+ H5T_class_t mclass; // Datatype class for field
+
+ // Initialize array data to write
+ for (ii =0; ii < SPACE1_DIM1; ii++)
+ for (jj = 0; jj < ARRAY1_DIM1; jj++) {
+ wdata[ii][jj].i = ii * 10 + jj;
+ for(kk = 0; kk < ARRAY1_DIM1; kk++)
+ wdata[ii][jj].f[kk]=(float)(ii * 10.0F + jj * 2.5F + kk);
+ } // end for
+
+ try {
+ // Create File
+ H5File file1(FILENAME, H5F_ACC_TRUNC);
+
+ // Create dataspace for datasets
+ DataSpace space(SPACE1_RANK, sdims1, NULL);
+
+ /*
+ * Create an array datatype of compounds, arrtype. Each compound
+ * datatype, comptype, contains an integer and an array of floats,
+ * arrfltype.
+ */
+
+ // Create a compound datatype
+ CompType comptype(sizeof(s1_t));
+
+ // Insert integer field
+ comptype.insertMember("i", HOFFSET(s1_t, i), PredType::NATIVE_INT);
+
+ // Create an array of floats datatype
+ ArrayType arrfltype(PredType::NATIVE_FLOAT, ARRAY1_RANK, tdims1);
+
+ // Insert float array field
+ comptype.insertMember("f", HOFFSET(s1_t, f), arrfltype);
+
+ // Close array of floats field datatype
+ arrfltype.close();
+
+ // Create an array datatype of the compound datatype
+ ArrayType arrtype(comptype, ARRAY1_RANK, tdims1);
+
+ // Close compound datatype comptype
+ comptype.close();
+
+ // Create a dataset
+ DataSet dataset = file1.createDataSet("Dataset1", arrtype, space);
+
+ // Write dataset to disk
+ dataset.write(wdata, arrtype);
+
+ // Close all
+ dataset.close();
+ arrtype.close();
+ space.close();
+ file1.close();
+
+ // Re-open file
+ file1.openFile(FILENAME, H5F_ACC_RDONLY);
+
+ // Open the dataset
+ dataset = file1.openDataSet("Dataset1");
+
+ /*
+ * Check the datatype array of compounds
+ */
+
+ // Verify that it is an array of compounds
+ DataType dstype = dataset.getDataType();
+ mclass = dstype.getClass();
+ verify_val(mclass, H5T_ARRAY, "f2_type.getClass", __LINE__, __FILE__);
+ dstype.close();
+
+ // Get the array datatype to check
+ ArrayType atype_check = dataset.getArrayType();
+
+ // Check the array rank
+ int ndims = atype_check.getArrayNDims();
+ verify_val(ndims, ARRAY1_RANK, "atype_check.getArrayNDims", __LINE__, __FILE__);
+
+ // Get the array dimensions
+ hsize_t rdims1[H5S_MAX_RANK];
+ atype_check.getArrayDims(rdims1);
+
+ // Check the array dimensions
+ for (ii =0; ii <ndims; ii++)
+ if (rdims1[ii]!=tdims1[ii]) {
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", (int)ii, (int)rdims1[ii], (int)ii, (int)tdims1[ii]);
+ continue;
+ } // end if
+
+ // Test ArrayType::ArrayType(const hid_t existing_id)
+ ArrayType new_arrtype(atype_check.getId());
+
+ // Check the array rank
+ ndims = new_arrtype.getArrayNDims();
+ verify_val(ndims, ARRAY1_RANK, "new_arrtype.getArrayNDims", __LINE__, __FILE__);
+
+ // Get the array dimensions
+ new_arrtype.getArrayDims(rdims1);
+
+ // Check the array dimensions
+ for (ii = 0; ii < ndims; ii++)
+ if (rdims1[ii] != tdims1[ii]) {
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", (int)ii, (int)rdims1[ii], (int)ii, (int)tdims1[ii]);
+ continue;
+ } // end if
+
+ /*
+ * Check the compound datatype and the array of floats datatype
+ * in the compound.
+ */
+ // Get the compound datatype, which is the base datatype of the
+ // array datatype atype_check.
+ DataType base_type = atype_check.getSuper();
+ mclass = base_type.getClass();
+ verify_val(mclass, H5T_COMPOUND, "atype_check.getClass", __LINE__, __FILE__);
+
+ // Verify the compound datatype info
+ CompType ctype_check(base_type.getId());
+ base_type.close();
+
+ // Check the number of members
+ nmemb = ctype_check.getNmembers();
+ verify_val(nmemb, 2, "ctype_check.getNmembers", __LINE__, __FILE__);
+
+ // Check the 2nd field's name
+ H5std_string field2_name = ctype_check.getMemberName(1);
+ if (HDstrcmp(field2_name.c_str(),"f") != 0)
+ TestErrPrintf("Compound field name doesn't match!, field2_name=%s\n",field2_name.c_str());
+
+ // Get the 2nd field's datatype
+ DataType f2_type = ctype_check.getMemberDataType(1);
+
+ // Get the 2nd field's class, this 2nd field should have an array type
+ mclass = f2_type.getClass();
+ verify_val(mclass, H5T_ARRAY, "f2_type.getClass", __LINE__, __FILE__);
+ f2_type.close();
+
+ // Get the 2nd field, array of floats datatype, to check
+ ArrayType f2_atype_check = ctype_check.getMemberArrayType(1);
+
+ // Check the array rank
+ ndims = f2_atype_check.getArrayNDims();
+ verify_val(ndims, ARRAY1_RANK, "f2_atype_check.getArrayNDims", __LINE__, __FILE__);
+
+ // Get the array dimensions
+ HDmemset(rdims1, 0, H5S_MAX_RANK);
+ f2_atype_check.getArrayDims(rdims1);
+
+ // Check the array dimensions
+ for (ii = 0; ii < ndims; ii++)
+ if (rdims1[ii] != tdims1[ii]) {
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",(int)ii, (int)rdims1[ii], (int)ii, (int)tdims1[ii]);
+ continue;
+ } // end if
+
+ // Close done datatypes
+ f2_atype_check.close();
+ ctype_check.close();
+
+ // Read dataset from disk
+ dataset.read(rdata, atype_check);
+
+ // Compare data read in
+ for (ii = 0; ii < SPACE1_DIM1; ii++) {
+ for (jj = 0; jj < ARRAY1_DIM1; jj++) {
+ if (wdata[ii][jj].i != rdata[ii][jj].i) {
+ TestErrPrintf("Array data information doesn't match!, wdata[%d][%d].i=%d, rdata[%d][%d].i=%d\n",(int)ii,(int)jj,(int)wdata[ii][jj].i,(int)ii,(int)jj,(int)rdata[ii][jj].i);
+ continue;
+ } // end if
+ } // end for
+ } // end for
+
+ // Close all
+ atype_check.close();
+ dataset.close();
+ file1.close();
+ PASSED();
+ } // end of try block
+ catch (Exception E) {
+ issue_fail_msg("test_array_compound_array", __LINE__, __FILE__, E.getCDetailMsg());
+ }
+
+} // end test_array_compound_array()
+
+
+/****************************************************************
+**
+** test_array(): Main datatypes testing routine.
+**
+****************************************************************/
+#ifdef __cplusplus
+extern "C"
+#endif
+void test_array()
+{
+ // Output message about test being performed
+ MESSAGE(5, ("Testing Array Datatypes\n"));
+
+ // Test array of compounds with array field
+ test_array_compound_array();
+
+} // test_array()
+
+
+/*-------------------------------------------------------------------------
+ * Function: cleanup_array
+ *
+ * Purpose: Cleanup temporary test files
+ *
+ * Return: none
+ *
+ * Programmer: Binh-Minh Ribler (using C version)
+ * January, 2016
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef __cplusplus
+extern "C"
+#endif
+void cleanup_array()
+{
+ HDremove(FILENAME.c_str());
+} // cleanup_array
diff --git a/c++/test/testhdf5.cpp b/c++/test/testhdf5.cpp
index 59b16cf..b29c6fb 100644
--- a/c++/test/testhdf5.cpp
+++ b/c++/test/testhdf5.cpp
@@ -91,6 +91,7 @@ main(int argc, char *argv[])
// testing variable-length strings in tvlstr.cpp
AddTest("tvlstr", test_vlstrings, cleanup_vlstrings, "Variable-Length Strings", NULL);
AddTest("ttypes", test_types, cleanup_types, "Generic Data Types", NULL);
+ AddTest("tarray", test_array, cleanup_array, "Array Datatypes", NULL);
AddTest("tcompound", test_compound, cleanup_compound, "Compound Data Types", NULL);
AddTest("tdspl", test_dsproplist, cleanup_dsproplist, "Dataset Property List", NULL);
AddTest("tfilter", test_filters, cleanup_filters, "Various Filters", NULL);
@@ -100,7 +101,6 @@ main(int argc, char *argv[])
AddTest("time", test_time, cleanup_time, "Time Datatypes", NULL);
AddTest("vltypes", test_vltypes, cleanup_vltypes, "Variable-Length Datatypes", NULL);
AddTest("iterate", test_iterate, cleanup_iterate, "Group & Attribute Iteration", NULL);
- AddTest("array", test_array, cleanup_array, "Array Datatypes", NULL);
AddTest("genprop", test_genprop, cleanup_genprop, "Generic Properties", NULL);
AddTest("id", test_ids, NULL, "User-Created Identifiers", NULL);
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp
index aae5d86..971a06f 100644
--- a/c++/test/ttypes.cpp
+++ b/c++/test/ttypes.cpp
@@ -549,7 +549,6 @@ extern "C"
void test_types()
{
// Output message about test being performed
- //MESSAGE("Testing Generic Data Types\n");
MESSAGE(5, ("Testing Generic Data Types\n"));
// Test basic datatypes
diff --git a/config/cce-fflags b/config/cce-fflags
index 896e711..233f9ff 100644
--- a/config/cce-fflags
+++ b/config/cce-fflags
@@ -52,15 +52,24 @@ if test "X-cce" = "X-$f9x_vendor"; then
H5_FCFLAGS="${H5_FCFLAGS} -hnocaf"
# Production
- # -Wl,-s to remove all symbols for smaller file
- PROD_FCFLAGS="-O3 -Wl,-s"
+ PROD_FCFLAGS=
# Debug
- DEBUG_FCFLAGS="-g -O0"
+ DEBUG_FCFLAGS=
+
+ # Symbols
+ # -Wl,-s to remove all symbols for smaller file
+ SYMBOLS_FCFLAGS="-g"
+ NO_SYMBOLS_FCFLAGS="-Wl,-s"
- # Profile
+ # Profiling
# Use this for profiling with gprof
- PROFILE_FCFLAGS="-g -p"
+ PROFILE_FCFLAGS="-p"
+
+ # Optimization
+ HIGH_OPT_FCFLAGS="-O3"
+ DEBUG_OPT_FCFLAGS="-O0"
+ NO_OPT_FCFLAGS="-O0"
# Flags are set
f9x_flags_set=yes
diff --git a/config/cce-flags b/config/cce-flags
index a34fcbe..8f3b2dc 100644
--- a/config/cce-flags
+++ b/config/cce-flags
@@ -54,18 +54,25 @@ if test "X-cce" = "X-$cc_vendor"; then
H5_CFLAGS="${H5_CFLAGS:--hc99 $arch}"
# Production
- # -Wl,-s to remove all symbols for smaller file
- PROD_CFLAGS="-O3 -Wl,-s"
- PROD_CPPFLAGS=
+ PROD_CFLAGS=
# Debug
- DEBUG_CFLAGS="-g -O0"
- DEBUG_CPPFLAGS=
+ # NDEBUG is handled explicitly in configure
+ DEBUG_CFLAGS=
+
+ # Symbols
+ # -Wl,-s to remove all symbols for smaller file
+ SYMBOLS_CFLAGS="-g"
+ NO_SYMBOLS_CFLAGS="-Wl,-s"
- # Profile
+ # Profiling
# Use this for profiling with gprof
- PROFILE_CFLAGS="-g -p"
- PROFILE_CPPFLAGS=
+ PROFILE_CFLAGS="-p"
+
+ # Optimization
+ HIGH_OPT_CFLAGS="-O3"
+ DEBUG_OPT_CFLAGS="-O0"
+ NO_OPT_CFLAGS="-O0"
# Flags are set
cc_flags_set=yes
@@ -77,3 +84,4 @@ if test "X-$cc_flags_set" = "X-"; then
cc_vendor=
cc_version=
fi
+
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 8bd6f45..49e9a05 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -6,15 +6,6 @@ include (${HDF_RESOURCES_EXT_DIR}/ConfigureChecks.cmake)
include (${CMAKE_ROOT}/Modules/TestForSTDNamespace.cmake)
#-----------------------------------------------------------------------------
-# Option to Clear File Buffers before write --enable-clear-file-buffers
-#-----------------------------------------------------------------------------
-option (HDF5_Enable_Clear_File_Buffers "Securely clear file buffers before writing to file" ON)
-if (HDF5_Enable_Clear_File_Buffers)
- set (H5_CLEAR_MEMORY 1)
-endif (HDF5_Enable_Clear_File_Buffers)
-MARK_AS_ADVANCED (HDF5_Enable_Clear_File_Buffers)
-
-#-----------------------------------------------------------------------------
# Option for --enable-strict-format-checks
#-----------------------------------------------------------------------------
option (HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF)
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index ce8219f..31c5afb 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -18,10 +18,6 @@
/* Define if building universal (internal helper macro) */
#cmakedefine H5_AC_APPLE_UNIVERSAL_BUILD @H5_AC_APPLE_UNIVERSAL_BUILD@
-/* Define if the memory buffers being written to disk should be cleared before
- writing. */
-#cmakedefine H5_CLEAR_MEMORY @H5_CLEAR_MEMORY@
-
/* Define if C++ compiler recognizes offsetof */
#cmakedefine H5_CXX_HAVE_OFFSETOF @H5_CXX_HAVE_OFFSETOF@
diff --git a/config/cmake/vfdTest.cmake b/config/cmake/vfdTest.cmake
index 4685d88..10f0a7b 100644
--- a/config/cmake/vfdTest.cmake
+++ b/config/cmake/vfdTest.cmake
@@ -35,10 +35,10 @@ EXECUTE_PROCESS (
message (STATUS "COMMAND Result: ${TEST_RESULT}")
-if (ERROR_APPEND)
+if (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err TEST_STREAM)
file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out "${TEST_STREAM}")
-endif (ERROR_APPEND)
+endif (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err)
# if the return value is !=${TEST_EXPECT} bail out
if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
diff --git a/config/cmake_ext_mod/prunTest.cmake b/config/cmake_ext_mod/prunTest.cmake
index 089c203..38ecb7e 100644
--- a/config/cmake_ext_mod/prunTest.cmake
+++ b/config/cmake_ext_mod/prunTest.cmake
@@ -49,10 +49,10 @@ message (STATUS "COMMAND Result: ${TEST_RESULT}")
file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}")
-if (ERROR_APPEND)
+if (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (ERROR_APPEND)
+endif (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
if (TEST_APPEND)
file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_ERROR}\n")
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake
index c2b7527..3b7d949 100644
--- a/config/cmake_ext_mod/runTest.cmake
+++ b/config/cmake_ext_mod/runTest.cmake
@@ -62,10 +62,10 @@ endif (NOT TEST_INPUT)
message (STATUS "COMMAND Result: ${TEST_RESULT}")
-if (ERROR_APPEND)
+if (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (ERROR_APPEND)
+endif (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
if (TEST_APPEND)
file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n")
@@ -93,9 +93,9 @@ endif (TEST_MASK_MOD)
if (TEST_MASK_ERROR)
if (NOT TEST_ERRREF)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- else (NOT TEST_ERRREF)
+ else ()
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
- endif (NOT TEST_ERRREF)
+ endif ()
string (REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}")
string (REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}")
string (REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}")
@@ -105,9 +105,9 @@ if (TEST_MASK_ERROR)
string (REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
if (NOT TEST_ERRREF)
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
- else (NOT TEST_ERRREF)
+ else ()
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}")
- endif (NOT TEST_ERRREF)
+ endif ()
endif (TEST_MASK_ERROR)
if (TEST_FILTER)
diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags
new file mode 100644
index 0000000..8d1ca67
--- /dev/null
+++ b/config/gnu-cxxflags
@@ -0,0 +1,819 @@
+# -*- shell-script -*-
+#
+# 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.
+
+
+# This file should be sourced into configure if the compiler is the
+# GNU g++ compiler or a derivative. It is careful not to do anything
+# if the compiler is not GNU; otherwise `cxx_flags_set' is set to `yes'
+#
+
+# Get the compiler version in a way that works for g++
+# unless a compiler version is already known
+#
+# cxx_vendor: The compiler name: g++
+# cxx_version: Version number: 2.91.60, 2.7.2.1
+#
+if test X = "X$cxx_flags_set"; then
+ # PathScale compiler spits out gcc version string too. Need to
+ # filter it out.
+ # icc beginning with version 12 includes a "gcc version compatiblilty"
+ # string, causing the gcc H5_CFLAGS to be erroneously added. The line
+ # "grep -v 'icc version'" causes the discarding of any output
+ # containing 'icc version'. The cc_version for icc is correctly determined
+ # and flags added in the intel-flags script.
+ cxx_version="`$CXX $CXXFLAGS $H5_CXXFLAGS -v 2>&1 | grep -v 'PathScale' |\
+ grep -v 'icc version' |\
+ grep 'gcc version' | sed 's/.*gcc version \([-a-z0-9\.]*\).*/\1/'`"
+ cxx_vendor=`echo $cxx_version |sed 's/\([a-z]*\).*/\1/'`
+ cxx_version=`echo $cxx_version |sed 's/[-a-z]//g'`
+ if test X = "X$cxx_vendor" -a X != "X$cxx_version"; then
+ cxx_vendor=g++
+ fi
+ if test "-" != "$cxx_vendor-$cxx_version"; then
+ echo "compiler '$CXX' is GNU $cxx_vendor-$cxx_version"
+ fi
+
+ # Some version numbers
+ cxx_vers_major=`echo $cxx_version | cut -f1 -d.`
+ cxx_vers_minor=`echo $cxx_version | cut -f2 -d.`
+ cxx_vers_patch=`echo $cxx_version | cut -f3 -d.`
+ test -n "$cc_vers_major" || cxx_vers_major=0
+ test -n "$cc_vers_minor" || cxx_vers_minor=0
+ test -n "$cc_vers_patch" || cxx_vers_patch=0
+ cxx_vers_all=`expr $cxx_vers_major '*' 1000000 + $cxx_vers_minor '*' 1000 + $cxx_vers_patch`
+fi
+
+# Common g++ flags for various situations
+case "$cxx_vendor-$cxx_version" in
+ g++*)
+ # Architecture-specific flags
+ arch=
+ case "$host_os-$host_cpu" in
+ # FreeBSD sets the information from "uname -m" to the general machine
+ # architecture, not the specific CPU for the machine, so even our
+ # Pentium II Xeon server is set to "i386". Once we know we are on a FreeBSD
+ # machine, use the "sysctl" command to get the CPU hardware model.
+ freebsd*-i386)
+ host_cpu_model=`sysctl -n hw.model`
+ case "$host_cpu_model" in
+ # Hmm.. this might not catch Celerons, but it won't hurt them either...
+ *Pro*|*II*|*III*|*IV*|*Athlon*)
+ # architecture-specific optimizations cause problems
+ # for some users who build binaries to be used on
+ # multiple architectures.
+ # arch="-march=i686"
+ ;;
+ esac
+ ;;
+
+ *-i686)
+ # architecture-specific optimizations cause problems
+ # for some users who build binaries to be used on
+ # multiple architectures.
+ # arch="-march=i686"
+ ;;
+ esac
+
+ # Host-specific flags
+ case "`hostname`" in
+ sleipnir.ncsa.uiuc.edu)
+ arch="$arch -pipe"
+ ;;
+ esac
+
+ # General (copied from H5_CFLAGS)
+ H5_CXXFLAGS="$H5_CXXFLAGS $arch -pedantic -Wall -W -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wmissing-declarations -Wredundant-decls -Winline"
+
+ # C++-specific
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsign-promo -Woverloaded-virtual -Wold-style-cast -Weffc++ -Wreorder -Wnon-virtual-dtor -Wctor-dtor-privacy -Wabi"
+
+ # Production
+ # NDEBUG is handled explicitly by the configure script
+ case "$cxx_vendor-$cxx_version" in
+ g++-[34].*)
+ PROD_CXXFLAGS=
+ ;;
+ g++-5.*)
+ PROD_CXXFLAGS="-fstdarg-opt"
+ ;;
+ *)
+ PROD_CXXFLAGS="-finline-functions"
+ ;;
+ esac
+
+ # Debug
+ # NDEBUG is handled explicitly by the configure script
+ # -g is hanled by the symbols flags
+ case "$cxx_vendor-$cxx_version" in
+ g++-5.*)
+ DEBUG_CXXFLAGS="-ftrapv -fno-common"
+ ;;
+ *)
+ DEBUG_CXXFLAGS=
+ ;;
+ esac
+
+ # Symbols
+ NO_SYMBOLS_CXXFLAGS="-s"
+ SYMBOLS_CXXFLAGS="-g"
+
+ # Profile
+ PROFILE_CXXFLAGS="-pg"
+
+ # Optimization
+ case "$cxx_vendor-$cxx_version" in
+ g++-[34].*)
+ HIGH_OPT_CXXFLAGS="-O3"
+ DEBUG_OPT_CXXFLAGS=
+ ;;
+ g++-5.*)
+ HIGH_OPT_CXXFLAGS="-O3"
+ DEBUG_OPT_CXXFLAGS="-Og"
+ ;;
+ *)
+ HIGH_OPT_CXXFLAGS="-O"
+ DEBUG_OPT_CXXFLAGS=
+ ;;
+ esac
+ NO_OPT_CXXFLAGS="-O0"
+
+ # Flags are set
+ cxx_flags_set=yes
+ ;;
+esac
+
+# Version-specific g++ flags
+#
+# Please follow the pattern below by adding new versions at the top, copying
+# the information from the previous version and adding modifications to that.
+case "$cxx_vendor-$cxx_version" in
+
+# Closer to the g++ 5.2 release, we should check for additional flags to
+# include and break it out into it's own section, like the other versions
+# below. -QAK
+ g++-5*)
+
+ # Append warning flags from gcc-3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
+
+ # Append more extra warning flags that only gcc 4.4+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
+
+ # Append more extra warning flags that only gcc 4.5+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow=5"
+
+ # Append more extra warning flags that only gcc 4.6+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
+
+ # Append more extra warning flags that only gcc 4.7+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn"
+
+ # Append more extra warning flags that only gcc 4.8+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsuggest-attribute=format"
+
+ # Append more extra warning flags that only gcc 4.9+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wdate-time -Wopenmp-simd"
+
+ # (There was no release of gcc 5.0)
+
+ # Append more extra warning flags that only gcc 5.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Warray-bounds=2"
+ ;;
+
+ g++-4.9*)
+ # Append warning flags
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc 3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc 3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
+
+ # Append more extra warning flags that only gcc 4.4+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
+
+ # Append more extra warning flags that only gcc 4.5+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow=5"
+
+ # Append more extra warning flags that only gcc 4.6+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
+
+ # Append more extra warning flags that only gcc 4.7+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn"
+
+ # Append more extra warning flags that only gcc 4.8+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsuggest-attribute=format"
+
+ # Append more extra warning flags that only gcc 4.9+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wdate-time -Wopenmp-simd"
+ ;;
+
+ g++-4.8*)
+ # Append warning flags
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
+
+ # Append more extra warning flags that only gcc 4.4+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
+
+ # Append more extra warning flags that only gcc 4.5+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow=5"
+
+ # Append more extra warning flags that only gcc 4.6+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
+
+ # Append more extra warning flags that only gcc 4.7+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn"
+
+ # Append more extra warning flags that only gcc 4.8+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsuggest-attribute=format"
+ ;;
+
+ g++-4.7*)
+ # Append warning flags
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ # (this warning was removed in gcc 4.5+)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
+
+ # Append more extra warning flags that only gcc 4.4+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
+
+ # Append more extra warning flags that only gcc 4.5+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow=5"
+
+ # Append more extra warning flags that only gcc 4.6+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
+
+ # Append more extra warning flags that only gcc 4.7+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn"
+ ;;
+
+ g++-4.6*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ # (this warning was removed in gcc 4.5+)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
+
+ # Append more extra warning flags that only gcc 4.4+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
+
+ # Append more extra warning flags that only gcc 4.5+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-aliasing -Wstrict-overflow=5"
+
+ # Append more extra warning flags that only gcc 4.6+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines"
+ ;;
+
+ g++-4.5*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ # (this warning was removed in gcc 4.5+)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
+
+ # Append more extra warning flags that only gcc 4.4+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
+
+ # Append more extra warning flags that only gcc 4.5+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-aliasing -Wstrict-overflow=5"
+ ;;
+
+ g++-4.4*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla"
+
+ # Append more extra warning flags that only gcc 4.4+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat"
+ ;;
+
+ g++-4.3*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning appears to be reliable now...
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations -Wvolatile-register-var"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow"
+
+ # Append more extra warning flags that only gcc 4.3+ know about
+ #
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... -QAK
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wlogical-op -Wvla"
+ ;;
+
+ g++-4.2*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning does not appear to be reliable yet...
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations -Wvolatile-register-var"
+
+ # Append more extra warning flags that only gcc 4.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wstrict-overflow"
+ ;;
+
+ g++-4.1.*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # Enable more format checking flags, beyond the basic -Wformat included
+ # in -Wall
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning does not appear to be reliable yet...
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+
+ # Append more extra warning flags that only gcc 4.1+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wunsafe-loop-optimizations -Wvolatile-register-var"
+ ;;
+
+ g++-4.0*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # The "format=2" warning generates too many warnings about valid
+ # usage in the library.
+ #CXXFLAGS="$CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning does not appear to be reliable yet...
+ #CXXFLAGS="$CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append warning flags from gcc-3.4* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+
+ # Append more extra warning flags that only gcc 4.0+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wvariadic-macros -Wnonnull -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros"
+ ;;
+
+ g++-3.4*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # The "format=2" warning generates too many warnings about valid
+ # usage in the library.
+ #CXXFLAGS="$CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning does not appear to be reliable yet...
+ #CXXFLAGS="$CXXFLAGS -Wunreachable-code"
+
+ # Append warning flags from gcc-3.3* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+
+ # Append more extra warning flags that only gcc3.4+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Winvalid-pch"
+
+ # Replace old -W flag with new -Wextra flag
+ H5_CXXFLAGS="`echo $H5_CXXFLAGS | sed -e 's/-W\ /-Wextra\ /g'`"
+ ;;
+
+ g++-3.3*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append warning flags from gcc-3.2* case
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # The "format=2" warning generates too many warnings about valid
+ # usage in the library.
+ #CXXFLAGS="$CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning does not appear to be reliable yet...
+ #CXXFLAGS="$CXXFLAGS -Wunreachable-code"
+
+ # Append more extra warning flags that only gcc3.3+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wendif-labels"
+ ;;
+
+ g++-3.2*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append warning flags from gcc-3* case
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+
+ # Append more extra warning flags that only gcc3.2+ know about
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization"
+
+ # The "format=2" warning generates too many warnings about valid
+ # usage in the library.
+ #CXXFLAGS="$CXXFLAGS -Wformat=2"
+
+ # The "unreachable code" warning does not appear to be reliable yet...
+ #CXXFLAGS="$CXXFLAGS -Wunreachable-code"
+ ;;
+
+ g++-3*)
+ # Disable warnings about using 'long long' type
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wno-long-long"
+
+ # Append some extra warning flags that only gcc3+ know about
+ # (don't use -Wpadded flag for normal builds, many of the warnings its
+ # issuing can't be fixed and they are making it hard to detect other,
+ # more important warnings)
+ #H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded"
+ H5_CXXFLAGS="$H5_CXXFLAGS -Wfloat-equal -Wmissing-format-attribute"
+ ;;
+esac
+
+# Clear cxx info if no flags set
+if test "X$cxx_flags_set" = "X"; then
+ cxx_vendor=
+ cxx_version=
+fi
diff --git a/config/gnu-fflags b/config/gnu-fflags
index 1d6caa1..62498a9 100644
--- a/config/gnu-fflags
+++ b/config/gnu-fflags
@@ -78,14 +78,27 @@ if test "X-gfortran" = "X-$f9x_vendor"; then
FSEARCH_DIRS=""
H5_FCFLAGS="$H5_FCFLAGS -pedantic -Wall -Wconversion -Wunderflow -Wimplicit-interface -W"
+ # Turn off warnings for passing non-ANSI types to BIND().
+ # We pass a lot of hid_t, etc. types so this generates a LOT of spurious warnings.
+ H5_FCFLAGS="$H5_FCFLAGS -Wno-c-binding-type"
+
# Production
- PROD_FCFLAGS="-O2 -s"
+ PROD_FCFLAGS=
# Debug
- DEBUG_FCFLAGS="-g -fbounds-check"
+ DEBUG_FCFLAGS="-fbounds-check"
+
+ # Symbols
+ SYMBOLS_FCFLAGS="-g"
+ NO_SYMBOLS_FCFLAGS="-s"
+
+ # Profiling
+ PROFILE_FCFLAGS="-pg"
- # Profile
- PROFILE_FCFLAGS="-g -pg"
+ # Optimization
+ HIGH_OPT_FCFLAGS="-O2"
+ DEBUG_OPT_FCFLAGS="-O0"
+ NO_OPT_FCFLAGS="-O0"
# Flags are set
f9x_flags_set=yes
diff --git a/config/gnu-flags b/config/gnu-flags
index e7f8f14..87aef3a 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -97,39 +97,62 @@ case "$cc_vendor-$cc_version" in
H5_CFLAGS="$H5_CFLAGS $arch -std=c99 -pedantic -Wall -W -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline"
# Production
+ # NDEBUG is handled explicitly by the configure script
case "$cc_vendor-$cc_version" in
gcc-[34].*)
- PROD_CFLAGS="-O3"
+ PROD_CFLAGS=
;;
gcc-5.*)
- PROD_CFLAGS="-O3 -fstdarg-opt"
+ PROD_CFLAGS="-fstdarg-opt"
;;
*)
- PROD_CFLAGS="-O -finline-functions"
+ # gcc automatically inlines based on the optimization level
+ # this is just a failsafe
+ PROD_CFLAGS="-finline-functions"
;;
esac
- PROD_CPPFLAGS=
# Debug
+ # NDEBUG is handled explicitly by the configure script
+ # -g is hanled by the symbols flags
case "$cc_vendor-$cc_version" in
gcc-5.*)
- DEBUG_CFLAGS="-Og -g -ftrapv -fno-common"
+ DEBUG_CFLAGS="-ftrapv -fno-common"
;;
*)
- DEBUG_CFLAGS="-g"
+ DEBUG_CFLAGS=
;;
esac
- #DEBUG_CFLAGS="$DEBUG_CFLAGS -fsanitize=undefined"
- DEBUG_CPPFLAGS=
+ #DEBUG_CFLAGS="-fsanitize=undefined"
+
+ # Symbols
+ NO_SYMBOLS_CFLAGS="-s"
+ SYMBOLS_CFLAGS="-g"
+
+ # Profile
+ PROFILE_CFLAGS="-pg"
+
+ # Optimization
+ case "$cc_vendor-$cc_version" in
+ gcc-[34].*)
+ HIGH_OPT_CFLAGS="-O3"
+ DEBUG_OPT_CFLAGS=
+ ;;
+ gcc-5.*)
+ HIGH_OPT_CFLAGS="-O3"
+ DEBUG_OPT_CFLAGS="-Og"
+ ;;
+ *)
+ HIGH_OPT_CFLAGS="-O"
+ DEBUG_OPT_CFLAGS=
+ ;;
+ esac
+ NO_OPT_CFLAGS="-O0"
# Try out the new "stack protector" feature introduced in gcc 4.1
# (We should also think about adding some of the other memory protection options)
#DEBUG_CFLAGS="$DEBUG_CFLAGS -Wstack-protector -fstack-protector-all"
- # Profile
- PROFILE_CFLAGS="-Og -g -pg"
- PROFILE_CPPFLAGS=
-
# Flags are set
cc_flags_set=yes
;;
diff --git a/config/i686-pc-cygwin b/config/i686-pc-cygwin
index 9b1ab74..7355e4a 100644
--- a/config/i686-pc-cygwin
+++ b/config/i686-pc-cygwin
@@ -104,9 +104,25 @@ case $FC_BASENAME in
# (just in case since this should be a default EIP)
H5_FCFLAGS="$H5_FCFLAGS -YEXT_NAMES=UCS"
FSEARCH_DIRS=""
- DEBUG_FCFLAGS="-g"
- PROD_FCFLAGS="-O"
- PROFILE_FCFLAGS="-g -pg"
+
+ # Production
+ PROD_FCFLAGS=
+
+ # Debug
+ DEBUG_FCFLAGS=
+
+ # Symbols
+ SYMBOLS_FCFLAGS="-g"
+ NO_SYMBOLS_FCFLAGS="-s"
+
+ # Profiling
+ PROFILE_FCFLAGS="-pg"
+
+ # Optimization
+ HIGH_OPT_FCFLAGS="-O"
+ DEBUG_OPT_FCFLAGS=
+ NO_OPT_FCFLAGS=
+
f9x_flags_set=yes
;;
diff --git a/config/ibm-aix b/config/ibm-aix
index 28498e2..ef052fb 100644
--- a/config/ibm-aix
+++ b/config/ibm-aix
@@ -59,9 +59,25 @@ if test "X-" = "X-$f9x_flags_set"; then
FCFLAGS="$FCFLAGS ${F9XSUFFIXFLAG}"
H5_FCFLAGS="$H5_FCFLAGS ${F9XSUFFIXFLAG}"
FSEARCH_DIRS="-I./ -I../src"
- DEBUG_FCFLAGS="-g"
- PROD_FCFLAGS="-O"
- PROFILE_FCFLAGS="-g -pg"
+
+ # Produciton
+ PROD_FCFLAGS=
+
+ # Debug
+ DEBUG_FCFLAGS=
+
+ # Symbols
+ SYMBOLS_FCFLAGS="-g"
+ NO_SYMBOLS_FCFLAGS=
+
+ # Profiling
+ PROFILE_FCFLAGS="-pg"
+
+ # Optimization
+ HIGH_OPT_FCFLAGS="-O"
+ DEBUG_OPT_FCFLAGS=
+ NO_OPT_FCFLAGS=
+
f9x_flags_set=yes
fi
@@ -91,13 +107,30 @@ case $CC_BASENAME in
;;
*)
+ # Undetermined compiler
+ # Use very generic flags
H5_CFLAGS="$H5_CFLAGS -ansi"
- DEBUG_CFLAGS="-g"
- DEBUG_CPPFLAGS=
- PROD_CFLAGS="-O"
- PROD_CPPFLAGS=
+
+ # Produciton
+ PROD_CFLAGS=
+
+ # Debug
+ DEBUG_CFLAGS=
+
+ # Symbols
+ SYMBOLS_CFLAGS="-g"
+ NO_SYMBOLS_CFLAGS=
+
+ # Profiling
PROFILE_CFLAGS="-pg"
- PROFILE_CPPFLAGS=
+
+ # Optimization
+ HIGH_OPT_CFLAGS="-O"
+ DEBUG_OPT_CFLAGS=
+ NO_OPT_CFLAGS=
+
+ # Flags are set
+ cc_flags_set=yes
;;
esac
diff --git a/config/ibm-flags b/config/ibm-flags
index 462372d..412817c 100644
--- a/config/ibm-flags
+++ b/config/ibm-flags
@@ -55,19 +55,35 @@ if test "XL" = "$cc_vendor"; then
# Turn off shared lib option. It causes some test suite to fail.
enable_shared="${enable_shared:-no}"
+
# Make sure this is applied to other API compile options such as C++.
AM_CFLAGS="$AM_CFLAGS"
+
# -qflag=w:w makes the lowest level of reported compile issues to be "warning"
# instead of "information". This suppresses a very large number of messages
# concerning the portability of __inline__.
H5_CFLAGS="-qlanglvl=stdc99 -qflag=w:w $H5_CFLAGS"
- DEBUG_CFLAGS="-g -qfullpath"
- DEBUG_CPPFLAGS=
+
+ # Produciton
+ PROD_CFLAGS=
+
+ # Debug
+ # NDEBUG is handled explicitly in configure
+ DEBUG_CFLAGS="-qfullpath"
+
+ # Symbols
+ SYMBOLS_CFLAGS="-g"
+ NO_SYMBOLS_CFLAGS=
+
+ # Profiling
+ PROFILE_CFLAGS="-pg"
+
+ # Optimization
# -O causes test/dtypes to fail badly. Turn it off for now.
- PROD_CFLAGS=""
- PROD_CPPFLAGS=
- PROFILE_CFLAGS="-g -qfullpath -pg"
- PROFILE_CPPFLAGS=
+ HIGH_OPT_CFLAGS=
+ DEBUG_OPT_CFLAGS=
+ NO_OPT_CFLAGS=
+
# Flags are set
cc_flags_set=yes
fi
@@ -106,3 +122,4 @@ if test X != X$CXX; then
fi
fi
+
diff --git a/config/intel-fflags b/config/intel-fflags
index 3e33fc9..db9543e 100644
--- a/config/intel-fflags
+++ b/config/intel-fflags
@@ -73,14 +73,23 @@ if test "X-ifort" = "X-$f9x_vendor"; then
H5_FCFLAGS="$H5_FCFLAGS"
# Production
- PROD_FCFLAGS="-O3"
+ PROD_FCFLAGS=
# Debug
- DEBUG_FCFLAGS="-g -check all"
+ DEBUG_FCFLAGS="-check all"
- # Profile
+ # Symbols
+ SYMBOLS_FCFLAGS="-g"
+ NO_SYMBOLS_FCFLAGS=
+
+ # Profiling
# Use this for profiling with gprof
- PROFILE_FCFLAGS="-g -p"
+ PROFILE_FCFLAGS="-p"
+
+ # Optimization
+ HIGH_OPT_FCFLAGS="-O3"
+ DEBUG_OPT_FCFLAGS=
+ NO_OPT_FCFLAGS=
# Flags are set
f9x_flags_set=yes
diff --git a/config/intel-flags b/config/intel-flags
index 3187daf..fe7b06d 100644
--- a/config/intel-flags
+++ b/config/intel-flags
@@ -68,20 +68,27 @@ if test "X-icc" = "X-$cc_vendor"; then
# General
# Default to C99 standard.
- H5_CFLAGS="${H5_CFLAGS:--std=c99 $arch}"
+ H5_CFLAGS="${H5_CFLAGS:--std=c99 $arch} -Wcheck -Wall"
- # Production is set to default; see settings for specific version further down
- PROD_CFLAGS="-O"
- PROD_CPPFLAGS=
+ # Production
+ PROD_CFLAGS=
# Debug
- DEBUG_CFLAGS="-Wcheck -Wall -g -O0"
- DEBUG_CPPFLAGS=
+ # NDEBUG is handled explicitly in configure
+ DEBUG_CFLAGS=
- # Profile
+ # Symbols
+ SYMBOLS_CFLAGS="-g"
+ NO_SYMBOLS_CFLAGS=
+
+ # Profiling
# Use this for profiling with gprof
- PROFILE_CFLAGS="-g -p"
- PROFILE_CPPFLAGS=
+ PROFILE_CFLAGS="-p"
+
+ # Optimization
+ HIGH_OPT_CFLAGS="-O"
+ DEBUG_OPT_CFLAGS="-O0"
+ NO_OPT_CFLAGS="-O0"
# Flags are set
cc_flags_set=yes
diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1
index 465bfed..5bea816 100644
--- a/config/linux-gnulibc1
+++ b/config/linux-gnulibc1
@@ -51,7 +51,7 @@ if test "X-" = "X-$FC"; then
FC=gfortran
FC_BASENAME=gfortran
;;
- pgcc*)
+ pgcc*)
FC=pgf90
FC_BASENAME=pgf90
;;
@@ -92,6 +92,9 @@ else
esac
fi
+# Figure out GNU FC compiler flags
+. $srcdir/config/gnu-fflags
+
# Figure out PGI FC compiler flags
. $srcdir/config/pgi-fflags
@@ -114,9 +117,25 @@ case $FC_BASENAME in
# (just in case since this should be a default EIP)
H5_FCFLAGS="$H5_FCFLAGS"
FSEARCH_DIRS=""
- DEBUG_FCFLAGS="-g"
- PROD_FCFLAGS="-O"
- PROFILE_FCFLAGS="-g -pg"
+
+ # Production
+ PROD_FCFLAGS=
+
+ # Debug
+ DEBUG_FCFLAGS=
+
+ # Symbols
+ SYMBOLS_FCFLAGS="-g"
+ NO_SYMBOLS_FCFLAGS="-s"
+
+ # Profiling
+ PROFILE_FCFLAGS="-pg"
+
+ # Optimization
+ HIGH_OPT_FCFLAGS="-O"
+ DEBUG_OPT_FCFLAGS=
+ NO_OPT_FCFLAGS=
+
f9x_flags_set=yes
;;
@@ -130,6 +149,9 @@ if test -z "$CXX"; then
CXX_BASENAME=g++
fi
+# Figure out GNU CXX compiler flags
+. $srcdir/config/gnu-cxxflags
+
# compiler version strings
# check if the compiler_version_info is already set
@@ -177,6 +199,7 @@ case $FC in
*mpif90*)
fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -v 2>&1 | grep 'version' |\
sed 's/^[a-z0-9]* for //' |\
+ sed 's/\"/\\\"/g' |\
sed 's/^\([a-z]* \)/ built with \1/1'`
fc_version_info=`echo $fc_version_info`
;;
diff --git a/config/pgi-fflags b/config/pgi-fflags
index 8e574e4..08dfe6e 100644
--- a/config/pgi-fflags
+++ b/config/pgi-fflags
@@ -84,15 +84,24 @@ if test "X-pgf90" = "X-$f9x_vendor"; then
#else
# PROD_FCFLAGS="-O2 -s"
#fi
- PROD_FCFLAGS="-fast -s -Mnoframe"
+ PROD_FCFLAGS="-fast -Mnoframe"
# Debug
- DEBUG_FCFLAGS="-g -Mbounds -Mchkptr -Mdclchk"
+ DEBUG_FCFLAGS="-Mbounds -Mchkptr -Mdclchk"
- # Profile
- PROFILE_FCFLAGS="-g -Mprof=func,line"
+ # Symbols
+ SYMBOLS_FCFLAGS="-g"
+ NO_SYMBOLS_FCFLAGS="-s"
+
+ # Profiling
+ PROFILE_FCFLAGS="-Mprof=func,line"
# Use this for profiling with gprof
- #PROFILE_FCFLAGS="-g -pg"
+ #PROFILE_FCFLAGS="-pg"
+
+ # Optimization
+ HIGH_OPT_FCFLAGS=
+ DEBUG_OPT_FCFLAGS=
+ NO_OPT_FCFLAGS=
# Flags are set
f9x_flags_set=yes
diff --git a/config/pgi-flags b/config/pgi-flags
index 29e6f05..f6878e6 100644
--- a/config/pgi-flags
+++ b/config/pgi-flags
@@ -72,33 +72,49 @@ if test "X-pgcc" = "X-$cc_vendor"; then
# Production
case "$cc_vendor-$cc_version" in
- # Tweak down compiler optimizations for v10.6, it has a bug
pgcc-10.6*)
- PROD_CFLAGS="-O1 -s"
+ PROD_CFLAGS=
;;
- # Tweak down compiler optimizations for v9.x
pgcc-9.*)
- PROD_CFLAGS="-O1 -s"
+ PROD_CFLAGS=
;;
*)
- PROD_CFLAGS="-fast -s"
+ PROD_CFLAGS="-fast"
;;
esac
- PROD_CPPFLAGS=
# Debug
- DEBUG_CFLAGS="-g -Mbounds"
- DEBUG_CPPFLAGS=
+ # NDEBUG is handled explicitly by the configure script
+ DEBUG_CFLAGS="-Mbounds"
- # Profile
- PROFILE_CFLAGS="-g -Mprof=func,line"
+ # Symbols
+ SYMBOLS_CFLAGS="-g"
+ NO_SYMBOLS_CFLAGS="-s"
+
+ # Profiling
+ PROFILE_CFLAGS="-Mprof=func,line"
# Use this for profiling with gprof
- #PROFILE_CFLAGS="-g -pg"
- PROFILE_CPPFLAGS=
+ #PROFILE_CFLAGS="-pg"
+
+ # Optimization
+ case "$cc_vendor-$cc_version" in
+ # Tweak down compiler optimizations for v10.6, it has a bug
+ pgcc-10.6*)
+ HIGH_OPT_CFLAGS="-O1"
+ ;;
+ # Tweak down compiler optimizations for v9.x
+ pgcc-9.*)
+ HIGH_OPT_CFLAGS="-O1"
+ ;;
+ *)
+ HIGH_OPT_CFLAGS=
+ ;;
+ esac
+ DEBUG_OPT_CFLAGS=
+ NO_OPT_CFLAGS=
# Flags are set
cc_flags_set=yes
-
fi
# Clear cc info if no flags set
diff --git a/config/solaris b/config/solaris
index 310c373..72d7423 100644
--- a/config/solaris
+++ b/config/solaris
@@ -32,16 +32,32 @@ fi
# Try solaris native compiler flags
if test "X-" = "X-$cc_flags_set"; then
H5_CFLAGS="$H5_CFLAGS -erroff=%none -DBSD_COMP"
+
+ # Production
+ # NDEBUG is handled explicitly by the configure script
+ PROD_CFLAGS=
+
+ # Debug
+ # NDEBUG is handled explicitly by the configure script
+ # -g is hanled by the symbols flags
+ DEBUG_CFLAGS=
+
+ # Symbols
+ NO_SYMBOLS_CFLAGS="-s"
+ SYMBOLS_CFLAGS="-g"
+
+ # Profile
+ PROFILE_CFLAGS="-xpg"
+
+ # Optimization
# -g produces rather slow code. "-g -O" produces much faster code with some
# loss of debugger functions such as not able to print local variables.
- DEBUG_CFLAGS="-g -O"
- DEBUG_CPPFLAGS=
- PROD_CFLAGS="-O -s"
- PROD_CPPFLAGS=
- PROFILE_CFLAGS=-xpg
- PROFILE_CPPFLAGS=
+ HIGH_OPT_CFLAGS="-O"
+ DEBUG_OPT_CFLAGS="-O"
+ NO_OPT_CFLAGS=
+
cc_flags_set=yes
-# Special linking flag is needed to build with Fortran on Solaris 5.9
+ # Special linking flag is needed to build with Fortran on Solaris 5.9
system_version="`uname -r`"
case "$system_version" in
5.9*)
@@ -52,10 +68,6 @@ if test "X-" = "X-$cc_flags_set"; then
;;
esac
- # Turn off optimization flag for SUNpro compiler versions 4.x which
- # have an optimization bug. Version 5.0 works.
- ($CC -V 2>&1) | grep -s 'cc: .* C 4\.' >/dev/null 2>&1 \
- && PROD_CFLAGS="`echo $PROD_CFLAGS | sed -e 's/-O//'`"
fi
LIBS="$LIBS"
@@ -69,12 +81,34 @@ fi
if test "X-" = "X-$f9x_flags_set"; then
F9XSUFFIXFLAG=""
FSEARCH_DIRS=""
+
H5_FCFLAGS="$H5_FCFLAGS"
+
+ # TODO: Revisit these flags.
+
+ # Production
+ # NDEBUG is handled explicitly by the configure script
+ PROD_FCFLAGS=
+
+ # Debug
+ # NDEBUG is handled explicitly by the configure script
+ # -g is hanled by the symbols flags
+ DEBUG_FCFLAGS=
+
+ # Symbols
+ NO_SYMBOLS_FCFLAGS=
+ SYMBOLS_FCFLAGS="-g"
+
+ # Profile
+ PROFILE_FCFLAGS=
+
+ # Optimization
# -g produces rather slow code. "-g -O" produces much faster code with some
# loss of debugger functions such as not able to print local variables.
- DEBUG_FCFLAGS="-g -O"
- PROD_FCFLAGS="-O2"
- PROFILE_FCFLAGS=""
+ HIGH_OPT_FCFLAGS="-O2"
+ DEBUG_OPT_FCFLAGS="-O"
+ NO_OPT_FCFLAGS=
+
f9x_flags_set=yes
fi
@@ -107,14 +141,30 @@ fi
if test -z "$cxx_flags_set"; then
H5_CXXFLAGS="$H5_CXXFLAGS -instances=static"
H5_CPPFLAGS="$H5_CPPFLAGS -LANG:std"
+
+ # Production
+ # NDEBUG is handled explicitly by the configure script
+ PROD_CXXFLAGS=
+
+ # Debug
+ # NDEBUG is handled explicitly by the configure script
+ # -g is hanled by the symbols flags
+ DEBUG_CXXFLAGS=
+
+ # Symbols
+ NO_SYMBOLS_CXXFLAGS="-s"
+ SYMBOLS_CXXFLAGS="-g"
+
+ # Profile
+ PROFILE_CXXFLAGS="-xpg"
+
+ # Optimization
# -g produces rather slow code. "-g -O" produces much faster code with some
# loss of debugger functions such as not able to print local variables.
- DEBUG_CXXFLAGS="-g -O"
- DEBUG_CPPFLAGS=
- PROD_CXXFLAGS="-O -s"
- PROD_CPPFLAGS=
- PROFILE_CXXFLAGS=-xpg
- PROFILE_CPPFLAGS=
+ HIGH_OPT_CXXFLAGS="-O"
+ DEBUG_OPT_CXXFLAGS="-O"
+ NO_OPT_CXXFLAGS=
+
cxx_flags_set=yes
fi
@@ -156,4 +206,3 @@ case $CXX in
;;
esac
-
diff --git a/config/x86_64-pc-cygwin b/config/x86_64-pc-cygwin
index 9b1ab74..210aa2b 100644
--- a/config/x86_64-pc-cygwin
+++ b/config/x86_64-pc-cygwin
@@ -104,9 +104,25 @@ case $FC_BASENAME in
# (just in case since this should be a default EIP)
H5_FCFLAGS="$H5_FCFLAGS -YEXT_NAMES=UCS"
FSEARCH_DIRS=""
- DEBUG_FCFLAGS="-g"
- PROD_FCFLAGS="-O"
- PROFILE_FCFLAGS="-g -pg"
+
+ # Production
+ PROD_FCFLAGS=
+
+ # Debug
+ DEBUG_FCFLAGS=
+
+ # Symbols
+ SYMBOLS_FCFLAGS="-g"
+ NO_SYMBOLS_FCFLAGS="-s"
+
+ # Profiling
+ PROFILE_FCFLAGS="-pg"
+
+ # Optimization
+ HIGH_OPT_FCFLAGS="-O"
+ DEBUG_OPT_FCFLAGS=
+ NO_OPT_FCFLAGS=
+
f9x_flags_set=yes
;;
@@ -119,3 +135,4 @@ if test -z "$CXX"; then
CXX=g++
CXX_BASENAME=g++
fi
+
diff --git a/configure b/configure
index e730544..c53e27b 100755
--- a/configure
+++ b/configure
@@ -640,6 +640,9 @@ LTLIBOBJS
LIBOBJS
HAVE_SHARED_CONDITIONAL_FALSE
HAVE_SHARED_CONDITIONAL_TRUE
+enable_static
+enable_shared
+STATIC_SHARED
SEARCH
BUILD_HDF5_HL_CONDITIONAL_FALSE
BUILD_HDF5_HL_CONDITIONAL_TRUE
@@ -666,23 +669,33 @@ CONFIG_DATE
H5_VERSION
DIRECT_VFD_CONDITIONAL_FALSE
DIRECT_VFD_CONDITIONAL_TRUE
+DIRECT_VFD
+INSTRUMENT_LIBRARY
+MPE
ADD_PARALLEL_FILES
MEMORYALLOCSANITYCHECK
USINGMEMCHECKER
-CLEARFILEBUF
-INSTRUMENT_LIBRARY
TRACE_API
-DEBUG_PKG
+METADATATRACEFILE
+CODESTACK
+INTERNAL_DEBUG_OUTPUT
+OPTIMIZATION
+PROFILING
+ASSERTS
+SYMBOLS
HAVE_PTHREAD
+THREADSAFE
BUILD_SHARED_SZIP_CONDITIONAL_FALSE
BUILD_SHARED_SZIP_CONDITIONAL_TRUE
LL_PATH
USE_FILTER_SZIP
USE_FILTER_DEFLATE
+EXTERNAL_FILTERS
+HAVE_DMALLOC
LT_STATIC_EXEC
USE_PLUGINS_CONDITIONAL_FALSE
USE_PLUGINS_CONDITIONAL_TRUE
-LT_SYS_LIBRARY_PATH
+STATIC_EXEC
OTOOL64
OTOOL
LIPO
@@ -713,12 +726,16 @@ TR
AR
HL_FOR
HL
+HDF5_HL
CXXCPP
am__fastdepCXX_FALSE
am__fastdepCXX_TRUE
CXXDEPMODE
ac_ct_CXX
CXXFLAGS
+CXX
+HDF_CXX
+Fortran_COMPILER_ID
H5CONFIG_F_IKIND
H5CONFIG_F_NUM_IKIND
H5CONFIG_F_RKIND_SIZEOF
@@ -755,7 +772,10 @@ HSIZE_T
HADDR_T
R_INTEGER
R_LARGE
+FC
HDF5_INTERFACES
+HDF_FORTRAN
+PAC_C_MAX_REAL_PRECISION
EGREP
GREP
CPP
@@ -775,25 +795,8 @@ ac_ct_CC
LDFLAGS
CFLAGS
CC
-Fortran_COMPILER_ID
-PAC_C_MAX_REAL_PRECISION
+BUILD_MODE
UNAME_INFO
-enable_static
-enable_shared
-STATIC_SHARED
-THREADSAFE
-DIRECT_VFD
-HAVE_DMALLOC
-CODESTACK
-INSTRUMENT
-HDF5_HL
-CXX
-HDF_CXX
-FC
-HDF_FORTRAN
-STATIC_EXEC
-MPE
-EXTERNAL_FILTERS
AM_LDFLAGS
AM_CPPFLAGS
AM_CXXFLAGS
@@ -886,6 +889,7 @@ ac_user_opts='
enable_option_checking
enable_silent_rules
enable_maintainer_mode
+enable_build_mode
enable_dependency_tracking
enable_unsupported
enable_fortran
@@ -895,13 +899,11 @@ enable_shared
enable_static
with_pic
enable_fast_install
-with_aix_soname
with_gnu_ld
with_sysroot
enable_libtool_lock
enable_static_exec
enable_sharedlib_rpath
-enable_production
with_fnord
with_dmalloc
with_zlib
@@ -909,14 +911,19 @@ with_szlib
enable_threadsafe
with_pthread
enable_debug
+enable_production
+enable_symbols
+enable_asserts
+enable_profiling
+enable_optimization
+enable_internal_debug
enable_codestack
enable_metadata_trace_file
enable_trace
-enable_instrument
-enable_clear_file_buffers
enable_using_memchecker
enable_memory_alloc_sanity_check
enable_parallel
+enable_instrument
with_mpe
enable_direct_vfd
with_default_plugindir
@@ -942,8 +949,7 @@ FCFLAGS
CXX
CXXFLAGS
CCC
-CXXCPP
-LT_SYS_LIBRARY_PATH'
+CXXCPP'
# Initialize some variables set by options.
@@ -1567,6 +1573,15 @@ Optional Features:
--enable-maintainer-mode
enable make rules and dependencies not useful (and
sometimes confusing) to the casual installer
+ --enable-build-mode=(debug|production|clean)
+ Sets the build mode. Debug turns on symbols, API
+ tracing, asserts, and debug optimization, as well as
+ several other minor configure options that aid in
+ debugging. Production turns high optimizations on.
+ Clean turns nothing on and disables optimization
+ (i.e.: a 'clean slate' configuration). All these
+ settings can be overridden by using specific
+ configure flags. [default=debug]
--enable-dependency-tracking
do not reject slow dependency extractors
--disable-dependency-tracking
@@ -1574,7 +1589,8 @@ Optional Features:
--enable-unsupported Allow unsupported combinations of configure options
--enable-fortran Compile the Fortran interface [default=no]
--enable-cxx Compile the C++ interface [default=no]
- --enable-hl Enable the high level library [default=yes]
+ --enable-hl Enable the high-level library. [default=yes (unless
+ build mode = clean)]
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
@@ -1584,42 +1600,77 @@ Optional Features:
[default=no]
--disable-sharedlib-rpath
Disable use of the '=Wl,-rpath' linker option
- --enable-production Determines how to run the compiler.
--enable-threadsafe Enable thread-safe capability. Not compatible with
the high-level library, Fortran, or C++ wrappers.
[default=no]
- --enable-debug=all Turn on debugging in all packages. One may also
- specify a comma-separated list of package names
- without the leading H5 or the word no. The default
- is most packages if production is disabled; no if it
- is enabled.
+ --enable-debug DEPRECATED: use --enable-build-mode=debug
+ --enable-production DEPRECATED: use --enable-build-mode=production
+ --enable-symbols=(yes|no|<custom>)
+ Add debug symbols to the library (e.g.: build with
+ -g). This is independent of the build mode and
+ optimization level. The custom string allows special
+ settings like -ggdb, etc. to be used. [default=yes
+ if debug build, otherwise no]
+ --enable-asserts Determines whether NDEBUG is defined or not, which
+ controls assertions. This is independent of the
+ build mode and presence of debugging symbols.
+ [default=yes if debug build, otherwise no]
+ --enable-profiling=(yes|no|<custom>)
+ Enable profiling flags (e.g.: -pg). This can be set
+ independently from the build mode. The custom
+ setting can be used to pass alternative profiling
+ flags (e.g.: -P for using Prof with gcc).
+ [default=no]
+ --enable-optimization=(high|debug|none|<custom>)
+ Enable optimization flags/settings (e.g.: -O3). This
+ can be set independently from the build mode.
+ Optimizations for a given compiler can be specified
+ at several levels: High, with aggressive
+ optimizations turned on; debug, with optimizations
+ that are unlikely to interfere with debugging or
+ profiling; and none, with no optimizations at all.
+ See the compiler-specific config/*-flags file for
+ more details. Alternatively, optimization options
+ can be specified directly by specifying them as a
+ string value. These custom optimzation flags will
+ completely replace all other optimization flags.
+ [default depends on build mode: debug=debug,
+ production=high, clean=none]
+ --enable-internal-debug=(yes|all|no|none|<pkg list>)
+ Enable extra debugging output on HDF5 library
+ errors. One may also specify a comma-separated list
+ of package names without the leading H5. This is
+ independent of the build mode and is mainly of
+ interest to HDF Group developers. Yes/all and
+ no/none are synonymous. [default=all if debug build,
+ otherwise none]
--enable-codestack Enable the function stack tracing (for developer
- debugging).
+ debugging). [default=no]
--enable-metadata-trace-file
- Enable metadata trace file collection.
- --enable-trace Enable API tracing capability. Default=no if debug
- is disabled.
- --enable-instrument Enable library instrumentation of optimization
- tracing. Default=no if debug is disabled.
- --enable-clear-file-buffers
- Securely clear file buffers before writing to file.
- Default=yes.
+ Enable metadata trace file collection. [default=no]
+ --enable-trace Enable HDF5 API tracing capability. [default=yes if
+ debug build, otherwise no]
--enable-using-memchecker
Enable this option if a memory allocation and/or
bounds checking tool will be used on the HDF5
library. Enabling this causes the library to be more
- picky about it's memory operations and also disables
+ picky about its memory operations and also disables
the library's free space manager code. This option
is orthogonal to the
--enable-memory-alloc-sanity-check option.
- Default=no.
+ [default=no]
--enable-memory-alloc-sanity-check
Enable this option to turn on internal memory
allocation sanity checking. This could cause more
memory use and somewhat slower allocation. This
option is orthogonal to the
- --enable-using-memchecker option. Default=no.
+ --enable-using-memchecker option. [default=yes if
+ debug build, otherwise no]
--enable-parallel Search for MPI-IO and MPI support files
+ --enable-instrument Enable library instrumentation of optimization
+ tracing (only used with parallel builds).
+ [default=yes if a parallel debug build, otherwise
+ no]
--enable-direct-vfd Build the direct I/O virtual file driver (VFD). This
is based on the POSIX (sec2) VFD and requires the
open() call to take the O_DIRECT flag. [default=no]
@@ -1631,10 +1682,11 @@ Optional Features:
--enable-build-all Build helper programs that only developers should
need [default=no]
--enable-deprecated-symbols
- Enable deprecated public API symbols [default=yes]
+ Enable deprecated public API symbols. [default=yes
+ (unless build mode = clean)]
--enable-strict-format-checks
- Enable strict file format checks, default=yes if
- debug flag is enabled, no otherwise
+ Enable strict file format checks. [default=yes if
+ debug build, otherwise no]
--enable-embedded-libinfo
Enable embedded library information [default=yes]
@@ -1643,12 +1695,9 @@ Optional Packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
both]
- --with-aix-soname=aix|svr4|both
- shared library versioning (aka "SONAME") variant to
- provide on AIX, [default=aix].
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
- --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
- compiler's sysroot if not specified).
+ --with-sysroot=DIR Search for dependent libraries within DIR
+ (or the compiler's sysroot if not specified).
For the following --with-xxx options, you can specify where the header
files and libraries are in two different ways:
@@ -1687,8 +1736,6 @@ Some influential environment variables:
CXX C++ compiler command
CXXFLAGS C++ compiler flags
CXXCPP C++ preprocessor
- LT_SYS_LIBRARY_PATH
- User-defined run-time library search path.
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -3870,46 +3917,11 @@ set >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
$as_echo "done" >&6; }
-## Define all symbol variables used for configure summary.
-## EXTERNAL_FILTERS equals all external filters. Default none.
-## MPE: whether MPE option is enabled. Default no.
-## STATIC_EXEC: whether static-exec is enabled. Default no.
-## HDF_FORTRAN: whether Fortran is enabled. Default no.
-## FC: Fortran compiler.
-## HDF_CXX: whether C++ is enabled. Default no.
-## CXX: C++ compiler.
-## HDF5_HL: whether high-level library is enabled. Default is yes.
-## INSTRUMENT: whether INSTRUMENT is enabled. No default set here.
-## CODESTACK: whether CODESTACK is enabled. Default no.
-## HAVE_DMALLOC: whether system has dmalloc support. Default no.
-## HAVE_FLOAT128: whether system has Quad-Precision Math Library. Default no.
-## DIRECT_VFD: whether DIRECT_VFD is enabled. Default no.
-## THREADSAFE: whether THREADSAFE is enabled. Default no.
-## STATIC_SHARED: whether static and/or shared libraries are requested.
-## enable_shared: whether shared lib is enabled.
-## enable_static: whether static lib is enabled.
-## UNAME_INFO: System information.
-
-
- MPE=no
- STATIC_EXEC=no
- HDF_FORTRAN=no
- HDF_FORTRAN=no
- HDF_CXX=no
- HDF_CXX=no
- HDF5_HL=yes
-
- CODESTACK=no
- HAVE_DMALLOC=no
- DIRECT_VFD=no
- THREADSAFE=no
-
-
-
- UNAME_INFO=`uname -a`
-
+## ----------------------------------------------------------------------
+## Save system information for the library settings file.
+##
-Fortran_COMPILER_ID=none
+UNAME_INFO=`uname -a`
## ----------------------------------------------------------------------
## Some platforms have broken basename, and/or xargs programs. Check
@@ -4039,6 +4051,57 @@ $as_echo "no" >&6; }
done
## ----------------------------------------------------------------------
+## Determine build mode (debug, production, clean).
+## This has to be done early since the build mode is referred to
+## frequently.
+##
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build mode" >&5
+$as_echo_n "checking build mode... " >&6; }
+# Check whether --enable-build-mode was given.
+if test "${enable_build_mode+set}" = set; then :
+ enableval=$enable_build_mode; BUILD_MODE=$enableval
+fi
+
+
+## Set the default
+## Depends on branch, set via script at branch creation time
+if test "X-$BUILD_MODE" = X- ; then
+ BUILD_MODE=debug
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+
+
+case "X-$BUILD_MODE" in
+ X-clean)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: clean" >&5
+$as_echo "clean" >&6; }
+ ;;
+ X-debug)
+
+$as_echo "#define DEBUG_BUILD 1" >>confdefs.h
+
+ H5_CFLAGS="$H5_CFLAGS $DEBUG_CFLAGS"
+ H5_CPPFLAGS="$H5_CPPFLAGS $DEBUG_CPPFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $DEBUG_FCFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: debug" >&5
+$as_echo "debug" >&6; }
+ ;;
+ X-production)
+ H5_CFLAGS="$H5_CFLAGS $PROD_CFLAGS"
+ H5_CPPFLAGS="$H5_CPPFLAGS $PROD_CPPFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $PROD_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $PROD_FCFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: production" >&5
+$as_echo "production" >&6; }
+ ;;
+ *)
+ as_fn_error $? "Unrecognized build mode: $BUILD_MODE. Use debug, production, or clean." "$LINENO" 5
+esac
+
+## ----------------------------------------------------------------------
## Some built-in configure checks can only see CFLAGS (not AM_CFLAGS), so
## we need to add this in so configure works as intended. We will need to
## reset this value at the end of configure, to preserve the user's settings.
@@ -6127,7 +6190,9 @@ _ACEOF
+## ----------------------------------------------------------------------
## Check for non-standard extenstion __FLOAT128
+##
HAVE_FLOAT128=0
HAVE_QUADMATH=0
FLT128_DIG=0
@@ -6281,6 +6346,8 @@ fi
+
+
if test "$ac_cv_sizeof___float128" != 0 && test "$FLT128_DIG" != 0 ; then
$as_echo "#define HAVE_FLOAT128 1" >>confdefs.h
@@ -6296,9 +6363,17 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAC_C_MAX_REAL_PRECISION" >&5
$as_echo "$PAC_C_MAX_REAL_PRECISION" >&6; }
+
## ----------------------------------------------------------------------
## Check if they would like the Fortran interface compiled
##
+
+## This needs to be exposed for the library info file even if Fortran is disabled.
+
+
+## Default is no Fortran
+HDF_FORTRAN=no
+
HDF5_INTERFACES=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran interface enabled" >&5
$as_echo_n "checking if Fortran interface enabled... " >&6; }
@@ -6323,7 +6398,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
ac_config_headers="$ac_config_headers fortran/src/H5config_f.inc"
- HDF_FORTRAN=yes
+
HDF5_INTERFACES="$HDF5_INTERFACES fortran"
@@ -8287,6 +8362,8 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+ Fortran_COMPILER_ID=none
+
cat >>confdefs.h <<_ACEOF
#define Fortran_COMPILER_ID $Fortran_COMPILER_ID
_ACEOF
@@ -8476,10 +8553,16 @@ fi
## ----------------------------------------------------------------------
## Check if they would like the C++ interface compiled
##
+## This needs to be exposed for the library info file even if C++ is disabled.
+
+
+## Default is no C++
+HDF_CXX=no
+
## We need to check for a C++ compiler unconditionally, since
## AC_PROG_CXX defines some macros that Automake 1.9.x uses and will
## miss even if c++ is not enabled.
- ac_ext=cpp
+ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -8896,7 +8979,7 @@ else
fi
- ac_ext=cpp
+ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -9043,6 +9126,9 @@ if test "X$HDF_CXX" = "Xyes"; then
echo "yes"
HDF5_INTERFACES="$HDF5_INTERFACES c++"
+ ## Expose the compiler for *.in files
+
+
## Change to the C++ language
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
@@ -9051,7 +9137,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- # Checking if C++ needs old style header files in includes
+ ## Checking if C++ needs old style header files in includes
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX needs old style header files in includes" >&5
@@ -9077,7 +9163,7 @@ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- # Checking if C++ can handle namespaces
+ ## Checking if C++ can handle namespaces
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle namespaces" >&5
$as_echo_n "checking if $CXX can handle namespaces... " >&6; }
@@ -9108,7 +9194,7 @@ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- # Checking if C++ has offsetof extension
+ ## Checking if C++ has offsetof extension
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX has offsetof extension" >&5
$as_echo_n "checking if $CXX has offsetof extension... " >&6; }
@@ -9159,7 +9245,7 @@ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- # if C++ can handle static cast
+ ## if C++ can handle static cast
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX can handle static cast" >&5
$as_echo_n "checking if $CXX can handle static cast... " >&6; }
@@ -9207,27 +9293,44 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
## Check if they would like the High Level library compiled
##
- HL=""
-## name of fortran folder inside "hl", if FORTRAN compile is requested
- HL_FOR=""
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if high level library is enabled" >&5
-$as_echo_n "checking if high level library is enabled... " >&6; }
+## This needs to be exposed for the library info file even if the HL
+## library is disabled.
+
+
+## The high-level library is enabled unless the build mode is clean.
+if test "X-$BUILD_MODE" = "X-clean" ; then
+ HDF5_HL=no
+else
+ HDF5_HL=yes
+fi
+
+## high-level library directories (set when needed, blank until then)
+##
+## main high-level library
+
+HL=""
+## Fortran high-level library
+
+HL_FOR=""
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the high-level library is enabled" >&5
+$as_echo_n "checking if the high-level library is enabled... " >&6; }
# Check whether --enable-hl was given.
if test "${enable_hl+set}" = set; then :
enableval=$enable_hl; HDF5_HL=$enableval
-else
- HDF5_HL=yes
fi
-if test "X$HDF5_HL" = "Xyes"; then
- echo "yes"
+if test "X-$HDF5_HL" = "X-yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
HL="hl"
$as_echo "#define INCLUDE_HL 1" >>confdefs.h
else
- echo "no"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -9322,7 +9425,8 @@ fi
## ----------------------------------------------------------------------
-## Set up ${TR} which is used to process DEBUG_PKG.
+## Set up ${TR} which is used to process the package list for extra
+## debugging output in the C library.
# Extract the first word of "tr", so it can be a program name with args.
set dummy tr; ac_word=$2
@@ -9515,8 +9619,8 @@ esac
-macro_version='2.4.6'
-macro_revision='2.4.6'
+macro_version='2.4.2'
+macro_revision='1.3337'
@@ -9530,7 +9634,7 @@ macro_revision='2.4.6'
-ltmain=$ac_aux_dir/ltmain.sh
+ltmain="$ac_aux_dir/ltmain.sh"
# Backslashify metacharacters that are still active within
# double-quoted strings.
@@ -9579,7 +9683,7 @@ func_echo_all ()
$ECHO ""
}
-case $ECHO in
+case "$ECHO" in
printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
$as_echo "printf" >&6; } ;;
print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
@@ -9772,19 +9876,19 @@ test -z "$GREP" && GREP=grep
# Check whether --with-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then :
- withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
else
with_gnu_ld=no
fi
ac_prog=ld
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
$as_echo_n "checking for ld used by $CC... " >&6; }
case $host in
*-*-mingw*)
- # gcc leaves a trailing carriage return, which upsets mingw
+ # gcc leaves a trailing carriage return which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -9798,7 +9902,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
done
- test -z "$LD" && LD=$ac_prog
+ test -z "$LD" && LD="$ac_prog"
;;
"")
# If it fails, then pretend we aren't using GCC.
@@ -9809,7 +9913,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
with_gnu_ld=unknown
;;
esac
-elif test yes = "$with_gnu_ld"; then
+elif test "$with_gnu_ld" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
$as_echo_n "checking for GNU ld... " >&6; }
else
@@ -9820,32 +9924,32 @@ if ${lt_cv_path_LD+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
- lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD=$ac_dir/$ac_prog
+ lt_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- test no != "$with_gnu_ld" && break
+ test "$with_gnu_ld" != no && break
;;
*)
- test yes != "$with_gnu_ld" && break
+ test "$with_gnu_ld" != yes && break
;;
esac
fi
done
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
else
- lt_cv_path_LD=$LD # Let the user override the test with a path.
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi
fi
-LD=$lt_cv_path_LD
+LD="$lt_cv_path_LD"
if test -n "$LD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
$as_echo "$LD" >&6; }
@@ -9888,38 +9992,33 @@ if ${lt_cv_path_NM+:} false; then :
else
if test -n "$NM"; then
# Let the user override the test.
- lt_cv_path_NM=$NM
+ lt_cv_path_NM="$NM"
else
- lt_nm_to_check=${ac_tool_prefix}nm
+ lt_nm_to_check="${ac_tool_prefix}nm"
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
lt_nm_to_check="$lt_nm_to_check nm"
fi
for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/$lt_tmp_nm
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
# Check to see if the nm accepts a BSD-compat flag.
- # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
# Tru64's nm complains that /dev/null is an invalid object file
- # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
- case $build_os in
- mingw*) lt_bad_file=conftest.nm/nofile ;;
- *) lt_bad_file=/dev/null ;;
- esac
- case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
- *$lt_bad_file* | *'Invalid file or object type'*)
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
lt_cv_path_NM="$tmp_nm -B"
- break 2
+ break
;;
*)
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
*/dev/null*)
lt_cv_path_NM="$tmp_nm -p"
- break 2
+ break
;;
*)
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
@@ -9930,15 +10029,15 @@ else
esac
fi
done
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
done
: ${lt_cv_path_NM=no}
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
$as_echo "$lt_cv_path_NM" >&6; }
-if test no != "$lt_cv_path_NM"; then
- NM=$lt_cv_path_NM
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
else
# Didn't find any BSD compatible name lister, look for dumpbin.
if test -n "$DUMPBIN"; then :
@@ -10044,9 +10143,9 @@ esac
fi
fi
- case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+ case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
*COFF*)
- DUMPBIN="$DUMPBIN -symbols -headers"
+ DUMPBIN="$DUMPBIN -symbols"
;;
*)
DUMPBIN=:
@@ -10054,8 +10153,8 @@ fi
esac
fi
- if test : != "$DUMPBIN"; then
- NM=$DUMPBIN
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
fi
fi
test -z "$NM" && NM=nm
@@ -10106,7 +10205,7 @@ if ${lt_cv_sys_max_cmd_len+:} false; then :
$as_echo_n "(cached) " >&6
else
i=0
- teststring=ABCD
+ teststring="ABCD"
case $build_os in
msdosdjgpp*)
@@ -10146,7 +10245,7 @@ else
lt_cv_sys_max_cmd_len=8192;
;;
- bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -10197,22 +10296,22 @@ else
*)
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
if test -n "$lt_cv_sys_max_cmd_len" && \
- test undefined != "$lt_cv_sys_max_cmd_len"; then
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
else
# Make teststring a little bigger before we do anything with it.
# a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8; do
+ for i in 1 2 3 4 5 6 7 8 ; do
teststring=$teststring$teststring
done
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
# If test is not a shell built-in, we'll probably end up computing a
# maximum length that is only half of the actual maximum length, but
# we can't tell.
- while { test X`env echo "$teststring$teststring" 2>/dev/null` \
+ while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
- test 17 != "$i" # 1/2 MB should be enough
+ test $i != 17 # 1/2 MB should be enough
do
i=`expr $i + 1`
teststring=$teststring$teststring
@@ -10230,7 +10329,7 @@ else
fi
-if test -n "$lt_cv_sys_max_cmd_len"; then
+if test -n $lt_cv_sys_max_cmd_len ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
else
@@ -10248,6 +10347,30 @@ max_cmd_len=$lt_cv_sys_max_cmd_len
: ${MV="mv -f"}
: ${RM="rm -f"}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,b/c, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
lt_unset=unset
else
@@ -10370,13 +10493,13 @@ esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- if test yes != "$GCC"; then
+ if test "$GCC" != yes; then
reload_cmds=false
fi
;;
darwin*)
- if test yes = "$GCC"; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
else
reload_cmds='$LD$reload_flag -o $output$reload_objs'
fi
@@ -10504,13 +10627,13 @@ lt_cv_deplibs_check_method='unknown'
# Need to set the preceding variable on all platforms that support
# interlibrary dependencies.
# 'none' -- dependencies not supported.
-# 'unknown' -- same as none, but documents that we really don't know.
+# `unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
# 'file_magic [[regex]]' -- check by looking for files in library path
-# that responds to the $file_magic_cmd with a given extended regex.
-# If you have 'file' or equivalent on your system and you're not sure
-# whether 'pass_all' will *always* work, you probably want this one.
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
aix[4-9]*)
@@ -10537,7 +10660,8 @@ mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
# func_win32_libid shell function, so use a weaker test based on 'objdump',
# unless we find 'file', for example because we are cross-compiling.
- if ( file / ) >/dev/null 2>&1; then
+ # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+ if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -10615,7 +10739,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
lt_cv_deplibs_check_method=pass_all
;;
-netbsd*)
+netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
else
@@ -10633,8 +10757,8 @@ newos6*)
lt_cv_deplibs_check_method=pass_all
;;
-openbsd* | bitrig*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
else
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
@@ -10687,9 +10811,6 @@ sysv4 | sysv4.3*)
tpf*)
lt_cv_deplibs_check_method=pass_all
;;
-os2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
esac
fi
@@ -10847,8 +10968,8 @@ else
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- # two different shell functions defined in ltmain.sh;
- # decide which one to use based on capabilities of $DLLTOOL
+ # two different shell functions defined in ltmain.sh
+ # decide which to use based on capabilities of $DLLTOOL
case `$DLLTOOL --help 2>&1` in
*--identify-strict*)
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
@@ -10860,7 +10981,7 @@ cygwin* | mingw* | pw32* | cegcc*)
;;
*)
# fallback: assume linklib IS sharedlib
- lt_cv_sharedlib_from_linklib_cmd=$ECHO
+ lt_cv_sharedlib_from_linklib_cmd="$ECHO"
;;
esac
@@ -11022,7 +11143,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
- if test 0 -eq "$ac_status"; then
+ if test "$ac_status" -eq 0; then
# Ensure the archiver fails upon bogus file names.
rm -f conftest.$ac_objext libconftest.a
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
@@ -11030,7 +11151,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
- if test 0 -ne "$ac_status"; then
+ if test "$ac_status" -ne 0; then
lt_cv_ar_at_file=@
fi
fi
@@ -11043,7 +11164,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
$as_echo "$lt_cv_ar_at_file" >&6; }
-if test no = "$lt_cv_ar_at_file"; then
+if test "x$lt_cv_ar_at_file" = xno; then
archiver_list_spec=
else
archiver_list_spec=$lt_cv_ar_at_file
@@ -11260,7 +11381,7 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then
case $host_os in
- bitrig* | openbsd*)
+ openbsd*)
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
;;
*)
@@ -11350,7 +11471,7 @@ cygwin* | mingw* | pw32* | cegcc*)
symcode='[ABCDGISTW]'
;;
hpux*)
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
symcode='[ABCDEGRST]'
fi
;;
@@ -11383,44 +11504,14 @@ case `$NM -V 2>&1` in
symcode='[ABCDGIRSTW]' ;;
esac
-if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Gets list of data symbols to import.
- lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
- # Adjust the below global symbol transforms to fixup imported variables.
- lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
- lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
- lt_c_name_lib_hook="\
- -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
- -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
-else
- # Disable hooks by default.
- lt_cv_sys_global_symbol_to_import=
- lt_cdecl_hook=
- lt_c_name_hook=
- lt_c_name_lib_hook=
-fi
-
# Transform an extracted symbol line into a proper C declaration.
# Some systems (esp. on ia64) link data and code symbols differently,
# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n"\
-$lt_cdecl_hook\
-" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
-" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
-$lt_c_name_hook\
-" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
-" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
-
-# Transform an extracted symbol line into symbol name with lib prefix and
-# symbol address.
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
-$lt_c_name_lib_hook\
-" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
-" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
-" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
# Handle CRLF in mingw tool chain
opt_cr=
@@ -11438,24 +11529,21 @@ for ac_symprfx in "" "_"; do
# Write the raw and C identifiers.
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function,
- # D for any global variable and I for any imported variable.
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
# Also find C++ and __fastcall symbols from MSVC++,
# which start with @ or ?.
lt_cv_sys_global_symbol_pipe="$AWK '"\
" {last_section=section; section=\$ 3};"\
" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
-" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
-" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
" \$ 0!~/External *\|/{next};"\
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
" {if(hide[section]) next};"\
-" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
-" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
-" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
" ' prfx=^$ac_symprfx"
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
@@ -11503,11 +11591,11 @@ _LT_EOF
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
-/* DATA imports from DLLs on WIN32 can't be const, because runtime
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
relocations are performed -- see ld's documentation on pseudo-relocs. */
# define LT_DLSYM_CONST
-#elif defined __osf__
+#elif defined(__osf__)
/* This system does not cope well with relocations in const data. */
# define LT_DLSYM_CONST
#else
@@ -11533,7 +11621,7 @@ lt__PROGRAM__LTX_preloaded_symbols[] =
{
{ "@PROGRAM@", (void *) 0 },
_LT_EOF
- $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
cat <<\_LT_EOF >> conftest.$ac_ext
{0, (void *) 0}
};
@@ -11553,13 +11641,13 @@ _LT_EOF
mv conftest.$ac_objext conftstm.$ac_objext
lt_globsym_save_LIBS=$LIBS
lt_globsym_save_CFLAGS=$CFLAGS
- LIBS=conftstm.$ac_objext
+ LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ test $ac_status = 0; } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
LIBS=$lt_globsym_save_LIBS
@@ -11580,7 +11668,7 @@ _LT_EOF
rm -rf conftest* conftst*
# Do not use the global_symbol_pipe unless it works.
- if test yes = "$pipe_works"; then
+ if test "$pipe_works" = yes; then
break
else
lt_cv_sys_global_symbol_pipe=
@@ -11633,16 +11721,6 @@ fi
-
-
-
-
-
-
-
-
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
$as_echo_n "checking for sysroot... " >&6; }
@@ -11655,9 +11733,9 @@ fi
lt_sysroot=
-case $with_sysroot in #(
+case ${with_sysroot} in #(
yes)
- if test yes = "$GCC"; then
+ if test "$GCC" = yes; then
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
fi
;; #(
@@ -11667,8 +11745,8 @@ case $with_sysroot in #(
no|'')
;; #(
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
-$as_echo "$with_sysroot" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
+$as_echo "${with_sysroot}" >&6; }
as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
;;
esac
@@ -11680,99 +11758,18 @@ $as_echo "${lt_sysroot:-no}" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
-$as_echo_n "checking for a working dd... " >&6; }
-if ${ac_cv_path_lt_DD+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- printf 0123456789abcdef0123456789abcdef >conftest.i
-cat conftest.i conftest.i >conftest2.i
-: ${lt_DD:=$DD}
-if test -z "$lt_DD"; then
- ac_path_lt_DD_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in dd; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_lt_DD" || continue
-if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
- cmp -s conftest.i conftest.out \
- && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
-fi
- $ac_path_lt_DD_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_lt_DD"; then
- :
- fi
-else
- ac_cv_path_lt_DD=$lt_DD
-fi
-
-rm -f conftest.i conftest2.i conftest.out
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
-$as_echo "$ac_cv_path_lt_DD" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
-$as_echo_n "checking how to truncate binary pipes... " >&6; }
-if ${lt_cv_truncate_bin+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- printf 0123456789abcdef0123456789abcdef >conftest.i
-cat conftest.i conftest.i >conftest2.i
-lt_cv_truncate_bin=
-if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
- cmp -s conftest.i conftest.out \
- && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
-fi
-rm -f conftest.i conftest2.i conftest.out
-test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
-$as_echo "$lt_cv_truncate_bin" >&6; }
-
-
-
-
-
-
-
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
-func_cc_basename ()
-{
- for cc_temp in $*""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
- done
- func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-}
-
# Check whether --enable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then :
enableval=$enable_libtool_lock;
fi
-test no = "$enable_libtool_lock" || enable_libtool_lock=yes
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case $host in
ia64-*-hpux*)
- # Find out what ABI is being produced by ac_compile, and set mode
- # options accordingly.
+ # Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
@@ -11781,25 +11778,24 @@ ia64-*-hpux*)
test $ac_status = 0; }; then
case `/usr/bin/file conftest.$ac_objext` in
*ELF-32*)
- HPUX_IA64_MODE=32
+ HPUX_IA64_MODE="32"
;;
*ELF-64*)
- HPUX_IA64_MODE=64
+ HPUX_IA64_MODE="64"
;;
esac
fi
rm -rf conftest*
;;
*-*-irix6*)
- # Find out what ABI is being produced by ac_compile, and set linker
- # options accordingly.
+ # Find out which ABI we are using.
echo '#line '$LINENO' "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- if test yes = "$lt_cv_prog_gnu_ld"; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -melf32bsmip"
@@ -11828,50 +11824,9 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-mips64*-*linux*)
- # Find out what ABI is being produced by ac_compile, and set linker
- # options accordingly.
- echo '#line '$LINENO' "configure"' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- emul=elf
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- emul="${emul}32"
- ;;
- *64-bit*)
- emul="${emul}64"
- ;;
- esac
- case `/usr/bin/file conftest.$ac_objext` in
- *MSB*)
- emul="${emul}btsmip"
- ;;
- *LSB*)
- emul="${emul}ltsmip"
- ;;
- esac
- case `/usr/bin/file conftest.$ac_objext` in
- *N32*)
- emul="${emul}n32"
- ;;
- esac
- LD="${LD-ld} -m $emul"
- fi
- rm -rf conftest*
- ;;
-
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out what ABI is being produced by ac_compile, and set linker
- # options accordingly. Note that the listed cases only cover the
- # situations where additional linker options are needed (such as when
- # doing 32-bit compilation for a host where ld defaults to 64-bit, or
- # vice versa); the common cases where no linker options are needed do
- # not appear in the list.
+ # Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
@@ -11894,10 +11849,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
- powerpc64le-*linux*)
+ powerpc64le-*)
LD="${LD-ld} -m elf32lppclinux"
;;
- powerpc64-*linux*)
+ powerpc64-*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -11916,10 +11871,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- powerpcle-*linux*)
+ powerpcle-*)
LD="${LD-ld} -m elf64lppc"
;;
- powerpc-*linux*)
+ powerpc-*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -11937,7 +11892,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS=$CFLAGS
+ SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
@@ -11985,14 +11940,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
$as_echo "$lt_cv_cc_needs_belf" >&6; }
- if test yes != "$lt_cv_cc_needs_belf"; then
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS=$SAVE_CFLAGS
+ CFLAGS="$SAVE_CFLAGS"
fi
;;
*-*solaris*)
- # Find out what ABI is being produced by ac_compile, and set linker
- # options accordingly.
+ # Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
@@ -12004,7 +11958,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
case $lt_cv_prog_gnu_ld in
yes*)
case $host in
- i?86-*-solaris*|x86_64-*-solaris*)
+ i?86-*-solaris*)
LD="${LD-ld} -m elf_x86_64"
;;
sparc*-*-solaris*)
@@ -12013,7 +11967,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
esac
# GNU ld 2.21 introduced _sol2 emulations. Use them if available.
if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
- LD=${LD-ld}_sol2
+ LD="${LD-ld}_sol2"
fi
;;
*)
@@ -12029,7 +11983,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
;;
esac
-need_locks=$enable_libtool_lock
+need_locks="$enable_libtool_lock"
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
@@ -12140,7 +12094,7 @@ else
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
$as_echo "$lt_cv_path_mainfest_tool" >&6; }
-if test yes != "$lt_cv_path_mainfest_tool"; then
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
MANIFEST_TOOL=:
fi
@@ -12643,7 +12597,7 @@ if ${lt_cv_apple_cc_single_mod+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_apple_cc_single_mod=no
- if test -z "$LT_MULTI_MODULE"; then
+ if test -z "${LT_MULTI_MODULE}"; then
# By default we will add the -single_module flag. You can override
# by either setting the environment variable LT_MULTI_MODULE
# non-empty at configure time, or by adding -multi_module to the
@@ -12661,7 +12615,7 @@ else
cat conftest.err >&5
# Otherwise, if the output was created with a 0 exit code from
# the compiler, it worked.
- elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
+ elif test -f libconftest.dylib && test $_lt_result -eq 0; then
lt_cv_apple_cc_single_mod=yes
else
cat conftest.err >&5
@@ -12708,7 +12662,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$save_LDFLAGS
+ LDFLAGS="$save_LDFLAGS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
@@ -12737,7 +12691,7 @@ _LT_EOF
_lt_result=$?
if test -s conftest.err && $GREP force_load conftest.err; then
cat conftest.err >&5
- elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
+ elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
lt_cv_ld_force_load=yes
else
cat conftest.err >&5
@@ -12750,32 +12704,32 @@ fi
$as_echo "$lt_cv_ld_force_load" >&6; }
case $host_os in
rhapsody* | darwin1.[012])
- _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
darwin1.*)
- _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
darwin*) # darwin 5.x on
# if running on 10.5 or later, the deployment target defaults
# to the OS version, if on x86, and 10.4, the deployment
# target defaults to 10.4. Don't you love it?
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
- 10.[012][,.]*)
- _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[012]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
esac
;;
esac
- if test yes = "$lt_cv_apple_cc_single_mod"; then
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
_lt_dar_single_mod='$single_module'
fi
- if test yes = "$lt_cv_ld_exported_symbols_list"; then
- _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
fi
- if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
+ if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
_lt_dsymutil='~$DSYMUTIL $lib || :'
else
_lt_dsymutil=
@@ -12783,41 +12737,6 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
;;
esac
-# func_munge_path_list VARIABLE PATH
-# -----------------------------------
-# VARIABLE is name of variable containing _space_ separated list of
-# directories to be munged by the contents of PATH, which is string
-# having a format:
-# "DIR[:DIR]:"
-# string "DIR[ DIR]" will be prepended to VARIABLE
-# ":DIR[:DIR]"
-# string "DIR[ DIR]" will be appended to VARIABLE
-# "DIRP[:DIRP]::[DIRA:]DIRA"
-# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
-# "DIRA[ DIRA]" will be appended to VARIABLE
-# "DIR[:DIR]"
-# VARIABLE will be replaced by "DIR[ DIR]"
-func_munge_path_list ()
-{
- case x$2 in
- x)
- ;;
- *:)
- eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
- ;;
- x:*)
- eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
- ;;
- *::*)
- eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
- eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
- ;;
- *)
- eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
- ;;
- esac
-}
-
for ac_header in dlfcn.h
do :
ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
@@ -12835,9 +12754,9 @@ done
func_stripname_cnf ()
{
- case $2 in
- .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;;
- *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;;
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
esac
} # func_stripname_cnf
@@ -12863,14 +12782,14 @@ if test "${enable_shared+set}" = set; then :
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
;;
esac
else
@@ -12894,14 +12813,14 @@ if test "${enable_static+set}" = set; then :
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
;;
esac
else
@@ -12925,14 +12844,14 @@ if test "${with_pic+set}" = set; then :
*)
pic_mode=default
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for lt_pkg in $withval; do
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
if test "X$lt_pkg" = "X$lt_p"; then
pic_mode=yes
fi
done
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
;;
esac
else
@@ -12940,6 +12859,8 @@ else
fi
+test -z "$pic_mode" && pic_mode=default
+
@@ -12955,14 +12876,14 @@ if test "${enable_fast_install+set}" = set; then :
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
;;
esac
else
@@ -12976,63 +12897,11 @@ fi
- shared_archive_member_spec=
-case $host,$enable_shared in
-power*-*-aix[5-9]*,yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
-$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
-
-# Check whether --with-aix-soname was given.
-if test "${with_aix_soname+set}" = set; then :
- withval=$with_aix_soname; case $withval in
- aix|svr4|both)
- ;;
- *)
- as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
- ;;
- esac
- lt_cv_with_aix_soname=$with_aix_soname
-else
- if ${lt_cv_with_aix_soname+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_with_aix_soname=aix
-fi
-
- with_aix_soname=$lt_cv_with_aix_soname
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
-$as_echo "$with_aix_soname" >&6; }
- if test aix != "$with_aix_soname"; then
- # For the AIX way of multilib, we name the shared archive member
- # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
- # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
- # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
- # the AIX toolchain works better with OBJECT_MODE set (default 32).
- if test 64 = "${OBJECT_MODE-32}"; then
- shared_archive_member_spec=shr_64
- else
- shared_archive_member_spec=shr
- fi
- fi
- ;;
-*)
- with_aix_soname=aix
- ;;
-esac
-
-
-
-
-
-
-
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS=$ltmain
+LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -13081,7 +12950,7 @@ test -z "$LN_S" && LN_S="ln -s"
-if test -n "${ZSH_VERSION+set}"; then
+if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
@@ -13120,7 +12989,7 @@ aix3*)
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
- if test set != "${COLLECT_NAMES+set}"; then
+ if test "X${COLLECT_NAMES+set}" != Xset; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
@@ -13131,14 +13000,14 @@ esac
ofile=libtool
can_build_shared=yes
-# All known linkers require a '.a' archive for static linking (except MSVC,
+# All known linkers require a `.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
-with_gnu_ld=$lt_cv_prog_gnu_ld
+with_gnu_ld="$lt_cv_prog_gnu_ld"
-old_CC=$CC
-old_CFLAGS=$CFLAGS
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
# Set sane defaults for various variables
test -z "$CC" && CC=cc
@@ -13147,8 +13016,15 @@ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
test -z "$LD" && LD=ld
test -z "$ac_objext" && ac_objext=o
-func_cc_basename $compiler
-cc_basename=$func_cc_basename_result
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
# Only perform the check for file, if the check method requires it
@@ -13163,22 +13039,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then :
else
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
*)
- lt_save_MAGIC_CMD=$MAGIC_CMD
- lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
for ac_dir in $ac_dummy; do
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/${ac_tool_prefix}file"; then
- lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
$EGREP "$file_magic_regex" > /dev/null; then
:
@@ -13201,13 +13077,13 @@ _LT_EOF
break
fi
done
- IFS=$lt_save_ifs
- MAGIC_CMD=$lt_save_MAGIC_CMD
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
;;
esac
fi
-MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
$as_echo "$MAGIC_CMD" >&6; }
@@ -13229,22 +13105,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then :
else
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
*)
- lt_save_MAGIC_CMD=$MAGIC_CMD
- lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
for ac_dir in $ac_dummy; do
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/file"; then
- lt_cv_path_MAGIC_CMD=$ac_dir/"file"
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
$EGREP "$file_magic_regex" > /dev/null; then
:
@@ -13267,13 +13143,13 @@ _LT_EOF
break
fi
done
- IFS=$lt_save_ifs
- MAGIC_CMD=$lt_save_MAGIC_CMD
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
;;
esac
fi
-MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
$as_echo "$MAGIC_CMD" >&6; }
@@ -13294,7 +13170,7 @@ esac
# Use C for the default configuration in the libtool script
-lt_save_CC=$CC
+lt_save_CC="$CC"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -13356,7 +13232,7 @@ if test -n "$compiler"; then
lt_prog_compiler_no_builtin_flag=
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
case $cc_basename in
nvcc*)
lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
@@ -13372,7 +13248,7 @@ else
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
@@ -13402,7 +13278,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
-if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
else
:
@@ -13420,18 +13296,17 @@ lt_prog_compiler_pic=
lt_prog_compiler_static=
- if test yes = "$GCC"; then
+ if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_static='-static'
case $host_os in
aix*)
# All AIX code is PIC.
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static='-Bstatic'
fi
- lt_prog_compiler_pic='-fPIC'
;;
amigaos*)
@@ -13442,8 +13317,8 @@ lt_prog_compiler_static=
;;
m68k)
# FIXME: we need at least 68020 code to build shared libraries, but
- # adding the '-m68020' flag to GCC prevents building anything better,
- # like '-m68040'.
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
;;
esac
@@ -13459,11 +13334,6 @@ lt_prog_compiler_static=
# Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
lt_prog_compiler_pic='-DDLL_EXPORT'
- case $host_os in
- os2*)
- lt_prog_compiler_static='$wl-static'
- ;;
- esac
;;
darwin* | rhapsody*)
@@ -13534,7 +13404,7 @@ lt_prog_compiler_static=
case $host_os in
aix*)
lt_prog_compiler_wl='-Wl,'
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static='-Bstatic'
else
@@ -13542,29 +13412,10 @@ lt_prog_compiler_static=
fi
;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_prog_compiler_pic='-fno-common'
- case $cc_basename in
- nagfor*)
- # NAG Fortran compiler
- lt_prog_compiler_wl='-Wl,-Wl,,'
- lt_prog_compiler_pic='-PIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
- esac
- ;;
-
mingw* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic='-DDLL_EXPORT'
- case $host_os in
- os2*)
- lt_prog_compiler_static='$wl-static'
- ;;
- esac
;;
hpux9* | hpux10* | hpux11*)
@@ -13580,7 +13431,7 @@ lt_prog_compiler_static=
;;
esac
# Is there a better lt_prog_compiler_static that works with the bundled CC?
- lt_prog_compiler_static='$wl-a ${wl}archive'
+ lt_prog_compiler_static='${wl}-a ${wl}archive'
;;
irix5* | irix6* | nonstopux*)
@@ -13591,7 +13442,7 @@ lt_prog_compiler_static=
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
- # old Intel for x86_64, which still supported -KPIC.
+ # old Intel for x86_64 which still supported -KPIC.
ecc*)
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_pic='-KPIC'
@@ -13616,12 +13467,6 @@ lt_prog_compiler_static=
lt_prog_compiler_pic='-PIC'
lt_prog_compiler_static='-Bstatic'
;;
- tcc*)
- # Fabrice Bellard et al's Tiny C Compiler
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-fPIC'
- lt_prog_compiler_static='-static'
- ;;
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
@@ -13719,7 +13564,7 @@ lt_prog_compiler_static=
;;
sysv4*MP*)
- if test -d /usr/nec; then
+ if test -d /usr/nec ;then
lt_prog_compiler_pic='-Kconform_pic'
lt_prog_compiler_static='-Bstatic'
fi
@@ -13748,7 +13593,7 @@ lt_prog_compiler_static=
fi
case $host_os in
- # For platforms that do not support PIC, -DPIC is meaningless:
+ # For platforms which do not support PIC, -DPIC is meaningless:
*djgpp*)
lt_prog_compiler_pic=
;;
@@ -13780,7 +13625,7 @@ else
lt_cv_prog_compiler_pic_works=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
@@ -13810,7 +13655,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
-if test yes = "$lt_cv_prog_compiler_pic_works"; then
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
case $lt_prog_compiler_pic in
"" | " "*) ;;
*) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
@@ -13842,7 +13687,7 @@ if ${lt_cv_prog_compiler_static_works+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_static_works=no
- save_LDFLAGS=$LDFLAGS
+ save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -13861,13 +13706,13 @@ else
fi
fi
$RM -r conftest*
- LDFLAGS=$save_LDFLAGS
+ LDFLAGS="$save_LDFLAGS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
-if test yes = "$lt_cv_prog_compiler_static_works"; then
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
:
else
lt_prog_compiler_static=
@@ -13987,8 +13832,8 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-hard_links=nottested
-if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
$as_echo_n "checking if we can lock with hard links... " >&6; }
@@ -14000,9 +13845,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; }
ln conftest.a conftest.b 2>/dev/null && hard_links=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
$as_echo "$hard_links" >&6; }
- if test no = "$hard_links"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
+ if test "$hard_links" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
@@ -14045,9 +13890,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# included in the symbol list
include_expsyms=
# exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ' (' and ')$', so one must not match beginning or
- # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
- # as well as any symbol that contains 'd'.
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
# platforms (ab)use it in PIC code, but their linkers get confused if
@@ -14062,7 +13907,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
- if test yes != "$GCC"; then
+ if test "$GCC" != yes; then
with_gnu_ld=no
fi
;;
@@ -14070,9 +13915,12 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes
;;
- openbsd* | bitrig*)
+ openbsd*)
with_gnu_ld=no
;;
+ linux* | k*bsd*-gnu | gnu*)
+ link_all_deplibs=no
+ ;;
esac
ld_shlibs=yes
@@ -14080,7 +13928,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# On some targets, GNU ld is compatible enough with the native linker
# that we're better off using the native interface for both.
lt_use_gnu_ld_interface=no
- if test yes = "$with_gnu_ld"; then
+ if test "$with_gnu_ld" = yes; then
case $host_os in
aix*)
# The AIX port of GNU ld has always aspired to compatibility
@@ -14102,24 +13950,24 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
esac
fi
- if test yes = "$lt_use_gnu_ld_interface"; then
+ if test "$lt_use_gnu_ld_interface" = yes; then
# If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='$wl'
+ wlarc='${wl}'
# Set some defaults for GNU ld with shared library support. These
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
- export_dynamic_flag_spec='$wl--export-dynamic'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
# ancient GNU ld didn't support --whole-archive et. al.
if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
else
whole_archive_flag_spec=
fi
supports_anon_versioning=no
- case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
+ case `$LD -v 2>&1` in
*GNU\ gold*) supports_anon_versioning=yes ;;
*\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -14132,7 +13980,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
case $host_os in
aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
- if test ia64 != "$host_cpu"; then
+ if test "$host_cpu" != ia64; then
ld_shlibs=no
cat <<_LT_EOF 1>&2
@@ -14151,7 +13999,7 @@ _LT_EOF
case $host_cpu in
powerpc)
# see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds=''
;;
m68k)
@@ -14167,7 +14015,7 @@ _LT_EOF
allow_undefined_flag=unsupported
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
else
ld_shlibs=no
fi
@@ -14177,7 +14025,7 @@ _LT_EOF
# _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
# as there is no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
- export_dynamic_flag_spec='$wl--export-all-symbols'
+ export_dynamic_flag_spec='${wl}--export-all-symbols'
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -14185,89 +14033,61 @@ _LT_EOF
exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file, use it as
- # is; otherwise, prepend EXPORTS...
- archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
else
ld_shlibs=no
fi
;;
haiku*)
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
link_all_deplibs=yes
;;
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- allow_undefined_flag=unsupported
- shrext_cmds=.dll
- archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- prefix_cmds="$SED"~
- if test EXPORTS = "`$SED 1q $export_symbols`"; then
- prefix_cmds="$prefix_cmds -e 1d";
- fi~
- prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
- cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
- enable_shared_with_static_runtimes=yes
- ;;
-
interix[3-9]*)
hardcode_direct=no
hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='$wl-rpath,$libdir'
- export_dynamic_flag_spec='$wl-E'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
# Instead, shared libraries are loaded at an image base (0x10000000 by
# default) and relocated if they conflict, which is a slow very memory
# consuming and fragmenting process. To avoid this, we pick a random,
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
- if test linux-dietlibc = "$host_os"; then
+ if test "$host_os" = linux-dietlibc; then
case $cc_basename in
diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
esac
fi
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test no = "$tmp_diet"
+ && test "$tmp_diet" = no
then
tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
- whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
tmp_addflag=' $pic_flag'
;;
pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group f77 and f90 compilers
- whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
tmp_addflag=' $pic_flag -Mnomain' ;;
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
tmp_addflag=' -i_dynamic' ;;
@@ -14278,47 +14098,42 @@ _LT_EOF
lf95*) # Lahey Fortran 8.1
whole_archive_flag_spec=
tmp_sharedflag='--shared' ;;
- nagfor*) # NAGFOR 5.3
- tmp_sharedflag='-Wl,-shared' ;;
xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
tmp_sharedflag='-qmkshrobj'
tmp_addflag= ;;
nvcc*) # Cuda Compiler Driver 2.2
- whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
compiler_needs_object=yes
;;
esac
case `$CC -V 2>&1 | sed 5q` in
*Sun\ C*) # Sun C 5.9
- whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
compiler_needs_object=yes
tmp_sharedflag='-G' ;;
*Sun\ F*) # Sun Fortran 8.3
tmp_sharedflag='-G' ;;
esac
- archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- if test yes = "$supports_anon_versioning"; then
+ if test "x$supports_anon_versioning" = xyes; then
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
case $cc_basename in
- tcc*)
- export_dynamic_flag_spec='-rdynamic'
- ;;
xlf* | bgf* | bgxlf* | mpixlf*)
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
- hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
- if test yes = "$supports_anon_versioning"; then
+ if test "x$supports_anon_versioning" = xyes; then
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
fi
;;
esac
@@ -14327,13 +14142,13 @@ _LT_EOF
fi
;;
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
fi
;;
@@ -14351,8 +14166,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
@@ -14364,7 +14179,7 @@ _LT_EOF
ld_shlibs=no
cat <<_LT_EOF 1>&2
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
*** reliably create shared libraries on SCO systems. Therefore, libtool
*** is disabling shared libraries support. We urge you to upgrade GNU
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
@@ -14379,9 +14194,9 @@ _LT_EOF
# DT_RUNPATH tag from executables and libraries. But doing so
# requires that you compile everything twice, which is a pain.
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
@@ -14398,15 +14213,15 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
;;
esac
- if test no = "$ld_shlibs"; then
+ if test "$ld_shlibs" = no; then
runpath_var=
hardcode_libdir_flag_spec=
export_dynamic_flag_spec=
@@ -14422,7 +14237,7 @@ _LT_EOF
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
- if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
@@ -14430,57 +14245,34 @@ _LT_EOF
;;
aix[4-9]*)
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
- no_entry_flag=
+ no_entry_flag=""
else
# If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to GNU nm, but means don't demangle to AIX nm.
- # Without the "-l" option, or with the "-B" option, AIX nm treats
- # weak defined symbols like other global defined symbols, whereas
- # GNU nm marks them as "W".
- # While the 'weak' keyword is ignored in the Export File, we need
- # it in the Import File for the 'aix-soname' feature, so we have
- # to replace the "-B" option with "-P" for AIX nm.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global
+ # defined symbols, whereas GNU nm marks them as "W".
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # have runtime linking enabled, and use it for executables.
- # For shared libraries, we enable/disable runtime linking
- # depending on the kind of the shared library created -
- # when "with_aix_soname,aix_use_runtimelinking" is:
- # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
- # "aix,yes" lib.so shared, rtl:yes, for executables
- # lib.a static archive
- # "both,no" lib.so.V(shr.o) shared, rtl:yes
- # lib.a(lib.so.V) shared, rtl:no, for executables
- # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
- # lib.a(lib.so.V) shared, rtl:no
- # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
- # lib.a static archive
+ # need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
- if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
break
fi
done
- if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
- # With aix-soname=svr4, we create the lib.so.V shared archives only,
- # so we don't have lib.a shared libs to link our executables.
- # We have to force runtime linking in this case.
- aix_use_runtimelinking=yes
- LDFLAGS="$LDFLAGS -Wl,-brtl"
- fi
;;
esac
@@ -14499,21 +14291,13 @@ _LT_EOF
hardcode_direct_absolute=yes
hardcode_libdir_separator=':'
link_all_deplibs=yes
- file_list_spec='$wl-f,'
- case $with_aix_soname,$aix_use_runtimelinking in
- aix,*) ;; # traditional, no import file
- svr4,* | *,yes) # use import file
- # The Import File defines what to hardcode.
- hardcode_direct=no
- hardcode_direct_absolute=no
- ;;
- esac
+ file_list_spec='${wl}-f,'
- if test yes = "$GCC"; then
+ if test "$GCC" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
- collect2name=`$CC -print-prog-name=collect2`
+ collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" &&
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
then
@@ -14532,42 +14316,36 @@ _LT_EOF
;;
esac
shared_flag='-shared'
- if test yes = "$aix_use_runtimelinking"; then
- shared_flag="$shared_flag "'$wl-G'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
fi
- # Need to ensure runtime linking is disabled for the traditional
- # shared library, or the linker may eventually find shared libraries
- # /with/ Import File - we do not want to mix them.
- shared_flag_aix='-shared'
- shared_flag_svr4='-shared $wl-G'
+ link_all_deplibs=no
else
# not using gcc
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
- if test yes = "$aix_use_runtimelinking"; then
- shared_flag='$wl-G'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
else
- shared_flag='$wl-bM:SRE'
+ shared_flag='${wl}-bM:SRE'
fi
- shared_flag_aix='$wl-bM:SRE'
- shared_flag_svr4='$wl-G'
fi
fi
- export_dynamic_flag_spec='$wl-bexpall'
+ export_dynamic_flag_spec='${wl}-bexpall'
# It seems that -bexpall does not export symbols beginning with
# underscore (_), so it is better to generate a list of symbols to export.
always_export_symbols=yes
- if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+ if test "$aix_use_runtimelinking" = yes; then
# Warning - without using the other runtime loading flags (-brtl),
# -berok will link without error, but may produce a broken library.
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
- if test set = "${lt_cv_aix_libpath+set}"; then
+ if test "${lt_cv_aix_libpath+set}" = set; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath_+:} false; then :
@@ -14610,7 +14388,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath_"; then
- lt_cv_aix_libpath_=/usr/lib:/lib
+ lt_cv_aix_libpath_="/usr/lib:/lib"
fi
fi
@@ -14618,17 +14396,17 @@ fi
aix_libpath=$lt_cv_aix_libpath_
fi
- hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
else
- if test ia64 = "$host_cpu"; then
- hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
allow_undefined_flag="-z nodefs"
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an
# empty executable.
- if test set = "${lt_cv_aix_libpath+set}"; then
+ if test "${lt_cv_aix_libpath+set}" = set; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath_+:} false; then :
@@ -14671,7 +14449,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath_"; then
- lt_cv_aix_libpath_=/usr/lib:/lib
+ lt_cv_aix_libpath_="/usr/lib:/lib"
fi
fi
@@ -14679,33 +14457,21 @@ fi
aix_libpath=$lt_cv_aix_libpath_
fi
- hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
# -berok will link without error, but may produce a broken library.
- no_undefined_flag=' $wl-bernotok'
- allow_undefined_flag=' $wl-berok'
- if test yes = "$with_gnu_ld"; then
+ no_undefined_flag=' ${wl}-bernotok'
+ allow_undefined_flag=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
# We only use this code for GNU lds that support --whole-archive.
- whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
+ whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
else
# Exported symbols can be pulled into shared objects from archives
whole_archive_flag_spec='$convenience'
fi
archive_cmds_need_lc=yes
- archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
- # -brtl affects multiple linker settings, -berok does not and is overridden later
- compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
- if test svr4 != "$with_aix_soname"; then
- # This is similar to how AIX traditionally builds its shared libraries.
- archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
- fi
- if test aix != "$with_aix_soname"; then
- archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
- else
- # used by -dlpreopen to get the symbols
- archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
- fi
- archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
fi
;;
@@ -14714,7 +14480,7 @@ fi
case $host_cpu in
powerpc)
# see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds=''
;;
m68k)
@@ -14744,17 +14510,16 @@ fi
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=.dll
+ shrext_cmds=".dll"
# FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
- archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
- cp "$export_symbols" "$output_objdir/$soname.def";
- echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
- else
- $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
- fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
- linknames='
+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
enable_shared_with_static_runtimes=yes
@@ -14763,18 +14528,18 @@ fi
# Don't use ranlib
old_postinstall_cmds='chmod 644 $oldlib'
postlink_cmds='lt_outputfile="@OUTPUT@"~
- lt_tool_outputfile="@TOOL_OUTPUT@"~
- case $lt_outputfile in
- *.exe|*.EXE) ;;
- *)
- lt_outputfile=$lt_outputfile.exe
- lt_tool_outputfile=$lt_tool_outputfile.exe
- ;;
- esac~
- if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
- $RM "$lt_outputfile.manifest";
- fi'
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
;;
*)
# Assume MSVC wrapper
@@ -14783,7 +14548,7 @@ fi
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=.dll
+ shrext_cmds=".dll"
# FIXME: Setting linknames here is a bad hack.
archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
# The linker will automatically build a .lib file if we build a DLL.
@@ -14802,24 +14567,24 @@ fi
hardcode_direct=no
hardcode_automatic=yes
hardcode_shlibpath_var=unsupported
- if test yes = "$lt_cv_ld_force_load"; then
- whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ if test "$lt_cv_ld_force_load" = "yes"; then
+ whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
else
whole_archive_flag_spec=''
fi
link_all_deplibs=yes
- allow_undefined_flag=$_lt_dar_allow_undefined
+ allow_undefined_flag="$_lt_dar_allow_undefined"
case $cc_basename in
- ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+ ifort*) _lt_dar_can_shared=yes ;;
*) _lt_dar_can_shared=$GCC ;;
esac
- if test yes = "$_lt_dar_can_shared"; then
+ if test "$_lt_dar_can_shared" = "yes"; then
output_verbose_link_cmd=func_echo_all
- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
- module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
- archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
- module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
else
ld_shlibs=no
@@ -14861,33 +14626,33 @@ fi
;;
hpux9*)
- if test yes = "$GCC"; then
- archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ if test "$GCC" = yes; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
else
- archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
- hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
- export_dynamic_flag_spec='$wl-E'
+ export_dynamic_flag_spec='${wl}-E'
;;
hpux10*)
- if test yes,no = "$GCC,$with_gnu_ld"; then
- archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
- if test no = "$with_gnu_ld"; then
- hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
hardcode_direct_absolute=yes
- export_dynamic_flag_spec='$wl-E'
+ export_dynamic_flag_spec='${wl}-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
@@ -14895,25 +14660,25 @@ fi
;;
hpux11*)
- if test yes,no = "$GCC,$with_gnu_ld"; then
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
case $host_cpu in
hppa*64*)
- archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
else
case $host_cpu in
hppa*64*)
- archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
@@ -14925,7 +14690,7 @@ if ${lt_cv_prog_compiler__b+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler__b=no
- save_LDFLAGS=$LDFLAGS
+ save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -b"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -14944,14 +14709,14 @@ else
fi
fi
$RM -r conftest*
- LDFLAGS=$save_LDFLAGS
+ LDFLAGS="$save_LDFLAGS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
$as_echo "$lt_cv_prog_compiler__b" >&6; }
-if test yes = "$lt_cv_prog_compiler__b"; then
- archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+if test x"$lt_cv_prog_compiler__b" = xyes; then
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
@@ -14959,8 +14724,8 @@ fi
;;
esac
fi
- if test no = "$with_gnu_ld"; then
- hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
case $host_cpu in
@@ -14971,7 +14736,7 @@ fi
*)
hardcode_direct=yes
hardcode_direct_absolute=yes
- export_dynamic_flag_spec='$wl-E'
+ export_dynamic_flag_spec='${wl}-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
@@ -14982,8 +14747,8 @@ fi
;;
irix5* | irix6* | nonstopux*)
- if test yes = "$GCC"; then
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
# Try to use the -exported_symbol ld option, if it does not
# work, assume that -exports_file does not work either and
# implicitly export all symbols.
@@ -14993,8 +14758,8 @@ $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >
if ${lt_cv_irix_exported_symbol+:} false; then :
$as_echo_n "(cached) " >&6
else
- save_LDFLAGS=$LDFLAGS
- LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo (void) { return 0; }
@@ -15006,35 +14771,25 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$save_LDFLAGS
+ LDFLAGS="$save_LDFLAGS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
$as_echo "$lt_cv_irix_exported_symbol" >&6; }
- if test yes = "$lt_cv_irix_exported_symbol"; then
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+ if test "$lt_cv_irix_exported_symbol" = yes; then
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
fi
else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
fi
archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
inherit_rpath=yes
link_all_deplibs=yes
;;
- linux*)
- case $cc_basename in
- tcc*)
- # Fabrice Bellard et al's Tiny C Compiler
- ld_shlibs=yes
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
@@ -15048,7 +14803,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
newsos6)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
- hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_shlibpath_var=no
;;
@@ -15056,19 +14811,27 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
*nto* | *qnx*)
;;
- openbsd* | bitrig*)
+ openbsd*)
if test -f /usr/libexec/ld.so; then
hardcode_direct=yes
hardcode_shlibpath_var=no
hardcode_direct_absolute=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec='$wl-rpath,$libdir'
- export_dynamic_flag_spec='$wl-E'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
else
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
fi
else
ld_shlibs=no
@@ -15079,53 +14842,33 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
allow_undefined_flag=unsupported
- shrext_cmds=.dll
- archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- prefix_cmds="$SED"~
- if test EXPORTS = "`$SED 1q $export_symbols`"; then
- prefix_cmds="$prefix_cmds -e 1d";
- fi~
- prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
- cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
- enable_shared_with_static_runtimes=yes
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
;;
osf3*)
- if test yes = "$GCC"; then
- allow_undefined_flag=' $wl-expect_unresolved $wl\*'
- archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
else
allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
fi
archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test yes = "$GCC"; then
- allow_undefined_flag=' $wl-expect_unresolved $wl\*'
- archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
- hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
# Both c and cxx compiler support -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
@@ -15136,24 +14879,24 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
solaris*)
no_undefined_flag=' -z defs'
- if test yes = "$GCC"; then
- wlarc='$wl'
- archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
wlarc=''
- archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
;;
*)
- wlarc='$wl'
- archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ wlarc='${wl}'
+ archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
;;
esac
fi
@@ -15163,11 +14906,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
# The compiler driver will combine and reorder linker options,
- # but understands '-z linker_flag'. GCC discards it without '$wl',
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
# but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- if test yes = "$GCC"; then
- whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
else
whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
fi
@@ -15177,10 +14920,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
sunos4*)
- if test sequent = "$host_vendor"; then
+ if test "x$host_vendor" = xsequent; then
# Use $CC to link under sequent, because it throws in some extra .o
# files that make .init and .fini sections work.
- archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
fi
@@ -15229,43 +14972,43 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag='$wl-z,text'
+ no_undefined_flag='${wl}-z,text'
archive_cmds_need_lc=no
hardcode_shlibpath_var=no
runpath_var='LD_RUN_PATH'
- if test yes = "$GCC"; then
- archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
sysv5* | sco3.2v5* | sco5v6*)
- # Note: We CANNOT use -z defs as we might desire, because we do not
+ # Note: We can NOT use -z defs as we might desire, because we do not
# link with -lc, and that would cause any symbols used from libc to
# always be unresolved, which means just about no library would
# ever link correctly. If we're not using GNU ld we use -z text
# though, which does catch some bad symbols but isn't as heavy-handed
# as -z defs.
- no_undefined_flag='$wl-z,text'
- allow_undefined_flag='$wl-z,nodefs'
+ no_undefined_flag='${wl}-z,text'
+ allow_undefined_flag='${wl}-z,nodefs'
archive_cmds_need_lc=no
hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='$wl-R,$libdir'
+ hardcode_libdir_flag_spec='${wl}-R,$libdir'
hardcode_libdir_separator=':'
link_all_deplibs=yes
- export_dynamic_flag_spec='$wl-Bexport'
+ export_dynamic_flag_spec='${wl}-Bexport'
runpath_var='LD_RUN_PATH'
- if test yes = "$GCC"; then
- archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
@@ -15280,10 +15023,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
esac
- if test sni = "$host_vendor"; then
+ if test x$host_vendor = xsni; then
case $host in
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- export_dynamic_flag_spec='$wl-Blargedynsym'
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
;;
esac
fi
@@ -15291,7 +15034,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
$as_echo "$ld_shlibs" >&6; }
-test no = "$ld_shlibs" && can_build_shared=no
+test "$ld_shlibs" = no && can_build_shared=no
with_gnu_ld=$with_gnu_ld
@@ -15317,7 +15060,7 @@ x|xyes)
# Assume -lc should be added
archive_cmds_need_lc=yes
- if test yes,yes = "$GCC,$enable_shared"; then
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
case $archive_cmds in
*'~'*)
# FIXME: we may have to deal with multi-command sequences.
@@ -15532,14 +15275,14 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
$as_echo_n "checking dynamic linker characteristics... " >&6; }
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
case $host_os in
- darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
- *) lt_awk_arg='/^libraries:/' ;;
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
esac
case $host_os in
- mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
- *) lt_sed_strip_eq='s|=/|/|g' ;;
+ mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
+ *) lt_sed_strip_eq="s,=/,/,g" ;;
esac
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
case $lt_search_path_spec in
@@ -15555,35 +15298,28 @@ if test yes = "$GCC"; then
;;
esac
# Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary...
+ # and add multilib dir if necessary.
lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
- # ...but if some path component already ends with the multilib dir we assume
- # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
- case "$lt_multi_os_dir; $lt_search_path_spec " in
- "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
- lt_multi_os_dir=
- ;;
- esac
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
- elif test -n "$lt_multi_os_dir"; then
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
test -d "$lt_sys_path" && \
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
fi
done
lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS = " "; FS = "/|\n";} {
- lt_foo = "";
- lt_count = 0;
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
for (lt_i = NF; lt_i > 0; lt_i--) {
if ($lt_i != "" && $lt_i != ".") {
if ($lt_i == "..") {
lt_count++;
} else {
if (lt_count == 0) {
- lt_foo = "/" $lt_i lt_foo;
+ lt_foo="/" $lt_i lt_foo;
} else {
lt_count--;
}
@@ -15597,7 +15333,7 @@ BEGIN {RS = " "; FS = "/|\n";} {
# for these hosts.
case $host_os in
mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
- $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
+ $SED 's,/\([A-Za-z]:\),\1,g'` ;;
esac
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
else
@@ -15606,7 +15342,7 @@ fi
library_names_spec=
libname_spec='lib$name'
soname_spec=
-shrext_cmds=.so
+shrext_cmds=".so"
postinstall_cmds=
postuninstall_cmds=
finish_cmds=
@@ -15623,16 +15359,14 @@ hardcode_into_libs=no
# flags to be left without arguments
need_version=unknown
-
-
case $host_os in
aix3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
shlibpath_var=LIBPATH
# AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='$libname$release$shared_ext$major'
+ soname_spec='${libname}${release}${shared_ext}$major'
;;
aix[4-9]*)
@@ -15640,91 +15374,41 @@ aix[4-9]*)
need_lib_prefix=no
need_version=no
hardcode_into_libs=yes
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# AIX 5 supports IA64
- library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
else
# With GCC up to 2.95.x, collect2 would create an import file
# for dependence libraries. The import file would start with
- # the line '#! .'. This would cause the generated library to
- # depend on '.', always an invalid library. This was fixed in
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
# development snapshots of GCC prior to 3.0.
case $host_os in
aix4 | aix4.[01] | aix4.[01].*)
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
echo ' yes '
- echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
:
else
can_build_shared=no
fi
;;
esac
- # Using Import Files as archive members, it is possible to support
- # filename-based versioning of shared library archives on AIX. While
- # this would work for both with and without runtime linking, it will
- # prevent static linking of such archives. So we do filename-based
- # shared library versioning with .so extension only, which is used
- # when both runtime linking and shared linking is enabled.
- # Unfortunately, runtime linking may impact performance, so we do
- # not want this to be the default eventually. Also, we use the
- # versioned .so libs for executables only if there is the -brtl
- # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
- # To allow for filename-based versioning support, we need to create
- # libNAME.so.V as an archive file, containing:
- # *) an Import File, referring to the versioned filename of the
- # archive as well as the shared archive member, telling the
- # bitwidth (32 or 64) of that shared object, and providing the
- # list of exported symbols of that shared object, eventually
- # decorated with the 'weak' keyword
- # *) the shared object with the F_LOADONLY flag set, to really avoid
- # it being seen by the linker.
- # At run time we better use the real file rather than another symlink,
- # but for link time we create the symlink libNAME.so -> libNAME.so.V
-
- case $with_aix_soname,$aix_use_runtimelinking in
- # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
# soname into executable. Probably we can add versioning support to
# collect2, so additional links can be useful in future.
- aix,yes) # traditional libtool
- dynamic_linker='AIX unversionable lib.so'
+ if test "$aix_use_runtimelinking" = yes; then
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
# instead of lib<name>.a to let people know that these are not
# typical AIX shared libraries.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- ;;
- aix,no) # traditional AIX only
- dynamic_linker='AIX lib.a(lib.so.V)'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
# We preserve .a as extension for shared libraries through AIX4.2
# and later when we are not doing run time linking.
- library_names_spec='$libname$release.a $libname.a'
- soname_spec='$libname$release$shared_ext$major'
- ;;
- svr4,*) # full svr4 only
- dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
- library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
- # We do not specify a path in Import Files, so LIBPATH fires.
- shlibpath_overrides_runpath=yes
- ;;
- *,yes) # both, prefer svr4
- dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
- library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
- # unpreferred sharedlib libNAME.a needs extra handling
- postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
- postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
- # We do not specify a path in Import Files, so LIBPATH fires.
- shlibpath_overrides_runpath=yes
- ;;
- *,no) # both, prefer aix
- dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
- library_names_spec='$libname$release.a $libname.a'
- soname_spec='$libname$release$shared_ext$major'
- # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
- postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
- postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
- ;;
- esac
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
shlibpath_var=LIBPATH
fi
;;
@@ -15734,18 +15418,18 @@ amigaos*)
powerpc)
# Since July 2007 AmigaOS4 officially supports .so libraries.
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
;;
m68k)
library_names_spec='$libname.ixlibrary $libname.a'
# Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
;;
esac
;;
beos*)
- library_names_spec='$libname$shared_ext'
+ library_names_spec='${libname}${shared_ext}'
dynamic_linker="$host_os ld.so"
shlibpath_var=LIBRARY_PATH
;;
@@ -15753,8 +15437,8 @@ beos*)
bsdi[45]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -15766,7 +15450,7 @@ bsdi[45]*)
cygwin* | mingw* | pw32* | cegcc*)
version_type=windows
- shrext_cmds=.dll
+ shrext_cmds=".dll"
need_version=no
need_lib_prefix=no
@@ -15775,8 +15459,8 @@ cygwin* | mingw* | pw32* | cegcc*)
# gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname~
@@ -15792,17 +15476,17 @@ cygwin* | mingw* | pw32* | cegcc*)
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
- soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
dynamic_linker='Win32 ld.exe'
@@ -15811,8 +15495,8 @@ cygwin* | mingw* | pw32* | cegcc*)
*,cl*)
# Native MSVC
libname_spec='$name'
- soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
- library_names_spec='$libname.dll.lib'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='${libname}.dll.lib'
case $build_os in
mingw*)
@@ -15839,7 +15523,7 @@ cygwin* | mingw* | pw32* | cegcc*)
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
;;
*)
- sys_lib_search_path_spec=$LIB
+ sys_lib_search_path_spec="$LIB"
if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
# It is most probably a Windows format PATH.
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
@@ -15852,8 +15536,8 @@ cygwin* | mingw* | pw32* | cegcc*)
esac
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname'
@@ -15866,7 +15550,7 @@ cygwin* | mingw* | pw32* | cegcc*)
*)
# Assume MSVC wrapper
- library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
esac
@@ -15879,8 +15563,8 @@ darwin* | rhapsody*)
version_type=darwin
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
- soname_spec='$libname$release$major$shared_ext'
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -15893,8 +15577,8 @@ dgux*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -15912,13 +15596,12 @@ freebsd* | dragonfly*)
version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
need_version=no
need_lib_prefix=no
;;
freebsd-*)
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
esac
@@ -15948,10 +15631,10 @@ haiku*)
need_lib_prefix=no
need_version=no
dynamic_linker="$host_os runtime_loader"
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
- shlibpath_overrides_runpath=no
+ shlibpath_overrides_runpath=yes
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
hardcode_into_libs=yes
;;
@@ -15969,15 +15652,14 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.so"
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- if test 32 = "$HPUX_IA64_MODE"; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- sys_lib_dlsearch_path_spec=/usr/lib/hpux32
else
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- sys_lib_dlsearch_path_spec=/usr/lib/hpux64
fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
hppa*64*)
shrext_cmds='.sl'
@@ -15985,8 +15667,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
@@ -15995,8 +15677,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=SHLIB_PATH
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
;;
esac
# HP-UX runs *really* slowly unless shared libraries are mode 555, ...
@@ -16009,8 +15691,8 @@ interix[3-9]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -16021,7 +15703,7 @@ irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
*)
- if test yes = "$lt_cv_prog_gnu_ld"; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
version_type=linux # correct to gnu/linux during the next big refactor
else
version_type=irix
@@ -16029,8 +15711,8 @@ irix5* | irix6* | nonstopux*)
esac
need_lib_prefix=no
need_version=no
- soname_spec='$libname$release$shared_ext$major'
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
case $host_os in
irix5* | nonstopux*)
libsuff= shlibsuff=
@@ -16049,8 +15731,8 @@ irix5* | irix6* | nonstopux*)
esac
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
- sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
hardcode_into_libs=yes
;;
@@ -16059,33 +15741,13 @@ linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
-linux*android*)
- version_type=none # Android doesn't support versioned libraries.
- need_lib_prefix=no
- need_version=no
- library_names_spec='$libname$release$shared_ext'
- soname_spec='$libname$release$shared_ext'
- finish_cmds=
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- dynamic_linker='Android linker'
- # Don't embed -rpath directories since the linker doesn't support them.
- hardcode_libdir_flag_spec='-L$libdir'
- ;;
-
# This must be glibc/ELF.
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -16137,12 +15799,7 @@ fi
# before this can be enabled.
hardcode_into_libs=yes
- # Ideally, we could use ldconfig to report *all* directores which are
- # searched for libraries, however this is still not possible. Aside from not
- # being certain /sbin/ldconfig is available, command
- # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
- # even though it is searched at run-time. Try to do the best guess by
- # appending ld.so.conf contents (and includes) to the search path.
+ # Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
@@ -16157,17 +15814,29 @@ fi
dynamic_linker='GNU/Linux ld.so'
;;
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
netbsd*)
version_type=sunos
need_lib_prefix=no
need_version=no
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='NetBSD (a.out) ld.so'
else
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
dynamic_linker='NetBSD ld.elf_so'
fi
shlibpath_var=LD_LIBRARY_PATH
@@ -16177,7 +15846,7 @@ netbsd*)
newsos6)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
;;
@@ -16186,68 +15855,58 @@ newsos6)
version_type=qnx
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='ldqnx.so'
;;
-openbsd* | bitrig*)
+openbsd*)
version_type=sunos
- sys_lib_dlsearch_path_spec=/usr/lib
+ sys_lib_dlsearch_path_spec="/usr/lib"
need_lib_prefix=no
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
- need_version=no
- else
- need_version=yes
- fi
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
;;
os2*)
libname_spec='$name'
- version_type=windows
- shrext_cmds=.dll
- need_version=no
+ shrext_cmds=".dll"
need_lib_prefix=no
- # OS/2 can only load a DLL with a base name of 8 characters or less.
- soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
- v=$($ECHO $release$versuffix | tr -d .-);
- n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
- $ECHO $n$v`$shared_ext'
- library_names_spec='${libname}_dll.$libext'
+ library_names_spec='$libname${shared_ext} $libname.a'
dynamic_linker='OS/2 ld.exe'
- shlibpath_var=BEGINLIBPATH
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
+ shlibpath_var=LIBPATH
;;
osf3* | osf4* | osf5*)
version_type=osf
need_lib_prefix=no
need_version=no
- soname_spec='$libname$release$shared_ext$major'
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
rdos*)
@@ -16258,8 +15917,8 @@ solaris*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
@@ -16269,11 +15928,11 @@ solaris*)
sunos4*)
version_type=sunos
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
- if test yes = "$with_gnu_ld"; then
+ if test "$with_gnu_ld" = yes; then
need_lib_prefix=no
fi
need_version=yes
@@ -16281,8 +15940,8 @@ sunos4*)
sysv4 | sysv4.3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
case $host_vendor in
sni)
@@ -16303,24 +15962,24 @@ sysv4 | sysv4.3*)
;;
sysv4*MP*)
- if test -d /usr/nec; then
+ if test -d /usr/nec ;then
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
- soname_spec='$libname$shared_ext.$major'
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
shlibpath_var=LD_LIBRARY_PATH
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=sco
+ version_type=freebsd-elf
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
- if test yes = "$with_gnu_ld"; then
+ if test "$with_gnu_ld" = yes; then
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
else
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -16338,7 +15997,7 @@ tpf*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
@@ -16346,8 +16005,8 @@ tpf*)
uts4*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -16357,35 +16016,20 @@ uts4*)
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
$as_echo "$dynamic_linker" >&6; }
-test no = "$dynamic_linker" && can_build_shared=no
+test "$dynamic_linker" = no && can_build_shared=no
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
- sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
fi
-
-if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
- sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
fi
-# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
-configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
-
-# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
-func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
-
-# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
-configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
-
-
-
-
-
-
@@ -16482,15 +16126,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
hardcode_action=
if test -n "$hardcode_libdir_flag_spec" ||
test -n "$runpath_var" ||
- test yes = "$hardcode_automatic"; then
+ test "X$hardcode_automatic" = "Xyes" ; then
# We can hardcode non-existent directories.
- if test no != "$hardcode_direct" &&
+ if test "$hardcode_direct" != no &&
# If the only mechanism to avoid hardcoding is shlibpath_var, we
# have to relink, otherwise we might link with an installed library
# when we should be linking with a yet-to-be-installed one
- ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
- test no != "$hardcode_minus_L"; then
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ test "$hardcode_minus_L" != no; then
# Linking always hardcodes the temporary library directory.
hardcode_action=relink
else
@@ -16505,12 +16149,12 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
$as_echo "$hardcode_action" >&6; }
-if test relink = "$hardcode_action" ||
- test yes = "$inherit_rpath"; then
+if test "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
# Fast installation is not supported
enable_fast_install=no
-elif test yes = "$shlibpath_overrides_runpath" ||
- test no = "$enable_shared"; then
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
# Fast installation is not necessary
enable_fast_install=needless
fi
@@ -16520,7 +16164,7 @@ fi
- if test yes != "$enable_dlopen"; then
+ if test "x$enable_dlopen" != xyes; then
enable_dlopen=unknown
enable_dlopen_self=unknown
enable_dlopen_self_static=unknown
@@ -16530,23 +16174,23 @@ else
case $host_os in
beos*)
- lt_cv_dlopen=load_add_on
+ lt_cv_dlopen="load_add_on"
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
;;
mingw* | pw32* | cegcc*)
- lt_cv_dlopen=LoadLibrary
+ lt_cv_dlopen="LoadLibrary"
lt_cv_dlopen_libs=
;;
cygwin*)
- lt_cv_dlopen=dlopen
+ lt_cv_dlopen="dlopen"
lt_cv_dlopen_libs=
;;
darwin*)
- # if libdl is installed we need to link against it
+ # if libdl is installed we need to link against it
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
if ${ac_cv_lib_dl_dlopen+:} false; then :
@@ -16592,10 +16236,10 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
- lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else
- lt_cv_dlopen=dyld
+ lt_cv_dlopen="dyld"
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
@@ -16603,18 +16247,10 @@ fi
;;
- tpf*)
- # Don't try to run any link tests for TPF. We know it's impossible
- # because TPF is a cross-compiler, and we know how we open DSOs.
- lt_cv_dlopen=dlopen
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=no
- ;;
-
*)
ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
if test "x$ac_cv_func_shl_load" = xyes; then :
- lt_cv_dlopen=shl_load
+ lt_cv_dlopen="shl_load"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
$as_echo_n "checking for shl_load in -ldld... " >&6; }
@@ -16661,11 +16297,11 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
- lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
else
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
if test "x$ac_cv_func_dlopen" = xyes; then :
- lt_cv_dlopen=dlopen
+ lt_cv_dlopen="dlopen"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
@@ -16712,7 +16348,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
- lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
$as_echo_n "checking for dlopen in -lsvld... " >&6; }
@@ -16759,7 +16395,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
- lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
$as_echo_n "checking for dld_link in -ldld... " >&6; }
@@ -16806,7 +16442,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
- lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
fi
@@ -16827,21 +16463,21 @@ fi
;;
esac
- if test no = "$lt_cv_dlopen"; then
- enable_dlopen=no
- else
+ if test "x$lt_cv_dlopen" != xno; then
enable_dlopen=yes
+ else
+ enable_dlopen=no
fi
case $lt_cv_dlopen in
dlopen)
- save_CPPFLAGS=$CPPFLAGS
- test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
- save_LDFLAGS=$LDFLAGS
+ save_LDFLAGS="$LDFLAGS"
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
- save_LIBS=$LIBS
+ save_LIBS="$LIBS"
LIBS="$lt_cv_dlopen_libs $LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
@@ -16849,7 +16485,7 @@ $as_echo_n "checking whether a program can dlopen itself... " >&6; }
if ${lt_cv_dlopen_self+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test yes = "$cross_compiling"; then :
+ if test "$cross_compiling" = yes; then :
lt_cv_dlopen_self=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -16896,9 +16532,9 @@ else
# endif
#endif
-/* When -fvisibility=hidden is used, assume the code has been annotated
+/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
-#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
int fnord () __attribute__((visibility("default")));
#endif
@@ -16928,7 +16564,7 @@ _LT_EOF
(eval $ac_link) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
@@ -16948,14 +16584,14 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
$as_echo "$lt_cv_dlopen_self" >&6; }
- if test yes = "$lt_cv_dlopen_self"; then
+ if test "x$lt_cv_dlopen_self" = xyes; then
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
if ${lt_cv_dlopen_self_static+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test yes = "$cross_compiling"; then :
+ if test "$cross_compiling" = yes; then :
lt_cv_dlopen_self_static=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -17002,9 +16638,9 @@ else
# endif
#endif
-/* When -fvisibility=hidden is used, assume the code has been annotated
+/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
-#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
int fnord () __attribute__((visibility("default")));
#endif
@@ -17034,7 +16670,7 @@ _LT_EOF
(eval $ac_link) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
@@ -17055,9 +16691,9 @@ fi
$as_echo "$lt_cv_dlopen_self_static" >&6; }
fi
- CPPFLAGS=$save_CPPFLAGS
- LDFLAGS=$save_LDFLAGS
- LIBS=$save_LIBS
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
;;
esac
@@ -17101,7 +16737,7 @@ else
# FIXME - insert some real tests, host_os isn't really good enough
case $host_os in
darwin*)
- if test -n "$STRIP"; then
+ if test -n "$STRIP" ; then
striplib="$STRIP -x"
old_striplib="$STRIP -S"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -17129,7 +16765,7 @@ fi
- # Report what library types will actually be built
+ # Report which library types will actually be built
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
$as_echo_n "checking if libtool supports shared libraries... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
@@ -17137,13 +16773,13 @@ $as_echo "$can_build_shared" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
$as_echo_n "checking whether to build shared libraries... " >&6; }
- test no = "$can_build_shared" && enable_shared=no
+ test "$can_build_shared" = "no" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
# are all built from PIC.
case $host_os in
aix3*)
- test yes = "$enable_shared" && enable_static=no
+ test "$enable_shared" = yes && enable_static=no
if test -n "$RANLIB"; then
archive_cmds="$archive_cmds~\$RANLIB \$lib"
postinstall_cmds='$RANLIB $lib'
@@ -17151,12 +16787,8 @@ $as_echo_n "checking whether to build shared libraries... " >&6; }
;;
aix[4-9]*)
- if test ia64 != "$host_cpu"; then
- case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
- yes,aix,yes) ;; # shared object as lib.so file only
- yes,svr4,*) ;; # shared object as lib.so archive member only
- yes,*) enable_static=no ;; # shared object in lib.a archive as well
- esac
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
fi
;;
esac
@@ -17166,7 +16798,7 @@ $as_echo "$enable_shared" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
$as_echo_n "checking whether to build static libraries... " >&6; }
# Make sure either enable_shared or enable_static is yes.
- test yes = "$enable_shared" || enable_static=yes
+ test "$enable_shared" = yes || enable_static=yes
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
$as_echo "$enable_static" >&6; }
@@ -17180,11 +16812,11 @@ 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
-CC=$lt_save_CC
+CC="$lt_save_CC"
- if test -n "$CXX" && ( test no != "$CXX" &&
- ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
- (test g++ != "$CXX"))); then
+ if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -17363,7 +16995,7 @@ objext_CXX=$objext
# the CXX compiler isn't working. Some variables (like enable_shared)
# are currently assumed to apply to all compilers on this platform,
# and will be corrupted by setting them based on a non-working compiler.
-if test yes != "$_lt_caught_CXX_error"; then
+if test "$_lt_caught_CXX_error" != yes; then
# Code to be used in simple compile tests
lt_simple_compile_test_code="int some_variable = 0;"
@@ -17424,39 +17056,46 @@ $RM -r conftest*
CFLAGS=$CXXFLAGS
compiler=$CC
compiler_CXX=$CC
- func_cc_basename $compiler
-cc_basename=$func_cc_basename_result
+ for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
if test -n "$compiler"; then
# We don't want -fno-exception when compiling C++ code, so set the
# no_builtin_flag separately
- if test yes = "$GXX"; then
+ if test "$GXX" = yes; then
lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
else
lt_prog_compiler_no_builtin_flag_CXX=
fi
- if test yes = "$GXX"; then
+ if test "$GXX" = yes; then
# Set up default GNU C++ configuration
# Check whether --with-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then :
- withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
else
with_gnu_ld=no
fi
ac_prog=ld
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
$as_echo_n "checking for ld used by $CC... " >&6; }
case $host in
*-*-mingw*)
- # gcc leaves a trailing carriage return, which upsets mingw
+ # gcc leaves a trailing carriage return which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -17470,7 +17109,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
done
- test -z "$LD" && LD=$ac_prog
+ test -z "$LD" && LD="$ac_prog"
;;
"")
# If it fails, then pretend we aren't using GCC.
@@ -17481,7 +17120,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
with_gnu_ld=unknown
;;
esac
-elif test yes = "$with_gnu_ld"; then
+elif test "$with_gnu_ld" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
$as_echo_n "checking for GNU ld... " >&6; }
else
@@ -17492,32 +17131,32 @@ if ${lt_cv_path_LD+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
- lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD=$ac_dir/$ac_prog
+ lt_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- test no != "$with_gnu_ld" && break
+ test "$with_gnu_ld" != no && break
;;
*)
- test yes != "$with_gnu_ld" && break
+ test "$with_gnu_ld" != yes && break
;;
esac
fi
done
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
else
- lt_cv_path_LD=$LD # Let the user override the test with a path.
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi
fi
-LD=$lt_cv_path_LD
+LD="$lt_cv_path_LD"
if test -n "$LD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
$as_echo "$LD" >&6; }
@@ -17553,22 +17192,22 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
# Check if GNU C++ uses GNU ld as the underlying linker, since the
# archiving commands below assume that GNU ld is being used.
- if test yes = "$with_gnu_ld"; then
- archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ if test "$with_gnu_ld" = yes; then
+ archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
- export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
# If archive_cmds runs LD, not CC, wlarc should be empty
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
# investigate it a little bit more. (MM)
- wlarc='$wl'
+ wlarc='${wl}'
# ancient GNU ld didn't support --whole-archive et. al.
if eval "`$CC -print-prog-name=ld` --help 2>&1" |
$GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
else
whole_archive_flag_spec_CXX=
fi
@@ -17605,30 +17244,18 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
ld_shlibs_CXX=no
;;
aix[4-9]*)
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
- no_entry_flag=
+ no_entry_flag=""
else
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # have runtime linking enabled, and use it for executables.
- # For shared libraries, we enable/disable runtime linking
- # depending on the kind of the shared library created -
- # when "with_aix_soname,aix_use_runtimelinking" is:
- # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
- # "aix,yes" lib.so shared, rtl:yes, for executables
- # lib.a static archive
- # "both,no" lib.so.V(shr.o) shared, rtl:yes
- # lib.a(lib.so.V) shared, rtl:no, for executables
- # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
- # lib.a(lib.so.V) shared, rtl:no
- # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
- # lib.a static archive
+ # need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
case $ld_flag in
@@ -17638,13 +17265,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
;;
esac
done
- if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
- # With aix-soname=svr4, we create the lib.so.V shared archives only,
- # so we don't have lib.a shared libs to link our executables.
- # We have to force runtime linking in this case.
- aix_use_runtimelinking=yes
- LDFLAGS="$LDFLAGS -Wl,-brtl"
- fi
;;
esac
@@ -17663,21 +17283,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
hardcode_direct_absolute_CXX=yes
hardcode_libdir_separator_CXX=':'
link_all_deplibs_CXX=yes
- file_list_spec_CXX='$wl-f,'
- case $with_aix_soname,$aix_use_runtimelinking in
- aix,*) ;; # no import file
- svr4,* | *,yes) # use import file
- # The Import File defines what to hardcode.
- hardcode_direct_CXX=no
- hardcode_direct_absolute_CXX=no
- ;;
- esac
+ file_list_spec_CXX='${wl}-f,'
- if test yes = "$GXX"; then
+ if test "$GXX" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
- collect2name=`$CC -print-prog-name=collect2`
+ collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" &&
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
then
@@ -17695,44 +17307,36 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
fi
esac
shared_flag='-shared'
- if test yes = "$aix_use_runtimelinking"; then
- shared_flag=$shared_flag' $wl-G'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
fi
- # Need to ensure runtime linking is disabled for the traditional
- # shared library, or the linker may eventually find shared libraries
- # /with/ Import File - we do not want to mix them.
- shared_flag_aix='-shared'
- shared_flag_svr4='-shared $wl-G'
else
# not using gcc
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
- if test yes = "$aix_use_runtimelinking"; then
- shared_flag='$wl-G'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
else
- shared_flag='$wl-bM:SRE'
+ shared_flag='${wl}-bM:SRE'
fi
- shared_flag_aix='$wl-bM:SRE'
- shared_flag_svr4='$wl-G'
fi
fi
- export_dynamic_flag_spec_CXX='$wl-bexpall'
+ export_dynamic_flag_spec_CXX='${wl}-bexpall'
# It seems that -bexpall does not export symbols beginning with
# underscore (_), so it is better to generate a list of symbols to
# export.
always_export_symbols_CXX=yes
- if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+ if test "$aix_use_runtimelinking" = yes; then
# Warning - without using the other runtime loading flags (-brtl),
# -berok will link without error, but may produce a broken library.
- # The "-G" linker flag allows undefined symbols.
- no_undefined_flag_CXX='-bernotok'
+ allow_undefined_flag_CXX='-berok'
# Determine the default libpath from the value encoded in an empty
# executable.
- if test set = "${lt_cv_aix_libpath+set}"; then
+ if test "${lt_cv_aix_libpath+set}" = set; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath__CXX+:} false; then :
@@ -17775,7 +17379,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath__CXX"; then
- lt_cv_aix_libpath__CXX=/usr/lib:/lib
+ lt_cv_aix_libpath__CXX="/usr/lib:/lib"
fi
fi
@@ -17783,18 +17387,18 @@ fi
aix_libpath=$lt_cv_aix_libpath__CXX
fi
- hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+ archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
else
- if test ia64 = "$host_cpu"; then
- hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib'
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
allow_undefined_flag_CXX="-z nodefs"
- archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an
# empty executable.
- if test set = "${lt_cv_aix_libpath+set}"; then
+ if test "${lt_cv_aix_libpath+set}" = set; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath__CXX+:} false; then :
@@ -17837,7 +17441,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath__CXX"; then
- lt_cv_aix_libpath__CXX=/usr/lib:/lib
+ lt_cv_aix_libpath__CXX="/usr/lib:/lib"
fi
fi
@@ -17845,34 +17449,22 @@ fi
aix_libpath=$lt_cv_aix_libpath__CXX
fi
- hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
# -berok will link without error, but may produce a broken library.
- no_undefined_flag_CXX=' $wl-bernotok'
- allow_undefined_flag_CXX=' $wl-berok'
- if test yes = "$with_gnu_ld"; then
+ no_undefined_flag_CXX=' ${wl}-bernotok'
+ allow_undefined_flag_CXX=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
# We only use this code for GNU lds that support --whole-archive.
- whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
else
# Exported symbols can be pulled into shared objects from archives
whole_archive_flag_spec_CXX='$convenience'
fi
archive_cmds_need_lc_CXX=yes
- archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
- # -brtl affects multiple linker settings, -berok does not and is overridden later
- compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
- if test svr4 != "$with_aix_soname"; then
- # This is similar to how AIX traditionally builds its shared
- # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
- archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
- fi
- if test aix != "$with_aix_soname"; then
- archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
- else
- # used by -dlpreopen to get the symbols
- archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
- fi
- archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d'
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
fi
;;
@@ -17882,7 +17474,7 @@ fi
allow_undefined_flag_CXX=unsupported
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
- archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
else
ld_shlibs_CXX=no
fi
@@ -17910,58 +17502,57 @@ fi
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=.dll
+ shrext_cmds=".dll"
# FIXME: Setting linknames here is a bad hack.
- archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
- archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
- cp "$export_symbols" "$output_objdir/$soname.def";
- echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
- else
- $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
- fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
- linknames='
+ archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
enable_shared_with_static_runtimes_CXX=yes
# Don't use ranlib
old_postinstall_cmds_CXX='chmod 644 $oldlib'
postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
- lt_tool_outputfile="@TOOL_OUTPUT@"~
- case $lt_outputfile in
- *.exe|*.EXE) ;;
- *)
- lt_outputfile=$lt_outputfile.exe
- lt_tool_outputfile=$lt_tool_outputfile.exe
- ;;
- esac~
- func_to_tool_file "$lt_outputfile"~
- if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
- $RM "$lt_outputfile.manifest";
- fi'
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ func_to_tool_file "$lt_outputfile"~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
;;
*)
# g++
# _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
# as there is no search path for DLLs.
hardcode_libdir_flag_spec_CXX='-L$libdir'
- export_dynamic_flag_spec_CXX='$wl--export-all-symbols'
+ export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
allow_undefined_flag_CXX=unsupported
always_export_symbols_CXX=no
enable_shared_with_static_runtimes_CXX=yes
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file, use it as
- # is; otherwise, prepend EXPORTS...
- archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
else
ld_shlibs_CXX=no
fi
@@ -17975,27 +17566,27 @@ fi
hardcode_direct_CXX=no
hardcode_automatic_CXX=yes
hardcode_shlibpath_var_CXX=unsupported
- if test yes = "$lt_cv_ld_force_load"; then
- whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ if test "$lt_cv_ld_force_load" = "yes"; then
+ whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
else
whole_archive_flag_spec_CXX=''
fi
link_all_deplibs_CXX=yes
- allow_undefined_flag_CXX=$_lt_dar_allow_undefined
+ allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
case $cc_basename in
- ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+ ifort*) _lt_dar_can_shared=yes ;;
*) _lt_dar_can_shared=$GCC ;;
esac
- if test yes = "$_lt_dar_can_shared"; then
+ if test "$_lt_dar_can_shared" = "yes"; then
output_verbose_link_cmd=func_echo_all
- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
- module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
- archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
- module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
- if test yes != "$lt_cv_apple_cc_single_mod"; then
- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
- archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
+ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
fi
else
@@ -18004,34 +17595,6 @@ fi
;;
- os2*)
- hardcode_libdir_flag_spec_CXX='-L$libdir'
- hardcode_minus_L_CXX=yes
- allow_undefined_flag_CXX=unsupported
- shrext_cmds=.dll
- archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- prefix_cmds="$SED"~
- if test EXPORTS = "`$SED 1q $export_symbols`"; then
- prefix_cmds="$prefix_cmds -e 1d";
- fi~
- prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
- cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
- enable_shared_with_static_runtimes_CXX=yes
- ;;
-
dgux*)
case $cc_basename in
ec++*)
@@ -18067,14 +17630,14 @@ fi
;;
haiku*)
- archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
link_all_deplibs_CXX=yes
;;
hpux9*)
- hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
hardcode_libdir_separator_CXX=:
- export_dynamic_flag_spec_CXX='$wl-E'
+ export_dynamic_flag_spec_CXX='${wl}-E'
hardcode_direct_CXX=yes
hardcode_minus_L_CXX=yes # Not in the search PATH,
# but as the default
@@ -18086,7 +17649,7 @@ fi
ld_shlibs_CXX=no
;;
aCC*)
- archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
@@ -18095,11 +17658,11 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
- if test yes = "$GXX"; then
- archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ if test "$GXX" = yes; then
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
else
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
@@ -18109,15 +17672,15 @@ fi
;;
hpux10*|hpux11*)
- if test no = "$with_gnu_ld"; then
- hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
+ if test $with_gnu_ld = no; then
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
hardcode_libdir_separator_CXX=:
case $host_cpu in
hppa*64*|ia64*)
;;
*)
- export_dynamic_flag_spec_CXX='$wl-E'
+ export_dynamic_flag_spec_CXX='${wl}-E'
;;
esac
fi
@@ -18143,13 +17706,13 @@ fi
aCC*)
case $host_cpu in
hppa*64*)
- archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
ia64*)
- archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
*)
- archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
esac
# Commands to make compiler produce verbose output that lists
@@ -18160,20 +17723,20 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
- if test yes = "$GXX"; then
- if test no = "$with_gnu_ld"; then
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
case $host_cpu in
hppa*64*)
- archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
ia64*)
- archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
*)
- archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
esac
fi
@@ -18188,22 +17751,22 @@ fi
interix[3-9]*)
hardcode_direct_CXX=no
hardcode_shlibpath_var_CXX=no
- hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
- export_dynamic_flag_spec_CXX='$wl-E'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}-E'
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
# Instead, shared libraries are loaded at an image base (0x10000000 by
# default) and relocated if they conflict, which is a slow very memory
# consuming and fragmenting process. To avoid this, we pick a random,
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
irix5* | irix6*)
case $cc_basename in
CC*)
# SGI C++
- archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
# Archives containing C++ object files must be created using
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
@@ -18212,17 +17775,17 @@ fi
old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
;;
*)
- if test yes = "$GXX"; then
- if test no = "$with_gnu_ld"; then
- archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
else
- archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
fi
fi
link_all_deplibs_CXX=yes
;;
esac
- hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator_CXX=:
inherit_rpath_CXX=yes
;;
@@ -18235,8 +17798,8 @@ fi
# KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking.
- archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
@@ -18245,10 +17808,10 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
- hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
- export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
# Archives containing C++ object files must be created using
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
@@ -18262,59 +17825,59 @@ fi
# earlier do not add the objects themselves.
case `$CC -V 2>&1` in
*"Version 7."*)
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
;;
*) # Version 8.0 or newer
tmp_idyn=
case $host_cpu in
ia64*) tmp_idyn=' -i_dynamic';;
esac
- archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
;;
esac
archive_cmds_need_lc_CXX=no
- hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
- export_dynamic_flag_spec_CXX='$wl--export-dynamic'
- whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
;;
pgCC* | pgcpp*)
# Portland Group C++ compiler
case `$CC -V` in
*pgCC\ [1-5].* | *pgcpp\ [1-5].*)
prelink_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
- compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
old_archive_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
- $RANLIB $oldlib'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+ $RANLIB $oldlib'
archive_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
archive_expsym_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
;;
*) # Version 6 and above use weak symbols
- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
;;
esac
- hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir'
- export_dynamic_flag_spec_CXX='$wl--export-dynamic'
- whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
;;
cxx*)
# Compaq C++
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
runpath_var=LD_RUN_PATH
hardcode_libdir_flag_spec_CXX='-rpath $libdir'
@@ -18328,18 +17891,18 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
;;
xl* | mpixl* | bgxl*)
# IBM XL 8.0 on PPC, with GNU ld
- hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
- export_dynamic_flag_spec_CXX='$wl--export-dynamic'
- archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- if test yes = "$supports_anon_versioning"; then
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
;;
*)
@@ -18347,10 +17910,10 @@ fi
*Sun\ C*)
# Sun C++ 5.9
no_undefined_flag_CXX=' -zdefs'
- archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
hardcode_libdir_flag_spec_CXX='-R$libdir'
- whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
compiler_needs_object_CXX=yes
# Not sure whether something based on
@@ -18408,17 +17971,22 @@ fi
ld_shlibs_CXX=yes
;;
- openbsd* | bitrig*)
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ ld_shlibs_CXX=no
+ ;;
+
+ openbsd*)
if test -f /usr/libexec/ld.so; then
hardcode_direct_CXX=yes
hardcode_shlibpath_var_CXX=no
hardcode_direct_absolute_CXX=yes
archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
- export_dynamic_flag_spec_CXX='$wl-E'
- whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
fi
output_verbose_link_cmd=func_echo_all
else
@@ -18434,9 +18002,9 @@ fi
# KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking.
- archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
hardcode_libdir_separator_CXX=:
# Archives containing C++ object files must be created using
@@ -18454,17 +18022,17 @@ fi
cxx*)
case $host in
osf3*)
- allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
- archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
- hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
;;
*)
allow_undefined_flag_CXX=' -expect_unresolved \*'
- archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
- echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
- $RM $lib.exp'
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
hardcode_libdir_flag_spec_CXX='-rpath $libdir'
;;
esac
@@ -18479,21 +18047,21 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
- if test yes,no = "$GXX,$with_gnu_ld"; then
- allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
case $host in
osf3*)
- archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
;;
*)
- archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
;;
esac
- hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator_CXX=:
# Commands to make compiler produce verbose output that lists
@@ -18539,9 +18107,9 @@ fi
# Sun C++ 4.2, 5.x and Centerline C++
archive_cmds_need_lc_CXX=yes
no_undefined_flag_CXX=' -zdefs'
- archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
hardcode_libdir_flag_spec_CXX='-R$libdir'
hardcode_shlibpath_var_CXX=no
@@ -18549,7 +18117,7 @@ fi
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
# The compiler driver will combine and reorder linker options,
- # but understands '-z linker_flag'.
+ # but understands `-z linker_flag'.
# Supported since Solaris 2.6 (maybe 2.5.1?)
whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
;;
@@ -18566,30 +18134,30 @@ fi
;;
gcx*)
# Green Hills C++ Compiler
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
# The C++ compiler must be used to create the archive.
old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
;;
*)
# GNU C++ compiler with Solaris linker
- if test yes,no = "$GXX,$with_gnu_ld"; then
- no_undefined_flag_CXX=' $wl-z ${wl}defs'
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
- archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
else
- # g++ 2.7 appears to require '-G' NOT '-shared' on this
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
# platform.
- archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+ archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
@@ -18597,11 +18165,11 @@ fi
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
fi
- hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir'
+ hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+ whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
;;
esac
fi
@@ -18610,52 +18178,52 @@ fi
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag_CXX='$wl-z,text'
+ no_undefined_flag_CXX='${wl}-z,text'
archive_cmds_need_lc_CXX=no
hardcode_shlibpath_var_CXX=no
runpath_var='LD_RUN_PATH'
case $cc_basename in
CC*)
- archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
;;
sysv5* | sco3.2v5* | sco5v6*)
- # Note: We CANNOT use -z defs as we might desire, because we do not
+ # Note: We can NOT use -z defs as we might desire, because we do not
# link with -lc, and that would cause any symbols used from libc to
# always be unresolved, which means just about no library would
# ever link correctly. If we're not using GNU ld we use -z text
# though, which does catch some bad symbols but isn't as heavy-handed
# as -z defs.
- no_undefined_flag_CXX='$wl-z,text'
- allow_undefined_flag_CXX='$wl-z,nodefs'
+ no_undefined_flag_CXX='${wl}-z,text'
+ allow_undefined_flag_CXX='${wl}-z,nodefs'
archive_cmds_need_lc_CXX=no
hardcode_shlibpath_var_CXX=no
- hardcode_libdir_flag_spec_CXX='$wl-R,$libdir'
+ hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
hardcode_libdir_separator_CXX=':'
link_all_deplibs_CXX=yes
- export_dynamic_flag_spec_CXX='$wl-Bexport'
+ export_dynamic_flag_spec_CXX='${wl}-Bexport'
runpath_var='LD_RUN_PATH'
case $cc_basename in
CC*)
- archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
- '"$old_archive_cmds_CXX"
+ '"$old_archive_cmds_CXX"
reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
- '"$reload_cmds_CXX"
+ '"$reload_cmds_CXX"
;;
*)
- archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
;;
@@ -18687,10 +18255,10 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
$as_echo "$ld_shlibs_CXX" >&6; }
- test no = "$ld_shlibs_CXX" && can_build_shared=no
+ test "$ld_shlibs_CXX" = no && can_build_shared=no
- GCC_CXX=$GXX
- LD_CXX=$LD
+ GCC_CXX="$GXX"
+ LD_CXX="$LD"
## CAVEAT EMPTOR:
## There is no encapsulation within the following macros, do not change
@@ -18734,13 +18302,13 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
pre_test_object_deps_done=no
for p in `eval "$output_verbose_link_cmd"`; do
- case $prev$p in
+ case ${prev}${p} in
-L* | -R* | -l*)
# Some compilers place space between "-{L,R}" and the path.
# Remove the space.
- if test x-L = "$p" ||
- test x-R = "$p"; then
+ if test $p = "-L" ||
+ test $p = "-R"; then
prev=$p
continue
fi
@@ -18756,16 +18324,16 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
case $p in
=*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
esac
- if test no = "$pre_test_object_deps_done"; then
- case $prev in
+ if test "$pre_test_object_deps_done" = no; then
+ case ${prev} in
-L | -R)
# Internal compiler library paths should come after those
# provided the user. The postdeps already come after the
# user supplied libs so there is no need to process them.
if test -z "$compiler_lib_search_path_CXX"; then
- compiler_lib_search_path_CXX=$prev$p
+ compiler_lib_search_path_CXX="${prev}${p}"
else
- compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p"
+ compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
fi
;;
# The "-l" case would never come before the object being
@@ -18773,9 +18341,9 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
esac
else
if test -z "$postdeps_CXX"; then
- postdeps_CXX=$prev$p
+ postdeps_CXX="${prev}${p}"
else
- postdeps_CXX="${postdeps_CXX} $prev$p"
+ postdeps_CXX="${postdeps_CXX} ${prev}${p}"
fi
fi
prev=
@@ -18790,15 +18358,15 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
continue
fi
- if test no = "$pre_test_object_deps_done"; then
+ if test "$pre_test_object_deps_done" = no; then
if test -z "$predep_objects_CXX"; then
- predep_objects_CXX=$p
+ predep_objects_CXX="$p"
else
predep_objects_CXX="$predep_objects_CXX $p"
fi
else
if test -z "$postdep_objects_CXX"; then
- postdep_objects_CXX=$p
+ postdep_objects_CXX="$p"
else
postdep_objects_CXX="$postdep_objects_CXX $p"
fi
@@ -18828,6 +18396,51 @@ interix[3-9]*)
postdep_objects_CXX=
postdeps_CXX=
;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
esac
@@ -18836,7 +18449,7 @@ case " $postdeps_CXX " in
esac
compiler_lib_search_dirs_CXX=
if test -n "${compiler_lib_search_path_CXX}"; then
- compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'`
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
fi
@@ -18875,18 +18488,17 @@ lt_prog_compiler_static_CXX=
# C++ specific cases for pic, static, wl, etc.
- if test yes = "$GXX"; then
+ if test "$GXX" = yes; then
lt_prog_compiler_wl_CXX='-Wl,'
lt_prog_compiler_static_CXX='-static'
case $host_os in
aix*)
# All AIX code is PIC.
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static_CXX='-Bstatic'
fi
- lt_prog_compiler_pic_CXX='-fPIC'
;;
amigaos*)
@@ -18897,8 +18509,8 @@ lt_prog_compiler_static_CXX=
;;
m68k)
# FIXME: we need at least 68020 code to build shared libraries, but
- # adding the '-m68020' flag to GCC prevents building anything better,
- # like '-m68040'.
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
;;
esac
@@ -18913,11 +18525,6 @@ lt_prog_compiler_static_CXX=
# Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
- case $host_os in
- os2*)
- lt_prog_compiler_static_CXX='$wl-static'
- ;;
- esac
;;
darwin* | rhapsody*)
# PIC is the default on this platform
@@ -18967,7 +18574,7 @@ lt_prog_compiler_static_CXX=
case $host_os in
aix[4-9]*)
# All AIX code is PIC.
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static_CXX='-Bstatic'
else
@@ -19007,14 +18614,14 @@ lt_prog_compiler_static_CXX=
case $cc_basename in
CC*)
lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
- if test ia64 != "$host_cpu"; then
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
lt_prog_compiler_pic_CXX='+Z'
fi
;;
aCC*)
lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
case $host_cpu in
hppa*64*|ia64*)
# +Z the default
@@ -19051,7 +18658,7 @@ lt_prog_compiler_static_CXX=
lt_prog_compiler_pic_CXX='-fPIC'
;;
ecpc* )
- # old Intel C++ for x86_64, which still supported -KPIC.
+ # old Intel C++ for x86_64 which still supported -KPIC.
lt_prog_compiler_wl_CXX='-Wl,'
lt_prog_compiler_pic_CXX='-KPIC'
lt_prog_compiler_static_CXX='-static'
@@ -19107,7 +18714,7 @@ lt_prog_compiler_static_CXX=
;;
esac
;;
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
;;
*qnx* | *nto*)
# QNX uses GNU C++, but need to define -shared option too, otherwise
@@ -19196,7 +18803,7 @@ lt_prog_compiler_static_CXX=
fi
case $host_os in
- # For platforms that do not support PIC, -DPIC is meaningless:
+ # For platforms which do not support PIC, -DPIC is meaningless:
*djgpp*)
lt_prog_compiler_pic_CXX=
;;
@@ -19228,7 +18835,7 @@ else
lt_cv_prog_compiler_pic_works_CXX=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment
+ lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
@@ -19258,7 +18865,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
-if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
case $lt_prog_compiler_pic_CXX in
"" | " "*) ;;
*) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
@@ -19284,7 +18891,7 @@ if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_static_works_CXX=no
- save_LDFLAGS=$LDFLAGS
+ save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -19303,13 +18910,13 @@ else
fi
fi
$RM -r conftest*
- LDFLAGS=$save_LDFLAGS
+ LDFLAGS="$save_LDFLAGS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
-if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
:
else
lt_prog_compiler_static_CXX=
@@ -19423,8 +19030,8 @@ $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
-hard_links=nottested
-if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
$as_echo_n "checking if we can lock with hard links... " >&6; }
@@ -19436,9 +19043,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; }
ln conftest.a conftest.b 2>/dev/null && hard_links=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
$as_echo "$hard_links" >&6; }
- if test no = "$hard_links"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
+ if test "$hard_links" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
@@ -19455,21 +19062,17 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
case $host_os in
aix[4-9]*)
# If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to GNU nm, but means don't demangle to AIX nm.
- # Without the "-l" option, or with the "-B" option, AIX nm treats
- # weak defined symbols like other global defined symbols, whereas
- # GNU nm marks them as "W".
- # While the 'weak' keyword is ignored in the Export File, we need
- # it in the Import File for the 'aix-soname' feature, so we have
- # to replace the "-B" option with "-P" for AIX nm.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global defined
+ # symbols, whereas GNU nm marks them as "W".
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
;;
pw32*)
- export_symbols_cmds_CXX=$ltdll_cmds
+ export_symbols_cmds_CXX="$ltdll_cmds"
;;
cygwin* | mingw* | cegcc*)
case $cc_basename in
@@ -19482,6 +19085,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
;;
esac
;;
+ linux* | k*bsd*-gnu | gnu*)
+ link_all_deplibs_CXX=no
+ ;;
*)
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
;;
@@ -19489,7 +19095,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
$as_echo "$ld_shlibs_CXX" >&6; }
-test no = "$ld_shlibs_CXX" && can_build_shared=no
+test "$ld_shlibs_CXX" = no && can_build_shared=no
with_gnu_ld_CXX=$with_gnu_ld
@@ -19506,7 +19112,7 @@ x|xyes)
# Assume -lc should be added
archive_cmds_need_lc_CXX=yes
- if test yes,yes = "$GCC,$enable_shared"; then
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
case $archive_cmds_CXX in
*'~'*)
# FIXME: we may have to deal with multi-command sequences.
@@ -19634,7 +19240,7 @@ $as_echo_n "checking dynamic linker characteristics... " >&6; }
library_names_spec=
libname_spec='lib$name'
soname_spec=
-shrext_cmds=.so
+shrext_cmds=".so"
postinstall_cmds=
postuninstall_cmds=
finish_cmds=
@@ -19651,16 +19257,14 @@ hardcode_into_libs=no
# flags to be left without arguments
need_version=unknown
-
-
case $host_os in
aix3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
shlibpath_var=LIBPATH
# AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='$libname$release$shared_ext$major'
+ soname_spec='${libname}${release}${shared_ext}$major'
;;
aix[4-9]*)
@@ -19668,91 +19272,41 @@ aix[4-9]*)
need_lib_prefix=no
need_version=no
hardcode_into_libs=yes
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# AIX 5 supports IA64
- library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
else
# With GCC up to 2.95.x, collect2 would create an import file
# for dependence libraries. The import file would start with
- # the line '#! .'. This would cause the generated library to
- # depend on '.', always an invalid library. This was fixed in
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
# development snapshots of GCC prior to 3.0.
case $host_os in
aix4 | aix4.[01] | aix4.[01].*)
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
echo ' yes '
- echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
:
else
can_build_shared=no
fi
;;
esac
- # Using Import Files as archive members, it is possible to support
- # filename-based versioning of shared library archives on AIX. While
- # this would work for both with and without runtime linking, it will
- # prevent static linking of such archives. So we do filename-based
- # shared library versioning with .so extension only, which is used
- # when both runtime linking and shared linking is enabled.
- # Unfortunately, runtime linking may impact performance, so we do
- # not want this to be the default eventually. Also, we use the
- # versioned .so libs for executables only if there is the -brtl
- # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
- # To allow for filename-based versioning support, we need to create
- # libNAME.so.V as an archive file, containing:
- # *) an Import File, referring to the versioned filename of the
- # archive as well as the shared archive member, telling the
- # bitwidth (32 or 64) of that shared object, and providing the
- # list of exported symbols of that shared object, eventually
- # decorated with the 'weak' keyword
- # *) the shared object with the F_LOADONLY flag set, to really avoid
- # it being seen by the linker.
- # At run time we better use the real file rather than another symlink,
- # but for link time we create the symlink libNAME.so -> libNAME.so.V
-
- case $with_aix_soname,$aix_use_runtimelinking in
- # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
# soname into executable. Probably we can add versioning support to
# collect2, so additional links can be useful in future.
- aix,yes) # traditional libtool
- dynamic_linker='AIX unversionable lib.so'
+ if test "$aix_use_runtimelinking" = yes; then
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
# instead of lib<name>.a to let people know that these are not
# typical AIX shared libraries.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- ;;
- aix,no) # traditional AIX only
- dynamic_linker='AIX lib.a(lib.so.V)'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
# We preserve .a as extension for shared libraries through AIX4.2
# and later when we are not doing run time linking.
- library_names_spec='$libname$release.a $libname.a'
- soname_spec='$libname$release$shared_ext$major'
- ;;
- svr4,*) # full svr4 only
- dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
- library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
- # We do not specify a path in Import Files, so LIBPATH fires.
- shlibpath_overrides_runpath=yes
- ;;
- *,yes) # both, prefer svr4
- dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
- library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
- # unpreferred sharedlib libNAME.a needs extra handling
- postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
- postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
- # We do not specify a path in Import Files, so LIBPATH fires.
- shlibpath_overrides_runpath=yes
- ;;
- *,no) # both, prefer aix
- dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
- library_names_spec='$libname$release.a $libname.a'
- soname_spec='$libname$release$shared_ext$major'
- # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
- postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
- postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
- ;;
- esac
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
shlibpath_var=LIBPATH
fi
;;
@@ -19762,18 +19316,18 @@ amigaos*)
powerpc)
# Since July 2007 AmigaOS4 officially supports .so libraries.
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
;;
m68k)
library_names_spec='$libname.ixlibrary $libname.a'
# Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
;;
esac
;;
beos*)
- library_names_spec='$libname$shared_ext'
+ library_names_spec='${libname}${shared_ext}'
dynamic_linker="$host_os ld.so"
shlibpath_var=LIBRARY_PATH
;;
@@ -19781,8 +19335,8 @@ beos*)
bsdi[45]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -19794,7 +19348,7 @@ bsdi[45]*)
cygwin* | mingw* | pw32* | cegcc*)
version_type=windows
- shrext_cmds=.dll
+ shrext_cmds=".dll"
need_version=no
need_lib_prefix=no
@@ -19803,8 +19357,8 @@ cygwin* | mingw* | pw32* | cegcc*)
# gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname~
@@ -19820,16 +19374,16 @@ cygwin* | mingw* | pw32* | cegcc*)
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
- soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
dynamic_linker='Win32 ld.exe'
@@ -19838,8 +19392,8 @@ cygwin* | mingw* | pw32* | cegcc*)
*,cl*)
# Native MSVC
libname_spec='$name'
- soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
- library_names_spec='$libname.dll.lib'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='${libname}.dll.lib'
case $build_os in
mingw*)
@@ -19866,7 +19420,7 @@ cygwin* | mingw* | pw32* | cegcc*)
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
;;
*)
- sys_lib_search_path_spec=$LIB
+ sys_lib_search_path_spec="$LIB"
if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
# It is most probably a Windows format PATH.
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
@@ -19879,8 +19433,8 @@ cygwin* | mingw* | pw32* | cegcc*)
esac
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname'
@@ -19893,7 +19447,7 @@ cygwin* | mingw* | pw32* | cegcc*)
*)
# Assume MSVC wrapper
- library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
esac
@@ -19906,8 +19460,8 @@ darwin* | rhapsody*)
version_type=darwin
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
- soname_spec='$libname$release$major$shared_ext'
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -19919,8 +19473,8 @@ dgux*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -19938,13 +19492,12 @@ freebsd* | dragonfly*)
version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
need_version=no
need_lib_prefix=no
;;
freebsd-*)
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
esac
@@ -19974,10 +19527,10 @@ haiku*)
need_lib_prefix=no
need_version=no
dynamic_linker="$host_os runtime_loader"
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
- shlibpath_overrides_runpath=no
+ shlibpath_overrides_runpath=yes
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
hardcode_into_libs=yes
;;
@@ -19995,15 +19548,14 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.so"
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- if test 32 = "$HPUX_IA64_MODE"; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- sys_lib_dlsearch_path_spec=/usr/lib/hpux32
else
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- sys_lib_dlsearch_path_spec=/usr/lib/hpux64
fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
hppa*64*)
shrext_cmds='.sl'
@@ -20011,8 +19563,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
@@ -20021,8 +19573,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=SHLIB_PATH
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
;;
esac
# HP-UX runs *really* slowly unless shared libraries are mode 555, ...
@@ -20035,8 +19587,8 @@ interix[3-9]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -20047,7 +19599,7 @@ irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
*)
- if test yes = "$lt_cv_prog_gnu_ld"; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
version_type=linux # correct to gnu/linux during the next big refactor
else
version_type=irix
@@ -20055,8 +19607,8 @@ irix5* | irix6* | nonstopux*)
esac
need_lib_prefix=no
need_version=no
- soname_spec='$libname$release$shared_ext$major'
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
case $host_os in
irix5* | nonstopux*)
libsuff= shlibsuff=
@@ -20075,8 +19627,8 @@ irix5* | irix6* | nonstopux*)
esac
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
- sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
hardcode_into_libs=yes
;;
@@ -20085,33 +19637,13 @@ linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
-linux*android*)
- version_type=none # Android doesn't support versioned libraries.
- need_lib_prefix=no
- need_version=no
- library_names_spec='$libname$release$shared_ext'
- soname_spec='$libname$release$shared_ext'
- finish_cmds=
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- dynamic_linker='Android linker'
- # Don't embed -rpath directories since the linker doesn't support them.
- hardcode_libdir_flag_spec_CXX='-L$libdir'
- ;;
-
# This must be glibc/ELF.
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -20163,12 +19695,7 @@ fi
# before this can be enabled.
hardcode_into_libs=yes
- # Ideally, we could use ldconfig to report *all* directores which are
- # searched for libraries, however this is still not possible. Aside from not
- # being certain /sbin/ldconfig is available, command
- # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
- # even though it is searched at run-time. Try to do the best guess by
- # appending ld.so.conf contents (and includes) to the search path.
+ # Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
@@ -20183,17 +19710,29 @@ fi
dynamic_linker='GNU/Linux ld.so'
;;
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
netbsd*)
version_type=sunos
need_lib_prefix=no
need_version=no
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='NetBSD (a.out) ld.so'
else
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
dynamic_linker='NetBSD ld.elf_so'
fi
shlibpath_var=LD_LIBRARY_PATH
@@ -20203,7 +19742,7 @@ netbsd*)
newsos6)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
;;
@@ -20212,68 +19751,58 @@ newsos6)
version_type=qnx
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='ldqnx.so'
;;
-openbsd* | bitrig*)
+openbsd*)
version_type=sunos
- sys_lib_dlsearch_path_spec=/usr/lib
+ sys_lib_dlsearch_path_spec="/usr/lib"
need_lib_prefix=no
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
- need_version=no
- else
- need_version=yes
- fi
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
;;
os2*)
libname_spec='$name'
- version_type=windows
- shrext_cmds=.dll
- need_version=no
+ shrext_cmds=".dll"
need_lib_prefix=no
- # OS/2 can only load a DLL with a base name of 8 characters or less.
- soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
- v=$($ECHO $release$versuffix | tr -d .-);
- n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
- $ECHO $n$v`$shared_ext'
- library_names_spec='${libname}_dll.$libext'
+ library_names_spec='$libname${shared_ext} $libname.a'
dynamic_linker='OS/2 ld.exe'
- shlibpath_var=BEGINLIBPATH
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
+ shlibpath_var=LIBPATH
;;
osf3* | osf4* | osf5*)
version_type=osf
need_lib_prefix=no
need_version=no
- soname_spec='$libname$release$shared_ext$major'
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
rdos*)
@@ -20284,8 +19813,8 @@ solaris*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
@@ -20295,11 +19824,11 @@ solaris*)
sunos4*)
version_type=sunos
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
- if test yes = "$with_gnu_ld"; then
+ if test "$with_gnu_ld" = yes; then
need_lib_prefix=no
fi
need_version=yes
@@ -20307,8 +19836,8 @@ sunos4*)
sysv4 | sysv4.3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
case $host_vendor in
sni)
@@ -20329,24 +19858,24 @@ sysv4 | sysv4.3*)
;;
sysv4*MP*)
- if test -d /usr/nec; then
+ if test -d /usr/nec ;then
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
- soname_spec='$libname$shared_ext.$major'
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
shlibpath_var=LD_LIBRARY_PATH
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=sco
+ version_type=freebsd-elf
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
- if test yes = "$with_gnu_ld"; then
+ if test "$with_gnu_ld" = yes; then
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
else
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -20364,7 +19893,7 @@ tpf*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
@@ -20372,8 +19901,8 @@ tpf*)
uts4*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -20383,32 +19912,20 @@ uts4*)
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
$as_echo "$dynamic_linker" >&6; }
-test no = "$dynamic_linker" && can_build_shared=no
+test "$dynamic_linker" = no && can_build_shared=no
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
- sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
fi
-
-if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
- sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
fi
-# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
-configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
-
-# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
-func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
-
-# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
-configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
-
-
-
@@ -20451,15 +19968,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
hardcode_action_CXX=
if test -n "$hardcode_libdir_flag_spec_CXX" ||
test -n "$runpath_var_CXX" ||
- test yes = "$hardcode_automatic_CXX"; then
+ test "X$hardcode_automatic_CXX" = "Xyes" ; then
# We can hardcode non-existent directories.
- if test no != "$hardcode_direct_CXX" &&
+ if test "$hardcode_direct_CXX" != no &&
# If the only mechanism to avoid hardcoding is shlibpath_var, we
# have to relink, otherwise we might link with an installed library
# when we should be linking with a yet-to-be-installed one
- ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" &&
- test no != "$hardcode_minus_L_CXX"; then
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+ test "$hardcode_minus_L_CXX" != no; then
# Linking always hardcodes the temporary library directory.
hardcode_action_CXX=relink
else
@@ -20474,12 +19991,12 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
$as_echo "$hardcode_action_CXX" >&6; }
-if test relink = "$hardcode_action_CXX" ||
- test yes = "$inherit_rpath_CXX"; then
+if test "$hardcode_action_CXX" = relink ||
+ test "$inherit_rpath_CXX" = yes; then
# Fast installation is not supported
enable_fast_install=no
-elif test yes = "$shlibpath_overrides_runpath" ||
- test no = "$enable_shared"; then
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
# Fast installation is not necessary
enable_fast_install=needless
fi
@@ -20502,7 +20019,7 @@ fi
lt_cv_path_LD=$lt_save_path_LD
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test yes != "$_lt_caught_CXX_error"
+fi # test "$_lt_caught_CXX_error" != yes
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -20520,7 +20037,7 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest
ac_compiler_gnu=$ac_cv_fc_compiler_gnu
-if test -z "$FC" || test no = "$FC"; then
+if test -z "$FC" || test "X$FC" = "Xno"; then
_lt_disable_FC=yes
fi
@@ -20557,7 +20074,7 @@ objext_FC=$objext
# the FC compiler isn't working. Some variables (like enable_shared)
# are currently assumed to apply to all compilers on this platform,
# and will be corrupted by setting them based on a non-working compiler.
-if test yes != "$_lt_disable_FC"; then
+if test "$_lt_disable_FC" != yes; then
# Code to be used in simple compile tests
lt_simple_compile_test_code="\
subroutine t
@@ -20603,7 +20120,7 @@ $RM -r conftest*
# Allow CC to be a program name with arguments.
- lt_save_CC=$CC
+ lt_save_CC="$CC"
lt_save_GCC=$GCC
lt_save_CFLAGS=$CFLAGS
CC=${FC-"f95"}
@@ -20612,8 +20129,15 @@ $RM -r conftest*
GCC=$ac_cv_fc_compiler_gnu
compiler_FC=$CC
- func_cc_basename $compiler
-cc_basename=$func_cc_basename_result
+ for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
if test -n "$compiler"; then
@@ -20624,25 +20148,21 @@ $as_echo "$can_build_shared" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
$as_echo_n "checking whether to build shared libraries... " >&6; }
- test no = "$can_build_shared" && enable_shared=no
+ test "$can_build_shared" = "no" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
# are all built from PIC.
case $host_os in
aix3*)
- test yes = "$enable_shared" && enable_static=no
+ test "$enable_shared" = yes && enable_static=no
if test -n "$RANLIB"; then
archive_cmds="$archive_cmds~\$RANLIB \$lib"
postinstall_cmds='$RANLIB $lib'
fi
;;
aix[4-9]*)
- if test ia64 != "$host_cpu"; then
- case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
- yes,aix,yes) ;; # shared object as lib.so file only
- yes,svr4,*) ;; # shared object as lib.so archive member only
- yes,*) enable_static=no ;; # shared object in lib.a archive as well
- esac
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
fi
;;
esac
@@ -20652,12 +20172,12 @@ $as_echo "$enable_shared" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
$as_echo_n "checking whether to build static libraries... " >&6; }
# Make sure either enable_shared or enable_static is yes.
- test yes = "$enable_shared" || enable_static=yes
+ test "$enable_shared" = yes || enable_static=yes
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
$as_echo "$enable_static" >&6; }
- GCC_FC=$ac_cv_fc_compiler_gnu
- LD_FC=$LD
+ GCC_FC="$ac_cv_fc_compiler_gnu"
+ LD_FC="$LD"
## CAVEAT EMPTOR:
## There is no encapsulation within the following macros, do not change
@@ -20700,13 +20220,13 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
pre_test_object_deps_done=no
for p in `eval "$output_verbose_link_cmd"`; do
- case $prev$p in
+ case ${prev}${p} in
-L* | -R* | -l*)
# Some compilers place space between "-{L,R}" and the path.
# Remove the space.
- if test x-L = "$p" ||
- test x-R = "$p"; then
+ if test $p = "-L" ||
+ test $p = "-R"; then
prev=$p
continue
fi
@@ -20722,16 +20242,16 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
case $p in
=*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
esac
- if test no = "$pre_test_object_deps_done"; then
- case $prev in
+ if test "$pre_test_object_deps_done" = no; then
+ case ${prev} in
-L | -R)
# Internal compiler library paths should come after those
# provided the user. The postdeps already come after the
# user supplied libs so there is no need to process them.
if test -z "$compiler_lib_search_path_FC"; then
- compiler_lib_search_path_FC=$prev$p
+ compiler_lib_search_path_FC="${prev}${p}"
else
- compiler_lib_search_path_FC="${compiler_lib_search_path_FC} $prev$p"
+ compiler_lib_search_path_FC="${compiler_lib_search_path_FC} ${prev}${p}"
fi
;;
# The "-l" case would never come before the object being
@@ -20739,9 +20259,9 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
esac
else
if test -z "$postdeps_FC"; then
- postdeps_FC=$prev$p
+ postdeps_FC="${prev}${p}"
else
- postdeps_FC="${postdeps_FC} $prev$p"
+ postdeps_FC="${postdeps_FC} ${prev}${p}"
fi
fi
prev=
@@ -20756,15 +20276,15 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
continue
fi
- if test no = "$pre_test_object_deps_done"; then
+ if test "$pre_test_object_deps_done" = no; then
if test -z "$predep_objects_FC"; then
- predep_objects_FC=$p
+ predep_objects_FC="$p"
else
predep_objects_FC="$predep_objects_FC $p"
fi
else
if test -z "$postdep_objects_FC"; then
- postdep_objects_FC=$p
+ postdep_objects_FC="$p"
else
postdep_objects_FC="$postdep_objects_FC $p"
fi
@@ -20793,7 +20313,7 @@ case " $postdeps_FC " in
esac
compiler_lib_search_dirs_FC=
if test -n "${compiler_lib_search_path_FC}"; then
- compiler_lib_search_dirs_FC=`echo " ${compiler_lib_search_path_FC}" | $SED -e 's! -L! !g' -e 's!^ !!'`
+ compiler_lib_search_dirs_FC=`echo " ${compiler_lib_search_path_FC}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
fi
@@ -20813,18 +20333,17 @@ lt_prog_compiler_pic_FC=
lt_prog_compiler_static_FC=
- if test yes = "$GCC"; then
+ if test "$GCC" = yes; then
lt_prog_compiler_wl_FC='-Wl,'
lt_prog_compiler_static_FC='-static'
case $host_os in
aix*)
# All AIX code is PIC.
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static_FC='-Bstatic'
fi
- lt_prog_compiler_pic_FC='-fPIC'
;;
amigaos*)
@@ -20835,8 +20354,8 @@ lt_prog_compiler_static_FC=
;;
m68k)
# FIXME: we need at least 68020 code to build shared libraries, but
- # adding the '-m68020' flag to GCC prevents building anything better,
- # like '-m68040'.
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
lt_prog_compiler_pic_FC='-m68020 -resident32 -malways-restore-a4'
;;
esac
@@ -20852,11 +20371,6 @@ lt_prog_compiler_static_FC=
# Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
lt_prog_compiler_pic_FC='-DDLL_EXPORT'
- case $host_os in
- os2*)
- lt_prog_compiler_static_FC='$wl-static'
- ;;
- esac
;;
darwin* | rhapsody*)
@@ -20927,7 +20441,7 @@ lt_prog_compiler_static_FC=
case $host_os in
aix*)
lt_prog_compiler_wl_FC='-Wl,'
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static_FC='-Bstatic'
else
@@ -20935,29 +20449,10 @@ lt_prog_compiler_static_FC=
fi
;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_prog_compiler_pic_FC='-fno-common'
- case $cc_basename in
- nagfor*)
- # NAG Fortran compiler
- lt_prog_compiler_wl_FC='-Wl,-Wl,,'
- lt_prog_compiler_pic_FC='-PIC'
- lt_prog_compiler_static_FC='-Bstatic'
- ;;
- esac
- ;;
-
mingw* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic_FC='-DDLL_EXPORT'
- case $host_os in
- os2*)
- lt_prog_compiler_static_FC='$wl-static'
- ;;
- esac
;;
hpux9* | hpux10* | hpux11*)
@@ -20973,7 +20468,7 @@ lt_prog_compiler_static_FC=
;;
esac
# Is there a better lt_prog_compiler_static that works with the bundled CC?
- lt_prog_compiler_static_FC='$wl-a ${wl}archive'
+ lt_prog_compiler_static_FC='${wl}-a ${wl}archive'
;;
irix5* | irix6* | nonstopux*)
@@ -20984,7 +20479,7 @@ lt_prog_compiler_static_FC=
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
- # old Intel for x86_64, which still supported -KPIC.
+ # old Intel for x86_64 which still supported -KPIC.
ecc*)
lt_prog_compiler_wl_FC='-Wl,'
lt_prog_compiler_pic_FC='-KPIC'
@@ -21009,12 +20504,6 @@ lt_prog_compiler_static_FC=
lt_prog_compiler_pic_FC='-PIC'
lt_prog_compiler_static_FC='-Bstatic'
;;
- tcc*)
- # Fabrice Bellard et al's Tiny C Compiler
- lt_prog_compiler_wl_FC='-Wl,'
- lt_prog_compiler_pic_FC='-fPIC'
- lt_prog_compiler_static_FC='-static'
- ;;
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
@@ -21112,7 +20601,7 @@ lt_prog_compiler_static_FC=
;;
sysv4*MP*)
- if test -d /usr/nec; then
+ if test -d /usr/nec ;then
lt_prog_compiler_pic_FC='-Kconform_pic'
lt_prog_compiler_static_FC='-Bstatic'
fi
@@ -21141,7 +20630,7 @@ lt_prog_compiler_static_FC=
fi
case $host_os in
- # For platforms that do not support PIC, -DPIC is meaningless:
+ # For platforms which do not support PIC, -DPIC is meaningless:
*djgpp*)
lt_prog_compiler_pic_FC=
;;
@@ -21173,7 +20662,7 @@ else
lt_cv_prog_compiler_pic_works_FC=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic_FC" ## exclude from sc_useless_quotes_in_assignment
+ lt_compiler_flag="$lt_prog_compiler_pic_FC"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
@@ -21203,7 +20692,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_FC" >&5
$as_echo "$lt_cv_prog_compiler_pic_works_FC" >&6; }
-if test yes = "$lt_cv_prog_compiler_pic_works_FC"; then
+if test x"$lt_cv_prog_compiler_pic_works_FC" = xyes; then
case $lt_prog_compiler_pic_FC in
"" | " "*) ;;
*) lt_prog_compiler_pic_FC=" $lt_prog_compiler_pic_FC" ;;
@@ -21229,7 +20718,7 @@ if ${lt_cv_prog_compiler_static_works_FC+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_static_works_FC=no
- save_LDFLAGS=$LDFLAGS
+ save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -21248,13 +20737,13 @@ else
fi
fi
$RM -r conftest*
- LDFLAGS=$save_LDFLAGS
+ LDFLAGS="$save_LDFLAGS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_FC" >&5
$as_echo "$lt_cv_prog_compiler_static_works_FC" >&6; }
-if test yes = "$lt_cv_prog_compiler_static_works_FC"; then
+if test x"$lt_cv_prog_compiler_static_works_FC" = xyes; then
:
else
lt_prog_compiler_static_FC=
@@ -21368,8 +20857,8 @@ $as_echo "$lt_cv_prog_compiler_c_o_FC" >&6; }
-hard_links=nottested
-if test no = "$lt_cv_prog_compiler_c_o_FC" && test no != "$need_locks"; then
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_FC" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
$as_echo_n "checking if we can lock with hard links... " >&6; }
@@ -21381,9 +20870,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; }
ln conftest.a conftest.b 2>/dev/null && hard_links=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
$as_echo "$hard_links" >&6; }
- if test no = "$hard_links"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
+ if test "$hard_links" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
@@ -21423,9 +20912,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# included in the symbol list
include_expsyms_FC=
# exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ' (' and ')$', so one must not match beginning or
- # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
- # as well as any symbol that contains 'd'.
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
exclude_expsyms_FC='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
# platforms (ab)use it in PIC code, but their linkers get confused if
@@ -21440,7 +20929,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
- if test yes != "$GCC"; then
+ if test "$GCC" != yes; then
with_gnu_ld=no
fi
;;
@@ -21448,9 +20937,12 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes
;;
- openbsd* | bitrig*)
+ openbsd*)
with_gnu_ld=no
;;
+ linux* | k*bsd*-gnu | gnu*)
+ link_all_deplibs_FC=no
+ ;;
esac
ld_shlibs_FC=yes
@@ -21458,7 +20950,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# On some targets, GNU ld is compatible enough with the native linker
# that we're better off using the native interface for both.
lt_use_gnu_ld_interface=no
- if test yes = "$with_gnu_ld"; then
+ if test "$with_gnu_ld" = yes; then
case $host_os in
aix*)
# The AIX port of GNU ld has always aspired to compatibility
@@ -21480,24 +20972,24 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
esac
fi
- if test yes = "$lt_use_gnu_ld_interface"; then
+ if test "$lt_use_gnu_ld_interface" = yes; then
# If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='$wl'
+ wlarc='${wl}'
# Set some defaults for GNU ld with shared library support. These
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir'
- export_dynamic_flag_spec_FC='$wl--export-dynamic'
+ hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec_FC='${wl}--export-dynamic'
# ancient GNU ld didn't support --whole-archive et. al.
if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec_FC=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ whole_archive_flag_spec_FC="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
else
whole_archive_flag_spec_FC=
fi
supports_anon_versioning=no
- case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
+ case `$LD -v 2>&1` in
*GNU\ gold*) supports_anon_versioning=yes ;;
*\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -21510,7 +21002,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
case $host_os in
aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
- if test ia64 != "$host_cpu"; then
+ if test "$host_cpu" != ia64; then
ld_shlibs_FC=no
cat <<_LT_EOF 1>&2
@@ -21529,7 +21021,7 @@ _LT_EOF
case $host_cpu in
powerpc)
# see comment about AmigaOS4 .so support
- archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds_FC=''
;;
m68k)
@@ -21545,7 +21037,7 @@ _LT_EOF
allow_undefined_flag_FC=unsupported
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
- archive_cmds_FC='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_cmds_FC='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
else
ld_shlibs_FC=no
fi
@@ -21555,7 +21047,7 @@ _LT_EOF
# _LT_TAGVAR(hardcode_libdir_flag_spec, FC) is actually meaningless,
# as there is no search path for DLLs.
hardcode_libdir_flag_spec_FC='-L$libdir'
- export_dynamic_flag_spec_FC='$wl--export-all-symbols'
+ export_dynamic_flag_spec_FC='${wl}--export-all-symbols'
allow_undefined_flag_FC=unsupported
always_export_symbols_FC=no
enable_shared_with_static_runtimes_FC=yes
@@ -21563,89 +21055,61 @@ _LT_EOF
exclude_expsyms_FC='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file, use it as
- # is; otherwise, prepend EXPORTS...
- archive_expsym_cmds_FC='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds_FC='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
else
ld_shlibs_FC=no
fi
;;
haiku*)
- archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
link_all_deplibs_FC=yes
;;
- os2*)
- hardcode_libdir_flag_spec_FC='-L$libdir'
- hardcode_minus_L_FC=yes
- allow_undefined_flag_FC=unsupported
- shrext_cmds=.dll
- archive_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- archive_expsym_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- prefix_cmds="$SED"~
- if test EXPORTS = "`$SED 1q $export_symbols`"; then
- prefix_cmds="$prefix_cmds -e 1d";
- fi~
- prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
- cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- old_archive_From_new_cmds_FC='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
- enable_shared_with_static_runtimes_FC=yes
- ;;
-
interix[3-9]*)
hardcode_direct_FC=no
hardcode_shlibpath_var_FC=no
- hardcode_libdir_flag_spec_FC='$wl-rpath,$libdir'
- export_dynamic_flag_spec_FC='$wl-E'
+ hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_FC='${wl}-E'
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
# Instead, shared libraries are loaded at an image base (0x10000000 by
# default) and relocated if they conflict, which is a slow very memory
# consuming and fragmenting process. To avoid this, we pick a random,
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds_FC='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds_FC='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
- if test linux-dietlibc = "$host_os"; then
+ if test "$host_os" = linux-dietlibc; then
case $cc_basename in
diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
esac
fi
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test no = "$tmp_diet"
+ && test "$tmp_diet" = no
then
tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
- whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
tmp_addflag=' $pic_flag'
;;
pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group f77 and f90 compilers
- whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
tmp_addflag=' $pic_flag -Mnomain' ;;
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
tmp_addflag=' -i_dynamic' ;;
@@ -21656,47 +21120,42 @@ _LT_EOF
lf95*) # Lahey Fortran 8.1
whole_archive_flag_spec_FC=
tmp_sharedflag='--shared' ;;
- nagfor*) # NAGFOR 5.3
- tmp_sharedflag='-Wl,-shared' ;;
xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
tmp_sharedflag='-qmkshrobj'
tmp_addflag= ;;
nvcc*) # Cuda Compiler Driver 2.2
- whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
compiler_needs_object_FC=yes
;;
esac
case `$CC -V 2>&1 | sed 5q` in
*Sun\ C*) # Sun C 5.9
- whole_archive_flag_spec_FC='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ whole_archive_flag_spec_FC='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
compiler_needs_object_FC=yes
tmp_sharedflag='-G' ;;
*Sun\ F*) # Sun Fortran 8.3
tmp_sharedflag='-G' ;;
esac
- archive_cmds_FC='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_cmds_FC='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- if test yes = "$supports_anon_versioning"; then
+ if test "x$supports_anon_versioning" = xyes; then
archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
case $cc_basename in
- tcc*)
- export_dynamic_flag_spec_FC='-rdynamic'
- ;;
xlf* | bgf* | bgxlf* | mpixlf*)
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
whole_archive_flag_spec_FC='--whole-archive$convenience --no-whole-archive'
- hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir'
+ hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
archive_cmds_FC='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
- if test yes = "$supports_anon_versioning"; then
+ if test "x$supports_anon_versioning" = xyes; then
archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
fi
;;
esac
@@ -21705,13 +21164,13 @@ _LT_EOF
fi
;;
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
archive_cmds_FC='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
- archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
fi
;;
@@ -21729,8 +21188,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs_FC=no
fi
@@ -21742,7 +21201,7 @@ _LT_EOF
ld_shlibs_FC=no
cat <<_LT_EOF 1>&2
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
*** reliably create shared libraries on SCO systems. Therefore, libtool
*** is disabling shared libraries support. We urge you to upgrade GNU
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
@@ -21757,9 +21216,9 @@ _LT_EOF
# DT_RUNPATH tag from executables and libraries. But doing so
# requires that you compile everything twice, which is a pain.
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir'
- archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
+ archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs_FC=no
fi
@@ -21776,15 +21235,15 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs_FC=no
fi
;;
esac
- if test no = "$ld_shlibs_FC"; then
+ if test "$ld_shlibs_FC" = no; then
runpath_var=
hardcode_libdir_flag_spec_FC=
export_dynamic_flag_spec_FC=
@@ -21800,7 +21259,7 @@ _LT_EOF
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L_FC=yes
- if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct_FC=unsupported
@@ -21808,57 +21267,34 @@ _LT_EOF
;;
aix[4-9]*)
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
- no_entry_flag=
+ no_entry_flag=""
else
# If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to GNU nm, but means don't demangle to AIX nm.
- # Without the "-l" option, or with the "-B" option, AIX nm treats
- # weak defined symbols like other global defined symbols, whereas
- # GNU nm marks them as "W".
- # While the 'weak' keyword is ignored in the Export File, we need
- # it in the Import File for the 'aix-soname' feature, so we have
- # to replace the "-B" option with "-P" for AIX nm.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global
+ # defined symbols, whereas GNU nm marks them as "W".
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds_FC='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds_FC='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds_FC='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds_FC='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # have runtime linking enabled, and use it for executables.
- # For shared libraries, we enable/disable runtime linking
- # depending on the kind of the shared library created -
- # when "with_aix_soname,aix_use_runtimelinking" is:
- # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
- # "aix,yes" lib.so shared, rtl:yes, for executables
- # lib.a static archive
- # "both,no" lib.so.V(shr.o) shared, rtl:yes
- # lib.a(lib.so.V) shared, rtl:no, for executables
- # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
- # lib.a(lib.so.V) shared, rtl:no
- # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
- # lib.a static archive
+ # need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
- if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
break
fi
done
- if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
- # With aix-soname=svr4, we create the lib.so.V shared archives only,
- # so we don't have lib.a shared libs to link our executables.
- # We have to force runtime linking in this case.
- aix_use_runtimelinking=yes
- LDFLAGS="$LDFLAGS -Wl,-brtl"
- fi
;;
esac
@@ -21877,21 +21313,13 @@ _LT_EOF
hardcode_direct_absolute_FC=yes
hardcode_libdir_separator_FC=':'
link_all_deplibs_FC=yes
- file_list_spec_FC='$wl-f,'
- case $with_aix_soname,$aix_use_runtimelinking in
- aix,*) ;; # traditional, no import file
- svr4,* | *,yes) # use import file
- # The Import File defines what to hardcode.
- hardcode_direct_FC=no
- hardcode_direct_absolute_FC=no
- ;;
- esac
+ file_list_spec_FC='${wl}-f,'
- if test yes = "$GCC"; then
+ if test "$GCC" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
- collect2name=`$CC -print-prog-name=collect2`
+ collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" &&
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
then
@@ -21910,42 +21338,36 @@ _LT_EOF
;;
esac
shared_flag='-shared'
- if test yes = "$aix_use_runtimelinking"; then
- shared_flag="$shared_flag "'$wl-G'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
fi
- # Need to ensure runtime linking is disabled for the traditional
- # shared library, or the linker may eventually find shared libraries
- # /with/ Import File - we do not want to mix them.
- shared_flag_aix='-shared'
- shared_flag_svr4='-shared $wl-G'
+ link_all_deplibs_FC=no
else
# not using gcc
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
- if test yes = "$aix_use_runtimelinking"; then
- shared_flag='$wl-G'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
else
- shared_flag='$wl-bM:SRE'
+ shared_flag='${wl}-bM:SRE'
fi
- shared_flag_aix='$wl-bM:SRE'
- shared_flag_svr4='$wl-G'
fi
fi
- export_dynamic_flag_spec_FC='$wl-bexpall'
+ export_dynamic_flag_spec_FC='${wl}-bexpall'
# It seems that -bexpall does not export symbols beginning with
# underscore (_), so it is better to generate a list of symbols to export.
always_export_symbols_FC=yes
- if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+ if test "$aix_use_runtimelinking" = yes; then
# Warning - without using the other runtime loading flags (-brtl),
# -berok will link without error, but may produce a broken library.
allow_undefined_flag_FC='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
- if test set = "${lt_cv_aix_libpath+set}"; then
+ if test "${lt_cv_aix_libpath+set}" = set; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath__FC+:} false; then :
@@ -21974,7 +21396,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath__FC"; then
- lt_cv_aix_libpath__FC=/usr/lib:/lib
+ lt_cv_aix_libpath__FC="/usr/lib:/lib"
fi
fi
@@ -21982,17 +21404,17 @@ fi
aix_libpath=$lt_cv_aix_libpath__FC
fi
- hardcode_libdir_flag_spec_FC='$wl-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds_FC='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+ hardcode_libdir_flag_spec_FC='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds_FC='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
else
- if test ia64 = "$host_cpu"; then
- hardcode_libdir_flag_spec_FC='$wl-R $libdir:/usr/lib:/lib'
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec_FC='${wl}-R $libdir:/usr/lib:/lib'
allow_undefined_flag_FC="-z nodefs"
- archive_expsym_cmds_FC="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+ archive_expsym_cmds_FC="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an
# empty executable.
- if test set = "${lt_cv_aix_libpath+set}"; then
+ if test "${lt_cv_aix_libpath+set}" = set; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath__FC+:} false; then :
@@ -22021,7 +21443,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath__FC"; then
- lt_cv_aix_libpath__FC=/usr/lib:/lib
+ lt_cv_aix_libpath__FC="/usr/lib:/lib"
fi
fi
@@ -22029,33 +21451,21 @@ fi
aix_libpath=$lt_cv_aix_libpath__FC
fi
- hardcode_libdir_flag_spec_FC='$wl-blibpath:$libdir:'"$aix_libpath"
+ hardcode_libdir_flag_spec_FC='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
# -berok will link without error, but may produce a broken library.
- no_undefined_flag_FC=' $wl-bernotok'
- allow_undefined_flag_FC=' $wl-berok'
- if test yes = "$with_gnu_ld"; then
+ no_undefined_flag_FC=' ${wl}-bernotok'
+ allow_undefined_flag_FC=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
# We only use this code for GNU lds that support --whole-archive.
- whole_archive_flag_spec_FC='$wl--whole-archive$convenience $wl--no-whole-archive'
+ whole_archive_flag_spec_FC='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
else
# Exported symbols can be pulled into shared objects from archives
whole_archive_flag_spec_FC='$convenience'
fi
archive_cmds_need_lc_FC=yes
- archive_expsym_cmds_FC='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
- # -brtl affects multiple linker settings, -berok does not and is overridden later
- compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
- if test svr4 != "$with_aix_soname"; then
- # This is similar to how AIX traditionally builds its shared libraries.
- archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
- fi
- if test aix != "$with_aix_soname"; then
- archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
- else
- # used by -dlpreopen to get the symbols
- archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
- fi
- archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$RM -r $output_objdir/$realname.d'
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds_FC="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
fi
;;
@@ -22064,7 +21474,7 @@ fi
case $host_cpu in
powerpc)
# see comment about AmigaOS4 .so support
- archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds_FC=''
;;
m68k)
@@ -22094,17 +21504,16 @@ fi
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=.dll
+ shrext_cmds=".dll"
# FIXME: Setting linknames here is a bad hack.
- archive_cmds_FC='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
- archive_expsym_cmds_FC='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
- cp "$export_symbols" "$output_objdir/$soname.def";
- echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
- else
- $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
- fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
- linknames='
+ archive_cmds_FC='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ archive_expsym_cmds_FC='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, FC)='true'
enable_shared_with_static_runtimes_FC=yes
@@ -22113,18 +21522,18 @@ fi
# Don't use ranlib
old_postinstall_cmds_FC='chmod 644 $oldlib'
postlink_cmds_FC='lt_outputfile="@OUTPUT@"~
- lt_tool_outputfile="@TOOL_OUTPUT@"~
- case $lt_outputfile in
- *.exe|*.EXE) ;;
- *)
- lt_outputfile=$lt_outputfile.exe
- lt_tool_outputfile=$lt_tool_outputfile.exe
- ;;
- esac~
- if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
- $RM "$lt_outputfile.manifest";
- fi'
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
;;
*)
# Assume MSVC wrapper
@@ -22133,7 +21542,7 @@ fi
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=.dll
+ shrext_cmds=".dll"
# FIXME: Setting linknames here is a bad hack.
archive_cmds_FC='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
# The linker will automatically build a .lib file if we build a DLL.
@@ -22152,24 +21561,24 @@ fi
hardcode_direct_FC=no
hardcode_automatic_FC=yes
hardcode_shlibpath_var_FC=unsupported
- if test yes = "$lt_cv_ld_force_load"; then
- whole_archive_flag_spec_FC='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ if test "$lt_cv_ld_force_load" = "yes"; then
+ whole_archive_flag_spec_FC='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
compiler_needs_object_FC=yes
else
whole_archive_flag_spec_FC=''
fi
link_all_deplibs_FC=yes
- allow_undefined_flag_FC=$_lt_dar_allow_undefined
+ allow_undefined_flag_FC="$_lt_dar_allow_undefined"
case $cc_basename in
- ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+ ifort*) _lt_dar_can_shared=yes ;;
*) _lt_dar_can_shared=$GCC ;;
esac
- if test yes = "$_lt_dar_can_shared"; then
+ if test "$_lt_dar_can_shared" = "yes"; then
output_verbose_link_cmd=func_echo_all
- archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
- module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
- archive_expsym_cmds_FC="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
- module_expsym_cmds_FC="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+ archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds_FC="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
else
ld_shlibs_FC=no
@@ -22211,33 +21620,33 @@ fi
;;
hpux9*)
- if test yes = "$GCC"; then
- archive_cmds_FC='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ if test "$GCC" = yes; then
+ archive_cmds_FC='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
else
- archive_cmds_FC='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ archive_cmds_FC='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
- hardcode_libdir_flag_spec_FC='$wl+b $wl$libdir'
+ hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir'
hardcode_libdir_separator_FC=:
hardcode_direct_FC=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L_FC=yes
- export_dynamic_flag_spec_FC='$wl-E'
+ export_dynamic_flag_spec_FC='${wl}-E'
;;
hpux10*)
- if test yes,no = "$GCC,$with_gnu_ld"; then
- archive_cmds_FC='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ archive_cmds_FC='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds_FC='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
- if test no = "$with_gnu_ld"; then
- hardcode_libdir_flag_spec_FC='$wl+b $wl$libdir'
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir'
hardcode_libdir_separator_FC=:
hardcode_direct_FC=yes
hardcode_direct_absolute_FC=yes
- export_dynamic_flag_spec_FC='$wl-E'
+ export_dynamic_flag_spec_FC='${wl}-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L_FC=yes
@@ -22245,33 +21654,33 @@ fi
;;
hpux11*)
- if test yes,no = "$GCC,$with_gnu_ld"; then
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
case $host_cpu in
hppa*64*)
- archive_cmds_FC='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_FC='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- archive_cmds_FC='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_FC='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- archive_cmds_FC='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_FC='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
else
case $host_cpu in
hppa*64*)
- archive_cmds_FC='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- archive_cmds_FC='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- archive_cmds_FC='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
fi
- if test no = "$with_gnu_ld"; then
- hardcode_libdir_flag_spec_FC='$wl+b $wl$libdir'
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir'
hardcode_libdir_separator_FC=:
case $host_cpu in
@@ -22282,7 +21691,7 @@ fi
*)
hardcode_direct_FC=yes
hardcode_direct_absolute_FC=yes
- export_dynamic_flag_spec_FC='$wl-E'
+ export_dynamic_flag_spec_FC='${wl}-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
@@ -22293,8 +21702,8 @@ fi
;;
irix5* | irix6* | nonstopux*)
- if test yes = "$GCC"; then
- archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ if test "$GCC" = yes; then
+ archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
# Try to use the -exported_symbol ld option, if it does not
# work, assume that -exports_file does not work either and
# implicitly export all symbols.
@@ -22304,8 +21713,8 @@ $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >
if ${lt_cv_irix_exported_symbol+:} false; then :
$as_echo_n "(cached) " >&6
else
- save_LDFLAGS=$LDFLAGS
- LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
cat > conftest.$ac_ext <<_ACEOF
subroutine foo
@@ -22318,35 +21727,25 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$save_LDFLAGS
+ LDFLAGS="$save_LDFLAGS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
$as_echo "$lt_cv_irix_exported_symbol" >&6; }
- if test yes = "$lt_cv_irix_exported_symbol"; then
- archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+ if test "$lt_cv_irix_exported_symbol" = yes; then
+ archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
fi
else
- archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
- archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
+ archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
fi
archive_cmds_need_lc_FC='no'
- hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir'
+ hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator_FC=:
inherit_rpath_FC=yes
link_all_deplibs_FC=yes
;;
- linux*)
- case $cc_basename in
- tcc*)
- # Fabrice Bellard et al's Tiny C Compiler
- ld_shlibs_FC=yes
- archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
@@ -22360,7 +21759,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
newsos6)
archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct_FC=yes
- hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir'
+ hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator_FC=:
hardcode_shlibpath_var_FC=no
;;
@@ -22368,19 +21767,27 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
*nto* | *qnx*)
;;
- openbsd* | bitrig*)
+ openbsd*)
if test -f /usr/libexec/ld.so; then
hardcode_direct_FC=yes
hardcode_shlibpath_var_FC=no
hardcode_direct_absolute_FC=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec_FC='$wl-rpath,$libdir'
- export_dynamic_flag_spec_FC='$wl-E'
+ archive_expsym_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_FC='${wl}-E'
else
- archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec_FC='$wl-rpath,$libdir'
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec_FC='-R$libdir'
+ ;;
+ *)
+ archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir'
+ ;;
+ esac
fi
else
ld_shlibs_FC=no
@@ -22391,53 +21798,33 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
hardcode_libdir_flag_spec_FC='-L$libdir'
hardcode_minus_L_FC=yes
allow_undefined_flag_FC=unsupported
- shrext_cmds=.dll
- archive_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- archive_expsym_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- prefix_cmds="$SED"~
- if test EXPORTS = "`$SED 1q $export_symbols`"; then
- prefix_cmds="$prefix_cmds -e 1d";
- fi~
- prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
- cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- old_archive_From_new_cmds_FC='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
- enable_shared_with_static_runtimes_FC=yes
+ archive_cmds_FC='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds_FC='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
;;
osf3*)
- if test yes = "$GCC"; then
- allow_undefined_flag_FC=' $wl-expect_unresolved $wl\*'
- archive_cmds_FC='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ if test "$GCC" = yes; then
+ allow_undefined_flag_FC=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
else
allow_undefined_flag_FC=' -expect_unresolved \*'
- archive_cmds_FC='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
fi
archive_cmds_need_lc_FC='no'
- hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir'
+ hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator_FC=:
;;
osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test yes = "$GCC"; then
- allow_undefined_flag_FC=' $wl-expect_unresolved $wl\*'
- archive_cmds_FC='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
- hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir'
+ if test "$GCC" = yes; then
+ allow_undefined_flag_FC=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds_FC='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag_FC=' -expect_unresolved \*'
- archive_cmds_FC='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds_FC='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
# Both c and cxx compiler support -rpath directly
hardcode_libdir_flag_spec_FC='-rpath $libdir'
@@ -22448,24 +21835,24 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
solaris*)
no_undefined_flag_FC=' -z defs'
- if test yes = "$GCC"; then
- wlarc='$wl'
- archive_cmds_FC='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ archive_cmds_FC='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
wlarc=''
- archive_cmds_FC='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_cmds_FC='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
;;
*)
- wlarc='$wl'
- archive_cmds_FC='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ wlarc='${wl}'
+ archive_cmds_FC='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
;;
esac
fi
@@ -22475,11 +21862,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
# The compiler driver will combine and reorder linker options,
- # but understands '-z linker_flag'. GCC discards it without '$wl',
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
# but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- if test yes = "$GCC"; then
- whole_archive_flag_spec_FC='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec_FC='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
else
whole_archive_flag_spec_FC='-z allextract$convenience -z defaultextract'
fi
@@ -22489,10 +21876,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
sunos4*)
- if test sequent = "$host_vendor"; then
+ if test "x$host_vendor" = xsequent; then
# Use $CC to link under sequent, because it throws in some extra .o
# files that make .init and .fini sections work.
- archive_cmds_FC='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_FC='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds_FC='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
fi
@@ -22541,43 +21928,43 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag_FC='$wl-z,text'
+ no_undefined_flag_FC='${wl}-z,text'
archive_cmds_need_lc_FC=no
hardcode_shlibpath_var_FC=no
runpath_var='LD_RUN_PATH'
- if test yes = "$GCC"; then
- archive_cmds_FC='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_FC='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test "$GCC" = yes; then
+ archive_cmds_FC='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_FC='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- archive_cmds_FC='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_FC='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_FC='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_FC='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
sysv5* | sco3.2v5* | sco5v6*)
- # Note: We CANNOT use -z defs as we might desire, because we do not
+ # Note: We can NOT use -z defs as we might desire, because we do not
# link with -lc, and that would cause any symbols used from libc to
# always be unresolved, which means just about no library would
# ever link correctly. If we're not using GNU ld we use -z text
# though, which does catch some bad symbols but isn't as heavy-handed
# as -z defs.
- no_undefined_flag_FC='$wl-z,text'
- allow_undefined_flag_FC='$wl-z,nodefs'
+ no_undefined_flag_FC='${wl}-z,text'
+ allow_undefined_flag_FC='${wl}-z,nodefs'
archive_cmds_need_lc_FC=no
hardcode_shlibpath_var_FC=no
- hardcode_libdir_flag_spec_FC='$wl-R,$libdir'
+ hardcode_libdir_flag_spec_FC='${wl}-R,$libdir'
hardcode_libdir_separator_FC=':'
link_all_deplibs_FC=yes
- export_dynamic_flag_spec_FC='$wl-Bexport'
+ export_dynamic_flag_spec_FC='${wl}-Bexport'
runpath_var='LD_RUN_PATH'
- if test yes = "$GCC"; then
- archive_cmds_FC='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_FC='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test "$GCC" = yes; then
+ archive_cmds_FC='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_FC='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- archive_cmds_FC='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_FC='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_FC='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_FC='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
@@ -22592,10 +21979,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
esac
- if test sni = "$host_vendor"; then
+ if test x$host_vendor = xsni; then
case $host in
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- export_dynamic_flag_spec_FC='$wl-Blargedynsym'
+ export_dynamic_flag_spec_FC='${wl}-Blargedynsym'
;;
esac
fi
@@ -22603,7 +21990,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_FC" >&5
$as_echo "$ld_shlibs_FC" >&6; }
-test no = "$ld_shlibs_FC" && can_build_shared=no
+test "$ld_shlibs_FC" = no && can_build_shared=no
with_gnu_ld_FC=$with_gnu_ld
@@ -22620,7 +22007,7 @@ x|xyes)
# Assume -lc should be added
archive_cmds_need_lc_FC=yes
- if test yes,yes = "$GCC,$enable_shared"; then
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
case $archive_cmds_FC in
*'~'*)
# FIXME: we may have to deal with multi-command sequences.
@@ -22748,7 +22135,7 @@ $as_echo_n "checking dynamic linker characteristics... " >&6; }
library_names_spec=
libname_spec='lib$name'
soname_spec=
-shrext_cmds=.so
+shrext_cmds=".so"
postinstall_cmds=
postuninstall_cmds=
finish_cmds=
@@ -22765,16 +22152,14 @@ hardcode_into_libs=no
# flags to be left without arguments
need_version=unknown
-
-
case $host_os in
aix3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
shlibpath_var=LIBPATH
# AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='$libname$release$shared_ext$major'
+ soname_spec='${libname}${release}${shared_ext}$major'
;;
aix[4-9]*)
@@ -22782,91 +22167,41 @@ aix[4-9]*)
need_lib_prefix=no
need_version=no
hardcode_into_libs=yes
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# AIX 5 supports IA64
- library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
else
# With GCC up to 2.95.x, collect2 would create an import file
# for dependence libraries. The import file would start with
- # the line '#! .'. This would cause the generated library to
- # depend on '.', always an invalid library. This was fixed in
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
# development snapshots of GCC prior to 3.0.
case $host_os in
aix4 | aix4.[01] | aix4.[01].*)
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
echo ' yes '
- echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
:
else
can_build_shared=no
fi
;;
esac
- # Using Import Files as archive members, it is possible to support
- # filename-based versioning of shared library archives on AIX. While
- # this would work for both with and without runtime linking, it will
- # prevent static linking of such archives. So we do filename-based
- # shared library versioning with .so extension only, which is used
- # when both runtime linking and shared linking is enabled.
- # Unfortunately, runtime linking may impact performance, so we do
- # not want this to be the default eventually. Also, we use the
- # versioned .so libs for executables only if there is the -brtl
- # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
- # To allow for filename-based versioning support, we need to create
- # libNAME.so.V as an archive file, containing:
- # *) an Import File, referring to the versioned filename of the
- # archive as well as the shared archive member, telling the
- # bitwidth (32 or 64) of that shared object, and providing the
- # list of exported symbols of that shared object, eventually
- # decorated with the 'weak' keyword
- # *) the shared object with the F_LOADONLY flag set, to really avoid
- # it being seen by the linker.
- # At run time we better use the real file rather than another symlink,
- # but for link time we create the symlink libNAME.so -> libNAME.so.V
-
- case $with_aix_soname,$aix_use_runtimelinking in
- # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
# soname into executable. Probably we can add versioning support to
# collect2, so additional links can be useful in future.
- aix,yes) # traditional libtool
- dynamic_linker='AIX unversionable lib.so'
+ if test "$aix_use_runtimelinking" = yes; then
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
# instead of lib<name>.a to let people know that these are not
# typical AIX shared libraries.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- ;;
- aix,no) # traditional AIX only
- dynamic_linker='AIX lib.a(lib.so.V)'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
# We preserve .a as extension for shared libraries through AIX4.2
# and later when we are not doing run time linking.
- library_names_spec='$libname$release.a $libname.a'
- soname_spec='$libname$release$shared_ext$major'
- ;;
- svr4,*) # full svr4 only
- dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
- library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
- # We do not specify a path in Import Files, so LIBPATH fires.
- shlibpath_overrides_runpath=yes
- ;;
- *,yes) # both, prefer svr4
- dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
- library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
- # unpreferred sharedlib libNAME.a needs extra handling
- postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
- postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
- # We do not specify a path in Import Files, so LIBPATH fires.
- shlibpath_overrides_runpath=yes
- ;;
- *,no) # both, prefer aix
- dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
- library_names_spec='$libname$release.a $libname.a'
- soname_spec='$libname$release$shared_ext$major'
- # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
- postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
- postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
- ;;
- esac
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
shlibpath_var=LIBPATH
fi
;;
@@ -22876,18 +22211,18 @@ amigaos*)
powerpc)
# Since July 2007 AmigaOS4 officially supports .so libraries.
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
;;
m68k)
library_names_spec='$libname.ixlibrary $libname.a'
# Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
;;
esac
;;
beos*)
- library_names_spec='$libname$shared_ext'
+ library_names_spec='${libname}${shared_ext}'
dynamic_linker="$host_os ld.so"
shlibpath_var=LIBRARY_PATH
;;
@@ -22895,8 +22230,8 @@ beos*)
bsdi[45]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -22908,7 +22243,7 @@ bsdi[45]*)
cygwin* | mingw* | pw32* | cegcc*)
version_type=windows
- shrext_cmds=.dll
+ shrext_cmds=".dll"
need_version=no
need_lib_prefix=no
@@ -22917,8 +22252,8 @@ cygwin* | mingw* | pw32* | cegcc*)
# gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname~
@@ -22934,16 +22269,16 @@ cygwin* | mingw* | pw32* | cegcc*)
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
- soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
dynamic_linker='Win32 ld.exe'
@@ -22952,8 +22287,8 @@ cygwin* | mingw* | pw32* | cegcc*)
*,cl*)
# Native MSVC
libname_spec='$name'
- soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
- library_names_spec='$libname.dll.lib'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='${libname}.dll.lib'
case $build_os in
mingw*)
@@ -22980,7 +22315,7 @@ cygwin* | mingw* | pw32* | cegcc*)
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
;;
*)
- sys_lib_search_path_spec=$LIB
+ sys_lib_search_path_spec="$LIB"
if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
# It is most probably a Windows format PATH.
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
@@ -22993,8 +22328,8 @@ cygwin* | mingw* | pw32* | cegcc*)
esac
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname'
@@ -23007,7 +22342,7 @@ cygwin* | mingw* | pw32* | cegcc*)
*)
# Assume MSVC wrapper
- library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
esac
@@ -23020,8 +22355,8 @@ darwin* | rhapsody*)
version_type=darwin
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
- soname_spec='$libname$release$major$shared_ext'
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -23033,8 +22368,8 @@ dgux*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -23052,13 +22387,12 @@ freebsd* | dragonfly*)
version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
need_version=no
need_lib_prefix=no
;;
freebsd-*)
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
esac
@@ -23088,10 +22422,10 @@ haiku*)
need_lib_prefix=no
need_version=no
dynamic_linker="$host_os runtime_loader"
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
- shlibpath_overrides_runpath=no
+ shlibpath_overrides_runpath=yes
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
hardcode_into_libs=yes
;;
@@ -23109,15 +22443,14 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.so"
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- if test 32 = "$HPUX_IA64_MODE"; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- sys_lib_dlsearch_path_spec=/usr/lib/hpux32
else
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- sys_lib_dlsearch_path_spec=/usr/lib/hpux64
fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
hppa*64*)
shrext_cmds='.sl'
@@ -23125,8 +22458,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
@@ -23135,8 +22468,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=SHLIB_PATH
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
;;
esac
# HP-UX runs *really* slowly unless shared libraries are mode 555, ...
@@ -23149,8 +22482,8 @@ interix[3-9]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -23161,7 +22494,7 @@ irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
*)
- if test yes = "$lt_cv_prog_gnu_ld"; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
version_type=linux # correct to gnu/linux during the next big refactor
else
version_type=irix
@@ -23169,8 +22502,8 @@ irix5* | irix6* | nonstopux*)
esac
need_lib_prefix=no
need_version=no
- soname_spec='$libname$release$shared_ext$major'
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
case $host_os in
irix5* | nonstopux*)
libsuff= shlibsuff=
@@ -23189,8 +22522,8 @@ irix5* | irix6* | nonstopux*)
esac
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
- sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
hardcode_into_libs=yes
;;
@@ -23199,33 +22532,13 @@ linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
-linux*android*)
- version_type=none # Android doesn't support versioned libraries.
- need_lib_prefix=no
- need_version=no
- library_names_spec='$libname$release$shared_ext'
- soname_spec='$libname$release$shared_ext'
- finish_cmds=
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- dynamic_linker='Android linker'
- # Don't embed -rpath directories since the linker doesn't support them.
- hardcode_libdir_flag_spec_FC='-L$libdir'
- ;;
-
# This must be glibc/ELF.
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -23263,12 +22576,7 @@ fi
# before this can be enabled.
hardcode_into_libs=yes
- # Ideally, we could use ldconfig to report *all* directores which are
- # searched for libraries, however this is still not possible. Aside from not
- # being certain /sbin/ldconfig is available, command
- # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
- # even though it is searched at run-time. Try to do the best guess by
- # appending ld.so.conf contents (and includes) to the search path.
+ # Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
@@ -23283,17 +22591,29 @@ fi
dynamic_linker='GNU/Linux ld.so'
;;
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
netbsd*)
version_type=sunos
need_lib_prefix=no
need_version=no
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='NetBSD (a.out) ld.so'
else
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
dynamic_linker='NetBSD ld.elf_so'
fi
shlibpath_var=LD_LIBRARY_PATH
@@ -23303,7 +22623,7 @@ netbsd*)
newsos6)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
;;
@@ -23312,68 +22632,58 @@ newsos6)
version_type=qnx
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='ldqnx.so'
;;
-openbsd* | bitrig*)
+openbsd*)
version_type=sunos
- sys_lib_dlsearch_path_spec=/usr/lib
+ sys_lib_dlsearch_path_spec="/usr/lib"
need_lib_prefix=no
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
- need_version=no
- else
- need_version=yes
- fi
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
;;
os2*)
libname_spec='$name'
- version_type=windows
- shrext_cmds=.dll
- need_version=no
+ shrext_cmds=".dll"
need_lib_prefix=no
- # OS/2 can only load a DLL with a base name of 8 characters or less.
- soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
- v=$($ECHO $release$versuffix | tr -d .-);
- n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
- $ECHO $n$v`$shared_ext'
- library_names_spec='${libname}_dll.$libext'
+ library_names_spec='$libname${shared_ext} $libname.a'
dynamic_linker='OS/2 ld.exe'
- shlibpath_var=BEGINLIBPATH
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
+ shlibpath_var=LIBPATH
;;
osf3* | osf4* | osf5*)
version_type=osf
need_lib_prefix=no
need_version=no
- soname_spec='$libname$release$shared_ext$major'
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
rdos*)
@@ -23384,8 +22694,8 @@ solaris*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
@@ -23395,11 +22705,11 @@ solaris*)
sunos4*)
version_type=sunos
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
- if test yes = "$with_gnu_ld"; then
+ if test "$with_gnu_ld" = yes; then
need_lib_prefix=no
fi
need_version=yes
@@ -23407,8 +22717,8 @@ sunos4*)
sysv4 | sysv4.3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
case $host_vendor in
sni)
@@ -23429,24 +22739,24 @@ sysv4 | sysv4.3*)
;;
sysv4*MP*)
- if test -d /usr/nec; then
+ if test -d /usr/nec ;then
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
- soname_spec='$libname$shared_ext.$major'
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
shlibpath_var=LD_LIBRARY_PATH
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=sco
+ version_type=freebsd-elf
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
- if test yes = "$with_gnu_ld"; then
+ if test "$with_gnu_ld" = yes; then
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
else
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -23464,7 +22774,7 @@ tpf*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
@@ -23472,8 +22782,8 @@ tpf*)
uts4*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -23483,32 +22793,20 @@ uts4*)
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
$as_echo "$dynamic_linker" >&6; }
-test no = "$dynamic_linker" && can_build_shared=no
+test "$dynamic_linker" = no && can_build_shared=no
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
- sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
fi
-
-if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
- sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
fi
-# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
-configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
-
-# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
-func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
-
-# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
-configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
-
-
-
@@ -23551,15 +22849,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
hardcode_action_FC=
if test -n "$hardcode_libdir_flag_spec_FC" ||
test -n "$runpath_var_FC" ||
- test yes = "$hardcode_automatic_FC"; then
+ test "X$hardcode_automatic_FC" = "Xyes" ; then
# We can hardcode non-existent directories.
- if test no != "$hardcode_direct_FC" &&
+ if test "$hardcode_direct_FC" != no &&
# If the only mechanism to avoid hardcoding is shlibpath_var, we
# have to relink, otherwise we might link with an installed library
# when we should be linking with a yet-to-be-installed one
- ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, FC)" &&
- test no != "$hardcode_minus_L_FC"; then
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, FC)" != no &&
+ test "$hardcode_minus_L_FC" != no; then
# Linking always hardcodes the temporary library directory.
hardcode_action_FC=relink
else
@@ -23574,12 +22872,12 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_FC" >&5
$as_echo "$hardcode_action_FC" >&6; }
-if test relink = "$hardcode_action_FC" ||
- test yes = "$inherit_rpath_FC"; then
+if test "$hardcode_action_FC" = relink ||
+ test "$inherit_rpath_FC" = yes; then
# Fast installation is not supported
enable_fast_install=no
-elif test yes = "$shlibpath_overrides_runpath" ||
- test no = "$enable_shared"; then
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
# Fast installation is not necessary
enable_fast_install=needless
fi
@@ -23595,7 +22893,7 @@ fi
GCC=$lt_save_GCC
CC=$lt_save_CC
CFLAGS=$lt_save_CFLAGS
-fi # test yes != "$_lt_disable_FC"
+fi # test "$_lt_disable_FC" != yes
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -23627,6 +22925,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
## This check needs to occur after libtool is initialized because
## we check a libtool cache value and may issue a warning based
## on its result.
+
+
+## Default is no
+STATIC_EXEC=no
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should install only statically linked executables" >&5
$as_echo_n "checking if we should install only statically linked executables... " >&6; }
# Check whether --enable-static_exec was given.
@@ -23639,8 +22942,8 @@ if test "X$STATIC_EXEC" = "Xyes"; then
echo "yes"
## Issue a warning if -static flag is not supported.
if test "X$lt_cv_prog_compiler_static_works" = "Xno"; then
- echo " warning: -static flag not supported on this system; executable won't statically link shared system libraries."
- LT_STATIC_EXEC=""
+ echo " warning: -static flag not supported on this system; executable won't statically link shared system libraries."
+ LT_STATIC_EXEC=""
else
LT_STATIC_EXEC="-all-static"
fi
@@ -23701,57 +23004,6 @@ $as_echo "error" >&6; }
esac
## ----------------------------------------------------------------------
-## Production flags? Save the value in $CONFIG_MODE so we have it for
-## the record.
-##
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for production mode" >&5
-$as_echo_n "checking for production mode... " >&6; }
-# Check whether --enable-production was given.
-if test "${enable_production+set}" = set; then :
- enableval=$enable_production;
-fi
-
-
-case "X-$enable_production" in
- X-yes)
- enable_production="yes"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: production" >&5
-$as_echo "production" >&6; }
- CONFIG_MODE=production
- H5_CFLAGS="$H5_CFLAGS $PROD_CFLAGS"
- H5_CPPFLAGS="$H5_CPPFLAGS $PROD_CPPFLAGS"
- H5_CXXFLAGS="$H5_CXXFLAGS $PROD_CXXFLAGS"
- H5_FCFLAGS="$H5_FCFLAGS $PROD_FCFLAGS"
- ;;
- X-|X-no)
- enable_production="no"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: development" >&5
-$as_echo "development" >&6; }
- CONFIG_MODE=development
- H5_CFLAGS="$H5_CFLAGS $DEBUG_CFLAGS"
- H5_CPPFLAGS="$H5_CPPFLAGS $DEBUG_CPPFLAGS"
- H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_CXXFLAGS"
- H5_FCFLAGS="$H5_FCFLAGS $DEBUG_FCFLAGS"
- ;;
- X-pg|X-profile)
- enable_production="profile"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: profile" >&5
-$as_echo "profile" >&6; }
- CONFIG_MODE=profile
- H5_CFLAGS="$H5_CFLAGS $PROFILE_CFLAGS"
- H5_CPPFLAGS="$H5_CPPFLAGS $PROFILE_CPPFLAGS"
- H5_CXXFLAGS="$H5_CXXFLAGS $PROFILE_CXXFLAGS"
- H5_FCFLAGS="$H5_FCFLAGS $PROFILE_FCFLAGS"
- ;;
- *)
- enable_production="user-defined"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: user-defined" >&5
-$as_echo "user-defined" >&6; }
- CONFIG_MODE="$enableval"
- ;;
-esac
-
-## ----------------------------------------------------------------------
## Check for system libraries. "dl" stands for dynamically loaded library
##
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ceil in -lm" >&5
@@ -24270,7 +23522,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -24302,7 +23554,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -24358,7 +23610,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -24390,7 +23642,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -24437,10 +23689,6 @@ fi
##
case "$host_cpu-$host_vendor-$host_os" in
*linux*)
- ## Make available various LFS-related routines using the following
- ## _LARGEFILE*_SOURCE macros.
- AM_CPPFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $AM_CPPFLAGS"
-
## Add POSIX support on Linux systems, so <features.h> defines
## __USE_POSIX, which is required to get the prototype for fdopen
## defined correctly in <stdio.h>.
@@ -24475,100 +23723,6 @@ esac
CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS"
CFLAGS="$H5_CFLAGS $AM_CFLAGS $CFLAGS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <sys/types.h>
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
- extern "C"
-# endif
- int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-off64_t n = 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- for ac_func in lseek64 fseeko64 ftello64 ftruncate64
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipping test for lseek64, fseeko64 , ftello64, ftruncate64 because off64_t is not defined" >&5
-$as_echo "skipping test for lseek64, fseeko64 , ftello64, ftruncate64 because off64_t is not defined" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-for ac_func in fseeko ftello
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
- extern "C"
-# endif
- int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-struct stat64 sb;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- for ac_func in stat64 fstat64
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: skipping test for stat64 and fstat64" >&5
-$as_echo "skipping test for stat64 and fstat64" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
## Checkpoint the cache
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -25599,39 +24753,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off64_t" >&5
-$as_echo_n "checking size of off64_t... " >&6; }
-if ${ac_cv_sizeof_off64_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off64_t))" "ac_cv_sizeof_off64_t" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_off64_t" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (off64_t)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_off64_t=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off64_t" >&5
-$as_echo "$ac_cv_sizeof_off64_t" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_OFF64_T $ac_cv_sizeof_off64_t
-_ACEOF
-
-
if test "X$C9x" = "Xyes"; then
cat >>confdefs.h <<\EOF
@@ -25822,6 +24943,11 @@ fi
## If the library path is specified then it must be preceded by a comma.
##
+
+## Default is not present
+HAVE_DMALLOC=no
+
+
# Check whether --with-dmalloc was given.
if test "${with_dmalloc+set}" = set; then :
withval=$with_dmalloc;
@@ -26025,6 +25151,14 @@ fi
esac
## ----------------------------------------------------------------------
+## Make the external filters list available to *.in files
+## At this point it's unset (no external filters by default) but it
+## will be filled in during the deflate (zlib) and szip processing
+## below.
+##
+
+
+## ----------------------------------------------------------------------
## Is the GNU zlib present? It has a header file `zlib.h' and a library
## `-lz' and their locations might be specified with the `--with-zlib'
## command-line switch. The value is an include path and/or a library path.
@@ -26260,7 +25394,7 @@ $as_echo "#define HAVE_FILTER_DEFLATE 1" >>confdefs.h
if test "X$EXTERNAL_FILTERS" != "X"; then
EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}deflate(zlib)"
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}deflate(zlib)"
fi
@@ -26559,13 +25693,13 @@ $as_echo "no" >&6; }
if test "X$EXTERNAL_FILTERS" != "X"; then
EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)"
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)"
fi
if test ${hdf5_cv_szlib_can_encode} = "no"; then
if test "X$EXTERNAL_FILTERS" != "X"; then
EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(no encoder)"
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(no encoder)"
fi
fi
@@ -26669,6 +25803,11 @@ rm -f confcache
## Enable thread-safe version of library. It requires Pthreads support
## on POSIX systems.
##
+
+
+## Default is no thread-safety
+THREADSAFE=no
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread safe support" >&5
$as_echo_n "checking for thread safe support... " >&6; }
# Check whether --enable-threadsafe was given.
@@ -26677,7 +25816,7 @@ if test "${enable_threadsafe+set}" = set; then :
fi
-## NOTE: The high-level, C++, and Fortran interfaces are not compatible
+## The high-level, C++, and Fortran interfaces are not compatible
## with the thread-safety option because the lock is not hoisted
## into the higher-level API calls.
@@ -27890,57 +27029,277 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-
## ----------------------------------------------------------------------
-## Turn on debugging by setting compiler flags
-## This must come after the enable-production since it depends on production.
+## Deprecate old ways of determining debug/production build
+## These can probably be removed in the future (1.10.1?)
##
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for debug flags" >&5
-$as_echo_n "checking for debug flags... " >&6; }
# Check whether --enable-debug was given.
if test "${enable_debug+set}" = set; then :
- enableval=$enable_debug; DEBUG_PKG=$enableval
+ enableval=$enable_debug; DEPRECATED_DEBUG=$enableval
fi
-## Default to no if producton is enabled
-if test "X-$DEBUG_PKG" = X- ; then
- if test "$enable_production" = yes ; then
- DEBUG_PKG=no
- else
- DEBUG_PKG=yes
- fi
+if test "X-$DEPRECATED_DEBUG" != "X-" ; then
+ as_fn_error $? "--enable-debug is deprecated, use --enable-build-mode=debug instead." "$LINENO" 5
+fi
+
+# Check whether --enable-production was given.
+if test "${enable_production+set}" = set; then :
+ enableval=$enable_production; DEPRECATED_PRODUCTION=$enableval
+fi
+
+
+if test "X-$DEPRECATED_PRODUCTION" != "X-" ; then
+ as_fn_error $? "--enable-production is deprecated, use --enable-build-mode=production instead." "$LINENO" 5
+fi
+
+
+## ----------------------------------------------------------------------
+## Check if the compiler should include symbols
+##
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking enable debugging symbols" >&5
+$as_echo_n "checking enable debugging symbols... " >&6; }
+# Check whether --enable-symbols was given.
+if test "${enable_symbols+set}" = set; then :
+ enableval=$enable_symbols; SYMBOLS=$enableval
fi
-all_packages="ac,b2,d,e,f,g,hg,hl,i,mf,mm,o,p,s,t,v,z"
-case "X-$DEBUG_PKG" in
+## Set default
+if test "X-$SYMBOLS" = X- ; then
+ if test "X-$BUILD_MODE" = "X-debug" ; then
+ SYMBOLS=yes
+ else
+ SYMBOLS=no
+ fi
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+
+
+case "X-$SYMBOLS" in
X-yes)
- DEBUG_PKG="d,e,f,g,hg,i,mm,o,p,s,t,v,z"
-## H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: default ($DEBUG_PKG)" >&5
-$as_echo "default ($DEBUG_PKG)" >&6; }
+ H5_CFLAGS="$H5_CFLAGS $SYMBOLS_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $SYMBOLS_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $SYMBOLS_FCFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
;;
- X-all)
- DEBUG_PKG=$all_packages
-## H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: all ($DEBUG_PKG)" >&5
-$as_echo "all ($DEBUG_PKG)" >&6; }
+ X-no)
+ H5_CFLAGS="$H5_CFLAGS $NO_SYMBOLS_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $NO_SYMBOLS_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $NO_SYMBOLS_FCFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
;;
- X-no|X-none)
+ *)
+ H5_CFLAGS="$H5_CFLAGS $SYMBOLS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $SYMBOLS"
+ H5_FCFLAGS="$H5_FCFLAGS $SYMBOLS"
+ SYMBOLS="custom ($SYMBOLS)"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMBOLS" >&5
+$as_echo "$SYMBOLS" >&6; }
+ ;;
+esac
+
+## ----------------------------------------------------------------------
+## Check if the assert macro should be enabled
+##
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking enable asserts" >&5
+$as_echo_n "checking enable asserts... " >&6; }
+# Check whether --enable-asserts was given.
+if test "${enable_asserts+set}" = set; then :
+ enableval=$enable_asserts; ASSERTS=$enableval
+fi
+
+
+## Set default
+if test "X-$ASSERTS" = X- ; then
+ if test "X-$BUILD_MODE" = "X-debug" ; then
+ ASSERTS=yes
+ else
+ ASSERTS=no
+ fi
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+
+
+case "X-$ASSERTS" in
+ X-yes)
+ H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ ;;
+ X-no)
+ H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ *)
+ as_fn_error $? "Unrecognized value: $ASSERTS" "$LINENO" 5
+ ;;
+esac
+
+## ----------------------------------------------------------------------
+## Check if the compiler should use profiling flags/settings
+##
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking profiling" >&5
+$as_echo_n "checking profiling... " >&6; }
+# Check whether --enable-profiling was given.
+if test "${enable_profiling+set}" = set; then :
+ enableval=$enable_profiling; PROFILING=$enableval
+fi
+
+
+## Default is no profiling
+if test "X-$PROFILING" = X- ; then
+ PROFILING=no
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+
+
+case "X-$PROFILING" in
+ X-yes)
+ H5_CFLAGS="$H5_CFLAGS $PROFILE_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $PROFILE_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $PROFILE_FCFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ ;;
+ X-no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ *)
+ H5_CFLAGS="$H5_CFLAGS $PROFILING"
+ H5_CXXFLAGS="$H5_CXXFLAGS $PROFILING"
+ H5_FCFLAGS="$H5_FCFLAGS $PROFILING"
+ PROFILING="custom ($PROFILING)"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILING" >&5
+$as_echo "$PROFILING" >&6; }
+ ;;
+esac
+
+## ----------------------------------------------------------------------
+## Check if the compiler should use a particular optimization setting
+##
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking optimization level" >&5
+$as_echo_n "checking optimization level... " >&6; }
+# Check whether --enable-optimization was given.
+if test "${enable_optimization+set}" = set; then :
+ enableval=$enable_optimization; OPTIMIZATION=$enableval
+fi
+
+
+## Set the default optimization level. This depends on the compiler mode.
+if test "X-$OPTIMIZATION" = X- ; then
+ case "X-$BUILD_MODE" in
+ X-debug)
+ OPTIMIZATION=debug
+ ;;
+ X-production)
+ OPTIMIZATION=high
+ ;;
+ X-clean)
+ OPTIMIZATION=none
+ ;;
+ esac
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+
+
+case "X-$OPTIMIZATION" in
+ X-high)
+ H5_CFLAGS="$H5_CFLAGS $HIGH_OPT_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $HIGH_OPT_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $HIGH_OPT_FCFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: high" >&5
+$as_echo "high" >&6; }
+ ;;
+ X-debug)
+ H5_CFLAGS="$H5_CFLAGS $DEBUG_OPT_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_OPT_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $DEBUG_OPT_FCFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: debug" >&5
+$as_echo "debug" >&6; }
+ ;;
+ X-none)
+ H5_CFLAGS="$H5_CFLAGS $NO_OPT_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $NO_OPT_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $NO_OPT_FCFLAGS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
$as_echo "none" >&6; }
- DEBUG_PKG=
-## H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG"
;;
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_PKG" >&5
-$as_echo "$DEBUG_PKG" >&6; }
+ H5_CFLAGS="$H5_CFLAGS $OPTIMIZATION"
+ H5_CXXFLAGS="$H5_CXXFLAGS $OPTIMIZATION"
+ H5_FCFLAGS="$H5_FCFLAGS $OPTIMIZATION"
+ OPTIMIZATION="custom ($OPTIMIZATION)"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPTIMIZATION" >&5
+$as_echo "$OPTIMIZATION" >&6; }
+ ;;
+esac
+
+## ----------------------------------------------------------------------
+## Enable/disable internal package-level debugging output
+##
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal debug output" >&5
+$as_echo_n "checking for internal debug output... " >&6; }
+# Check whether --enable-internal-debug was given.
+if test "${enable_internal_debug+set}" = set; then :
+ enableval=$enable_internal_debug; INTERNAL_DEBUG_OUTPUT=$enableval
+fi
+
+
+## Set default
+if test "X-$INTERNAL_DEBUG_OUTPUT" = X- ; then
+ if test "X-$BUILD_MODE" = "X-debug" ; then
+ INTERNAL_DEBUG_OUTPUT=all
+ else
+ INTERNAL_DEBUG_OUTPUT=none
+ fi
+fi
+
+
+
+## These are all the packages that use H5*_DEBUG.
+## There is no harm in specifying a package not in this list;
+## you'll just get an unused H5<pkg>_DEBUG symbol.
+##
+## Some packages that define debug checks or output are
+## too specialized or have huge performance hits. These
+## are not listed in the "all" packages list.
+##
+## all_packages="AC,B,B2,D,F,FA,FL,FS,HL,I,O,S,ST,T,Z"
+all_packages="AC,B2,D,F,HL,I,O,S,ST,T,Z"
+
+case "X-$INTERNAL_DEBUG_OUTPUT" in
+ X-yes|X-all)
+ INTERNAL_DEBUG_OUTPUT=$all_packages
+ DEBUG_PKG_LIST=$all_packages
+ ;;
+ X-no|X-none)
+ INTERNAL_DEBUG_OUTPUT=none
+ DEBUG_PKG_LIST=
+ ;;
+ *)
+ DEBUG_PKG_LIST=$INTERNAL_DEBUG_OUTPUT
;;
esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTERNAL_DEBUG_OUTPUT" >&5
+$as_echo "$INTERNAL_DEBUG_OUTPUT" >&6; }
-if test -n "$DEBUG_PKG"; then
- for pkg in `echo $DEBUG_PKG | ${TR} ${as_cr_letters}"," ${as_cr_LETTERS}" "`; do
+## Define H5*_DEBUG symbols that control package output
+## NOTE: No sanity checking done here!
+if test -n "$DEBUG_PKG_LIST"; then
+ for pkg in `echo $DEBUG_PKG_LIST | ${TR} ${as_cr_letters}"," ${as_cr_LETTERS}" "`; do
H5_CPPFLAGS="$H5_CPPFLAGS -DH5${pkg}_DEBUG"
done
fi
@@ -27956,20 +27315,30 @@ if test "${enable_codestack+set}" = set; then :
fi
+## Set the default level.
+if test "X-$CODESTACK" = X- ; then
+ CODESTACK=no
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+
+
case "X-$CODESTACK" in
X-yes)
- CODESTACK=yes
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define HAVE_CODESTACK 1" >>confdefs.h
;;
- *)
- CODESTACK=no
+ X-no)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
;;
+ *)
+ as_fn_error $? "Unrecognized value: $CODESTACK" "$LINENO" 5
+ ;;
esac
## ----------------------------------------------------------------------
@@ -27983,123 +27352,69 @@ if test "${enable_metadata_trace_file+set}" = set; then :
fi
+## Set the default level.
+if test "X-$METADATATRACEFILE" = X- ; then
+ METADATATRACEFILE=no
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+
+
case "X-$METADATATRACEFILE" in
X-yes)
- METADATATRACEFILE=yes
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define METADATA_TRACE_FILE 1" >>confdefs.h
;;
- *)
- METADATATRACEFILE=no
+ X-no)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
;;
+ *)
+ as_fn_error $? "Unrecognized value: $METADATATRACEFILE" "$LINENO" 5
+ ;;
esac
## ----------------------------------------------------------------------
## Enable tracing of the API
-## This must come after the enable-debug since it depends on debug.
##
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for API tracing" >&5
$as_echo_n "checking for API tracing... " >&6; };
# Check whether --enable-trace was given.
if test "${enable_trace+set}" = set; then :
- enableval=$enable_trace; TRACE=$enableval
+ enableval=$enable_trace; TRACE_API=$enableval
fi
-## Default to no if debug is disabled
-if test "X-$TRACE" = X- ; then
- if test -z "$DEBUG_PKG" ; then
- TRACE=no
- else
- TRACE=yes
- fi
-fi
-
-case "X-$TRACE" in
- X-yes)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+## Set the default level.
+if test "X-$TRACE_API" = X- ; then
+ if test "X-$BUILD_MODE" = "X-debug" ; then
TRACE_API=yes
- H5_CPPFLAGS="$H5_CPPFLAGS -DH5_DEBUG_API"
- ;;
- X-no|*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ else
TRACE_API=no
- H5_CPPFLAGS="$H5_CPPFLAGS -UH5_DEBUG_API"
- ;;
-esac
-
-## ----------------------------------------------------------------------
-## Enable instrumenting of the library's internal operations
-## This must come after the enable-debug since it depends on debug.
-##
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for instrumented library" >&5
-$as_echo_n "checking for instrumented library... " >&6; };
-# Check whether --enable-instrument was given.
-if test "${enable_instrument+set}" = set; then :
- enableval=$enable_instrument; INSTRUMENT=$enableval
+ fi
fi
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
-## Default to no if debug is disabled
-if test "X-$INSTRUMENT" = X- ; then
- if test -z "$DEBUG_PKG" ; then
- INSTRUMENT=no
- else
- INSTRUMENT=yes
- fi
-fi
-case "X-$INSTRUMENT" in
+case "X-$TRACE_API" in
X-yes)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- INSTRUMENT_LIBRARY=yes
-
-$as_echo "#define HAVE_INSTRUMENTED_LIBRARY 1" >>confdefs.h
-
+ H5_CPPFLAGS="$H5_CPPFLAGS -DH5_DEBUG_API"
;;
- X-no|*)
+ X-no)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- INSTRUMENT_LIBRARY=no
+ H5_CPPFLAGS="$H5_CPPFLAGS -UH5_DEBUG_API"
;;
-esac
-
-## ----------------------------------------------------------------------
-## Check if they would like to securely clear file buffers before they are
-## written.
-##
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to clear file buffers" >&5
-$as_echo_n "checking whether to clear file buffers... " >&6; }
-# Check whether --enable-clear-file-buffers was given.
-if test "${enable_clear_file_buffers+set}" = set; then :
- enableval=$enable_clear_file_buffers; CLEARFILEBUF=$enableval
-fi
-
-
-case "X-$CLEARFILEBUF" in
*)
- CLEARFILEBUF=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define CLEAR_MEMORY 1" >>confdefs.h
-
- ;;
- X-no)
- CLEARFILEBUF=no
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ as_fn_error $? "Unrecognized value: $TRACE_API" "$LINENO" 5
;;
esac
@@ -28109,7 +27424,6 @@ esac
## more scrupulous with it's memory operations. Enabling this also
## disables the library's free space manager code.
##
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a memory checking tool will be used" >&5
$as_echo_n "checking whether a memory checking tool will be used... " >&6; }
# Check whether --enable-using-memchecker was given.
@@ -28118,27 +27432,36 @@ if test "${enable_using_memchecker+set}" = set; then :
fi
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+
+
+## Set the default level.
+if test "X-$USINGMEMCHECKER" = X- ; then
+ USINGMEMCHECKER=no
+fi
+
case "X-$USINGMEMCHECKER" in
X-yes)
- USINGMEMCHECKER=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
$as_echo "#define USING_MEMCHECKER 1" >>confdefs.h
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
;;
- *)
- USINGMEMCHECKER=no
+ X-no)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
;;
+ *)
+ as_fn_error $? "Unrecognized value: $USINGMEMCHECKER" "$LINENO" 5
+ ;;
esac
## ----------------------------------------------------------------------
## Check if they would like to enable the internal memory allocation sanity
## checking code.
##
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether internal memory allocation sanity checking is used" >&5
$as_echo_n "checking whether internal memory allocation sanity checking is used... " >&6; }
# Check whether --enable-memory-alloc-sanity-check was given.
@@ -28147,20 +27470,34 @@ if test "${enable_memory_alloc_sanity_check+set}" = set; then :
fi
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+
+
+## Set default
+if test "X-$MEMORYALLOCSANITYCHECK" = X- ; then
+ if test "X-$BUILD_MODE" = "X-debug" ; then
+ MEMORYALLOCSANITYCHECK=yes
+ else
+ MEMORYALLOCSANITYCHECK=no
+ fi
+fi
+
case "X-$MEMORYALLOCSANITYCHECK" in
X-yes)
- MEMORYALLOCSANITYCHECK=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
$as_echo "#define MEMORY_ALLOC_SANITY_CHECK 1" >>confdefs.h
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
;;
- *)
- MEMORYALLOCSANITYCHECK=no
+ X-no)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
;;
+ *)
+ as_fn_error $? "Unrecognized value: $MEMORYALLOCSANITYCHECK" "$LINENO" 5
+ ;;
esac
## Checkpoint the cache
@@ -28382,8 +27719,12 @@ esac
## ----------------------------------------------------------------------
## Print some other parallel information and do some sanity checks.
+## Needs to be done outside of the PARALLEL block since the serial
+## build also needs to have values defined.
##
ADD_PARALLEL_FILES="no"
+ MPE=no
+ INSTRUMENT_LIBRARY=no
if test -n "$PARALLEL"; then
## The 'testpar' directory should participate in the build
@@ -28496,6 +27837,47 @@ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
+ ## ----------------------------------------------------------------------
+ ## Enable instrumenting of the library's internal operations
+ ## in parallel builds.
+ ##
+
+ ## Set default
+ if test "X-$BUILD_MODE" = "X-debug" ; then
+ INSTRUMENT_LIBRARY=yes
+ else
+ INSTRUMENT_LIBRARY=no
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for instrumented library" >&5
+$as_echo_n "checking for instrumented library... " >&6; };
+ # Check whether --enable-instrument was given.
+if test "${enable_instrument+set}" = set; then :
+ enableval=$enable_instrument; INSTRUMENT_LIBRARY=$enableval
+fi
+
+
+ ## Allow this variable to be substituted in
+ ## other files (src/libhdf5.settings.in, etc.)
+
+
+ case "X-$INSTRUMENT_LIBRARY" in
+ X-yes)
+
+$as_echo "#define HAVE_INSTRUMENTED_LIBRARY 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ ;;
+ X-no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ *)
+ as_fn_error $? "Unrecognized value: $INSTRUMENT_LIBRARY" "$LINENO" 5
+ ;;
+ esac
+
## --------------------------------------------------------------------
## Do we want MPE instrumentation feature on?
##
@@ -28771,6 +28153,11 @@ fi
## ----------------------------------------------------------------------
## Check if Direct I/O driver is enabled by --enable-direct-vfd
##
+
+
+## Default is no direct VFD
+DIRECT_VFD=no
+
if ${hdf5_cv_direct_io+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -28829,6 +28216,7 @@ else
$as_echo "no" >&6; }
fi
+## Direct VFD files are not built if not required.
if test "X$DIRECT_VFD" = "Xyes"; then
DIRECT_VFD_CONDITIONAL_TRUE=
DIRECT_VFD_CONDITIONAL_FALSE='#'
@@ -29387,7 +28775,7 @@ if test -n "$ORGANIZATION"; then
CONFIG_USER="$CONFIG_USER at $ORGANIZATION"
fi
-## Configuration mode (production, development, profile, etc) saved above.
+## Configuration mode (production, debug, etc.) saved above.
## Byte sex from the AC_C_BIGENDIAN macro.
@@ -29514,13 +28902,19 @@ fi
## Enable deprecated public API symbols
##
+## Enabled unless the build mode is clean.
+if test "X-$BUILD_MODE" = "X-clean" ; then
+ DEPREC_SYMBOLS=no
+else
+ DEPREC_SYMBOLS=yes
+fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if deprecated public symbols are available" >&5
$as_echo_n "checking if deprecated public symbols are available... " >&6; };
# Check whether --enable-deprecated-symbols was given.
if test "${enable_deprecated_symbols+set}" = set; then :
enableval=$enable_deprecated_symbols; DEPREC_SYMBOLS=$enableval
-else
- DEPREC_SYMBOLS=yes
fi
@@ -29567,6 +28961,9 @@ elif test "X$withval" = "Xv18"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: v18" >&5
$as_echo "v18" >&6; }
DEFAULT_API_VERSION=v18
+
+$as_echo "#define USE_18_API_DEFAULT 1" >>confdefs.h
+
elif test "X$withval" = "Xv110"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: v110" >&5
$as_echo "v110" >&6; }
@@ -29593,32 +28990,33 @@ fi
$as_echo_n "checking whether to perform strict file format checks... " >&6; };
# Check whether --enable-strict-format-checks was given.
if test "${enable_strict_format_checks+set}" = set; then :
- enableval=$enable_strict_format_checks; STRICT_CHECKS=$enableval
+ enableval=$enable_strict_format_checks; STRICT_FORMAT_CHECKS=$enableval
fi
-## Default to yes if debug is enabled
-if test "X-$STRICT_CHECKS" = X- ; then
- if test -z "$DEBUG_PKG" ; then
- STRICT_CHECKS=no
+## Set the default level. This depends on the compiler mode.
+if test "X-$STRICT_FORMAT_CHECKS" = X- ; then
+ if test "X-$BUILD_MODE" = "X-debug" ; then
+ STRICT_FORMAT_CHECKS=yes
else
- STRICT_CHECKS=yes
+ STRICT_FORMAT_CHECKS=no
fi
fi
-case "X-$STRICT_CHECKS" in
+case "X-$STRICT_FORMAT_CHECKS" in
X-yes)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- STRICT_FORMAT_CHECKS=yes
$as_echo "#define STRICT_FORMAT_CHECKS 1" >>confdefs.h
;;
- X-no|*)
+ X-no)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- STRICT_FORMAT_CHECKS=no
+ ;;
+ *)
+ as_fn_error $? "Unrecognized value: $STRICT_FORMAT_CHECKS" "$LINENO" 5
;;
esac
@@ -30205,7 +29603,7 @@ _ASBOX
} >&5
lt_cl_help="\
-'$as_me' creates a local libtool stub from the current configuration,
+\`$as_me' creates a local libtool stub from the current configuration,
for use in further configure time tests before the real libtool is
generated.
@@ -30226,7 +29624,7 @@ Copyright (C) 2011 Free Software Foundation, Inc.
This config.lt script is free software; the Free Software Foundation
gives unlimited permision to copy, distribute and modify it."
-while test 0 != $#
+while test $# != 0
do
case $1 in
--version | --v* | -V )
@@ -30239,10 +29637,10 @@ do
lt_cl_silent=: ;;
-*) as_fn_error $? "unrecognized option: $1
-Try '$0 --help' for more information." "$LINENO" 5 ;;
+Try \`$0 --help' for more information." "$LINENO" 5 ;;
*) as_fn_error $? "unrecognized argument: $1
-Try '$0 --help' for more information." "$LINENO" 5 ;;
+Try \`$0 --help' for more information." "$LINENO" 5 ;;
esac
shift
done
@@ -30268,7 +29666,6 @@ enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
-shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
@@ -30318,13 +29715,10 @@ compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
-lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
-lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
@@ -30389,8 +29783,7 @@ finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
-configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
-configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
@@ -30543,12 +29936,9 @@ CFLAGS \
compiler \
lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
-lt_cv_sys_global_symbol_to_import \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
-lt_cv_nm_interface \
nm_file_list_spec \
-lt_cv_truncate_bin \
lt_prog_compiler_no_builtin_flag \
lt_prog_compiler_pic \
lt_prog_compiler_wl \
@@ -30639,7 +30029,7 @@ compiler_lib_search_path_CXX \
compiler_lib_search_path_FC; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
;;
*)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -30666,8 +30056,7 @@ postinstall_cmds \
postuninstall_cmds \
finish_cmds \
sys_lib_search_path_spec \
-configure_time_dlsearch_path \
-configure_time_lt_sys_library_path \
+sys_lib_dlsearch_path_spec \
reload_cmds_CXX \
reload_cmds_FC \
old_archive_cmds_CXX \
@@ -30692,7 +30081,7 @@ postlink_cmds_CXX \
postlink_cmds_FC; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
;;
*)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -30701,16 +30090,19 @@ postlink_cmds_FC; do
done
ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
-# See if we are running on zsh, and set the options that allow our
+# See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}"; then
+if test -n "\${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
PACKAGE='$PACKAGE'
VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
RM='$RM'
ofile='$ofile'
@@ -30727,53 +30119,55 @@ cat >>"$CONFIG_LT" <<\_LTEOF
$as_echo "$as_me: creating $ofile" >&6;}
- # See if we are running on zsh, and set the options that allow our
+ # See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}"; then
+ if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
- cfgfile=${ofile}T
+ cfgfile="${ofile}T"
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
$RM "$cfgfile"
cat <<_LT_EOF >> "$cfgfile"
#! $SHELL
-# Generated automatically by $as_me ($PACKAGE) $VERSION
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-
-# Provide generalized library-building support services.
-# Written by Gordon Matzigkeit, 1996
-
-# Copyright (C) 2014 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions. There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# GNU Libtool is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of of the License, or
-# (at your option) any later version.
#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program or library that is built
-# using GNU Libtool, you may include this file under the same
-# distribution terms that you use for the rest of that program.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
#
-# GNU Libtool is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# The names of the tagged configurations supported by this script.
-available_tags='CXX FC '
-
-# Configured defaults for sys_lib_dlsearch_path munging.
-: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
+available_tags="CXX FC "
# ### BEGIN LIBTOOL CONFIG
@@ -30793,9 +30187,6 @@ pic_mode=$pic_mode
# Whether or not to optimize for fast installation.
fast_install=$enable_fast_install
-# Shared archive member basename,for filename based shared library versioning on AIX.
-shared_archive_member_spec=$shared_archive_member_spec
-
# Shell to use when invoking shell scripts.
SHELL=$lt_SHELL
@@ -30913,27 +30304,18 @@ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
# Transform the output of nm in a proper C declaration.
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-# Transform the output of nm into a list of symbols to manually relocate.
-global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
-
# Transform the output of nm in a C name address pair.
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
-# The name lister interface.
-nm_interface=$lt_lt_cv_nm_interface
-
# Specify filename containing input files for \$NM.
nm_file_list_spec=$lt_nm_file_list_spec
-# The root where to search for dependent libraries,and where our libraries should be installed.
+# The root where to search for dependent libraries,and in which our libraries should be installed.
lt_sysroot=$lt_sysroot
-# Command to truncate a binary pipe.
-lt_truncate_bin=$lt_lt_cv_truncate_bin
-
# The name of the directory that contains temporary libtool files.
objdir=$objdir
@@ -31024,11 +30406,8 @@ hardcode_into_libs=$hardcode_into_libs
# Compile-time system search path for libraries.
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-# Detected run-time system search path for libraries.
-sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
-
-# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
-configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Whether dlopen is supported.
dlopen_support=$enable_dlopen
@@ -31121,13 +30500,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
# Whether we need a single "-rpath" flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator
-# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
# DIR into the resulting binary.
hardcode_direct=$hardcode_direct
-# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
# library is relocated.
hardcode_direct_absolute=$hardcode_direct_absolute
@@ -31193,72 +30572,13 @@ compiler_lib_search_path=$lt_compiler_lib_search_path
_LT_EOF
- cat <<'_LT_EOF' >> "$cfgfile"
-
-# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
-
-# func_munge_path_list VARIABLE PATH
-# -----------------------------------
-# VARIABLE is name of variable containing _space_ separated list of
-# directories to be munged by the contents of PATH, which is string
-# having a format:
-# "DIR[:DIR]:"
-# string "DIR[ DIR]" will be prepended to VARIABLE
-# ":DIR[:DIR]"
-# string "DIR[ DIR]" will be appended to VARIABLE
-# "DIRP[:DIRP]::[DIRA:]DIRA"
-# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
-# "DIRA[ DIRA]" will be appended to VARIABLE
-# "DIR[:DIR]"
-# VARIABLE will be replaced by "DIR[ DIR]"
-func_munge_path_list ()
-{
- case x$2 in
- x)
- ;;
- *:)
- eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
- ;;
- x:*)
- eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
- ;;
- *::*)
- eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
- eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
- ;;
- *)
- eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
- ;;
- esac
-}
-
-
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
-func_cc_basename ()
-{
- for cc_temp in $*""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
- done
- func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-}
-
-
-# ### END FUNCTIONS SHARED WITH CONFIGURE
-
-_LT_EOF
-
case $host_os in
aix3*)
cat <<\_LT_EOF >> "$cfgfile"
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
-if test set != "${COLLECT_NAMES+set}"; then
+if test "X${COLLECT_NAMES+set}" != Xset; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
@@ -31267,7 +30587,7 @@ _LT_EOF
esac
-ltmain=$ac_aux_dir/ltmain.sh
+ltmain="$ac_aux_dir/ltmain.sh"
# We use sed instead of cat because bash on DJGPP gets confused if
@@ -31277,6 +30597,165 @@ ltmain=$ac_aux_dir/ltmain.sh
sed '$q' "$ltmain" >> "$cfgfile" \
|| (rm -f "$cfgfile"; exit 1)
+ if test x"$xsi_shell" = xyes; then
+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
+{\
+\ case ${1} in\
+\ */*) func_dirname_result="${1%/*}${2}" ;;\
+\ * ) func_dirname_result="${3}" ;;\
+\ esac\
+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_basename ()$/,/^} # func_basename /c\
+func_basename ()\
+{\
+\ func_basename_result="${1##*/}"\
+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
+func_dirname_and_basename ()\
+{\
+\ case ${1} in\
+\ */*) func_dirname_result="${1%/*}${2}" ;;\
+\ * ) func_dirname_result="${3}" ;;\
+\ esac\
+\ func_basename_result="${1##*/}"\
+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
+func_stripname ()\
+{\
+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
+\ # positional parameters, so assign one to ordinary parameter first.\
+\ func_stripname_result=${3}\
+\ func_stripname_result=${func_stripname_result#"${1}"}\
+\ func_stripname_result=${func_stripname_result%"${2}"}\
+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
+func_split_long_opt ()\
+{\
+\ func_split_long_opt_name=${1%%=*}\
+\ func_split_long_opt_arg=${1#*=}\
+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
+func_split_short_opt ()\
+{\
+\ func_split_short_opt_arg=${1#??}\
+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
+func_lo2o ()\
+{\
+\ case ${1} in\
+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
+\ *) func_lo2o_result=${1} ;;\
+\ esac\
+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_xform ()$/,/^} # func_xform /c\
+func_xform ()\
+{\
+ func_xform_result=${1%.*}.lo\
+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_arith ()$/,/^} # func_arith /c\
+func_arith ()\
+{\
+ func_arith_result=$(( $* ))\
+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_len ()$/,/^} # func_len /c\
+func_len ()\
+{\
+ func_len_result=${#1}\
+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+fi
+
+if test x"$lt_shell_append" = xyes; then
+ sed -e '/^func_append ()$/,/^} # func_append /c\
+func_append ()\
+{\
+ eval "${1}+=\\${2}"\
+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
+func_append_quoted ()\
+{\
+\ func_quote_for_eval "${2}"\
+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ # Save a `func_append' function call where possible by direct use of '+='
+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+else
+ # Save a `func_append' function call even when '+=' is not available
+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
+
+
mv -f "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
@@ -31363,13 +30842,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
# Whether we need a single "-rpath" flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
-# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
# DIR into the resulting binary.
hardcode_direct=$hardcode_direct_CXX
-# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
# library is relocated.
hardcode_direct_absolute=$hardcode_direct_absolute_CXX
@@ -31516,13 +30995,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_FC
# Whether we need a single "-rpath" flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator_FC
-# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
# DIR into the resulting binary.
hardcode_direct=$hardcode_direct_FC
-# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
# library is relocated.
hardcode_direct_absolute=$hardcode_direct_absolute_FC
@@ -31597,7 +31076,7 @@ chmod +x "$CONFIG_LT"
# open by configure. Here we exec the FD to /dev/null, effectively closing
# config.log, so it can be properly (re)opened and appended to by config.lt.
lt_cl_success=:
-test yes = "$silent" &&
+test "$silent" = yes &&
lt_config_lt_args="$lt_config_lt_args --quiet"
exec 5>/dev/null
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
@@ -31630,6 +31109,11 @@ else
enable_static=no
fi
+## Expose things for *.in markup
+
+
+
+
if test "X$enable_static" = "Xyes" && test "X$enable_shared" = "Xyes"; then
STATIC_SHARED="static, shared"
elif test "X$enable_static" = "Xyes"; then
@@ -32435,7 +31919,6 @@ enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
-shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
@@ -32485,13 +31968,10 @@ compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
-lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
-lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
@@ -32556,8 +32036,7 @@ finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
-configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
-configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
@@ -32710,12 +32189,9 @@ CFLAGS \
compiler \
lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
-lt_cv_sys_global_symbol_to_import \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
-lt_cv_nm_interface \
nm_file_list_spec \
-lt_cv_truncate_bin \
lt_prog_compiler_no_builtin_flag \
lt_prog_compiler_pic \
lt_prog_compiler_wl \
@@ -32806,7 +32282,7 @@ compiler_lib_search_path_CXX \
compiler_lib_search_path_FC; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
;;
*)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -32833,8 +32309,7 @@ postinstall_cmds \
postuninstall_cmds \
finish_cmds \
sys_lib_search_path_spec \
-configure_time_dlsearch_path \
-configure_time_lt_sys_library_path \
+sys_lib_dlsearch_path_spec \
reload_cmds_CXX \
reload_cmds_FC \
old_archive_cmds_CXX \
@@ -32859,7 +32334,7 @@ postlink_cmds_CXX \
postlink_cmds_FC; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
;;
*)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -32868,16 +32343,19 @@ postlink_cmds_FC; do
done
ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
-# See if we are running on zsh, and set the options that allow our
+# See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}"; then
+if test -n "\${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
PACKAGE='$PACKAGE'
VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
RM='$RM'
ofile='$ofile'
@@ -33699,53 +33177,55 @@ $as_echo X"$file" |
"fortran/src/H5config_f.inc":H) cat fortran/src/H5config_f.inc | sed '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' >fortran/src/H5config_f.inc.tmp; mv -f fortran/src/H5config_f.inc.tmp fortran/src/H5config_f.inc ;;
"libtool":C)
- # See if we are running on zsh, and set the options that allow our
+ # See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}"; then
+ if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
- cfgfile=${ofile}T
+ cfgfile="${ofile}T"
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
$RM "$cfgfile"
cat <<_LT_EOF >> "$cfgfile"
#! $SHELL
-# Generated automatically by $as_me ($PACKAGE) $VERSION
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-
-# Provide generalized library-building support services.
-# Written by Gordon Matzigkeit, 1996
-
-# Copyright (C) 2014 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions. There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# GNU Libtool is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of of the License, or
-# (at your option) any later version.
#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program or library that is built
-# using GNU Libtool, you may include this file under the same
-# distribution terms that you use for the rest of that program.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
#
-# GNU Libtool is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# The names of the tagged configurations supported by this script.
-available_tags='CXX FC '
-
-# Configured defaults for sys_lib_dlsearch_path munging.
-: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
+available_tags="CXX FC "
# ### BEGIN LIBTOOL CONFIG
@@ -33765,9 +33245,6 @@ pic_mode=$pic_mode
# Whether or not to optimize for fast installation.
fast_install=$enable_fast_install
-# Shared archive member basename,for filename based shared library versioning on AIX.
-shared_archive_member_spec=$shared_archive_member_spec
-
# Shell to use when invoking shell scripts.
SHELL=$lt_SHELL
@@ -33885,27 +33362,18 @@ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
# Transform the output of nm in a proper C declaration.
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-# Transform the output of nm into a list of symbols to manually relocate.
-global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
-
# Transform the output of nm in a C name address pair.
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
-# The name lister interface.
-nm_interface=$lt_lt_cv_nm_interface
-
# Specify filename containing input files for \$NM.
nm_file_list_spec=$lt_nm_file_list_spec
-# The root where to search for dependent libraries,and where our libraries should be installed.
+# The root where to search for dependent libraries,and in which our libraries should be installed.
lt_sysroot=$lt_sysroot
-# Command to truncate a binary pipe.
-lt_truncate_bin=$lt_lt_cv_truncate_bin
-
# The name of the directory that contains temporary libtool files.
objdir=$objdir
@@ -33996,11 +33464,8 @@ hardcode_into_libs=$hardcode_into_libs
# Compile-time system search path for libraries.
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-# Detected run-time system search path for libraries.
-sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
-
-# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
-configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Whether dlopen is supported.
dlopen_support=$enable_dlopen
@@ -34093,13 +33558,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
# Whether we need a single "-rpath" flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator
-# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
# DIR into the resulting binary.
hardcode_direct=$hardcode_direct
-# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
# library is relocated.
hardcode_direct_absolute=$hardcode_direct_absolute
@@ -34165,72 +33630,13 @@ compiler_lib_search_path=$lt_compiler_lib_search_path
_LT_EOF
- cat <<'_LT_EOF' >> "$cfgfile"
-
-# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
-
-# func_munge_path_list VARIABLE PATH
-# -----------------------------------
-# VARIABLE is name of variable containing _space_ separated list of
-# directories to be munged by the contents of PATH, which is string
-# having a format:
-# "DIR[:DIR]:"
-# string "DIR[ DIR]" will be prepended to VARIABLE
-# ":DIR[:DIR]"
-# string "DIR[ DIR]" will be appended to VARIABLE
-# "DIRP[:DIRP]::[DIRA:]DIRA"
-# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
-# "DIRA[ DIRA]" will be appended to VARIABLE
-# "DIR[:DIR]"
-# VARIABLE will be replaced by "DIR[ DIR]"
-func_munge_path_list ()
-{
- case x$2 in
- x)
- ;;
- *:)
- eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
- ;;
- x:*)
- eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
- ;;
- *::*)
- eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
- eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
- ;;
- *)
- eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
- ;;
- esac
-}
-
-
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
-func_cc_basename ()
-{
- for cc_temp in $*""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
- done
- func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-}
-
-
-# ### END FUNCTIONS SHARED WITH CONFIGURE
-
-_LT_EOF
-
case $host_os in
aix3*)
cat <<\_LT_EOF >> "$cfgfile"
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
-if test set != "${COLLECT_NAMES+set}"; then
+if test "X${COLLECT_NAMES+set}" != Xset; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
@@ -34239,7 +33645,7 @@ _LT_EOF
esac
-ltmain=$ac_aux_dir/ltmain.sh
+ltmain="$ac_aux_dir/ltmain.sh"
# We use sed instead of cat because bash on DJGPP gets confused if
@@ -34249,6 +33655,165 @@ ltmain=$ac_aux_dir/ltmain.sh
sed '$q' "$ltmain" >> "$cfgfile" \
|| (rm -f "$cfgfile"; exit 1)
+ if test x"$xsi_shell" = xyes; then
+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
+{\
+\ case ${1} in\
+\ */*) func_dirname_result="${1%/*}${2}" ;;\
+\ * ) func_dirname_result="${3}" ;;\
+\ esac\
+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_basename ()$/,/^} # func_basename /c\
+func_basename ()\
+{\
+\ func_basename_result="${1##*/}"\
+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
+func_dirname_and_basename ()\
+{\
+\ case ${1} in\
+\ */*) func_dirname_result="${1%/*}${2}" ;;\
+\ * ) func_dirname_result="${3}" ;;\
+\ esac\
+\ func_basename_result="${1##*/}"\
+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
+func_stripname ()\
+{\
+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
+\ # positional parameters, so assign one to ordinary parameter first.\
+\ func_stripname_result=${3}\
+\ func_stripname_result=${func_stripname_result#"${1}"}\
+\ func_stripname_result=${func_stripname_result%"${2}"}\
+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
+func_split_long_opt ()\
+{\
+\ func_split_long_opt_name=${1%%=*}\
+\ func_split_long_opt_arg=${1#*=}\
+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
+func_split_short_opt ()\
+{\
+\ func_split_short_opt_arg=${1#??}\
+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
+func_lo2o ()\
+{\
+\ case ${1} in\
+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
+\ *) func_lo2o_result=${1} ;;\
+\ esac\
+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_xform ()$/,/^} # func_xform /c\
+func_xform ()\
+{\
+ func_xform_result=${1%.*}.lo\
+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_arith ()$/,/^} # func_arith /c\
+func_arith ()\
+{\
+ func_arith_result=$(( $* ))\
+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_len ()$/,/^} # func_len /c\
+func_len ()\
+{\
+ func_len_result=${#1}\
+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+fi
+
+if test x"$lt_shell_append" = xyes; then
+ sed -e '/^func_append ()$/,/^} # func_append /c\
+func_append ()\
+{\
+ eval "${1}+=\\${2}"\
+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
+func_append_quoted ()\
+{\
+\ func_quote_for_eval "${2}"\
+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ # Save a `func_append' function call where possible by direct use of '+='
+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+else
+ # Save a `func_append' function call even when '+=' is not available
+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
+
+
mv -f "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
@@ -34335,13 +33900,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
# Whether we need a single "-rpath" flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
-# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
# DIR into the resulting binary.
hardcode_direct=$hardcode_direct_CXX
-# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
# library is relocated.
hardcode_direct_absolute=$hardcode_direct_absolute_CXX
@@ -34488,13 +34053,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_FC
# Whether we need a single "-rpath" flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator_FC
-# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
# DIR into the resulting binary.
hardcode_direct=$hardcode_direct_FC
-# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
# library is relocated.
hardcode_direct_absolute=$hardcode_direct_absolute_FC
diff --git a/configure.ac b/configure.ac
index f79b485..3f31beb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -154,46 +154,11 @@ AC_MSG_CHECKING([shell variables initial values])
set >&AS_MESSAGE_LOG_FD
AC_MSG_RESULT([done])
-## Define all symbol variables used for configure summary.
-## EXTERNAL_FILTERS equals all external filters. Default none.
-## MPE: whether MPE option is enabled. Default no.
-## STATIC_EXEC: whether static-exec is enabled. Default no.
-## HDF_FORTRAN: whether Fortran is enabled. Default no.
-## FC: Fortran compiler.
-## HDF_CXX: whether C++ is enabled. Default no.
-## CXX: C++ compiler.
-## HDF5_HL: whether high-level library is enabled. Default is yes.
-## INSTRUMENT: whether INSTRUMENT is enabled. No default set here.
-## CODESTACK: whether CODESTACK is enabled. Default no.
-## HAVE_DMALLOC: whether system has dmalloc support. Default no.
-## HAVE_FLOAT128: whether system has Quad-Precision Math Library. Default no.
-## DIRECT_VFD: whether DIRECT_VFD is enabled. Default no.
-## THREADSAFE: whether THREADSAFE is enabled. Default no.
-## STATIC_SHARED: whether static and/or shared libraries are requested.
-## enable_shared: whether shared lib is enabled.
-## enable_static: whether static lib is enabled.
-## UNAME_INFO: System information.
-
-AC_SUBST([EXTERNAL_FILTERS])
-AC_SUBST([MPE]) MPE=no
-AC_SUBST([STATIC_EXEC]) STATIC_EXEC=no
-AC_SUBST([HDF_FORTRAN]) HDF_FORTRAN=no
-AC_SUBST([FC]) HDF_FORTRAN=no
-AC_SUBST([HDF_CXX]) HDF_CXX=no
-AC_SUBST([CXX]) HDF_CXX=no
-AC_SUBST([HDF5_HL]) HDF5_HL=yes
-AC_SUBST([INSTRUMENT])
-AC_SUBST([CODESTACK]) CODESTACK=no
-AC_SUBST([HAVE_DMALLOC]) HAVE_DMALLOC=no
-AC_SUBST([DIRECT_VFD]) DIRECT_VFD=no
-AC_SUBST([THREADSAFE]) THREADSAFE=no
-AC_SUBST([STATIC_SHARED])
-AC_SUBST([enable_shared])
-AC_SUBST([enable_static])
-AC_SUBST([UNAME_INFO]) UNAME_INFO=`uname -a`
-AC_SUBST([PAC_C_MAX_REAL_PRECISION])
-AC_SUBST([Fortran_COMPILER_ID])
-Fortran_COMPILER_ID=none
+## ----------------------------------------------------------------------
+## Save system information for the library settings file.
+##
+AC_SUBST([UNAME_INFO])
+UNAME_INFO=`uname -a`
## ----------------------------------------------------------------------
## Some platforms have broken basename, and/or xargs programs. Check
@@ -305,6 +270,60 @@ while test -n "$hname"; do
done
## ----------------------------------------------------------------------
+## Determine build mode (debug, production, clean).
+## This has to be done early since the build mode is referred to
+## frequently.
+##
+AC_MSG_CHECKING([build mode])
+AC_ARG_ENABLE([build-mode],
+ [AS_HELP_STRING([--enable-build-mode=(debug|production|clean)],
+ [Sets the build mode. Debug turns on symbols, API
+ tracing, asserts, and debug optimization,
+ as well as several other minor configure options
+ that aid in debugging.
+ Production turns high optimizations on.
+ Clean turns nothing on and disables optimization
+ (i.e.: a 'clean slate' configuration).
+ All these settings can be overridden by using
+ specific configure flags.
+ [default=debug]
+ ])],
+ [BUILD_MODE=$enableval])
+
+## Set the default
+## Depends on branch, set via script at branch creation time
+if test "X-$BUILD_MODE" = X- ; then
+ BUILD_MODE=debug
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([BUILD_MODE])
+
+case "X-$BUILD_MODE" in
+ X-clean)
+ AC_MSG_RESULT([clean])
+ ;;
+ X-debug)
+ AC_DEFINE([DEBUG_BUILD], [1], [Define if this is a debug build.])
+ H5_CFLAGS="$H5_CFLAGS $DEBUG_CFLAGS"
+ H5_CPPFLAGS="$H5_CPPFLAGS $DEBUG_CPPFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $DEBUG_FCFLAGS"
+ AC_MSG_RESULT([debug])
+ ;;
+ X-production)
+ H5_CFLAGS="$H5_CFLAGS $PROD_CFLAGS"
+ H5_CPPFLAGS="$H5_CPPFLAGS $PROD_CPPFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $PROD_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $PROD_FCFLAGS"
+ AC_MSG_RESULT([production])
+ ;;
+ *)
+ AC_MSG_ERROR([Unrecognized build mode: $BUILD_MODE. Use debug, production, or clean.])
+esac
+
+## ----------------------------------------------------------------------
## Some built-in configure checks can only see CFLAGS (not AM_CFLAGS), so
## we need to add this in so configure works as intended. We will need to
## reset this value at the end of configure, to preserve the user's settings.
@@ -376,7 +395,9 @@ AC_CHECK_SIZEOF([float])
AC_CHECK_SIZEOF([double])
AC_CHECK_SIZEOF([long double])
+## ----------------------------------------------------------------------
## Check for non-standard extenstion __FLOAT128
+##
HAVE_FLOAT128=0
HAVE_QUADMATH=0
FLT128_DIG=0
@@ -387,6 +408,8 @@ AC_CHECK_SIZEOF([_Quad])
AC_CHECK_HEADERS([quadmath.h], [HAVE_QUADMATH=1], [])
PAC_FC_LDBL_DIG
+AC_SUBST([PAC_C_MAX_REAL_PRECISION])
+
if test "$ac_cv_sizeof___float128" != 0 && test "$FLT128_DIG" != 0 ; then
AC_DEFINE([HAVE_FLOAT128], [1], [Determine if __float128 is available])
PAC_C_MAX_REAL_PRECISION=$FLT128_DIG
@@ -395,9 +418,17 @@ else
fi
AC_DEFINE_UNQUOTED([PAC_C_MAX_REAL_PRECISION], $PAC_C_MAX_REAL_PRECISION, [Determine the maximum decimal precision in C])
AC_MSG_RESULT([$PAC_C_MAX_REAL_PRECISION])
+
## ----------------------------------------------------------------------
## Check if they would like the Fortran interface compiled
##
+
+## This needs to be exposed for the library info file even if Fortran is disabled.
+AC_SUBST([HDF_FORTRAN])
+
+## Default is no Fortran
+HDF_FORTRAN=no
+
AC_SUBST([HDF5_INTERFACES]) HDF5_INTERFACES=""
AC_MSG_CHECKING([if Fortran interface enabled])
AC_ARG_ENABLE([fortran],
@@ -420,7 +451,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
AC_CONFIG_HEADERS([fortran/src/H5config_f.inc],
[cat fortran/src/H5config_f.inc | sed '1d;s%^/\* \(.*\) \*/%\1%;s/#define /#define H5_/;s/#undef /#undef H5_/' >fortran/src/H5config_f.inc.tmp; mv -f fortran/src/H5config_f.inc.tmp fortran/src/H5config_f.inc])
- AC_SUBST([FC]) HDF_FORTRAN=yes
+ AC_SUBST([FC])
HDF5_INTERFACES="$HDF5_INTERFACES fortran"
@@ -523,6 +554,8 @@ if test "X$HDF_FORTRAN" = "Xyes"; then
AC_SUBST([H5CONFIG_F_RKIND_SIZEOF])
AC_SUBST([H5CONFIG_F_NUM_IKIND])
AC_SUBST([H5CONFIG_F_IKIND])
+ AC_SUBST([Fortran_COMPILER_ID])
+ Fortran_COMPILER_ID=none
AC_DEFINE_UNQUOTED([Fortran_COMPILER_ID], $Fortran_COMPILER_ID, [Define Fortran compiler ID])
## Setting definition if there is a 16 byte fortran integer
@@ -612,11 +645,17 @@ fi
## ----------------------------------------------------------------------
## Check if they would like the C++ interface compiled
##
+## This needs to be exposed for the library info file even if C++ is disabled.
+AC_SUBST([HDF_CXX])
+
+## Default is no C++
+HDF_CXX=no
+
## We need to check for a C++ compiler unconditionally, since
## AC_PROG_CXX defines some macros that Automake 1.9.x uses and will
## miss even if c++ is not enabled.
- AC_PROG_CXX
- AC_PROG_CXXCPP ## this is checked for when AC_HEADER_STDC is done
+AC_PROG_CXX
+AC_PROG_CXXCPP ## this is checked for when AC_HEADER_STDC is done
AC_MSG_CHECKING([if c++ interface enabled])
@@ -629,19 +668,22 @@ if test "X$HDF_CXX" = "Xyes"; then
echo "yes"
HDF5_INTERFACES="$HDF5_INTERFACES c++"
+ ## Expose the compiler for *.in files
+ AC_SUBST([CXX])
+
## Change to the C++ language
AC_LANG_PUSH(C++)
- # Checking if C++ needs old style header files in includes
+ ## Checking if C++ needs old style header files in includes
PAC_PROG_CXX_HEADERS
- # Checking if C++ can handle namespaces
+ ## Checking if C++ can handle namespaces
PAC_PROG_CXX_NAMESPACE
- # Checking if C++ has offsetof extension
+ ## Checking if C++ has offsetof extension
PAC_PROG_CXX_OFFSETOF
- # if C++ can handle static cast
+ ## if C++ can handle static cast
PAC_PROG_CXX_STATIC_CAST
else
@@ -657,23 +699,41 @@ AC_LANG_POP(C++)
## Check if they would like the High Level library compiled
##
-AC_SUBST(HL) HL=""
-## name of fortran folder inside "hl", if FORTRAN compile is requested
-AC_SUBST(HL_FOR) HL_FOR=""
-AC_MSG_CHECKING([if high level library is enabled])
+## This needs to be exposed for the library info file even if the HL
+## library is disabled.
+AC_SUBST([HDF5_HL])
+
+## The high-level library is enabled unless the build mode is clean.
+if test "X-$BUILD_MODE" = "X-clean" ; then
+ HDF5_HL=no
+else
+ HDF5_HL=yes
+fi
+
+## high-level library directories (set when needed, blank until then)
+##
+## main high-level library
+AC_SUBST(HL)
+HL=""
+## Fortran high-level library
+AC_SUBST(HL_FOR)
+HL_FOR=""
+
+AC_MSG_CHECKING([if the high-level library is enabled])
AC_ARG_ENABLE([hl],
[AS_HELP_STRING([--enable-hl],
- [Enable the high level library [default=yes]])],
- [HDF5_HL=$enableval],
- [HDF5_HL=yes])
+ [Enable the high-level library.
+ [default=yes (unless build mode = clean)]
+ ])],
+ [HDF5_HL=$enableval])
-if test "X$HDF5_HL" = "Xyes"; then
- echo "yes"
+if test "X-$HDF5_HL" = "X-yes"; then
+ AC_MSG_RESULT([yes])
HL="hl"
AC_DEFINE([INCLUDE_HL], [1],
- [Define if HDF5's high-level library headers should be included in hdf5.h])
+ [Define if the high-level library headers should be included in hdf5.h])
else
- echo "no"
+ AC_MSG_RESULT([no])
fi
@@ -696,7 +756,8 @@ AC_PROG_INSTALL
## ----------------------------------------------------------------------
-## Set up ${TR} which is used to process DEBUG_PKG.
+## Set up ${TR} which is used to process the package list for extra
+## debugging output in the C library.
AC_PATH_PROG([TR], [tr])
@@ -832,6 +893,11 @@ LT_INIT([dlopen,win32-dll])
## This check needs to occur after libtool is initialized because
## we check a libtool cache value and may issue a warning based
## on its result.
+AC_SUBST([STATIC_EXEC])
+
+## Default is no
+STATIC_EXEC=no
+
AC_MSG_CHECKING([if we should install only statically linked executables])
AC_ARG_ENABLE([static_exec],
[AS_HELP_STRING([--enable-static-exec],
@@ -843,8 +909,8 @@ if test "X$STATIC_EXEC" = "Xyes"; then
echo "yes"
## Issue a warning if -static flag is not supported.
if test "X$lt_cv_prog_compiler_static_works" = "Xno"; then
- echo " warning: -static flag not supported on this system; executable won't statically link shared system libraries."
- LT_STATIC_EXEC=""
+ echo " warning: -static flag not supported on this system; executable won't statically link shared system libraries."
+ LT_STATIC_EXEC=""
else
LT_STATIC_EXEC="-all-static"
fi
@@ -893,50 +959,6 @@ case "X-$RPATH" in
esac
## ----------------------------------------------------------------------
-## Production flags? Save the value in $CONFIG_MODE so we have it for
-## the record.
-##
-AC_MSG_CHECKING([for production mode])
-AC_ARG_ENABLE([production],
- [AS_HELP_STRING([--enable-production],
- [Determines how to run the compiler.])])
-
-case "X-$enable_production" in
- X-yes)
- enable_production="yes"
- AC_MSG_RESULT([production])
- CONFIG_MODE=production
- H5_CFLAGS="$H5_CFLAGS $PROD_CFLAGS"
- H5_CPPFLAGS="$H5_CPPFLAGS $PROD_CPPFLAGS"
- H5_CXXFLAGS="$H5_CXXFLAGS $PROD_CXXFLAGS"
- H5_FCFLAGS="$H5_FCFLAGS $PROD_FCFLAGS"
- ;;
- X-|X-no)
- enable_production="no"
- AC_MSG_RESULT([development])
- CONFIG_MODE=development
- H5_CFLAGS="$H5_CFLAGS $DEBUG_CFLAGS"
- H5_CPPFLAGS="$H5_CPPFLAGS $DEBUG_CPPFLAGS"
- H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_CXXFLAGS"
- H5_FCFLAGS="$H5_FCFLAGS $DEBUG_FCFLAGS"
- ;;
- X-pg|X-profile)
- enable_production="profile"
- AC_MSG_RESULT([profile])
- CONFIG_MODE=profile
- H5_CFLAGS="$H5_CFLAGS $PROFILE_CFLAGS"
- H5_CPPFLAGS="$H5_CPPFLAGS $PROFILE_CPPFLAGS"
- H5_CXXFLAGS="$H5_CXXFLAGS $PROFILE_CXXFLAGS"
- H5_FCFLAGS="$H5_FCFLAGS $PROFILE_FCFLAGS"
- ;;
- *)
- enable_production="user-defined"
- AC_MSG_RESULT([user-defined])
- CONFIG_MODE="$enableval"
- ;;
-esac
-
-## ----------------------------------------------------------------------
## Check for system libraries. "dl" stands for dynamically loaded library
##
AC_CHECK_LIB([m], [ceil])
@@ -1027,10 +1049,6 @@ fi
##
case "$host_cpu-$host_vendor-$host_os" in
*linux*)
- ## Make available various LFS-related routines using the following
- ## _LARGEFILE*_SOURCE macros.
- AM_CPPFLAGS="-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $AM_CPPFLAGS"
-
## Add POSIX support on Linux systems, so <features.h> defines
## __USE_POSIX, which is required to get the prototype for fdopen
## defined correctly in <stdio.h>.
@@ -1065,23 +1083,6 @@ esac
CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS"
CFLAGS="$H5_CFLAGS $AM_CFLAGS $CFLAGS"
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <sys/types.h>
-]],
- [[off64_t n = 0;]])],
- [AC_CHECK_FUNCS([lseek64 fseeko64 ftello64 ftruncate64])],
- [AC_MSG_RESULT([skipping test for lseek64, fseeko64 , ftello64, ftruncate64 because off64_t is not defined])])
-
-AC_CHECK_FUNCS([fseeko ftello])
-
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <sys/types.h>
-#include <sys/stat.h>
-]],
-[[struct stat64 sb;]])],
-[AC_CHECK_FUNCS([stat64 fstat64])],
-[AC_MSG_RESULT([skipping test for stat64 and fstat64])])
-
## Checkpoint the cache
AC_CACHE_SAVE
@@ -1132,7 +1133,6 @@ cat >>confdefs.h <<\EOF
#include <sys/types.h> /*for off_t definition*/
EOF
AC_CHECK_SIZEOF([off_t])
-AC_CHECK_SIZEOF([off64_t])
if test "X$C9x" = "Xyes"; then
cat >>confdefs.h <<\EOF
@@ -1185,6 +1185,11 @@ AC_ARG_WITH([fnord],
## command-line switch. The value is an include path and/or a library path.
## If the library path is specified then it must be preceded by a comma.
##
+AC_SUBST([HAVE_DMALLOC])
+
+## Default is not present
+HAVE_DMALLOC=no
+
AC_ARG_WITH([dmalloc],
[AS_HELP_STRING([--with-dmalloc=DIR],
[Use dmalloc memory debugging aid [default=no]])],,
@@ -1249,6 +1254,14 @@ case $withval in
esac
## ----------------------------------------------------------------------
+## Make the external filters list available to *.in files
+## At this point it's unset (no external filters by default) but it
+## will be filled in during the deflate (zlib) and szip processing
+## below.
+##
+AC_SUBST([EXTERNAL_FILTERS])
+
+## ----------------------------------------------------------------------
## Is the GNU zlib present? It has a header file `zlib.h' and a library
## `-lz' and their locations might be specified with the `--with-zlib'
## command-line switch. The value is an include path and/or a library path.
@@ -1338,7 +1351,7 @@ if test "x$HAVE_ZLIB" = "xyes" -a "x$HAVE_ZLIB_H" = "xyes" -a "x$HAVE_COMPRESS2"
if test "X$EXTERNAL_FILTERS" != "X"; then
EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}deflate(zlib)"
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}deflate(zlib)"
fi
@@ -1461,13 +1474,13 @@ if test "x$HAVE_SZLIB" = "xyes" -a "x$HAVE_SZLIB_H" = "xyes"; then
if test "X$EXTERNAL_FILTERS" != "X"; then
EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)"
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(encoder)"
fi
if test ${hdf5_cv_szlib_can_encode} = "no"; then
if test "X$EXTERNAL_FILTERS" != "X"; then
EXTERNAL_FILTERS="${EXTERNAL_FILTERS},"
fi
- EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(no encoder)"
+ EXTERNAL_FILTERS="${EXTERNAL_FILTERS}szip(no encoder)"
fi
fi
@@ -1480,6 +1493,11 @@ AC_CACHE_SAVE
## Enable thread-safe version of library. It requires Pthreads support
## on POSIX systems.
##
+AC_SUBST([THREADSAFE])
+
+## Default is no thread-safety
+THREADSAFE=no
+
AC_MSG_CHECKING([for thread safe support])
AC_ARG_ENABLE([threadsafe],
[AS_HELP_STRING([--enable-threadsafe],
@@ -1487,7 +1505,7 @@ AC_ARG_ENABLE([threadsafe],
[default=no]])],
[THREADSAFE=$enableval])
-## NOTE: The high-level, C++, and Fortran interfaces are not compatible
+## The high-level, C++, and Fortran interfaces are not compatible
## with the thread-safety option because the lock is not hoisted
## into the higher-level API calls.
@@ -1840,56 +1858,289 @@ AC_MSG_RESULT([%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u])
AC_DEFINE_UNQUOTED([PRINTF_LL_WIDTH], ["$hdf5_cv_printf_ll"],
[Width for printf() for type `long long' or `__int64', use `ll'])
-
## ----------------------------------------------------------------------
-## Turn on debugging by setting compiler flags
-## This must come after the enable-production since it depends on production.
+## Deprecate old ways of determining debug/production build
+## These can probably be removed in the future (1.10.1?)
##
-AC_MSG_CHECKING([for debug flags])
AC_ARG_ENABLE([debug],
- [AS_HELP_STRING([--enable-debug=all],
- [Turn on debugging in all packages. One may
- also specify a comma-separated list of
- package names without the leading H5 or
- the word no. The default is most packages
- if production is disabled; no if it is enabled.
+ [AS_HELP_STRING([--enable-debug],
+ [DEPRECATED: use --enable-build-mode=debug])],
+ [DEPRECATED_DEBUG=$enableval])
+
+if test "X-$DEPRECATED_DEBUG" != "X-" ; then
+ AC_MSG_ERROR([--enable-debug is deprecated, use --enable-build-mode=debug instead.])
+fi
+
+AC_ARG_ENABLE([production],
+ [AS_HELP_STRING([--enable-production],
+ [DEPRECATED: use --enable-build-mode=production])],
+ [DEPRECATED_PRODUCTION=$enableval])
+
+if test "X-$DEPRECATED_PRODUCTION" != "X-" ; then
+ AC_MSG_ERROR([--enable-production is deprecated, use --enable-build-mode=production instead.])
+fi
+
+
+## ----------------------------------------------------------------------
+## Check if the compiler should include symbols
+##
+AC_MSG_CHECKING([enable debugging symbols])
+AC_ARG_ENABLE([symbols],
+ [AS_HELP_STRING([--enable-symbols=(yes|no|<custom>)],
+ [Add debug symbols to the library (e.g.: build with -g).
+ This is independent of the build mode and optimization
+ level. The custom string allows special settings like
+ -ggdb, etc. to be used.
+ [default=yes if debug build, otherwise no]
])],
- [DEBUG_PKG=$enableval])
+ [SYMBOLS=$enableval])
-## Default to no if producton is enabled
-if test "X-$DEBUG_PKG" = X- ; then
- if test "$enable_production" = yes ; then
- DEBUG_PKG=no
- else
- DEBUG_PKG=yes
- fi
+## Set default
+if test "X-$SYMBOLS" = X- ; then
+ if test "X-$BUILD_MODE" = "X-debug" ; then
+ SYMBOLS=yes
+ else
+ SYMBOLS=no
+ fi
fi
-AC_SUBST([DEBUG_PKG])
-all_packages="ac,b2,d,e,f,g,hg,hl,i,mf,mm,o,p,s,t,v,z"
-case "X-$DEBUG_PKG" in
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([SYMBOLS])
+
+case "X-$SYMBOLS" in
X-yes)
- DEBUG_PKG="d,e,f,g,hg,i,mm,o,p,s,t,v,z"
-## H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG"
- AC_MSG_RESULT([default ($DEBUG_PKG)])
+ H5_CFLAGS="$H5_CFLAGS $SYMBOLS_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $SYMBOLS_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $SYMBOLS_FCFLAGS"
+ AC_MSG_RESULT([yes])
;;
- X-all)
- DEBUG_PKG=$all_packages
-## H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG"
- AC_MSG_RESULT([all ($DEBUG_PKG)])
+ X-no)
+ H5_CFLAGS="$H5_CFLAGS $NO_SYMBOLS_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $NO_SYMBOLS_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $NO_SYMBOLS_FCFLAGS"
+ AC_MSG_RESULT([no])
;;
- X-no|X-none)
+ *)
+ H5_CFLAGS="$H5_CFLAGS $SYMBOLS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $SYMBOLS"
+ H5_FCFLAGS="$H5_FCFLAGS $SYMBOLS"
+ SYMBOLS="custom ($SYMBOLS)"
+ AC_MSG_RESULT([$SYMBOLS])
+ ;;
+esac
+
+## ----------------------------------------------------------------------
+## Check if the assert macro should be enabled
+##
+AC_MSG_CHECKING([enable asserts])
+AC_ARG_ENABLE([asserts],
+ [AS_HELP_STRING([--enable-asserts],
+ [Determines whether NDEBUG is defined or not, which
+ controls assertions.
+ This is independent of the build mode and presence
+ of debugging symbols.
+ [default=yes if debug build, otherwise no]
+ ])],
+ [ASSERTS=$enableval])
+
+## Set default
+if test "X-$ASSERTS" = X- ; then
+ if test "X-$BUILD_MODE" = "X-debug" ; then
+ ASSERTS=yes
+ else
+ ASSERTS=no
+ fi
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([ASSERTS])
+
+case "X-$ASSERTS" in
+ X-yes)
+ H5_CPPFLAGS="$H5_CPPFLAGS -UNDEBUG"
+ AC_MSG_RESULT([yes])
+ ;;
+ X-no)
+ H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG"
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ AC_MSG_ERROR([Unrecognized value: $ASSERTS])
+ ;;
+esac
+
+## ----------------------------------------------------------------------
+## Check if the compiler should use profiling flags/settings
+##
+AC_MSG_CHECKING([profiling])
+AC_ARG_ENABLE([profiling],
+ [AS_HELP_STRING([--enable-profiling=(yes|no|<custom>)],
+ [Enable profiling flags (e.g.: -pg).
+ This can be set independently from the build mode.
+ The custom setting can be used to pass alternative
+ profiling flags (e.g.: -P for using Prof with gcc).
+ [default=no]
+ ])],
+ [PROFILING=$enableval])
+
+## Default is no profiling
+if test "X-$PROFILING" = X- ; then
+ PROFILING=no
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([PROFILING])
+
+case "X-$PROFILING" in
+ X-yes)
+ H5_CFLAGS="$H5_CFLAGS $PROFILE_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $PROFILE_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $PROFILE_FCFLAGS"
+ AC_MSG_RESULT([yes])
+ ;;
+ X-no)
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ H5_CFLAGS="$H5_CFLAGS $PROFILING"
+ H5_CXXFLAGS="$H5_CXXFLAGS $PROFILING"
+ H5_FCFLAGS="$H5_FCFLAGS $PROFILING"
+ PROFILING="custom ($PROFILING)"
+ AC_MSG_RESULT([$PROFILING])
+ ;;
+esac
+
+## ----------------------------------------------------------------------
+## Check if the compiler should use a particular optimization setting
+##
+AC_MSG_CHECKING([optimization level])
+AC_ARG_ENABLE([optimization],
+ [AS_HELP_STRING([--enable-optimization=(high|debug|none|<custom>)],
+ [Enable optimization flags/settings (e.g.: -O3).
+ This can be set independently from the build mode.
+ Optimizations for a given compiler can be specified
+ at several levels: High, with aggressive optimizations
+ turned on; debug, with optimizations that are
+ unlikely to interfere with debugging or profiling;
+ and none, with no optimizations at all.
+ See the compiler-specific config/*-flags file for more
+ details.
+ Alternatively, optimization options can
+ be specified directly by specifying them as a
+ string value. These custom optimzation flags will
+ completely replace all other optimization flags.
+ [default depends on build mode: debug=debug,
+ production=high, clean=none]
+ ])],
+ [OPTIMIZATION=$enableval])
+
+## Set the default optimization level. This depends on the compiler mode.
+if test "X-$OPTIMIZATION" = X- ; then
+ case "X-$BUILD_MODE" in
+ X-debug)
+ OPTIMIZATION=debug
+ ;;
+ X-production)
+ OPTIMIZATION=high
+ ;;
+ X-clean)
+ OPTIMIZATION=none
+ ;;
+ esac
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([OPTIMIZATION])
+
+case "X-$OPTIMIZATION" in
+ X-high)
+ H5_CFLAGS="$H5_CFLAGS $HIGH_OPT_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $HIGH_OPT_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $HIGH_OPT_FCFLAGS"
+ AC_MSG_RESULT([high])
+ ;;
+ X-debug)
+ H5_CFLAGS="$H5_CFLAGS $DEBUG_OPT_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $DEBUG_OPT_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $DEBUG_OPT_FCFLAGS"
+ AC_MSG_RESULT([debug])
+ ;;
+ X-none)
+ H5_CFLAGS="$H5_CFLAGS $NO_OPT_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $NO_OPT_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $NO_OPT_FCFLAGS"
AC_MSG_RESULT([none])
- DEBUG_PKG=
-## H5_CPPFLAGS="$H5_CPPFLAGS -DNDEBUG"
;;
*)
- AC_MSG_RESULT([$DEBUG_PKG])
+ H5_CFLAGS="$H5_CFLAGS $OPTIMIZATION"
+ H5_CXXFLAGS="$H5_CXXFLAGS $OPTIMIZATION"
+ H5_FCFLAGS="$H5_FCFLAGS $OPTIMIZATION"
+ OPTIMIZATION="custom ($OPTIMIZATION)"
+ AC_MSG_RESULT([$OPTIMIZATION])
+ ;;
+esac
+
+## ----------------------------------------------------------------------
+## Enable/disable internal package-level debugging output
+##
+AC_MSG_CHECKING([for internal debug output])
+AC_ARG_ENABLE([internal-debug],
+ [AS_HELP_STRING([--enable-internal-debug=(yes|all|no|none|<pkg list>)],
+ [Enable extra debugging output on HDF5 library
+ errors. One may also specify a comma-separated
+ list of package names without the leading H5.
+ This is independent of the build mode
+ and is mainly of interest to HDF Group developers.
+ Yes/all and no/none are synonymous.
+ [default=all if debug build, otherwise none]
+ ])],
+ [INTERNAL_DEBUG_OUTPUT=$enableval])
+
+## Set default
+if test "X-$INTERNAL_DEBUG_OUTPUT" = X- ; then
+ if test "X-$BUILD_MODE" = "X-debug" ; then
+ INTERNAL_DEBUG_OUTPUT=all
+ else
+ INTERNAL_DEBUG_OUTPUT=none
+ fi
+fi
+
+AC_SUBST([INTERNAL_DEBUG_OUTPUT])
+
+## These are all the packages that use H5*_DEBUG.
+## There is no harm in specifying a package not in this list;
+## you'll just get an unused H5<pkg>_DEBUG symbol.
+##
+## Some packages that define debug checks or output are
+## too specialized or have huge performance hits. These
+## are not listed in the "all" packages list.
+##
+## all_packages="AC,B,B2,D,F,FA,FL,FS,HL,I,O,S,ST,T,Z"
+all_packages="AC,B2,D,F,HL,I,O,S,ST,T,Z"
+
+case "X-$INTERNAL_DEBUG_OUTPUT" in
+ X-yes|X-all)
+ INTERNAL_DEBUG_OUTPUT=$all_packages
+ DEBUG_PKG_LIST=$all_packages
+ ;;
+ X-no|X-none)
+ INTERNAL_DEBUG_OUTPUT=none
+ DEBUG_PKG_LIST=
+ ;;
+ *)
+ DEBUG_PKG_LIST=$INTERNAL_DEBUG_OUTPUT
;;
esac
+AC_MSG_RESULT([$INTERNAL_DEBUG_OUTPUT])
-if test -n "$DEBUG_PKG"; then
- for pkg in `echo $DEBUG_PKG | ${TR} ${as_cr_letters}"," ${as_cr_LETTERS}" "`; do
+## Define H5*_DEBUG symbols that control package output
+## NOTE: No sanity checking done here!
+if test -n "$DEBUG_PKG_LIST"; then
+ for pkg in `echo $DEBUG_PKG_LIST | ${TR} ${as_cr_letters}"," ${as_cr_LETTERS}" "`; do
H5_CPPFLAGS="$H5_CPPFLAGS -DH5${pkg}_DEBUG"
done
fi
@@ -1900,20 +2151,32 @@ fi
AC_MSG_CHECKING([whether function stack tracking is enabled])
AC_ARG_ENABLE([codestack],
[AS_HELP_STRING([--enable-codestack],
- [Enable the function stack tracing (for developer debugging).])],
+ [Enable the function stack tracing (for developer debugging).
+ [default=no]
+ ])],
[CODESTACK=$enableval])
+## Set the default level.
+if test "X-$CODESTACK" = X- ; then
+ CODESTACK=no
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([CODESTACK])
+
case "X-$CODESTACK" in
X-yes)
- CODESTACK=yes
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_CODESTACK], [1],
[Define if the function stack tracing code is to be compiled in])
;;
- *)
- CODESTACK=no
+ X-no)
AC_MSG_RESULT([no])
;;
+ *)
+ AC_MSG_ERROR([Unrecognized value: $CODESTACK])
+ ;;
esac
## ----------------------------------------------------------------------
@@ -1922,113 +2185,69 @@ esac
AC_MSG_CHECKING([whether metadata trace file code is enabled])
AC_ARG_ENABLE([metadata-trace-file],
[AS_HELP_STRING([--enable-metadata-trace-file],
- [Enable metadata trace file collection.])],
+ [Enable metadata trace file collection.
+ [default=no]
+ ])],
[METADATATRACEFILE=$enableval])
+## Set the default level.
+if test "X-$METADATATRACEFILE" = X- ; then
+ METADATATRACEFILE=no
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([METADATATRACEFILE])
+
case "X-$METADATATRACEFILE" in
X-yes)
- METADATATRACEFILE=yes
AC_MSG_RESULT([yes])
AC_DEFINE([METADATA_TRACE_FILE], [1],
[Define if the metadata trace file code is to be compiled in])
;;
- *)
- METADATATRACEFILE=no
+ X-no)
AC_MSG_RESULT([no])
;;
+ *)
+ AC_MSG_ERROR([Unrecognized value: $METADATATRACEFILE])
+ ;;
esac
## ----------------------------------------------------------------------
## Enable tracing of the API
-## This must come after the enable-debug since it depends on debug.
##
-AC_SUBST([TRACE_API])
AC_MSG_CHECKING([for API tracing]);
AC_ARG_ENABLE([trace],
[AS_HELP_STRING([--enable-trace],
- [Enable API tracing capability. Default=no
- if debug is disabled.])],
- [TRACE=$enableval])
-
-## Default to no if debug is disabled
-if test "X-$TRACE" = X- ; then
- if test -z "$DEBUG_PKG" ; then
- TRACE=no
- else
- TRACE=yes
- fi
-fi
+ [Enable HDF5 API tracing capability.
+ [default=yes if debug build, otherwise no]
+ ])],
+ [TRACE_API=$enableval])
-case "X-$TRACE" in
- X-yes)
- AC_MSG_RESULT([yes])
+## Set the default level.
+if test "X-$TRACE_API" = X- ; then
+ if test "X-$BUILD_MODE" = "X-debug" ; then
TRACE_API=yes
- H5_CPPFLAGS="$H5_CPPFLAGS -DH5_DEBUG_API"
- ;;
- X-no|*)
- AC_MSG_RESULT([no])
- TRACE_API=no
- H5_CPPFLAGS="$H5_CPPFLAGS -UH5_DEBUG_API"
- ;;
-esac
-
-## ----------------------------------------------------------------------
-## Enable instrumenting of the library's internal operations
-## This must come after the enable-debug since it depends on debug.
-##
-AC_SUBST([INSTRUMENT_LIBRARY])
-AC_MSG_CHECKING([for instrumented library]);
-AC_ARG_ENABLE([instrument],
- [AS_HELP_STRING([--enable-instrument],
- [Enable library instrumentation of optimization
- tracing. Default=no if debug is disabled.])],
- [INSTRUMENT=$enableval])
-
-## Default to no if debug is disabled
-if test "X-$INSTRUMENT" = X- ; then
- if test -z "$DEBUG_PKG" ; then
- INSTRUMENT=no
else
- INSTRUMENT=yes
+ TRACE_API=no
fi
fi
-case "X-$INSTRUMENT" in
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([TRACE_API])
+
+case "X-$TRACE_API" in
X-yes)
AC_MSG_RESULT([yes])
- INSTRUMENT_LIBRARY=yes
- AC_DEFINE([HAVE_INSTRUMENTED_LIBRARY], [1],
- [Define if library will contain instrumentation to detect correct optimization operation])
+ H5_CPPFLAGS="$H5_CPPFLAGS -DH5_DEBUG_API"
;;
- X-no|*)
+ X-no)
AC_MSG_RESULT([no])
- INSTRUMENT_LIBRARY=no
+ H5_CPPFLAGS="$H5_CPPFLAGS -UH5_DEBUG_API"
;;
-esac
-
-## ----------------------------------------------------------------------
-## Check if they would like to securely clear file buffers before they are
-## written.
-##
-AC_SUBST([CLEARFILEBUF])
-AC_MSG_CHECKING([whether to clear file buffers])
-AC_ARG_ENABLE([clear-file-buffers],
- [AS_HELP_STRING([--enable-clear-file-buffers],
- [Securely clear file buffers before writing
- to file. Default=yes.])],
- [CLEARFILEBUF=$enableval])
-
-case "X-$CLEARFILEBUF" in
*)
- CLEARFILEBUF=yes
- AC_MSG_RESULT([yes])
- AC_DEFINE([CLEAR_MEMORY], [1],
- [Define if the memory buffers being written to disk should be
- cleared before writing.])
- ;;
- X-no)
- CLEARFILEBUF=no
- AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Unrecognized value: $TRACE_API])
;;
esac
@@ -2038,40 +2257,49 @@ esac
## more scrupulous with it's memory operations. Enabling this also
## disables the library's free space manager code.
##
-AC_SUBST([USINGMEMCHECKER])
AC_MSG_CHECKING([whether a memory checking tool will be used])
AC_ARG_ENABLE([using-memchecker],
[AS_HELP_STRING([--enable-using-memchecker],
[Enable this option if a memory allocation and/or
bounds checking tool will be used on the HDF5
library. Enabling this causes the library to be
- more picky about it's memory operations and also
+ more picky about its memory operations and also
disables the library's free space manager code.
This option is orthogonal to the
--enable-memory-alloc-sanity-check option.
- Default=no.])],
+ [default=no]
+ ])],
[USINGMEMCHECKER=$enableval])
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([USINGMEMCHECKER])
+
+## Set the default level.
+if test "X-$USINGMEMCHECKER" = X- ; then
+ USINGMEMCHECKER=no
+fi
+
case "X-$USINGMEMCHECKER" in
X-yes)
- USINGMEMCHECKER=yes
- AC_MSG_RESULT([yes])
AC_DEFINE([USING_MEMCHECKER], [1],
[Define if a memory checking tool will be used on the library,
to cause library to be very picky about memory operations and
also disable the internal free list manager code.])
+ AC_MSG_RESULT([yes])
;;
- *)
- USINGMEMCHECKER=no
+ X-no)
AC_MSG_RESULT([no])
;;
+ *)
+ AC_MSG_ERROR([Unrecognized value: $USINGMEMCHECKER])
+ ;;
esac
## ----------------------------------------------------------------------
## Check if they would like to enable the internal memory allocation sanity
## checking code.
##
-AC_SUBST([MEMORYALLOCSANITYCHECK])
AC_MSG_CHECKING([whether internal memory allocation sanity checking is used])
AC_ARG_ENABLE([memory-alloc-sanity-check],
[AS_HELP_STRING([--enable-memory-alloc-sanity-check],
@@ -2080,20 +2308,35 @@ AC_ARG_ENABLE([memory-alloc-sanity-check],
more memory use and somewhat slower allocation.
This option is orthogonal to the
--enable-using-memchecker option.
- Default=no.])],
+ [default=yes if debug build, otherwise no]
+ ])],
[MEMORYALLOCSANITYCHECK=$enableval])
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([MEMORYALLOCSANITYCHECK])
+
+## Set default
+if test "X-$MEMORYALLOCSANITYCHECK" = X- ; then
+ if test "X-$BUILD_MODE" = "X-debug" ; then
+ MEMORYALLOCSANITYCHECK=yes
+ else
+ MEMORYALLOCSANITYCHECK=no
+ fi
+fi
+
case "X-$MEMORYALLOCSANITYCHECK" in
X-yes)
- MEMORYALLOCSANITYCHECK=yes
- AC_MSG_RESULT([yes])
AC_DEFINE([MEMORY_ALLOC_SANITY_CHECK], [1],
[Define to enable internal memory allocation sanity checking.])
+ AC_MSG_RESULT([yes])
;;
- *)
- MEMORYALLOCSANITYCHECK=no
+ X-no)
AC_MSG_RESULT([no])
;;
+ *)
+ AC_MSG_ERROR([Unrecognized value: $MEMORYALLOCSANITYCHECK])
+ ;;
esac
## Checkpoint the cache
@@ -2164,8 +2407,12 @@ esac
## ----------------------------------------------------------------------
## Print some other parallel information and do some sanity checks.
+## Needs to be done outside of the PARALLEL block since the serial
+## build also needs to have values defined.
##
AC_SUBST([ADD_PARALLEL_FILES]) ADD_PARALLEL_FILES="no"
+AC_SUBST([MPE]) MPE=no
+AC_SUBST([INSTRUMENT_LIBRARY]) INSTRUMENT_LIBRARY=no
if test -n "$PARALLEL"; then
## The 'testpar' directory should participate in the build
@@ -2220,6 +2467,45 @@ if test -n "$PARALLEL"; then
)
fi
+ ## ----------------------------------------------------------------------
+ ## Enable instrumenting of the library's internal operations
+ ## in parallel builds.
+ ##
+
+ ## Set default
+ if test "X-$BUILD_MODE" = "X-debug" ; then
+ INSTRUMENT_LIBRARY=yes
+ else
+ INSTRUMENT_LIBRARY=no
+ fi
+
+ AC_MSG_CHECKING([for instrumented library]);
+ AC_ARG_ENABLE([instrument],
+ [AS_HELP_STRING([--enable-instrument],
+ [Enable library instrumentation of optimization
+ tracing (only used with parallel builds).
+ [default=yes if a parallel debug build, otherwise no]
+ ])],
+ [INSTRUMENT_LIBRARY=$enableval])
+
+ ## Allow this variable to be substituted in
+ ## other files (src/libhdf5.settings.in, etc.)
+ AC_SUBST([INSTRUMENT_LIBRARY])
+
+ case "X-$INSTRUMENT_LIBRARY" in
+ X-yes)
+ AC_DEFINE([HAVE_INSTRUMENTED_LIBRARY], [1],
+ [Define if parallel library will contain instrumentation to detect correct optimization operation])
+ AC_MSG_RESULT([yes])
+ ;;
+ X-no)
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ AC_MSG_ERROR([Unrecognized value: $INSTRUMENT_LIBRARY])
+ ;;
+ esac
+
## --------------------------------------------------------------------
## Do we want MPE instrumentation feature on?
##
@@ -2287,6 +2573,11 @@ fi
## ----------------------------------------------------------------------
## Check if Direct I/O driver is enabled by --enable-direct-vfd
##
+AC_SUBST([DIRECT_VFD])
+
+## Default is no direct VFD
+DIRECT_VFD=no
+
AC_CACHE_VAL([hdf5_cv_direct_io],
AC_CHECK_DECL([O_DIRECT], [hdf5_cv_direct_io=yes], [hdf5_cv_direct_io=no], [[#include <fcntl.h>]]))
AC_CACHE_VAL([hdf5_cv_posix_memalign],
@@ -2319,6 +2610,7 @@ else
AC_MSG_RESULT([no])
fi
+## Direct VFD files are not built if not required.
AM_CONDITIONAL([DIRECT_VFD_CONDITIONAL], [test "X$DIRECT_VFD" = "Xyes"])
## ----------------------------------------------------------------------
@@ -2713,7 +3005,7 @@ if test -n "$ORGANIZATION"; then
CONFIG_USER="$CONFIG_USER at $ORGANIZATION"
fi
-## Configuration mode (production, development, profile, etc) saved above.
+## Configuration mode (production, debug, etc.) saved above.
AC_SUBST([CONFIG_MODE])
## Byte sex from the AC_C_BIGENDIAN macro.
@@ -2829,13 +3121,22 @@ AM_CONDITIONAL([BUILD_ALL_CONDITIONAL], [test "X$BUILD_ALL" = "Xyes"])
## ----------------------------------------------------------------------
## Enable deprecated public API symbols
##
+
+## Enabled unless the build mode is clean.
+if test "X-$BUILD_MODE" = "X-clean" ; then
+ DEPREC_SYMBOLS=no
+else
+ DEPREC_SYMBOLS=yes
+fi
+
AC_SUBST([DEPRECATED_SYMBOLS])
AC_MSG_CHECKING([if deprecated public symbols are available]);
AC_ARG_ENABLE([deprecated-symbols],
[AS_HELP_STRING([--enable-deprecated-symbols],
- [Enable deprecated public API symbols [default=yes]])],
- [DEPREC_SYMBOLS=$enableval],
- [DEPREC_SYMBOLS=yes])
+ [Enable deprecated public API symbols.
+ [default=yes (unless build mode = clean)]
+ ])],
+ [DEPREC_SYMBOLS=$enableval])
case "X-$DEPREC_SYMBOLS" in
X-yes)
@@ -2870,6 +3171,8 @@ if test "X$withval" = "Xv16"; then
elif test "X$withval" = "Xv18"; then
AC_MSG_RESULT([v18])
DEFAULT_API_VERSION=v18
+ AC_DEFINE([USE_18_API_DEFAULT], [1],
+ [Define using v1.8 public API symbols by default])
elif test "X$withval" = "Xv110"; then
AC_MSG_RESULT([v110])
DEFAULT_API_VERSION=v110
@@ -2894,29 +3197,31 @@ AC_SUBST([STRICT_FORMAT_CHECKS])
AC_MSG_CHECKING([whether to perform strict file format checks]);
AC_ARG_ENABLE([strict-format-checks],
[AS_HELP_STRING([--enable-strict-format-checks],
- [Enable strict file format checks, default=yes if
- debug flag is enabled, no otherwise])],
- [STRICT_CHECKS=$enableval])
-
-## Default to yes if debug is enabled
-if test "X-$STRICT_CHECKS" = X- ; then
- if test -z "$DEBUG_PKG" ; then
- STRICT_CHECKS=no
+ [Enable strict file format checks.
+ [default=yes if debug build, otherwise no]
+ ])],
+ [STRICT_FORMAT_CHECKS=$enableval])
+
+## Set the default level. This depends on the compiler mode.
+if test "X-$STRICT_FORMAT_CHECKS" = X- ; then
+ if test "X-$BUILD_MODE" = "X-debug" ; then
+ STRICT_FORMAT_CHECKS=yes
else
- STRICT_CHECKS=yes
+ STRICT_FORMAT_CHECKS=no
fi
fi
-case "X-$STRICT_CHECKS" in
+case "X-$STRICT_FORMAT_CHECKS" in
X-yes)
AC_MSG_RESULT([yes])
- STRICT_FORMAT_CHECKS=yes
AC_DEFINE([STRICT_FORMAT_CHECKS], [1],
[Define if strict file format checks are enabled])
;;
- X-no|*)
+ X-no)
AC_MSG_RESULT([no])
- STRICT_FORMAT_CHECKS=no
+ ;;
+ *)
+ AC_MSG_ERROR([Unrecognized value: $STRICT_FORMAT_CHECKS])
;;
esac
@@ -3068,6 +3373,11 @@ else
enable_static=no
fi
+## Expose things for *.in markup
+AC_SUBST([STATIC_SHARED])
+AC_SUBST([enable_shared])
+AC_SUBST([enable_static])
+
if test "X$enable_static" = "Xyes" && test "X$enable_shared" = "Xyes"; then
STATIC_SHARED="static, shared"
elif test "X$enable_static" = "Xyes"; then
diff --git a/examples/Makefile.in b/examples/Makefile.in
index 0786b04..0b71d01 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -366,16 +366,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -388,7 +389,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -450,8 +450,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -462,11 +462,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -474,6 +474,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -497,6 +498,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -512,6 +514,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/fortran/Makefile.in b/fortran/Makefile.in
index f743e5a..7c20b19 100644
--- a/fortran/Makefile.in
+++ b/fortran/Makefile.in
@@ -422,16 +422,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -444,7 +445,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -506,8 +506,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -518,11 +518,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -530,6 +530,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -553,6 +554,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -568,6 +570,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index bca55ff..673149f 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -371,16 +371,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -393,7 +394,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -455,8 +455,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -467,11 +467,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -479,6 +479,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -502,6 +503,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -517,6 +519,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index dc884d5..5854f75 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -161,6 +161,7 @@ set (f90_F_BASE_SRCS
# normal distribution
${HDF5_F90_SRC_SOURCE_DIR}/H5f90global.F90
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5fortkit.F90
${HDF5_F90_SRC_SOURCE_DIR}/H5_ff.F90
${HDF5_F90_SRC_SOURCE_DIR}/H5Aff.F90
${HDF5_F90_SRC_SOURCE_DIR}/H5Dff.F90
diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90
index e44d90e..b372dc1 100644
--- a/fortran/src/H5Dff.F90
+++ b/fortran/src/H5Dff.F90
@@ -4,7 +4,7 @@
! MODULE H5D
!
! FILE
-! fortran/src/H5Dff.f90
+! fortran/src/H5Dff.F90
!
! PURPOSE
! This file contains Fortran interfaces for H5D functions.
diff --git a/fortran/src/H5Eff.F90 b/fortran/src/H5Eff.F90
index a2efe61..7a0b15b 100644
--- a/fortran/src/H5Eff.F90
+++ b/fortran/src/H5Eff.F90
@@ -4,7 +4,7 @@
! MODULE H5E
!
! FILE
-! fortran/src/H5Eff.f90
+! fortran/src/H5Eff.F90
!
! PURPOSE
! This Module contains Fortran interfaces for H5E functions.
diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90
index c69ad82..165fba0 100644
--- a/fortran/src/H5Fff.F90
+++ b/fortran/src/H5Fff.F90
@@ -4,7 +4,7 @@
! MODULE H5F
!
! FILE
-! H5Fff.f90
+! H5Fff.F90
!
! PURPOSE
! This file contains Fortran interfaces for H5F functions.
diff --git a/fortran/src/H5Gff.F90 b/fortran/src/H5Gff.F90
index 2e002b5..30076a4 100644
--- a/fortran/src/H5Gff.F90
+++ b/fortran/src/H5Gff.F90
@@ -4,7 +4,7 @@
! MODULE H5G
!
! FILE
-! fortran/src/H5Gff.f90
+! fortran/src/H5Gff.F90
!
! PURPOSE
! This file contains Fortran interfaces for H5G functions.
diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90
index da940df..8d4fb16 100644
--- a/fortran/src/H5Off.F90
+++ b/fortran/src/H5Off.F90
@@ -4,7 +4,7 @@
! MODULE H5O
!
! FILE
-! fortran/src/H5Off.f90
+! fortran/src/H5Off.F90
!
! PURPOSE
! This file contains Fortran interfaces for H5O functions.
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index 523ed0b..3989512 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -5273,7 +5273,7 @@ h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len_ptr)
*buf_len_ptr=(size_t_f)c_buf_len_ptr;
ret_value = 0;
- if(c_buf_ptr) HDfree(c_buf_ptr);
+ if(c_buf_ptr) H5free_memory(c_buf_ptr);
return ret_value;
}
diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90
index 97f907b..6c6abe4 100644
--- a/fortran/src/H5Pff.F90
+++ b/fortran/src/H5Pff.F90
@@ -42,7 +42,8 @@ MODULE H5P
USE, INTRINSIC :: ISO_C_BINDING
USE H5GLOBAL
-
+ USE H5fortkit
+
INTERFACE h5pset_fapl_multi_f
MODULE PROCEDURE h5pset_fapl_multi_l
MODULE PROCEDURE h5pset_fapl_multi_s
@@ -7321,6 +7322,520 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
END SUBROUTINE h5pget_mpio_actual_io_mode_f
#endif
+!
+! V I R T U A L D A T S E T S
+!
+
+!****s*
+! NAME
+! h5pset_virtual_view_f
+!
+! PURPOSE
+! Sets the view of the virtual dataset (VDS) to include or exclude missing mapped elements.
+!
+! INPUTS
+! dapl_id - Identifier of the virtual dataset access property list.
+! view - Flag specifying the extent of the data to be included in the view.
+! Valid values are:
+! H5D_VDS_FIRST_MISSING_F
+! H5D_VDS_LAST_AVAILABLE_F
+!
+! OUTPUTS
+!
+! hdferr - Returns 0 if successful and -1 if fails.
+!
+! AUTHOR
+! M. Scot Breitenfeld
+! Nov 2, 2015
+!
+!
+! SOURCE
+ SUBROUTINE h5pset_virtual_view_f(dapl_id, view, hdferr)
+ IMPLICIT NONE
+
+ INTEGER(HID_T), INTENT(IN) :: dapl_id
+ INTEGER , INTENT(IN) :: view
+ INTEGER , INTENT(OUT) :: hdferr
+
+!*****
+ INTERFACE
+ INTEGER FUNCTION h5pset_virtual_view(dapl_id, view) BIND(C,NAME='H5Pset_virtual_view')
+ IMPORT :: HID_T, ENUM_T
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN), VALUE :: dapl_id
+ INTEGER(ENUM_T), INTENT(IN), VALUE :: view
+ END FUNCTION h5pset_virtual_view
+ END INTERFACE
+
+ hdferr = INT( h5pset_virtual_view(dapl_id, INT(view,ENUM_T)) )
+
+ END SUBROUTINE h5pset_virtual_view_f
+
+!****s*
+! NAME
+! h5pget_virtual_view_f
+!
+! PURPOSE
+! Retrieves the view of a virtual dataset accessed with dapl_id.
+!
+! INPUTS
+! dapl_id - Dataset access property list identifier for the virtual dataset
+!
+! OUTPUTS
+! view - The flag specifying the view of the virtual dataset.
+! Valid values are:
+! H5D_VDS_FIRST_MISSING_F
+! H5D_VDS_LAST_AVAILABLE_F
+! hdferr - Returns 0 if successful and -1 if fails.
+!
+! AUTHOR
+! M. Scot Breitenfeld
+! Nov 2, 2015
+!
+! SOURCE
+ SUBROUTINE h5pget_virtual_view_f(dapl_id, view, hdferr)
+ IMPLICIT NONE
+
+ INTEGER(HID_T), INTENT(IN) :: dapl_id
+ INTEGER , INTENT(INOUT) :: view
+ INTEGER , INTENT(OUT) :: hdferr
+!*****
+ INTEGER(ENUM_T) :: view_enum
+ INTERFACE
+ INTEGER FUNCTION h5pget_virtual_view(dapl_id, view) BIND(C,NAME='H5Pget_virtual_view')
+ IMPORT :: HID_T, ENUM_T
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN), VALUE :: dapl_id
+ INTEGER(ENUM_T), INTENT(OUT) :: view
+ END FUNCTION h5pget_virtual_view
+ END INTERFACE
+
+ hdferr = INT( h5pget_virtual_view(dapl_id, view_enum) )
+ view = INT(view_enum)
+
+ END SUBROUTINE h5pget_virtual_view_f
+
+!****s*
+! NAME
+! h5pset_virtual_printf_gap_f
+!
+! PURPOSE
+! Sets the maximum number of missing source files and/or datasets with the printf-style names
+! when getting the extent of an unlimited virtual dataset.
+!
+! INPUTS
+! dapl_id - Dataset access property list identifier for the virtual dataset.
+! gap_size - Maximum number of files and/or datasets allowed to be missing for determining
+! the extent of an unlimited virtual dataset with printf-style mappings.
+!
+! OUTPUTS
+! hdferr - Returns 0 if successful and -1 if fails.
+!
+! AUTHOR
+! M. Scot Breitenfeld
+! Nov 2, 2015
+!
+! HISTORY
+!
+! SOURCE
+ SUBROUTINE h5pset_virtual_printf_gap_f(dapl_id, gap_size, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) :: dapl_id
+ INTEGER(HSIZE_T), INTENT(IN) :: gap_size
+ INTEGER , INTENT(OUT) :: hdferr
+!*****
+ INTERFACE
+ INTEGER FUNCTION h5pset_virtual_printf_gap(dapl_id, gap_size) BIND(C,NAME='H5Pset_virtual_printf_gap')
+ IMPORT :: HID_T, HSIZE_T
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN), VALUE :: dapl_id
+ INTEGER(HSIZE_T), INTENT(IN), VALUE :: gap_size
+ END FUNCTION h5pset_virtual_printf_gap
+ END INTERFACE
+
+ hdferr = INT( h5pset_virtual_printf_gap(dapl_id, gap_size) )
+
+ END SUBROUTINE h5pset_virtual_printf_gap_f
+
+!****s*
+! NAME
+! h5pget_virtual_printf_gap_f
+!
+! PURPOSE
+! Returns the maximum number of missing source files and/or datasets with the
+! printf-style names when getting the extent for an unlimited virtual dataset.
+!
+! INPUTS
+! dapl_id - Dataset access property list identifier for the virtual dataset
+!
+! OUTPUTS
+! gap_size - Maximum number of the files and/or datasets allowed to be missing for
+! determining the extent of an unlimited virtual dataset with printf-style mappings.
+! hdferr - Returns 0 if successful and -1 if fails
+!
+! AUTHOR
+! M. Scot Breitenfeld
+! Nov 2, 2015
+!
+! HISTORY
+!
+! SOURCE
+ SUBROUTINE h5pget_virtual_printf_gap_f(dapl_id, gap_size, hdferr)
+ IMPLICIT NONE
+
+ INTEGER(HID_T) , INTENT(IN) :: dapl_id
+ INTEGER(HSIZE_T), INTENT(OUT) :: gap_size
+ INTEGER , INTENT(OUT) :: hdferr
+!*****
+ INTERFACE
+ INTEGER FUNCTION h5pget_virtual_printf_gap(dapl_id, gap_size) BIND(C,NAME='H5Pget_virtual_printf_gap')
+ IMPORT :: HID_T, HSIZE_T
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN), VALUE :: dapl_id
+ INTEGER(HSIZE_T), INTENT(OUT) :: gap_size
+ END FUNCTION h5pget_virtual_printf_gap
+ END INTERFACE
+
+ hdferr = INT( h5pget_virtual_printf_gap(dapl_id, gap_size) )
+
+ END SUBROUTINE h5pget_virtual_printf_gap_f
+
+!****s*
+! NAME
+! h5pset_virtual_f
+!
+! PURPOSE
+! Sets the mapping between virtual and source datasets.
+!
+! INPUTS
+! dcpl_id - The identifier of the dataset creation property list that will be
+! used when creating the virtual dataset.
+! vspace_id - The dataspace identifier with the selection within the virtual
+! dataset applied, possibly an unlimited selection.
+! src_file_name - The name of the HDF5 file where the source dataset is located.
+! src_dset_name - The path to the HDF5 dataset in the file specified by src_file_name.
+! src_space_id - The source dataset’s dataspace identifier with a selection applied, possibly an unlimited selection
+!
+! OUTPUTS
+! hdferr - Returns 0 if successful and -1 if fails
+
+! AUTHOR
+! M. Scot Breitenfeld
+! Nov 2, 2015
+!
+! HISTORY
+!
+! SOURCE
+ SUBROUTINE h5pset_virtual_f(dcpl_id, vspace_id, src_file_name, src_dset_name, src_space_id, hdferr)
+ IMPLICIT NONE
+
+ INTEGER(HID_T), INTENT(IN) :: dcpl_id
+ INTEGER(HID_T), INTENT(IN) :: vspace_id
+ CHARACTER(LEN=*), INTENT(IN) :: src_file_name
+ CHARACTER(LEN=*), INTENT(IN) :: src_dset_name
+ INTEGER(HID_T), INTENT(IN) :: src_space_id
+ INTEGER, INTENT(OUT) :: hdferr
+!*****
+ CHARACTER(LEN=LEN_TRIM(src_file_name)+1,KIND=C_CHAR) :: c_src_file_name
+ CHARACTER(LEN=LEN_TRIM(src_dset_name)+1,KIND=C_CHAR) :: c_src_dset_name
+
+ INTERFACE
+ INTEGER FUNCTION h5pset_virtual(dcpl_id, vspace_id, c_src_file_name, c_src_dset_name, src_space_id) &
+ BIND(C,NAME='H5Pset_virtual')
+ IMPORT :: C_CHAR
+ IMPORT :: HID_T
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN), VALUE :: dcpl_id
+ INTEGER(HID_T), INTENT(IN), VALUE :: vspace_id
+ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: c_src_file_name
+ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: c_src_dset_name
+ INTEGER(HID_T), INTENT(IN), VALUE :: src_space_id
+ END FUNCTION h5pset_virtual
+ END INTERFACE
+
+ c_src_file_name = TRIM(src_file_name)//C_NULL_CHAR
+ c_src_dset_name = TRIM(src_dset_name)//C_NULL_CHAR
+
+ hdferr = h5pset_virtual(dcpl_id, vspace_id, c_src_file_name, c_src_dset_name, src_space_id)
+
+ END SUBROUTINE h5pset_virtual_f
+
+!****s*
+! NAME
+! h5pget_virtual_count_f
+!
+! PURPOSE
+! Gets the number of mappings for the virtual dataset.
+!
+! INPUTS
+! dcpl_id - The identifier of the virtual dataset creation property list.
+!
+! OUTPUTS
+! count - The number of mappings.
+! hdferr - Returns 0 if successful and -1 if fails
+! AUTHOR
+! M. Scot Breitenfeld
+! Nov 2, 2015
+!
+! HISTORY
+!
+! SOURCE
+ SUBROUTINE h5pget_virtual_count_f(dcpl_id, count, hdferr)
+
+ IMPLICIT NONE
+
+ INTEGER(HID_T), INTENT(IN) :: dcpl_id
+ INTEGER(SIZE_T), INTENT(OUT) :: count
+ INTEGER, INTENT(OUT) :: hdferr
+!*****
+ INTERFACE
+ INTEGER(HID_T) FUNCTION h5pget_virtual_count(dcpl_id, count) BIND(C,NAME='H5Pget_virtual_count')
+ IMPORT :: HID_T, SIZE_T
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN), VALUE :: dcpl_id
+ INTEGER(SIZE_T), INTENT(OUT) :: count
+ END FUNCTION h5pget_virtual_count
+ END INTERFACE
+
+ hdferr = INT( h5pget_virtual_count(dcpl_id, count))
+
+ END SUBROUTINE h5pget_virtual_count_f
+
+!****s*
+! NAME
+! h5pget_virtual_vspace_f
+!
+! PURPOSE
+! Gets a dataspace identifier for the selection within the virtual dataset used in the mapping.
+!
+! INPUTS
+! dcpl_id - The identifier of the virtual dataset creation property list.
+! index - Mapping index.
+! The value of index is 0 (zero) or greater and less than count (0 ≤ index < count),
+! where count is the number of mappings returned by h5pget_virtual_count.
+!
+! OUTPUTS
+! hdferr - Returns 0 if successful and -1 if fails.
+!
+! AUTHOR
+! M. Scot Breitenfeld
+! Nov 2, 2015
+!
+! HISTORY
+!
+! SOURCE
+ SUBROUTINE h5pget_virtual_vspace_f(dcpl_id, index, ds_id, hdferr)
+ IMPLICIT NONE
+
+ INTEGER(HID_T) , INTENT(IN) :: dcpl_id
+ INTEGER(SIZE_T), INTENT(IN) :: index
+ INTEGER(HID_T) , INTENT(OUT) :: ds_id
+ INTEGER, INTENT(OUT) :: hdferr
+
+!*****
+ INTERFACE
+ INTEGER(HID_T) FUNCTION h5pget_virtual_vspace(dcpl_id, index) BIND(C,NAME='H5Pget_virtual_vspace')
+ IMPORT :: HID_T, SIZE_T
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN), VALUE :: dcpl_id
+ INTEGER(SIZE_T), INTENT(IN), VALUE :: index
+ END FUNCTION h5pget_virtual_vspace
+ END INTERFACE
+
+ ds_id = h5pget_virtual_vspace(dcpl_id, index)
+
+ hdferr = 0
+ IF(ds_id.LT.0) hdferr = -1
+
+END SUBROUTINE h5pget_virtual_vspace_f
+
+!****s*
+! NAME
+! h5pget_virtual_srcspace_f
+!
+! PURPOSE
+! Gets a dataspace identifier for the selection within the source dataset used in the mapping.
+!
+! INPUTS
+! dcpl_id - The identifier of the virtual dataset creation property list.
+! index - Mapping index.
+! The value of index is 0 (zero) or greater and less than count (0 ≤ index < count),
+! where count is the number of mappings returned by h5pget_virtual_count.
+!
+!
+! OUTPUTS
+! ds_id - dataspace identifier
+! hdferr - Returns 0 if successful and -1 if fails.
+!
+! AUTHOR
+! M. Scot Breitenfeld
+! Nov 2, 2015
+!
+! HISTORY
+!
+! SOURCE
+SUBROUTINE h5pget_virtual_srcspace_f(dcpl_id, index, ds_id, hdferr)
+ IMPLICIT NONE
+
+ INTEGER(HID_T) , INTENT(IN) :: dcpl_id
+ INTEGER(SIZE_T), INTENT(IN) :: index
+ INTEGER(HID_T) , INTENT(OUT) :: ds_id
+ INTEGER, INTENT(OUT) :: hdferr
+
+!*****
+ INTERFACE
+ INTEGER(HID_T) FUNCTION h5pget_virtual_srcspace(dcpl_id, index) BIND(C,NAME='H5Pget_virtual_srcspace')
+ IMPORT :: HID_T, SIZE_T
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN), VALUE :: dcpl_id
+ INTEGER(SIZE_T), INTENT(IN), VALUE :: index
+ END FUNCTION h5pget_virtual_srcspace
+ END INTERFACE
+
+ ds_id = h5pget_virtual_srcspace(dcpl_id, index)
+
+ hdferr = 0
+ IF(ds_id.LT.0) hdferr = -1
+
+END SUBROUTINE h5pget_virtual_srcspace_f
+
+!****s*
+! NAME
+! h5pget_virtual_filename_f
+!
+! PURPOSE
+! Gets the filename of a source dataset used in the mapping.
+!
+! INPUTS
+! dcpl_id - The identifier of the virtual dataset creation property list.
+! index - Mapping index.
+! The value of index is 0 (zero) or greater and less than count (0 ≤ index < count),
+! where count is the number of mappings returned by h5pget_virtual_count.
+!
+! OUTPUTS
+! name - A buffer containing the name of the file containing the source dataset.
+! hdferr - Returns 0 if successful and -1 if fails.
+!
+! Optional parameters:
+! name_len - The size of name needed to hold the filename. (OUT)
+!
+! AUTHOR
+! M. Scot Breitenfeld
+! Nov 2, 2015
+!
+! HISTORY
+!
+! SOURCE
+SUBROUTINE h5pget_virtual_filename_f(dcpl_id, index, name, hdferr, name_len)
+
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) :: dcpl_id
+ INTEGER(SIZE_T) , INTENT(IN) :: index
+ CHARACTER(LEN=*), INTENT(OUT) :: name
+ INTEGER, INTENT(OUT) :: hdferr
+ INTEGER(SIZE_T), OPTIONAL :: name_len
+!*****
+
+ CHARACTER(LEN=1,KIND=C_CHAR), DIMENSION(1:LEN(name)+1), TARGET :: c_name
+ TYPE(C_PTR) :: f_ptr
+
+ INTERFACE
+ INTEGER(SIZE_T) FUNCTION h5pget_virtual_filename(dcpl_id, index, name, size) BIND(C, NAME='H5Pget_virtual_filename')
+ IMPORT :: HID_T, SIZE_T, C_PTR, C_CHAR
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN), VALUE :: dcpl_id
+ INTEGER(SIZE_T), INTENT(IN), VALUE :: index
+ TYPE(C_PTR), VALUE :: name
+ INTEGER(SIZE_T), INTENT(IN), VALUE :: size
+ END FUNCTION h5pget_virtual_filename
+ END INTERFACE
+
+ hdferr = 0
+ IF(PRESENT(name_len))THEN
+ name_len = INT(h5pget_virtual_filename(dcpl_id, index, C_NULL_PTR, 0_SIZE_T), SIZE_T)
+ IF(name_len.LT.0) hdferr = -1
+ ELSE
+ f_ptr = C_LOC(c_name(1)(1:1))
+
+ IF(INT(h5pget_virtual_filename(dcpl_id, index, f_ptr, INT(LEN(name)+1,SIZE_T)), SIZE_T).LT.0)THEN
+ hdferr = -1
+ ELSE
+ CALL HD5c2fstring(name,c_name,LEN(name))
+ ENDIF
+
+ ENDIF
+
+
+END SUBROUTINE h5pget_virtual_filename_f
+
+!****s*
+! NAME
+! h5pget_virtual_dsetname_f
+!
+! PURPOSE
+! Gets the name of a source dataset used in the mapping.
+!
+! INPUTS
+! dcpl_id - The identifier of the virtual dataset creation property list.
+! index - Mapping index.
+! The value of index is 0 (zero) or greater and less than count (0 ≤ index < count),
+! where count is the number of mappings returned by h5pget_virtual_count.
+!
+! OUTPUTS
+! name - A buffer containing the name of the source dataset.
+! hdferr - Returns 0 if successful and -1 if fails.
+!
+! Optional parameters:
+! name_len - The size of name needed to hold the source dataset name. (OUT)
+!
+! AUTHOR
+! M. Scot Breitenfeld
+! January 28, 2016
+!
+! HISTORY
+!
+! SOURCE
+SUBROUTINE h5pget_virtual_dsetname_f(dcpl_id, index, name, hdferr, name_len)
+
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) :: dcpl_id
+ INTEGER(SIZE_T) , INTENT(IN) :: index
+ CHARACTER(LEN=*), INTENT(OUT) :: name
+ INTEGER, INTENT(OUT) :: hdferr
+ INTEGER(SIZE_T), OPTIONAL :: name_len
+!*****
+
+ CHARACTER(LEN=1,KIND=C_CHAR), DIMENSION(1:LEN(name)+1), TARGET :: c_name
+ TYPE(C_PTR) :: f_ptr
+
+ INTERFACE
+ INTEGER(SIZE_T) FUNCTION h5pget_virtual_dsetname(dcpl_id, index, name, size) BIND(C, NAME='H5Pget_virtual_dsetname')
+ IMPORT :: HID_T, SIZE_T, C_PTR, C_CHAR
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN), VALUE :: dcpl_id
+ INTEGER(SIZE_T), INTENT(IN), VALUE :: index
+ TYPE(C_PTR), VALUE :: name
+ INTEGER(SIZE_T), INTENT(IN), VALUE :: size
+ END FUNCTION h5pget_virtual_dsetname
+ END INTERFACE
+
+ hdferr = 0
+ IF(PRESENT(name_len))THEN
+ name_len = INT(h5pget_virtual_dsetname(dcpl_id, index, C_NULL_PTR, 0_SIZE_T), SIZE_T)
+ IF(name_len.LT.0) hdferr = -1
+ ELSE
+ f_ptr = C_LOC(c_name(1)(1:1))
+
+ IF(INT(h5pget_virtual_dsetname(dcpl_id, index, f_ptr, INT(LEN(name)+1,SIZE_T)), SIZE_T).LT.0)THEN
+ hdferr = -1
+ ELSE
+ CALL HD5c2fstring(name,c_name,LEN(name))
+ ENDIF
+
+ ENDIF
+
+END SUBROUTINE h5pget_virtual_dsetname_f
+
END MODULE H5P
diff --git a/fortran/src/H5Rff.F90 b/fortran/src/H5Rff.F90
index a90bd9a..7ba91c4 100644
--- a/fortran/src/H5Rff.F90
+++ b/fortran/src/H5Rff.F90
@@ -4,7 +4,7 @@
! MODULE H5R
!
! FILE
-! fortran/src/H5Rff.f90
+! fortran/src/H5Rff.F90
!
! PURPOSE
! This file contains Fortran interfaces for H5R functions.
diff --git a/fortran/src/H5Sff.F90 b/fortran/src/H5Sff.F90
index aeb3314..cb1388e 100644
--- a/fortran/src/H5Sff.F90
+++ b/fortran/src/H5Sff.F90
@@ -4,7 +4,7 @@
! MODULE H5S
!
! FILE
-! fortran/src/H5Sff.f90
+! fortran/src/H5Sff.F90
!
! PURPOSE
! This file contains Fortran interfaces for H5S functions.
@@ -41,7 +41,7 @@
!*****
MODULE H5S
- USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_INT
USE H5GLOBAL
CONTAINS
@@ -1232,7 +1232,7 @@ CONTAINS
ENDIF
! Case of optional parameters.
!
- ! Find the rank of the dataspace to allocate memery for
+ ! Find the rank of the dataspace to allocate memory for
! default stride and block arrays.
!
CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr)
@@ -1378,7 +1378,7 @@ CONTAINS
! endif
! Case of optional parameters.
!
- ! Find the rank of the dataspace to allocate memery for
+ ! Find the rank of the dataspace to allocate memory for
! default stride and block arrays.
!
! CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr)
@@ -1751,4 +1751,118 @@ CONTAINS
END SUBROUTINE h5sextent_equal_f
+!
+!****s* H5S/h5sget_regular_hyperslab_f
+!
+! NAME
+! h5sget_regular_hyperslab_f
+!
+! PURPOSE
+! Retrieves a regular hyperslab selection.
+!
+! INPUTS
+! space_id - The identifier of the dataspace.
+! OUTPUTS
+! start - Offset of the start of the regular hyperslab.
+! stride - Stride of the regular hyperslab.
+! count - Number of blocks in the regular hyperslab.
+! block - Size of a block in the regular hyperslab.
+! hdferr - Returns 0 if successful and -1 if fails.
+!
+! AUTHOR
+! M. Scot Breitenfeld
+! January, 28 2016
+! SOURCE
+ SUBROUTINE h5sget_regular_hyperslab_f(space_id, start, stride, count, block, hdferr)
+
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: space_id
+ INTEGER(HSIZE_T), INTENT(OUT), DIMENSION(*), TARGET :: start
+ INTEGER(HSIZE_T), INTENT(OUT), DIMENSION(*), TARGET :: stride
+ INTEGER(HSIZE_T), INTENT(OUT), DIMENSION(*), TARGET :: count
+ INTEGER(HSIZE_T), INTENT(OUT), DIMENSION(*), TARGET :: block
+ INTEGER, INTENT(OUT) :: hdferr
+!*****
+ TYPE(C_PTR) :: start_c, stride_c, count_c, block_c
+ INTEGER :: n
+
+ INTERFACE
+ INTEGER FUNCTION h5sget_regular_hyperslab(space_id, start, stride, count, block) BIND(C,NAME='H5Sget_regular_hyperslab')
+ IMPORT :: HID_T, C_PTR
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN), VALUE :: space_id
+ TYPE(C_PTR), VALUE :: start, stride, count, block
+ END FUNCTION h5sget_regular_hyperslab
+ END INTERFACE
+
+ hdferr = 0
+
+ start_c = C_LOC(start(1))
+ stride_c = C_LOC(stride(1))
+ count_c = C_LOC(count(1))
+ block_c = C_LOC(block(1))
+
+ IF(INT(h5sget_regular_hyperslab(space_id, start_c, stride_c, count_c, block_c)).LT.0) hdferr = -1
+
+ ! Reverse the C arrays description values of the hyperslab because
+ ! the hyperslab was for a C stored hyperslab
+
+ CALL H5Sget_simple_extent_ndims_f(space_id,n,hdferr)
+ IF(hdferr.LT.0.OR.n.EQ.0)THEN
+ hdferr=-1
+ ELSE
+ start(1:n) = start(n:1:-1)
+ stride(1:n) = stride(n:1:-1)
+ count(1:n) = count(n:1:-1)
+ block(1:n) = block(n:1:-1)
+ ENDIF
+
+ END SUBROUTINE h5sget_regular_hyperslab_f
+
+!****s* H5S/h5sis_regular_hyperslab_f
+!
+! NAME
+! h5sis_regular_hyperslab_f
+!
+! PURPOSE
+! Retrieves a regular hyperslab selection.
+!
+! INPUTS
+! space_id - The identifier of the dataspace.
+! OUTPUTS
+! IsRegular - TRUE or FALSE for hyperslab selection if successful.
+! hdferr - Returns 0 if successful and -1 if fails.
+!
+! AUTHOR
+! M. Scot Breitenfeld
+! January, 28 2016
+! SOURCE
+ SUBROUTINE h5sis_regular_hyperslab_f(space_id, IsRegular, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: space_id
+ LOGICAL :: IsRegular
+ INTEGER, INTENT(OUT) :: hdferr
+!*****
+ INTEGER(C_INT) :: status
+
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5Sis_regular_hyperslab(space_id) BIND(C,NAME='H5Sis_regular_hyperslab')
+ IMPORT :: HID_T, C_INT
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN), VALUE :: space_id
+ END FUNCTION H5Sis_regular_hyperslab
+ END INTERFACE
+
+ status = H5Sis_regular_hyperslab(space_id)
+
+ hdferr = 0
+ IsRegular = .FALSE.
+ IF(status.GT.0)THEN
+ IsRegular = .TRUE.
+ ELSE IF(status.LT.0)THEN
+ hdferr = -1
+ ENDIF
+
+ END SUBROUTINE H5Sis_regular_hyperslab_f
+
END MODULE H5S
diff --git a/fortran/src/H5_buildiface.F90 b/fortran/src/H5_buildiface.F90
index 9a42cbf..471052f 100644
--- a/fortran/src/H5_buildiface.F90
+++ b/fortran/src/H5_buildiface.F90
@@ -4,7 +4,7 @@
! Executable: H5_buildiface
!
! FILE
-! fortran/src/H5_buildiface.f90
+! fortran/src/H5_buildiface.F90
!
! PURPOSE
! This stand alone program is used at build time to generate the module
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index f3bc42f..d7b952d 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -476,6 +476,10 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5d_flags[22] = (int_f)H5D_MPIO_CHUNK_COLLECTIVE;
h5d_flags[23] = (int_f)H5D_MPIO_CHUNK_MIXED;
h5d_flags[24] = (int_f)H5D_MPIO_CONTIGUOUS_COLLECTIVE;
+ h5d_flags[25] = (int_f)H5D_VDS_ERROR;
+ h5d_flags[26] = (int_f)H5D_VDS_FIRST_MISSING;
+ h5d_flags[27] = (int_f)H5D_VDS_LAST_AVAILABLE;
+ h5d_flags[28] = (int_f)H5D_VIRTUAL;
/*
* H5E flags
diff --git a/fortran/src/H5f90.h b/fortran/src/H5f90.h
index c45cfcb..7082d1d 100644
--- a/fortran/src/H5f90.h
+++ b/fortran/src/H5f90.h
@@ -22,7 +22,7 @@
#include "H5f90i.h"
#include "H5f90proto.h"
-/* Constants used in H5Rff.f90 and H5Rf.c files */
+/* Constants used in H5Rff.F90 and H5Rf.c files */
#define REF_REG_BUF_LEN_F 3
/* Constants used in H5Gf.c files */
diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90
index 947eff4..ac59251 100644
--- a/fortran/src/H5f90global.F90
+++ b/fortran/src/H5f90global.F90
@@ -4,7 +4,7 @@
! MODULE H5GLOBAL
!
! FILE
-! src/fortran/H5f90global.f90
+! src/fortran/H5f90global.F90
!
! PURPOSE
! This module is used to pass C stubs for H5 Fortran APIs. The C stubs are
@@ -46,12 +46,19 @@ MODULE H5GLOBAL
IMPLICIT NONE
+ ! Enumerate data type that is interoperable with C.
+ ENUM, BIND(C)
+ ENUMERATOR :: enum_dtype
+ END ENUM
+ INTEGER, PARAMETER :: ENUM_T = KIND(enum_dtype)
+
+
! Definitions for reference datatypes.
! If you change the value of these parameters, do not forget to change corresponding
! values in the H5f90.h file.
INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3
- ! Parameters used in the function 'h5kind_to_type' located in H5_ff.f90.
+ ! Parameters used in the function 'h5kind_to_type' located in H5_ff.F90.
! The flag is used to tell the function whether the kind input variable
! is for a REAL or INTEGER data type.
@@ -366,11 +373,11 @@ MODULE H5GLOBAL
EQUIVALENCE(H5G_flags(10), H5G_STORAGE_TYPE_SYMBOL_TABLE_F)
EQUIVALENCE(H5G_flags(11), H5G_STORAGE_TYPE_COMPACT_F)
EQUIVALENCE(H5G_flags(12), H5G_STORAGE_TYPE_DENSE_F)
+
!
! H5D flags declaration
!
-
- INTEGER, PARAMETER :: H5D_FLAGS_LEN = 25
+ INTEGER, PARAMETER :: H5D_FLAGS_LEN = 29
INTEGER :: H5D_flags(H5D_FLAGS_LEN)
INTEGER, PARAMETER :: H5D_SIZE_FLAGS_LEN = 2
INTEGER(SIZE_T) :: H5D_size_flags(H5D_SIZE_FLAGS_LEN)
@@ -418,6 +425,10 @@ MODULE H5GLOBAL
INTEGER :: H5D_MPIO_CHUNK_COLLECTIVE_F
INTEGER :: H5D_MPIO_CHUNK_MIXED_F
INTEGER :: H5D_MPIO_CONTIG_COLLECTIVE_F
+ INTEGER :: H5D_VDS_ERROR_F
+ INTEGER :: H5D_VDS_FIRST_MISSING_F
+ INTEGER :: H5D_VDS_LAST_AVAILABLE_F
+ INTEGER :: H5D_VIRTUAL_F
EQUIVALENCE(H5D_flags(1), H5D_COMPACT_F)
EQUIVALENCE(H5D_flags(2), H5D_CONTIGUOUS_F)
@@ -449,6 +460,10 @@ MODULE H5GLOBAL
EQUIVALENCE(H5D_flags(23), H5D_MPIO_CHUNK_COLLECTIVE_F)
EQUIVALENCE(H5D_flags(24), H5D_MPIO_CHUNK_MIXED_F)
EQUIVALENCE(H5D_flags(25), H5D_MPIO_CONTIG_COLLECTIVE_F)
+ EQUIVALENCE(H5D_flags(26), H5D_VDS_ERROR_F)
+ EQUIVALENCE(H5D_flags(27), H5D_VDS_FIRST_MISSING_F)
+ EQUIVALENCE(H5D_flags(28), H5D_VDS_LAST_AVAILABLE_F)
+ EQUIVALENCE(H5D_flags(29), H5D_VIRTUAL_F)
EQUIVALENCE(H5D_size_flags(1), H5D_CHUNK_CACHE_NSLOTS_DFLT_F)
EQUIVALENCE(H5D_size_flags(2), H5D_CHUNK_CACHE_NBYTES_DFLT_F)
diff --git a/fortran/src/H5fortkit.F90 b/fortran/src/H5fortkit.F90
new file mode 100644
index 0000000..9afd890
--- /dev/null
+++ b/fortran/src/H5fortkit.F90
@@ -0,0 +1,58 @@
+!****h* H5fortkit/H5fortkit
+! PURPOSE
+! Routines to deal with C-FORTRAN issues.
+!
+! COPYRIGHT
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! 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. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+MODULE H5fortkit
+
+CONTAINS
+
+!****if* H5fortkit/HD5c2fstring
+! NAME
+! HD5c2fstring
+! INPUTS
+! cstring - C string stored as a string array of size 'len' of string size LEN=1
+! len - length of Fortran string
+! OUTPUT
+! fstring - Fortran string array of LEN=1
+! PURPOSE
+! Copies a Fortran array of strings having a length of one to a fortran string and removes the C Null
+! terminator. The Null terminator is returned from C when calling the C APIs directly.
+!
+! The fortran standard does not allow C_LOC to be used on a character string of
+! length greater than one, which is why we use the array of characters instead.
+!
+! SOURCE
+ SUBROUTINE HD5c2fstring(fstring,cstring,len)
+!*****
+ IMPLICIT NONE
+
+ INTEGER :: i
+ INTEGER :: len
+ CHARACTER(LEN=len) :: fstring
+ CHARACTER(LEN=1), DIMENSION(1:len) :: cstring
+
+ fstring = ''
+ DO i = 1, len
+ IF (cstring(i)(1:1)==CHAR(0)) EXIT
+ fstring(i:i) = cstring(i)(1:1)
+ END DO
+
+ END SUBROUTINE HD5c2fstring
+
+END MODULE H5fortkit
diff --git a/fortran/src/HDF5.F90 b/fortran/src/HDF5.F90
index 64f5be6..cbe4c83 100644
--- a/fortran/src/HDF5.F90
+++ b/fortran/src/HDF5.F90
@@ -4,7 +4,7 @@
! MODULE HDF5
!
! FILE
-! src/fortran/src/HDF5.f90
+! src/fortran/src/HDF5.F90
!
! PURPOSE
! This is the main module used for linking to the Fortran HDF library.
diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am
index eb45f60..f4d192b 100644
--- a/fortran/src/Makefile.am
+++ b/fortran/src/Makefile.am
@@ -46,9 +46,9 @@ endif
libhdf5_fortran_la_SOURCES=H5f90global.F90 \
H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \
H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \
- H5Tff.F90 H5Zff.F90 H5_gen.f90 \
+ H5Tff.F90 H5Zff.F90 H5_gen.F90 H5fortkit.F90 \
H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \
- H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.f90
+ H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.F90
# HDF5 Fortran library depends on HDF5 Library.
libhdf5_fortran_la_LIBADD=$(LIBHDF5)
@@ -153,7 +153,7 @@ H5Gff.lo: $(srcdir)/H5Gff.F90 H5f90global.lo
H5Iff.lo: $(srcdir)/H5Iff.F90 H5f90global.lo
H5Lff.lo: $(srcdir)/H5Lff.F90 H5f90global.lo
H5Off.lo: $(srcdir)/H5Off.F90 H5f90global.lo
-H5Pff.lo: $(srcdir)/H5Pff.F90 H5f90global.lo
+H5Pff.lo: $(srcdir)/H5Pff.F90 H5f90global.lo H5fortkit.lo
H5Rff.lo: $(srcdir)/H5Rff.F90 H5f90global.lo
H5Sff.lo: $(srcdir)/H5Sff.F90 H5f90global.lo
H5Tff.lo: $(srcdir)/H5Tff.F90 H5f90global.lo
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index 78ba72d..8f61e6a 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -164,9 +164,9 @@ libhdf5_fortran_la_DEPENDENCIES = $(LIBHDF5)
am_libhdf5_fortran_la_OBJECTS = H5f90global.lo H5fortran_types.lo \
H5_ff.lo H5Aff.lo H5Dff.lo H5Eff.lo H5Fff.lo H5Gff.lo H5Iff.lo \
H5Lff.lo H5Off.lo H5Pff.lo H5Rff.lo H5Sff.lo H5Tff.lo H5Zff.lo \
- H5_gen.lo H5f90kit.lo H5_f.lo H5Af.lo H5Df.lo H5Ef.lo H5Ff.lo \
- H5Gf.lo H5If.lo H5Lf.lo H5Of.lo H5Pf.lo H5Rf.lo H5Sf.lo \
- H5Tf.lo H5Zf.lo HDF5.lo
+ H5_gen.lo H5fortkit.lo H5f90kit.lo H5_f.lo H5Af.lo H5Df.lo \
+ H5Ef.lo H5Ff.lo H5Gf.lo H5If.lo H5Lf.lo H5Of.lo H5Pf.lo \
+ H5Rf.lo H5Sf.lo H5Tf.lo H5Zf.lo HDF5.lo
libhdf5_fortran_la_OBJECTS = $(am_libhdf5_fortran_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -229,13 +229,6 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
-FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS)
-LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS)
-AM_V_FC = $(am__v_FC_@AM_V@)
-am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@)
-am__v_FC_0 = @echo " FC " $@;
-am__v_FC_1 =
SOURCES = $(libhdf5_fortran_la_SOURCES) $(H5_buildiface_SOURCES) \
H5match_types.c
DIST_SOURCES = $(libhdf5_fortran_la_SOURCES) $(H5_buildiface_SOURCES) \
@@ -466,16 +459,17 @@ AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ -I$(top_srcdir)/src \
-I$(top_srcdir)/fortran/src
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@ $(am__append_1)
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -488,7 +482,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -550,8 +543,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -562,11 +555,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -574,6 +567,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -597,6 +591,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -612,6 +607,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
@@ -754,9 +750,9 @@ libhdf5_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISI
libhdf5_fortran_la_SOURCES = H5f90global.F90 \
H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \
H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \
- H5Tff.F90 H5Zff.F90 H5_gen.f90 \
+ H5Tff.F90 H5Zff.F90 H5_gen.F90 H5fortkit.F90 \
H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \
- H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.f90
+ H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.F90
# HDF5 Fortran library depends on HDF5 Library.
@@ -964,12 +960,6 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-.f90.obj:
- $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'`
-
-.f90.lo:
- $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $<
-
mostlyclean-libtool:
-rm -f *.lo
@@ -1426,7 +1416,7 @@ H5Gff.lo: $(srcdir)/H5Gff.F90 H5f90global.lo
H5Iff.lo: $(srcdir)/H5Iff.F90 H5f90global.lo
H5Lff.lo: $(srcdir)/H5Lff.F90 H5f90global.lo
H5Off.lo: $(srcdir)/H5Off.F90 H5f90global.lo
-H5Pff.lo: $(srcdir)/H5Pff.F90 H5f90global.lo
+H5Pff.lo: $(srcdir)/H5Pff.F90 H5f90global.lo H5fortkit.lo
H5Rff.lo: $(srcdir)/H5Rff.F90 H5f90global.lo
H5Sff.lo: $(srcdir)/H5Sff.F90 H5f90global.lo
H5Tff.lo: $(srcdir)/H5Tff.F90 H5f90global.lo
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index 1333262..42b5642 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -318,6 +318,16 @@ H5P_mp_H5PREGISTER_PTR
H5P_mp_H5PINSERT_PTR
H5P_mp_H5PGET_FILE_IMAGE_F
H5P_mp_H5PSET_FILE_IMAGE_F
+H5P_mp_H5PSET_VIRTUAL_VIEW_F
+H5P_mp_H5PGET_VIRTUAL_VIEW_F
+H5P_mp_H5PSET_VIRTUAL_PRINTF_GAP_F
+H5P_mp_H5PGET_VIRTUAL_PRINTF_GAP_F
+H5P_mp_H5PSET_VIRTUAL_F
+H5P_mp_H5PGET_VIRTUAL_COUNT_F
+H5P_mp_H5PGET_VIRTUAL_VSPACE_F
+H5P_mp_H5PGET_VIRTUAL_SRCSPACE_F
+H5P_mp_H5PGET_VIRTUAL_FILENAME_F
+H5P_mp_H5PGET_VIRTUAL_DSETNAME_F
; Parallel
@H5_NOPAREXP@H5P_mp_H5PSET_FAPL_MPIO_F
@H5_NOPAREXP@H5P_mp_H5PGET_FAPL_MPIO_F
@@ -367,6 +377,8 @@ H5S_mp_H5SGET_SELECT_TYPE_F
H5S_mp_H5SDECODE_F
H5S_mp_H5SENCODE_F
H5S_mp_H5SEXTENT_EQUAL_F
+H5S_mp_H5SGET_REGULAR_HYPERSLAB_F
+H5S_mp_H5SIS_REGULAR_HYPERSLAB_F
; H5T
H5T_mp_H5TOPEN_F
H5T_mp_H5TCOMMIT_F
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index 7bf152f..a95c9e2 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -470,16 +470,17 @@ AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ -I$(top_builddir)/fortran/src \
$(F9XMODFLAG)$(top_builddir)/fortran/src
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@ $(am__append_1)
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -492,7 +493,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -554,8 +554,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -566,11 +566,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -578,6 +578,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -601,6 +602,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -616,6 +618,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/fortran/test/fortranlib_test_F03.F90 b/fortran/test/fortranlib_test_F03.F90
index 5b386b9..070cd73 100644
--- a/fortran/test/fortranlib_test_F03.F90
+++ b/fortran/test/fortranlib_test_F03.F90
@@ -174,6 +174,14 @@ PROGRAM fortranlibtest_F03
CALL test_get_file_image(ret_total_error)
CALL write_test_status(ret_total_error, ' Testing get file image ', total_error)
+! write(*,*)
+! write(*,*) '========================================='
+! write(*,*) 'Testing VDS '
+! write(*,*) '========================================='
+
+ ret_total_error = 0
+ CALL test_vds(ret_total_error)
+ CALL write_test_status(ret_total_error, ' Testing vds ', total_error)
WRITE(*,*)
diff --git a/fortran/test/tH5P_F03.F90 b/fortran/test/tH5P_F03.F90
index 8982fc2..15bd86f 100644
--- a/fortran/test/tH5P_F03.F90
+++ b/fortran/test/tH5P_F03.F90
@@ -617,4 +617,476 @@ SUBROUTINE external_test_offset(cleanup,total_error)
CALL check("h5_cleanup_f", error, total_error)
END SUBROUTINE external_test_offset
+
+!****h* root/fortran/test/tH5P_F03.f90
+!
+! NAME
+! test_vds
+!
+! FUNCTION
+! Tests VDS API wrappers
+!
+! RETURNS:
+! Success: 0
+! Failure: number of errors
+!
+! FORTRAN Programmer: M. Scot Breitenfeld
+! February 1, 2016
+!
+!-------------------------------------------------------------------------
+!
+SUBROUTINE test_vds(total_error)
+
+ USE ISO_C_BINDING
+ IMPLICIT NONE
+
+ INTEGER, INTENT(INOUT) :: total_error
+
+ INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(9) !should map to INTEGER*4 on most modern processors
+ INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(18) !should map to INTEGER*8 on most modern processors
+
+ CHARACTER(LEN=6), PARAMETER :: VFILENAME="vds.h5"
+ CHARACTER(LEN=3), PARAMETER :: DATASET="VDS"
+ INTEGER :: VDSDIM0
+ INTEGER, PARAMETER :: VDSDIM1 = 10
+ INTEGER, PARAMETER :: VDSDIM2 = 15
+
+ INTEGER :: DIM0
+ INTEGER, PARAMETER :: DIM0_1= 4 ! Initial size of the source datasets
+ INTEGER, PARAMETER :: DIM1 = 10
+ INTEGER, PARAMETER :: DIM2 = 15
+ INTEGER, PARAMETER :: RANK = 3
+ INTEGER(hsize_t), PARAMETER :: PLANE_STRIDE = 4
+
+ CHARACTER(LEN=4), DIMENSION(1:PLANE_STRIDE) :: SRC_FILE = (/"a.h5","b.h5","c.h5","d.h5"/)
+ CHARACTER(LEN=3), DIMENSION(1:PLANE_STRIDE) :: SRC_DATASET = (/"AAA","BBB","CCC","DDD"/)
+
+
+ INTEGER(hid_t) :: vfile, file, src_space, mem_space, vspace, vdset, dset !Handles
+ INTEGER(hid_t) :: dcpl, dapl
+ INTEGER :: error
+ INTEGER(hsize_t), DIMENSION(1:3) :: vdsdims = (/4*DIM0_1, VDSDIM1, VDSDIM2/), &
+ vdsdims_max, &
+ dims = (/DIM0_1, DIM1, DIM2/), &
+ memdims = (/DIM0_1, DIM1, DIM2/), &
+ extdims = (/0, DIM1, DIM2/), & ! Dimensions of the extended source datasets
+ chunk_dims = (/DIM0_1, DIM1, DIM2/), &
+ dims_max, &
+ vdsdims_out, vdsdims_max_out, &
+ start, & ! Hyperslab parameters
+ stride, &
+ count, &
+ src_count, block
+ INTEGER(hsize_t), DIMENSION(1:2,1:3) :: vdsdims_out_correct
+
+ INTEGER(hsize_t), DIMENSION(1:3) :: start_out, & !Hyperslab PARAMETER out
+ stride_out, count_out, count_correct, block_out
+ INTEGER(hsize_t), DIMENSION(1:3,1:PLANE_STRIDE) :: start_correct
+
+ INTEGER :: i, j
+ INTEGER :: layout ! Storage layout
+ INTEGER(size_t) :: num_map ! Number of mappings
+ INTEGER(size_t) :: len ! Length of the string also a RETURN value
+ CHARACTER(LEN=180) :: filename
+ ! Different sized character buffers
+ CHARACTER(len=LEN(SRC_FILE(1))-3) :: SRC_FILE_LEN_TINY
+ CHARACTER(len=LEN(SRC_FILE(1))-1) :: SRC_FILE_LEN_SMALL
+ CHARACTER(len=LEN(SRC_FILE(1))) :: SRC_FILE_LEN_EXACT
+ CHARACTER(len=LEN(SRC_FILE(1))+1) :: SRC_FILE_LEN_LARGE
+ CHARACTER(len=LEN(SRC_FILE(1))+10) :: SRC_FILE_LEN_HUGE
+ CHARACTER(len=LEN(SRC_DATASET(1))) :: SRC_DATASET_LEN_EXACT
+
+ INTEGER(HID_T) :: space_out
+
+ INTEGER :: s_type, virtual_view
+ INTEGER :: type1, type2
+
+ CHARACTER(LEN=180) :: dsetname
+ INTEGER, DIMENSION(DIM0_1*DIM1*DIM2), TARGET :: wdata
+ TYPE(C_PTR) :: f_ptr
+ INTEGER(SIZE_T) :: nsize
+ LOGICAL :: IsRegular
+ INTEGER(HSIZE_T) :: gap_size
+
+ ! For testing against
+ vdsdims_out_correct(1,1) = DIM0_1*5
+ vdsdims_out_correct(2,1) = DIM0_1*8
+ vdsdims_out_correct(1:2,2) = VDSDIM1
+ vdsdims_out_correct(1:2,3) = VDSDIM2
+
+ VDSDIM0 = H5S_UNLIMITED_F
+ DIM0 = H5S_UNLIMITED_F
+ vdsdims_max = (/VDSDIM0, VDSDIM1, VDSDIM2/)
+ dims_max = (/DIM0, DIM1, DIM2/)
+
+ !
+ ! Create source files and datasets.
+ !
+ DO i = 1, PLANE_STRIDE
+ !
+ ! Initialize data for i-th source dataset.
+ DO j = 1, DIM0_1*DIM1*DIM2
+ wdata(j) = i
+ ENDDO
+ !
+ ! Create the source files and datasets. Write data to each dataset and
+ ! close all resources.
+ CALL h5fcreate_f(SRC_FILE(i), H5F_ACC_TRUNC_F, file, error)
+ CALL check("h5fcreate_f", error, total_error)
+
+ CALL h5screate_simple_f(RANK, dims, src_space, error, dims_max)
+ CALL check("h5screate_simple_f", error, total_error)
+ CALL h5pcreate_f(H5P_DATASET_CREATE_F, dcpl, error)
+ CALL check("h5pcreate_f", error, total_error)
+ CALL h5pset_chunk_f(dcpl, RANK, chunk_dims, error)
+ CALL check("h5pset_chunk_f",error, total_error)
+
+ CALL h5dcreate_f(file, SRC_DATASET(i), H5T_NATIVE_INTEGER, src_space, dset, error, dcpl, H5P_DEFAULT_F, H5P_DEFAULT_F)
+ CALL check("h5dcreate_f",error, total_error)
+ f_ptr = C_LOC(wdata(1))
+ CALL H5Dwrite_f(dset, H5T_NATIVE_INTEGER, f_ptr, error)
+ CALL check("H5Dwrite_f",error, total_error)
+ CALL H5Sclose_f(src_space, error)
+ CALL check("H5Sclose_f",error, total_error)
+ CALL H5Pclose_f(dcpl, error)
+ CALL check("H5Pclose_f",error, total_error)
+ CALL H5Dclose_f(dset, error)
+ CALL check("H5Dclose_f",error, total_error)
+ CALL H5Fclose_f(file, error)
+ CALL check("H5Fclose_f",error, total_error)
+ ENDDO
+
+ CALL h5fcreate_f(VFILENAME, H5F_ACC_TRUNC_F, vfile, error)
+ CALL check("h5fcreate_f", error, total_error)
+
+ ! Create VDS dataspace.
+ CALL H5Screate_simple_f(RANK, vdsdims, vspace, error, vdsdims_max)
+ CALL check("H5Screate_simple_f", error, total_error)
+
+ ! Create dataspaces for the source dataset.
+ CALL H5Screate_simple_f(RANK, dims, src_space, error, dims_max)
+ CALL check("H5Screate_simple_f", error, total_error)
+
+ ! Create VDS creation property
+ CALL H5Pcreate_f (H5P_DATASET_CREATE_F, dcpl, error)
+ CALL check("H5Pcreate_f", error, total_error)
+
+ ! Initialize hyperslab values
+ start(1:3) = 0
+ stride(1:3) = (/PLANE_STRIDE,1_hsize_t,1_hsize_t/) ! we will select every fifth plane in VDS
+ count(1:3) = (/H5S_UNLIMITED_F,1_hsize_t,1_hsize_t/)
+ src_count(1:3) = (/H5S_UNLIMITED_F,1_hsize_t,1_hsize_t/)
+ block(1:3) = (/1, DIM1, DIM2/)
+
+ !
+ ! Build the mappings
+ !
+ start_correct = 0
+ CALL H5Sselect_hyperslab_f(src_space, H5S_SELECT_SET_F, start, src_count, error, block=block)
+ CALL check("H5Sselect_hyperslab_f", error, total_error)
+ DO i = 1, PLANE_STRIDE
+ start_correct(1,i) = start(1)
+ CALL H5Sselect_hyperslab_f(vspace, H5S_SELECT_SET_F, start, count, error, stride=stride, block=block)
+ CALL check("H5Sselect_hyperslab_f", error, total_error)
+
+ IF(i.eq.1)THEN ! check src_file and src_dataset with trailing blanks
+ CALL H5Pset_virtual_f (dcpl, vspace, SRC_FILE(i)//" ", SRC_DATASET(i)//" ", src_space, error)
+ ELSE
+ CALL H5Pset_virtual_f (dcpl, vspace, SRC_FILE(i), SRC_DATASET(i), src_space, error)
+ ENDIF
+ CALL check("H5Pset_virtual_f", error, total_error)
+ start(1) = start(1) + 1
+ ENDDO
+
+ CALL H5Sselect_none_f(vspace, error)
+ CALL check("H5Sselect_none_f", error, total_error)
+
+ ! Create a virtual dataset
+ CALL H5Dcreate_f(vfile, DATASET, H5T_NATIVE_INTEGER, vspace, vdset, error, dcpl, H5P_DEFAULT_F, H5P_DEFAULT_F)
+ CALL check("H5Dcreate_f", error, total_error)
+ CALL H5Sclose_f(vspace, error)
+ CALL check("H5Sclose_f", error, total_error)
+ CALL H5Sclose_f(src_space, error)
+ CALL check("H5Sclose_f", error, total_error)
+ CALL H5Pclose_f(dcpl, error)
+ CALL check("H5Pclose_f", error, total_error)
+
+ ! Let's add data to the source datasets and check new dimensions for VDS
+ ! We will add only one plane to the first source dataset, two planes to the
+ ! second one, three to the third, and four to the forth.
+
+ DO i = 1, PLANE_STRIDE
+ !
+ ! Initialize data for i-th source dataset.
+ DO j = 1, i*DIM1*DIM2
+ wdata(j) = 10*i
+ ENDDO
+
+ !
+ ! Open the source files and datasets. Append data to each dataset and
+ ! close all resources.
+ CALL H5Fopen_f (SRC_FILE(i), H5F_ACC_RDWR_F, file, error)
+ CALL check("H5Fopen_f", error, total_error)
+ CALL H5Dopen_f (file, SRC_DATASET(i), dset, error)
+ CALL check("H5Dopen_f", error, total_error)
+ extdims(1) = DIM0_1+i
+ CALL H5Dset_extent_f(dset, extdims, error)
+ CALL check("H5Dset_extent_f", error, total_error)
+ CALL H5Dget_space_f(dset, src_space, error)
+ CALL check("H5Dget_space_f", error, total_error)
+
+ start(1:3) = (/DIM0_1,0,0/)
+ count(1:3) = 1
+ block(1:3) = (/i, DIM1, DIM2/)
+
+ memdims(1) = i
+
+ CALL H5Screate_simple_f(RANK, memdims, mem_space, error)
+ CALL check("H5Screate_simple_f", error, total_error)
+
+ CALL H5Sselect_hyperslab_f(src_space, H5S_SELECT_SET_F, start,count, error,block=block)
+ CALL check("H5Sselect_hyperslab_f", error, total_error)
+ f_ptr = C_LOC(wdata(1))
+ CALL H5Dwrite_f(dset, H5T_NATIVE_INTEGER, f_ptr, error, mem_space, src_space, H5P_DEFAULT_F)
+ CALL check("H5Dwrite_f", error, total_error)
+ CALL H5Sclose_f(src_space, error)
+ CALL check("H5Sclose_f", error, total_error)
+ call H5Dclose_f(dset, error)
+ CALL check("H5Dclose_f", error, total_error)
+ call H5Fclose_f(file, error)
+ CALL check("H5Fclose_f", error, total_error)
+ ENDDO
+
+ call H5Dclose_f(vdset, error)
+ CALL check("H5Dclose_f", error, total_error)
+ call H5Fclose_f(vfile, error)
+ CALL check("H5Fclose_f", error, total_error)
+
+ !
+ ! begin the read section
+ !
+ ! Open file and dataset using the default properties.
+ CALL H5Fopen_f(VFILENAME, H5F_ACC_RDONLY_F, vfile, error)
+ CALL check("H5Fopen_f", error, total_error)
+
+ !
+ ! Open VDS using different access properties to use max or
+ ! min extents depending on the sizes of the underlying datasets
+ CALL H5Pcreate_f(H5P_DATASET_ACCESS_F, dapl, error)
+ CALL check("H5Pcreate_f", error, total_error)
+
+ DO i = 1, 2
+
+ IF(i.NE.1)THEN
+ CALL H5Pset_virtual_view_f(dapl, H5D_VDS_LAST_AVAILABLE_F, error)
+ CALL check("H5Pset_virtual_view_f", error, total_error)
+ ELSE
+ CALL H5Pset_virtual_view_f(dapl, H5D_VDS_FIRST_MISSING_F, error)
+ CALL check("H5Pset_virtual_view_f", error, total_error)
+ ENDIF
+
+ CALL H5Dopen_f(vfile, DATASET, vdset, error, dapl)
+ CALL check("H5Dopen_f", error, total_error)
+
+ ! Let's get space of the VDS and its dimension we should get 32(or 20)x10x10
+ CALL H5Dget_space_f(vdset, vspace, error)
+ CALL check("H5Dget_space_f", error, total_error)
+ CALL H5Sget_simple_extent_dims_f(vspace, vdsdims_out, vdsdims_max_out, error)
+ CALL check("H5Sget_simple_extent_dims_f", error, total_error)
+
+ ! check VDS dimensions
+ DO j = 1, RANK
+ IF(vdsdims_out(j).NE.vdsdims_out_correct(i,j))THEN
+ total_error = total_error + 1
+ EXIT
+ ENDIF
+ ENDDO
+
+ CALL H5Pget_virtual_view_f(dapl, virtual_view, error)
+ CALL check("h5pget_virtual_view_f", error, total_error)
+
+ IF(i.EQ.1)THEN
+ IF(virtual_view .NE. H5D_VDS_FIRST_MISSING_F)THEN
+ total_error = total_error + 1
+ ENDIF
+ ELSE
+ IF(virtual_view .NE. H5D_VDS_LAST_AVAILABLE_F)THEN
+ total_error = total_error + 1
+ ENDIF
+
+ ENDIF
+
+ ! Close
+ CALL H5Dclose_f(vdset, error)
+ CALL check("H5Dclose_f", error, total_error)
+ CALL H5Sclose_f(vspace, error)
+ CALL check("H5Sclose_f", error, total_error)
+ ENDDO
+
+ CALL H5Dopen_f(vfile, DATASET, vdset, error)
+ CALL check("H5Dopen_f", error, total_error)
+
+ !
+ ! Get creation property list and mapping properties.
+ !
+ CALL H5Dget_create_plist_f (vdset, dcpl, error)
+ CALL check("H5Dget_create_plist_f", error, total_error)
+
+ !
+ ! Get storage layout.
+ CALL H5Pget_layout_f(dcpl, layout, error)
+ CALL check("H5Pget_layout_f", error, total_error)
+
+ IF (H5D_VIRTUAL_F .NE. layout) THEN
+ PRINT*,"Wrong layout found"
+ total_error = total_error + 1
+ ENDIF
+
+ !
+ ! Find number of mappings.
+
+ CALL H5Pget_virtual_count_f(dcpl, num_map, error)
+ CALL check("H5Pget_virtual_count_f", error, total_error)
+
+ IF(num_map.NE.4_size_t)THEN
+ PRINT*,"Number of mappings is incorrect"
+ total_error = total_error + 1
+ ENDIF
+ !
+ ! Get mapping parameters for each mapping.
+ !
+ DO i = 1, num_map
+ CALL H5Pget_virtual_vspace_f(dcpl, INT(i-1,size_t), vspace, error)
+ CALL check("H5Pget_virtual_vspace_f", error, total_error)
+
+ CALL h5sget_select_type_f(vspace, s_type, error)
+ CALL check("h5sget_select_type_f", error, total_error)
+ IF(s_type.EQ.H5S_SEL_HYPERSLABS_F)THEN
+ CALL H5Sis_regular_hyperslab_f(vspace, IsRegular, error)
+ CALL check("H5Sis_regular_hyperslab_f", error, total_error)
+
+ IF(IsRegular)THEN
+ CALL H5Sget_regular_hyperslab_f(vspace, start_out, stride_out, count_out, block_out, error)
+ CALL check("H5Sget_regular_hyperslab_f", error, total_error)
+ DO j = 1, 3
+ IF(start_out(j).NE.start_correct(j,i) .OR. &
+ stride_out(j).NE.stride(j).OR. &
+ count_out(j).NE.src_count(j))THEN
+ total_error = total_error + 1
+ EXIT
+ ENDIF
+ ENDDO
+ ENDIF
+ END IF
+
+ ! Get source file name
+ CALL H5Pget_virtual_filename_f(dcpl, INT(i-1, size_t), SRC_FILE_LEN_EXACT, error, nsize)
+ CALL check("H5Pget_virtual_count_f", error, total_error)
+
+ IF(nsize.NE.LEN(SRC_FILE_LEN_EXACT))THEN
+ PRINT*,"virtual filenname size is incorrect"
+ total_error = total_error + 1
+ ENDIF
+ ! check passing a buffer that is very small
+ CALL H5Pget_virtual_filename_f(dcpl, INT(i-1, size_t), SRC_FILE_LEN_TINY, error)
+ CALL check("H5Pget_virtual_filename_f", error, total_error)
+ IF(SRC_FILE_LEN_TINY.NE.SRC_FILE(i)(1:LEN(SRC_FILE_LEN_TINY)))THEN
+ PRINT*,"virtual filenname returned is incorrect"
+ total_error = total_error + 1
+ ENDIF
+ ! check passing a buffer that small by one
+ CALL H5Pget_virtual_filename_f(dcpl, INT(i-1, size_t), SRC_FILE_LEN_SMALL, error)
+ CALL check("H5Pget_virtual_filename_f", error, total_error)
+ IF(SRC_FILE_LEN_SMALL.NE.SRC_FILE(i)(1:LEN(SRC_FILE_LEN_SMALL)))THEN
+ PRINT*,"virtual filenname returned is incorrect"
+ total_error = total_error + 1
+ ENDIF
+ ! check passing a buffer that is exact
+ CALL H5Pget_virtual_filename_f(dcpl, INT(i-1, size_t), SRC_FILE_LEN_EXACT, error)
+ CALL check("H5Pget_virtual_filename_f", error, total_error)
+ IF(SRC_FILE_LEN_EXACT.NE.SRC_FILE(i)(1:LEN(SRC_FILE_LEN_EXACT)))THEN
+ PRINT*,"virtual filenname returned is incorrect"
+ total_error = total_error + 1
+ ENDIF
+ ! check passing a buffer that bigger by one
+ CALL H5Pget_virtual_filename_f(dcpl, INT(i-1, size_t), SRC_FILE_LEN_LARGE, error)
+ CALL check("H5Pget_virtual_filename_f", error, total_error)
+ IF(SRC_FILE_LEN_LARGE(1:LEN(SRC_FILE_LEN_EXACT)).NE.SRC_FILE(i)(1:LEN(SRC_FILE_LEN_EXACT)).AND. &
+ SRC_FILE_LEN_LARGE(LEN(SRC_FILE_LEN_EXACT):).NE.'')THEN
+ PRINT*,"virtual filenname returned is incorrect"
+ total_error = total_error + 1
+ ENDIF
+ ! check passing a buffer that is very big
+ CALL H5Pget_virtual_filename_f(dcpl, INT(i-1, size_t), SRC_FILE_LEN_HUGE, error)
+ CALL check("H5Pget_virtual_filename_f", error, total_error)
+ IF(SRC_FILE_LEN_HUGE(1:LEN(SRC_FILE_LEN_EXACT)).NE.SRC_FILE(i)(1:LEN(SRC_FILE_LEN_EXACT)).AND. &
+ SRC_FILE_LEN_HUGE(LEN(SRC_FILE_LEN_EXACT):).NE.'')THEN
+ PRINT*,"virtual filenname returned is incorrect"
+ total_error = total_error + 1
+ ENDIF
+ ! Get source dataset name
+ CALL H5Pget_virtual_dsetname_f(dcpl, INT(i-1, size_t), SRC_DATASET_LEN_EXACT, error, nsize)
+ CALL check("H5Pget_virtual_dsetname_f", error, total_error)
+
+ CALL H5Pget_virtual_dsetname_f(dcpl, INT(i-1, size_t), SRC_DATASET_LEN_EXACT, error)
+ CALL check("H5Pget_virtual_dsetname_f", error, total_error)
+ IF(SRC_DATASET_LEN_EXACT(1:LEN(SRC_DATASET_LEN_EXACT)).NE.SRC_DATASET(i)(1:LEN(SRC_DATASET_LEN_EXACT)).AND. &
+ SRC_DATASET_LEN_EXACT(LEN(SRC_DATASET_LEN_EXACT):).NE.'')THEN
+ PRINT*,"virtual dataset returned is incorrect"
+ total_error = total_error + 1
+ ENDIF
+
+ CALL h5pget_virtual_srcspace_f(dcpl, INT(i-1,size_t), space_out, error)
+ CALL check("H5Pget_virtual_srcspace_f", error, total_error)
+
+ CALL h5sget_select_type_f(space_out, type1, error)
+ CALL check("H5Sget_select_type_f", error, total_error)
+ CALL h5sget_select_type_f(vspace, type2, error)
+ CALL check("H5Sget_select_type_f", error, total_error)
+
+ IF(type1.NE.type2)THEN
+ total_error = total_error + 1
+ ENDIF
+
+ ENDDO
+ !
+ ! Close and release resources.
+
+ ! Clear virtual layout in DCPL
+ CALL h5pset_layout_f(dcpl, H5D_VIRTUAL_F,error)
+ CALL check("H5Pset_layout_f", error, total_error)
+
+ CALL H5Pclose_f(dcpl, error)
+ CALL check("H5Pclose_f", error, total_error)
+ CALL H5Dclose_f(vdset, error)
+ CALL check("H5Dclose_f", error, total_error)
+
+ ! Reopen VDS with printf gap set to 1
+
+ CALL H5Pset_virtual_printf_gap_f(dapl, 1_hsize_t, error)
+ CALL check("H5Pset_virtual_printf_gap_f", error, total_error)
+
+ CALL H5Dopen_f(vfile, DATASET, vdset, error, dapl)
+ CALL check("H5Dopen_f", error, total_error)
+
+ CALL H5Pget_virtual_printf_gap_f(dapl, gap_size, error)
+ CALL check("H5Pget_virtual_printf_gap_f", error, total_error)
+
+ IF(gap_size.NE.1_hsize_t)THEN
+ PRINT*,"gapsize is incorrect"
+ total_error = total_error + 1
+ ENDIF
+
+ CALL H5Dclose_f(vdset, error)
+ CALL check("H5Dclose_f", error, total_error)
+ CALL H5Sclose_f(vspace, error)
+ CALL check("H5Sclose_f", error, total_error)
+ CALL H5Pclose_f(dapl, error)
+ CALL check("H5Pclose_f", error, total_error)
+ CALL H5Fclose_f(vfile, error)
+ CALL check("H5Fclose_f", error, total_error)
+
+END SUBROUTINE test_vds
+
+
END MODULE TH5P_F03
diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in
index 8ca5fb3..4670080 100644
--- a/fortran/testpar/Makefile.in
+++ b/fortran/testpar/Makefile.in
@@ -423,16 +423,17 @@ AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ -I$(top_srcdir)/fortran/src \
$(F9XMODFLAG)$(top_builddir)/fortran/test
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@ $(am__append_1)
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -445,7 +446,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -507,8 +507,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -519,11 +519,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -531,6 +531,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -554,6 +555,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -569,6 +571,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/hl/Makefile.in b/hl/Makefile.in
index d99121b..ea28932 100644
--- a/hl/Makefile.in
+++ b/hl/Makefile.in
@@ -422,16 +422,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -444,7 +445,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -506,8 +506,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -518,11 +518,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -530,6 +530,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -553,6 +554,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -568,6 +570,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in
index 8107461..eafec12 100644
--- a/hl/c++/Makefile.in
+++ b/hl/c++/Makefile.in
@@ -418,16 +418,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -440,7 +441,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -502,8 +502,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -514,11 +514,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -526,6 +526,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -549,6 +550,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -564,6 +566,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in
index bfe15ac..3fb01b3 100644
--- a/hl/c++/examples/Makefile.in
+++ b/hl/c++/examples/Makefile.in
@@ -365,16 +365,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -387,7 +388,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -449,8 +449,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -461,11 +461,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -473,6 +473,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -496,6 +497,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -511,6 +513,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in
index ae11e47..3f76d7f 100644
--- a/hl/c++/src/Makefile.in
+++ b/hl/c++/src/Makefile.in
@@ -421,16 +421,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -443,7 +444,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -505,8 +505,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -517,11 +517,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -529,6 +529,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -552,6 +553,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -567,6 +569,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in
index 78c8380..d7d89b0 100644
--- a/hl/c++/test/Makefile.in
+++ b/hl/c++/test/Makefile.in
@@ -418,16 +418,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -440,7 +441,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -502,8 +502,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -514,11 +514,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -526,6 +526,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -549,6 +550,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -564,6 +566,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in
index c1165d6..00eee6d 100644
--- a/hl/examples/Makefile.in
+++ b/hl/examples/Makefile.in
@@ -365,16 +365,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -387,7 +388,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -449,8 +449,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -461,11 +461,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -473,6 +473,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -496,6 +497,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -511,6 +513,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in
index af9d04d..9c566e4 100644
--- a/hl/fortran/Makefile.in
+++ b/hl/fortran/Makefile.in
@@ -422,16 +422,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -444,7 +445,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -506,8 +506,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -518,11 +518,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -530,6 +530,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -553,6 +554,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -568,6 +570,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in
index e093788..da49578 100644
--- a/hl/fortran/examples/Makefile.in
+++ b/hl/fortran/examples/Makefile.in
@@ -371,16 +371,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -393,7 +394,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -455,8 +455,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -467,11 +467,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -479,6 +479,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -502,6 +503,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -517,6 +519,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in
index debd85d..fa61fa6 100644
--- a/hl/fortran/src/Makefile.in
+++ b/hl/fortran/src/Makefile.in
@@ -449,16 +449,17 @@ AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ -I$(top_builddir)/fortran/src \
$(F9XMODFLAG)$(top_builddir)/fortran/src
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@ $(am__append_1)
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -471,7 +472,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -533,8 +533,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -545,11 +545,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -557,6 +557,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -580,6 +581,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -595,6 +597,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in
index b0b1284..6dbb18c 100644
--- a/hl/fortran/test/Makefile.in
+++ b/hl/fortran/test/Makefile.in
@@ -432,16 +432,17 @@ AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ -I$(top_builddir)/fortran/src \
$(F9XMODFLAG)$(top_builddir)/hl/fortran/src
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@ $(am__append_1)
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -454,7 +455,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -516,8 +516,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -528,11 +528,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -540,6 +540,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -563,6 +564,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -578,6 +580,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in
index ef5c145..14029fc 100644
--- a/hl/src/Makefile.in
+++ b/hl/src/Makefile.in
@@ -420,16 +420,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -442,7 +443,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -504,8 +504,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -516,11 +516,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -528,6 +528,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -551,6 +552,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -566,6 +568,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in
index 1740a99..b132c3b 100644
--- a/hl/test/Makefile.in
+++ b/hl/test/Makefile.in
@@ -470,16 +470,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -492,7 +493,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -554,8 +554,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -566,11 +566,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -578,6 +578,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -601,6 +602,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -616,6 +618,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in
index 4e76131..26a09c7 100644
--- a/hl/tools/Makefile.in
+++ b/hl/tools/Makefile.in
@@ -419,16 +419,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -441,7 +442,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -503,8 +503,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -515,11 +515,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -527,6 +527,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -550,6 +551,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -565,6 +567,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in
index bfb93ed..a54b52f 100644
--- a/hl/tools/gif2h5/Makefile.in
+++ b/hl/tools/gif2h5/Makefile.in
@@ -433,16 +433,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -455,7 +456,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -517,8 +517,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -529,11 +529,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -541,6 +541,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -564,6 +565,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -579,6 +581,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/hl/tools/gif2h5/h52giftest.sh.in b/hl/tools/gif2h5/h52giftest.sh.in
index 7aec219..90931f2 100644
--- a/hl/tools/gif2h5/h52giftest.sh.in
+++ b/hl/tools/gif2h5/h52giftest.sh.in
@@ -77,7 +77,7 @@ TOOLTEST ./h52gif $TESTFILE1 image1.gif -i image
echo ""
# Negative tests.
-echo "**verify the the h52gif tool handle error conditions correctly..."
+echo "**verify that the h52gif tool handles error conditions correctly..."
# nonexisting dataset name
TESTING "./h52gif h52giftst.h5 image.gif -i nosuch_image"
TOOLTESTFAIL "./h52gif $TESTFILE1 image.gif -i nosuch_image"
diff --git a/hl/tools/h5watch/Makefile.in b/hl/tools/h5watch/Makefile.in
index 57ddd2e..7ca0673 100644
--- a/hl/tools/h5watch/Makefile.in
+++ b/hl/tools/h5watch/Makefile.in
@@ -436,16 +436,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -458,7 +459,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -520,8 +520,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -532,11 +532,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -544,6 +544,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -567,6 +568,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -582,6 +584,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index a3bc337..d7c043f 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1,6 +1,8 @@
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
#
-# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# Written by Gordon Matzigkeit, 1996
#
# This file is free software; the Free Software Foundation gives
@@ -8,30 +10,36 @@
# modifications, as long as this notice is preserved.
m4_define([_LT_COPYING], [dnl
-# Copyright (C) 2014 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions. There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# GNU Libtool is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of of the License, or
-# (at your option) any later version.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program or library that is built
-# using GNU Libtool, you may include this file under the same
-# distribution terms that you use for the rest of that program.
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
#
-# GNU Libtool is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
])
-# serial 58 LT_INIT
+# serial 57 LT_INIT
# LT_PREREQ(VERSION)
@@ -59,7 +67,7 @@ esac
# LT_INIT([OPTIONS])
# ------------------
AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
AC_BEFORE([$0], [LT_LANG])dnl
AC_BEFORE([$0], [LT_OUTPUT])dnl
@@ -83,7 +91,7 @@ dnl Parse OPTIONS
_LT_SET_OPTIONS([$0], [$1])
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS=$ltmain
+LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -103,43 +111,26 @@ dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
-# _LT_PREPARE_CC_BASENAME
-# -----------------------
-m4_defun([_LT_PREPARE_CC_BASENAME], [
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
-func_cc_basename ()
-{
- for cc_temp in @S|@*""; do
- case $cc_temp in
- compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
- distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
- \-*) ;;
- *) break;;
- esac
- done
- func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-}
-])# _LT_PREPARE_CC_BASENAME
-
-
# _LT_CC_BASENAME(CC)
# -------------------
-# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
-# but that macro is also expanded into generated libtool script, which
-# arranges for $SED and $ECHO to be set by different means.
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
m4_defun([_LT_CC_BASENAME],
-[m4_require([_LT_PREPARE_CC_BASENAME])dnl
-AC_REQUIRE([_LT_DECL_SED])dnl
-AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
-func_cc_basename $1
-cc_basename=$func_cc_basename_result
+[for cc_temp in $1""; do
+ case $cc_temp in
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
])
# _LT_FILEUTILS_DEFAULTS
# ----------------------
# It is okay to use these file commands and assume they have been set
-# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
m4_defun([_LT_FILEUTILS_DEFAULTS],
[: ${CP="cp -f"}
: ${MV="mv -f"}
@@ -186,16 +177,15 @@ m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
m4_require([_LT_WITH_SYSROOT])dnl
-m4_require([_LT_CMD_TRUNCATE])dnl
_LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options that allow our
+# See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}"; then
+if test -n "\${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
])
-if test -n "${ZSH_VERSION+set}"; then
+if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
@@ -208,7 +198,7 @@ aix3*)
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
- if test set != "${COLLECT_NAMES+set}"; then
+ if test "X${COLLECT_NAMES+set}" != Xset; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
@@ -219,14 +209,14 @@ esac
ofile=libtool
can_build_shared=yes
-# All known linkers require a '.a' archive for static linking (except MSVC,
+# All known linkers require a `.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
-with_gnu_ld=$lt_cv_prog_gnu_ld
+with_gnu_ld="$lt_cv_prog_gnu_ld"
-old_CC=$CC
-old_CFLAGS=$CFLAGS
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
# Set sane defaults for various variables
test -z "$CC" && CC=cc
@@ -279,14 +269,14 @@ no_glob_subst='s/\*/\\\*/g'
# _LT_PROG_LTMAIN
# ---------------
-# Note that this code is called both from 'configure', and 'config.status'
+# Note that this code is called both from `configure', and `config.status'
# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
-# 'config.status' has no value for ac_aux_dir unless we are using Automake,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
# so we pass a copy along to make sure it has a sensible value anyway.
m4_defun([_LT_PROG_LTMAIN],
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain=$ac_aux_dir/ltmain.sh
+ltmain="$ac_aux_dir/ltmain.sh"
])# _LT_PROG_LTMAIN
@@ -296,7 +286,7 @@ ltmain=$ac_aux_dir/ltmain.sh
# So that we can recreate a full libtool script including additional
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the 'libtool'
+# in macros and then make a single call at the end using the `libtool'
# label.
@@ -431,8 +421,8 @@ m4_define([_lt_decl_all_varnames],
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
# ------------------------------------
-# Quote a variable value, and forward it to 'config.status' so that its
-# declaration there will have the same value as in 'configure'. VARNAME
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'. VARNAME
# must have a single quote delimited value for this to work.
m4_define([_LT_CONFIG_STATUS_DECLARE],
[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
@@ -456,7 +446,7 @@ m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
# Output comment and list of tags supported by the script
m4_defun([_LT_LIBTOOL_TAGS],
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags='_LT_TAGS'dnl
+available_tags="_LT_TAGS"dnl
])
@@ -484,7 +474,7 @@ m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
# _LT_LIBTOOL_CONFIG_VARS
# -----------------------
# Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
# section) are produced by _LT_LIBTOOL_TAG_VARS.
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
@@ -510,8 +500,8 @@ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
# variables for single and double quote escaping we saved from calls
# to _LT_DECL, we can put quote escaped variables declarations
-# into 'config.status', and then the shell code to quote escape them in
-# for loops in 'config.status'. Finally, any additional code accumulated
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'. Finally, any additional code accumulated
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
m4_defun([_LT_CONFIG_COMMANDS],
[AC_PROVIDE_IFELSE([LT_OUTPUT],
@@ -557,7 +547,7 @@ for var in lt_decl_all_varnames([[ \
]], lt_decl_quote_varnames); do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[[\\\\\\\`\\"\\\$]]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
;;
*)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -570,7 +560,7 @@ for var in lt_decl_all_varnames([[ \
]], lt_decl_dquote_varnames); do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[[\\\\\\\`\\"\\\$]]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
;;
*)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -586,7 +576,7 @@ _LT_OUTPUT_LIBTOOL_INIT
# Generate a child script FILE with all initialization necessary to
# reuse the environment learned by the parent script, and make the
# file executable. If COMMENT is supplied, it is inserted after the
-# '#!' sequence but before initialization text begins. After this
+# `#!' sequence but before initialization text begins. After this
# macro, additional text can be appended to FILE to form the body of
# the child script. The macro ends with non-zero status if the
# file could not be fully written (such as if the disk is full).
@@ -608,7 +598,7 @@ AS_SHELL_SANITIZE
_AS_PREPARE
exec AS_MESSAGE_FD>&1
_ASEOF
-test 0 = "$lt_write_fail" && chmod +x $1[]dnl
+test $lt_write_fail = 0 && chmod +x $1[]dnl
m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
# LT_OUTPUT
@@ -631,7 +621,7 @@ exec AS_MESSAGE_LOG_FD>>config.log
} >&AS_MESSAGE_LOG_FD
lt_cl_help="\
-'$as_me' creates a local libtool stub from the current configuration,
+\`$as_me' creates a local libtool stub from the current configuration,
for use in further configure time tests before the real libtool is
generated.
@@ -653,7 +643,7 @@ Copyright (C) 2011 Free Software Foundation, Inc.
This config.lt script is free software; the Free Software Foundation
gives unlimited permision to copy, distribute and modify it."
-while test 0 != $[#]
+while test $[#] != 0
do
case $[1] in
--version | --v* | -V )
@@ -666,10 +656,10 @@ do
lt_cl_silent=: ;;
-*) AC_MSG_ERROR([unrecognized option: $[1]
-Try '$[0] --help' for more information.]) ;;
+Try \`$[0] --help' for more information.]) ;;
*) AC_MSG_ERROR([unrecognized argument: $[1]
-Try '$[0] --help' for more information.]) ;;
+Try \`$[0] --help' for more information.]) ;;
esac
shift
done
@@ -695,7 +685,7 @@ chmod +x "$CONFIG_LT"
# open by configure. Here we exec the FD to /dev/null, effectively closing
# config.log, so it can be properly (re)opened and appended to by config.lt.
lt_cl_success=:
-test yes = "$silent" &&
+test "$silent" = yes &&
lt_config_lt_args="$lt_config_lt_args --quiet"
exec AS_MESSAGE_LOG_FD>/dev/null
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
@@ -715,31 +705,27 @@ m4_defun([_LT_CONFIG],
_LT_CONFIG_SAVE_COMMANDS([
m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
m4_if(_LT_TAG, [C], [
- # See if we are running on zsh, and set the options that allow our
+ # See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}"; then
+ if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
- cfgfile=${ofile}T
+ cfgfile="${ofile}T"
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
$RM "$cfgfile"
cat <<_LT_EOF >> "$cfgfile"
#! $SHELL
-# Generated automatically by $as_me ($PACKAGE) $VERSION
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-
-# Provide generalized library-building support services.
-# Written by Gordon Matzigkeit, 1996
-
+#
_LT_COPYING
_LT_LIBTOOL_TAGS
-# Configured defaults for sys_lib_dlsearch_path munging.
-: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
-
# ### BEGIN LIBTOOL CONFIG
_LT_LIBTOOL_CONFIG_VARS
_LT_LIBTOOL_TAG_VARS
@@ -747,24 +733,13 @@ _LT_LIBTOOL_TAG_VARS
_LT_EOF
- cat <<'_LT_EOF' >> "$cfgfile"
-
-# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
-
-_LT_PREPARE_MUNGE_PATH_LIST
-_LT_PREPARE_CC_BASENAME
-
-# ### END FUNCTIONS SHARED WITH CONFIGURE
-
-_LT_EOF
-
case $host_os in
aix3*)
cat <<\_LT_EOF >> "$cfgfile"
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
-if test set != "${COLLECT_NAMES+set}"; then
+if test "X${COLLECT_NAMES+set}" != Xset; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
@@ -781,6 +756,8 @@ _LT_EOF
sed '$q' "$ltmain" >> "$cfgfile" \
|| (rm -f "$cfgfile"; exit 1)
+ _LT_PROG_REPLACE_SHELLFNS
+
mv -f "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
@@ -798,6 +775,7 @@ _LT_EOF
[m4_if([$1], [], [
PACKAGE='$PACKAGE'
VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
RM='$RM'
ofile='$ofile'], [])
])dnl /_LT_CONFIG_SAVE_COMMANDS
@@ -996,7 +974,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
[lt_cv_apple_cc_single_mod=no
- if test -z "$LT_MULTI_MODULE"; then
+ if test -z "${LT_MULTI_MODULE}"; then
# By default we will add the -single_module flag. You can override
# by either setting the environment variable LT_MULTI_MODULE
# non-empty at configure time, or by adding -multi_module to the
@@ -1014,7 +992,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
cat conftest.err >&AS_MESSAGE_LOG_FD
# Otherwise, if the output was created with a 0 exit code from
# the compiler, it worked.
- elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
+ elif test -f libconftest.dylib && test $_lt_result -eq 0; then
lt_cv_apple_cc_single_mod=yes
else
cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -1032,7 +1010,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
[lt_cv_ld_exported_symbols_list=yes],
[lt_cv_ld_exported_symbols_list=no])
- LDFLAGS=$save_LDFLAGS
+ LDFLAGS="$save_LDFLAGS"
])
AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
@@ -1054,7 +1032,7 @@ _LT_EOF
_lt_result=$?
if test -s conftest.err && $GREP force_load conftest.err; then
cat conftest.err >&AS_MESSAGE_LOG_FD
- elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
+ elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
lt_cv_ld_force_load=yes
else
cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -1064,32 +1042,32 @@ _LT_EOF
])
case $host_os in
rhapsody* | darwin1.[[012]])
- _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
darwin1.*)
- _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
darwin*) # darwin 5.x on
# if running on 10.5 or later, the deployment target defaults
# to the OS version, if on x86, and 10.4, the deployment
# target defaults to 10.4. Don't you love it?
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
- 10.[[012]][[,.]]*)
- _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[[012]]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
esac
;;
esac
- if test yes = "$lt_cv_apple_cc_single_mod"; then
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
_lt_dar_single_mod='$single_module'
fi
- if test yes = "$lt_cv_ld_exported_symbols_list"; then
- _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
fi
- if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
+ if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
_lt_dsymutil='~$DSYMUTIL $lib || :'
else
_lt_dsymutil=
@@ -1109,29 +1087,29 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
_LT_TAGVAR(hardcode_direct, $1)=no
_LT_TAGVAR(hardcode_automatic, $1)=yes
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- if test yes = "$lt_cv_ld_force_load"; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ if test "$lt_cv_ld_force_load" = "yes"; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
[FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
else
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
fi
_LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
+ _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
case $cc_basename in
- ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+ ifort*) _lt_dar_can_shared=yes ;;
*) _lt_dar_can_shared=$GCC ;;
esac
- if test yes = "$_lt_dar_can_shared"; then
+ if test "$_lt_dar_can_shared" = "yes"; then
output_verbose_link_cmd=func_echo_all
- _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
- _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
- _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
m4_if([$1], [CXX],
-[ if test yes != "$lt_cv_apple_cc_single_mod"; then
- _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
+[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
fi
],[])
else
@@ -1151,7 +1129,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
# Allow to override them for all tags through lt_cv_aix_libpath.
m4_defun([_LT_SYS_MODULE_PATH_AIX],
[m4_require([_LT_DECL_SED])dnl
-if test set = "${lt_cv_aix_libpath+set}"; then
+if test "${lt_cv_aix_libpath+set}" = set; then
aix_libpath=$lt_cv_aix_libpath
else
AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
@@ -1169,7 +1147,7 @@ else
_LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi],[])
if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
- _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
fi
])
aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
@@ -1189,8 +1167,8 @@ m4_define([_LT_SHELL_INIT],
# -----------------------
# Find how we can fake an echo command that does not interpret backslash.
# In particular, with Autoconf 2.60 or later we add some code to the start
-# of the generated configure script that will find a shell with a builtin
-# printf (that we can use as an echo command).
+# of the generated configure script which will find a shell with a builtin
+# printf (which we can use as an echo command).
m4_defun([_LT_PROG_ECHO_BACKSLASH],
[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
@@ -1218,10 +1196,10 @@ fi
# Invoke $ECHO with all args, space-separated.
func_echo_all ()
{
- $ECHO "$*"
+ $ECHO "$*"
}
-case $ECHO in
+case "$ECHO" in
printf*) AC_MSG_RESULT([printf]) ;;
print*) AC_MSG_RESULT([print -r]) ;;
*) AC_MSG_RESULT([cat]) ;;
@@ -1247,17 +1225,16 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
AC_DEFUN([_LT_WITH_SYSROOT],
[AC_MSG_CHECKING([for sysroot])
AC_ARG_WITH([sysroot],
-[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
- [Search for dependent libraries within DIR (or the compiler's sysroot
- if not specified).])],
+[ --with-sysroot[=DIR] Search for dependent libraries within DIR
+ (or the compiler's sysroot if not specified).],
[], [with_sysroot=no])
dnl lt_sysroot will always be passed unquoted. We quote it here
dnl in case the user passed a directory name.
lt_sysroot=
-case $with_sysroot in #(
+case ${with_sysroot} in #(
yes)
- if test yes = "$GCC"; then
+ if test "$GCC" = yes; then
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
fi
;; #(
@@ -1267,14 +1244,14 @@ case $with_sysroot in #(
no|'')
;; #(
*)
- AC_MSG_RESULT([$with_sysroot])
+ AC_MSG_RESULT([${with_sysroot}])
AC_MSG_ERROR([The sysroot must be an absolute path.])
;;
esac
AC_MSG_RESULT([${lt_sysroot:-no}])
_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
-[dependent libraries, and where our libraries should be installed.])])
+[dependent libraries, and in which our libraries should be installed.])])
# _LT_ENABLE_LOCK
# ---------------
@@ -1282,33 +1259,31 @@ m4_defun([_LT_ENABLE_LOCK],
[AC_ARG_ENABLE([libtool-lock],
[AS_HELP_STRING([--disable-libtool-lock],
[avoid locking (might break parallel builds)])])
-test no = "$enable_libtool_lock" || enable_libtool_lock=yes
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case $host in
ia64-*-hpux*)
- # Find out what ABI is being produced by ac_compile, and set mode
- # options accordingly.
+ # Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.$ac_objext` in
*ELF-32*)
- HPUX_IA64_MODE=32
+ HPUX_IA64_MODE="32"
;;
*ELF-64*)
- HPUX_IA64_MODE=64
+ HPUX_IA64_MODE="64"
;;
esac
fi
rm -rf conftest*
;;
*-*-irix6*)
- # Find out what ABI is being produced by ac_compile, and set linker
- # options accordingly.
+ # Find out which ABI we are using.
echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
- if test yes = "$lt_cv_prog_gnu_ld"; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -melf32bsmip"
@@ -1337,46 +1312,9 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-mips64*-*linux*)
- # Find out what ABI is being produced by ac_compile, and set linker
- # options accordingly.
- echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- emul=elf
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- emul="${emul}32"
- ;;
- *64-bit*)
- emul="${emul}64"
- ;;
- esac
- case `/usr/bin/file conftest.$ac_objext` in
- *MSB*)
- emul="${emul}btsmip"
- ;;
- *LSB*)
- emul="${emul}ltsmip"
- ;;
- esac
- case `/usr/bin/file conftest.$ac_objext` in
- *N32*)
- emul="${emul}n32"
- ;;
- esac
- LD="${LD-ld} -m $emul"
- fi
- rm -rf conftest*
- ;;
-
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out what ABI is being produced by ac_compile, and set linker
- # options accordingly. Note that the listed cases only cover the
- # situations where additional linker options are needed (such as when
- # doing 32-bit compilation for a host where ld defaults to 64-bit, or
- # vice versa); the common cases where no linker options are needed do
- # not appear in the list.
+ # Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.o` in
@@ -1395,10 +1333,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
- powerpc64le-*linux*)
+ powerpc64le-*)
LD="${LD-ld} -m elf32lppclinux"
;;
- powerpc64-*linux*)
+ powerpc64-*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -1417,10 +1355,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- powerpcle-*linux*)
+ powerpcle-*)
LD="${LD-ld} -m elf64lppc"
;;
- powerpc-*linux*)
+ powerpc-*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -1438,20 +1376,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS=$CFLAGS
+ SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
[AC_LANG_PUSH(C)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
AC_LANG_POP])
- if test yes != "$lt_cv_cc_needs_belf"; then
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS=$SAVE_CFLAGS
+ CFLAGS="$SAVE_CFLAGS"
fi
;;
*-*solaris*)
- # Find out what ABI is being produced by ac_compile, and set linker
- # options accordingly.
+ # Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.o` in
@@ -1459,7 +1396,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
case $lt_cv_prog_gnu_ld in
yes*)
case $host in
- i?86-*-solaris*|x86_64-*-solaris*)
+ i?86-*-solaris*)
LD="${LD-ld} -m elf_x86_64"
;;
sparc*-*-solaris*)
@@ -1468,7 +1405,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
esac
# GNU ld 2.21 introduced _sol2 emulations. Use them if available.
if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
- LD=${LD-ld}_sol2
+ LD="${LD-ld}_sol2"
fi
;;
*)
@@ -1484,7 +1421,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
-need_locks=$enable_libtool_lock
+need_locks="$enable_libtool_lock"
])# _LT_ENABLE_LOCK
@@ -1503,11 +1440,11 @@ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
[echo conftest.$ac_objext > conftest.lst
lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
AC_TRY_EVAL([lt_ar_try])
- if test 0 -eq "$ac_status"; then
+ if test "$ac_status" -eq 0; then
# Ensure the archiver fails upon bogus file names.
rm -f conftest.$ac_objext libconftest.a
AC_TRY_EVAL([lt_ar_try])
- if test 0 -ne "$ac_status"; then
+ if test "$ac_status" -ne 0; then
lt_cv_ar_at_file=@
fi
fi
@@ -1515,7 +1452,7 @@ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
])
])
-if test no = "$lt_cv_ar_at_file"; then
+if test "x$lt_cv_ar_at_file" = xno; then
archiver_list_spec=
else
archiver_list_spec=$lt_cv_ar_at_file
@@ -1546,7 +1483,7 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then
case $host_os in
- bitrig* | openbsd*)
+ openbsd*)
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
;;
*)
@@ -1582,7 +1519,7 @@ AC_CACHE_CHECK([$1], [$2],
[$2=no
m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
+ lt_compiler_flag="$3"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
@@ -1609,7 +1546,7 @@ AC_CACHE_CHECK([$1], [$2],
$RM conftest*
])
-if test yes = "[$]$2"; then
+if test x"[$]$2" = xyes; then
m4_if([$5], , :, [$5])
else
m4_if([$6], , :, [$6])
@@ -1631,7 +1568,7 @@ AC_DEFUN([_LT_LINKER_OPTION],
m4_require([_LT_DECL_SED])dnl
AC_CACHE_CHECK([$1], [$2],
[$2=no
- save_LDFLAGS=$LDFLAGS
+ save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $3"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -1650,10 +1587,10 @@ AC_CACHE_CHECK([$1], [$2],
fi
fi
$RM -r conftest*
- LDFLAGS=$save_LDFLAGS
+ LDFLAGS="$save_LDFLAGS"
])
-if test yes = "[$]$2"; then
+if test x"[$]$2" = xyes; then
m4_if([$4], , :, [$4])
else
m4_if([$5], , :, [$5])
@@ -1674,7 +1611,7 @@ AC_DEFUN([LT_CMD_MAX_LEN],
AC_MSG_CHECKING([the maximum length of command line arguments])
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
i=0
- teststring=ABCD
+ teststring="ABCD"
case $build_os in
msdosdjgpp*)
@@ -1714,7 +1651,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=8192;
;;
- bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -1765,22 +1702,22 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
*)
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
if test -n "$lt_cv_sys_max_cmd_len" && \
- test undefined != "$lt_cv_sys_max_cmd_len"; then
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
else
# Make teststring a little bigger before we do anything with it.
# a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8; do
+ for i in 1 2 3 4 5 6 7 8 ; do
teststring=$teststring$teststring
done
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
# If test is not a shell built-in, we'll probably end up computing a
# maximum length that is only half of the actual maximum length, but
# we can't tell.
- while { test X`env echo "$teststring$teststring" 2>/dev/null` \
+ while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
- test 17 != "$i" # 1/2 MB should be enough
+ test $i != 17 # 1/2 MB should be enough
do
i=`expr $i + 1`
teststring=$teststring$teststring
@@ -1796,7 +1733,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
;;
esac
])
-if test -n "$lt_cv_sys_max_cmd_len"; then
+if test -n $lt_cv_sys_max_cmd_len ; then
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
else
AC_MSG_RESULT(none)
@@ -1824,7 +1761,7 @@ m4_defun([_LT_HEADER_DLFCN],
# ----------------------------------------------------------------
m4_defun([_LT_TRY_DLOPEN_SELF],
[m4_require([_LT_HEADER_DLFCN])dnl
-if test yes = "$cross_compiling"; then :
+if test "$cross_compiling" = yes; then :
[$4]
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -1871,9 +1808,9 @@ else
# endif
#endif
-/* When -fvisibility=hidden is used, assume the code has been annotated
+/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
-#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
int fnord () __attribute__((visibility("default")));
#endif
@@ -1899,7 +1836,7 @@ int main ()
return status;
}]
_LT_EOF
- if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
lt_status=$?
case x$lt_status in
@@ -1920,7 +1857,7 @@ rm -fr conftest*
# ------------------
AC_DEFUN([LT_SYS_DLOPEN_SELF],
[m4_require([_LT_HEADER_DLFCN])dnl
-if test yes != "$enable_dlopen"; then
+if test "x$enable_dlopen" != xyes; then
enable_dlopen=unknown
enable_dlopen_self=unknown
enable_dlopen_self_static=unknown
@@ -1930,52 +1867,44 @@ else
case $host_os in
beos*)
- lt_cv_dlopen=load_add_on
+ lt_cv_dlopen="load_add_on"
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
;;
mingw* | pw32* | cegcc*)
- lt_cv_dlopen=LoadLibrary
+ lt_cv_dlopen="LoadLibrary"
lt_cv_dlopen_libs=
;;
cygwin*)
- lt_cv_dlopen=dlopen
+ lt_cv_dlopen="dlopen"
lt_cv_dlopen_libs=
;;
darwin*)
- # if libdl is installed we need to link against it
+ # if libdl is installed we need to link against it
AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
- lt_cv_dlopen=dyld
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+ lt_cv_dlopen="dyld"
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
])
;;
- tpf*)
- # Don't try to run any link tests for TPF. We know it's impossible
- # because TPF is a cross-compiler, and we know how we open DSOs.
- lt_cv_dlopen=dlopen
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=no
- ;;
-
*)
AC_CHECK_FUNC([shl_load],
- [lt_cv_dlopen=shl_load],
+ [lt_cv_dlopen="shl_load"],
[AC_CHECK_LIB([dld], [shl_load],
- [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
[AC_CHECK_FUNC([dlopen],
- [lt_cv_dlopen=dlopen],
+ [lt_cv_dlopen="dlopen"],
[AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
[AC_CHECK_LIB([svld], [dlopen],
- [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
[AC_CHECK_LIB([dld], [dld_link],
- [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
])
])
])
@@ -1984,21 +1913,21 @@ else
;;
esac
- if test no = "$lt_cv_dlopen"; then
- enable_dlopen=no
- else
+ if test "x$lt_cv_dlopen" != xno; then
enable_dlopen=yes
+ else
+ enable_dlopen=no
fi
case $lt_cv_dlopen in
dlopen)
- save_CPPFLAGS=$CPPFLAGS
- test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
- save_LDFLAGS=$LDFLAGS
+ save_LDFLAGS="$LDFLAGS"
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
- save_LIBS=$LIBS
+ save_LIBS="$LIBS"
LIBS="$lt_cv_dlopen_libs $LIBS"
AC_CACHE_CHECK([whether a program can dlopen itself],
@@ -2008,7 +1937,7 @@ else
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
])
- if test yes = "$lt_cv_dlopen_self"; then
+ if test "x$lt_cv_dlopen_self" = xyes; then
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
lt_cv_dlopen_self_static, [dnl
@@ -2018,9 +1947,9 @@ else
])
fi
- CPPFLAGS=$save_CPPFLAGS
- LDFLAGS=$save_LDFLAGS
- LIBS=$save_LIBS
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
;;
esac
@@ -2112,8 +2041,8 @@ m4_defun([_LT_COMPILER_FILE_LOCKS],
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
_LT_COMPILER_C_O([$1])
-hard_links=nottested
-if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
+hard_links="nottested"
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
AC_MSG_CHECKING([if we can lock with hard links])
hard_links=yes
@@ -2123,8 +2052,8 @@ if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_loc
ln conftest.a conftest.b 2>&5 || hard_links=no
ln conftest.a conftest.b 2>/dev/null && hard_links=no
AC_MSG_RESULT([$hard_links])
- if test no = "$hard_links"; then
- AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
+ if test "$hard_links" = no; then
+ AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
need_locks=warn
fi
else
@@ -2151,8 +2080,8 @@ objdir=$lt_cv_objdir
_LT_DECL([], [objdir], [0],
[The name of the directory that contains temporary libtool files])dnl
m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
- [Define to the sub-directory where libtool stores uninstalled libraries.])
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+ [Define to the sub-directory in which libtool stores uninstalled libraries.])
])# _LT_CHECK_OBJDIR
@@ -2164,15 +2093,15 @@ m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
_LT_TAGVAR(hardcode_action, $1)=
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
test -n "$_LT_TAGVAR(runpath_var, $1)" ||
- test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
+ test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
# We can hardcode non-existent directories.
- if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
+ if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
# If the only mechanism to avoid hardcoding is shlibpath_var, we
# have to relink, otherwise we might link with an installed library
# when we should be linking with a yet-to-be-installed one
- ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
- test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
# Linking always hardcodes the temporary library directory.
_LT_TAGVAR(hardcode_action, $1)=relink
else
@@ -2186,12 +2115,12 @@ else
fi
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
-if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
- test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+ test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
# Fast installation is not supported
enable_fast_install=no
-elif test yes = "$shlibpath_overrides_runpath" ||
- test no = "$enable_shared"; then
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
# Fast installation is not necessary
enable_fast_install=needless
fi
@@ -2215,7 +2144,7 @@ else
# FIXME - insert some real tests, host_os isn't really good enough
case $host_os in
darwin*)
- if test -n "$STRIP"; then
+ if test -n "$STRIP" ; then
striplib="$STRIP -x"
old_striplib="$STRIP -S"
AC_MSG_RESULT([yes])
@@ -2233,47 +2162,6 @@ _LT_DECL([], [striplib], [1])
])# _LT_CMD_STRIPLIB
-# _LT_PREPARE_MUNGE_PATH_LIST
-# ---------------------------
-# Make sure func_munge_path_list() is defined correctly.
-m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
-[[# func_munge_path_list VARIABLE PATH
-# -----------------------------------
-# VARIABLE is name of variable containing _space_ separated list of
-# directories to be munged by the contents of PATH, which is string
-# having a format:
-# "DIR[:DIR]:"
-# string "DIR[ DIR]" will be prepended to VARIABLE
-# ":DIR[:DIR]"
-# string "DIR[ DIR]" will be appended to VARIABLE
-# "DIRP[:DIRP]::[DIRA:]DIRA"
-# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
-# "DIRA[ DIRA]" will be appended to VARIABLE
-# "DIR[:DIR]"
-# VARIABLE will be replaced by "DIR[ DIR]"
-func_munge_path_list ()
-{
- case x@S|@2 in
- x)
- ;;
- *:)
- eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
- ;;
- x:*)
- eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
- ;;
- *::*)
- eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
- eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
- ;;
- *)
- eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
- ;;
- esac
-}
-]])# _LT_PREPARE_PATH_LIST
-
-
# _LT_SYS_DYNAMIC_LINKER([TAG])
# -----------------------------
# PORTME Fill in your ld.so characteristics
@@ -2284,18 +2172,17 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl
m4_require([_LT_DECL_OBJDUMP])dnl
m4_require([_LT_DECL_SED])dnl
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
AC_MSG_CHECKING([dynamic linker characteristics])
m4_if([$1],
[], [
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
case $host_os in
- darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
- *) lt_awk_arg='/^libraries:/' ;;
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
esac
case $host_os in
- mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
- *) lt_sed_strip_eq='s|=/|/|g' ;;
+ mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
+ *) lt_sed_strip_eq="s,=/,/,g" ;;
esac
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
case $lt_search_path_spec in
@@ -2311,35 +2198,28 @@ if test yes = "$GCC"; then
;;
esac
# Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary...
+ # and add multilib dir if necessary.
lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
- # ...but if some path component already ends with the multilib dir we assume
- # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
- case "$lt_multi_os_dir; $lt_search_path_spec " in
- "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
- lt_multi_os_dir=
- ;;
- esac
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
- elif test -n "$lt_multi_os_dir"; then
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
test -d "$lt_sys_path" && \
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
fi
done
lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS = " "; FS = "/|\n";} {
- lt_foo = "";
- lt_count = 0;
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
for (lt_i = NF; lt_i > 0; lt_i--) {
if ($lt_i != "" && $lt_i != ".") {
if ($lt_i == "..") {
lt_count++;
} else {
if (lt_count == 0) {
- lt_foo = "/" $lt_i lt_foo;
+ lt_foo="/" $lt_i lt_foo;
} else {
lt_count--;
}
@@ -2353,7 +2233,7 @@ BEGIN {RS = " "; FS = "/|\n";} {
# for these hosts.
case $host_os in
mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
- $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
+ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
esac
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
else
@@ -2362,7 +2242,7 @@ fi])
library_names_spec=
libname_spec='lib$name'
soname_spec=
-shrext_cmds=.so
+shrext_cmds=".so"
postinstall_cmds=
postuninstall_cmds=
finish_cmds=
@@ -2379,17 +2259,14 @@ hardcode_into_libs=no
# flags to be left without arguments
need_version=unknown
-AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
-[User-defined run-time library search path.])
-
case $host_os in
aix3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
shlibpath_var=LIBPATH
# AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='$libname$release$shared_ext$major'
+ soname_spec='${libname}${release}${shared_ext}$major'
;;
aix[[4-9]]*)
@@ -2397,91 +2274,41 @@ aix[[4-9]]*)
need_lib_prefix=no
need_version=no
hardcode_into_libs=yes
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# AIX 5 supports IA64
- library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
else
# With GCC up to 2.95.x, collect2 would create an import file
# for dependence libraries. The import file would start with
- # the line '#! .'. This would cause the generated library to
- # depend on '.', always an invalid library. This was fixed in
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
# development snapshots of GCC prior to 3.0.
case $host_os in
aix4 | aix4.[[01]] | aix4.[[01]].*)
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
echo ' yes '
- echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
:
else
can_build_shared=no
fi
;;
esac
- # Using Import Files as archive members, it is possible to support
- # filename-based versioning of shared library archives on AIX. While
- # this would work for both with and without runtime linking, it will
- # prevent static linking of such archives. So we do filename-based
- # shared library versioning with .so extension only, which is used
- # when both runtime linking and shared linking is enabled.
- # Unfortunately, runtime linking may impact performance, so we do
- # not want this to be the default eventually. Also, we use the
- # versioned .so libs for executables only if there is the -brtl
- # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
- # To allow for filename-based versioning support, we need to create
- # libNAME.so.V as an archive file, containing:
- # *) an Import File, referring to the versioned filename of the
- # archive as well as the shared archive member, telling the
- # bitwidth (32 or 64) of that shared object, and providing the
- # list of exported symbols of that shared object, eventually
- # decorated with the 'weak' keyword
- # *) the shared object with the F_LOADONLY flag set, to really avoid
- # it being seen by the linker.
- # At run time we better use the real file rather than another symlink,
- # but for link time we create the symlink libNAME.so -> libNAME.so.V
-
- case $with_aix_soname,$aix_use_runtimelinking in
- # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
# soname into executable. Probably we can add versioning support to
# collect2, so additional links can be useful in future.
- aix,yes) # traditional libtool
- dynamic_linker='AIX unversionable lib.so'
+ if test "$aix_use_runtimelinking" = yes; then
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
# instead of lib<name>.a to let people know that these are not
# typical AIX shared libraries.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- ;;
- aix,no) # traditional AIX only
- dynamic_linker='AIX lib.a[(]lib.so.V[)]'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
# We preserve .a as extension for shared libraries through AIX4.2
# and later when we are not doing run time linking.
- library_names_spec='$libname$release.a $libname.a'
- soname_spec='$libname$release$shared_ext$major'
- ;;
- svr4,*) # full svr4 only
- dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
- library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
- # We do not specify a path in Import Files, so LIBPATH fires.
- shlibpath_overrides_runpath=yes
- ;;
- *,yes) # both, prefer svr4
- dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
- library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
- # unpreferred sharedlib libNAME.a needs extra handling
- postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
- postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
- # We do not specify a path in Import Files, so LIBPATH fires.
- shlibpath_overrides_runpath=yes
- ;;
- *,no) # both, prefer aix
- dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
- library_names_spec='$libname$release.a $libname.a'
- soname_spec='$libname$release$shared_ext$major'
- # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
- postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
- postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
- ;;
- esac
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
shlibpath_var=LIBPATH
fi
;;
@@ -2491,18 +2318,18 @@ amigaos*)
powerpc)
# Since July 2007 AmigaOS4 officially supports .so libraries.
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
;;
m68k)
library_names_spec='$libname.ixlibrary $libname.a'
# Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
;;
esac
;;
beos*)
- library_names_spec='$libname$shared_ext'
+ library_names_spec='${libname}${shared_ext}'
dynamic_linker="$host_os ld.so"
shlibpath_var=LIBRARY_PATH
;;
@@ -2510,8 +2337,8 @@ beos*)
bsdi[[45]]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -2523,7 +2350,7 @@ bsdi[[45]]*)
cygwin* | mingw* | pw32* | cegcc*)
version_type=windows
- shrext_cmds=.dll
+ shrext_cmds=".dll"
need_version=no
need_lib_prefix=no
@@ -2532,8 +2359,8 @@ cygwin* | mingw* | pw32* | cegcc*)
# gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname~
@@ -2549,17 +2376,17 @@ cygwin* | mingw* | pw32* | cegcc*)
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
m4_if([$1], [],[
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
- soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
;;
esac
dynamic_linker='Win32 ld.exe'
@@ -2568,8 +2395,8 @@ m4_if([$1], [],[
*,cl*)
# Native MSVC
libname_spec='$name'
- soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
- library_names_spec='$libname.dll.lib'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='${libname}.dll.lib'
case $build_os in
mingw*)
@@ -2596,7 +2423,7 @@ m4_if([$1], [],[
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
;;
*)
- sys_lib_search_path_spec=$LIB
+ sys_lib_search_path_spec="$LIB"
if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
# It is most probably a Windows format PATH.
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
@@ -2609,8 +2436,8 @@ m4_if([$1], [],[
esac
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname'
@@ -2623,7 +2450,7 @@ m4_if([$1], [],[
*)
# Assume MSVC wrapper
- library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
esac
@@ -2636,8 +2463,8 @@ darwin* | rhapsody*)
version_type=darwin
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
- soname_spec='$libname$release$major$shared_ext'
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -2650,8 +2477,8 @@ dgux*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -2669,13 +2496,12 @@ freebsd* | dragonfly*)
version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
need_version=no
need_lib_prefix=no
;;
freebsd-*)
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
esac
@@ -2705,10 +2531,10 @@ haiku*)
need_lib_prefix=no
need_version=no
dynamic_linker="$host_os runtime_loader"
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
- shlibpath_overrides_runpath=no
+ shlibpath_overrides_runpath=yes
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
hardcode_into_libs=yes
;;
@@ -2726,15 +2552,14 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.so"
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
- if test 32 = "$HPUX_IA64_MODE"; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- sys_lib_dlsearch_path_spec=/usr/lib/hpux32
else
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- sys_lib_dlsearch_path_spec=/usr/lib/hpux64
fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
hppa*64*)
shrext_cmds='.sl'
@@ -2742,8 +2567,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
@@ -2752,8 +2577,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=SHLIB_PATH
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
;;
esac
# HP-UX runs *really* slowly unless shared libraries are mode 555, ...
@@ -2766,8 +2591,8 @@ interix[[3-9]]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -2778,7 +2603,7 @@ irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
*)
- if test yes = "$lt_cv_prog_gnu_ld"; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
version_type=linux # correct to gnu/linux during the next big refactor
else
version_type=irix
@@ -2786,8 +2611,8 @@ irix5* | irix6* | nonstopux*)
esac
need_lib_prefix=no
need_version=no
- soname_spec='$libname$release$shared_ext$major'
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
case $host_os in
irix5* | nonstopux*)
libsuff= shlibsuff=
@@ -2806,8 +2631,8 @@ irix5* | irix6* | nonstopux*)
esac
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
- sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
hardcode_into_libs=yes
;;
@@ -2816,33 +2641,13 @@ linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
-linux*android*)
- version_type=none # Android doesn't support versioned libraries.
- need_lib_prefix=no
- need_version=no
- library_names_spec='$libname$release$shared_ext'
- soname_spec='$libname$release$shared_ext'
- finish_cmds=
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- dynamic_linker='Android linker'
- # Don't embed -rpath directories since the linker doesn't support them.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- ;;
-
# This must be glibc/ELF.
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -2867,12 +2672,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
# before this can be enabled.
hardcode_into_libs=yes
- # Ideally, we could use ldconfig to report *all* directores which are
- # searched for libraries, however this is still not possible. Aside from not
- # being certain /sbin/ldconfig is available, command
- # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
- # even though it is searched at run-time. Try to do the best guess by
- # appending ld.so.conf contents (and includes) to the search path.
+ # Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
@@ -2887,17 +2687,29 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
dynamic_linker='GNU/Linux ld.so'
;;
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
netbsd*)
version_type=sunos
need_lib_prefix=no
need_version=no
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='NetBSD (a.out) ld.so'
else
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
dynamic_linker='NetBSD ld.elf_so'
fi
shlibpath_var=LD_LIBRARY_PATH
@@ -2907,7 +2719,7 @@ netbsd*)
newsos6)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
;;
@@ -2916,68 +2728,58 @@ newsos6)
version_type=qnx
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='ldqnx.so'
;;
-openbsd* | bitrig*)
+openbsd*)
version_type=sunos
- sys_lib_dlsearch_path_spec=/usr/lib
+ sys_lib_dlsearch_path_spec="/usr/lib"
need_lib_prefix=no
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
- need_version=no
- else
- need_version=yes
- fi
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
;;
os2*)
libname_spec='$name'
- version_type=windows
- shrext_cmds=.dll
- need_version=no
+ shrext_cmds=".dll"
need_lib_prefix=no
- # OS/2 can only load a DLL with a base name of 8 characters or less.
- soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
- v=$($ECHO $release$versuffix | tr -d .-);
- n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
- $ECHO $n$v`$shared_ext'
- library_names_spec='${libname}_dll.$libext'
+ library_names_spec='$libname${shared_ext} $libname.a'
dynamic_linker='OS/2 ld.exe'
- shlibpath_var=BEGINLIBPATH
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
+ shlibpath_var=LIBPATH
;;
osf3* | osf4* | osf5*)
version_type=osf
need_lib_prefix=no
need_version=no
- soname_spec='$libname$release$shared_ext$major'
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
rdos*)
@@ -2988,8 +2790,8 @@ solaris*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
@@ -2999,11 +2801,11 @@ solaris*)
sunos4*)
version_type=sunos
- library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
- if test yes = "$with_gnu_ld"; then
+ if test "$with_gnu_ld" = yes; then
need_lib_prefix=no
fi
need_version=yes
@@ -3011,8 +2813,8 @@ sunos4*)
sysv4 | sysv4.3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
case $host_vendor in
sni)
@@ -3033,24 +2835,24 @@ sysv4 | sysv4.3*)
;;
sysv4*MP*)
- if test -d /usr/nec; then
+ if test -d /usr/nec ;then
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
- soname_spec='$libname$shared_ext.$major'
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
shlibpath_var=LD_LIBRARY_PATH
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=sco
+ version_type=freebsd-elf
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
- if test yes = "$with_gnu_ld"; then
+ if test "$with_gnu_ld" = yes; then
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
else
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -3068,7 +2870,7 @@ tpf*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
@@ -3076,8 +2878,8 @@ tpf*)
uts4*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
- soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -3086,30 +2888,20 @@ uts4*)
;;
esac
AC_MSG_RESULT([$dynamic_linker])
-test no = "$dynamic_linker" && can_build_shared=no
+test "$dynamic_linker" = no && can_build_shared=no
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
- sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
fi
-
-if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
- sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
fi
-# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
-configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
-
-# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
-func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
-
-# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
-configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
-
_LT_DECL([], [variables_saved_for_relink], [1],
[Variables whose values should be saved in libtool wrapper scripts and
restored at link time])
@@ -3142,41 +2934,39 @@ _LT_DECL([], [hardcode_into_libs], [0],
[Whether we should hardcode library paths into libraries])
_LT_DECL([], [sys_lib_search_path_spec], [2],
[Compile-time system search path for libraries])
-_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
- [Detected run-time system search path for libraries])
-_LT_DECL([], [configure_time_lt_sys_library_path], [2],
- [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+ [Run-time system search path for libraries])
])# _LT_SYS_DYNAMIC_LINKER
# _LT_PATH_TOOL_PREFIX(TOOL)
# --------------------------
-# find a file program that can recognize shared library
+# find a file program which can recognize shared library
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
[m4_require([_LT_DECL_EGREP])dnl
AC_MSG_CHECKING([for $1])
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
[case $MAGIC_CMD in
[[\\/*] | ?:[\\/]*])
- lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
*)
- lt_save_MAGIC_CMD=$MAGIC_CMD
- lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
dnl $ac_dummy forces splitting on constant user-supplied paths.
dnl POSIX.2 word splitting is done only on the output of word expansions,
dnl not every word. This closes a longstanding sh security hole.
ac_dummy="m4_if([$2], , $PATH, [$2])"
for ac_dir in $ac_dummy; do
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$1"; then
- lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
+ if test -f $ac_dir/$1; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/$1"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
$EGREP "$file_magic_regex" > /dev/null; then
:
@@ -3199,11 +2989,11 @@ _LT_EOF
break
fi
done
- IFS=$lt_save_ifs
- MAGIC_CMD=$lt_save_MAGIC_CMD
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
;;
esac])
-MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
AC_MSG_RESULT($MAGIC_CMD)
else
@@ -3221,7 +3011,7 @@ dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
# _LT_PATH_MAGIC
# --------------
-# find a file program that can recognize a shared library
+# find a file program which can recognize a shared library
m4_defun([_LT_PATH_MAGIC],
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
if test -z "$lt_cv_path_MAGIC_CMD"; then
@@ -3248,16 +3038,16 @@ m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
AC_ARG_WITH([gnu-ld],
[AS_HELP_STRING([--with-gnu-ld],
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
- [test no = "$withval" || with_gnu_ld=yes],
+ [test "$withval" = no || with_gnu_ld=yes],
[with_gnu_ld=no])dnl
ac_prog=ld
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
AC_MSG_CHECKING([for ld used by $CC])
case $host in
*-*-mingw*)
- # gcc leaves a trailing carriage return, which upsets mingw
+ # gcc leaves a trailing carriage return which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -3271,7 +3061,7 @@ if test yes = "$GCC"; then
while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
done
- test -z "$LD" && LD=$ac_prog
+ test -z "$LD" && LD="$ac_prog"
;;
"")
# If it fails, then pretend we aren't using GCC.
@@ -3282,37 +3072,37 @@ if test yes = "$GCC"; then
with_gnu_ld=unknown
;;
esac
-elif test yes = "$with_gnu_ld"; then
+elif test "$with_gnu_ld" = yes; then
AC_MSG_CHECKING([for GNU ld])
else
AC_MSG_CHECKING([for non-GNU ld])
fi
AC_CACHE_VAL(lt_cv_path_LD,
[if test -z "$LD"; then
- lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD=$ac_dir/$ac_prog
+ lt_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- test no != "$with_gnu_ld" && break
+ test "$with_gnu_ld" != no && break
;;
*)
- test yes != "$with_gnu_ld" && break
+ test "$with_gnu_ld" != yes && break
;;
esac
fi
done
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
else
- lt_cv_path_LD=$LD # Let the user override the test with a path.
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi])
-LD=$lt_cv_path_LD
+LD="$lt_cv_path_LD"
if test -n "$LD"; then
AC_MSG_RESULT($LD)
else
@@ -3366,13 +3156,13 @@ esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- if test yes != "$GCC"; then
+ if test "$GCC" != yes; then
reload_cmds=false
fi
;;
darwin*)
- if test yes = "$GCC"; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
else
reload_cmds='$LD$reload_flag -o $output$reload_objs'
fi
@@ -3383,43 +3173,6 @@ _LT_TAGDECL([], [reload_cmds], [2])dnl
])# _LT_CMD_RELOAD
-# _LT_PATH_DD
-# -----------
-# find a working dd
-m4_defun([_LT_PATH_DD],
-[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
-[printf 0123456789abcdef0123456789abcdef >conftest.i
-cat conftest.i conftest.i >conftest2.i
-: ${lt_DD:=$DD}
-AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
-[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
- cmp -s conftest.i conftest.out \
- && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
-fi])
-rm -f conftest.i conftest2.i conftest.out])
-])# _LT_PATH_DD
-
-
-# _LT_CMD_TRUNCATE
-# ----------------
-# find command to truncate a binary pipe
-m4_defun([_LT_CMD_TRUNCATE],
-[m4_require([_LT_PATH_DD])
-AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
-[printf 0123456789abcdef0123456789abcdef >conftest.i
-cat conftest.i conftest.i >conftest2.i
-lt_cv_truncate_bin=
-if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
- cmp -s conftest.i conftest.out \
- && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
-fi
-rm -f conftest.i conftest2.i conftest.out
-test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
-_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
- [Command to truncate a binary pipe])
-])# _LT_CMD_TRUNCATE
-
-
# _LT_CHECK_MAGIC_METHOD
# ----------------------
# how to check for library dependencies
@@ -3435,13 +3188,13 @@ lt_cv_deplibs_check_method='unknown'
# Need to set the preceding variable on all platforms that support
# interlibrary dependencies.
# 'none' -- dependencies not supported.
-# 'unknown' -- same as none, but documents that we really don't know.
+# `unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
# 'file_magic [[regex]]' -- check by looking for files in library path
-# that responds to the $file_magic_cmd with a given extended regex.
-# If you have 'file' or equivalent on your system and you're not sure
-# whether 'pass_all' will *always* work, you probably want this one.
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
aix[[4-9]]*)
@@ -3468,7 +3221,8 @@ mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
# func_win32_libid shell function, so use a weaker test based on 'objdump',
# unless we find 'file', for example because we are cross-compiling.
- if ( file / ) >/dev/null 2>&1; then
+ # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+ if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -3546,7 +3300,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
lt_cv_deplibs_check_method=pass_all
;;
-netbsd*)
+netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
else
@@ -3564,8 +3318,8 @@ newos6*)
lt_cv_deplibs_check_method=pass_all
;;
-openbsd* | bitrig*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
else
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
@@ -3618,9 +3372,6 @@ sysv4 | sysv4.3*)
tpf*)
lt_cv_deplibs_check_method=pass_all
;;
-os2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
esac
])
@@ -3661,38 +3412,33 @@ AC_DEFUN([LT_PATH_NM],
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
[if test -n "$NM"; then
# Let the user override the test.
- lt_cv_path_NM=$NM
+ lt_cv_path_NM="$NM"
else
- lt_nm_to_check=${ac_tool_prefix}nm
+ lt_nm_to_check="${ac_tool_prefix}nm"
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
lt_nm_to_check="$lt_nm_to_check nm"
fi
for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/$lt_tmp_nm
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
# Check to see if the nm accepts a BSD-compat flag.
- # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
# Tru64's nm complains that /dev/null is an invalid object file
- # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
- case $build_os in
- mingw*) lt_bad_file=conftest.nm/nofile ;;
- *) lt_bad_file=/dev/null ;;
- esac
- case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
- *$lt_bad_file* | *'Invalid file or object type'*)
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
lt_cv_path_NM="$tmp_nm -B"
- break 2
+ break
;;
*)
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
*/dev/null*)
lt_cv_path_NM="$tmp_nm -p"
- break 2
+ break
;;
*)
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
@@ -3703,21 +3449,21 @@ else
esac
fi
done
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
done
: ${lt_cv_path_NM=no}
fi])
-if test no != "$lt_cv_path_NM"; then
- NM=$lt_cv_path_NM
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
else
# Didn't find any BSD compatible name lister, look for dumpbin.
if test -n "$DUMPBIN"; then :
# Let the user override the test.
else
AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
- case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+ case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
*COFF*)
- DUMPBIN="$DUMPBIN -symbols -headers"
+ DUMPBIN="$DUMPBIN -symbols"
;;
*)
DUMPBIN=:
@@ -3725,8 +3471,8 @@ else
esac
fi
AC_SUBST([DUMPBIN])
- if test : != "$DUMPBIN"; then
- NM=$DUMPBIN
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
fi
fi
test -z "$NM" && NM=nm
@@ -3772,8 +3518,8 @@ lt_cv_sharedlib_from_linklib_cmd,
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- # two different shell functions defined in ltmain.sh;
- # decide which one to use based on capabilities of $DLLTOOL
+ # two different shell functions defined in ltmain.sh
+ # decide which to use based on capabilities of $DLLTOOL
case `$DLLTOOL --help 2>&1` in
*--identify-strict*)
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
@@ -3785,7 +3531,7 @@ cygwin* | mingw* | pw32* | cegcc*)
;;
*)
# fallback: assume linklib IS sharedlib
- lt_cv_sharedlib_from_linklib_cmd=$ECHO
+ lt_cv_sharedlib_from_linklib_cmd="$ECHO"
;;
esac
])
@@ -3812,28 +3558,13 @@ AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool
lt_cv_path_mainfest_tool=yes
fi
rm -f conftest*])
-if test yes != "$lt_cv_path_mainfest_tool"; then
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
MANIFEST_TOOL=:
fi
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
])# _LT_PATH_MANIFEST_TOOL
-# _LT_DLL_DEF_P([FILE])
-# ---------------------
-# True iff FILE is a Windows DLL '.def' file.
-# Keep in sync with func_dll_def_p in the libtool script
-AC_DEFUN([_LT_DLL_DEF_P],
-[dnl
- test DEF = "`$SED -n dnl
- -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
- -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
- -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
- -e q dnl Only consider the first "real" line
- $1`" dnl
-])# _LT_DLL_DEF_P
-
-
# LT_LIB_M
# --------
# check for math library
@@ -3845,11 +3576,11 @@ case $host in
# These system don't have libm, or don't need it
;;
*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
;;
*)
- AC_CHECK_LIB(m, cos, LIBM=-lm)
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
;;
esac
AC_SUBST([LIBM])
@@ -3868,7 +3599,7 @@ m4_defun([_LT_COMPILER_NO_RTTI],
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-if test yes = "$GCC"; then
+if test "$GCC" = yes; then
case $cc_basename in
nvcc*)
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
@@ -3920,7 +3651,7 @@ cygwin* | mingw* | pw32* | cegcc*)
symcode='[[ABCDGISTW]]'
;;
hpux*)
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
symcode='[[ABCDEGRST]]'
fi
;;
@@ -3953,44 +3684,14 @@ case `$NM -V 2>&1` in
symcode='[[ABCDGIRSTW]]' ;;
esac
-if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Gets list of data symbols to import.
- lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
- # Adjust the below global symbol transforms to fixup imported variables.
- lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
- lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
- lt_c_name_lib_hook="\
- -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
- -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
-else
- # Disable hooks by default.
- lt_cv_sys_global_symbol_to_import=
- lt_cdecl_hook=
- lt_c_name_hook=
- lt_c_name_lib_hook=
-fi
-
# Transform an extracted symbol line into a proper C declaration.
# Some systems (esp. on ia64) link data and code symbols differently,
# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n"\
-$lt_cdecl_hook\
-" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
-" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
-$lt_c_name_hook\
-" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
-" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
-
-# Transform an extracted symbol line into symbol name with lib prefix and
-# symbol address.
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
-$lt_c_name_lib_hook\
-" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
-" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
-" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
# Handle CRLF in mingw tool chain
opt_cr=
@@ -4008,24 +3709,21 @@ for ac_symprfx in "" "_"; do
# Write the raw and C identifiers.
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function,
- # D for any global variable and I for any imported variable.
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
# Also find C++ and __fastcall symbols from MSVC++,
# which start with @ or ?.
lt_cv_sys_global_symbol_pipe="$AWK ['"\
" {last_section=section; section=\$ 3};"\
" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
-" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
-" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
" \$ 0!~/External *\|/{next};"\
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
" {if(hide[section]) next};"\
-" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
-" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
-" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
" ' prfx=^$ac_symprfx]"
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
@@ -4065,11 +3763,11 @@ _LT_EOF
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
-/* DATA imports from DLLs on WIN32 can't be const, because runtime
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
relocations are performed -- see ld's documentation on pseudo-relocs. */
# define LT@&t@_DLSYM_CONST
-#elif defined __osf__
+#elif defined(__osf__)
/* This system does not cope well with relocations in const data. */
# define LT@&t@_DLSYM_CONST
#else
@@ -4095,7 +3793,7 @@ lt__PROGRAM__LTX_preloaded_symbols[[]] =
{
{ "@PROGRAM@", (void *) 0 },
_LT_EOF
- $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
cat <<\_LT_EOF >> conftest.$ac_ext
{0, (void *) 0}
};
@@ -4115,9 +3813,9 @@ _LT_EOF
mv conftest.$ac_objext conftstm.$ac_objext
lt_globsym_save_LIBS=$LIBS
lt_globsym_save_CFLAGS=$CFLAGS
- LIBS=conftstm.$ac_objext
+ LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
- if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
LIBS=$lt_globsym_save_LIBS
@@ -4138,7 +3836,7 @@ _LT_EOF
rm -rf conftest* conftst*
# Do not use the global_symbol_pipe unless it works.
- if test yes = "$pipe_works"; then
+ if test "$pipe_works" = yes; then
break
else
lt_cv_sys_global_symbol_pipe=
@@ -4165,16 +3863,12 @@ _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
[Take the output of nm and produce a listing of raw symbols and C names])
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
[Transform the output of nm in a proper C declaration])
-_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
- [Transform the output of nm into a list of symbols to manually relocate])
_LT_DECL([global_symbol_to_c_name_address],
[lt_cv_sys_global_symbol_to_c_name_address], [1],
[Transform the output of nm in a C name address pair])
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
[lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
[Transform the output of nm in a C name address pair when lib prefix is needed])
-_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
- [The name lister interface])
_LT_DECL([], [nm_file_list_spec], [1],
[Specify filename containing input files for $NM])
]) # _LT_CMD_GLOBAL_SYMBOLS
@@ -4190,18 +3884,17 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)=
m4_if([$1], [CXX], [
# C++ specific cases for pic, static, wl, etc.
- if test yes = "$GXX"; then
+ if test "$GXX" = yes; then
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
case $host_os in
aix*)
# All AIX code is PIC.
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
fi
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
;;
amigaos*)
@@ -4212,8 +3905,8 @@ m4_if([$1], [CXX], [
;;
m68k)
# FIXME: we need at least 68020 code to build shared libraries, but
- # adding the '-m68020' flag to GCC prevents building anything better,
- # like '-m68040'.
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
;;
esac
@@ -4229,11 +3922,6 @@ m4_if([$1], [CXX], [
# (--disable-auto-import) libraries
m4_if([$1], [GCJ], [],
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- case $host_os in
- os2*)
- _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
- ;;
- esac
;;
darwin* | rhapsody*)
# PIC is the default on this platform
@@ -4283,7 +3971,7 @@ m4_if([$1], [CXX], [
case $host_os in
aix[[4-9]]*)
# All AIX code is PIC.
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
else
@@ -4324,14 +4012,14 @@ m4_if([$1], [CXX], [
case $cc_basename in
CC*)
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
- if test ia64 != "$host_cpu"; then
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
fi
;;
aCC*)
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
case $host_cpu in
hppa*64*|ia64*)
# +Z the default
@@ -4368,7 +4056,7 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
;;
ecpc* )
- # old Intel C++ for x86_64, which still supported -KPIC.
+ # old Intel C++ for x86_64 which still supported -KPIC.
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
@@ -4424,7 +4112,7 @@ m4_if([$1], [CXX], [
;;
esac
;;
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
;;
*qnx* | *nto*)
# QNX uses GNU C++, but need to define -shared option too, otherwise
@@ -4513,18 +4201,17 @@ m4_if([$1], [CXX], [
fi
],
[
- if test yes = "$GCC"; then
+ if test "$GCC" = yes; then
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
case $host_os in
aix*)
# All AIX code is PIC.
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
fi
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
;;
amigaos*)
@@ -4535,8 +4222,8 @@ m4_if([$1], [CXX], [
;;
m68k)
# FIXME: we need at least 68020 code to build shared libraries, but
- # adding the '-m68020' flag to GCC prevents building anything better,
- # like '-m68040'.
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
;;
esac
@@ -4553,11 +4240,6 @@ m4_if([$1], [CXX], [
# (--disable-auto-import) libraries
m4_if([$1], [GCJ], [],
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- case $host_os in
- os2*)
- _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
- ;;
- esac
;;
darwin* | rhapsody*)
@@ -4628,7 +4310,7 @@ m4_if([$1], [CXX], [
case $host_os in
aix*)
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
else
@@ -4636,30 +4318,11 @@ m4_if([$1], [CXX], [
fi
;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- case $cc_basename in
- nagfor*)
- # NAG Fortran compiler
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- esac
- ;;
-
mingw* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
m4_if([$1], [GCJ], [],
[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- case $host_os in
- os2*)
- _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
- ;;
- esac
;;
hpux9* | hpux10* | hpux11*)
@@ -4675,7 +4338,7 @@ m4_if([$1], [CXX], [
;;
esac
# Is there a better lt_prog_compiler_static that works with the bundled CC?
- _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
;;
irix5* | irix6* | nonstopux*)
@@ -4686,7 +4349,7 @@ m4_if([$1], [CXX], [
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
- # old Intel for x86_64, which still supported -KPIC.
+ # old Intel for x86_64 which still supported -KPIC.
ecc*)
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -4711,12 +4374,6 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
- tcc*)
- # Fabrice Bellard et al's Tiny C Compiler
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
@@ -4814,7 +4471,7 @@ m4_if([$1], [CXX], [
;;
sysv4*MP*)
- if test -d /usr/nec; then
+ if test -d /usr/nec ;then
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
fi
@@ -4843,7 +4500,7 @@ m4_if([$1], [CXX], [
fi
])
case $host_os in
- # For platforms that do not support PIC, -DPIC is meaningless:
+ # For platforms which do not support PIC, -DPIC is meaningless:
*djgpp*)
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
;;
@@ -4909,21 +4566,17 @@ m4_if([$1], [CXX], [
case $host_os in
aix[[4-9]]*)
# If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to GNU nm, but means don't demangle to AIX nm.
- # Without the "-l" option, or with the "-B" option, AIX nm treats
- # weak defined symbols like other global defined symbols, whereas
- # GNU nm marks them as "W".
- # While the 'weak' keyword is ignored in the Export File, we need
- # it in the Import File for the 'aix-soname' feature, so we have
- # to replace the "-B" option with "-P" for AIX nm.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global defined
+ # symbols, whereas GNU nm marks them as "W".
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
;;
pw32*)
- _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
+ _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
;;
cygwin* | mingw* | cegcc*)
case $cc_basename in
@@ -4936,6 +4589,9 @@ m4_if([$1], [CXX], [
;;
esac
;;
+ linux* | k*bsd*-gnu | gnu*)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
*)
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
;;
@@ -4969,9 +4625,9 @@ m4_if([$1], [CXX], [
# included in the symbol list
_LT_TAGVAR(include_expsyms, $1)=
# exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ' (' and ')$', so one must not match beginning or
- # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
- # as well as any symbol that contains 'd'.
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
_LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
# platforms (ab)use it in PIC code, but their linkers get confused if
@@ -4987,7 +4643,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
- if test yes != "$GCC"; then
+ if test "$GCC" != yes; then
with_gnu_ld=no
fi
;;
@@ -4995,9 +4651,12 @@ dnl Note also adjust exclude_expsyms for C++ above.
# we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes
;;
- openbsd* | bitrig*)
+ openbsd*)
with_gnu_ld=no
;;
+ linux* | k*bsd*-gnu | gnu*)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
esac
_LT_TAGVAR(ld_shlibs, $1)=yes
@@ -5005,7 +4664,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
# On some targets, GNU ld is compatible enough with the native linker
# that we're better off using the native interface for both.
lt_use_gnu_ld_interface=no
- if test yes = "$with_gnu_ld"; then
+ if test "$with_gnu_ld" = yes; then
case $host_os in
aix*)
# The AIX port of GNU ld has always aspired to compatibility
@@ -5027,24 +4686,24 @@ dnl Note also adjust exclude_expsyms for C++ above.
esac
fi
- if test yes = "$lt_use_gnu_ld_interface"; then
+ if test "$lt_use_gnu_ld_interface" = yes; then
# If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='$wl'
+ wlarc='${wl}'
# Set some defaults for GNU ld with shared library support. These
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
runpath_var=LD_RUN_PATH
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
# ancient GNU ld didn't support --whole-archive et. al.
if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
else
_LT_TAGVAR(whole_archive_flag_spec, $1)=
fi
supports_anon_versioning=no
- case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
+ case `$LD -v 2>&1` in
*GNU\ gold*) supports_anon_versioning=yes ;;
*\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -5057,7 +4716,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
case $host_os in
aix[[3-9]]*)
# On AIX/PPC, the GNU linker is very broken
- if test ia64 != "$host_cpu"; then
+ if test "$host_cpu" != ia64; then
_LT_TAGVAR(ld_shlibs, $1)=no
cat <<_LT_EOF 1>&2
@@ -5076,7 +4735,7 @@ _LT_EOF
case $host_cpu in
powerpc)
# see comment about AmigaOS4 .so support
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)=''
;;
m68k)
@@ -5092,7 +4751,7 @@ _LT_EOF
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
else
_LT_TAGVAR(ld_shlibs, $1)=no
fi
@@ -5102,7 +4761,7 @@ _LT_EOF
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
# as there is no search path for DLLs.
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_TAGVAR(always_export_symbols, $1)=no
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
@@ -5110,89 +4769,61 @@ _LT_EOF
_LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file, use it as
- # is; otherwise, prepend EXPORTS...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
else
_LT_TAGVAR(ld_shlibs, $1)=no
fi
;;
haiku*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
_LT_TAGVAR(link_all_deplibs, $1)=yes
;;
- os2*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- shrext_cmds=.dll
- _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- prefix_cmds="$SED"~
- if test EXPORTS = "`$SED 1q $export_symbols`"; then
- prefix_cmds="$prefix_cmds -e 1d";
- fi~
- prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
- cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- ;;
-
interix[[3-9]]*)
_LT_TAGVAR(hardcode_direct, $1)=no
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
# Instead, shared libraries are loaded at an image base (0x10000000 by
# default) and relocated if they conflict, which is a slow very memory
# consuming and fragmenting process. To avoid this, we pick a random,
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
- if test linux-dietlibc = "$host_os"; then
+ if test "$host_os" = linux-dietlibc; then
case $cc_basename in
diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
esac
fi
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test no = "$tmp_diet"
+ && test "$tmp_diet" = no
then
tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
tmp_addflag=' $pic_flag'
;;
pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group f77 and f90 compilers
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
tmp_addflag=' $pic_flag -Mnomain' ;;
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
tmp_addflag=' -i_dynamic' ;;
@@ -5203,47 +4834,42 @@ _LT_EOF
lf95*) # Lahey Fortran 8.1
_LT_TAGVAR(whole_archive_flag_spec, $1)=
tmp_sharedflag='--shared' ;;
- nagfor*) # NAGFOR 5.3
- tmp_sharedflag='-Wl,-shared' ;;
xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
tmp_sharedflag='-qmkshrobj'
tmp_addflag= ;;
nvcc*) # Cuda Compiler Driver 2.2
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
_LT_TAGVAR(compiler_needs_object, $1)=yes
;;
esac
case `$CC -V 2>&1 | sed 5q` in
*Sun\ C*) # Sun C 5.9
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
_LT_TAGVAR(compiler_needs_object, $1)=yes
tmp_sharedflag='-G' ;;
*Sun\ F*) # Sun Fortran 8.3
tmp_sharedflag='-G' ;;
esac
- _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- if test yes = "$supports_anon_versioning"; then
+ if test "x$supports_anon_versioning" = xyes; then
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
case $cc_basename in
- tcc*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
- ;;
xlf* | bgf* | bgxlf* | mpixlf*)
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
_LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
- if test yes = "$supports_anon_versioning"; then
+ if test "x$supports_anon_versioning" = xyes; then
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
fi
;;
esac
@@ -5252,13 +4878,13 @@ _LT_EOF
fi
;;
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
fi
;;
@@ -5276,8 +4902,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
_LT_TAGVAR(ld_shlibs, $1)=no
fi
@@ -5289,7 +4915,7 @@ _LT_EOF
_LT_TAGVAR(ld_shlibs, $1)=no
cat <<_LT_EOF 1>&2
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
*** reliably create shared libraries on SCO systems. Therefore, libtool
*** is disabling shared libraries support. We urge you to upgrade GNU
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
@@ -5304,9 +4930,9 @@ _LT_EOF
# DT_RUNPATH tag from executables and libraries. But doing so
# requires that you compile everything twice, which is a pain.
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
_LT_TAGVAR(ld_shlibs, $1)=no
fi
@@ -5323,15 +4949,15 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
_LT_TAGVAR(ld_shlibs, $1)=no
fi
;;
esac
- if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
+ if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
runpath_var=
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
@@ -5347,7 +4973,7 @@ _LT_EOF
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
_LT_TAGVAR(hardcode_minus_L, $1)=yes
- if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
_LT_TAGVAR(hardcode_direct, $1)=unsupported
@@ -5355,57 +4981,34 @@ _LT_EOF
;;
aix[[4-9]]*)
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
- no_entry_flag=
+ no_entry_flag=""
else
# If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to GNU nm, but means don't demangle to AIX nm.
- # Without the "-l" option, or with the "-B" option, AIX nm treats
- # weak defined symbols like other global defined symbols, whereas
- # GNU nm marks them as "W".
- # While the 'weak' keyword is ignored in the Export File, we need
- # it in the Import File for the 'aix-soname' feature, so we have
- # to replace the "-B" option with "-P" for AIX nm.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global
+ # defined symbols, whereas GNU nm marks them as "W".
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # have runtime linking enabled, and use it for executables.
- # For shared libraries, we enable/disable runtime linking
- # depending on the kind of the shared library created -
- # when "with_aix_soname,aix_use_runtimelinking" is:
- # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
- # "aix,yes" lib.so shared, rtl:yes, for executables
- # lib.a static archive
- # "both,no" lib.so.V(shr.o) shared, rtl:yes
- # lib.a(lib.so.V) shared, rtl:no, for executables
- # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
- # lib.a(lib.so.V) shared, rtl:no
- # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
- # lib.a static archive
+ # need to do runtime linking.
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
for ld_flag in $LDFLAGS; do
- if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
break
fi
done
- if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
- # With aix-soname=svr4, we create the lib.so.V shared archives only,
- # so we don't have lib.a shared libs to link our executables.
- # We have to force runtime linking in this case.
- aix_use_runtimelinking=yes
- LDFLAGS="$LDFLAGS -Wl,-brtl"
- fi
;;
esac
@@ -5424,21 +5027,13 @@ _LT_EOF
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
_LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
- case $with_aix_soname,$aix_use_runtimelinking in
- aix,*) ;; # traditional, no import file
- svr4,* | *,yes) # use import file
- # The Import File defines what to hardcode.
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=no
- ;;
- esac
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
- if test yes = "$GCC"; then
+ if test "$GCC" = yes; then
case $host_os in aix4.[[012]]|aix4.[[012]].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
- collect2name=`$CC -print-prog-name=collect2`
+ collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" &&
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
then
@@ -5457,80 +5052,62 @@ _LT_EOF
;;
esac
shared_flag='-shared'
- if test yes = "$aix_use_runtimelinking"; then
- shared_flag="$shared_flag "'$wl-G'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
fi
- # Need to ensure runtime linking is disabled for the traditional
- # shared library, or the linker may eventually find shared libraries
- # /with/ Import File - we do not want to mix them.
- shared_flag_aix='-shared'
- shared_flag_svr4='-shared $wl-G'
+ _LT_TAGVAR(link_all_deplibs, $1)=no
else
# not using gcc
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
- if test yes = "$aix_use_runtimelinking"; then
- shared_flag='$wl-G'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
else
- shared_flag='$wl-bM:SRE'
+ shared_flag='${wl}-bM:SRE'
fi
- shared_flag_aix='$wl-bM:SRE'
- shared_flag_svr4='$wl-G'
fi
fi
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
# It seems that -bexpall does not export symbols beginning with
# underscore (_), so it is better to generate a list of symbols to export.
_LT_TAGVAR(always_export_symbols, $1)=yes
- if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+ if test "$aix_use_runtimelinking" = yes; then
# Warning - without using the other runtime loading flags (-brtl),
# -berok will link without error, but may produce a broken library.
_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
_LT_SYS_MODULE_PATH_AIX([$1])
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
else
- if test ia64 = "$host_cpu"; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an
# empty executable.
_LT_SYS_MODULE_PATH_AIX([$1])
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
# -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
- _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
- if test yes = "$with_gnu_ld"; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
# We only use this code for GNU lds that support --whole-archive.
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
else
# Exported symbols can be pulled into shared objects from archives
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
fi
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
- # -brtl affects multiple linker settings, -berok does not and is overridden later
- compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
- if test svr4 != "$with_aix_soname"; then
- # This is similar to how AIX traditionally builds its shared libraries.
- _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
- fi
- if test aix != "$with_aix_soname"; then
- _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
- else
- # used by -dlpreopen to get the symbols
- _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
- fi
- _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
+ # This is similar to how AIX traditionally builds its shared libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
fi
;;
@@ -5539,7 +5116,7 @@ _LT_EOF
case $host_cpu in
powerpc)
# see comment about AmigaOS4 .so support
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)=''
;;
m68k)
@@ -5569,17 +5146,16 @@ _LT_EOF
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=.dll
+ shrext_cmds=".dll"
# FIXME: Setting linknames here is a bad hack.
- _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
- _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
- cp "$export_symbols" "$output_objdir/$soname.def";
- echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
- else
- $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
- fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
- linknames='
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
@@ -5588,18 +5164,18 @@ _LT_EOF
# Don't use ranlib
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
- lt_tool_outputfile="@TOOL_OUTPUT@"~
- case $lt_outputfile in
- *.exe|*.EXE) ;;
- *)
- lt_outputfile=$lt_outputfile.exe
- lt_tool_outputfile=$lt_tool_outputfile.exe
- ;;
- esac~
- if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
- $RM "$lt_outputfile.manifest";
- fi'
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
;;
*)
# Assume MSVC wrapper
@@ -5608,7 +5184,7 @@ _LT_EOF
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=.dll
+ shrext_cmds=".dll"
# FIXME: Setting linknames here is a bad hack.
_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
# The linker will automatically build a .lib file if we build a DLL.
@@ -5658,33 +5234,33 @@ _LT_EOF
;;
hpux9*)
- if test yes = "$GCC"; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
else
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_TAGVAR(hardcode_direct, $1)=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
_LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
;;
hpux10*)
- if test yes,no = "$GCC,$with_gnu_ld"; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
else
_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
- if test no = "$with_gnu_ld"; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
_LT_TAGVAR(hardcode_minus_L, $1)=yes
@@ -5692,25 +5268,25 @@ _LT_EOF
;;
hpux11*)
- if test yes,no = "$GCC,$with_gnu_ld"; then
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
case $host_cpu in
hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
else
case $host_cpu in
hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
m4_if($1, [], [
@@ -5718,14 +5294,14 @@ _LT_EOF
# (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
_LT_LINKER_OPTION([if $CC understands -b],
_LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
- [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
[_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
- [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
;;
esac
fi
- if test no = "$with_gnu_ld"; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
case $host_cpu in
@@ -5736,7 +5312,7 @@ _LT_EOF
*)
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
@@ -5747,16 +5323,16 @@ _LT_EOF
;;
irix5* | irix6* | nonstopux*)
- if test yes = "$GCC"; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
# Try to use the -exported_symbol ld option, if it does not
# work, assume that -exports_file does not work either and
# implicitly export all symbols.
# This should be the same for all languages, so no per-tag cache variable.
AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
[lt_cv_irix_exported_symbol],
- [save_LDFLAGS=$LDFLAGS
- LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+ [save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
AC_LINK_IFELSE(
[AC_LANG_SOURCE(
[AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
@@ -5769,32 +5345,22 @@ _LT_EOF
end]])])],
[lt_cv_irix_exported_symbol=yes],
[lt_cv_irix_exported_symbol=no])
- LDFLAGS=$save_LDFLAGS])
- if test yes = "$lt_cv_irix_exported_symbol"; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+ LDFLAGS="$save_LDFLAGS"])
+ if test "$lt_cv_irix_exported_symbol" = yes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
fi
else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
fi
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_TAGVAR(inherit_rpath, $1)=yes
_LT_TAGVAR(link_all_deplibs, $1)=yes
;;
- linux*)
- case $cc_basename in
- tcc*)
- # Fabrice Bellard et al's Tiny C Compiler
- _LT_TAGVAR(ld_shlibs, $1)=yes
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
@@ -5808,7 +5374,7 @@ _LT_EOF
newsos6)
_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
_LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
@@ -5816,19 +5382,27 @@ _LT_EOF
*nto* | *qnx*)
;;
- openbsd* | bitrig*)
+ openbsd*)
if test -f /usr/libexec/ld.so; then
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
fi
else
_LT_TAGVAR(ld_shlibs, $1)=no
@@ -5839,53 +5413,33 @@ _LT_EOF
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
_LT_TAGVAR(hardcode_minus_L, $1)=yes
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- shrext_cmds=.dll
- _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- prefix_cmds="$SED"~
- if test EXPORTS = "`$SED 1q $export_symbols`"; then
- prefix_cmds="$prefix_cmds -e 1d";
- fi~
- prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
- cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
;;
osf3*)
- if test yes = "$GCC"; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
else
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
fi
_LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
;;
osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test yes = "$GCC"; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
else
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
# Both c and cxx compiler support -rpath directly
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -5896,24 +5450,24 @@ _LT_EOF
solaris*)
_LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
- if test yes = "$GCC"; then
- wlarc='$wl'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
wlarc=''
- _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
;;
*)
- wlarc='$wl'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
;;
esac
fi
@@ -5923,11 +5477,11 @@ _LT_EOF
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
*)
# The compiler driver will combine and reorder linker options,
- # but understands '-z linker_flag'. GCC discards it without '$wl',
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
# but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- if test yes = "$GCC"; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
else
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
fi
@@ -5937,10 +5491,10 @@ _LT_EOF
;;
sunos4*)
- if test sequent = "$host_vendor"; then
+ if test "x$host_vendor" = xsequent; then
# Use $CC to link under sequent, because it throws in some extra .o
# files that make .init and .fini sections work.
- _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
else
_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
fi
@@ -5989,43 +5543,43 @@ _LT_EOF
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
runpath_var='LD_RUN_PATH'
- if test yes = "$GCC"; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
sysv5* | sco3.2v5* | sco5v6*)
- # Note: We CANNOT use -z defs as we might desire, because we do not
+ # Note: We can NOT use -z defs as we might desire, because we do not
# link with -lc, and that would cause any symbols used from libc to
# always be unresolved, which means just about no library would
# ever link correctly. If we're not using GNU ld we use -z text
# though, which does catch some bad symbols but isn't as heavy-handed
# as -z defs.
- _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
- _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
_LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
runpath_var='LD_RUN_PATH'
- if test yes = "$GCC"; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
@@ -6040,17 +5594,17 @@ _LT_EOF
;;
esac
- if test sni = "$host_vendor"; then
+ if test x$host_vendor = xsni; then
case $host in
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
;;
esac
fi
fi
])
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
@@ -6067,7 +5621,7 @@ x|xyes)
# Assume -lc should be added
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- if test yes,yes = "$GCC,$enable_shared"; then
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
case $_LT_TAGVAR(archive_cmds, $1) in
*'~'*)
# FIXME: we may have to deal with multi-command sequences.
@@ -6147,12 +5701,12 @@ _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
[Whether we need a single "-rpath" flag with a separated argument])
_LT_TAGDECL([], [hardcode_direct], [0],
- [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
DIR into the resulting binary])
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
- [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
DIR into the resulting binary and the resulting library dependency is
- "absolute", i.e impossible to change by setting $shlibpath_var if the
+ "absolute", i.e impossible to change by setting ${shlibpath_var} if the
library is relocated])
_LT_TAGDECL([], [hardcode_minus_L], [0],
[Set to "yes" if using the -LDIR flag during linking hardcodes DIR
@@ -6193,10 +5747,10 @@ dnl [Compiler flag to generate thread safe objects])
# ------------------------
# Ensure that the configuration variables for a C compiler are suitably
# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to 'libtool'.
+# the compiler configuration to `libtool'.
m4_defun([_LT_LANG_C_CONFIG],
[m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC=$CC
+lt_save_CC="$CC"
AC_LANG_PUSH(C)
# Source file extension for C test sources.
@@ -6236,18 +5790,18 @@ if test -n "$compiler"; then
LT_SYS_DLOPEN_SELF
_LT_CMD_STRIPLIB
- # Report what library types will actually be built
+ # Report which library types will actually be built
AC_MSG_CHECKING([if libtool supports shared libraries])
AC_MSG_RESULT([$can_build_shared])
AC_MSG_CHECKING([whether to build shared libraries])
- test no = "$can_build_shared" && enable_shared=no
+ test "$can_build_shared" = "no" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
# are all built from PIC.
case $host_os in
aix3*)
- test yes = "$enable_shared" && enable_static=no
+ test "$enable_shared" = yes && enable_static=no
if test -n "$RANLIB"; then
archive_cmds="$archive_cmds~\$RANLIB \$lib"
postinstall_cmds='$RANLIB $lib'
@@ -6255,12 +5809,8 @@ if test -n "$compiler"; then
;;
aix[[4-9]]*)
- if test ia64 != "$host_cpu"; then
- case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
- yes,aix,yes) ;; # shared object as lib.so file only
- yes,svr4,*) ;; # shared object as lib.so archive member only
- yes,*) enable_static=no ;; # shared object in lib.a archive as well
- esac
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
fi
;;
esac
@@ -6268,13 +5818,13 @@ if test -n "$compiler"; then
AC_MSG_CHECKING([whether to build static libraries])
# Make sure either enable_shared or enable_static is yes.
- test yes = "$enable_shared" || enable_static=yes
+ test "$enable_shared" = yes || enable_static=yes
AC_MSG_RESULT([$enable_static])
_LT_CONFIG($1)
fi
AC_LANG_POP
-CC=$lt_save_CC
+CC="$lt_save_CC"
])# _LT_LANG_C_CONFIG
@@ -6282,14 +5832,14 @@ CC=$lt_save_CC
# --------------------------
# Ensure that the configuration variables for a C++ compiler are suitably
# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to 'libtool'.
+# the compiler configuration to `libtool'.
m4_defun([_LT_LANG_CXX_CONFIG],
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
m4_require([_LT_DECL_EGREP])dnl
m4_require([_LT_PATH_MANIFEST_TOOL])dnl
-if test -n "$CXX" && ( test no != "$CXX" &&
- ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
- (test g++ != "$CXX"))); then
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
AC_PROG_CXXCPP
else
_lt_caught_CXX_error=yes
@@ -6331,7 +5881,7 @@ _LT_TAGVAR(objext, $1)=$objext
# the CXX compiler isn't working. Some variables (like enable_shared)
# are currently assumed to apply to all compilers on this platform,
# and will be corrupted by setting them based on a non-working compiler.
-if test yes != "$_lt_caught_CXX_error"; then
+if test "$_lt_caught_CXX_error" != yes; then
# Code to be used in simple compile tests
lt_simple_compile_test_code="int some_variable = 0;"
@@ -6373,35 +5923,35 @@ if test yes != "$_lt_caught_CXX_error"; then
if test -n "$compiler"; then
# We don't want -fno-exception when compiling C++ code, so set the
# no_builtin_flag separately
- if test yes = "$GXX"; then
+ if test "$GXX" = yes; then
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
else
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
fi
- if test yes = "$GXX"; then
+ if test "$GXX" = yes; then
# Set up default GNU C++ configuration
LT_PATH_LD
# Check if GNU C++ uses GNU ld as the underlying linker, since the
# archiving commands below assume that GNU ld is being used.
- if test yes = "$with_gnu_ld"; then
- _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ if test "$with_gnu_ld" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
# If archive_cmds runs LD, not CC, wlarc should be empty
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
# investigate it a little bit more. (MM)
- wlarc='$wl'
+ wlarc='${wl}'
# ancient GNU ld didn't support --whole-archive et. al.
if eval "`$CC -print-prog-name=ld` --help 2>&1" |
$GREP 'no-whole-archive' > /dev/null; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
else
_LT_TAGVAR(whole_archive_flag_spec, $1)=
fi
@@ -6437,30 +5987,18 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(ld_shlibs, $1)=no
;;
aix[[4-9]]*)
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
- no_entry_flag=
+ no_entry_flag=""
else
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # have runtime linking enabled, and use it for executables.
- # For shared libraries, we enable/disable runtime linking
- # depending on the kind of the shared library created -
- # when "with_aix_soname,aix_use_runtimelinking" is:
- # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
- # "aix,yes" lib.so shared, rtl:yes, for executables
- # lib.a static archive
- # "both,no" lib.so.V(shr.o) shared, rtl:yes
- # lib.a(lib.so.V) shared, rtl:no, for executables
- # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
- # lib.a(lib.so.V) shared, rtl:no
- # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
- # lib.a static archive
+ # need to do runtime linking.
case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
for ld_flag in $LDFLAGS; do
case $ld_flag in
@@ -6470,13 +6008,6 @@ if test yes != "$_lt_caught_CXX_error"; then
;;
esac
done
- if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
- # With aix-soname=svr4, we create the lib.so.V shared archives only,
- # so we don't have lib.a shared libs to link our executables.
- # We have to force runtime linking in this case.
- aix_use_runtimelinking=yes
- LDFLAGS="$LDFLAGS -Wl,-brtl"
- fi
;;
esac
@@ -6495,21 +6026,13 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
_LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
- case $with_aix_soname,$aix_use_runtimelinking in
- aix,*) ;; # no import file
- svr4,* | *,yes) # use import file
- # The Import File defines what to hardcode.
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=no
- ;;
- esac
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
- if test yes = "$GXX"; then
+ if test "$GXX" = yes; then
case $host_os in aix4.[[012]]|aix4.[[012]].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
- collect2name=`$CC -print-prog-name=collect2`
+ collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" &&
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
then
@@ -6527,84 +6050,64 @@ if test yes != "$_lt_caught_CXX_error"; then
fi
esac
shared_flag='-shared'
- if test yes = "$aix_use_runtimelinking"; then
- shared_flag=$shared_flag' $wl-G'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
fi
- # Need to ensure runtime linking is disabled for the traditional
- # shared library, or the linker may eventually find shared libraries
- # /with/ Import File - we do not want to mix them.
- shared_flag_aix='-shared'
- shared_flag_svr4='-shared $wl-G'
else
# not using gcc
- if test ia64 = "$host_cpu"; then
+ if test "$host_cpu" = ia64; then
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
- if test yes = "$aix_use_runtimelinking"; then
- shared_flag='$wl-G'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
else
- shared_flag='$wl-bM:SRE'
+ shared_flag='${wl}-bM:SRE'
fi
- shared_flag_aix='$wl-bM:SRE'
- shared_flag_svr4='$wl-G'
fi
fi
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
# It seems that -bexpall does not export symbols beginning with
# underscore (_), so it is better to generate a list of symbols to
# export.
_LT_TAGVAR(always_export_symbols, $1)=yes
- if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+ if test "$aix_use_runtimelinking" = yes; then
# Warning - without using the other runtime loading flags (-brtl),
# -berok will link without error, but may produce a broken library.
- # The "-G" linker flag allows undefined symbols.
- _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
# Determine the default libpath from the value encoded in an empty
# executable.
_LT_SYS_MODULE_PATH_AIX([$1])
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
else
- if test ia64 = "$host_cpu"; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
_LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an
# empty executable.
_LT_SYS_MODULE_PATH_AIX([$1])
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
# -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
- _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
- if test yes = "$with_gnu_ld"; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ if test "$with_gnu_ld" = yes; then
# We only use this code for GNU lds that support --whole-archive.
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
else
# Exported symbols can be pulled into shared objects from archives
_LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
fi
_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
- # -brtl affects multiple linker settings, -berok does not and is overridden later
- compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
- if test svr4 != "$with_aix_soname"; then
- # This is similar to how AIX traditionally builds its shared
- # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
- _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
- fi
- if test aix != "$with_aix_soname"; then
- _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
- else
- # used by -dlpreopen to get the symbols
- _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
- fi
- _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
fi
;;
@@ -6614,7 +6117,7 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
else
_LT_TAGVAR(ld_shlibs, $1)=no
fi
@@ -6642,58 +6145,57 @@ if test yes != "$_lt_caught_CXX_error"; then
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=.dll
+ shrext_cmds=".dll"
# FIXME: Setting linknames here is a bad hack.
- _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
- _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
- cp "$export_symbols" "$output_objdir/$soname.def";
- echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
- else
- $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
- fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
- linknames='
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
# Don't use ranlib
_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
- lt_tool_outputfile="@TOOL_OUTPUT@"~
- case $lt_outputfile in
- *.exe|*.EXE) ;;
- *)
- lt_outputfile=$lt_outputfile.exe
- lt_tool_outputfile=$lt_tool_outputfile.exe
- ;;
- esac~
- func_to_tool_file "$lt_outputfile"~
- if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
- $RM "$lt_outputfile.manifest";
- fi'
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile="$lt_outputfile.exe"
+ lt_tool_outputfile="$lt_tool_outputfile.exe"
+ ;;
+ esac~
+ func_to_tool_file "$lt_outputfile"~
+ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
;;
*)
# g++
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
# as there is no search path for DLLs.
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_TAGVAR(always_export_symbols, $1)=no
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file, use it as
- # is; otherwise, prepend EXPORTS...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
else
_LT_TAGVAR(ld_shlibs, $1)=no
fi
@@ -6704,34 +6206,6 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_DARWIN_LINKER_FEATURES($1)
;;
- os2*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- shrext_cmds=.dll
- _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
- $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
- $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
- $ECHO EXPORTS >> $output_objdir/$libname.def~
- prefix_cmds="$SED"~
- if test EXPORTS = "`$SED 1q $export_symbols`"; then
- prefix_cmds="$prefix_cmds -e 1d";
- fi~
- prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
- cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
- $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
- emximp -o $lib $output_objdir/$libname.def'
- _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- ;;
-
dgux*)
case $cc_basename in
ec++*)
@@ -6767,14 +6241,14 @@ if test yes != "$_lt_caught_CXX_error"; then
;;
haiku*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
_LT_TAGVAR(link_all_deplibs, $1)=yes
;;
hpux9*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
# but as the default
@@ -6786,7 +6260,7 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(ld_shlibs, $1)=no
;;
aCC*)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
@@ -6795,11 +6269,11 @@ if test yes != "$_lt_caught_CXX_error"; then
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
- if test yes = "$GXX"; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
else
# FIXME: insert proper C++ library support
_LT_TAGVAR(ld_shlibs, $1)=no
@@ -6809,15 +6283,15 @@ if test yes != "$_lt_caught_CXX_error"; then
;;
hpux10*|hpux11*)
- if test no = "$with_gnu_ld"; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ if test $with_gnu_ld = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
case $host_cpu in
hppa*64*|ia64*)
;;
*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
;;
esac
fi
@@ -6843,13 +6317,13 @@ if test yes != "$_lt_caught_CXX_error"; then
aCC*)
case $host_cpu in
hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
esac
# Commands to make compiler produce verbose output that lists
@@ -6860,20 +6334,20 @@ if test yes != "$_lt_caught_CXX_error"; then
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
- if test yes = "$GXX"; then
- if test no = "$with_gnu_ld"; then
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
case $host_cpu in
hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
esac
fi
@@ -6888,22 +6362,22 @@ if test yes != "$_lt_caught_CXX_error"; then
interix[[3-9]]*)
_LT_TAGVAR(hardcode_direct, $1)=no
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
# Instead, shared libraries are loaded at an image base (0x10000000 by
# default) and relocated if they conflict, which is a slow very memory
# consuming and fragmenting process. To avoid this, we pick a random,
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
irix5* | irix6*)
case $cc_basename in
CC*)
# SGI C++
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
# Archives containing C++ object files must be created using
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
@@ -6912,17 +6386,17 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
;;
*)
- if test yes = "$GXX"; then
- if test no = "$with_gnu_ld"; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
fi
fi
_LT_TAGVAR(link_all_deplibs, $1)=yes
;;
esac
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
_LT_TAGVAR(inherit_rpath, $1)=yes
;;
@@ -6935,8 +6409,8 @@ if test yes != "$_lt_caught_CXX_error"; then
# KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
@@ -6945,10 +6419,10 @@ if test yes != "$_lt_caught_CXX_error"; then
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
# Archives containing C++ object files must be created using
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
@@ -6962,59 +6436,59 @@ if test yes != "$_lt_caught_CXX_error"; then
# earlier do not add the objects themselves.
case `$CC -V 2>&1` in
*"Version 7."*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
;;
*) # Version 8.0 or newer
tmp_idyn=
case $host_cpu in
ia64*) tmp_idyn=' -i_dynamic';;
esac
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
;;
esac
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
;;
pgCC* | pgcpp*)
# Portland Group C++ compiler
case `$CC -V` in
*pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
_LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
- compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
_LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
- $RANLIB $oldlib'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+ $RANLIB $oldlib'
_LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
;;
*) # Version 6 and above use weak symbols
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
;;
esac
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
;;
cxx*)
# Compaq C++
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
runpath_var=LD_RUN_PATH
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -7028,18 +6502,18 @@ if test yes != "$_lt_caught_CXX_error"; then
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
;;
xl* | mpixl* | bgxl*)
# IBM XL 8.0 on PPC, with GNU ld
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
- _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- if test yes = "$supports_anon_versioning"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
;;
*)
@@ -7047,10 +6521,10 @@ if test yes != "$_lt_caught_CXX_error"; then
*Sun\ C*)
# Sun C++ 5.9
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
_LT_TAGVAR(compiler_needs_object, $1)=yes
# Not sure whether something based on
@@ -7108,17 +6582,22 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(ld_shlibs, $1)=yes
;;
- openbsd* | bitrig*)
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ openbsd*)
if test -f /usr/libexec/ld.so; then
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
- _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
fi
output_verbose_link_cmd=func_echo_all
else
@@ -7134,9 +6613,9 @@ if test yes != "$_lt_caught_CXX_error"; then
# KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
# Archives containing C++ object files must be created using
@@ -7154,17 +6633,17 @@ if test yes != "$_lt_caught_CXX_error"; then
cxx*)
case $host in
osf3*)
- _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
;;
*)
_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
- echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
- $RM $lib.exp'
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
;;
esac
@@ -7179,21 +6658,21 @@ if test yes != "$_lt_caught_CXX_error"; then
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
- if test yes,no = "$GXX,$with_gnu_ld"; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
case $host in
osf3*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
;;
*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
;;
esac
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
# Commands to make compiler produce verbose output that lists
@@ -7239,9 +6718,9 @@ if test yes != "$_lt_caught_CXX_error"; then
# Sun C++ 4.2, 5.x and Centerline C++
_LT_TAGVAR(archive_cmds_need_lc,$1)=yes
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -7249,7 +6728,7 @@ if test yes != "$_lt_caught_CXX_error"; then
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
*)
# The compiler driver will combine and reorder linker options,
- # but understands '-z linker_flag'.
+ # but understands `-z linker_flag'.
# Supported since Solaris 2.6 (maybe 2.5.1?)
_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
;;
@@ -7266,30 +6745,30 @@ if test yes != "$_lt_caught_CXX_error"; then
;;
gcx*)
# Green Hills C++ Compiler
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
# The C++ compiler must be used to create the archive.
_LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
;;
*)
# GNU C++ compiler with Solaris linker
- if test yes,no = "$GXX,$with_gnu_ld"; then
- _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
else
- # g++ 2.7 appears to require '-G' NOT '-shared' on this
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
# platform.
- _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
@@ -7297,11 +6776,11 @@ if test yes != "$_lt_caught_CXX_error"; then
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
case $host_os in
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
*)
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
;;
esac
fi
@@ -7310,52 +6789,52 @@ if test yes != "$_lt_caught_CXX_error"; then
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
runpath_var='LD_RUN_PATH'
case $cc_basename in
CC*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
;;
sysv5* | sco3.2v5* | sco5v6*)
- # Note: We CANNOT use -z defs as we might desire, because we do not
+ # Note: We can NOT use -z defs as we might desire, because we do not
# link with -lc, and that would cause any symbols used from libc to
# always be unresolved, which means just about no library would
# ever link correctly. If we're not using GNU ld we use -z text
# though, which does catch some bad symbols but isn't as heavy-handed
# as -z defs.
- _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
- _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
_LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
runpath_var='LD_RUN_PATH'
case $cc_basename in
CC*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
_LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
- '"$_LT_TAGVAR(old_archive_cmds, $1)"
+ '"$_LT_TAGVAR(old_archive_cmds, $1)"
_LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
- '"$_LT_TAGVAR(reload_cmds, $1)"
+ '"$_LT_TAGVAR(reload_cmds, $1)"
;;
*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
;;
@@ -7386,10 +6865,10 @@ if test yes != "$_lt_caught_CXX_error"; then
esac
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
- test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
+ test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
- _LT_TAGVAR(GCC, $1)=$GXX
- _LT_TAGVAR(LD, $1)=$LD
+ _LT_TAGVAR(GCC, $1)="$GXX"
+ _LT_TAGVAR(LD, $1)="$LD"
## CAVEAT EMPTOR:
## There is no encapsulation within the following macros, do not change
@@ -7416,7 +6895,7 @@ if test yes != "$_lt_caught_CXX_error"; then
lt_cv_path_LD=$lt_save_path_LD
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test yes != "$_lt_caught_CXX_error"
+fi # test "$_lt_caught_CXX_error" != yes
AC_LANG_POP
])# _LT_LANG_CXX_CONFIG
@@ -7438,14 +6917,13 @@ AC_REQUIRE([_LT_DECL_SED])
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
func_stripname_cnf ()
{
- case @S|@2 in
- .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
- *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
esac
} # func_stripname_cnf
])# _LT_FUNC_STRIPNAME_CNF
-
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
# ---------------------------------
# Figure out "hidden" library dependencies from verbose
@@ -7529,13 +7007,13 @@ if AC_TRY_EVAL(ac_compile); then
pre_test_object_deps_done=no
for p in `eval "$output_verbose_link_cmd"`; do
- case $prev$p in
+ case ${prev}${p} in
-L* | -R* | -l*)
# Some compilers place space between "-{L,R}" and the path.
# Remove the space.
- if test x-L = "$p" ||
- test x-R = "$p"; then
+ if test $p = "-L" ||
+ test $p = "-R"; then
prev=$p
continue
fi
@@ -7551,16 +7029,16 @@ if AC_TRY_EVAL(ac_compile); then
case $p in
=*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
esac
- if test no = "$pre_test_object_deps_done"; then
- case $prev in
+ if test "$pre_test_object_deps_done" = no; then
+ case ${prev} in
-L | -R)
# Internal compiler library paths should come after those
# provided the user. The postdeps already come after the
# user supplied libs so there is no need to process them.
if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
- _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
else
- _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
fi
;;
# The "-l" case would never come before the object being
@@ -7568,9 +7046,9 @@ if AC_TRY_EVAL(ac_compile); then
esac
else
if test -z "$_LT_TAGVAR(postdeps, $1)"; then
- _LT_TAGVAR(postdeps, $1)=$prev$p
+ _LT_TAGVAR(postdeps, $1)="${prev}${p}"
else
- _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
+ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
fi
fi
prev=
@@ -7585,15 +7063,15 @@ if AC_TRY_EVAL(ac_compile); then
continue
fi
- if test no = "$pre_test_object_deps_done"; then
+ if test "$pre_test_object_deps_done" = no; then
if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
- _LT_TAGVAR(predep_objects, $1)=$p
+ _LT_TAGVAR(predep_objects, $1)="$p"
else
_LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
fi
else
if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
- _LT_TAGVAR(postdep_objects, $1)=$p
+ _LT_TAGVAR(postdep_objects, $1)="$p"
else
_LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
fi
@@ -7624,6 +7102,51 @@ interix[[3-9]]*)
_LT_TAGVAR(postdep_objects,$1)=
_LT_TAGVAR(postdeps,$1)=
;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
esac
])
@@ -7632,7 +7155,7 @@ case " $_LT_TAGVAR(postdeps, $1) " in
esac
_LT_TAGVAR(compiler_lib_search_dirs, $1)=
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
fi
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
[The directories searched by this compiler when creating a shared library])
@@ -7652,10 +7175,10 @@ _LT_TAGDECL([], [compiler_lib_search_path], [1],
# --------------------------
# Ensure that the configuration variables for a Fortran 77 compiler are
# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to 'libtool'.
+# to write the compiler configuration to `libtool'.
m4_defun([_LT_LANG_F77_CONFIG],
[AC_LANG_PUSH(Fortran 77)
-if test -z "$F77" || test no = "$F77"; then
+if test -z "$F77" || test "X$F77" = "Xno"; then
_lt_disable_F77=yes
fi
@@ -7692,7 +7215,7 @@ _LT_TAGVAR(objext, $1)=$objext
# the F77 compiler isn't working. Some variables (like enable_shared)
# are currently assumed to apply to all compilers on this platform,
# and will be corrupted by setting them based on a non-working compiler.
-if test yes != "$_lt_disable_F77"; then
+if test "$_lt_disable_F77" != yes; then
# Code to be used in simple compile tests
lt_simple_compile_test_code="\
subroutine t
@@ -7714,7 +7237,7 @@ if test yes != "$_lt_disable_F77"; then
_LT_LINKER_BOILERPLATE
# Allow CC to be a program name with arguments.
- lt_save_CC=$CC
+ lt_save_CC="$CC"
lt_save_GCC=$GCC
lt_save_CFLAGS=$CFLAGS
CC=${F77-"f77"}
@@ -7728,25 +7251,21 @@ if test yes != "$_lt_disable_F77"; then
AC_MSG_RESULT([$can_build_shared])
AC_MSG_CHECKING([whether to build shared libraries])
- test no = "$can_build_shared" && enable_shared=no
+ test "$can_build_shared" = "no" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
# are all built from PIC.
case $host_os in
aix3*)
- test yes = "$enable_shared" && enable_static=no
+ test "$enable_shared" = yes && enable_static=no
if test -n "$RANLIB"; then
archive_cmds="$archive_cmds~\$RANLIB \$lib"
postinstall_cmds='$RANLIB $lib'
fi
;;
aix[[4-9]]*)
- if test ia64 != "$host_cpu"; then
- case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
- yes,aix,yes) ;; # shared object as lib.so file only
- yes,svr4,*) ;; # shared object as lib.so archive member only
- yes,*) enable_static=no ;; # shared object in lib.a archive as well
- esac
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
fi
;;
esac
@@ -7754,11 +7273,11 @@ if test yes != "$_lt_disable_F77"; then
AC_MSG_CHECKING([whether to build static libraries])
# Make sure either enable_shared or enable_static is yes.
- test yes = "$enable_shared" || enable_static=yes
+ test "$enable_shared" = yes || enable_static=yes
AC_MSG_RESULT([$enable_static])
- _LT_TAGVAR(GCC, $1)=$G77
- _LT_TAGVAR(LD, $1)=$LD
+ _LT_TAGVAR(GCC, $1)="$G77"
+ _LT_TAGVAR(LD, $1)="$LD"
## CAVEAT EMPTOR:
## There is no encapsulation within the following macros, do not change
@@ -7775,9 +7294,9 @@ if test yes != "$_lt_disable_F77"; then
fi # test -n "$compiler"
GCC=$lt_save_GCC
- CC=$lt_save_CC
- CFLAGS=$lt_save_CFLAGS
-fi # test yes != "$_lt_disable_F77"
+ CC="$lt_save_CC"
+ CFLAGS="$lt_save_CFLAGS"
+fi # test "$_lt_disable_F77" != yes
AC_LANG_POP
])# _LT_LANG_F77_CONFIG
@@ -7787,11 +7306,11 @@ AC_LANG_POP
# -------------------------
# Ensure that the configuration variables for a Fortran compiler are
# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to 'libtool'.
+# to write the compiler configuration to `libtool'.
m4_defun([_LT_LANG_FC_CONFIG],
[AC_LANG_PUSH(Fortran)
-if test -z "$FC" || test no = "$FC"; then
+if test -z "$FC" || test "X$FC" = "Xno"; then
_lt_disable_FC=yes
fi
@@ -7828,7 +7347,7 @@ _LT_TAGVAR(objext, $1)=$objext
# the FC compiler isn't working. Some variables (like enable_shared)
# are currently assumed to apply to all compilers on this platform,
# and will be corrupted by setting them based on a non-working compiler.
-if test yes != "$_lt_disable_FC"; then
+if test "$_lt_disable_FC" != yes; then
# Code to be used in simple compile tests
lt_simple_compile_test_code="\
subroutine t
@@ -7850,7 +7369,7 @@ if test yes != "$_lt_disable_FC"; then
_LT_LINKER_BOILERPLATE
# Allow CC to be a program name with arguments.
- lt_save_CC=$CC
+ lt_save_CC="$CC"
lt_save_GCC=$GCC
lt_save_CFLAGS=$CFLAGS
CC=${FC-"f95"}
@@ -7866,25 +7385,21 @@ if test yes != "$_lt_disable_FC"; then
AC_MSG_RESULT([$can_build_shared])
AC_MSG_CHECKING([whether to build shared libraries])
- test no = "$can_build_shared" && enable_shared=no
+ test "$can_build_shared" = "no" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
# are all built from PIC.
case $host_os in
aix3*)
- test yes = "$enable_shared" && enable_static=no
+ test "$enable_shared" = yes && enable_static=no
if test -n "$RANLIB"; then
archive_cmds="$archive_cmds~\$RANLIB \$lib"
postinstall_cmds='$RANLIB $lib'
fi
;;
aix[[4-9]]*)
- if test ia64 != "$host_cpu"; then
- case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
- yes,aix,yes) ;; # shared object as lib.so file only
- yes,svr4,*) ;; # shared object as lib.so archive member only
- yes,*) enable_static=no ;; # shared object in lib.a archive as well
- esac
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
fi
;;
esac
@@ -7892,11 +7407,11 @@ if test yes != "$_lt_disable_FC"; then
AC_MSG_CHECKING([whether to build static libraries])
# Make sure either enable_shared or enable_static is yes.
- test yes = "$enable_shared" || enable_static=yes
+ test "$enable_shared" = yes || enable_static=yes
AC_MSG_RESULT([$enable_static])
- _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
- _LT_TAGVAR(LD, $1)=$LD
+ _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+ _LT_TAGVAR(LD, $1)="$LD"
## CAVEAT EMPTOR:
## There is no encapsulation within the following macros, do not change
@@ -7916,7 +7431,7 @@ if test yes != "$_lt_disable_FC"; then
GCC=$lt_save_GCC
CC=$lt_save_CC
CFLAGS=$lt_save_CFLAGS
-fi # test yes != "$_lt_disable_FC"
+fi # test "$_lt_disable_FC" != yes
AC_LANG_POP
])# _LT_LANG_FC_CONFIG
@@ -7926,7 +7441,7 @@ AC_LANG_POP
# --------------------------
# Ensure that the configuration variables for the GNU Java Compiler compiler
# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to 'libtool'.
+# to write the compiler configuration to `libtool'.
m4_defun([_LT_LANG_GCJ_CONFIG],
[AC_REQUIRE([LT_PROG_GCJ])dnl
AC_LANG_SAVE
@@ -7960,7 +7475,7 @@ CC=${GCJ-"gcj"}
CFLAGS=$GCJFLAGS
compiler=$CC
_LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)=$LD
+_LT_TAGVAR(LD, $1)="$LD"
_LT_CC_BASENAME([$compiler])
# GCJ did not exist at the time GCC didn't implicitly link libc in.
@@ -7997,7 +7512,7 @@ CFLAGS=$lt_save_CFLAGS
# --------------------------
# Ensure that the configuration variables for the GNU Go compiler
# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to 'libtool'.
+# to write the compiler configuration to `libtool'.
m4_defun([_LT_LANG_GO_CONFIG],
[AC_REQUIRE([LT_PROG_GO])dnl
AC_LANG_SAVE
@@ -8031,7 +7546,7 @@ CC=${GOC-"gccgo"}
CFLAGS=$GOFLAGS
compiler=$CC
_LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)=$LD
+_LT_TAGVAR(LD, $1)="$LD"
_LT_CC_BASENAME([$compiler])
# Go did not exist at the time GCC didn't implicitly link libc in.
@@ -8068,7 +7583,7 @@ CFLAGS=$lt_save_CFLAGS
# -------------------------
# Ensure that the configuration variables for the Windows resource compiler
# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to 'libtool'.
+# to write the compiler configuration to `libtool'.
m4_defun([_LT_LANG_RC_CONFIG],
[AC_REQUIRE([LT_PROG_RC])dnl
AC_LANG_SAVE
@@ -8084,7 +7599,7 @@ _LT_TAGVAR(objext, $1)=$objext
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
# Code to be used in simple link tests
-lt_simple_link_test_code=$lt_simple_compile_test_code
+lt_simple_link_test_code="$lt_simple_compile_test_code"
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_TAG_COMPILER
@@ -8094,7 +7609,7 @@ _LT_COMPILER_BOILERPLATE
_LT_LINKER_BOILERPLATE
# Allow CC to be a program name with arguments.
-lt_save_CC=$CC
+lt_save_CC="$CC"
lt_save_CFLAGS=$CFLAGS
lt_save_GCC=$GCC
GCC=
@@ -8123,7 +7638,7 @@ AC_DEFUN([LT_PROG_GCJ],
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
[m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
[AC_CHECK_TOOL(GCJ, gcj,)
- test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
+ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
AC_SUBST(GCJFLAGS)])])[]dnl
])
@@ -8234,7 +7749,7 @@ lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
# along with /bin/sed that truncates output.
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
- test ! -f "$lt_ac_sed" && continue
+ test ! -f $lt_ac_sed && continue
cat /dev/null > conftest.in
lt_ac_count=0
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
@@ -8251,9 +7766,9 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
cmp -s conftest.out conftest.nl || break
# 10000 chars as input seems more than enough
- test 10 -lt "$lt_ac_count" && break
+ test $lt_ac_count -gt 10 && break
lt_ac_count=`expr $lt_ac_count + 1`
- if test "$lt_ac_count" -gt "$lt_ac_max"; then
+ if test $lt_ac_count -gt $lt_ac_max; then
lt_ac_max=$lt_ac_count
lt_cv_path_SED=$lt_ac_sed
fi
@@ -8277,7 +7792,27 @@ dnl AC_DEFUN([LT_AC_PROG_SED], [])
# Find out whether the shell is Bourne or XSI compatible,
# or has some other useful features.
m4_defun([_LT_CHECK_SHELL_FEATURES],
-[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,b/c, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
lt_unset=unset
else
lt_unset=false
@@ -8301,9 +7836,102 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
])# _LT_CHECK_SHELL_FEATURES
+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
+# ------------------------------------------------------
+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
+m4_defun([_LT_PROG_FUNCTION_REPLACE],
+[dnl {
+sed -e '/^$1 ()$/,/^} # $1 /c\
+$1 ()\
+{\
+m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+])
+
+
+# _LT_PROG_REPLACE_SHELLFNS
+# -------------------------
+# Replace existing portable implementations of several shell functions with
+# equivalent extended shell implementations where those features are available..
+m4_defun([_LT_PROG_REPLACE_SHELLFNS],
+[if test x"$xsi_shell" = xyes; then
+ _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac])
+
+ _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
+ func_basename_result="${1##*/}"])
+
+ _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"])
+
+ _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}])
+
+ _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
+ func_split_long_opt_name=${1%%=*}
+ func_split_long_opt_arg=${1#*=}])
+
+ _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
+ func_split_short_opt_arg=${1#??}
+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
+
+ _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac])
+
+ _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
+
+ _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
+
+ _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
+fi
+
+if test x"$lt_shell_append" = xyes; then
+ _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
+
+ _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
+ func_quote_for_eval "${2}"
+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
+ eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
+
+ # Save a `func_append' function call where possible by direct use of '+='
+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+else
+ # Save a `func_append' function call even when '+=' is not available
+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+ AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
+fi
+])
+
# _LT_PATH_CONVERSION_FUNCTIONS
# -----------------------------
-# Determine what file name conversion functions should be used by
+# Determine which file name conversion functions should be used by
# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
# for certain cross-compile configurations and native mingw.
m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
index 94b0829..5d9acd8 100644
--- a/m4/ltoptions.m4
+++ b/m4/ltoptions.m4
@@ -1,14 +1,14 @@
# Helper functions for option handling. -*- Autoconf -*-
#
-# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
-# Foundation, Inc.
+# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
-# serial 8 ltoptions.m4
+# serial 7 ltoptions.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
@@ -29,7 +29,7 @@ m4_define([_LT_SET_OPTION],
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
_LT_MANGLE_DEFUN([$1], [$2]),
- [m4_warning([Unknown $1 option '$2'])])[]dnl
+ [m4_warning([Unknown $1 option `$2'])])[]dnl
])
@@ -75,15 +75,13 @@ m4_if([$1],[LT_INIT],[
dnl
dnl If no reference was made to various pairs of opposing options, then
dnl we run the default mode handler for the pair. For example, if neither
- dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
+ dnl `shared' nor `disable-shared' was passed, we enable building of shared
dnl archives by default:
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
- [_LT_ENABLE_FAST_INSTALL])
- _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
- [_LT_WITH_AIX_SONAME([aix])])
+ [_LT_ENABLE_FAST_INSTALL])
])
])# _LT_SET_OPTIONS
@@ -114,7 +112,7 @@ AU_DEFUN([AC_LIBTOOL_DLOPEN],
[_LT_SET_OPTION([LT_INIT], [dlopen])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the 'dlopen' option into LT_INIT's first parameter.])
+put the `dlopen' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
@@ -150,7 +148,7 @@ AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
_LT_SET_OPTION([LT_INIT], [win32-dll])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the 'win32-dll' option into LT_INIT's first parameter.])
+put the `win32-dll' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
@@ -159,9 +157,9 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
# _LT_ENABLE_SHARED([DEFAULT])
# ----------------------------
-# implement the --enable-shared flag, and supports the 'shared' and
-# 'disable-shared' LT_INIT options.
-# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_SHARED],
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([shared],
@@ -174,14 +172,14 @@ AC_ARG_ENABLE([shared],
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
;;
esac],
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
@@ -213,9 +211,9 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], [])
# _LT_ENABLE_STATIC([DEFAULT])
# ----------------------------
-# implement the --enable-static flag, and support the 'static' and
-# 'disable-static' LT_INIT options.
-# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_STATIC],
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([static],
@@ -228,14 +226,14 @@ AC_ARG_ENABLE([static],
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
;;
esac],
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
@@ -267,9 +265,9 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], [])
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
# ----------------------------------
-# implement the --enable-fast-install flag, and support the 'fast-install'
-# and 'disable-fast-install' LT_INIT options.
-# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_FAST_INSTALL],
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([fast-install],
@@ -282,14 +280,14 @@ AC_ARG_ENABLE([fast-install],
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
;;
esac],
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
@@ -306,14 +304,14 @@ AU_DEFUN([AC_ENABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the 'fast-install' option into LT_INIT's first parameter.])
+the `fast-install' option into LT_INIT's first parameter.])
])
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the 'disable-fast-install' option into LT_INIT's first parameter.])
+the `disable-fast-install' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
@@ -321,64 +319,11 @@ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
-# _LT_WITH_AIX_SONAME([DEFAULT])
-# ----------------------------------
-# implement the --with-aix-soname flag, and support the `aix-soname=aix'
-# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
-# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
-m4_define([_LT_WITH_AIX_SONAME],
-[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
-shared_archive_member_spec=
-case $host,$enable_shared in
-power*-*-aix[[5-9]]*,yes)
- AC_MSG_CHECKING([which variant of shared library versioning to provide])
- AC_ARG_WITH([aix-soname],
- [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
- [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
- [case $withval in
- aix|svr4|both)
- ;;
- *)
- AC_MSG_ERROR([Unknown argument to --with-aix-soname])
- ;;
- esac
- lt_cv_with_aix_soname=$with_aix_soname],
- [AC_CACHE_VAL([lt_cv_with_aix_soname],
- [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
- with_aix_soname=$lt_cv_with_aix_soname])
- AC_MSG_RESULT([$with_aix_soname])
- if test aix != "$with_aix_soname"; then
- # For the AIX way of multilib, we name the shared archive member
- # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
- # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
- # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
- # the AIX toolchain works better with OBJECT_MODE set (default 32).
- if test 64 = "${OBJECT_MODE-32}"; then
- shared_archive_member_spec=shr_64
- else
- shared_archive_member_spec=shr
- fi
- fi
- ;;
-*)
- with_aix_soname=aix
- ;;
-esac
-
-_LT_DECL([], [shared_archive_member_spec], [0],
- [Shared archive member basename, for filename based shared library versioning on AIX])dnl
-])# _LT_WITH_AIX_SONAME
-
-LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
-LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
-LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
-
-
# _LT_WITH_PIC([MODE])
# --------------------
-# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
# LT_INIT options.
-# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
+# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
m4_define([_LT_WITH_PIC],
[AC_ARG_WITH([pic],
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
@@ -389,17 +334,19 @@ m4_define([_LT_WITH_PIC],
*)
pic_mode=default
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for lt_pkg in $withval; do
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
if test "X$lt_pkg" = "X$lt_p"; then
pic_mode=yes
fi
done
- IFS=$lt_save_ifs
+ IFS="$lt_save_ifs"
;;
esac],
- [pic_mode=m4_default([$1], [default])])
+ [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
])# _LT_WITH_PIC
@@ -412,7 +359,7 @@ AU_DEFUN([AC_LIBTOOL_PICMODE],
[_LT_SET_OPTION([LT_INIT], [pic-only])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the 'pic-only' option into LT_INIT's first parameter.])
+put the `pic-only' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
index 48bc934..9000a05 100644
--- a/m4/ltsugar.m4
+++ b/m4/ltsugar.m4
@@ -1,7 +1,6 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
-# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
-# Foundation, Inc.
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
@@ -34,7 +33,7 @@ m4_define([_lt_join],
# ------------
# Manipulate m4 lists.
# These macros are necessary as long as will still need to support
-# Autoconf-2.59, which quotes differently.
+# Autoconf-2.59 which quotes differently.
m4_define([lt_car], [[$1]])
m4_define([lt_cdr],
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
@@ -45,7 +44,7 @@ m4_define([lt_unquote], $1)
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
# ------------------------------------------
-# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
# Note that neither SEPARATOR nor STRING are expanded; they are appended
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
index fa04b52..07a8602 100644
--- a/m4/ltversion.m4
+++ b/m4/ltversion.m4
@@ -1,6 +1,6 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
-# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2004 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004
#
# This file is free software; the Free Software Foundation gives
@@ -9,15 +9,15 @@
# @configure_input@
-# serial 4179 ltversion.m4
+# serial 3337 ltversion.m4
# This file is part of GNU Libtool
-m4_define([LT_PACKAGE_VERSION], [2.4.6])
-m4_define([LT_PACKAGE_REVISION], [2.4.6])
+m4_define([LT_PACKAGE_VERSION], [2.4.2])
+m4_define([LT_PACKAGE_REVISION], [1.3337])
AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4.6'
-macro_revision='2.4.6'
+[macro_version='2.4.2'
+macro_revision='1.3337'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
index c6b26f8..c573da9 100644
--- a/m4/lt~obsolete.m4
+++ b/m4/lt~obsolete.m4
@@ -1,7 +1,6 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
-# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
-# Foundation, Inc.
+# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# This file is free software; the Free Software Foundation gives
@@ -12,7 +11,7 @@
# These exist entirely to fool aclocal when bootstrapping libtool.
#
-# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
# which have later been changed to m4_define as they aren't part of the
# exported API, or moved to Autoconf or Automake where they belong.
#
@@ -26,7 +25,7 @@
# included after everything else. This provides aclocal with the
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
# because those macros already exist, or will be overwritten later.
-# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
#
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
# Yes, that means every name once taken will need to remain here until
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0edb7ce..6af2b9a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -868,11 +868,11 @@ set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
-option (HDF5_ENABLE_DEBUG_APIS "Turn on debugging in all packages" OFF)
+option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
if (HDF5_ENABLE_DEBUG_APIS)
set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
COMPILE_DEFINITIONS
- "H5Z_DEBUG;H5VM_DEBUG;H5T_DEBUG;H5S_DEBUG;H5P_DEBUG;H5O_DEBUG;H5MM_DEBUG;H5MF_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5HG_DEBUG;H5G_DEBUG;H5F_DEBUG;H5E_DEBUG;H5D_DEBUG;H5AC_DEBUG"
+ "H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG"
)
endif (HDF5_ENABLE_DEBUG_APIS)
set (install_targets ${HDF5_LIB_TARGET})
@@ -924,7 +924,7 @@ if (BUILD_SHARED_LIBS)
if (HDF5_ENABLE_DEBUG_APIS)
set_property (TARGET ${HDF5_LIBSH_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
- "H5Z_DEBUG;H5VM_DEBUG;H5T_DEBUG;H5S_DEBUG;H5P_DEBUG;H5O_DEBUG;H5MM_DEBUG;H5MF_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5HG_DEBUG;H5G_DEBUG;H5F_DEBUG;H5E_DEBUG;H5D_DEBUG;H5AC_DEBUG"
+ "H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG"
)
endif (HDF5_ENABLE_DEBUG_APIS)
set (install_targets ${install_targets} ${HDF5_LIBSH_TARGET})
diff --git a/src/H5.c b/src/H5.c
index f96d160..4de5731 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -552,30 +552,29 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5_debug_mask
+ * Function: H5_debug_mask
*
- * Purpose: Set runtime debugging flags according to the string S. The
- * string should contain file numbers and package names
- * separated by other characters. A file number applies to all
- * following package names up to the next file number. The
- * initial file number is `2' (the standard error stream). Each
- * package name can be preceded by a `+' or `-' to add or remove
- * the package from the debugging list (`+' is the default). The
- * special name `all' means all packages.
+ * Purpose: Set runtime debugging flags according to the string S. The
+ * string should contain file numbers and package names
+ * separated by other characters. A file number applies to all
+ * following package names up to the next file number. The
+ * initial file number is `2' (the standard error stream). Each
+ * package name can be preceded by a `+' or `-' to add or remove
+ * the package from the debugging list (`+' is the default). The
+ * special name `all' means all packages.
*
- * The name `trace' indicates that API tracing is to be turned
- * on or off.
+ * The name `trace' indicates that API tracing is to be turned
+ * on or off.
*
- * Return: void
+ * The name 'ttop' indicates that only top-level API calls
+ * should be shown. This also turns on tracing as if the
+ * 'trace' word was shown.
*
- * Programmer: Robb Matzke
+ * Return: void
+ *
+ * Programmer: Robb Matzke
* Wednesday, August 19, 1998
*
- * Modifications:
- * Robb Matzke, 2002-08-08
- * Accepts the `ttop' word. If enabled then show only the
- * top level API calls, otherwise show all API calls. Also
- * turns on tracing as if the `trace' word was present.
*-------------------------------------------------------------------------
*/
static void
@@ -587,55 +586,57 @@ H5_debug_mask(const char *s)
hbool_t clear;
while (s && *s) {
- if (HDisalpha(*s) || '-'==*s || '+'==*s) {
- /* Enable or Disable debugging? */
- if ('-'==*s) {
- clear = TRUE;
- s++;
- } else if ('+'==*s) {
- clear = FALSE;
- s++;
- } else {
- clear = FALSE;
- }
-
- /* Get the name */
- for (i=0; HDisalpha(*s); i++, s++)
- if (i<sizeof pkg_name)
+
+ if (HDisalpha(*s) || '-'==*s || '+'==*s) {
+
+ /* Enable or Disable debugging? */
+ if ('-'==*s) {
+ clear = TRUE;
+ s++;
+ } else if ('+'==*s) {
+ clear = FALSE;
+ s++;
+ } else {
+ clear = FALSE;
+ } /* end if */
+
+ /* Get the name */
+ for (i=0; HDisalpha(*s); i++, s++)
+ if (i<sizeof pkg_name)
pkg_name[i] = *s;
- pkg_name[MIN(sizeof(pkg_name)-1, i)] = '\0';
+ pkg_name[MIN(sizeof(pkg_name)-1, i)] = '\0';
- /* Trace, all, or one? */
- if (!HDstrcmp(pkg_name, "trace")) {
- H5_debug_g.trace = clear ? NULL : stream;
+ /* Trace, all, or one? */
+ if (!HDstrcmp(pkg_name, "trace")) {
+ H5_debug_g.trace = clear ? NULL : stream;
} else if (!HDstrcmp(pkg_name, "ttop")) {
H5_debug_g.trace = stream;
H5_debug_g.ttop = (hbool_t)!clear;
} else if (!HDstrcmp(pkg_name, "ttimes")) {
H5_debug_g.trace = stream;
H5_debug_g.ttimes = (hbool_t)!clear;
- } else if (!HDstrcmp(pkg_name, "all")) {
- for (i=0; i<(size_t)H5_NPKGS; i++)
- H5_debug_g.pkg[i].stream = clear ? NULL : stream;
- } else {
- for (i=0; i<(size_t)H5_NPKGS; i++) {
- if (!HDstrcmp(H5_debug_g.pkg[i].name, pkg_name)) {
- H5_debug_g.pkg[i].stream = clear ? NULL : stream;
- break;
- }
- }
- if (i>=(size_t)H5_NPKGS)
- fprintf(stderr, "HDF5_DEBUG: ignored %s\n", pkg_name);
- }
-
- } else if (HDisdigit(*s)) {
- int fd = (int)HDstrtol(s, &rest, 0);
- H5_debug_open_stream_t *open_stream;
-
- if((stream = HDfdopen(fd, "w")) != NULL) {
- (void)HDsetvbuf(stream, NULL, _IOLBF, (size_t)0);
-
- if(NULL == (open_stream = (H5_debug_open_stream_t *)H5MM_malloc(sizeof(H5_debug_open_stream_t)))) {
+ } else if (!HDstrcmp(pkg_name, "all")) {
+ for (i=0; i<(size_t)H5_NPKGS; i++)
+ H5_debug_g.pkg[i].stream = clear ? NULL : stream;
+ } else {
+ for (i=0; i<(size_t)H5_NPKGS; i++) {
+ if (!HDstrcmp(H5_debug_g.pkg[i].name, pkg_name)) {
+ H5_debug_g.pkg[i].stream = clear ? NULL : stream;
+ break;
+ } /* end if */
+ } /* end for */
+ if (i>=(size_t)H5_NPKGS)
+ fprintf(stderr, "HDF5_DEBUG: ignored %s\n", pkg_name);
+ } /* end if-else */
+
+ } else if (HDisdigit(*s)) {
+ int fd = (int)HDstrtol(s, &rest, 0);
+ H5_debug_open_stream_t *open_stream;
+
+ if((stream = HDfdopen(fd, "w")) != NULL) {
+ (void)HDsetvbuf(stream, NULL, _IOLBF, (size_t)0);
+
+ if(NULL == (open_stream = (H5_debug_open_stream_t *)H5MM_malloc(sizeof(H5_debug_open_stream_t)))) {
(void)HDfclose(stream);
return;
} /* end if */
@@ -644,11 +645,15 @@ H5_debug_mask(const char *s)
open_stream->next = H5_debug_g.open_stream;
H5_debug_g.open_stream = open_stream;
} /* end if */
- s = rest;
- } else {
- s++;
- }
- }
+
+ s = rest;
+ } else {
+ s++;
+ } /* end if-else */
+ } /* end while */
+
+ return;
+
} /* end H5_debug_mask() */
#ifdef H5_HAVE_PARALLEL
@@ -947,7 +952,6 @@ H5allocate_memory(size_t size, hbool_t clear)
ret_value = H5MM_malloc(size);
FUNC_LEAVE_API(ret_value)
-
} /* end H5allocate_memory() */
@@ -986,7 +990,6 @@ H5resize_memory(void *mem, size_t size)
ret_value = H5MM_realloc(mem, size);
FUNC_LEAVE_API(ret_value)
-
} /* end H5resize_memory() */
@@ -1009,10 +1012,9 @@ H5free_memory(void *mem)
H5TRACE1("e", "*x", mem);
/* At this time, it is impossible for this to fail. */
- HDfree(mem);
+ H5MM_xfree(mem);
FUNC_LEAVE_API(SUCCEED)
-
} /* end H5free_memory() */
diff --git a/src/H5A.c b/src/H5A.c
index 7d87505..0a2f983 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -246,12 +246,13 @@ H5A_term_package(void)
--------------------------------------------------------------------------*/
hid_t
H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id,
- hid_t acpl_id, hid_t H5_ATTR_UNUSED aapl_id)
+ hid_t acpl_id, hid_t aapl_id)
{
H5A_t *attr = NULL; /* Attribute created */
H5G_loc_t loc; /* Object location */
H5T_t *type; /* Datatype to use for attribute */
H5S_t *space; /* Dataspace to use for attribute */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
hid_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -271,8 +272,12 @@ H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id,
if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
- /* Go do the real work for attaching the attribute to the dataset */
- if(NULL == (attr = H5A_create(&loc, attr_name, type, space, acpl_id, H5AC_dxpl_id)))
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&aapl_id, H5P_CLS_AACC, &dxpl_id, loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
+ /* Go do the real work for attaching the attribute to the object */
+ if(NULL == (attr = H5A_create(&loc, attr_name, type, space, acpl_id, dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create attribute")
/* Register the new attribute and get an ID for it */
@@ -320,7 +325,7 @@ done:
--------------------------------------------------------------------------*/
hid_t
H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
- hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t H5_ATTR_UNUSED aapl_id,
+ hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id,
hid_t lapl_id)
{
H5A_t *attr = NULL; /* Attribute created */
@@ -331,6 +336,7 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
H5T_t *type; /* Datatype to use for attribute */
H5S_t *space; /* Dataspace to use for attribute */
+ hid_t dxpl_id; /* dxpl used by library */
hid_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -358,13 +364,18 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
obj_loc.path = &obj_path;
H5G_loc_reset(&obj_loc);
+ /* Verify access property list and get correct dxpl */
+ dxpl_id = H5AC_dxpl_id;
+ if(H5P_verify_apl_and_dxpl(&aapl_id, H5P_CLS_AACC, &dxpl_id, loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
/* Find the object's location */
- if(H5G_loc_find(&loc, obj_name, &obj_loc/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if(H5G_loc_find(&loc, obj_name, &obj_loc/*out*/, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found")
loc_found = TRUE;
/* Go do the real work for attaching the attribute to the dataset */
- if(NULL == (attr = H5A_create(&obj_loc, attr_name, type, space, acpl_id, H5AC_dxpl_id)))
+ if(NULL == (attr = H5A_create(&obj_loc, attr_name, type, space, acpl_id, dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to create attribute")
/* Register the new attribute and get an ID for it */
@@ -401,10 +412,11 @@ done:
H5Aclose or resource leaks will develop.
--------------------------------------------------------------------------*/
hid_t
-H5Aopen(hid_t loc_id, const char *attr_name, hid_t H5_ATTR_UNUSED aapl_id)
+H5Aopen(hid_t loc_id, const char *attr_name, hid_t aapl_id)
{
H5G_loc_t loc; /* Object location */
H5A_t *attr = NULL; /* Attribute opened */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
hid_t ret_value;
FUNC_ENTER_API(FAIL)
@@ -418,8 +430,12 @@ H5Aopen(hid_t loc_id, const char *attr_name, hid_t H5_ATTR_UNUSED aapl_id)
if(!attr_name || !*attr_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&aapl_id, H5P_CLS_AACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
/* Read in attribute from object header */
- if(NULL == (attr = H5O_attr_open_by_name(loc.oloc, attr_name, H5AC_ind_dxpl_id)))
+ if(NULL == (attr = H5O_attr_open_by_name(loc.oloc, attr_name, dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "unable to load attribute info from object header for attribute: '%s'", attr_name)
/* Finish initializing attribute */
@@ -463,10 +479,11 @@ done:
--------------------------------------------------------------------------*/
hid_t
H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
- hid_t H5_ATTR_UNUSED aapl_id, hid_t lapl_id)
+ hid_t aapl_id, hid_t lapl_id)
{
H5G_loc_t loc; /* Object location */
H5A_t *attr = NULL; /* Attribute opened */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
hid_t ret_value;
FUNC_ENTER_API(FAIL)
@@ -487,8 +504,12 @@ H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&aapl_id, H5P_CLS_AACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
/* Open the attribute on the object header */
- if(NULL == (attr = H5A_open_by_name(&loc, obj_name, attr_name, lapl_id, H5AC_ind_dxpl_id)))
+ if(NULL == (attr = H5A_open_by_name(&loc, obj_name, attr_name, lapl_id, dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute")
/* Register the attribute and get an ID for it */
@@ -531,10 +552,11 @@ done:
--------------------------------------------------------------------------*/
hid_t
H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
- H5_iter_order_t order, hsize_t n, hid_t H5_ATTR_UNUSED aapl_id, hid_t lapl_id)
+ H5_iter_order_t order, hsize_t n, hid_t aapl_id, hid_t lapl_id)
{
H5A_t *attr = NULL; /* Attribute opened */
H5G_loc_t loc; /* Object location */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
hid_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -558,8 +580,12 @@ H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&aapl_id, H5P_CLS_AACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
/* Open the attribute in the object header */
- if(NULL == (attr = H5A_open_by_idx(&loc, obj_name, idx_type, order, n, lapl_id, H5AC_ind_dxpl_id)))
+ if(NULL == (attr = H5A_open_by_idx(&loc, obj_name, idx_type, order, n, lapl_id, dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open attribute")
/* Register the attribute and get an ID for it */
@@ -597,6 +623,8 @@ H5Awrite(hid_t attr_id, hid_t dtype_id, const void *buf)
{
H5A_t *attr; /* Attribute object for ID */
H5T_t *mem_type; /* Memory datatype */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
+ hid_t aapl_id = H5P_DEFAULT; /* temp access plist */
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -610,6 +638,10 @@ H5Awrite(hid_t attr_id, hid_t dtype_id, const void *buf)
if(NULL == buf)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null attribute buffer")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&aapl_id, H5P_CLS_AACC, &dxpl_id, attr_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
/* Go write the actual data to the attribute */
if((ret_value = H5A__write(attr, mem_type, buf, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_WRITEERROR, FAIL, "unable to write attribute")
@@ -640,6 +672,8 @@ H5Aread(hid_t attr_id, hid_t dtype_id, void *buf)
{
H5A_t *attr; /* Attribute object for ID */
H5T_t *mem_type; /* Memory datatype */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
+ hid_t aapl_id = H5P_DEFAULT; /* temp access plist */
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -653,8 +687,12 @@ H5Aread(hid_t attr_id, hid_t dtype_id, void *buf)
if(NULL == buf)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null attribute buffer")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&aapl_id, H5P_CLS_AACC, &dxpl_id, attr_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
/* Go write the actual data to the attribute */
- if((ret_value = H5A__read(attr, mem_type, buf, H5AC_ind_dxpl_id)) < 0)
+ if((ret_value = H5A__read(attr, mem_type, buf, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_READERROR, FAIL, "unable to read attribute")
done:
@@ -867,6 +905,7 @@ H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
{
H5G_loc_t loc; /* Object location */
H5A_t *attr = NULL; /* Attribute object for name */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
ssize_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -884,14 +923,13 @@ H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Open the attribute on the object header */
- if(NULL == (attr = H5A_open_by_idx(&loc, obj_name, idx_type, order, n, lapl_id, H5AC_ind_dxpl_id)))
+ if(NULL == (attr = H5A_open_by_idx(&loc, obj_name, idx_type, order, n, lapl_id, dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute")
/* Get the length of the name */
@@ -1005,6 +1043,7 @@ H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
{
H5G_loc_t loc; /* Object location */
H5A_t *attr = NULL; /* Attribute object for name */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1021,14 +1060,13 @@ H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
if(NULL == ainfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid info pointer")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Open the attribute on the object header */
- if(NULL == (attr = H5A_open_by_name(&loc, obj_name, attr_name, lapl_id, H5AC_ind_dxpl_id)))
+ if(NULL == (attr = H5A_open_by_name(&loc, obj_name, attr_name, lapl_id, dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute")
/* Get the attribute information */
@@ -1064,6 +1102,7 @@ H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
{
H5G_loc_t loc; /* Object location */
H5A_t *attr = NULL; /* Attribute object for name */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1083,14 +1122,13 @@ H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
if(NULL == ainfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid info pointer")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Open the attribute on the object header */
- if(NULL == (attr = H5A_open_by_idx(&loc, obj_name, idx_type, order, n, lapl_id, H5AC_ind_dxpl_id)))
+ if(NULL == (attr = H5A_open_by_idx(&loc, obj_name, idx_type, order, n, lapl_id, dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute")
/* Get the attribute information */
@@ -1167,6 +1205,7 @@ herr_t
H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name,
const char *new_attr_name, hid_t lapl_id)
{
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by the library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1182,11 +1221,10 @@ H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no old attribute name")
if(!new_attr_name || !*new_attr_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new attribute name")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Avoid thrashing things if the names are the same */
if(HDstrcmp(old_attr_name, new_attr_name)) {
@@ -1196,7 +1234,7 @@ H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
/* Call private attribute rename routine */
- if(H5A_rename_by_name(loc, obj_name, old_attr_name, new_attr_name, lapl_id, H5AC_dxpl_id) < 0)
+ if(H5A_rename_by_name(loc, obj_name, old_attr_name, new_attr_name, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute")
} /* end if */
@@ -1272,7 +1310,7 @@ H5Aiterate2(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order,
/* Call attribute iteration routine */
last_attr = start_idx = (idx ? *idx : 0);
- if((ret_value = H5O_attr_iterate(loc_id, H5AC_ind_dxpl_id, idx_type, order, start_idx, &last_attr, &attr_op, op_data)) < 0)
+ if((ret_value = H5O_attr_iterate(loc_id, H5AC_dxpl_id, idx_type, order, start_idx, &last_attr, &attr_op, op_data)) < 0)
HERROR(H5E_ATTR, H5E_BADITER, "error iterating over attributes");
/* Set the last attribute information */
@@ -1341,6 +1379,7 @@ H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
H5A_attr_iter_op_t attr_op; /* Attribute operator */
hsize_t start_idx; /* Index of attribute to start iterating at */
hsize_t last_attr; /* Index of last attribute examined */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1358,11 +1397,10 @@ H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -1370,12 +1408,12 @@ H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
H5G_loc_reset(&obj_loc);
/* Find the object's location */
- if(H5G_loc_find(&loc, obj_name, &obj_loc/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if(H5G_loc_find(&loc, obj_name, &obj_loc/*out*/, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found")
loc_found = TRUE;
/* Open the object */
- if((obj_loc_id = H5O_open_by_loc(&obj_loc, lapl_id, H5AC_ind_dxpl_id, TRUE)) < 0)
+ if((obj_loc_id = H5O_open_by_loc(&obj_loc, lapl_id, dxpl_id, TRUE)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open object")
/* Build attribute operator info */
@@ -1384,7 +1422,7 @@ H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
/* Call attribute iteration routine */
last_attr = start_idx = (idx ? *idx : 0);
- if((ret_value = H5O_attr_iterate(obj_loc_id, H5AC_ind_dxpl_id, idx_type, order, start_idx, &last_attr, &attr_op, op_data)) < 0)
+ if((ret_value = H5O_attr_iterate(obj_loc_id, dxpl_id, idx_type, order, start_idx, &last_attr, &attr_op, op_data)) < 0)
HERROR(H5E_ATTR, H5E_BADITER, "error iterating over attributes");
/* Set the last attribute information */
@@ -1469,6 +1507,7 @@ H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
+ hid_t dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1483,11 +1522,11 @@ H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
if(!attr_name || !*attr_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ dxpl_id = H5AC_dxpl_id;
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -1495,12 +1534,12 @@ H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
H5G_loc_reset(&obj_loc);
/* Find the object's location */
- if(H5G_loc_find(&loc, obj_name, &obj_loc/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if(H5G_loc_find(&loc, obj_name, &obj_loc/*out*/, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found")
loc_found = TRUE;
/* Delete the attribute from the location */
- if(H5O_attr_remove(obj_loc.oloc, attr_name, H5AC_dxpl_id) < 0)
+ if(H5O_attr_remove(obj_loc.oloc, attr_name, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute")
done:
@@ -1545,6 +1584,7 @@ H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */
+ hid_t dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1561,11 +1601,11 @@ H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ dxpl_id = H5AC_dxpl_id;
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -1573,12 +1613,12 @@ H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
H5G_loc_reset(&obj_loc);
/* Find the object's location */
- if(H5G_loc_find(&loc, obj_name, &obj_loc/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if(H5G_loc_find(&loc, obj_name, &obj_loc/*out*/, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found")
loc_found = TRUE;
/* Delete the attribute from the location */
- if(H5O_attr_remove_by_idx(obj_loc.oloc, idx_type, order, n, H5AC_dxpl_id) < 0)
+ if(H5O_attr_remove_by_idx(obj_loc.oloc, idx_type, order, n, dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute")
done:
@@ -1658,7 +1698,7 @@ H5Aexists(hid_t obj_id, const char *attr_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
/* Check if the attribute exists */
- if((ret_value = H5O_attr_exists(loc.oloc, attr_name, H5AC_ind_dxpl_id)) < 0)
+ if((ret_value = H5O_attr_exists(loc.oloc, attr_name, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists")
done:
@@ -1684,6 +1724,7 @@ H5Aexists_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
hid_t lapl_id)
{
H5G_loc_t loc; /* Object location */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
htri_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1698,13 +1739,12 @@ H5Aexists_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no object name")
if(!attr_name || !*attr_name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
- if((ret_value = H5A_exists_by_name(loc, obj_name, attr_name, lapl_id, H5AC_ind_dxpl_id)) < 0)
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
+ if((ret_value = H5A_exists_by_name(loc, obj_name, attr_name, lapl_id, dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists")
done:
diff --git a/src/H5AC.c b/src/H5AC.c
index 16b3880..3bc849b 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -80,22 +80,13 @@ static herr_t H5AC__verify_tag(hid_t dxpl_id, const H5AC_class_t * type);
/* Package initialization variable */
hbool_t H5_PKG_INIT_VAR = FALSE;
-
/*****************************/
/* Library Private Variables */
/*****************************/
/* Default dataset transfer property list for metadata I/O calls */
-/* (Collective set, "block before metadata write" set and "library internal" set) */
-/* (Global variable definition, declaration is in H5ACprivate.h also) */
hid_t H5AC_dxpl_id = (-1);
-
-/* Dataset transfer property list for independent metadata I/O calls */
-/* (just "library internal" set - i.e. independent transfer mode) */
-/* (Global variable definition, declaration is in H5ACprivate.h also) */
-H5P_genplist_t *H5AC_ind_dxpl_g = NULL;
-hid_t H5AC_ind_dxpl_id = (-1);
-
+hbool_t H5_coll_api_sanity_check_g = false;
/*******************/
/* Local Variables */
@@ -177,55 +168,27 @@ done:
herr_t
H5AC__init_package(void)
{
-#ifdef H5_HAVE_PARALLEL
- H5P_genplist_t *xfer_plist; /* Dataset transfer property list object */
- unsigned coll_meta_write; /* "collective metadata write" property value */
-#endif /* H5_HAVE_PARALLEL */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
#ifdef H5_HAVE_PARALLEL
- /* Sanity check */
- HDassert(H5P_CLS_DATASET_XFER_g != NULL);
-
- /* Get an ID for the collective H5AC dxpl */
+ /* Get an ID for the metadata (H5AC) dxpl */
if((H5AC_dxpl_id = H5P_create_id(H5P_CLS_DATASET_XFER_g, FALSE)) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "unable to register property list")
- /* Get the property list object */
- if (NULL == (xfer_plist = (H5P_genplist_t *)H5I_object(H5AC_dxpl_id)))
- HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get new property list object")
+ /* check whether to enable strict collective function calling
+ sanity checks using MPI barriers */
+ {
+ const char *s; /* String for environment variables */
- /* Insert 'collective metadata write' property */
- coll_meta_write = 1;
- if(H5P_insert(xfer_plist, H5AC_COLLECTIVE_META_WRITE_NAME, H5AC_COLLECTIVE_META_WRITE_SIZE, &coll_meta_write,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
-
- /* Get an ID for the independent H5AC dxpl */
- if((H5AC_ind_dxpl_id = H5P_create_id(H5P_CLS_DATASET_XFER_g, FALSE)) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, FAIL, "unable to register property list")
-
- /* Get the property list object */
- if(NULL == (H5AC_ind_dxpl_g = (H5P_genplist_t *)H5I_object(H5AC_ind_dxpl_id)))
- HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get new property list object")
-
- /* Insert 'collective metadata write' property */
- coll_meta_write = 0;
- if(H5P_insert(H5AC_ind_dxpl_g, H5AC_COLLECTIVE_META_WRITE_NAME, H5AC_COLLECTIVE_META_WRITE_SIZE, &coll_meta_write,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "can't insert metadata cache dxpl property")
+ s = HDgetenv("H5_COLL_API_SANITY_CHECK");
+ if(s && HDisdigit(*s)) {
+ H5_coll_api_sanity_check_g = (hbool_t)HDstrtol(s, NULL, 0);
+ }
+ }
#else /* H5_HAVE_PARALLEL */
- /* Sanity check */
- HDassert(H5P_LST_DATASET_XFER_ID_g!=(-1));
-
H5AC_dxpl_id = H5P_DATASET_XFER_DEFAULT;
- H5AC_ind_dxpl_id = H5P_DATASET_XFER_DEFAULT;
-
- /* Get the property list objects for the IDs */
- if(NULL == (H5AC_ind_dxpl_g = (H5P_genplist_t *)H5I_object(H5AC_ind_dxpl_id)))
- HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get property list object")
#endif /* H5_HAVE_PARALLEL */
done:
@@ -256,19 +219,18 @@ H5AC_term_package(void)
if(H5_PKG_INIT_VAR) {
#ifdef H5_HAVE_PARALLEL
- if(H5AC_dxpl_id > 0 || H5AC_ind_dxpl_id > 0) {
+ if(H5AC_dxpl_id > 0) {
/* Indicate more work to do */
n = 1; /* H5I */
/* Close H5AC dxpl */
- if(H5I_dec_ref(H5AC_dxpl_id) < 0 || H5I_dec_ref(H5AC_ind_dxpl_id) < 0)
+ if(H5I_dec_ref(H5AC_dxpl_id) < 0)
H5E_clear_stack(NULL); /*ignore error*/
} /* end if */
#endif /* H5_HAVE_PARALLEL */
-
+
/* Reset static IDs */
H5AC_dxpl_id = (-1);
- H5AC_ind_dxpl_id = (-1);
/* Reset interface initialization flag */
if(0 == n)
@@ -496,7 +458,7 @@ H5AC_dest(H5F_t *f, hid_t dxpl_id)
} /* end if */
#ifdef H5_HAVE_PARALLEL
- aux_ptr = H5C_get_aux_ptr(f->shared->cache);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(f->shared->cache);
if(aux_ptr)
/* Sanity check */
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
@@ -865,7 +827,7 @@ H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t add
{
H5AC_aux_t *aux_ptr;
- if(NULL != (aux_ptr = H5C_get_aux_ptr(f->shared->cache))) {
+ if(NULL != (aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(f->shared->cache))) {
/* Log the new entry */
if(H5AC__log_inserted_entry((H5AC_info_t *)thing) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5AC__log_inserted_entry() failed")
@@ -944,7 +906,7 @@ H5AC_mark_entry_dirty(void *thing)
{
H5AC_aux_t *aux_ptr;
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
if((!entry_ptr->is_dirty) && (!entry_ptr->is_protected) &&
(entry_ptr->is_pinned) && (NULL != aux_ptr))
if(H5AC__log_dirtied_entry(entry_ptr) < 0)
@@ -1024,7 +986,7 @@ H5AC_move_entry(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t ne
#ifdef H5_HAVE_PARALLEL
/* Log moving the entry */
- if(NULL != (aux_ptr = H5C_get_aux_ptr(f->shared->cache)))
+ if(NULL != (aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(f->shared->cache)))
if(H5AC__log_moved_entry(f, old_addr, new_addr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "can't log moved entry")
#endif /* H5_HAVE_PARALLEL */
@@ -1363,7 +1325,7 @@ H5AC_resize_entry(void *thing, size_t new_size)
{
H5AC_aux_t *aux_ptr;
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
if((!entry_ptr->is_dirty) && (NULL != aux_ptr))
if(H5AC__log_dirtied_entry(entry_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry")
@@ -1623,7 +1585,7 @@ H5AC_unprotect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr,
} /* end if */
#ifdef H5_HAVE_PARALLEL
- if(NULL != (aux_ptr = H5C_get_aux_ptr(f->shared->cache))) {
+ if(NULL != (aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(f->shared->cache))) {
if(dirtied && ((H5AC_info_t *)thing)->is_dirty == FALSE)
if(H5AC__log_dirtied_entry((H5AC_info_t *)thing) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "can't log dirtied entry")
@@ -1753,7 +1715,7 @@ H5AC_get_cache_auto_resize_config(const H5AC_t *cache_ptr,
{
H5AC_aux_t *aux_ptr;
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
if((aux_ptr != NULL) && (aux_ptr->magic != H5AC__H5AC_AUX_T_MAGIC))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad aux_ptr on entry.")
}
@@ -1800,7 +1762,7 @@ H5AC_get_cache_auto_resize_config(const H5AC_t *cache_ptr,
{
H5AC_aux_t *aux_ptr;
- if(NULL != (aux_ptr = H5C_get_aux_ptr(cache_ptr))) {
+ if(NULL != (aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr))) {
config_ptr->dirty_bytes_threshold = aux_ptr->dirty_bytes_threshold;
config_ptr->metadata_write_strategy = aux_ptr->metadata_write_strategy;
} /* end if */
@@ -1948,7 +1910,7 @@ H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, H5AC_cache_config_t *config
{
H5AC_aux_t *aux_ptr;
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
if((aux_ptr != NULL) && (aux_ptr->magic != H5AC__H5AC_AUX_T_MAGIC))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "bad aux_ptr on entry.")
}
@@ -1992,7 +1954,7 @@ H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, H5AC_cache_config_t *config
/* Set parallel configuration values */
/* (Which are only held in the H5AC layer -QAK) */
- if(NULL != (aux_ptr = H5C_get_aux_ptr(cache_ptr))) {
+ if(NULL != (aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr))) {
aux_ptr->dirty_bytes_threshold = config_ptr->dirty_bytes_threshold;
aux_ptr->metadata_write_strategy = config_ptr->metadata_write_strategy;
} /* end if */
@@ -2212,7 +2174,7 @@ H5AC_open_trace_file(H5AC_t *cache_ptr, const char *trace_file_name)
{
H5AC_aux_t * aux_ptr;
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
if(aux_ptr == NULL)
sprintf(file_name, "%s", trace_file_name);
else {
@@ -2393,7 +2355,7 @@ H5_ATTR_UNUSED
HDassert(f != NULL);
HDassert(f->shared != NULL);
HDassert(f->shared->cache != NULL);
- aux_ptr = H5C_get_aux_ptr(f->shared->cache);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(f->shared->cache);
if(aux_ptr != NULL) {
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c
index 8655a6f..0fa40ac 100644
--- a/src/H5ACmpio.c
+++ b/src/H5ACmpio.c
@@ -159,7 +159,7 @@ H5AC__set_sync_point_done_callback(H5C_t * cache_ptr,
/* Sanity checks */
HDassert(cache_ptr);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
@@ -192,7 +192,7 @@ H5AC__set_write_done_callback(H5C_t * cache_ptr, void (* write_done)(void))
/* Sanity checks */
HDassert(cache_ptr);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
@@ -231,7 +231,7 @@ H5AC_add_candidate(H5AC_t * cache_ptr, haddr_t addr)
/* Sanity checks */
HDassert(cache_ptr != NULL);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
@@ -295,7 +295,7 @@ H5AC__broadcast_candidate_list(H5AC_t *cache_ptr, int *num_entries_ptr,
/* Sanity checks */
HDassert(cache_ptr != NULL);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
HDassert(aux_ptr->mpi_rank == 0);
@@ -427,7 +427,7 @@ H5AC__broadcast_clean_list(H5AC_t * cache_ptr)
/* Sanity checks */
HDassert(cache_ptr != NULL);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
HDassert(aux_ptr->mpi_rank == 0);
@@ -624,7 +624,7 @@ H5AC__copy_candidate_list_to_buffer(const H5AC_t *cache_ptr, int *num_entries_pt
/* Sanity checks */
HDassert(cache_ptr != NULL);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
@@ -700,7 +700,7 @@ H5AC__log_deleted_entry(const H5AC_info_t *entry_ptr)
addr = entry_ptr->addr;
cache_ptr = entry_ptr->cache_ptr;
HDassert(cache_ptr != NULL);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
HDassert(aux_ptr->mpi_rank == 0);
@@ -756,7 +756,7 @@ H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr)
HDassert(entry_ptr->is_dirty == FALSE);
cache_ptr = entry_ptr->cache_ptr;
HDassert(cache_ptr != NULL);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
@@ -839,7 +839,7 @@ H5AC__log_flushed_entry(H5C_t *cache_ptr, haddr_t addr, hbool_t was_dirty,
/* Sanity check */
HDassert(cache_ptr != NULL);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
HDassert(aux_ptr->mpi_rank == 0);
@@ -907,7 +907,7 @@ H5AC__log_inserted_entry(const H5AC_info_t *entry_ptr)
HDassert(entry_ptr);
cache_ptr = entry_ptr->cache_ptr;
HDassert(cache_ptr != NULL);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
@@ -1010,7 +1010,7 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr)
HDassert(f->shared);
cache_ptr = (H5AC_t *)f->shared->cache;
HDassert(cache_ptr);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
@@ -1188,7 +1188,7 @@ H5AC__propagate_and_apply_candidate_list(H5F_t *f, hid_t dxpl_id)
HDassert(f != NULL);
cache_ptr = f->shared->cache;
HDassert(cache_ptr != NULL);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
@@ -1352,7 +1352,7 @@ H5AC__propagate_flushed_and_still_clean_entries_list(H5F_t *f, hid_t dxpl_id)
HDassert(f != NULL);
cache_ptr = f->shared->cache;
HDassert(cache_ptr != NULL);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
@@ -1477,7 +1477,7 @@ H5AC__receive_and_apply_clean_list(H5F_t *f, hid_t dxpl_id)
HDassert(f != NULL);
cache_ptr = f->shared->cache;
HDassert(cache_ptr != NULL);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
HDassert(aux_ptr->mpi_rank != 0);
@@ -1537,7 +1537,7 @@ H5AC__receive_candidate_list(const H5AC_t *cache_ptr, int *num_entries_ptr,
/* Sanity checks */
HDassert(cache_ptr != NULL);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
HDassert(aux_ptr->mpi_rank != 0);
@@ -1621,7 +1621,7 @@ H5AC__rsp__dist_md_write__flush(H5F_t *f, hid_t dxpl_id)
HDassert(f != NULL);
cache_ptr = f->shared->cache;
HDassert(cache_ptr != NULL);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
@@ -1761,7 +1761,7 @@ H5AC__rsp__dist_md_write__flush_to_min_clean(H5F_t *f, hid_t dxpl_id)
HDassert(f != NULL);
cache_ptr = f->shared->cache;
HDassert(cache_ptr != NULL);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
@@ -1836,7 +1836,7 @@ H5AC__rsp__p0_only__flush(H5F_t *f, hid_t dxpl_id)
HDassert(f != NULL);
cache_ptr = f->shared->cache;
HDassert(cache_ptr != NULL);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
@@ -1938,7 +1938,7 @@ H5AC__rsp__p0_only__flush_to_min_clean(H5F_t *f, hid_t dxpl_id)
HDassert(f != NULL);
cache_ptr = f->shared->cache;
HDassert(cache_ptr != NULL);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY);
@@ -2047,7 +2047,7 @@ H5AC__run_sync_point(H5F_t *f, hid_t dxpl_id, int sync_point_op)
HDassert(f != NULL);
cache_ptr = f->shared->cache;
HDassert(cache_ptr != NULL);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
HDassert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) ||
@@ -2171,7 +2171,7 @@ H5AC__tidy_cache_0_lists(H5AC_t *cache_ptr, int num_candidates,
/* Sanity checks */
HDassert(cache_ptr != NULL);
- aux_ptr = H5C_get_aux_ptr(cache_ptr);
+ aux_ptr = (H5AC_aux_t *)H5C_get_aux_ptr(cache_ptr);
HDassert(aux_ptr != NULL);
HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
HDassert(aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED);
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index 1c81976..79bee9b 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -207,16 +207,7 @@ typedef H5C_t H5AC_t;
#define H5AC_RING_NAME "H5AC_ring_type"
/* Dataset transfer property list for flush calls */
-/* (Collective set, "block before metadata write" set and "library internal" set) */
-/* (Global variable declaration, definition is in H5AC.c) */
-extern hid_t H5AC_dxpl_id;
-
-/* Dataset transfer property list for independent metadata I/O calls */
-/* (just "library internal" set - i.e. independent transfer mode) */
-/* (Global variable declaration, definition is in H5AC.c) */
-H5_DLLVAR H5P_genplist_t *H5AC_ind_dxpl_g;
-H5_DLLVAR hid_t H5AC_ind_dxpl_id;
-
+H5_DLLVAR hid_t H5AC_dxpl_id;
/* Default cache configuration. */
diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c
index 972fb0b..716ad4a 100644
--- a/src/H5Abtree2.c
+++ b/src/H5Abtree2.c
@@ -116,9 +116,7 @@ const H5B2_class_t H5A_BT2_NAME[1]={{ /* B-tree class information */
H5A__dense_btree2_name_compare, /* Record comparison callback */
H5A__dense_btree2_name_encode, /* Record encoding callback */
H5A__dense_btree2_name_decode, /* Record decoding callback */
- H5A__dense_btree2_name_debug, /* Record debugging callback */
- NULL, /* Create debugging context */
- NULL /* Destroy debugging context */
+ H5A__dense_btree2_name_debug /* Record debugging callback */
}};
/* v2 B-tree class for indexing 'creation order' field of attributes */
@@ -132,9 +130,7 @@ const H5B2_class_t H5A_BT2_CORDER[1]={{ /* B-tree class information */
H5A__dense_btree2_corder_compare, /* Record comparison callback */
H5A__dense_btree2_corder_encode, /* Record encoding callback */
H5A__dense_btree2_corder_decode, /* Record decoding callback */
- H5A__dense_btree2_corder_debug, /* Record debugging callback */
- NULL, /* Create debugging context */
- NULL /* Destroy debugging context */
+ H5A__dense_btree2_corder_debug /* Record debugging callback */
}};
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c
index ae0f041..58f0da8 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -191,7 +191,7 @@ H5Aopen_name(hid_t loc_id, const char *name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
/* Open the attribute on the object header */
- if(NULL == (attr = H5A_open_by_name(&loc, ".", name, H5P_LINK_ACCESS_DEFAULT, H5AC_ind_dxpl_id)))
+ if(NULL == (attr = H5A_open_by_name(&loc, ".", name, H5P_LINK_ACCESS_DEFAULT, H5AC_dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "can't open attribute: '%s'", name)
/* Register the attribute and get an ID for it */
@@ -247,7 +247,7 @@ H5Aopen_idx(hid_t loc_id, unsigned idx)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
/* Open the attribute in the object header */
- if(NULL == (attr = H5A_open_by_idx(&loc, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)idx, H5P_LINK_ACCESS_DEFAULT, H5AC_ind_dxpl_id)))
+ if(NULL == (attr = H5A_open_by_idx(&loc, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)idx, H5P_LINK_ACCESS_DEFAULT, H5AC_dxpl_id)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open attribute")
/* Register the attribute and get an ID for it */
@@ -333,7 +333,7 @@ H5Aget_num_attrs(hid_t loc_id)
} /*lint !e788 All appropriate cases are covered */
/* Look up the # of attributes for the object */
- if((ret_value = H5O_attr_count(loc, H5AC_ind_dxpl_id)) < 0)
+ if((ret_value = H5O_attr_count(loc, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, FAIL, "can't get attribute count for object")
done:
@@ -399,7 +399,7 @@ H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op, void *op_data)
/* Call attribute iteration routine */
last_attr = start_idx = (hsize_t)(attr_num ? *attr_num : 0);
- if((ret_value = H5O_attr_iterate(loc_id, H5AC_ind_dxpl_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, start_idx, &last_attr, &attr_op, op_data)) < 0)
+ if((ret_value = H5O_attr_iterate(loc_id, H5AC_dxpl_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, start_idx, &last_attr, &attr_op, op_data)) < 0)
HERROR(H5E_ATTR, H5E_BADITER, "error iterating over attributes");
/* Set the last attribute information */
diff --git a/src/H5Aint.c b/src/H5Aint.c
index 80761b6..6355556 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -161,7 +161,7 @@ H5A_create(const H5G_loc_t *loc, const char *name, const H5T_t *type,
* name, but it's going to be hard to unwind all the special cases on
* failure, so just check first, for now - QAK)
*/
- if((exists = H5O_attr_exists(loc->oloc, name, H5AC_ind_dxpl_id)) < 0)
+ if((exists = H5O_attr_exists(loc->oloc, name, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, NULL, "error checking attributes")
else if(exists > 0)
HGOTO_ERROR(H5E_ATTR, H5E_ALREADYEXISTS, NULL, "attribute already exists")
@@ -2396,7 +2396,7 @@ H5A_rename_by_name(H5G_loc_t loc, const char *obj_name, const char *old_attr_nam
H5G_loc_reset(&obj_loc);
/* Find the object's location */
- if(H5G_loc_find(&loc, obj_name, &obj_loc/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if(H5G_loc_find(&loc, obj_name, &obj_loc/*out*/, lapl_id, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "object not found")
loc_found = TRUE;
diff --git a/src/H5Atest.c b/src/H5Atest.c
index d57bbe1..74ed6c4 100644
--- a/src/H5Atest.c
+++ b/src/H5Atest.c
@@ -140,7 +140,7 @@ H5A_get_shared_rc_test(hid_t attr_id, hsize_t *ref_count)
HDassert(H5O_msg_is_shared(H5O_ATTR_ID, attr));
/* Retrieve ref count for shared or shareable attribute */
- if(H5SM_get_refcount(attr->oloc.file, H5AC_ind_dxpl_id, H5O_ATTR_ID,
+ if(H5SM_get_refcount(attr->oloc.file, H5AC_dxpl_id, H5O_ATTR_ID,
&attr->sh_loc, ref_count) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't retrieve shared message ref count")
diff --git a/src/H5B.c b/src/H5B.c
index 3b34c4d..9182d25 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -1734,14 +1734,13 @@ H5B_shared_new(const H5F_t *f, const H5B_class_t *type, size_t sizeof_rkey)
(shared->two_k + 1) * shared->sizeof_rkey); /*keys */
HDassert(shared->sizeof_rnode);
- /* Allocate shared buffers */
+ /* Allocate and clear shared buffers */
if(NULL == (shared->page = H5FL_BLK_MALLOC(page, shared->sizeof_rnode)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree page")
-#ifdef H5_CLEAR_MEMORY
-HDmemset(shared->page, 0, shared->sizeof_rnode);
-#endif /* H5_CLEAR_MEMORY */
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree page")
+ HDmemset(shared->page, 0, shared->sizeof_rnode);
+
if(NULL == (shared->nkey = H5FL_SEQ_MALLOC(size_t, (size_t)(shared->two_k + 1))))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree native keys")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree native keys")
/* Initialize the offsets into the native key buffer */
for(u = 0; u < (shared->two_k + 1); u++)
diff --git a/src/H5B2.c b/src/H5B2.c
index bdc79bd..463a50a 100644
--- a/src/H5B2.c
+++ b/src/H5B2.c
@@ -89,6 +89,7 @@ extern const H5B2_class_t H5A_BT2_NAME[1];
extern const H5B2_class_t H5A_BT2_CORDER[1];
extern const H5B2_class_t H5D_BT2[1];
extern const H5B2_class_t H5D_BT2_FILT[1];
+extern const H5B2_class_t H5B2_TEST2[1];
const H5B2_class_t *const H5B2_client_class_g[] = {
H5B2_TEST, /* 0 - H5B2_TEST_ID */
@@ -103,6 +104,7 @@ const H5B2_class_t *const H5B2_client_class_g[] = {
H5A_BT2_CORDER, /* 9 - H5B2_ATTR_DENSE_CORDER_ID */
H5D_BT2, /* 10 - H5B2_CDSET_ID */
H5D_BT2_FILT, /* 11 - H5B2_CDSET_FILT_ID */
+ H5B2_TEST2 /* 12 - H5B2_TEST_ID */
};
@@ -287,36 +289,88 @@ H5B2_insert(H5B2_t *bt2, hid_t dxpl_id, void *udata)
/* Get the v2 B-tree header */
hdr = bt2->hdr;
+ /* Insert the record */
+ if(H5B2__insert_hdr(hdr, dxpl_id, udata) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5B2_insert() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5B2_update
+ *
+ * Purpose: Insert or modify a record to the B-tree.
+ * If the record exists already, it is modified as if H5B2_modify
+ * was called). If it doesn't exist, it is inserted as if
+ * H5B2_insert was called.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Dec 23 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5B2_update(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_modify_t op, void *op_data)
+{
+ H5B2_hdr_t *hdr; /* Pointer to the B-tree header */
+ H5B2_update_status_t status = H5B2_UPDATE_UNKNOWN; /* Whether the record was inserted/modified */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ /* Check arguments. */
+ HDassert(bt2);
+ HDassert(udata);
+
+ /* Set the shared v2 B-tree header's file context for this operation */
+ bt2->hdr->f = bt2->f;
+
+ /* Get the v2 B-tree header */
+ hdr = bt2->hdr;
+
/* Check if the root node is allocated yet */
if(!H5F_addr_defined(hdr->root.addr)) {
/* Create root node as leaf node in B-tree */
if(H5B2__create_leaf(hdr, dxpl_id, hdr, &(hdr->root)) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create root node")
} /* end if */
- /* Check if we need to split the root node (equiv. to a 1->2 node split) */
- else if(hdr->root.node_nrec == hdr->node_info[hdr->depth].split_nrec) {
- /* Split root node */
- if(H5B2__split_root(hdr, dxpl_id) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split root node")
- } /* end if */
/* Attempt to insert record into B-tree */
if(hdr->depth > 0) {
- if(H5B2__insert_internal(hdr, dxpl_id, hdr->depth, NULL, &hdr->root, H5B2_POS_ROOT, hdr, udata) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree internal node")
+ if(H5B2__update_internal(hdr, dxpl_id, hdr->depth, NULL, &hdr->root, &status, H5B2_POS_ROOT, hdr, udata, op, op_data) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update record in B-tree internal node")
} /* end if */
else {
- if(H5B2__insert_leaf(hdr, dxpl_id, &hdr->root, H5B2_POS_ROOT, hdr, udata) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree leaf node")
+ if(H5B2__update_leaf(hdr, dxpl_id, &hdr->root, &status, H5B2_POS_ROOT, hdr, udata, op, op_data) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update record in B-tree leaf node")
} /* end else */
- /* Mark B-tree header as dirty */
- if(H5B2__hdr_dirty(hdr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark B-tree header dirty")
+ /* Sanity check */
+ HDassert(H5B2_UPDATE_UNKNOWN != status);
+
+ /* Use insert algorithm if nodes to leaf full */
+ if(H5B2_UPDATE_INSERT_CHILD_FULL == status) {
+ if(H5B2__insert_hdr(hdr, dxpl_id, udata) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree")
+ } /* end if */
+ else if(H5B2_UPDATE_SHADOW_DONE == status || H5B2_UPDATE_INSERT_DONE == status) {
+ /* Mark B-tree header as dirty */
+ if(H5B2__hdr_dirty(hdr) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark B-tree header dirty")
+ } /* end else-if */
+ else {
+ /* Sanity check */
+ HDassert(H5B2_UPDATE_MODIFY_DONE == status);
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5B2_insert() */
+} /* H5B2_update() */
/*-------------------------------------------------------------------------
@@ -598,7 +652,7 @@ H5B2_find(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_found_t op,
if(idx == 0) {
if(H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos) {
if(hdr->min_native_rec == NULL)
- if(NULL == (hdr->min_native_rec = (uint8_t *)H5MM_malloc(hdr->cls->nrec_size)))
+ if(NULL == (hdr->min_native_rec = H5MM_malloc(hdr->cls->nrec_size)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree min record info")
HDmemcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
} /* end if */
@@ -606,7 +660,7 @@ H5B2_find(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_found_t op,
if(idx == (unsigned)(leaf->nrec - 1)) {
if(H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos) {
if(hdr->max_native_rec == NULL)
- if(NULL == (hdr->max_native_rec = (uint8_t *)H5MM_malloc(hdr->cls->nrec_size)))
+ if(NULL == (hdr->max_native_rec = H5MM_malloc(hdr->cls->nrec_size)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree max record info")
HDmemcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
} /* end if */
@@ -1272,7 +1326,7 @@ H5B2_modify(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_modify_t op,
if(idx == 0) {
if(H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos) {
if(hdr->min_native_rec == NULL)
- if(NULL == (hdr->min_native_rec = (uint8_t *)H5MM_malloc(hdr->cls->nrec_size)))
+ if(NULL == (hdr->min_native_rec = H5MM_malloc(hdr->cls->nrec_size)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree min record info")
HDmemcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
} /* end if */
@@ -1280,7 +1334,7 @@ H5B2_modify(H5B2_t *bt2, hid_t dxpl_id, void *udata, H5B2_modify_t op,
if(idx == (unsigned)(leaf->nrec - 1)) {
if(H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos) {
if(hdr->max_native_rec == NULL)
- if(NULL == (hdr->max_native_rec = (uint8_t *)H5MM_malloc(hdr->cls->nrec_size)))
+ if(NULL == (hdr->max_native_rec = H5MM_malloc(hdr->cls->nrec_size)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree max record info")
HDmemcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
} /* end if */
diff --git a/src/H5B2cache.c b/src/H5B2cache.c
index 2c40761..928a7ee 100644
--- a/src/H5B2cache.c
+++ b/src/H5B2cache.c
@@ -890,10 +890,8 @@ H5B2__cache_int_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
/* Sanity check */
HDassert((size_t)(image - (uint8_t *)_image) <= len);
-#ifdef H5_CLEAR_MEMORY
/* Clear rest of internal node */
HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
-#endif /* H5_CLEAR_MEMORY */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1300,10 +1298,8 @@ H5B2__cache_leaf_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED l
/* Sanity check */
HDassert((size_t)(image - (uint8_t *)_image) <= len);
-#ifdef H5_CLEAR_MEMORY
/* Clear rest of leaf node */
HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
-#endif /* H5_CLEAR_MEMORY */
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c
index b0e9ba2..bc1edd7 100644
--- a/src/H5B2dbg.c
+++ b/src/H5B2dbg.c
@@ -92,7 +92,6 @@ H5B2__hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
const H5B2_class_t *type, haddr_t obj_addr)
{
H5B2_hdr_t *hdr = NULL; /* B-tree header info */
- void *dbg_ctx = NULL; /* v2 B-tree debugging context */
unsigned u; /* Local index variable */
char temp_str[128]; /* Temporary string, for formatting */
herr_t ret_value = SUCCEED; /* Return value */
@@ -109,17 +108,9 @@ H5B2__hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
HDassert(indent >= 0);
HDassert(fwidth >= 0);
HDassert(type);
- HDassert((type->crt_dbg_ctx && type->dst_dbg_ctx) ||
- (NULL == type->crt_dbg_ctx && NULL == type->dst_dbg_ctx));
-
- /* Check for debugging context callback available */
- if(type->crt_dbg_ctx)
- /* Create debugging context */
- if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, obj_addr)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context")
/* Load the B-tree header */
- if(NULL == (hdr = H5B2__hdr_protect(f, dxpl_id, addr, dbg_ctx, H5AC__READ_ONLY_FLAG)))
+ if(NULL == (hdr = H5B2__hdr_protect(f, dxpl_id, addr, f, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree header")
/* Set file pointer for this B-tree operation */
@@ -171,8 +162,6 @@ H5B2__hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
} /* end for */
done:
- if(dbg_ctx && (type->dst_dbg_ctx)(dbg_ctx) < 0)
- HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, "unable to release v2 B-tree debugging context")
if(hdr && H5B2__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_PROTECT, FAIL, "unable to release v2 B-tree header")
@@ -199,7 +188,6 @@ H5B2__int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
{
H5B2_hdr_t *hdr = NULL; /* B-tree header */
H5B2_internal_t *internal = NULL; /* B-tree internal node */
- void *dbg_ctx = NULL; /* v2 B-tree debugging context */
unsigned u; /* Local index variable */
char temp_str[128]; /* Temporary string, for formatting */
herr_t ret_value=SUCCEED; /* Return value */
@@ -215,21 +203,12 @@ H5B2__int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
HDassert(indent >= 0);
HDassert(fwidth >= 0);
HDassert(type);
- HDassert((type->crt_dbg_ctx && type->dst_dbg_ctx) ||
- (NULL == type->crt_dbg_ctx && NULL == type->dst_dbg_ctx));
HDassert(H5F_addr_defined(hdr_addr));
HDassert(H5F_addr_defined(obj_addr));
HDassert(nrec > 0);
- /* Check for debugging context callback available */
- if(type->crt_dbg_ctx) {
- /* Create debugging context */
- if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, obj_addr)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context")
- } /* end if */
-
/* Load the B-tree header */
- if(NULL == (hdr = H5B2__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG)))
+ if(NULL == (hdr = H5B2__hdr_protect(f, dxpl_id, hdr_addr, f, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load v2 B-tree header")
/* Set file pointer for this B-tree operation */
@@ -279,7 +258,7 @@ H5B2__int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
temp_str);
HDassert(H5B2_INT_NREC(internal, hdr, u));
- (void)(type->debug)(stream, indent + 6, MAX (0, fwidth-6), H5B2_INT_NREC(internal, hdr, u), dbg_ctx);
+ (void)(type->debug)(stream, indent + 6, MAX (0, fwidth-6), H5B2_INT_NREC(internal, hdr, u), hdr->cb_ctx);
} /* end for */
/* Print final node pointer */
@@ -291,8 +270,6 @@ H5B2__int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
internal->node_ptrs[u].addr);
done:
- if(dbg_ctx && (type->dst_dbg_ctx)(dbg_ctx) < 0)
- HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, "unable to release v2 B-tree debugging context")
if(hdr && H5B2__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_PROTECT, FAIL, "unable to release v2 B-tree header")
if(internal && H5AC_unprotect(f, dxpl_id, H5AC_BT2_INT, addr, internal, H5AC__NO_FLAGS_SET) < 0)
@@ -321,7 +298,6 @@ H5B2__leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent
{
H5B2_hdr_t *hdr = NULL; /* B-tree header */
H5B2_leaf_t *leaf = NULL; /* B-tree leaf node */
- void *dbg_ctx = NULL; /* v2 B-tree debugging context */
unsigned u; /* Local index variable */
char temp_str[128]; /* Temporary string, for formatting */
herr_t ret_value = SUCCEED; /* Return value */
@@ -337,20 +313,12 @@ H5B2__leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent
HDassert(indent >= 0);
HDassert(fwidth >= 0);
HDassert(type);
- HDassert((type->crt_dbg_ctx && type->dst_dbg_ctx) ||
- (NULL == type->crt_dbg_ctx && NULL == type->dst_dbg_ctx));
HDassert(H5F_addr_defined(hdr_addr));
HDassert(H5F_addr_defined(obj_addr));
HDassert(nrec > 0);
- /* Check for debugging context callback available */
- if(type->crt_dbg_ctx)
- /* Create debugging context */
- if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, obj_addr)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context")
-
/* Load the B-tree header */
- if(NULL == (hdr = H5B2__hdr_protect(f, dxpl_id, hdr_addr, dbg_ctx, H5AC__READ_ONLY_FLAG)))
+ if(NULL == (hdr = H5B2__hdr_protect(f, dxpl_id, hdr_addr, f, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect v2 B-tree header")
/* Set file pointer for this B-tree operation */
@@ -391,12 +359,10 @@ H5B2__leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent
HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
temp_str);
HDassert(H5B2_LEAF_NREC(leaf, hdr, u));
- (void)(type->debug)(stream, indent + 6, MAX (0, fwidth-6), H5B2_LEAF_NREC(leaf, hdr, u), dbg_ctx);
+ (void)(type->debug)(stream, indent + 6, MAX (0, fwidth-6), H5B2_LEAF_NREC(leaf, hdr, u), hdr->cb_ctx);
} /* end for */
done:
- if(dbg_ctx && (type->dst_dbg_ctx)(dbg_ctx) < 0)
- HDONE_ERROR(H5E_BTREE, H5E_CANTRELEASE, FAIL, "unable to release v2 B-tree debugging context")
if(hdr && H5B2__hdr_unprotect(hdr, dxpl_id, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_PROTECT, FAIL, "unable to release B-tree header")
if(leaf && H5AC_unprotect(f, dxpl_id, H5AC_BT2_LEAF, addr, leaf, H5AC__NO_FLAGS_SET) < 0)
diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c
index 0676f30..578eeb9 100644
--- a/src/H5B2hdr.c
+++ b/src/H5B2hdr.c
@@ -153,9 +153,7 @@ H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata,
/* Allocate "page" for node I/O */
if(NULL == (hdr->page = H5FL_BLK_MALLOC(node_page, hdr->node_size)))
HGOTO_ERROR(H5E_BTREE, H5E_NOSPACE, FAIL, "memory allocation failed")
-#ifdef H5_CLEAR_MEMORY
-HDmemset(hdr->page, 0, hdr->node_size);
-#endif /* H5_CLEAR_MEMORY */
+ HDmemset(hdr->page, 0, hdr->node_size);
/* Allocate array of node info structs */
if(NULL == (hdr->node_info = H5FL_SEQ_MALLOC(H5B2_node_info_t, (size_t)(hdr->depth + 1))))
diff --git a/src/H5B2int.c b/src/H5B2int.c
index 01b747f..8f6cf7a 100644
--- a/src/H5B2int.c
+++ b/src/H5B2int.c
@@ -80,9 +80,10 @@ static herr_t H5B2__swap_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth,
H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx,
void *swap_loc);
static herr_t H5B2__shadow_internal(H5B2_hdr_t *hdr, hid_t dxpl_id,
- uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, H5B2_internal_t **internal);
+ uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, H5B2_internal_t **internal,
+ hbool_t *was_shadowed);
static herr_t H5B2__shadow_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id,
- H5B2_node_ptr_t *curr_node_ptr, H5B2_leaf_t **leaf);
+ H5B2_node_ptr_t *curr_node_ptr, H5B2_leaf_t **leaf, hbool_t *was_shadowed);
static herr_t H5B2__create_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, void *parent,
H5B2_node_ptr_t *node_ptr, uint16_t depth);
#ifdef H5B2_DEBUG
@@ -232,7 +233,7 @@ H5B2__split1(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth,
/* Shadow the left node if doing SWMR writes */
if(hdr->swmr_write) {
- if(H5B2__shadow_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &(internal->node_ptrs[idx]), &left_int) < 0)
+ if(H5B2__shadow_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &(internal->node_ptrs[idx]), &left_int, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal node")
left_addr = internal->node_ptrs[idx].addr;
} /* end if */
@@ -268,7 +269,7 @@ H5B2__split1(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth,
/* Shadow the left node if doing SWMR writes */
if(hdr->swmr_write) {
- if(H5B2__shadow_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx]), &left_leaf) < 0)
+ if(H5B2__shadow_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx]), &left_leaf, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal node")
left_addr = internal->node_ptrs[idx].addr;
} /* end if */
@@ -571,9 +572,9 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth,
/* Shadow both nodes if doing SWMR writes */
if(hdr->swmr_write) {
- if(H5B2__shadow_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &(internal->node_ptrs[idx]), &left_internal) < 0)
+ if(H5B2__shadow_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &(internal->node_ptrs[idx]), &left_internal, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal node")
- if(H5B2__shadow_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &(internal->node_ptrs[idx + 1]), &right_internal) < 0)
+ if(H5B2__shadow_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &(internal->node_ptrs[idx + 1]), &right_internal, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal node")
left_addr = internal->node_ptrs[idx].addr;
right_addr = internal->node_ptrs[idx + 1].addr;
@@ -606,9 +607,9 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth,
/* Shadow both nodes if doing SWMR writes */
if(hdr->swmr_write) {
- if(H5B2__shadow_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx]), &left_leaf) < 0)
+ if(H5B2__shadow_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx]), &left_leaf, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow leaf node")
- if(H5B2__shadow_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx + 1]), &right_leaf) < 0)
+ if(H5B2__shadow_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx + 1]), &right_leaf, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow leaf node")
left_addr = internal->node_ptrs[idx].addr;
right_addr = internal->node_ptrs[idx + 1].addr;
@@ -881,10 +882,6 @@ done:
if(right_child && H5AC_unprotect(hdr->f, dxpl_id, child_class, right_addr, right_child, right_child_flags) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree child node")
- /* Release grandchild node if protected (only on error) */
- if(grandchild && H5AC_unprotect(hdr->f, dxpl_id, grandchild_class, left_node_ptrs[u].addr, grandchild, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release B-tree node")
-
/* Unprotect the grandchild on error */
if(grandchild) {
HDassert(ret_value < 0);
@@ -964,11 +961,11 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth,
/* Shadow all nodes if doing SWMR writes */
if(hdr->swmr_write) {
- if(H5B2__shadow_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &(internal->node_ptrs[idx - 1]), &left_internal) < 0)
+ if(H5B2__shadow_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &(internal->node_ptrs[idx - 1]), &left_internal, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal node")
- if(H5B2__shadow_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &(internal->node_ptrs[idx]), &middle_internal) < 0)
+ if(H5B2__shadow_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &(internal->node_ptrs[idx]), &middle_internal, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal node")
- if(H5B2__shadow_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &(internal->node_ptrs[idx + 1]), &right_internal) < 0)
+ if(H5B2__shadow_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &(internal->node_ptrs[idx + 1]), &right_internal, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal node")
left_addr = internal->node_ptrs[idx - 1].addr;
middle_addr = internal->node_ptrs[idx].addr;
@@ -1010,11 +1007,11 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth,
/* Shadow all nodes if doing SWMR writes */
if(hdr->swmr_write) {
- if(H5B2__shadow_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx - 1]), &left_leaf) < 0)
+ if(H5B2__shadow_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx - 1]), &left_leaf, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow leaf node")
- if(H5B2__shadow_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx]), &middle_leaf) < 0)
+ if(H5B2__shadow_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx]), &middle_leaf, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow leaf node")
- if(H5B2__shadow_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx + 1]), &right_leaf) < 0)
+ if(H5B2__shadow_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx + 1]), &right_leaf, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow leaf node")
left_addr = internal->node_ptrs[idx - 1].addr;
middle_addr = internal->node_ptrs[idx].addr;
@@ -1611,7 +1608,7 @@ H5B2__merge2(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth,
/* Shadow the left node if doing SWMR writes */
if(hdr->swmr_write) {
- if(H5B2__shadow_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &(internal->node_ptrs[idx]), &left_internal) < 0)
+ if(H5B2__shadow_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &(internal->node_ptrs[idx]), &left_internal, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal node")
left_addr = internal->node_ptrs[idx].addr;
} /* end if */
@@ -1643,7 +1640,7 @@ H5B2__merge2(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth,
/* Shadow the left node if doing SWMR writes */
if(hdr->swmr_write) {
- if(H5B2__shadow_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx]), &left_leaf) < 0)
+ if(H5B2__shadow_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx]), &left_leaf, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow leaf node")
left_addr = internal->node_ptrs[idx].addr;
} /* end if */
@@ -1861,9 +1858,9 @@ H5B2__merge3(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth,
/* Shadow left and middle nodes if doing SWMR writes */
if(hdr->swmr_write) {
- if(H5B2__shadow_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &(internal->node_ptrs[idx - 1]), &left_internal) < 0)
+ if(H5B2__shadow_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &(internal->node_ptrs[idx - 1]), &left_internal, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal node")
- if(H5B2__shadow_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &(internal->node_ptrs[idx]), &middle_internal) < 0)
+ if(H5B2__shadow_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &(internal->node_ptrs[idx]), &middle_internal, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal node")
left_addr = internal->node_ptrs[idx - 1].addr;
middle_addr = internal->node_ptrs[idx].addr;
@@ -1904,9 +1901,9 @@ H5B2__merge3(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth,
/* Shadow left and middle nodes if doing SWMR writes */
if(hdr->swmr_write) {
- if(H5B2__shadow_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx - 1]), &left_leaf) < 0)
+ if(H5B2__shadow_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx - 1]), &left_leaf, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow leaf node")
- if(H5B2__shadow_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx]), &middle_leaf) < 0)
+ if(H5B2__shadow_leaf(hdr, dxpl_id, &(internal->node_ptrs[idx]), &middle_leaf, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow leaf node")
left_addr = internal->node_ptrs[idx - 1].addr;
middle_addr = internal->node_ptrs[idx].addr;
@@ -2261,6 +2258,62 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5B2__insert_hdr
+ *
+ * Purpose: Adds a new record to the B-tree.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Dec 23 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5B2__insert_hdr(H5B2_hdr_t *hdr, hid_t dxpl_id, void *udata)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_PACKAGE
+
+ /* Check arguments. */
+ HDassert(hdr);
+ HDassert(udata);
+
+ /* Check if the root node is allocated yet */
+ if(!H5F_addr_defined(hdr->root.addr)) {
+ /* Create root node as leaf node in B-tree */
+ if(H5B2__create_leaf(hdr, dxpl_id, hdr, &(hdr->root)) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create root node")
+ } /* end if */
+ /* Check if we need to split the root node (equiv. to a 1->2 node split) */
+ else if(hdr->root.node_nrec == hdr->node_info[hdr->depth].split_nrec) {
+ /* Split root node */
+ if(H5B2__split_root(hdr, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split root node")
+ } /* end if */
+
+ /* Attempt to insert record into B-tree */
+ if(hdr->depth > 0) {
+ if(H5B2__insert_internal(hdr, dxpl_id, hdr->depth, NULL, &hdr->root, H5B2_POS_ROOT, hdr, udata) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree internal node")
+ } /* end if */
+ else {
+ if(H5B2__insert_leaf(hdr, dxpl_id, &hdr->root, H5B2_POS_ROOT, hdr, udata) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into B-tree leaf node")
+ } /* end else */
+
+ /* Mark B-tree header as dirty */
+ if(H5B2__hdr_dirty(hdr) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTMARKDIRTY, FAIL, "unable to mark B-tree header dirty")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5B2__insert_hdr() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5B2__insert_leaf
*
* Purpose: Adds a new record to a B-tree leaf node.
@@ -2278,6 +2331,7 @@ H5B2__insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr
H5B2_nodepos_t curr_pos, void *parent, void *udata)
{
H5B2_leaf_t *leaf; /* Pointer to leaf node */
+ unsigned leaf_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting the leaf node */
int cmp; /* Comparison value of records */
unsigned idx; /* Location of record which matches key */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2293,11 +2347,6 @@ H5B2__insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr
if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, curr_node_ptr->addr, parent, curr_node_ptr->node_nrec, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
- /* Shadow the node if doing SWMR writes */
- if(hdr->swmr_write)
- if(H5B2__shadow_leaf(hdr, dxpl_id, curr_node_ptr, &leaf) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow leaf node")
-
/* Must have a leaf node with enough space to insert a record now */
HDassert(curr_node_ptr->node_nrec < hdr->node_info[0].max_nrec);
@@ -2324,6 +2373,9 @@ H5B2__insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr
if((hdr->cls->store)(H5B2_LEAF_NREC(leaf, hdr, idx), udata) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into leaf node")
+ /* Mark the node as dirty */
+ leaf_flags |= H5AC__DIRTIED_FLAG;
+
/* Update record count for node pointer to current node */
curr_node_ptr->all_nrec++;
curr_node_ptr->node_nrec++;
@@ -2337,7 +2389,7 @@ H5B2__insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr
if(idx == 0) {
if(H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos) {
if(hdr->min_native_rec == NULL)
- if(NULL == (hdr->min_native_rec = (uint8_t *)H5MM_malloc(hdr->cls->nrec_size)))
+ if(NULL == (hdr->min_native_rec = H5MM_malloc(hdr->cls->nrec_size)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree min record info")
HDmemcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
} /* end if */
@@ -2345,7 +2397,7 @@ H5B2__insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr
if(idx == (unsigned)(leaf->nrec - 1)) {
if(H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos) {
if(hdr->max_native_rec == NULL)
- if(NULL == (hdr->max_native_rec = (uint8_t *)H5MM_malloc(hdr->cls->nrec_size)))
+ if(NULL == (hdr->max_native_rec = H5MM_malloc(hdr->cls->nrec_size)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree max record info")
HDmemcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
} /* end if */
@@ -2354,8 +2406,14 @@ H5B2__insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr
done:
/* Release the B-tree leaf node (marked as dirty) */
- if(leaf && H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr->addr, leaf, H5AC__DIRTIED_FLAG) < 0)
- HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release leaf B-tree node")
+ if(leaf) {
+ /* Shadow the node if doing SWMR writes */
+ if(hdr->swmr_write && (leaf_flags & H5AC__DIRTIED_FLAG))
+ if(H5B2__shadow_leaf(hdr, dxpl_id, curr_node_ptr, &leaf, NULL) < 0)
+ HDONE_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow leaf B-tree node")
+ if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr->addr, leaf, leaf_flags) < 0)
+ HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release leaf B-tree node")
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2__insert_leaf() */
@@ -2397,10 +2455,8 @@ H5B2__insert_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth,
if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node_ptr->addr, parent, curr_node_ptr->node_nrec, depth, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
- /* Shadow the node if doing SWMR writes */
- if(hdr->swmr_write)
- if(H5B2__shadow_internal(hdr, dxpl_id, depth, curr_node_ptr, &internal) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal node")
+ /* Sanity check number of records */
+ HDassert(internal->nrec == curr_node_ptr->node_nrec);
/* Split or redistribute child node pointers, if necessary */
{
@@ -2505,14 +2561,401 @@ H5B2__insert_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth,
done:
/* Release the B-tree internal node */
- if(internal && H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr->addr, internal, internal_flags) < 0)
- HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release internal B-tree node")
+ if(internal) {
+ /* Shadow the node if doing SWMR writes */
+ if(hdr->swmr_write && (internal_flags & H5AC__DIRTIED_FLAG))
+ if(H5B2__shadow_internal(hdr, dxpl_id, depth, curr_node_ptr, &internal, NULL) < 0)
+ HDONE_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal B-tree node")
+ if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr->addr, internal, internal_flags) < 0)
+ HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release internal B-tree node")
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5B2__insert_internal() */
/*-------------------------------------------------------------------------
+ * Function: H5B2__update_leaf
+ *
+ * Purpose: Insert or modify a record in a B-tree leaf node.
+ * If the record exists already, it is modified as if H5B2_modify
+ * was called). If it doesn't exist, it is inserted as if
+ * H5B2_insert was called.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Dec 23 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5B2__update_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr,
+ H5B2_update_status_t *status, H5B2_nodepos_t curr_pos, void *parent,
+ void *udata, H5B2_modify_t op, void *op_data)
+{
+ H5B2_leaf_t *leaf; /* Pointer to leaf node */
+ unsigned leaf_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting the leaf node */
+ int cmp = -1; /* Comparison value of records */
+ unsigned idx; /* Location of record which matches key */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_PACKAGE
+
+ /* Check arguments. */
+ HDassert(hdr);
+ HDassert(curr_node_ptr);
+ HDassert(H5F_addr_defined(curr_node_ptr->addr));
+
+ /* Lock current B-tree node */
+ if(NULL == (leaf = H5B2__protect_leaf(hdr, dxpl_id, curr_node_ptr->addr, parent, curr_node_ptr->node_nrec, H5AC__NO_FLAGS_SET)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
+
+ /* Sanity check number of records */
+ HDassert(curr_node_ptr->all_nrec == curr_node_ptr->node_nrec);
+ HDassert(leaf->nrec == curr_node_ptr->node_nrec);
+
+ /* Check for inserting into empty leaf */
+ if(leaf->nrec == 0)
+ idx = 0;
+ else {
+ /* Find correct location to insert this record */
+ cmp = H5B2__locate_record(hdr->cls, leaf->nrec, hdr->nat_off, leaf->leaf_native, udata, &idx);
+
+ /* Check for inserting a record */
+ if(0 != cmp) {
+ /* Check if the leaf node is full */
+ if(curr_node_ptr->node_nrec == hdr->node_info[0].split_nrec) {
+ /* Indicate that the leaf is full, but we need to insert */
+ *status = H5B2_UPDATE_INSERT_CHILD_FULL;
+
+ /* Let calling routine handle insertion */
+ HGOTO_DONE(SUCCEED)
+ } /* end if */
+
+ /* Adjust index to leave room for record to insert */
+ if(cmp > 0)
+ idx++;
+
+ /* Make room for new record */
+ if(idx < leaf->nrec)
+ HDmemmove(H5B2_LEAF_NREC(leaf, hdr, idx + 1), H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size * (leaf->nrec - idx));
+ } /* end if */
+ } /* end else */
+
+ /* Check for modifying existing record */
+ if(0 == cmp) {
+ hbool_t changed = FALSE; /* Whether the 'modify' callback changed the record */
+
+ /* Make callback for current record */
+ if((op)(H5B2_LEAF_NREC(leaf, hdr, idx), op_data, &changed) < 0) {
+ /* Make certain that the callback didn't modify the value if it failed */
+ HDassert(changed == FALSE);
+
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTMODIFY, FAIL, "'modify' callback failed for B-tree update operation")
+ } /* end if */
+
+ /* Mark the node as dirty if it changed */
+ leaf_flags |= (changed ? H5AC__DIRTIED_FLAG : 0);
+
+ /* Indicate that the record was modified */
+ *status = H5B2_UPDATE_MODIFY_DONE;
+ } /* end if */
+ else {
+ /* Must have a leaf node with enough space to insert a record now */
+ HDassert(curr_node_ptr->node_nrec < hdr->node_info[0].max_nrec);
+
+ /* Make callback to store record in native form */
+ if((hdr->cls->store)(H5B2_LEAF_NREC(leaf, hdr, idx), udata) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into leaf node")
+
+ /* Mark the node as dirty */
+ leaf_flags |= H5AC__DIRTIED_FLAG;
+
+ /* Indicate that the record was inserted */
+ *status = H5B2_UPDATE_INSERT_DONE;
+
+ /* Update record count for node pointer to current node */
+ curr_node_ptr->all_nrec++;
+ curr_node_ptr->node_nrec++;
+
+ /* Update record count for current node */
+ leaf->nrec++;
+ } /* end else */
+
+ /* Check for new record being the min or max for the tree */
+ /* (Don't use 'else' for the idx check, to allow for root leaf node) */
+ if(H5B2_POS_MIDDLE != curr_pos) {
+ if(idx == 0) {
+ if(H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos) {
+ if(hdr->min_native_rec == NULL)
+ if(NULL == (hdr->min_native_rec = H5MM_malloc(hdr->cls->nrec_size)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree min record info")
+ HDmemcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
+ } /* end if */
+ } /* end if */
+ if(idx == (unsigned)(leaf->nrec - 1)) {
+ if(H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos) {
+ if(hdr->max_native_rec == NULL)
+ if(NULL == (hdr->max_native_rec = H5MM_malloc(hdr->cls->nrec_size)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree max record info")
+ HDmemcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
+ } /* end if */
+ } /* end if */
+ } /* end if */
+
+done:
+ /* Release the B-tree leaf node */
+ if(leaf) {
+ /* Check if we should shadow this node */
+ if(hdr->swmr_write && (leaf_flags & H5AC__DIRTIED_FLAG)) {
+ hbool_t was_shadowed; /* Whether the node was actually shadowed */
+
+ /* Attempt to shadow the node if doing SWMR writes */
+ if(H5B2__shadow_leaf(hdr, dxpl_id, curr_node_ptr, &leaf, &was_shadowed) < 0)
+ HDONE_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow leaf B-tree node")
+
+ /* Change the state to "shadowed" if only modified currently */
+ /* (Triggers parent to be marked dirty) */
+ if(*status == H5B2_UPDATE_MODIFY_DONE)
+ *status = H5B2_UPDATE_SHADOW_DONE;
+ } /* end if */
+ if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_LEAF, curr_node_ptr->addr, leaf, leaf_flags) < 0)
+ HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release leaf B-tree node")
+ } /* end if */
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5B2__update_leaf() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5B2__update_internal
+ *
+ * Purpose: Insert or modify a record in a B-tree leaf node.
+ * If the record exists already, it is modified as if H5B2_modify
+ * was called). If it doesn't exist, it is inserted as if
+ * H5B2_insert was called.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * Dec 24 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5B2__update_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth,
+ unsigned *parent_cache_info_flags_ptr, H5B2_node_ptr_t *curr_node_ptr,
+ H5B2_update_status_t *status, H5B2_nodepos_t curr_pos, void *parent,
+ void *udata, H5B2_modify_t op, void *op_data)
+{
+ H5B2_internal_t *internal = NULL; /* Pointer to internal node */
+ unsigned internal_flags = H5AC__NO_FLAGS_SET;
+ int cmp; /* Comparison value of records */
+ unsigned idx; /* Location of record which matches key */
+ H5B2_nodepos_t next_pos = H5B2_POS_MIDDLE; /* Position of node */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_PACKAGE
+
+ /* Check arguments. */
+ HDassert(hdr);
+ HDassert(depth > 0);
+ HDassert(curr_node_ptr);
+ HDassert(H5F_addr_defined(curr_node_ptr->addr));
+
+ /* Lock current B-tree node */
+ if(NULL == (internal = H5B2__protect_internal(hdr, dxpl_id, curr_node_ptr->addr, parent, curr_node_ptr->node_nrec, depth, H5AC__NO_FLAGS_SET)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree internal node")
+
+ /* Sanity check number of records */
+ HDassert(internal->nrec == curr_node_ptr->node_nrec);
+
+ /* Locate node pointer for child */
+ cmp = H5B2__locate_record(hdr->cls, internal->nrec, hdr->nat_off, internal->int_native, udata, &idx);
+
+ /* Check for modifying existing record */
+ if(0 == cmp) {
+ hbool_t changed = FALSE; /* Whether the 'modify' callback changed the record */
+
+ /* Make callback for current record */
+ if((op)(H5B2_INT_NREC(internal, hdr, idx), op_data, &changed) < 0) {
+ /* Make certain that the callback didn't modify the value if it failed */
+ HDassert(changed == FALSE);
+
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTMODIFY, FAIL, "'modify' callback failed for B-tree update operation")
+ } /* end if */
+
+ /* Mark the node as dirty if it changed */
+ internal_flags |= (changed ? H5AC__DIRTIED_FLAG : 0);
+
+ /* Indicate that the record was modified */
+ *status = H5B2_UPDATE_MODIFY_DONE;
+ } /* end if */
+ else {
+ /* Adjust index to leave room for node to insert */
+ if(cmp > 0)
+ idx++;
+
+ /* Check if this node is left/right-most */
+ if(H5B2_POS_MIDDLE != curr_pos) {
+ if(idx == 0) {
+ if(H5B2_POS_LEFT == curr_pos || H5B2_POS_ROOT == curr_pos)
+ next_pos = H5B2_POS_LEFT;
+ } /* end if */
+ else if(idx == internal->nrec) {
+ if(H5B2_POS_RIGHT == curr_pos || H5B2_POS_ROOT == curr_pos)
+ next_pos = H5B2_POS_RIGHT;
+ } /* end else */
+ } /* end if */
+
+ /* Attempt to update record in child */
+ if(depth > 1) {
+ if(H5B2__update_internal(hdr, dxpl_id, (uint16_t)(depth - 1), &internal_flags, &internal->node_ptrs[idx], status, next_pos, internal, udata, op, op_data) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update record in internal B-tree node")
+ } /* end if */
+ else {
+ if(H5B2__update_leaf(hdr, dxpl_id, &internal->node_ptrs[idx], status, next_pos, internal, udata, op, op_data) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "unable to update record in leaf B-tree node")
+ } /* end else */
+
+ /* Take actions based on child's status report */
+ switch(*status) {
+ case H5B2_UPDATE_MODIFY_DONE:
+ /* No action */
+ break;
+
+ case H5B2_UPDATE_SHADOW_DONE:
+ /* If child node was shadowed (if SWMR is enabled), mark this node dirty */
+ if(hdr->swmr_write)
+ internal_flags |= H5AC__DIRTIED_FLAG;
+
+ /* No further modifications up the tree are necessary though, so downgrade to merely "modified" */
+ *status = H5B2_UPDATE_MODIFY_DONE;
+ break;
+
+ case H5B2_UPDATE_INSERT_DONE:
+ /* Mark node as dirty */
+ internal_flags |= H5AC__DIRTIED_FLAG;
+
+ /* Update total record count for node pointer to current node */
+ curr_node_ptr->all_nrec++;
+ break;
+
+ case H5B2_UPDATE_INSERT_CHILD_FULL:
+ /* Split/redistribute this node */
+ if(internal->nrec == hdr->node_info[depth].split_nrec) {
+ hbool_t could_split = FALSE; /* Whether the child node could split */
+
+#ifdef QAK
+HDfprintf(stderr, "%s: idx = %u, internal->nrec = %u\n", FUNC, idx, internal->nrec);
+HDfprintf(stderr, "%s: hdr->node_info[%u].split_nrec = %u\n", FUNC, (unsigned)depth, (unsigned)hdr->node_info[depth].split_nrec);
+HDfprintf(stderr, "%s: hdr->node_info[%u].split_nrec = %u\n", FUNC, (unsigned)(depth - 1), (unsigned)hdr->node_info[depth - 1].split_nrec);
+#endif /* QAK */
+ if(idx == 0) { /* Left-most child */
+#ifdef QAK
+HDfprintf(stderr, "%s: Left-most child\n", FUNC);
+HDfprintf(stderr, "%s: internal->node_ptrs[%u].node_nrec = %u\n", FUNC, (unsigned)idx, (unsigned)internal->node_ptrs[idx].node_nrec);
+HDfprintf(stderr, "%s: internal->node_ptrs[%u].node_nrec = %u\n", FUNC, (unsigned)(idx + 1), (unsigned)internal->node_ptrs[idx + 1].node_nrec);
+#endif /* QAK */
+ /* Check for left-most child and its neighbor being close to full */
+ if((internal->node_ptrs[idx].node_nrec + internal->node_ptrs[idx + 1].node_nrec)
+ >= ((hdr->node_info[depth - 1].split_nrec * 2) - 1))
+ could_split = TRUE;
+ } /* end if */
+ else if(idx == internal->nrec) { /* Right-most child */
+#ifdef QAK
+HDfprintf(stderr, "%s: Right-most child\n", FUNC);
+HDfprintf(stderr, "%s: internal->node_ptrs[%u].node_nrec = %u\n", FUNC, (unsigned)(idx - 1), (unsigned)internal->node_ptrs[idx - 1].node_nrec);
+HDfprintf(stderr, "%s: internal->node_ptrs[%u].node_nrec = %u\n", FUNC, (unsigned)idx, (unsigned)internal->node_ptrs[idx].node_nrec);
+#endif /* QAK */
+ /* Check for right-most child and its neighbor being close to full */
+ if((internal->node_ptrs[idx - 1].node_nrec + internal->node_ptrs[idx].node_nrec)
+ >= ((hdr->node_info[depth - 1].split_nrec * 2) - 1))
+ could_split = TRUE;
+ } /* end else-if */
+ else { /* Middle child */
+#ifdef QAK
+HDfprintf(stderr, "%s: Middle child\n", FUNC);
+HDfprintf(stderr, "%s: internal->node_ptrs[%u].node_nrec = %u\n", FUNC, (unsigned)(idx - 1), (unsigned)internal->node_ptrs[idx - 1].node_nrec);
+HDfprintf(stderr, "%s: internal->node_ptrs[%u].node_nrec = %u\n", FUNC, (unsigned)idx, (unsigned)internal->node_ptrs[idx].node_nrec);
+HDfprintf(stderr, "%s: internal->node_ptrs[%u].node_nrec = %u\n", FUNC, (unsigned)(idx + 1), (unsigned)internal->node_ptrs[idx + 1].node_nrec);
+#endif /* QAK */
+ /* Check for middle child and its left neighbor being close to full */
+ if((internal->node_ptrs[idx - 1].node_nrec + internal->node_ptrs[idx].node_nrec)
+ >= ((hdr->node_info[depth - 1].split_nrec * 2) - 1))
+ could_split = TRUE;
+ /* Check for middle child and its right neighbor being close to full */
+ else if((internal->node_ptrs[idx].node_nrec + internal->node_ptrs[idx + 1].node_nrec)
+ >= ((hdr->node_info[depth - 1].split_nrec * 2) - 1))
+ could_split = TRUE;
+ } /* end if */
+
+ /* If this node is full and the child node insertion could
+ * cause a split, punt back up to caller, leaving the
+ * "insert child full" status.
+ */
+ if(could_split) {
+ /* Release the internal B-tree node */
+ if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr->addr, internal, internal_flags) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release internal B-tree node")
+ internal = NULL;
+
+#ifdef QAK
+HDfprintf(stderr, "%s: Punting back to caller\n", FUNC);
+#endif /* QAK */
+ /* Punt back to caller */
+ HGOTO_DONE(SUCCEED);
+ } /* end if */
+ } /* end if */
+
+ /* Release the internal B-tree node */
+ if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr->addr, internal, internal_flags) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release internal B-tree node")
+ internal = NULL;
+
+ /* Indicate that the record was inserted */
+ *status = H5B2_UPDATE_INSERT_DONE;
+
+ /* Dodge sideways into inserting a record into this node */
+ if(H5B2__insert_internal(hdr, dxpl_id, depth, parent_cache_info_flags_ptr, curr_node_ptr, curr_pos, parent, udata) < 0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, FAIL, "unable to insert record into internal B-tree node")
+ break;
+
+ case H5B2_UPDATE_UNKNOWN:
+ default:
+ HDassert(0 && "Invalid update status");
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTUPDATE, FAIL, "invalid update status")
+ } /* end switch */
+ } /* end else */
+
+done:
+ /* Release the internal B-tree node */
+ if(internal) {
+ /* Check if we should shadow this node */
+ if(hdr->swmr_write && (internal_flags & H5AC__DIRTIED_FLAG)) {
+ hbool_t was_shadowed; /* Whether the node was actually shadowed */
+
+ /* Attempt to shadow the node if doing SWMR writes */
+ if(H5B2__shadow_internal(hdr, dxpl_id, depth, curr_node_ptr, &internal, &was_shadowed) < 0)
+ HDONE_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal B-tree node")
+
+ /* Change the state to "shadowed" if only modified currently */
+ /* (Triggers parent to be marked dirty) */
+ if(*status == H5B2_UPDATE_MODIFY_DONE)
+ *status = H5B2_UPDATE_SHADOW_DONE;
+ } /* end if */
+ if(H5AC_unprotect(hdr->f, dxpl_id, H5AC_BT2_INT, curr_node_ptr->addr, internal, internal_flags) < 0)
+ HDONE_ERROR(H5E_BTREE, H5E_CANTUNPROTECT, FAIL, "unable to release internal B-tree node")
+ } /* end if */
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5B2__update_internal() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5B2__create_leaf
*
* Purpose: Creates empty leaf node of a B-tree and update node pointer
@@ -2547,17 +2990,15 @@ H5B2__create_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, void *parent, H5B2_node_ptr_t
/* Increment ref. count on B-tree header */
if(H5B2__hdr_incr(hdr) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, FAIL, "can't increment ref. count on B-tree header")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINC, FAIL, "can't increment ref. count on B-tree header")
/* Share B-tree header information */
leaf->hdr = hdr;
/* Allocate space for the native keys in memory */
if(NULL == (leaf->leaf_native = (uint8_t *)H5FL_FAC_MALLOC(hdr->node_info[0].nat_rec_fac)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree leaf native keys")
-#ifdef H5_CLEAR_MEMORY
-HDmemset(leaf->leaf_native, 0, hdr->cls->nrec_size * hdr->node_info[0].max_nrec);
-#endif /* H5_CLEAR_MEMORY */
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree leaf native keys")
+ HDmemset(leaf->leaf_native, 0, hdr->cls->nrec_size * hdr->node_info[0].max_nrec);
/* Set number of records */
leaf->nrec = 0;
@@ -2571,15 +3012,15 @@ HDmemset(leaf->leaf_native, 0, hdr->cls->nrec_size * hdr->node_info[0].max_nrec)
/* Allocate space on disk for the leaf */
if(HADDR_UNDEF == (node_ptr->addr = H5MF_alloc(hdr->f, H5FD_MEM_BTREE, dxpl_id, (hsize_t)hdr->node_size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree leaf node")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree leaf node")
/* Cache the new B-tree node */
if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_BT2_LEAF, node_ptr->addr, leaf, H5AC__NO_FLAGS_SET) < 0)
- HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree leaf to cache")
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree leaf to cache")
done:
if(ret_value < 0) {
- if(leaf)
+ if(leaf)
if(H5B2__leaf_free(leaf) < 0)
HDONE_ERROR(H5E_BTREE, H5E_CANTFREE, FAIL, "unable to release v2 B-tree leaf node")
} /* end if */
@@ -2677,16 +3118,12 @@ H5B2__create_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, void *parent,
/* Allocate space for the native keys in memory */
if(NULL == (internal->int_native = (uint8_t *)H5FL_FAC_MALLOC(hdr->node_info[depth].nat_rec_fac)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree internal native keys")
-#ifdef H5_CLEAR_MEMORY
-HDmemset(internal->int_native, 0, hdr->cls->nrec_size * hdr->node_info[depth].max_nrec);
-#endif /* H5_CLEAR_MEMORY */
+ HDmemset(internal->int_native, 0, hdr->cls->nrec_size * hdr->node_info[depth].max_nrec);
/* Allocate space for the node pointers in memory */
if(NULL == (internal->node_ptrs = (H5B2_node_ptr_t *)H5FL_FAC_MALLOC(hdr->node_info[depth].node_ptr_fac)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree internal node pointers")
-#ifdef H5_CLEAR_MEMORY
-HDmemset(internal->node_ptrs, 0, sizeof(H5B2_node_ptr_t) * (hdr->node_info[depth].max_nrec + 1));
-#endif /* H5_CLEAR_MEMORY */
+ HDmemset(internal->node_ptrs, 0, sizeof(H5B2_node_ptr_t) * (hdr->node_info[depth].max_nrec + 1));
/* Set number of records & depth of the node */
internal->nrec = 0;
@@ -2957,7 +3394,7 @@ H5B2__remove_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, H5B2_node_ptr_t *curr_node_ptr
if(leaf->nrec > 0) {
/* Shadow the node if doing SWMR writes */
if(hdr->swmr_write) {
- if(H5B2__shadow_leaf(hdr, dxpl_id, curr_node_ptr, &leaf) < 0)
+ if(H5B2__shadow_leaf(hdr, dxpl_id, curr_node_ptr, &leaf, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow leaf node")
leaf_addr = curr_node_ptr->addr;
} /* end if */
@@ -3133,7 +3570,7 @@ H5B2__remove_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, hbool_t *depth_decreased,
/* Shadow the node if doing SWMR writes */
if(hdr->swmr_write) {
- if(H5B2__shadow_internal(hdr, dxpl_id, depth, curr_node_ptr, &internal) < 0)
+ if(H5B2__shadow_internal(hdr, dxpl_id, depth, curr_node_ptr, &internal, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal node")
internal_addr = curr_node_ptr->addr;
} /* end if */
@@ -3350,7 +3787,7 @@ H5B2__remove_leaf_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
if(leaf->nrec > 0) {
/* Shadow the node if doing SWMR writes */
if(hdr->swmr_write) {
- if(H5B2__shadow_leaf(hdr, dxpl_id, curr_node_ptr, &leaf) < 0)
+ if(H5B2__shadow_leaf(hdr, dxpl_id, curr_node_ptr, &leaf, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow leaf node")
leaf_addr = curr_node_ptr->addr;
} /* end if */
@@ -3532,7 +3969,7 @@ H5B2__remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
/* Shadow the node if doing SWMR writes */
if(hdr->swmr_write && !collapsed_root) {
- if(H5B2__shadow_internal(hdr, dxpl_id, depth, curr_node_ptr, &internal) < 0)
+ if(H5B2__shadow_internal(hdr, dxpl_id, depth, curr_node_ptr, &internal, NULL) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTCOPY, FAIL, "unable to shadow internal node")
internal_addr = curr_node_ptr->addr;
} /* end if */
@@ -4128,7 +4565,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5B2__shadow_internal
*
- * Purpose: "Shadow: an internal node - copy it to a new location,
+ * Purpose: "Shadow" an internal node - copy it to a new location,
* leaving the data in the old location intact (for now).
* This is done when writing in SWMR mode to ensure that
* readers do not see nodes that are out of date with
@@ -4143,7 +4580,8 @@ done:
*/
static herr_t
H5B2__shadow_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth,
- H5B2_node_ptr_t *curr_node_ptr, H5B2_internal_t **internal)
+ H5B2_node_ptr_t *curr_node_ptr, H5B2_internal_t **internal,
+ hbool_t *was_shadowed)
{
hbool_t node_pinned = FALSE;
hbool_t node_protected = TRUE;
@@ -4210,7 +4648,16 @@ H5B2__shadow_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth,
else
(*internal)->shadowed_next = *internal;
hdr->shadowed_internal = *internal;
+
+ /* Indicate that the node was shadowed to parent */
+ if(was_shadowed)
+ *was_shadowed = TRUE;
} /* end if */
+ else {
+ /* Indicate that the node was _not_ shadowed to parent */
+ if(was_shadowed)
+ *was_shadowed = FALSE;
+ } /* end else */
done:
if(node_pinned)
@@ -4229,7 +4676,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5B2__shadow_leaf
*
- * Purpose: "Shadow: a leaf node - copy it to a new location, leaving
+ * Purpose: "Shadow" a leaf node - copy it to a new location, leaving
* the data in the old location intact (for now). This is
* done when writing in SWMR mode to ensure that readers do
* not see nodes that are out of date with respect to each
@@ -4244,7 +4691,7 @@ done:
*/
static herr_t
H5B2__shadow_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id,
- H5B2_node_ptr_t *curr_node_ptr, H5B2_leaf_t **leaf)
+ H5B2_node_ptr_t *curr_node_ptr, H5B2_leaf_t **leaf, hbool_t *was_shadowed)
{
hbool_t node_pinned = FALSE;
hbool_t node_protected = TRUE;
@@ -4310,7 +4757,16 @@ H5B2__shadow_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id,
else
(*leaf)->shadowed_next = *leaf;
hdr->shadowed_leaf = *leaf;
+
+ /* Indicate that the node was shadowed to parent */
+ if(was_shadowed)
+ *was_shadowed = TRUE;
} /* end if */
+ else {
+ /* Indicate that the node was _not_ shadowed to parent */
+ if(was_shadowed)
+ *was_shadowed = FALSE;
+ } /* end else */
done:
if(node_pinned)
diff --git a/src/H5B2pkg.h b/src/H5B2pkg.h
index 5691d5f..38b4bad 100644
--- a/src/H5B2pkg.h
+++ b/src/H5B2pkg.h
@@ -186,8 +186,8 @@ typedef struct H5B2_hdr_t {
hbool_t swmr_write; /* Whether we are doing SWMR writes */
struct H5B2_leaf_t *shadowed_leaf; /* Linked list of shadowed leaf nodes */
struct H5B2_internal_t *shadowed_internal; /* Linked list of shadowed internal nodes */
- uint8_t *min_native_rec; /* Pointer to minimum native record */
- uint8_t *max_native_rec; /* Pointer to maximum native record */
+ void *min_native_rec; /* Pointer to minimum native record */
+ void *max_native_rec; /* Pointer to maximum native record */
/* Client information (not stored) */
const H5B2_class_t *cls; /* Class of B-tree client */
@@ -238,6 +238,15 @@ typedef enum H5B2_nodepos_t {
H5B2_POS_MIDDLE /* Node is neither right or left-most in tree */
} H5B2_nodepos_t;
+/* Update status */
+typedef enum H5B2_update_status_t {
+ H5B2_UPDATE_UNKNOWN, /* Unknown update status (initial state) */
+ H5B2_UPDATE_MODIFY_DONE, /* Update successfully modified existing record */
+ H5B2_UPDATE_SHADOW_DONE, /* Update modified existing record and modified node was shadowed */
+ H5B2_UPDATE_INSERT_DONE, /* Update inserted record successfully */
+ H5B2_UPDATE_INSERT_CHILD_FULL /* Update will insert record, but child is full */
+} H5B2_update_status_t;
+
/* Callback info for loading a free space header into the cache */
typedef struct H5B2_hdr_cache_ud_t {
H5F_t *f; /* File that v2 b-tree header is within */
@@ -264,7 +273,7 @@ typedef struct H5B2_leaf_cache_ud_t {
#ifdef H5B2_TESTING
/* Node information for testing */
-typedef struct {
+typedef struct H5B2_node_info_test_t {
uint16_t depth; /* Depth of node */
uint16_t nrec; /* Number of records in node */
} H5B2_node_info_test_t;
@@ -293,6 +302,13 @@ H5FL_EXTERN(H5B2_leaf_t);
/* Internal v2 B-tree testing class */
#ifdef H5B2_TESTING
H5_DLLVAR const H5B2_class_t H5B2_TEST[1];
+H5_DLLVAR const H5B2_class_t H5B2_TEST2[1];
+
+/* B-tree record for testing H5B2_TEST2 class */
+typedef struct H5B2_test_rec_t {
+ hsize_t key; /* Key for record */
+ hsize_t val; /* Value for record */
+} H5B2_test_rec_t;
#endif /* H5B2_TESTING */
/* Array of v2 B-tree client ID -> client class mappings */
@@ -345,12 +361,24 @@ H5_DLL herr_t H5B2__leaf_free(H5B2_leaf_t *l);
H5_DLL herr_t H5B2__internal_free(H5B2_internal_t *i);
/* Routines for inserting records */
+H5_DLL herr_t H5B2__insert_hdr(H5B2_hdr_t *hdr, hid_t dxpl_id, void *udata);
H5_DLL herr_t H5B2__insert_internal(H5B2_hdr_t *hdr, hid_t dxpl_id,
uint16_t depth, unsigned *parent_cache_info_flags_ptr,
H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, void *parent, void *udata);
H5_DLL herr_t H5B2__insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id,
H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, void *parent, void *udata);
+/* Routines for update records */
+H5_DLL herr_t H5B2__update_internal(H5B2_hdr_t *hdr, hid_t dxpl_id,
+ uint16_t depth, unsigned *parent_cache_info_flags_ptr,
+ H5B2_node_ptr_t *curr_node_ptr, H5B2_update_status_t *status,
+ H5B2_nodepos_t curr_pos, void *parent, void *udata, H5B2_modify_t op,
+ void *op_data);
+H5_DLL herr_t H5B2__update_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id,
+ H5B2_node_ptr_t *curr_node_ptr, H5B2_update_status_t *status,
+ H5B2_nodepos_t curr_pos, void *parent, void *udata, H5B2_modify_t op,
+ void *op_data);
+
/* Routines for iterating over nodes/records */
H5_DLL herr_t H5B2__iterate_node(H5B2_hdr_t *hdr, hid_t dxpl_id, uint16_t depth,
const H5B2_node_ptr_t *curr_node, void *parent, H5B2_operator_t op, void *op_data);
diff --git a/src/H5B2private.h b/src/H5B2private.h
index dbc5d47..1620561 100644
--- a/src/H5B2private.h
+++ b/src/H5B2private.h
@@ -57,6 +57,7 @@ typedef enum H5B2_subid_t {
H5B2_ATTR_DENSE_CORDER_ID, /* B-tree is for indexing 'creation order' field for "dense" attribute storage on objects */
H5B2_CDSET_ID, /* B-tree is for non-filtered chunked dataset storage w/ >1 unlim dims */
H5B2_CDSET_FILT_ID, /* B-tree is for filtered chunked dataset storage w/ >1 unlim dims */
+ H5B2_TEST2_ID, /* Another B-tree is for testing (do not use for actual data) */
H5B2_NUM_BTREE_ID /* Number of B-tree IDs (must be last) */
} H5B2_subid_t;
@@ -97,8 +98,6 @@ struct H5B2_class_t {
herr_t (*decode)(const uint8_t *raw, void *record, void *ctx); /* Decode record from disk storage form to native form */
herr_t (*debug)(FILE *stream, int indent, int fwidth, /* Print a record for debugging */
const void *record, const void *ctx);
- void *(*crt_dbg_ctx)(H5F_t *f, hid_t dxpl_id, haddr_t obj_addr); /* Create debugging context */
- herr_t (*dst_dbg_ctx)(void *dbg_ctx); /* Destroy debugging context */
};
/* v2 B-tree creation parameters */
@@ -143,6 +142,8 @@ H5_DLL herr_t H5B2_neighbor(H5B2_t *bt2, hid_t dxpl_id, H5B2_compare_t range,
void *udata, H5B2_found_t op, void *op_data);
H5_DLL herr_t H5B2_modify(H5B2_t *bt2, hid_t dxpl_id, void *udata,
H5B2_modify_t op, void *op_data);
+H5_DLL herr_t H5B2_update(H5B2_t *bt2, hid_t dxpl_id, void *udata,
+ H5B2_modify_t op, void *op_data);
H5_DLL herr_t H5B2_remove(H5B2_t *b2, hid_t dxpl_id, void *udata,
H5B2_remove_t op, void *op_data);
H5_DLL herr_t H5B2_remove_by_idx(H5B2_t *bt2, hid_t dxpl_id,
diff --git a/src/H5B2test.c b/src/H5B2test.c
index a72dc30..141acee 100644
--- a/src/H5B2test.c
+++ b/src/H5B2test.c
@@ -61,6 +61,7 @@ typedef struct H5B2_test_ctx_t {
/* Local Prototypes */
/********************/
+/* v2 B-tree driver callbacks for 'test' B-trees */
static void *H5B2__test_crt_context(void *udata);
static herr_t H5B2__test_dst_context(void *ctx);
static herr_t H5B2__test_store(void *nrecord, const void *udata);
@@ -69,13 +70,21 @@ static herr_t H5B2__test_encode(uint8_t *raw, const void *nrecord, void *ctx);
static herr_t H5B2__test_decode(const uint8_t *raw, void *nrecord, void *ctx);
static herr_t H5B2__test_debug(FILE *stream, int indent, int fwidth,
const void *record, const void *_udata);
-static void *H5B2__test_crt_dbg_context(H5F_t *f, hid_t dxpl_id, haddr_t addr);
+
+/* v2 B-tree driver callbacks for 'test2' B-trees */
+static herr_t H5B2__test2_store(void *nrecord, const void *udata);
+static herr_t H5B2__test2_compare(const void *rec1, const void *rec2);
+static herr_t H5B2__test2_encode(uint8_t *raw, const void *nrecord, void *ctx);
+static herr_t H5B2__test2_decode(const uint8_t *raw, void *nrecord, void *ctx);
+static herr_t H5B2__test2_debug(FILE *stream, int indent, int fwidth,
+ const void *record, const void *_udata);
/*********************/
/* Package Variables */
/*********************/
+/* Class structure for testing simple B-tree records */
const H5B2_class_t H5B2_TEST[1]={{ /* B-tree class information */
H5B2_TEST_ID, /* Type of B-tree */
"H5B2_TEST_ID", /* Name of B-tree class */
@@ -86,9 +95,21 @@ const H5B2_class_t H5B2_TEST[1]={{ /* B-tree class information */
H5B2__test_compare, /* Record comparison callback */
H5B2__test_encode, /* Record encoding callback */
H5B2__test_decode, /* Record decoding callback */
- H5B2__test_debug, /* Record debugging callback */
- H5B2__test_crt_dbg_context, /* Create debugging context */
- H5B2__test_dst_context /* Destroy debugging context */
+ H5B2__test_debug /* Record debugging callback */
+}};
+
+/* Class structure for testing key/value B-tree records */
+const H5B2_class_t H5B2_TEST2[1]={{ /* B-tree class information */
+ H5B2_TEST2_ID, /* Type of B-tree */
+ "H5B2_TEST2_ID", /* Name of B-tree class */
+ sizeof(H5B2_test_rec_t), /* Size of native record */
+ H5B2__test_crt_context, /* Create client callback context */
+ H5B2__test_dst_context, /* Destroy client callback context */
+ H5B2__test2_store, /* Record storage callback */
+ H5B2__test2_compare, /* Record comparison callback */
+ H5B2__test2_encode, /* Record encoding callback */
+ H5B2__test2_decode, /* Record decoding callback */
+ H5B2__test2_debug /* Record debugging callback */
}};
@@ -310,42 +331,139 @@ H5B2__test_debug(FILE *stream, int indent, int fwidth, const void *record,
/*-------------------------------------------------------------------------
- * Function: H5B2__test_crt_dbg_context
+ * Function: H5B2__test2_store
*
- * Purpose: Create context for debugging callback
+ * Purpose: Store native information into record for B-tree
*
- * Return: Success: non-NULL
- * Failure: NULL
+ * Return: Success: non-negative
+ * Failure: negative
*
* Programmer: Quincey Koziol
- * Tuesday, December 1, 2009
+ * Friday, December 25, 2015
*
*-------------------------------------------------------------------------
*/
-static void *
-H5B2__test_crt_dbg_context(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t H5_ATTR_UNUSED addr)
+static herr_t
+H5B2__test2_store(void *nrecord, const void *udata)
{
- H5B2_test_ctx_t *ctx; /* Callback context structure */
- void *ret_value = NULL; /* Return value */
+ FUNC_ENTER_STATIC_NOERR
- FUNC_ENTER_STATIC
+ *(H5B2_test_rec_t *)nrecord = *(const H5B2_test_rec_t *)udata;
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5B2__test2_store() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5B2__test2_compare
+ *
+ * Purpose: Compare two native information records, according to some key
+ *
+ * Return: <0 if rec1 < rec2
+ * =0 if rec1 == rec2
+ * >0 if rec1 > rec2
+ *
+ * Programmer: Quincey Koziol
+ * Friday, December 25, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5B2__test2_compare(const void *rec1, const void *rec2)
+{
+ FUNC_ENTER_STATIC_NOERR
+
+ FUNC_LEAVE_NOAPI((herr_t)(((const H5B2_test_rec_t *)rec1)->key - ((const H5B2_test_rec_t *)rec2)->key))
+} /* H5B2__test2_compare() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5B2__test2_encode
+ *
+ * Purpose: Encode native information into raw form for storing on disk
+ *
+ * Return: Success: non-negative
+ * Failure: negative
+ *
+ * Programmer: Quincey Koziol
+ * Friday, December 25, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5B2__test2_encode(uint8_t *raw, const void *nrecord, void *_ctx)
+{
+ H5B2_test_ctx_t *ctx = (H5B2_test_ctx_t *)_ctx; /* Callback context structure */
+
+ FUNC_ENTER_STATIC_NOERR
/* Sanity check */
- HDassert(f);
+ HDassert(ctx);
- /* Allocate callback context */
- if(NULL == (ctx = H5FL_MALLOC(H5B2_test_ctx_t)))
- HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "can't allocate callback context")
+ H5F_ENCODE_LENGTH_LEN(raw, ((const H5B2_test_rec_t *)nrecord)->key, ctx->sizeof_size);
+ H5F_ENCODE_LENGTH_LEN(raw, ((const H5B2_test_rec_t *)nrecord)->val, ctx->sizeof_size);
- /* Determine the size of addresses & lengths in the file */
- ctx->sizeof_size = H5F_SIZEOF_SIZE(f);
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5B2__test2_encode() */
- /* Set return value */
- ret_value = ctx;
+
+/*-------------------------------------------------------------------------
+ * Function: H5B2__test2_decode
+ *
+ * Purpose: Decode raw disk form of record into native form
+ *
+ * Return: Success: non-negative
+ * Failure: negative
+ *
+ * Programmer: Quincey Koziol
+ * Friday, December 25, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5B2__test2_decode(const uint8_t *raw, void *nrecord, void *_ctx)
+{
+ H5B2_test_ctx_t *ctx = (H5B2_test_ctx_t *)_ctx; /* Callback context structure */
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5B2__test_crt_dbg_context() */
+ FUNC_ENTER_STATIC_NOERR
+
+ /* Sanity check */
+ HDassert(ctx);
+
+ H5F_DECODE_LENGTH_LEN(raw, ((H5B2_test_rec_t *)nrecord)->key, ctx->sizeof_size);
+ H5F_DECODE_LENGTH_LEN(raw, ((H5B2_test_rec_t *)nrecord)->val, ctx->sizeof_size);
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5B2__test2_decode() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5B2__test2_debug
+ *
+ * Purpose: Debug native form of record
+ *
+ * Return: Success: non-negative
+ * Failure: negative
+ *
+ * Programmer: Quincey Koziol
+ * Friday, December 25, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5B2__test2_debug(FILE *stream, int indent, int fwidth, const void *record,
+ const void H5_ATTR_UNUSED *_udata)
+{
+ FUNC_ENTER_STATIC_NOERR
+
+ HDassert(record);
+
+ HDfprintf(stream, "%*s%-*s (%Hu, %Hu)\n", indent, "", fwidth, "Record:",
+ ((const H5B2_test_rec_t *)record)->key,
+ ((const H5B2_test_rec_t *)record)->val);
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5B2__test2_debug() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Bcache.c b/src/H5Bcache.c
index 73136b4..2036257 100644
--- a/src/H5Bcache.c
+++ b/src/H5Bcache.c
@@ -353,10 +353,8 @@ H5B__serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len,
/* Sanity check */
HDassert((size_t)(image - (uint8_t *)_image) <= len);
-#ifdef H5_CLEAR_MEMORY
/* Clear rest of node */
HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
-#endif /* H5_CLEAR_MEMORY */
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5C.c b/src/H5C.c
index 5c3d9ef..622e34a 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -498,8 +498,6 @@ H5C_create(size_t max_cache_size,
HDassert( max_type_id < H5C__MAX_NUM_TYPE_IDS );
HDassert( type_name_table_ptr );
- HDassert( ( write_permitted == TRUE ) || ( write_permitted == FALSE ) );
-
for ( i = 0; i <= max_type_id; i++ ) {
HDassert( (type_name_table_ptr)[i] );
@@ -2195,19 +2193,16 @@ H5C_insert_entry(H5F_t * f,
void * thing,
unsigned int flags)
{
- H5C_t * cache_ptr;
+ H5C_t *cache_ptr;
H5P_genplist_t *dxpl;
H5AC_ring_t ring = H5C_RING_UNDEFINED;
hbool_t insert_pinned;
hbool_t flush_last;
-#ifdef H5_HAVE_PARALLEL
- hbool_t flush_collectively;
-#endif /* H5_HAVE_PARALLEL */
hbool_t set_flush_marker;
hbool_t write_permitted = TRUE;
size_t empty_space;
- H5C_cache_entry_t * entry_ptr;
- H5C_cache_entry_t * test_entry_ptr;
+ H5C_cache_entry_t *entry_ptr;
+ H5C_cache_entry_t *test_entry_ptr;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2239,9 +2234,6 @@ H5C_insert_entry(H5F_t * f,
set_flush_marker = ( (flags & H5C__SET_FLUSH_MARKER_FLAG) != 0 );
insert_pinned = ( (flags & H5C__PIN_ENTRY_FLAG) != 0 );
flush_last = ( (flags & H5C__FLUSH_LAST_FLAG) != 0 );
-#ifdef H5_HAVE_PARALLEL
- flush_collectively = ( (flags & H5C__FLUSH_COLLECTIVELY_FLAG) != 0 );
-#endif /* H5_HAVE_PARALLEL */
/* Get the dataset transfer property list */
if(NULL == (dxpl = (H5P_genplist_t *)H5I_object_verify(dxpl_id, H5I_GENPROP_LST)))
@@ -2290,9 +2282,6 @@ H5C_insert_entry(H5F_t * f,
entry_ptr->pinned_from_client = insert_pinned;
entry_ptr->pinned_from_cache = FALSE;
entry_ptr->flush_me_last = flush_last;
-#ifdef H5_HAVE_PARALLEL
- entry_ptr->flush_me_collectively = flush_collectively;
-#endif
/* newly inserted entries are assumed to be dirty */
entry_ptr->is_dirty = TRUE;
@@ -2438,11 +2427,8 @@ H5C_insert_entry(H5F_t * f,
#if H5C_DO_EXTREME_SANITY_CHECKS
if ( ( H5C_validate_protected_entry_list(cache_ptr) < 0 ) ||
( H5C_validate_pinned_entry_list(cache_ptr) < 0 ) ||
- ( H5C_validate_lru_list(cache_ptr) < 0 ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "an extreme sanity check failed just before done.\n");
- }
+ ( H5C_validate_lru_list(cache_ptr) < 0 ) )
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed just before done.\n")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
/* If the entry's type has a 'notify' callback send a 'after insertion'
@@ -2455,19 +2441,14 @@ H5C_insert_entry(H5F_t * f,
H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr)
done:
-
#if H5C_DO_EXTREME_SANITY_CHECKS
if ( ( H5C_validate_protected_entry_list(cache_ptr) < 0 ) ||
( H5C_validate_pinned_entry_list(cache_ptr) < 0 ) ||
- ( H5C_validate_lru_list(cache_ptr) < 0 ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "an extreme sanity check failed on exit.\n");
- }
+ ( H5C_validate_lru_list(cache_ptr) < 0 ) )
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on exit.\n")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5C_insert_entry() */
@@ -3048,10 +3029,10 @@ done:
* This allows H5C_protect to accept flags other than
* H5C__READ_ONLY_FLAG.
*
- * Added support for the H5C__FLUSH_LAST_FLAG and
- * H5C__FLUSH_COLLECTIVELY_FLAG flags. At present, these
- * flags are only applied if the entry is not in cache, and
- * is loaded into the cache as a result of this call.
+ * Added support for the H5C__FLUSH_LAST_FLAG.
+ * At present, this flag is only applied if the entry is
+ * not in cache, and is loaded into the cache as a result of
+ * this call.
*
*-------------------------------------------------------------------------
*/
@@ -3064,19 +3045,16 @@ H5C_protect(H5F_t * f,
unsigned flags)
{
H5C_t * cache_ptr;
- H5P_genplist_t *dxpl;
H5AC_ring_t ring = H5C_RING_UNDEFINED;
hbool_t hit;
hbool_t have_write_permitted = FALSE;
hbool_t read_only = FALSE;
hbool_t flush_last;
-#ifdef H5_HAVE_PARALLEL
- hbool_t flush_collectively;
-#endif /* H5_HAVE_PARALLEL */
hbool_t write_permitted;
size_t empty_space;
void * thing;
H5C_cache_entry_t * entry_ptr;
+ H5P_genplist_t * dxpl; /* dataset transfer property list */
void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -3104,9 +3082,6 @@ H5C_protect(H5F_t * f,
read_only = ( (flags & H5C__READ_ONLY_FLAG) != 0 );
flush_last = ( (flags & H5C__FLUSH_LAST_FLAG) != 0 );
-#ifdef H5_HAVE_PARALLEL
- flush_collectively = ( (flags & H5C__FLUSH_COLLECTIVELY_FLAG) != 0 );
-#endif /* H5_HAVE_PARALLEL */
/* Get the dataset transfer property list */
if(NULL == (dxpl = (H5P_genplist_t *)H5I_object_verify(dxpl_id, H5I_GENPROP_LST)))
@@ -3167,7 +3142,6 @@ H5C_protect(H5F_t * f,
}
entry_ptr = (H5C_cache_entry_t *)thing;
-
entry_ptr->ring = ring;
/* Apply tag to newly protected entry */
@@ -3274,20 +3248,16 @@ H5C_protect(H5F_t * f,
*
* *******************************************
*
- * Set the flush_last (and possibly flush_collectively) fields
+ * Set the flush_last field
* of the newly loaded entry before inserting it into the
* index. Must do this, as the index tracked the number of
* entries with the flush_last field set, but assumes that
* the field will not change after insertion into the index.
*
- * Note that this means that the H5C__FLUSH_LAST_FLAG and
- * H5C__FLUSH_COLLECTIVELY_FLAG flags are ignored if the
- * entry is already in cache.
+ * Note that this means that the H5C__FLUSH_LAST_FLAG flag
+ * is ignored if the entry is already in cache.
*/
entry_ptr->flush_me_last = flush_last;
-#ifdef H5_HAVE_PARALLEL
- entry_ptr->flush_me_collectively = flush_collectively;
-#endif
H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, NULL)
@@ -3426,11 +3396,8 @@ done:
#if H5C_DO_EXTREME_SANITY_CHECKS
if ( ( H5C_validate_protected_entry_list(cache_ptr) < 0 ) ||
( H5C_validate_pinned_entry_list(cache_ptr) < 0 ) ||
- ( H5C_validate_lru_list(cache_ptr) < 0 ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, \
- "an extreme sanity check failed on exit.\n");
- }
+ ( H5C_validate_lru_list(cache_ptr) < 0 ) )
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, "an extreme sanity check failed on exit.\n")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
FUNC_LEAVE_NOAPI(ret_value)
@@ -3769,23 +3736,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C_set_evictions_enabled(H5C_t *cache_ptr,
- hbool_t evictions_enabled)
+H5C_set_evictions_enabled(H5C_t *cache_ptr, hbool_t evictions_enabled)
{
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- if ( ( cache_ptr == NULL ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) {
-
+ if((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.")
- }
-
- if ( ( evictions_enabled != TRUE ) && ( evictions_enabled != FALSE ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Bad evictions_enabled on entry.")
- }
/* There is no fundamental reason why we should not permit
* evictions to be disabled while automatic resize is enabled.
@@ -3793,20 +3751,15 @@ H5C_set_evictions_enabled(H5C_t *cache_ptr,
* want to, and allowing it would greatly complicate testing
* the feature. Hence the following:
*/
- if ( ( evictions_enabled != TRUE ) &&
- ( ( cache_ptr->resize_ctl.incr_mode != H5C_incr__off ) ||
- ( cache_ptr->resize_ctl.decr_mode != H5C_decr__off ) ) ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "Can't disable evictions when auto resize enabled.")
- }
+ if((evictions_enabled != TRUE) &&
+ ((cache_ptr->resize_ctl.incr_mode != H5C_incr__off) ||
+ (cache_ptr->resize_ctl.decr_mode != H5C_decr__off)))
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't disable evictions when auto resize enabled.")
cache_ptr->evictions_enabled = evictions_enabled;
done:
-
FUNC_LEAVE_NOAPI(ret_value)
-
} /* H5C_set_evictions_enabled() */
@@ -5192,27 +5145,14 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
if ( (tests & H5C_RESIZE_CFG__VALIDATE_GENERAL) != 0 ) {
- if ( ( config_ptr->set_initial_size != TRUE ) &&
- ( config_ptr->set_initial_size != FALSE ) ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "set_initial_size must be either TRUE or FALSE");
- }
-
- if ( config_ptr->max_size > H5C__MAX_MAX_CACHE_SIZE ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "max_size too big");
- }
-
- if ( config_ptr->min_size < H5C__MIN_MAX_CACHE_SIZE ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size too small");
- }
+ if(config_ptr->max_size > H5C__MAX_MAX_CACHE_SIZE)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "max_size too big")
- if ( config_ptr->min_size > config_ptr->max_size ) {
+ if(config_ptr->min_size < H5C__MIN_MAX_CACHE_SIZE)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size too small")
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size > max_size");
- }
+ if(config_ptr->min_size > config_ptr->max_size)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size > max_size")
if ( ( config_ptr->set_initial_size ) &&
( ( config_ptr->initial_size < config_ptr->min_size ) ||
@@ -5251,25 +5191,12 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
if ( config_ptr->incr_mode == H5C_incr__threshold ) {
- if ( ( config_ptr->lower_hr_threshold < (double)0.0f ) ||
- ( config_ptr->lower_hr_threshold > (double)1.0f ) ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "lower_hr_threshold must be in the range [0.0, 1.0]");
- }
-
- if ( config_ptr->increment < (double)1.0f ) {
+ if((config_ptr->lower_hr_threshold < (double)0.0f) ||
+ (config_ptr->lower_hr_threshold > (double)1.0f))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "lower_hr_threshold must be in the range [0.0, 1.0]")
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "increment must be greater than or equal to 1.0");
- }
-
- if ( ( config_ptr->apply_max_increment != TRUE ) &&
- ( config_ptr->apply_max_increment != FALSE ) ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "apply_max_increment must be either TRUE or FALSE");
- }
+ if(config_ptr->increment < (double)1.0f)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "increment must be greater than or equal to 1.0")
/* no need to check max_increment, as it is a size_t,
* and thus must be non-negative.
@@ -5347,26 +5274,13 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
"epochs_before_eviction must be positive");
}
- if ( config_ptr->epochs_before_eviction > H5C__MAX_EPOCH_MARKERS ) {
+ if(config_ptr->epochs_before_eviction > H5C__MAX_EPOCH_MARKERS)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epochs_before_eviction too big")
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "epochs_before_eviction too big");
- }
-
- if ( ( config_ptr->apply_empty_reserve != TRUE ) &&
- ( config_ptr->apply_empty_reserve != FALSE ) ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "apply_empty_reserve must be either TRUE or FALSE");
- }
-
- if ( ( config_ptr->apply_empty_reserve ) &&
- ( ( config_ptr->empty_reserve > (double)1.0f ) ||
- ( config_ptr->empty_reserve < (double)0.0f ) ) ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "empty_reserve must be in the interval [0.0, 1.0]");
- }
+ if((config_ptr->apply_empty_reserve) &&
+ ((config_ptr->empty_reserve > (double)1.0f) ||
+ (config_ptr->empty_reserve < (double)0.0f)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "empty_reserve must be in the interval [0.0, 1.0]")
/* no need to check max_decrement as it is a size_t
* and thus must be non-negative.
@@ -6462,7 +6376,6 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * f,
prev_ptr = entry_ptr->prev;
if ( ! (entry_ptr->is_dirty) ) {
-
if(H5C__flush_single_entry(f, dxpl_id, entry_ptr, H5C__FLUSH_INVALIDATE_FLAG | H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG, NULL) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush clean entry")
}
@@ -7961,6 +7874,7 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_
hbool_t was_dirty;
haddr_t new_addr = HADDR_UNDEF;
haddr_t old_addr = HADDR_UNDEF;
+ haddr_t entry_addr = HADDR_UNDEF;
size_t new_len = 0;
size_t new_compressed_len = 0;
herr_t ret_value = SUCCEED; /* Return value */
@@ -8041,31 +7955,6 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_
entry_ptr->flush_in_progress = TRUE;
entry_ptr->flush_marker = FALSE;
-#ifdef H5_HAVE_PARALLEL
-#ifndef NDEBUG
- /* If MPI based VFD is used, do special parallel I/O sanity checks.
- * Note that we only do these sanity checks when the clear_only flag
- * is not set, and the entry to be flushed is dirty. Don't bother
- * otherwise as no file I/O can result.
- */
- if(!clear_only && entry_ptr->is_dirty && H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) {
- H5P_genplist_t *dxpl; /* Dataset transfer property list */
- unsigned coll_meta; /* Collective metadata write flag */
-
- /* Get the dataset transfer property list */
- if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id)))
- HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
-
- /* Get the collective metadata write property */
- if(H5P_get(dxpl, H5AC_COLLECTIVE_META_WRITE_NAME, &coll_meta) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't retrieve xfer mode")
-
- /* Sanity check collective metadata write flag */
- HDassert(coll_meta);
- } /* end if */
-#endif /* NDEBUG */
-#endif /* H5_HAVE_PARALLEL */
-
/* serialize the entry if necessary, and then write it to disk. */
if(write_entry) {
unsigned serialize_flags = H5C__SERIALIZE_NO_FLAGS_SET;
@@ -8494,6 +8383,10 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_
/* reset the flush_in progress flag */
entry_ptr->flush_in_progress = FALSE;
+ /* capture the cache entry address for the log_flush call at the
+ end before the entry_ptr gets freed */
+ entry_addr = entry_ptr->addr;
+
/* Internal cache data structures should now be up to date, and
* consistant with the status of the entry.
*
@@ -8605,7 +8498,7 @@ H5C__flush_single_entry(const H5F_t *f, hid_t dxpl_id, H5C_cache_entry_t *entry_
} /* if (destroy) */
if(cache_ptr->log_flush)
- if((cache_ptr->log_flush)(cache_ptr, entry_ptr->addr, was_dirty, flags) < 0)
+ if((cache_ptr->log_flush)(cache_ptr, entry_addr, was_dirty, flags) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "log_flush callback failed.")
done:
@@ -8843,7 +8736,7 @@ H5C_load_entry(H5F_t * f,
#endif /* H5C_DO_MEMORY_SANITY_CHECKS */
/* Get the on-disk entry image */
- if ( 0 == (type->flags & H5C__CLASS_SKIP_READS) ) {
+ if(0 == (type->flags & H5C__CLASS_SKIP_READS)) {
unsigned tries, max_tries; /* The # of read attempts */
unsigned retries; /* The # of retries */
htri_t chk_ret; /* return from verify_chksum callback */
diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c
index 6b63ad5..6e8d94c 100644
--- a/src/H5Cmpio.c
+++ b/src/H5Cmpio.c
@@ -386,7 +386,7 @@ H5C_apply_candidate_list(H5F_t * f,
* Now scan the LRU and PEL lists, flushing or clearing entries as
* needed.
*
- * The flush_me_last and flush_me_collectively flags may dictate how or
+ * The flush_me_last flag may dictate how or
* when some entries can be flushed, and should be addressed here.
* However, in their initial implementation, these flags only apply to the
* superblock, so there's only a relatively small change to this function
@@ -607,11 +607,10 @@ H5C_apply_candidate_list(H5F_t * f,
it is the simple case of a single pinned entry needing
flushed last and collectively is just a minor addition to
this routine, but signficantly buffing up the usage of
- flush_me_last or flush_me_collectively will require a more
+ flush_me_last will require a more
intense rework of this function and potentially the function
of candidate lists as a whole. */
- HDassert(entry_ptr->flush_me_collectively);
entries_to_flush_or_clear_last++;
entries_to_flush_collectively++;
HDassert(entries_to_flush_or_clear_last == 1);
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index 467c5d1..f4df00f 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -1487,13 +1487,10 @@ typedef int H5C_ring_t;
* flushed from the cache until all other entries without
* the flush_me_last flag set have been flushed.
*
- * flush_me_collectively: Boolean flag indicating that this entry needs
- * to be flushed collectively when in a parallel situation.
- *
* Note:
*
- * At this time, the flush_me_last and flush_me_collectively
- * flags will only be applied to one entry, the superblock,
+ * At this time, the flush_me_last
+ * flag will only be applied to one entry, the superblock,
* and the code utilizing these flags is protected with HDasserts
* to enforce this. This restraint can certainly be relaxed in
* the future if the the need for multiple entries getting flushed
@@ -1711,7 +1708,6 @@ typedef struct H5C_cache_entry_t {
hbool_t flush_marker;
hbool_t flush_me_last;
#ifdef H5_HAVE_PARALLEL
- hbool_t flush_me_collectively;
hbool_t clear_on_unprotect;
hbool_t flush_immediately;
#endif /* H5_HAVE_PARALLEL */
diff --git a/src/H5D.c b/src/H5D.c
index b1643d1..ee8bb48 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -109,6 +109,7 @@ H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
H5G_loc_t loc; /* Object location to insert dataset into */
H5D_t *dset = NULL; /* New dataset's info */
const H5S_t *space; /* Dataspace for dataset */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
hid_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -137,15 +138,12 @@ H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
if(TRUE != H5P_isa_class(dcpl_id, H5P_DATASET_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset create property list ID")
- /* Get correct property list */
- if(H5P_DEFAULT == dapl_id)
- dapl_id = H5P_DATASET_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(dapl_id, H5P_DATASET_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset access property list")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&dapl_id, H5P_CLS_DACC, &dxpl_id, loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Create the new dataset & get its ID */
- if(NULL == (dset = H5D__create_named(&loc, name, type_id, space, lcpl_id, dcpl_id, dapl_id, H5AC_dxpl_id)))
+ if(NULL == (dset = H5D__create_named(&loc, name, type_id, space, lcpl_id, dcpl_id, dapl_id, dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset")
if((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register dataset")
@@ -201,6 +199,7 @@ H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id,
H5G_loc_t loc; /* Object location to insert dataset into */
H5D_t *dset = NULL; /* New dataset's info */
const H5S_t *space; /* Dataspace for dataset */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
hid_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -219,15 +218,12 @@ H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id,
if(TRUE != H5P_isa_class(dcpl_id, H5P_DATASET_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset create property list ID")
- /* Get correct property list */
- if(H5P_DEFAULT == dapl_id)
- dapl_id = H5P_DATASET_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(dapl_id, H5P_DATASET_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset access property list")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&dapl_id, H5P_CLS_DACC, &dxpl_id, loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* build and open the new dataset */
- if(NULL == (dset = H5D__create(loc.oloc->file, type_id, space, dcpl_id, dapl_id, H5AC_dxpl_id)))
+ if(NULL == (dset = H5D__create(loc.oloc->file, type_id, space, dcpl_id, dapl_id, dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset")
/* Register the new dataset to get an ID for it */
@@ -244,7 +240,7 @@ done:
HDONE_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get object location of dataset")
/* Decrement refcount on dataset's object header in memory */
- if(H5O_dec_rc_by_loc(oloc, H5AC_dxpl_id) < 0)
+ if(H5O_dec_rc_by_loc(oloc, dxpl_id) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to decrement refcount on newly created object")
} /* end if */
@@ -279,7 +275,7 @@ H5Dopen2(hid_t loc_id, const char *name, hid_t dapl_id)
{
H5D_t *dset = NULL;
H5G_loc_t loc; /* Object location of group */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* dxpl to use to open datset */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl to use to open datset */
hid_t ret_value;
FUNC_ENTER_API(FAIL)
@@ -291,12 +287,9 @@ H5Dopen2(hid_t loc_id, const char *name, hid_t dapl_id)
if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- /* Get correct property list */
- if(H5P_DEFAULT == dapl_id)
- dapl_id = H5P_DATASET_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(dapl_id, H5P_DATASET_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset access property list")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&dapl_id, H5P_CLS_DACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Open the dataset */
if(NULL == (dset = H5D__open_name(&loc, name, dapl_id, dxpl_id)))
@@ -310,7 +303,6 @@ done:
if(ret_value < 0)
if(dset && H5D_close(dset) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset")
-
FUNC_LEAVE_API(ret_value)
} /* end H5Dopen2() */
@@ -418,7 +410,7 @@ H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
/* Read dataspace address and return */
- if(H5D__get_space_status(dset, allocation, H5AC_ind_dxpl_id) < 0)
+ if(H5D__get_space_status(dset, allocation, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get space status")
done:
@@ -587,7 +579,7 @@ H5Dget_storage_size(hid_t dset_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a dataset")
/* Set return value */
- if(H5D__get_storage_size(dset, H5AC_ind_dxpl_id, &ret_value) < 0)
+ if(H5D__get_storage_size(dset, H5AC_dxpl_id, &ret_value) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't get size of dataset's storage")
done:
@@ -1001,7 +993,11 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Dformat_convert (Internal)
*
- * Purpose: Convert a dataset's chunk indexing type to version 1 B-tree
+ * Purpose: For chunked:
+ * Convert the chunk indexing type to version 1 B-tree if not
+ * For compact/contiguous:
+ * Downgrade layout version to 3 if greater than 3
+ * For virtual: no conversion
*
* Return: Non-negative on success, negative on failure
*
@@ -1022,17 +1018,31 @@ H5Dformat_convert(hid_t dset_id)
if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
- /* Nothing to do if not a chunked dataset */
- if(dset->shared->layout.type != H5D_CHUNKED)
- HGOTO_DONE(SUCCEED)
-
- /* Nothing to do if the chunk indexing type is already version 1 B-tree */
- if(dset->shared->layout.u.chunk.idx_type == H5D_CHUNK_IDX_BTREE)
- HGOTO_DONE(SUCCEED)
-
- /* Call private function to do the conversion */
- if((H5D__format_convert(dset, H5AC_dxpl_id)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTLOAD, FAIL, "unable to convert chunk indexing type for dataset")
+ switch(dset->shared->layout.type) {
+ case H5D_CHUNKED:
+ /* Convert the chunk indexing type to version 1 B-tree if not */
+ if(dset->shared->layout.u.chunk.idx_type != H5D_CHUNK_IDX_BTREE) {
+ if((H5D__format_convert(dset, H5AC_dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTLOAD, FAIL, "unable to downgrade chunk indexing type for dataset")
+ }
+ break;
+
+ case H5D_CONTIGUOUS:
+ case H5D_COMPACT:
+ /* Downgrade the layout version to 3 if greater than 3 */
+ if(dset->shared->layout.version > H5O_LAYOUT_VERSION_DEFAULT) {
+ if((H5D__format_convert(dset, H5AC_dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTLOAD, FAIL, "unable to downgrade layout version for dataset")
+ }
+ break;
+
+ case H5D_VIRTUAL:
+ /* Nothing to do even though layout is version 4 */
+ break;
+
+ default:
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unknown dataset layout type")
+ } /* end switch */
done:
FUNC_LEAVE_API(ret_value)
diff --git a/src/H5Dbtree2.c b/src/H5Dbtree2.c
index 8d005fd..2435fac 100644
--- a/src/H5Dbtree2.c
+++ b/src/H5Dbtree2.c
@@ -90,8 +90,6 @@ static void *H5D__bt2_crt_context(void *udata);
static herr_t H5D__bt2_dst_context(void *ctx);
static herr_t H5D__bt2_store(void *native, const void *udata);
static herr_t H5D__bt2_compare(const void *rec1, const void *rec2);
-static void *H5D__bt2_crt_dbg_context(H5F_t *f, hid_t dxpl_id, haddr_t obj_addr);
-static herr_t H5D__bt2_dst_dbg_context(void *_u_ctx);
/* v2 B-tree class for indexing non-filtered chunked datasets */
static herr_t H5D__bt2_unfilt_encode(uint8_t *raw, const void *native, void *ctx);
@@ -189,9 +187,7 @@ const H5B2_class_t H5D_BT2[1] = {{ /* B-tree class information */
H5D__bt2_compare, /* Record comparison callback */
H5D__bt2_unfilt_encode, /* Record encoding callback */
H5D__bt2_unfilt_decode, /* Record decoding callback */
- H5D__bt2_unfilt_debug, /* Record debugging callback */
- H5D__bt2_crt_dbg_context, /* Create debugging context */
- H5D__bt2_dst_dbg_context /* Destroy debugging context */
+ H5D__bt2_unfilt_debug /* Record debugging callback */
}};
/* v2 B-tree class for indexing filtered chunked datasets */
@@ -205,9 +201,7 @@ const H5B2_class_t H5D_BT2_FILT[1] = {{ /* B-tree class information */
H5D__bt2_compare, /* Record comparison callback */
H5D__bt2_filt_encode, /* Record encoding callback */
H5D__bt2_filt_decode, /* Record decoding callback */
- H5D__bt2_filt_debug, /* Record debugging callback */
- H5D__bt2_crt_dbg_context, /* Create debugging context */
- H5D__bt2_dst_dbg_context /* Destroy debugging context */
+ H5D__bt2_filt_debug /* Record debugging callback */
}};
@@ -377,110 +371,6 @@ H5D__bt2_compare(const void *_udata, const void *_rec2)
/*-------------------------------------------------------------------------
- * Function: H5D__bt2_crt_dbg_context
- *
- * Purpose: Create user data for debugged callback context
- *
- * Return: Success: non-NULL
- * Failure: NULL
- *
- * Programmer: Vailin Choi; June 2010
- *
- *-------------------------------------------------------------------------
- */
-static void *
-H5D__bt2_crt_dbg_context(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t obj_addr)
-{
- H5D_bt2_ctx_ud_t *u_ctx = NULL; /* User data for creating callback context */
- H5O_loc_t obj_loc; /* Pointer to an object's location */
- hbool_t obj_opened = FALSE; /* Flag to indicate that the object header was opened */
- H5O_layout_t layout; /* Layout message */
- void *ret_value = NULL; /* Return value */
-
- FUNC_ENTER_STATIC
-
- /* Sanity check */
- HDassert(f);
- HDassert(H5F_addr_defined(obj_addr));
-
- /* Set up the object header location info */
- H5O_loc_reset(&obj_loc);
- obj_loc.file = f;
- obj_loc.addr = obj_addr;
-
- /* Open the object header where the layout message resides */
- if(H5O_open(&obj_loc) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, NULL, "can't open object header")
- obj_opened = TRUE;
-
- /* Read the layout message */
- if(NULL == H5O_msg_read(&obj_loc, H5O_LAYOUT_ID, &layout, dxpl_id))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, NULL, "can't get layout info")
-
- /* close the object header */
- if(H5O_close(&obj_loc) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, NULL, "can't close object header")
-
- /* Allocate structure for storing user data to create callback context */
- if(NULL == (u_ctx = H5FL_MALLOC(H5D_bt2_ctx_ud_t)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate user data context structure ")
-
- /* Set information for context structure */
- u_ctx->f = f;
- u_ctx->chunk_size = layout.u.chunk.size;
- u_ctx->ndims = layout.u.chunk.ndims - 1;
-
- /* Set return value */
- ret_value = u_ctx;
-
-done:
- /* Cleanup on error */
- if(ret_value == NULL) {
- /* Release context structure */
- if(u_ctx)
- u_ctx = H5FL_FREE(H5D_bt2_ctx_ud_t, u_ctx);
-
- /* Close object header */
- if(obj_opened) {
- if(H5O_close(&obj_loc) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, NULL, "can't close object header")
- } /* end if */
- } /* end if */
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5D__bt2_crt_dbg_context() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5D__bt2_dst_dbg_context
- *
- * Purpose: Destroy client callback context
- *
- * Return: Success: non-negative
- * Failure: negative
- *
- * Programmer: Vailin Choi; June 2010
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5D__bt2_dst_dbg_context(void *_u_ctx)
-{
- H5D_bt2_ctx_ud_t *u_ctx = (H5D_bt2_ctx_ud_t *)_u_ctx; /* User data for creating callback context */
-
- FUNC_ENTER_STATIC_NOERR
-
- /* Sanity check */
- HDassert(u_ctx);
-
- /* Release user data for creating callback context */
- u_ctx = H5FL_FREE(H5D_bt2_ctx_ud_t, u_ctx);
-
- FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5D__bt2_dst_dbg_context() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5D__bt2_unfilt_encode
*
* Purpose: Encode native information into raw form for storing on disk
@@ -565,23 +455,24 @@ H5D__bt2_unfilt_decode(const uint8_t *raw, void *_record, void *_ctx)
*/
static herr_t
H5D__bt2_unfilt_debug(FILE *stream, int indent, int fwidth,
- const void *_record, const void *_u_ctx)
+ const void *_record, const void *_ctx)
{
const H5D_chunk_rec_t *record = (const H5D_chunk_rec_t *)_record; /* The native record */
- const H5D_bt2_ctx_ud_t *u_ctx = (const H5D_bt2_ctx_ud_t *)_u_ctx; /* User data for creating callback context */
+ const H5D_bt2_ctx_t *ctx = (const H5D_bt2_ctx_t *)_ctx; /* Callback context */
unsigned u; /* Local index variable */
FUNC_ENTER_STATIC_NOERR
/* Sanity checks */
HDassert(record);
- HDassert(u_ctx->chunk_size == record->nbytes);
+ HDassert(ctx->chunk_size == record->nbytes);
HDassert(0 == record->filter_mask);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Chunk address:", record->chunk_addr);
+
HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
- for(u = 0; u < u_ctx->ndims; u++)
- HDfprintf(stream, "%s%Hd", u?", ":"", record->scaled[u] * u_ctx->dim[u]);
+ for(u = 0; u < ctx->ndims; u++)
+ HDfprintf(stream, "%s%Hd", u?", ":"", record->scaled[u] * ctx->dim[u]);
HDfputs("}\n", stream);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -671,7 +562,7 @@ H5D__bt2_filt_decode(const uint8_t *raw, void *_record, void *_ctx)
/*-------------------------------------------------------------------------
* Function: H5D__bt2_filt_debug
*
- * Purpose: Debug native form of record (filterd)
+ * Purpose: Debug native form of record (filtered)
*
* Return: Success: non-negative
* Failure: negative
@@ -682,10 +573,10 @@ H5D__bt2_filt_decode(const uint8_t *raw, void *_record, void *_ctx)
*/
static herr_t
H5D__bt2_filt_debug(FILE *stream, int indent, int fwidth,
- const void *_record, const void *_u_ctx)
+ const void *_record, const void *_ctx)
{
const H5D_chunk_rec_t *record = (const H5D_chunk_rec_t *)_record; /* The native record */
- const H5D_bt2_ctx_ud_t *u_ctx = (const H5D_bt2_ctx_ud_t *)_u_ctx; /* User data for creating callback context */
+ const H5D_bt2_ctx_t *ctx = (const H5D_bt2_ctx_t *)_ctx; /* Callback context */
unsigned u; /* Local index variable */
FUNC_ENTER_STATIC_NOERR
@@ -700,8 +591,8 @@ H5D__bt2_filt_debug(FILE *stream, int indent, int fwidth,
HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", record->filter_mask);
HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:");
- for(u = 0; u < u_ctx->ndims; u++)
- HDfprintf(stream, "%s%Hd", u?", ":"", record->scaled[u] * u_ctx->dim[u]);
+ for(u = 0; u < ctx->ndims; u++)
+ HDfprintf(stream, "%s%Hd", u?", ":"", record->scaled[u] * ctx->dim[u]);
HDfputs("}\n", stream);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -963,9 +854,23 @@ H5D__bt2_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
static herr_t
H5D__bt2_mod_cb(void *_record, void *_op_data, hbool_t *changed)
{
+ H5D_bt2_ud_t *op_data = (H5D_bt2_ud_t *)_op_data; /* User data for v2 B-tree calls */
+ H5D_chunk_rec_t *record = (H5D_chunk_rec_t *)_record; /* Chunk record */
+
FUNC_ENTER_STATIC_NOERR
- *(H5D_chunk_rec_t *)_record = *(H5D_chunk_rec_t *)_op_data;
+/* Sanity check */
+#ifndef NDEBUG
+{
+ unsigned u; /* Local index variable */
+
+ for(u = 0; u < op_data->ndims; u++)
+ HDassert(record->scaled[u] == op_data->rec.scaled[u]);
+}
+#endif /* NDEBUG */
+
+ /* Modify record */
+ *record = op_data->rec;
/* Note that the record changed */
*changed = TRUE;
@@ -1038,18 +943,9 @@ H5D__bt2_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata,
for(u = 0; u < (idx_info->layout->ndims - 1); u++)
bt2_udata.rec.scaled[u] = udata->common.scaled[u];
- if(udata->need_modify) {
- HDassert(idx_info->pline->nused > 0);
-
- /* Modify record for v2 B-tree */
- if(H5B2_modify(bt2, idx_info->dxpl_id, &bt2_udata, H5D__bt2_mod_cb, &bt2_udata.rec) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to modify record in v2 B-tree")
- } /* end if */
- else {
- /* Insert record for object in v2 B-tree */
- if(H5B2_insert(bt2, idx_info->dxpl_id, &bt2_udata) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "couldn't insert record in v2 B-tree")
- } /* end else */
+ /* Update record for v2 B-tree (could be insert or modify) */
+ if(H5B2_update(bt2, idx_info->dxpl_id, &bt2_udata, H5D__bt2_mod_cb, &bt2_udata) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTUPDATE, FAIL, "unable to update record in v2 B-tree")
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 201882b..612b419 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -286,8 +286,8 @@ static herr_t H5D__chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id,
const H5D_dxpl_cache_t *dxpl_cache, H5D_rdcc_ent_t *ent, hbool_t reset);
static herr_t H5D__chunk_cache_evict(const H5D_t *dset, hid_t dxpl_id,
const H5D_dxpl_cache_t *dxpl_cache, H5D_rdcc_ent_t *ent, hbool_t flush);
-static hbool_t H5D__chunk_is_partial_edge_chunk(const hsize_t *chunk_scaled,
- unsigned dset_ndims, const hsize_t *dset_dims, const uint32_t *chunk_dims);
+static hbool_t H5D__chunk_is_partial_edge_chunk(unsigned dset_ndims,
+ const uint32_t *chunk_dims, const hsize_t *chunk_scaled, const hsize_t *dset_dims);
static void *H5D__chunk_lock(const H5D_io_info_t *io_info,
H5D_chunk_ud_t *udata, hbool_t relax, hbool_t prev_unfilt_chunk);
static herr_t H5D__chunk_unlock(const H5D_io_info_t *io_info,
@@ -297,8 +297,8 @@ static herr_t H5D__chunk_cache_prune(const H5D_t *dset, hid_t dxpl_id,
const H5D_dxpl_cache_t *dxpl_cache, size_t size);
static herr_t H5D__chunk_prune_fill(H5D_chunk_it_ud1_t *udata, hbool_t new_unfilt_chunk);
static herr_t H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info,
- const H5F_block_t *old_chunk, H5F_block_t *new_chunk, hbool_t *need_insert,
- hbool_t *need_bt2_modify, hsize_t scaled[]);
+ const H5F_block_t *old_chunk, H5F_block_t *new_chunk, hbool_t *need_insert,
+ hsize_t scaled[]);
#ifdef H5_HAVE_PARALLEL
static herr_t H5D__chunk_collective_fill(const H5D_t *dset, hid_t dxpl_id,
H5D_chunk_coll_info_t *chunk_info, size_t chunk_size, const void *fill_buf);
@@ -431,7 +431,7 @@ H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters,
/* Create the chunk it if it doesn't exist, or reallocate the chunk
* if its size changed.
*/
- if(H5D__chunk_file_alloc(&idx_info, &old_chunk, &udata.chunk_block, &need_insert, &udata.need_modify, scaled) < 0)
+ if(H5D__chunk_file_alloc(&idx_info, &old_chunk, &udata.chunk_block, &need_insert, scaled) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate chunk")
/* Make sure the address of the chunk is returned. */
@@ -458,7 +458,7 @@ H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters,
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write raw data to file")
/* Insert the chunk record into the index */
- if((need_insert || udata.need_modify) && layout->storage.u.chunk.ops->insert) {
+ if(need_insert && layout->storage.u.chunk.ops->insert) {
/* Set the chunk's filter mask to the new settings */
udata.filter_mask = filters;
@@ -570,11 +570,13 @@ herr_t
H5D__chunk_set_sizes(H5D_t *dset)
{
uint64_t chunk_size; /* Size of chunk in bytes */
+ unsigned max_enc_bytes_per_dim; /* Max. number of bytes required to encode this dimension */
unsigned u; /* Iterator */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
+ /* Sanity checks */
HDassert(dset);
/* Increment # of chunk dimensions, to account for datatype size as last element */
@@ -583,6 +585,21 @@ H5D__chunk_set_sizes(H5D_t *dset)
/* Set the last dimension of the chunk size to the size of the datatype */
dset->shared->layout.u.chunk.dim[dset->shared->layout.u.chunk.ndims - 1] = (uint32_t)H5T_GET_SIZE(dset->shared->type);
+ /* Compute number of bytes to use for encoding chunk dimensions */
+ max_enc_bytes_per_dim = 0;
+ for(u = 0; u < (unsigned)dset->shared->layout.u.chunk.ndims; u++) {
+ unsigned enc_bytes_per_dim; /* Number of bytes required to encode this dimension */
+
+ /* Get encoded size of dim, in bytes */
+ enc_bytes_per_dim = (H5VM_log2_gen(dset->shared->layout.u.chunk.dim[u]) + 8) / 8;
+
+ /* Check if this is the largest value so far */
+ if(enc_bytes_per_dim > max_enc_bytes_per_dim)
+ max_enc_bytes_per_dim = enc_bytes_per_dim;
+ } /* end for */
+ HDassert(max_enc_bytes_per_dim > 0 && max_enc_bytes_per_dim <= 8);
+ dset->shared->layout.u.chunk.enc_bytes_per_dim = max_enc_bytes_per_dim;
+
/* Compute and store the total size of a chunk */
/* (Use 64-bit value to ensure that we can detect >4GB chunks) */
for(u = 1, chunk_size = (uint64_t)dset->shared->layout.u.chunk.dim[0]; u < dset->shared->layout.u.chunk.ndims; u++)
@@ -1820,11 +1837,12 @@ htri_t
H5D__chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr, hbool_t write_op)
{
const H5D_t *dataset = io_info->dset; /* Local pointer to dataset info */
- hbool_t no_filters = TRUE;
+ hbool_t has_filters = FALSE; /* Whether there are filters on the chunk or not */
htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_PACKAGE
+ /* Sanity check */
HDassert(io_info);
HDassert(dataset);
@@ -1834,16 +1852,19 @@ H5D__chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr, hbool_t write_
if(dataset->shared->dcpl_cache.pline.nused > 0) {
if(dataset->shared->layout.u.chunk.flags
& H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS) {
- no_filters = H5D__chunk_is_partial_edge_chunk(
- io_info->store->chunk.scaled, io_info->dset->shared->ndims,
- io_info->dset->shared->curr_dims,
- io_info->dset->shared->layout.u.chunk.dim);
+ has_filters = !H5D__chunk_is_partial_edge_chunk(
+ io_info->dset->shared->ndims,
+ io_info->dset->shared->layout.u.chunk.dim,
+ io_info->store->chunk.scaled,
+ io_info->dset->shared->curr_dims);
} /* end if */
else
- no_filters = FALSE;
+ has_filters = TRUE;
} /* end if */
- if(no_filters) {
+ if(has_filters)
+ ret_value = TRUE;
+ else {
#ifdef H5_HAVE_PARALLEL
/* If MPI based VFD is used and the file is opened for write access, must
* bypass the chunk-cache scheme because other MPI processes could
@@ -1884,9 +1905,7 @@ H5D__chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr, hbool_t write_
#ifdef H5_HAVE_PARALLEL
} /* end else */
#endif /* H5_HAVE_PARALLEL */
- } /* end if */
- else
- ret_value = TRUE;
+ } /* end else */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -2162,7 +2181,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
udata.chunk_block.length = io_info->dset->shared->layout.u.chunk.size;
/* Allocate the chunk */
- if(H5D__chunk_file_alloc(&idx_info, NULL, &udata.chunk_block, &need_insert, &udata.need_modify, chunk_info->scaled) < 0)
+ if(H5D__chunk_file_alloc(&idx_info, NULL, &udata.chunk_block, &need_insert, chunk_info->scaled) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level")
/* Make sure the address of the chunk is returned. */
@@ -2194,7 +2213,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk")
} /* end if */
else {
- if((need_insert || udata.need_modify) && io_info->dset->shared->layout.storage.u.chunk.ops->insert)
+ if(need_insert && io_info->dset->shared->layout.storage.u.chunk.ops->insert)
if((io_info->dset->shared->layout.storage.u.chunk.ops->insert)(&idx_info, &udata, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index")
} /* end else */
@@ -2639,13 +2658,14 @@ H5D__chunk_lookup(const H5D_t *dset, hid_t dxpl_id, const hsize_t *scaled,
H5D_chunk_ud_t *udata)
{
H5D_rdcc_ent_t *ent = NULL; /* Cache entry */
- hbool_t found = FALSE; /* In cache? */
- unsigned u; /* Counter */
H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk);
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned idx; /* Index of chunk in cache, if present */
+ hbool_t found = FALSE; /* In cache? */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
+ /* Sanity checks */
HDassert(dset);
HDassert(dset->shared->layout.u.chunk.ndims > 0);
H5D_CHUNK_STORAGE_INDEX_CHK(sc);
@@ -2655,30 +2675,39 @@ H5D__chunk_lookup(const H5D_t *dset, hid_t dxpl_id, const hsize_t *scaled,
/* Initialize the query information about the chunk we are looking for */
udata->common.layout = &(dset->shared->layout.u.chunk);
udata->common.storage = &(dset->shared->layout.storage.u.chunk);
- udata->common.scaled = scaled;
+ udata->common.scaled = scaled;
/* Reset information about the chunk we are looking for */
udata->chunk_block.offset = HADDR_UNDEF;
udata->chunk_block.length = 0;
udata->filter_mask = 0;
udata->new_unfilt_chunk = FALSE;
- udata->need_modify = FALSE;
/* Check for chunk in cache */
if(dset->shared->cache.chunk.nslots > 0) {
- udata->idx_hint = H5D__chunk_hash_val(dset->shared, scaled);
- ent = dset->shared->cache.chunk.slot[udata->idx_hint];
+ /* Determine the chunk's location in the hash table */
+ idx = H5D__chunk_hash_val(dset->shared, scaled);
- if(ent)
- for(u = 0, found = TRUE; u < dset->shared->ndims; u++)
+ /* Get the chunk cache entry for that location */
+ ent = dset->shared->cache.chunk.slot[idx];
+ if(ent) {
+ unsigned u; /* Counter */
+
+ /* Speculatively set the 'found' flag */
+ found = TRUE;
+
+ /* Verify that the cache entry is the correct chunk */
+ for(u = 0; u < dset->shared->ndims; u++)
if(scaled[u] != ent->scaled[u]) {
found = FALSE;
break;
} /* end if */
+ } /* end if */
} /* end if */
- /* Find chunk addr */
+ /* Retrieve chunk addr */
if(found) {
+ udata->idx_hint = idx;
udata->chunk_block.offset = ent->chunk_block.offset;
udata->chunk_block.length = ent->chunk_block.length;;
udata->chunk_idx = ent->chunk_idx;
@@ -2760,7 +2789,6 @@ H5D__chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t
udata.chunk_block.length = dset->shared->layout.u.chunk.size;
udata.filter_mask = 0;
udata.chunk_idx = ent->chunk_idx;
- udata.need_modify = FALSE;
/* Should the chunk be filtered before writing it to disk? */
if(dset->shared->dcpl_cache.pline.nused
@@ -2838,7 +2866,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t
/* Create the chunk it if it doesn't exist, or reallocate the chunk
* if its size changed.
*/
- if(H5D__chunk_file_alloc(&idx_info, &(ent->chunk_block), &udata.chunk_block, &need_insert, &udata.need_modify, ent->scaled) < 0)
+ if(H5D__chunk_file_alloc(&idx_info, &(ent->chunk_block), &udata.chunk_block, &need_insert, ent->scaled) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level")
/* Update the chunk entry's info, in case it was allocated or relocated */
@@ -2853,7 +2881,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, hid_t dxpl_id, const H5D_dxpl_cache_t
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write raw data to file")
/* Insert the chunk record into the index */
- if((need_insert || udata.need_modify) && dset->shared->layout.storage.u.chunk.ops->insert)
+ if(need_insert && dset->shared->layout.storage.u.chunk.ops->insert)
if((dset->shared->layout.storage.u.chunk.ops->insert)(&idx_info, &udata, dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index")
@@ -3281,9 +3309,9 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
else if(layout->u.chunk.flags
& H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS) {
/* Check if this is an edge chunk */
- if(H5D__chunk_is_partial_edge_chunk(
- io_info->store->chunk.scaled, io_info->dset->shared->ndims,
- io_info->dset->shared->curr_dims, layout->u.chunk.dim)) {
+ if(H5D__chunk_is_partial_edge_chunk(io_info->dset->shared->ndims,
+ layout->u.chunk.dim, io_info->store->chunk.scaled,
+ io_info->dset->shared->curr_dims)) {
/* Disable the filters for both writing and reading */
disable_filters = TRUE;
old_pline = NULL;
@@ -3291,8 +3319,6 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
} /* end if */
} /* end if */
} /* end if */
- else
- HDassert(!udata->new_unfilt_chunk && !prev_unfilt_chunk);
if(relax) {
/*
@@ -3520,6 +3546,7 @@ H5D__chunk_unlock(const H5D_io_info_t *io_info, const H5D_chunk_ud_t *udata,
FUNC_ENTER_STATIC
+ /* Sanity check */
HDassert(io_info);
HDassert(udata);
@@ -3527,24 +3554,20 @@ H5D__chunk_unlock(const H5D_io_info_t *io_info, const H5D_chunk_ud_t *udata,
/*
* It's not in the cache, probably because it's too big. If it's
* dirty then flush it to disk. In any case, free the chunk.
- * Note: we have to copy the layout and filter messages so we
- * don't discard the `const' qualifier.
*/
hbool_t is_unfiltered_edge_chunk = FALSE; /* Whether the chunk is an unfiltered edge chunk */
/* Check if we should disable filters on this chunk */
if(udata->new_unfilt_chunk) {
- HDassert(layout->u.chunk.flags
- & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
+ HDassert(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS);
is_unfiltered_edge_chunk = TRUE;
} /* end if */
- else if(layout->u.chunk.flags
- & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS) {
+ else if(layout->u.chunk.flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS) {
/* Check if the chunk is an edge chunk, and disable filters if so */
is_unfiltered_edge_chunk = H5D__chunk_is_partial_edge_chunk(
- io_info->store->chunk.scaled, io_info->dset->shared->ndims,
- io_info->dset->shared->curr_dims, layout->u.chunk.dim);
+ io_info->dset->shared->ndims, layout->u.chunk.dim,
+ io_info->store->chunk.scaled, io_info->dset->shared->curr_dims);
} /* end if */
if(dirty) {
@@ -3557,7 +3580,6 @@ H5D__chunk_unlock(const H5D_io_info_t *io_info, const H5D_chunk_ud_t *udata,
if(udata->new_unfilt_chunk)
fake_ent.edge_chunk_state |= H5D_RDCC_NEWLY_DISABLED_FILTERS;
HDmemcpy(fake_ent.scaled, udata->common.scaled, sizeof(hsize_t) * layout->u.chunk.ndims);
- HDmemcpy(fake_ent.scaled, udata->common.scaled, sizeof(hsize_t) * layout->u.chunk.ndims);
HDassert(layout->u.chunk.size > 0);
fake_ent.chunk_idx = udata->chunk_idx;
fake_ent.chunk_block.offset = udata->chunk_block.offset;
@@ -4014,10 +4036,9 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
udata.chunk_block.offset = HADDR_UNDEF;
H5_CHECKED_ASSIGN(udata.chunk_block.length, uint32_t, chunk_size, size_t);
udata.filter_mask = filter_mask;
- udata.need_modify = FALSE;
/* Allocate the chunk (with all processes) */
- if(H5D__chunk_file_alloc(&idx_info, NULL, &udata.chunk_block, &need_insert, &udata.need_modify, scaled) < 0)
+ if(H5D__chunk_file_alloc(&idx_info, NULL, &udata.chunk_block, &need_insert, scaled) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level")
HDassert(H5F_addr_defined(udata.chunk_block.offset));
@@ -4054,7 +4075,7 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
} /* end if */
/* Insert the chunk record into the index */
- if((need_insert || udata.need_modify) && ops->insert)
+ if(need_insert && ops->insert)
if((ops->insert)(&idx_info, &udata, dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index")
@@ -4074,7 +4095,7 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
&& scaled[i] < edge_chunk_scaled[i]) {
nunfilt_edge_chunk_dims--;
if(should_fill && nunfilt_edge_chunk_dims == 0 && !fb_info.has_vlen_fill_type) {
- HDassert(!H5D__chunk_is_partial_edge_chunk(scaled, space_ndims, space_dim, chunk_dim));
+ HDassert(!H5D__chunk_is_partial_edge_chunk(space_ndims, chunk_dim, scaled, space_dim));
fill_buf = &fb_info.fill_buf;
chunk_size = orig_chunk_size;
} /* end if */
@@ -4086,7 +4107,7 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
HDassert(edge_chunk_scaled[i] == max_unalloc[i]);
nunfilt_edge_chunk_dims++;
if(should_fill && nunfilt_edge_chunk_dims == 1 && !fb_info.has_vlen_fill_type) {
- HDassert(H5D__chunk_is_partial_edge_chunk(scaled, space_ndims, space_dim, chunk_dim));
+ HDassert(H5D__chunk_is_partial_edge_chunk(space_ndims, chunk_dim, scaled, space_dim));
fill_buf = &unfilt_fill_buf;
chunk_size = layout->u.chunk.size;
} /* end if */
@@ -4260,8 +4281,8 @@ H5D__chunk_update_old_edge_chunks(H5D_t *dset, hid_t dxpl_id, hsize_t old_dim[])
int i; /* Local index variable */
/* Make sure the chunk is really a former edge chunk */
- HDassert(H5D__chunk_is_partial_edge_chunk(chunk_sc, space_ndims, old_dim, chunk_dim)
- && !H5D__chunk_is_partial_edge_chunk(chunk_sc, space_ndims, space_dim, chunk_dim));
+ HDassert(H5D__chunk_is_partial_edge_chunk(space_ndims, chunk_dim, chunk_sc, old_dim)
+ && !H5D__chunk_is_partial_edge_chunk(space_ndims, chunk_dim, chunk_sc, space_dim));
/* Lookup the chunk */
if(H5D__chunk_lookup(dset, dxpl_id, chunk_sc, &chk_udata) < 0)
@@ -4802,7 +4823,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim)
/* Determine if partial edge chunk filters are disabled */
disable_edge_filters = (layout->u.chunk.flags
- & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS)
+ & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS)
&& (idx_info.pline->nused > 0);
/*
@@ -4836,8 +4857,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim)
/* If necessary, check if chunks in this dimension that need to
* be filled are new partial edge chunks */
- if(disable_edge_filters && old_dim[op_dim]
- >= (min_mod_chunk_sc[op_dim] + 1))
+ if(disable_edge_filters && old_dim[op_dim] >= (min_mod_chunk_sc[op_dim] + 1))
new_unfilt_dim[op_dim] = TRUE;
else
new_unfilt_dim[op_dim] = FALSE;
@@ -4897,8 +4917,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim)
HDassert(scaled[op_dim] == min_mod_chunk_sc[op_dim]);
/* Make sure this is an edge chunk */
- HDassert(H5D__chunk_is_partial_edge_chunk(scaled,
- space_ndims, space_dim, layout->u.chunk.dim));
+ HDassert(H5D__chunk_is_partial_edge_chunk(space_ndims, layout->u.chunk.dim, scaled, space_dim));
/* Determine if the chunk just became an unfiltered chunk */
if(new_unfilt_dim[op_dim]) {
@@ -4913,8 +4932,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id, const hsize_t *old_dim)
/* Make sure that, if we think this is a new unfiltered chunk,
* it was previously not an edge chunk */
HDassert(!new_unfilt_dim[op_dim] || (!new_unfilt_chunk !=
- !H5D__chunk_is_partial_edge_chunk(scaled,
- space_ndims, old_dim, layout->u.chunk.dim)));
+ !H5D__chunk_is_partial_edge_chunk(space_ndims, layout->u.chunk.dim, scaled, old_dim)));
HDassert(!new_unfilt_chunk || new_unfilt_dim[op_dim]);
/* Fill the unused parts of the chunk */
@@ -5360,8 +5378,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
if(udata->common.layout->flags
& H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS) {
/* Check if the chunk is an edge chunk, and disable filters if so */
- if(!H5D__chunk_is_partial_edge_chunk(chunk_rec->scaled, udata->dset_ndims,
- udata->dset_dims, udata->common.layout->dim))
+ if(!H5D__chunk_is_partial_edge_chunk(udata->dset_ndims, udata->common.layout->dim, chunk_rec->scaled, udata->dset_dims))
must_filter = TRUE;
} /* end if */
else
@@ -5477,7 +5494,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
udata_dst.common.layout->down_chunks, udata_dst.common.scaled);
/* Allocate chunk in the file */
- if(H5D__chunk_file_alloc(udata->idx_info_dst, NULL, &udata_dst.chunk_block, &need_insert, &udata_dst.need_modify, udata_dst.common.scaled) < 0)
+ if(H5D__chunk_file_alloc(udata->idx_info_dst, NULL, &udata_dst.chunk_block, &need_insert, udata_dst.common.scaled) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk on chunk level")
/* Write chunk data to destination file */
@@ -5489,7 +5506,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
H5_BEGIN_TAG(udata->idx_info_dst->dxpl_id, H5AC__COPIED_TAG, H5_ITER_ERROR);
/* Insert chunk record into index */
- if((need_insert || udata_dst.need_modify) && udata->idx_info_dst->storage->ops->insert)
+ if(need_insert && udata->idx_info_dst->storage->ops->insert)
if((udata->idx_info_dst->storage->ops->insert)(udata->idx_info_dst, &udata_dst, NULL) < 0)
HGOTO_ERROR_TAG(H5E_DATASET, H5E_CANTINSERT, H5_ITER_ERROR, "unable to insert chunk addr into index")
@@ -6130,8 +6147,8 @@ done:
*-------------------------------------------------------------------------
*/
static hbool_t
-H5D__chunk_is_partial_edge_chunk(const hsize_t scaled[], unsigned dset_ndims,
- const hsize_t *dset_dims, const uint32_t *chunk_dims)
+H5D__chunk_is_partial_edge_chunk(unsigned dset_ndims, const uint32_t *chunk_dims,
+ const hsize_t scaled[], const hsize_t *dset_dims)
{
unsigned u; /* Local index variable */
hbool_t ret_value = FALSE; /* Return value */
@@ -6170,7 +6187,7 @@ done:
*/
static herr_t
H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old_chunk,
- H5F_block_t *new_chunk, hbool_t *need_insert, hbool_t *need_modify, hsize_t scaled[])
+ H5F_block_t *new_chunk, hbool_t *need_insert, hsize_t scaled[])
{
hbool_t alloc_chunk = FALSE; /* Whether to allocate chunk */
herr_t ret_value = SUCCEED; /* Return value */
@@ -6185,16 +6202,13 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
HDassert(idx_info->storage);
HDassert(new_chunk);
HDassert(need_insert);
- HDassert(need_modify);
- *need_modify = FALSE; /* this is mainly for V2-btree */
*need_insert = FALSE;
/* Check for filters on chunks */
if(idx_info->pline->nused > 0) {
-
- HDassert(idx_info->storage->idx_type != H5D_CHUNK_IDX_NONE);
/* Sanity/error checking block */
+ HDassert(idx_info->storage->idx_type != H5D_CHUNK_IDX_NONE);
{
unsigned allow_chunk_size_len; /* Allowed size of encoded chunk size */
unsigned new_chunk_size_len; /* Size of encoded chunk size */
@@ -6231,7 +6245,6 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
if(H5MF_xfree(idx_info->f, H5FD_MEM_DRAW, idx_info->dxpl_id, old_chunk->offset, old_chunk->length) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to free chunk")
alloc_chunk = TRUE;
- *need_modify = TRUE;
} /* end if */
else {
/* Don't need to reallocate chunk, but send its address back up */
@@ -6275,13 +6288,7 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
new_chunk->offset = H5MF_alloc(idx_info->f, H5FD_MEM_DRAW, idx_info->dxpl_id, (hsize_t)new_chunk->length);
if(!H5F_addr_defined(new_chunk->offset))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "file allocation failed")
- if(idx_info->storage->idx_type == H5D_CHUNK_IDX_BT2) {
- /* This can be done together with other index types when Quincy checks into H5B2_modify() */
- if(!(*need_modify))
- *need_insert = TRUE;
- } else
- *need_insert = TRUE;
-
+ *need_insert = TRUE;
break;
case H5D_CHUNK_IDX_NTYPES:
@@ -6297,6 +6304,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__chunk_file_alloc() */
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_format_convert_cb
*
@@ -6328,9 +6336,8 @@ H5D__chunk_format_convert_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
chunk_addr = chunk_rec->chunk_addr;
if(new_idx_info->pline->nused &&
- (new_idx_info->layout->flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS) &&
- (H5D__chunk_is_partial_edge_chunk(chunk_rec->scaled, udata->dset_ndims, udata->dset_dims,
- new_idx_info->layout->dim)) ) {
+ (new_idx_info->layout->flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS) &&
+ (H5D__chunk_is_partial_edge_chunk(udata->dset_ndims, new_idx_info->layout->dim, chunk_rec->scaled, udata->dset_dims))) {
/* This is a partial non-filtered edge chunk */
/* Convert the chunk to a filtered edge chunk for v1 B-tree chunk index */
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index 6276af1..c8c8f8c 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -241,7 +241,7 @@ H5D__contig_fill(const H5D_t *dset, hid_t dxpl_id)
using_mpi = TRUE;
/* Use the internal "independent" DXPL */
- my_dxpl_id = H5AC_ind_dxpl_id;
+ my_dxpl_id = H5AC_dxpl_id;
} /* end if */
else {
#endif /* H5_HAVE_PARALLEL */
@@ -1027,10 +1027,9 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
if(NULL == (dset_contig->sieve_buf = H5FL_BLK_CALLOC(sieve_buf, dset_contig->sieve_buf_size)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed")
-#ifdef H5_CLEAR_MEMORY
-if(dset_contig->sieve_size > len)
- HDmemset(dset_contig->sieve_buf + len, 0, (dset_contig->sieve_size - len));
-#endif /* H5_CLEAR_MEMORY */
+ /* Clear memory */
+ if(dset_contig->sieve_size > len)
+ HDmemset(dset_contig->sieve_buf + len, 0, (dset_contig->sieve_size - len));
/* Determine the new sieve buffer size & location */
dset_contig->sieve_loc = addr;
diff --git a/src/H5Ddbg.c b/src/H5Ddbg.c
index 34e0ae9..559dd69 100644
--- a/src/H5Ddbg.c
+++ b/src/H5Ddbg.c
@@ -90,7 +90,7 @@ H5Ddebug(hid_t dset_id)
/* Print B-tree information */
if(H5D_CHUNKED == dset->shared->layout.type)
- (void)H5D__chunk_dump_index(dset, H5AC_ind_dxpl_id, stdout);
+ (void)H5D__chunk_dump_index(dset, H5AC_dxpl_id, stdout);
else if(H5D_CONTIGUOUS == dset->shared->layout.type)
HDfprintf(stdout, " %-10s %a\n", "Address:", dset->shared->layout.storage.u.contig.addr);
diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c
index 5a2b355..a4eb67f 100644
--- a/src/H5Ddeprec.c
+++ b/src/H5Ddeprec.c
@@ -180,7 +180,7 @@ H5Dopen1(hid_t loc_id, const char *name)
H5D_t *dset = NULL;
H5G_loc_t loc; /* Object location of group */
hid_t dapl_id = H5P_DATASET_ACCESS_DEFAULT; /* dapl to use to open dataset */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* dxpl to use to open datset */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl to use to open datset */
hid_t ret_value;
FUNC_ENTER_API(FAIL)
diff --git a/src/H5Dfill.c b/src/H5Dfill.c
index 947a177..59925d8 100644
--- a/src/H5Dfill.c
+++ b/src/H5Dfill.c
@@ -134,7 +134,7 @@ H5Dfill(const void *fill, hid_t fill_type_id, void *buf, hid_t buf_type_id, hid_
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype")
/* Fill the selection in the memory buffer */
- if(H5D__fill(fill, fill_type, buf, buf_type, space, H5AC_ind_dxpl_id) < 0)
+ if(H5D__fill(fill, fill_type, buf, buf_type, space, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTENCODE, FAIL, "filling selection failed")
done:
diff --git a/src/H5Dint.c b/src/H5Dint.c
index ed0e63e..ba7cdbc 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -2955,7 +2955,8 @@ done:
/*-------------------------------------------------------------------------
* Function: H5D__format_convert
*
- * Purpose: To convert a dataset's chunk indexing type to version 1 btree
+ * Purpose: For chunked: downgrade the chunk indexing type to version 1 B-tree
+ * For compact/contiguous: downgrade layout version to 3
*
* Return: Success: Non-negative
* Failure: Negative
@@ -2970,7 +2971,7 @@ H5D__format_convert(H5D_t *dataset, hid_t dxpl_id)
H5O_t *oh = NULL; /* Pointer to dataset's object header */
H5D_chk_idx_info_t new_idx_info; /* Index info for the new layout */
H5D_chk_idx_info_t idx_info; /* Index info for the current layout */
- H5O_layout_t newlayout; /* The new layout */
+ H5O_layout_t newlayout; /* The new layout */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_TAG(dxpl_id, dataset->oloc.addr, FAIL)
@@ -2978,64 +2979,86 @@ H5D__format_convert(H5D_t *dataset, hid_t dxpl_id)
/* Check args */
HDassert(dataset);
- /* Set up the current index info */
- idx_info.f = dataset->oloc.file;
- idx_info.dxpl_id = dxpl_id;
- idx_info.pline = &dataset->shared->dcpl_cache.pline;
- idx_info.layout = &dataset->shared->layout.u.chunk;
- idx_info.storage = &dataset->shared->layout.storage.u.chunk;
-
- /* Copy the current layout info to the new layout */
- HDmemcpy(&newlayout, &dataset->shared->layout, sizeof(H5O_layout_t));
-
- /* Set up info for version 1 B-tree in the new layout */
- newlayout.version = H5O_LAYOUT_VERSION_3;
- newlayout.storage.u.chunk.idx_type = H5D_CHUNK_IDX_BTREE;
- newlayout.storage.u.chunk.idx_addr = HADDR_UNDEF;
- newlayout.storage.u.chunk.ops = H5D_COPS_BTREE;
- newlayout.storage.u.chunk.u.btree.shared = NULL;
-
- /* Set up the index info to version 1 B-tree */
- new_idx_info.f = dataset->oloc.file;
- new_idx_info.dxpl_id = dxpl_id;
- new_idx_info.pline = &dataset->shared->dcpl_cache.pline;
- new_idx_info.layout = &newlayout.u.chunk;
- new_idx_info.storage = &newlayout.storage.u.chunk;
-
- /* Initialize version 1 B-tree */
- if(newlayout.storage.u.chunk.ops->init &&
- (newlayout.storage.u.chunk.ops->init)(&new_idx_info, dataset->shared->space, dataset->oloc.addr) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information")
+ switch(dataset->shared->layout.type) {
+ case H5D_CHUNKED:
+ {
+ HDassert(dataset->shared->layout.u.chunk.idx_type != H5D_CHUNK_IDX_BTREE);
+
+ /* Set up the current index info */
+ idx_info.f = dataset->oloc.file;
+ idx_info.dxpl_id = dxpl_id;
+ idx_info.pline = &dataset->shared->dcpl_cache.pline;
+ idx_info.layout = &dataset->shared->layout.u.chunk;
+ idx_info.storage = &dataset->shared->layout.storage.u.chunk;
+
+ /* Copy the current layout info to the new layout */
+ HDmemcpy(&newlayout, &dataset->shared->layout, sizeof(H5O_layout_t));
+
+ /* Set up info for version 1 B-tree in the new layout */
+ newlayout.version = H5O_LAYOUT_VERSION_3;
+ newlayout.storage.u.chunk.idx_type = H5D_CHUNK_IDX_BTREE;
+ newlayout.storage.u.chunk.idx_addr = HADDR_UNDEF;
+ newlayout.storage.u.chunk.ops = H5D_COPS_BTREE;
+ newlayout.storage.u.chunk.u.btree.shared = NULL;
+
+ /* Set up the index info to version 1 B-tree */
+ new_idx_info.f = dataset->oloc.file;
+ new_idx_info.dxpl_id = dxpl_id;
+ new_idx_info.pline = &dataset->shared->dcpl_cache.pline;
+ new_idx_info.layout = &newlayout.u.chunk;
+ new_idx_info.storage = &newlayout.storage.u.chunk;
+
+ /* Initialize version 1 B-tree */
+ if(newlayout.storage.u.chunk.ops->init &&
+ (newlayout.storage.u.chunk.ops->init)(&new_idx_info, dataset->shared->space, dataset->oloc.addr) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information")
- /* If the current chunk index exists */
- if(H5F_addr_defined(dataset->shared->layout.storage.u.chunk.idx_addr)) {
- /* Create v1 B-tree chunk index */
- if((newlayout.storage.u.chunk.ops->create)(&new_idx_info) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create chunk index")
-
- /* Iterate over the chunks in the current index and insert the chunk addresses
- * into the version 1 B-tree chunk index */
- if(H5D__chunk_format_convert(dataset, &idx_info, &new_idx_info) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk index to chunk info")
- } /* end if */
+ /* If the current chunk index exists */
+ if(H5F_addr_defined(dataset->shared->layout.storage.u.chunk.idx_addr)) {
+ /* Create v1 B-tree chunk index */
+ if((newlayout.storage.u.chunk.ops->create)(&new_idx_info) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create chunk index")
+
+ /* Iterate over the chunks in the current index and insert the chunk addresses
+ * into the version 1 B-tree chunk index */
+ if(H5D__chunk_format_convert(dataset, &idx_info, &new_idx_info) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk index to chunk info")
+ } /* end if */
+
+ /* Release the old (i.e. current) chunk index */
+ if(dataset->shared->layout.storage.u.chunk.ops->dest &&
+ (dataset->shared->layout.storage.u.chunk.ops->dest)(&idx_info) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info")
- /* Release the old (i.e. current) chunk index */
- if(dataset->shared->layout.storage.u.chunk.ops->dest &&
- (dataset->shared->layout.storage.u.chunk.ops->dest)(&idx_info) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info")
+ /* Delete the "layout" message */
+ if(H5O_msg_remove(&dataset->oloc, H5O_LAYOUT_ID, H5O_ALL, TRUE, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete layout message")
- /* Delete the "layout" message */
- if(H5O_msg_remove(&dataset->oloc, H5O_LAYOUT_ID, H5O_ALL, TRUE, dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete layout message")
+ HDmemcpy(&dataset->shared->layout, &newlayout, sizeof(H5O_layout_t));
- HDmemcpy(&dataset->shared->layout, &newlayout, sizeof(H5O_layout_t));
+ if(NULL == (oh = H5O_pin(&dataset->oloc, dxpl_id)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header")
- if(NULL == (oh = H5O_pin(&dataset->oloc, dxpl_id)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header")
+ /* Append the new layout message to the object header */
+ if(H5O_msg_append_oh(dataset->oloc.file, dxpl_id, oh, H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, &newlayout) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update old fill value header message")
- /* Append the new layout message to the object header */
- if(H5O_msg_append_oh(dataset->oloc.file, dxpl_id, oh, H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, &newlayout) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update old fill value header message")
+ break;
+ }
+
+ case H5D_CONTIGUOUS:
+ case H5D_COMPACT:
+ HDassert(dataset->shared->layout.version > H5O_LAYOUT_VERSION_DEFAULT);
+ dataset->shared->layout.version = H5O_LAYOUT_VERSION_DEFAULT;
+ if(H5O_msg_write(&(dataset->oloc), H5O_LAYOUT_ID, 0, H5O_UPDATE_TIME, &(dataset->shared->layout), dxpl_id) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update layout message")
+ break;
+
+ case H5D_VIRTUAL:
+ default:
+ HDassert(0);
+ break;
+ }
done:
/* Release pointer to object header */
@@ -3226,7 +3249,7 @@ H5D_get_create_plist(H5D_t *dset)
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "can't get property list")
/* Retrieve any object creation properties */
- if(H5O_get_create_plist(&dset->oloc, H5AC_ind_dxpl_id, new_plist) < 0)
+ if(H5O_get_create_plist(&dset->oloc, H5AC_dxpl_id, new_plist) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get object creation info")
/* Get the layout property */
@@ -3288,7 +3311,7 @@ H5D_get_create_plist(H5D_t *dset)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy dataset datatype for fill value")
/* Set up type conversion function */
- if(NULL == (tpath = H5T_path_find(dset->shared->type, copied_fill.type, NULL, NULL, H5AC_ind_dxpl_id, FALSE)))
+ if(NULL == (tpath = H5T_path_find(dset->shared->type, copied_fill.type, NULL, NULL, H5AC_dxpl_id, FALSE)))
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest data types")
/* Convert disk form of fill value into memory form */
@@ -3316,7 +3339,7 @@ H5D_get_create_plist(H5D_t *dset)
} /* end if */
/* Convert fill value */
- if(H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, copied_fill.buf, bkg_buf, H5AC_ind_dxpl_id) < 0) {
+ if(H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, copied_fill.buf, bkg_buf, H5AC_dxpl_id) < 0) {
H5I_dec_ref(src_id);
H5I_dec_ref(dst_id);
if(bkg_buf)
@@ -3458,7 +3481,7 @@ H5D_get_space(H5D_t *dset)
/* If the layout is virtual, update the extent */
if(dset->shared->layout.type == H5D_VIRTUAL)
- if(H5D__virtual_set_extent_unlim(dset, H5AC_ind_dxpl_id) < 0)
+ if(H5D__virtual_set_extent_unlim(dset, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update virtual dataset extent")
/* Read the data space message and return a data space object */
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index 15e0a93..e7a2192 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -272,7 +272,6 @@ typedef struct H5D_chunk_rec_t {
* to which the index points.
*/
typedef struct H5D_chunk_common_ud_t {
- /* downward */
const H5O_layout_chunk_t *layout; /* Chunk layout description */
const H5O_storage_chunk_t *storage; /* Chunk storage description */
const hsize_t *scaled; /* Scaled coordinates for a chunk */
@@ -280,15 +279,15 @@ typedef struct H5D_chunk_common_ud_t {
/* B-tree callback info for various operations */
typedef struct H5D_chunk_ud_t {
+ /* Downward */
H5D_chunk_common_ud_t common; /* Common info for B-tree user data (must be first) */
/* Upward */
- unsigned idx_hint; /*index of chunk in cache, if present */
- H5F_block_t chunk_block; /*offset/length of chunk in file */
- unsigned filter_mask; /*excluded filters */
- hbool_t new_unfilt_chunk; /*whether the chunk just became unfiltered */
- hsize_t chunk_idx; /*chunk index for EA, FA indexing */
- hbool_t need_modify;
+ unsigned idx_hint; /* Index of chunk in cache, if present */
+ H5F_block_t chunk_block; /* Offset/length of chunk in file */
+ unsigned filter_mask; /* Excluded filters */
+ hbool_t new_unfilt_chunk; /* Whether the chunk just became unfiltered */
+ hsize_t chunk_idx; /* Chunk index for EA, FA indexing */
} H5D_chunk_ud_t;
/* Typedef for "generic" chunk callbacks */
diff --git a/src/H5Edefin.h b/src/H5Edefin.h
index 7a82572..b31c41b 100644
--- a/src/H5Edefin.h
+++ b/src/H5Edefin.h
@@ -21,86 +21,89 @@
#define _H5Edefin_H
/* Major error IDs */
-hid_t H5E_FUNC_g = FAIL; /* Function entry/exit */
-hid_t H5E_FILE_g = FAIL; /* File accessibilty */
-hid_t H5E_SOHM_g = FAIL; /* Shared Object Header Messages */
hid_t H5E_SYM_g = FAIL; /* Symbol table */
-hid_t H5E_PLUGIN_g = FAIL; /* Plugin for dynamically loaded library */
-hid_t H5E_VFL_g = FAIL; /* Virtual File Layer */
-hid_t H5E_INTERNAL_g = FAIL; /* Internal error (too specific to document in detail) */
-hid_t H5E_BTREE_g = FAIL; /* B-Tree node */
-hid_t H5E_REFERENCE_g = FAIL; /* References */
-hid_t H5E_DATASPACE_g = FAIL; /* Dataspace */
+hid_t H5E_IO_g = FAIL; /* Low-level I/O */
hid_t H5E_RESOURCE_g = FAIL; /* Resource unavailable */
-hid_t H5E_RS_g = FAIL; /* Reference Counted Strings */
-hid_t H5E_FARRAY_g = FAIL; /* Fixed Array */
+hid_t H5E_FUNC_g = FAIL; /* Function entry/exit */
+hid_t H5E_ERROR_g = FAIL; /* Error API */
+hid_t H5E_INTERNAL_g = FAIL; /* Internal error (too specific to document in detail) */
+hid_t H5E_CACHE_g = FAIL; /* Object cache */
+hid_t H5E_FSPACE_g = FAIL; /* Free Space Manager */
+hid_t H5E_SLIST_g = FAIL; /* Skip Lists */
hid_t H5E_HEAP_g = FAIL; /* Heap */
-hid_t H5E_ATTR_g = FAIL; /* Attribute */
-hid_t H5E_IO_g = FAIL; /* Low-level I/O */
+hid_t H5E_DATATYPE_g = FAIL; /* Datatype */
+hid_t H5E_VFL_g = FAIL; /* Virtual File Layer */
hid_t H5E_EFL_g = FAIL; /* External file list */
+hid_t H5E_DATASPACE_g = FAIL; /* Dataspace */
+hid_t H5E_PLINE_g = FAIL; /* Data filters */
+hid_t H5E_SOHM_g = FAIL; /* Shared Object Header Messages */
hid_t H5E_TST_g = FAIL; /* Ternary Search Trees */
-hid_t H5E_FSPACE_g = FAIL; /* Free Space Manager */
-hid_t H5E_DATASET_g = FAIL; /* Dataset */
+hid_t H5E_EARRAY_g = FAIL; /* Extensible Array */
+hid_t H5E_RS_g = FAIL; /* Reference Counted Strings */
+hid_t H5E_ATOM_g = FAIL; /* Object atom */
+hid_t H5E_NONE_MAJOR_g = FAIL; /* No error */
+hid_t H5E_BTREE_g = FAIL; /* B-Tree node */
+hid_t H5E_ARGS_g = FAIL; /* Invalid arguments to routine */
hid_t H5E_STORAGE_g = FAIL; /* Data storage */
+hid_t H5E_FILE_g = FAIL; /* File accessibilty */
+hid_t H5E_ATTR_g = FAIL; /* Attribute */
+hid_t H5E_FARRAY_g = FAIL; /* Fixed Array */
+hid_t H5E_REFERENCE_g = FAIL; /* References */
hid_t H5E_LINK_g = FAIL; /* Links */
hid_t H5E_PLIST_g = FAIL; /* Property lists */
-hid_t H5E_DATATYPE_g = FAIL; /* Datatype */
hid_t H5E_OHDR_g = FAIL; /* Object header */
-hid_t H5E_ATOM_g = FAIL; /* Object atom */
-hid_t H5E_NONE_MAJOR_g = FAIL; /* No error */
-hid_t H5E_SLIST_g = FAIL; /* Skip Lists */
-hid_t H5E_ARGS_g = FAIL; /* Invalid arguments to routine */
-hid_t H5E_EARRAY_g = FAIL; /* Extensible Array */
-hid_t H5E_PLINE_g = FAIL; /* Data filters */
-hid_t H5E_ERROR_g = FAIL; /* Error API */
-hid_t H5E_CACHE_g = FAIL; /* Object cache */
+hid_t H5E_PLUGIN_g = FAIL; /* Plugin for dynamically loaded library */
+hid_t H5E_DATASET_g = FAIL; /* Dataset */
/* Minor error IDs */
-/* Generic low-level file I/O errors */
-hid_t H5E_SEEKERROR_g = FAIL; /* Seek failed */
-hid_t H5E_READERROR_g = FAIL; /* Read failed */
-hid_t H5E_WRITEERROR_g = FAIL; /* Write failed */
-hid_t H5E_CLOSEERROR_g = FAIL; /* Close failed */
-hid_t H5E_OVERFLOW_g = FAIL; /* Address overflowed */
-hid_t H5E_FCNTL_g = FAIL; /* File control (fcntl) failed */
+/* File accessibilty errors */
+hid_t H5E_FILEEXISTS_g = FAIL; /* File already exists */
+hid_t H5E_FILEOPEN_g = FAIL; /* File already open */
+hid_t H5E_CANTCREATE_g = FAIL; /* Unable to create file */
+hid_t H5E_CANTOPENFILE_g = FAIL; /* Unable to open file */
+hid_t H5E_CANTCLOSEFILE_g = FAIL; /* Unable to close file */
+hid_t H5E_NOTHDF5_g = FAIL; /* Not an HDF5 file */
+hid_t H5E_BADFILE_g = FAIL; /* Bad file ID accessed */
+hid_t H5E_TRUNCATED_g = FAIL; /* File has been truncated */
+hid_t H5E_MOUNT_g = FAIL; /* File mount error */
-/* Resource errors */
-hid_t H5E_NOSPACE_g = FAIL; /* No space available for allocation */
-hid_t H5E_CANTALLOC_g = FAIL; /* Can't allocate space */
-hid_t H5E_CANTCOPY_g = FAIL; /* Unable to copy object */
-hid_t H5E_CANTFREE_g = FAIL; /* Unable to free object */
-hid_t H5E_ALREADYEXISTS_g = FAIL; /* Object already exists */
-hid_t H5E_CANTLOCK_g = FAIL; /* Unable to lock object */
-hid_t H5E_CANTUNLOCK_g = FAIL; /* Unable to unlock object */
-hid_t H5E_CANTGC_g = FAIL; /* Unable to garbage collect */
-hid_t H5E_CANTGETSIZE_g = FAIL; /* Unable to compute size */
-hid_t H5E_OBJOPEN_g = FAIL; /* Object is already open */
+/* System level errors */
+hid_t H5E_SYSERRSTR_g = FAIL; /* System error message */
-/* Heap errors */
-hid_t H5E_CANTRESTORE_g = FAIL; /* Can't restore condition */
-hid_t H5E_CANTCOMPUTE_g = FAIL; /* Can't compute value */
-hid_t H5E_CANTEXTEND_g = FAIL; /* Can't extend heap's space */
-hid_t H5E_CANTATTACH_g = FAIL; /* Can't attach object */
-hid_t H5E_CANTUPDATE_g = FAIL; /* Can't update object */
-hid_t H5E_CANTOPERATE_g = FAIL; /* Can't operate on object */
+/* Plugin errors */
+hid_t H5E_OPENERROR_g = FAIL; /* Can't open directory or file */
+
+/* Dataspace errors */
+hid_t H5E_CANTCLIP_g = FAIL; /* Can't clip hyperslab region */
+hid_t H5E_CANTCOUNT_g = FAIL; /* Can't count elements */
+hid_t H5E_CANTSELECT_g = FAIL; /* Can't select hyperslab */
+hid_t H5E_CANTNEXT_g = FAIL; /* Can't move to next iterator location */
+hid_t H5E_BADSELECT_g = FAIL; /* Invalid selection */
+hid_t H5E_CANTCOMPARE_g = FAIL; /* Can't compare objects */
+hid_t H5E_CANTAPPEND_g = FAIL; /* Can't append object */
/* Function entry/exit interface errors */
hid_t H5E_CANTINIT_g = FAIL; /* Unable to initialize object */
hid_t H5E_ALREADYINIT_g = FAIL; /* Object already initialized */
hid_t H5E_CANTRELEASE_g = FAIL; /* Unable to release object */
-/* Property list errors */
-hid_t H5E_CANTGET_g = FAIL; /* Can't get value */
-hid_t H5E_CANTSET_g = FAIL; /* Can't set value */
-hid_t H5E_DUPCLASS_g = FAIL; /* Duplicate class name in parent class */
-hid_t H5E_SETDISALLOWED_g = FAIL; /* Disallowed operation */
+/* Datatype conversion errors */
+hid_t H5E_CANTCONVERT_g = FAIL; /* Can't convert datatypes */
+hid_t H5E_BADSIZE_g = FAIL; /* Bad size for object */
/* Free space errors */
hid_t H5E_CANTMERGE_g = FAIL; /* Can't merge objects */
hid_t H5E_CANTREVIVE_g = FAIL; /* Can't revive object */
hid_t H5E_CANTSHRINK_g = FAIL; /* Can't shrink container */
+/* Argument errors */
+hid_t H5E_UNINITIALIZED_g = FAIL; /* Information is uinitialized */
+hid_t H5E_UNSUPPORTED_g = FAIL; /* Feature is unsupported */
+hid_t H5E_BADTYPE_g = FAIL; /* Inappropriate type */
+hid_t H5E_BADRANGE_g = FAIL; /* Out of range */
+hid_t H5E_BADVALUE_g = FAIL; /* Bad value */
+
/* Object header related errors */
hid_t H5E_LINKCOUNT_g = FAIL; /* Bad object header link count */
hid_t H5E_VERSION_g = FAIL; /* Wrong version number */
@@ -112,8 +115,25 @@ hid_t H5E_CANTPACK_g = FAIL; /* Can't pack messages */
hid_t H5E_CANTRESET_g = FAIL; /* Can't reset object */
hid_t H5E_CANTRENAME_g = FAIL; /* Unable to rename object */
-/* System level errors */
-hid_t H5E_SYSERRSTR_g = FAIL; /* System error message */
+/* Resource errors */
+hid_t H5E_NOSPACE_g = FAIL; /* No space available for allocation */
+hid_t H5E_CANTALLOC_g = FAIL; /* Can't allocate space */
+hid_t H5E_CANTCOPY_g = FAIL; /* Unable to copy object */
+hid_t H5E_CANTFREE_g = FAIL; /* Unable to free object */
+hid_t H5E_ALREADYEXISTS_g = FAIL; /* Object already exists */
+hid_t H5E_CANTLOCK_g = FAIL; /* Unable to lock object */
+hid_t H5E_CANTUNLOCK_g = FAIL; /* Unable to unlock object */
+hid_t H5E_CANTGC_g = FAIL; /* Unable to garbage collect */
+hid_t H5E_CANTGETSIZE_g = FAIL; /* Unable to compute size */
+hid_t H5E_OBJOPEN_g = FAIL; /* Object is already open */
+
+/* Object atom related errors */
+hid_t H5E_BADATOM_g = FAIL; /* Unable to find atom information (already closed?) */
+hid_t H5E_BADGROUP_g = FAIL; /* Unable to find ID group information */
+hid_t H5E_CANTREGISTER_g = FAIL; /* Unable to register new atom */
+hid_t H5E_CANTINC_g = FAIL; /* Unable to increment reference count */
+hid_t H5E_CANTDEC_g = FAIL; /* Unable to decrement reference count */
+hid_t H5E_NOIDS_g = FAIL; /* Out of IDs for group */
/* I/O pipeline errors */
hid_t H5E_NOFILTER_g = FAIL; /* Requested filter is not available */
@@ -123,36 +143,34 @@ hid_t H5E_SETLOCAL_g = FAIL; /* Error from filter 'set local' callbac
hid_t H5E_NOENCODER_g = FAIL; /* Filter present but encoding disabled */
hid_t H5E_CANTFILTER_g = FAIL; /* Filter operation failed */
-/* Group related errors */
-hid_t H5E_CANTOPENOBJ_g = FAIL; /* Can't open object */
-hid_t H5E_CANTCLOSEOBJ_g = FAIL; /* Can't close object */
-hid_t H5E_COMPLEN_g = FAIL; /* Name component is too long */
-hid_t H5E_PATH_g = FAIL; /* Problem with path to object */
-
-/* No error */
-hid_t H5E_NONE_MINOR_g = FAIL; /* No error */
-
-/* Plugin errors */
-hid_t H5E_OPENERROR_g = FAIL; /* Can't open directory or file */
+/* Generic low-level file I/O errors */
+hid_t H5E_SEEKERROR_g = FAIL; /* Seek failed */
+hid_t H5E_READERROR_g = FAIL; /* Read failed */
+hid_t H5E_WRITEERROR_g = FAIL; /* Write failed */
+hid_t H5E_CLOSEERROR_g = FAIL; /* Close failed */
+hid_t H5E_OVERFLOW_g = FAIL; /* Address overflowed */
+hid_t H5E_FCNTL_g = FAIL; /* File control (fcntl) failed */
-/* File accessibilty errors */
-hid_t H5E_FILEEXISTS_g = FAIL; /* File already exists */
-hid_t H5E_FILEOPEN_g = FAIL; /* File already open */
-hid_t H5E_CANTCREATE_g = FAIL; /* Unable to create file */
-hid_t H5E_CANTOPENFILE_g = FAIL; /* Unable to open file */
-hid_t H5E_CANTCLOSEFILE_g = FAIL; /* Unable to close file */
-hid_t H5E_NOTHDF5_g = FAIL; /* Not an HDF5 file */
-hid_t H5E_BADFILE_g = FAIL; /* Bad file ID accessed */
-hid_t H5E_TRUNCATED_g = FAIL; /* File has been truncated */
-hid_t H5E_MOUNT_g = FAIL; /* File mount error */
+/* Heap errors */
+hid_t H5E_CANTRESTORE_g = FAIL; /* Can't restore condition */
+hid_t H5E_CANTCOMPUTE_g = FAIL; /* Can't compute value */
+hid_t H5E_CANTEXTEND_g = FAIL; /* Can't extend heap's space */
+hid_t H5E_CANTATTACH_g = FAIL; /* Can't attach object */
+hid_t H5E_CANTUPDATE_g = FAIL; /* Can't update object */
+hid_t H5E_CANTOPERATE_g = FAIL; /* Can't operate on object */
-/* Object atom related errors */
-hid_t H5E_BADATOM_g = FAIL; /* Unable to find atom information (already closed?) */
-hid_t H5E_BADGROUP_g = FAIL; /* Unable to find ID group information */
-hid_t H5E_CANTREGISTER_g = FAIL; /* Unable to register new atom */
-hid_t H5E_CANTINC_g = FAIL; /* Unable to increment reference count */
-hid_t H5E_CANTDEC_g = FAIL; /* Unable to decrement reference count */
-hid_t H5E_NOIDS_g = FAIL; /* Out of IDs for group */
+/* B-tree related errors */
+hid_t H5E_NOTFOUND_g = FAIL; /* Object not found */
+hid_t H5E_EXISTS_g = FAIL; /* Object already exists */
+hid_t H5E_CANTENCODE_g = FAIL; /* Unable to encode value */
+hid_t H5E_CANTDECODE_g = FAIL; /* Unable to decode value */
+hid_t H5E_CANTSPLIT_g = FAIL; /* Unable to split node */
+hid_t H5E_CANTREDISTRIBUTE_g = FAIL; /* Unable to redistribute records */
+hid_t H5E_CANTSWAP_g = FAIL; /* Unable to swap records */
+hid_t H5E_CANTINSERT_g = FAIL; /* Unable to insert object */
+hid_t H5E_CANTLIST_g = FAIL; /* Unable to list node */
+hid_t H5E_CANTMODIFY_g = FAIL; /* Unable to modify record */
+hid_t H5E_CANTREMOVE_g = FAIL; /* Unable to remove object */
/* Cache related errors */
hid_t H5E_CANTFLUSH_g = FAIL; /* Unable to flush data from cache */
@@ -185,42 +203,24 @@ hid_t H5E_NOTREGISTERED_g = FAIL; /* Link class not registered */
hid_t H5E_CANTMOVE_g = FAIL; /* Can't move object */
hid_t H5E_CANTSORT_g = FAIL; /* Can't sort objects */
+/* Property list errors */
+hid_t H5E_CANTGET_g = FAIL; /* Can't get value */
+hid_t H5E_CANTSET_g = FAIL; /* Can't set value */
+hid_t H5E_DUPCLASS_g = FAIL; /* Duplicate class name in parent class */
+hid_t H5E_SETDISALLOWED_g = FAIL; /* Disallowed operation */
+
+/* Group related errors */
+hid_t H5E_CANTOPENOBJ_g = FAIL; /* Can't open object */
+hid_t H5E_CANTCLOSEOBJ_g = FAIL; /* Can't close object */
+hid_t H5E_COMPLEN_g = FAIL; /* Name component is too long */
+hid_t H5E_PATH_g = FAIL; /* Problem with path to object */
+
+/* No error */
+hid_t H5E_NONE_MINOR_g = FAIL; /* No error */
+
/* Parallel MPI errors */
hid_t H5E_MPI_g = FAIL; /* Some MPI function failed */
hid_t H5E_MPIERRSTR_g = FAIL; /* MPI Error String */
hid_t H5E_CANTRECV_g = FAIL; /* Can't receive data */
-/* Dataspace errors */
-hid_t H5E_CANTCLIP_g = FAIL; /* Can't clip hyperslab region */
-hid_t H5E_CANTCOUNT_g = FAIL; /* Can't count elements */
-hid_t H5E_CANTSELECT_g = FAIL; /* Can't select hyperslab */
-hid_t H5E_CANTNEXT_g = FAIL; /* Can't move to next iterator location */
-hid_t H5E_BADSELECT_g = FAIL; /* Invalid selection */
-hid_t H5E_CANTCOMPARE_g = FAIL; /* Can't compare objects */
-hid_t H5E_CANTAPPEND_g = FAIL; /* Can't append object */
-
-/* Argument errors */
-hid_t H5E_UNINITIALIZED_g = FAIL; /* Information is uinitialized */
-hid_t H5E_UNSUPPORTED_g = FAIL; /* Feature is unsupported */
-hid_t H5E_BADTYPE_g = FAIL; /* Inappropriate type */
-hid_t H5E_BADRANGE_g = FAIL; /* Out of range */
-hid_t H5E_BADVALUE_g = FAIL; /* Bad value */
-
-/* B-tree related errors */
-hid_t H5E_NOTFOUND_g = FAIL; /* Object not found */
-hid_t H5E_EXISTS_g = FAIL; /* Object already exists */
-hid_t H5E_CANTENCODE_g = FAIL; /* Unable to encode value */
-hid_t H5E_CANTDECODE_g = FAIL; /* Unable to decode value */
-hid_t H5E_CANTSPLIT_g = FAIL; /* Unable to split node */
-hid_t H5E_CANTREDISTRIBUTE_g = FAIL; /* Unable to redistribute records */
-hid_t H5E_CANTSWAP_g = FAIL; /* Unable to swap records */
-hid_t H5E_CANTINSERT_g = FAIL; /* Unable to insert object */
-hid_t H5E_CANTLIST_g = FAIL; /* Unable to list node */
-hid_t H5E_CANTMODIFY_g = FAIL; /* Unable to modify record */
-hid_t H5E_CANTREMOVE_g = FAIL; /* Unable to remove object */
-
-/* Datatype conversion errors */
-hid_t H5E_CANTCONVERT_g = FAIL; /* Can't convert datatypes */
-hid_t H5E_BADSIZE_g = FAIL; /* Bad size for object */
-
#endif /* H5Edefin_H */
diff --git a/src/H5Einit.h b/src/H5Einit.h
index 0b2a6da..6dbb0ea 100644
--- a/src/H5Einit.h
+++ b/src/H5Einit.h
@@ -24,130 +24,100 @@
/* Major error codes */
/*********************/
-assert(H5E_FUNC_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Function entry/exit"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_FUNC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_FILE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "File accessibilty"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_FILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_SOHM_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Shared Object Header Messages"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_SOHM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
assert(H5E_SYM_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Symbol table"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_SYM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_PLUGIN_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Plugin for dynamically loaded library"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_PLUGIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_VFL_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Virtual File Layer"))==NULL)
+assert(H5E_IO_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Low-level I/O"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_VFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_IO_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_INTERNAL_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Internal error (too specific to document in detail)"))==NULL)
+assert(H5E_RESOURCE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Resource unavailable"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_INTERNAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_RESOURCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_BTREE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "B-Tree node"))==NULL)
+assert(H5E_FUNC_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Function entry/exit"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_BTREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_FUNC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_REFERENCE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "References"))==NULL)
+assert(H5E_ERROR_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Error API"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_REFERENCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_ERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_DATASPACE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataspace"))==NULL)
+assert(H5E_INTERNAL_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Internal error (too specific to document in detail)"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_DATASPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_INTERNAL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_RESOURCE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Resource unavailable"))==NULL)
+assert(H5E_CACHE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object cache"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_RESOURCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CACHE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_RS_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Reference Counted Strings"))==NULL)
+assert(H5E_FSPACE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Free Space Manager"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_RS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_FSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_FARRAY_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Fixed Array"))==NULL)
+assert(H5E_SLIST_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Skip Lists"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_FARRAY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_SLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
assert(H5E_HEAP_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Heap"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_HEAP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_ATTR_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Attribute"))==NULL)
+assert(H5E_DATATYPE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Datatype"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_ATTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_DATATYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_IO_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Low-level I/O"))==NULL)
+assert(H5E_VFL_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Virtual File Layer"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_IO_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_VFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
assert(H5E_EFL_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "External file list"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_EFL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_TST_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Ternary Search Trees"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_TST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_FSPACE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Free Space Manager"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_FSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_DATASET_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataset"))==NULL)
+assert(H5E_DATASPACE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataspace"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_DATASET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_DATASPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_STORAGE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data storage"))==NULL)
+assert(H5E_PLINE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data filters"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_STORAGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_PLINE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_LINK_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Links"))==NULL)
+assert(H5E_SOHM_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Shared Object Header Messages"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_LINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_SOHM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_PLIST_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Property lists"))==NULL)
+assert(H5E_TST_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Ternary Search Trees"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_PLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_TST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_DATATYPE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Datatype"))==NULL)
+assert(H5E_EARRAY_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Extensible Array"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_DATATYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_EARRAY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_OHDR_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object header"))==NULL)
+assert(H5E_RS_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Reference Counted Strings"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_OHDR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_RS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
assert(H5E_ATOM_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object atom"))==NULL)
@@ -159,156 +129,168 @@ if((msg = H5E_create_msg(cls, H5E_MAJOR, "No error"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_NONE_MAJOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_SLIST_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Skip Lists"))==NULL)
+assert(H5E_BTREE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "B-Tree node"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_SLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_BTREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
assert(H5E_ARGS_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MAJOR, "Invalid arguments to routine"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_ARGS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_EARRAY_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Extensible Array"))==NULL)
+assert(H5E_STORAGE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data storage"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_EARRAY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_STORAGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_PLINE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Data filters"))==NULL)
+assert(H5E_FILE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "File accessibilty"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_PLINE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_FILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_ERROR_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Error API"))==NULL)
+assert(H5E_ATTR_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Attribute"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_ERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_ATTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CACHE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object cache"))==NULL)
+assert(H5E_FARRAY_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Fixed Array"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CACHE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_FARRAY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-
-/*********************/
-/* Minor error codes */
-/*********************/
-
-
-/* Generic low-level file I/O errors */
-assert(H5E_SEEKERROR_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Seek failed"))==NULL)
+assert(H5E_REFERENCE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "References"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_SEEKERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_REFERENCE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_READERROR_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Read failed"))==NULL)
+assert(H5E_LINK_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Links"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_READERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_LINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_WRITEERROR_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Write failed"))==NULL)
+assert(H5E_PLIST_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Property lists"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_WRITEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_PLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CLOSEERROR_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Close failed"))==NULL)
+assert(H5E_OHDR_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Object header"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CLOSEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_OHDR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_OVERFLOW_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Address overflowed"))==NULL)
+assert(H5E_PLUGIN_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Plugin for dynamically loaded library"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_OVERFLOW_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_PLUGIN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_FCNTL_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "File control (fcntl) failed"))==NULL)
+assert(H5E_DATASET_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MAJOR, "Dataset"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_FCNTL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_DATASET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-/* Resource errors */
-assert(H5E_NOSPACE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "No space available for allocation"))==NULL)
+/*********************/
+/* Minor error codes */
+/*********************/
+
+
+/* File accessibilty errors */
+assert(H5E_FILEEXISTS_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "File already exists"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_NOSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_FILEEXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTALLOC_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't allocate space"))==NULL)
+assert(H5E_FILEOPEN_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "File already open"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTALLOC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_FILEOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTCOPY_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to copy object"))==NULL)
+assert(H5E_CANTCREATE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to create file"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTCOPY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTCREATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTFREE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to free object"))==NULL)
+assert(H5E_CANTOPENFILE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to open file"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTFREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTOPENFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_ALREADYEXISTS_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already exists"))==NULL)
+assert(H5E_CANTCLOSEFILE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to close file"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_ALREADYEXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTCLOSEFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTLOCK_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to lock object"))==NULL)
+assert(H5E_NOTHDF5_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Not an HDF5 file"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_NOTHDF5_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTUNLOCK_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to unlock object"))==NULL)
+assert(H5E_BADFILE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad file ID accessed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTUNLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_BADFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTGC_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to garbage collect"))==NULL)
+assert(H5E_TRUNCATED_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "File has been truncated"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTGC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_TRUNCATED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTGETSIZE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to compute size"))==NULL)
+assert(H5E_MOUNT_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "File mount error"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTGETSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_MOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_OBJOPEN_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Object is already open"))==NULL)
+
+/* System level errors */
+assert(H5E_SYSERRSTR_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "System error message"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_OBJOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_SYSERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-/* Heap errors */
-assert(H5E_CANTRESTORE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't restore condition"))==NULL)
+/* Plugin errors */
+assert(H5E_OPENERROR_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open directory or file"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTRESTORE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_OPENERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTCOMPUTE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compute value"))==NULL)
+
+/* Dataspace errors */
+assert(H5E_CANTCLIP_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't clip hyperslab region"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTCOMPUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTCLIP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTEXTEND_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't extend heap's space"))==NULL)
+assert(H5E_CANTCOUNT_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't count elements"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTEXTEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTCOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTATTACH_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't attach object"))==NULL)
+assert(H5E_CANTSELECT_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't select hyperslab"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTATTACH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTSELECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTUPDATE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't update object"))==NULL)
+assert(H5E_CANTNEXT_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't move to next iterator location"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTUPDATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTNEXT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTOPERATE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't operate on object"))==NULL)
+assert(H5E_BADSELECT_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Invalid selection"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTOPERATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_BADSELECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_CANTCOMPARE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compare objects"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_CANTCOMPARE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_CANTAPPEND_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't append object"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_CANTAPPEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Function entry/exit interface errors */
@@ -328,26 +310,16 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to release object"))==NULL)
if((H5E_CANTRELEASE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-/* Property list errors */
-assert(H5E_CANTGET_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't get value"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTGET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTSET_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't set value"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTSET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_DUPCLASS_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Duplicate class name in parent class"))==NULL)
+/* Datatype conversion errors */
+assert(H5E_CANTCONVERT_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't convert datatypes"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_DUPCLASS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTCONVERT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_SETDISALLOWED_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Disallowed operation"))==NULL)
+assert(H5E_BADSIZE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad size for object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_SETDISALLOWED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_BADSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Free space errors */
@@ -367,6 +339,33 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't shrink container"))==NULL)
if((H5E_CANTSHRINK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+/* Argument errors */
+assert(H5E_UNINITIALIZED_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Information is uinitialized"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_UNINITIALIZED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_UNSUPPORTED_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Feature is unsupported"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_UNSUPPORTED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_BADTYPE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Inappropriate type"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_BADTYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_BADRANGE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of range"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_BADRANGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_BADVALUE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad value"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_BADVALUE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+
/* Object header related errors */
assert(H5E_LINKCOUNT_g==(-1));
if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad object header link count"))==NULL)
@@ -414,11 +413,88 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to rename object"))==NULL)
if((H5E_CANTRENAME_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-/* System level errors */
-assert(H5E_SYSERRSTR_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "System error message"))==NULL)
+/* Resource errors */
+assert(H5E_NOSPACE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "No space available for allocation"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_SYSERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_NOSPACE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_CANTALLOC_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't allocate space"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_CANTALLOC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_CANTCOPY_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to copy object"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_CANTCOPY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_CANTFREE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to free object"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_CANTFREE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_ALREADYEXISTS_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already exists"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_ALREADYEXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_CANTLOCK_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to lock object"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_CANTLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_CANTUNLOCK_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to unlock object"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_CANTUNLOCK_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_CANTGC_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to garbage collect"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_CANTGC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_CANTGETSIZE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to compute size"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_CANTGETSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_OBJOPEN_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Object is already open"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_OBJOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+
+/* Object atom related errors */
+assert(H5E_BADATOM_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to find atom information (already closed?)"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_BADATOM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_BADGROUP_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to find ID group information"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_BADGROUP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_CANTREGISTER_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to register new atom"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_CANTREGISTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_CANTINC_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to increment reference count"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_CANTINC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_CANTDEC_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to decrement reference count"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_CANTDEC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_NOIDS_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of IDs for group"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_NOIDS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* I/O pipeline errors */
@@ -453,119 +529,125 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Filter operation failed"))==NULL)
if((H5E_CANTFILTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-/* Group related errors */
-assert(H5E_CANTOPENOBJ_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open object"))==NULL)
+/* Generic low-level file I/O errors */
+assert(H5E_SEEKERROR_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Seek failed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTOPENOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_SEEKERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTCLOSEOBJ_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't close object"))==NULL)
+assert(H5E_READERROR_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Read failed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTCLOSEOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_READERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_COMPLEN_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Name component is too long"))==NULL)
+assert(H5E_WRITEERROR_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Write failed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_COMPLEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_WRITEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_PATH_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Problem with path to object"))==NULL)
+assert(H5E_CLOSEERROR_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Close failed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_PATH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CLOSEERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-
-/* No error */
-assert(H5E_NONE_MINOR_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "No error"))==NULL)
+assert(H5E_OVERFLOW_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Address overflowed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_NONE_MINOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_OVERFLOW_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-
-/* Plugin errors */
-assert(H5E_OPENERROR_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open directory or file"))==NULL)
+assert(H5E_FCNTL_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "File control (fcntl) failed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_OPENERROR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_FCNTL_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-/* File accessibilty errors */
-assert(H5E_FILEEXISTS_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "File already exists"))==NULL)
+/* Heap errors */
+assert(H5E_CANTRESTORE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't restore condition"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_FILEEXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTRESTORE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_FILEOPEN_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "File already open"))==NULL)
+assert(H5E_CANTCOMPUTE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compute value"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_FILEOPEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTCOMPUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTCREATE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to create file"))==NULL)
+assert(H5E_CANTEXTEND_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't extend heap's space"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTCREATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTEXTEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTOPENFILE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to open file"))==NULL)
+assert(H5E_CANTATTACH_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't attach object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTOPENFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTATTACH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTCLOSEFILE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to close file"))==NULL)
+assert(H5E_CANTUPDATE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't update object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTCLOSEFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTUPDATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_NOTHDF5_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Not an HDF5 file"))==NULL)
+assert(H5E_CANTOPERATE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't operate on object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_NOTHDF5_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTOPERATE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_BADFILE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad file ID accessed"))==NULL)
+
+/* B-tree related errors */
+assert(H5E_NOTFOUND_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Object not found"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_BADFILE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_NOTFOUND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_TRUNCATED_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "File has been truncated"))==NULL)
+assert(H5E_EXISTS_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already exists"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_TRUNCATED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_EXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_MOUNT_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "File mount error"))==NULL)
+assert(H5E_CANTENCODE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to encode value"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_MOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTENCODE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-
-/* Object atom related errors */
-assert(H5E_BADATOM_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to find atom information (already closed?)"))==NULL)
+assert(H5E_CANTDECODE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to decode value"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_BADATOM_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTDECODE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_BADGROUP_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to find ID group information"))==NULL)
+assert(H5E_CANTSPLIT_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to split node"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_BADGROUP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTSPLIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTREGISTER_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to register new atom"))==NULL)
+assert(H5E_CANTREDISTRIBUTE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to redistribute records"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTREGISTER_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTREDISTRIBUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTINC_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to increment reference count"))==NULL)
+assert(H5E_CANTSWAP_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to swap records"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTINC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTSWAP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTDEC_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to decrement reference count"))==NULL)
+assert(H5E_CANTINSERT_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to insert object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTDEC_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTINSERT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_NOIDS_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of IDs for group"))==NULL)
+assert(H5E_CANTLIST_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to list node"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_NOIDS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_CANTMODIFY_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to modify record"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_CANTMODIFY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_CANTREMOVE_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to remove object"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_CANTREMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Cache related errors */
@@ -707,154 +789,72 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't sort objects"))==NULL)
if((H5E_CANTSORT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-/* Parallel MPI errors */
-assert(H5E_MPI_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Some MPI function failed"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_MPI_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_MPIERRSTR_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "MPI Error String"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_MPIERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTRECV_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't receive data"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTRECV_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-
-/* Dataspace errors */
-assert(H5E_CANTCLIP_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't clip hyperslab region"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTCLIP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTCOUNT_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't count elements"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTCOUNT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTSELECT_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't select hyperslab"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTSELECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTNEXT_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't move to next iterator location"))==NULL)
+/* Property list errors */
+assert(H5E_CANTGET_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't get value"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTNEXT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTGET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_BADSELECT_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Invalid selection"))==NULL)
+assert(H5E_CANTSET_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't set value"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_BADSELECT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTSET_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTCOMPARE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compare objects"))==NULL)
+assert(H5E_DUPCLASS_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Duplicate class name in parent class"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTCOMPARE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_DUPCLASS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTAPPEND_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't append object"))==NULL)
+assert(H5E_SETDISALLOWED_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Disallowed operation"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTAPPEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_SETDISALLOWED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-/* Argument errors */
-assert(H5E_UNINITIALIZED_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Information is uinitialized"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_UNINITIALIZED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_UNSUPPORTED_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Feature is unsupported"))==NULL)
+/* Group related errors */
+assert(H5E_CANTOPENOBJ_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't open object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_UNSUPPORTED_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTOPENOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_BADTYPE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Inappropriate type"))==NULL)
+assert(H5E_CANTCLOSEOBJ_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't close object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_BADTYPE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTCLOSEOBJ_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_BADRANGE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Out of range"))==NULL)
+assert(H5E_COMPLEN_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Name component is too long"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_BADRANGE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_COMPLEN_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_BADVALUE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad value"))==NULL)
+assert(H5E_PATH_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Problem with path to object"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_BADVALUE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_PATH_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-/* B-tree related errors */
-assert(H5E_NOTFOUND_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Object not found"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_NOTFOUND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_EXISTS_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Object already exists"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_EXISTS_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTENCODE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to encode value"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTENCODE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTDECODE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to decode value"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTDECODE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTSPLIT_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to split node"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTSPLIT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTREDISTRIBUTE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to redistribute records"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTREDISTRIBUTE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTSWAP_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to swap records"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTSWAP_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTINSERT_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to insert object"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTINSERT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTLIST_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to list node"))==NULL)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTLIST_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTMODIFY_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to modify record"))==NULL)
+/* No error */
+assert(H5E_NONE_MINOR_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "No error"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTMODIFY_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_NONE_MINOR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_CANTREMOVE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to remove object"))==NULL)
+
+/* Parallel MPI errors */
+assert(H5E_MPI_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Some MPI function failed"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTREMOVE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_MPI_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-
-/* Datatype conversion errors */
-assert(H5E_CANTCONVERT_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't convert datatypes"))==NULL)
+assert(H5E_MPIERRSTR_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "MPI Error String"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_CANTCONVERT_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_MPIERRSTR_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
-assert(H5E_BADSIZE_g==(-1));
-if((msg = H5E_create_msg(cls, H5E_MINOR, "Bad size for object"))==NULL)
+assert(H5E_CANTRECV_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't receive data"))==NULL)
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
-if((H5E_BADSIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+if((H5E_CANTRECV_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
#endif /* H5Einit_H */
diff --git a/src/H5Epubgen.h b/src/H5Epubgen.h
index a2ed6b4..4e68d67 100644
--- a/src/H5Epubgen.h
+++ b/src/H5Epubgen.h
@@ -28,126 +28,120 @@ extern "C" {
/* Major error codes */
/*********************/
-#define H5E_FUNC (H5OPEN H5E_FUNC_g)
-#define H5E_FILE (H5OPEN H5E_FILE_g)
-#define H5E_SOHM (H5OPEN H5E_SOHM_g)
#define H5E_SYM (H5OPEN H5E_SYM_g)
-#define H5E_PLUGIN (H5OPEN H5E_PLUGIN_g)
-#define H5E_VFL (H5OPEN H5E_VFL_g)
-#define H5E_INTERNAL (H5OPEN H5E_INTERNAL_g)
-#define H5E_BTREE (H5OPEN H5E_BTREE_g)
-#define H5E_REFERENCE (H5OPEN H5E_REFERENCE_g)
-#define H5E_DATASPACE (H5OPEN H5E_DATASPACE_g)
+#define H5E_IO (H5OPEN H5E_IO_g)
#define H5E_RESOURCE (H5OPEN H5E_RESOURCE_g)
-#define H5E_RS (H5OPEN H5E_RS_g)
-#define H5E_FARRAY (H5OPEN H5E_FARRAY_g)
+#define H5E_FUNC (H5OPEN H5E_FUNC_g)
+#define H5E_ERROR (H5OPEN H5E_ERROR_g)
+#define H5E_INTERNAL (H5OPEN H5E_INTERNAL_g)
+#define H5E_CACHE (H5OPEN H5E_CACHE_g)
+#define H5E_FSPACE (H5OPEN H5E_FSPACE_g)
+#define H5E_SLIST (H5OPEN H5E_SLIST_g)
#define H5E_HEAP (H5OPEN H5E_HEAP_g)
-#define H5E_ATTR (H5OPEN H5E_ATTR_g)
-#define H5E_IO (H5OPEN H5E_IO_g)
+#define H5E_DATATYPE (H5OPEN H5E_DATATYPE_g)
+#define H5E_VFL (H5OPEN H5E_VFL_g)
#define H5E_EFL (H5OPEN H5E_EFL_g)
+#define H5E_DATASPACE (H5OPEN H5E_DATASPACE_g)
+#define H5E_PLINE (H5OPEN H5E_PLINE_g)
+#define H5E_SOHM (H5OPEN H5E_SOHM_g)
#define H5E_TST (H5OPEN H5E_TST_g)
-#define H5E_FSPACE (H5OPEN H5E_FSPACE_g)
-#define H5E_DATASET (H5OPEN H5E_DATASET_g)
+#define H5E_EARRAY (H5OPEN H5E_EARRAY_g)
+#define H5E_RS (H5OPEN H5E_RS_g)
+#define H5E_ATOM (H5OPEN H5E_ATOM_g)
+#define H5E_NONE_MAJOR (H5OPEN H5E_NONE_MAJOR_g)
+#define H5E_BTREE (H5OPEN H5E_BTREE_g)
+#define H5E_ARGS (H5OPEN H5E_ARGS_g)
#define H5E_STORAGE (H5OPEN H5E_STORAGE_g)
+#define H5E_FILE (H5OPEN H5E_FILE_g)
+#define H5E_ATTR (H5OPEN H5E_ATTR_g)
+#define H5E_FARRAY (H5OPEN H5E_FARRAY_g)
+#define H5E_REFERENCE (H5OPEN H5E_REFERENCE_g)
#define H5E_LINK (H5OPEN H5E_LINK_g)
#define H5E_PLIST (H5OPEN H5E_PLIST_g)
-#define H5E_DATATYPE (H5OPEN H5E_DATATYPE_g)
#define H5E_OHDR (H5OPEN H5E_OHDR_g)
-#define H5E_ATOM (H5OPEN H5E_ATOM_g)
-#define H5E_NONE_MAJOR (H5OPEN H5E_NONE_MAJOR_g)
-#define H5E_SLIST (H5OPEN H5E_SLIST_g)
-#define H5E_ARGS (H5OPEN H5E_ARGS_g)
-#define H5E_EARRAY (H5OPEN H5E_EARRAY_g)
-#define H5E_PLINE (H5OPEN H5E_PLINE_g)
-#define H5E_ERROR (H5OPEN H5E_ERROR_g)
-#define H5E_CACHE (H5OPEN H5E_CACHE_g)
-H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */
-H5_DLLVAR hid_t H5E_FILE_g; /* File accessibilty */
-H5_DLLVAR hid_t H5E_SOHM_g; /* Shared Object Header Messages */
+#define H5E_PLUGIN (H5OPEN H5E_PLUGIN_g)
+#define H5E_DATASET (H5OPEN H5E_DATASET_g)
H5_DLLVAR hid_t H5E_SYM_g; /* Symbol table */
-H5_DLLVAR hid_t H5E_PLUGIN_g; /* Plugin for dynamically loaded library */
-H5_DLLVAR hid_t H5E_VFL_g; /* Virtual File Layer */
-H5_DLLVAR hid_t H5E_INTERNAL_g; /* Internal error (too specific to document in detail) */
-H5_DLLVAR hid_t H5E_BTREE_g; /* B-Tree node */
-H5_DLLVAR hid_t H5E_REFERENCE_g; /* References */
-H5_DLLVAR hid_t H5E_DATASPACE_g; /* Dataspace */
+H5_DLLVAR hid_t H5E_IO_g; /* Low-level I/O */
H5_DLLVAR hid_t H5E_RESOURCE_g; /* Resource unavailable */
-H5_DLLVAR hid_t H5E_RS_g; /* Reference Counted Strings */
-H5_DLLVAR hid_t H5E_FARRAY_g; /* Fixed Array */
+H5_DLLVAR hid_t H5E_FUNC_g; /* Function entry/exit */
+H5_DLLVAR hid_t H5E_ERROR_g; /* Error API */
+H5_DLLVAR hid_t H5E_INTERNAL_g; /* Internal error (too specific to document in detail) */
+H5_DLLVAR hid_t H5E_CACHE_g; /* Object cache */
+H5_DLLVAR hid_t H5E_FSPACE_g; /* Free Space Manager */
+H5_DLLVAR hid_t H5E_SLIST_g; /* Skip Lists */
H5_DLLVAR hid_t H5E_HEAP_g; /* Heap */
-H5_DLLVAR hid_t H5E_ATTR_g; /* Attribute */
-H5_DLLVAR hid_t H5E_IO_g; /* Low-level I/O */
+H5_DLLVAR hid_t H5E_DATATYPE_g; /* Datatype */
+H5_DLLVAR hid_t H5E_VFL_g; /* Virtual File Layer */
H5_DLLVAR hid_t H5E_EFL_g; /* External file list */
+H5_DLLVAR hid_t H5E_DATASPACE_g; /* Dataspace */
+H5_DLLVAR hid_t H5E_PLINE_g; /* Data filters */
+H5_DLLVAR hid_t H5E_SOHM_g; /* Shared Object Header Messages */
H5_DLLVAR hid_t H5E_TST_g; /* Ternary Search Trees */
-H5_DLLVAR hid_t H5E_FSPACE_g; /* Free Space Manager */
-H5_DLLVAR hid_t H5E_DATASET_g; /* Dataset */
+H5_DLLVAR hid_t H5E_EARRAY_g; /* Extensible Array */
+H5_DLLVAR hid_t H5E_RS_g; /* Reference Counted Strings */
+H5_DLLVAR hid_t H5E_ATOM_g; /* Object atom */
+H5_DLLVAR hid_t H5E_NONE_MAJOR_g; /* No error */
+H5_DLLVAR hid_t H5E_BTREE_g; /* B-Tree node */
+H5_DLLVAR hid_t H5E_ARGS_g; /* Invalid arguments to routine */
H5_DLLVAR hid_t H5E_STORAGE_g; /* Data storage */
+H5_DLLVAR hid_t H5E_FILE_g; /* File accessibilty */
+H5_DLLVAR hid_t H5E_ATTR_g; /* Attribute */
+H5_DLLVAR hid_t H5E_FARRAY_g; /* Fixed Array */
+H5_DLLVAR hid_t H5E_REFERENCE_g; /* References */
H5_DLLVAR hid_t H5E_LINK_g; /* Links */
H5_DLLVAR hid_t H5E_PLIST_g; /* Property lists */
-H5_DLLVAR hid_t H5E_DATATYPE_g; /* Datatype */
H5_DLLVAR hid_t H5E_OHDR_g; /* Object header */
-H5_DLLVAR hid_t H5E_ATOM_g; /* Object atom */
-H5_DLLVAR hid_t H5E_NONE_MAJOR_g; /* No error */
-H5_DLLVAR hid_t H5E_SLIST_g; /* Skip Lists */
-H5_DLLVAR hid_t H5E_ARGS_g; /* Invalid arguments to routine */
-H5_DLLVAR hid_t H5E_EARRAY_g; /* Extensible Array */
-H5_DLLVAR hid_t H5E_PLINE_g; /* Data filters */
-H5_DLLVAR hid_t H5E_ERROR_g; /* Error API */
-H5_DLLVAR hid_t H5E_CACHE_g; /* Object cache */
+H5_DLLVAR hid_t H5E_PLUGIN_g; /* Plugin for dynamically loaded library */
+H5_DLLVAR hid_t H5E_DATASET_g; /* Dataset */
/*********************/
/* Minor error codes */
/*********************/
-/* Generic low-level file I/O errors */
-#define H5E_SEEKERROR (H5OPEN H5E_SEEKERROR_g)
-#define H5E_READERROR (H5OPEN H5E_READERROR_g)
-#define H5E_WRITEERROR (H5OPEN H5E_WRITEERROR_g)
-#define H5E_CLOSEERROR (H5OPEN H5E_CLOSEERROR_g)
-#define H5E_OVERFLOW (H5OPEN H5E_OVERFLOW_g)
-#define H5E_FCNTL (H5OPEN H5E_FCNTL_g)
-H5_DLLVAR hid_t H5E_SEEKERROR_g; /* Seek failed */
-H5_DLLVAR hid_t H5E_READERROR_g; /* Read failed */
-H5_DLLVAR hid_t H5E_WRITEERROR_g; /* Write failed */
-H5_DLLVAR hid_t H5E_CLOSEERROR_g; /* Close failed */
-H5_DLLVAR hid_t H5E_OVERFLOW_g; /* Address overflowed */
-H5_DLLVAR hid_t H5E_FCNTL_g; /* File control (fcntl) failed */
+/* File accessibilty errors */
+#define H5E_FILEEXISTS (H5OPEN H5E_FILEEXISTS_g)
+#define H5E_FILEOPEN (H5OPEN H5E_FILEOPEN_g)
+#define H5E_CANTCREATE (H5OPEN H5E_CANTCREATE_g)
+#define H5E_CANTOPENFILE (H5OPEN H5E_CANTOPENFILE_g)
+#define H5E_CANTCLOSEFILE (H5OPEN H5E_CANTCLOSEFILE_g)
+#define H5E_NOTHDF5 (H5OPEN H5E_NOTHDF5_g)
+#define H5E_BADFILE (H5OPEN H5E_BADFILE_g)
+#define H5E_TRUNCATED (H5OPEN H5E_TRUNCATED_g)
+#define H5E_MOUNT (H5OPEN H5E_MOUNT_g)
+H5_DLLVAR hid_t H5E_FILEEXISTS_g; /* File already exists */
+H5_DLLVAR hid_t H5E_FILEOPEN_g; /* File already open */
+H5_DLLVAR hid_t H5E_CANTCREATE_g; /* Unable to create file */
+H5_DLLVAR hid_t H5E_CANTOPENFILE_g; /* Unable to open file */
+H5_DLLVAR hid_t H5E_CANTCLOSEFILE_g; /* Unable to close file */
+H5_DLLVAR hid_t H5E_NOTHDF5_g; /* Not an HDF5 file */
+H5_DLLVAR hid_t H5E_BADFILE_g; /* Bad file ID accessed */
+H5_DLLVAR hid_t H5E_TRUNCATED_g; /* File has been truncated */
+H5_DLLVAR hid_t H5E_MOUNT_g; /* File mount error */
-/* Resource errors */
-#define H5E_NOSPACE (H5OPEN H5E_NOSPACE_g)
-#define H5E_CANTALLOC (H5OPEN H5E_CANTALLOC_g)
-#define H5E_CANTCOPY (H5OPEN H5E_CANTCOPY_g)
-#define H5E_CANTFREE (H5OPEN H5E_CANTFREE_g)
-#define H5E_ALREADYEXISTS (H5OPEN H5E_ALREADYEXISTS_g)
-#define H5E_CANTLOCK (H5OPEN H5E_CANTLOCK_g)
-#define H5E_CANTUNLOCK (H5OPEN H5E_CANTUNLOCK_g)
-#define H5E_CANTGC (H5OPEN H5E_CANTGC_g)
-#define H5E_CANTGETSIZE (H5OPEN H5E_CANTGETSIZE_g)
-#define H5E_OBJOPEN (H5OPEN H5E_OBJOPEN_g)
-H5_DLLVAR hid_t H5E_NOSPACE_g; /* No space available for allocation */
-H5_DLLVAR hid_t H5E_CANTALLOC_g; /* Can't allocate space */
-H5_DLLVAR hid_t H5E_CANTCOPY_g; /* Unable to copy object */
-H5_DLLVAR hid_t H5E_CANTFREE_g; /* Unable to free object */
-H5_DLLVAR hid_t H5E_ALREADYEXISTS_g; /* Object already exists */
-H5_DLLVAR hid_t H5E_CANTLOCK_g; /* Unable to lock object */
-H5_DLLVAR hid_t H5E_CANTUNLOCK_g; /* Unable to unlock object */
-H5_DLLVAR hid_t H5E_CANTGC_g; /* Unable to garbage collect */
-H5_DLLVAR hid_t H5E_CANTGETSIZE_g; /* Unable to compute size */
-H5_DLLVAR hid_t H5E_OBJOPEN_g; /* Object is already open */
+/* System level errors */
+#define H5E_SYSERRSTR (H5OPEN H5E_SYSERRSTR_g)
+H5_DLLVAR hid_t H5E_SYSERRSTR_g; /* System error message */
-/* Heap errors */
-#define H5E_CANTRESTORE (H5OPEN H5E_CANTRESTORE_g)
-#define H5E_CANTCOMPUTE (H5OPEN H5E_CANTCOMPUTE_g)
-#define H5E_CANTEXTEND (H5OPEN H5E_CANTEXTEND_g)
-#define H5E_CANTATTACH (H5OPEN H5E_CANTATTACH_g)
-#define H5E_CANTUPDATE (H5OPEN H5E_CANTUPDATE_g)
-#define H5E_CANTOPERATE (H5OPEN H5E_CANTOPERATE_g)
-H5_DLLVAR hid_t H5E_CANTRESTORE_g; /* Can't restore condition */
-H5_DLLVAR hid_t H5E_CANTCOMPUTE_g; /* Can't compute value */
-H5_DLLVAR hid_t H5E_CANTEXTEND_g; /* Can't extend heap's space */
-H5_DLLVAR hid_t H5E_CANTATTACH_g; /* Can't attach object */
-H5_DLLVAR hid_t H5E_CANTUPDATE_g; /* Can't update object */
-H5_DLLVAR hid_t H5E_CANTOPERATE_g; /* Can't operate on object */
+/* Plugin errors */
+#define H5E_OPENERROR (H5OPEN H5E_OPENERROR_g)
+H5_DLLVAR hid_t H5E_OPENERROR_g; /* Can't open directory or file */
+
+/* Dataspace errors */
+#define H5E_CANTCLIP (H5OPEN H5E_CANTCLIP_g)
+#define H5E_CANTCOUNT (H5OPEN H5E_CANTCOUNT_g)
+#define H5E_CANTSELECT (H5OPEN H5E_CANTSELECT_g)
+#define H5E_CANTNEXT (H5OPEN H5E_CANTNEXT_g)
+#define H5E_BADSELECT (H5OPEN H5E_BADSELECT_g)
+#define H5E_CANTCOMPARE (H5OPEN H5E_CANTCOMPARE_g)
+#define H5E_CANTAPPEND (H5OPEN H5E_CANTAPPEND_g)
+H5_DLLVAR hid_t H5E_CANTCLIP_g; /* Can't clip hyperslab region */
+H5_DLLVAR hid_t H5E_CANTCOUNT_g; /* Can't count elements */
+H5_DLLVAR hid_t H5E_CANTSELECT_g; /* Can't select hyperslab */
+H5_DLLVAR hid_t H5E_CANTNEXT_g; /* Can't move to next iterator location */
+H5_DLLVAR hid_t H5E_BADSELECT_g; /* Invalid selection */
+H5_DLLVAR hid_t H5E_CANTCOMPARE_g; /* Can't compare objects */
+H5_DLLVAR hid_t H5E_CANTAPPEND_g; /* Can't append object */
/* Function entry/exit interface errors */
#define H5E_CANTINIT (H5OPEN H5E_CANTINIT_g)
@@ -157,15 +151,11 @@ H5_DLLVAR hid_t H5E_CANTINIT_g; /* Unable to initialize object */
H5_DLLVAR hid_t H5E_ALREADYINIT_g; /* Object already initialized */
H5_DLLVAR hid_t H5E_CANTRELEASE_g; /* Unable to release object */
-/* Property list errors */
-#define H5E_CANTGET (H5OPEN H5E_CANTGET_g)
-#define H5E_CANTSET (H5OPEN H5E_CANTSET_g)
-#define H5E_DUPCLASS (H5OPEN H5E_DUPCLASS_g)
-#define H5E_SETDISALLOWED (H5OPEN H5E_SETDISALLOWED_g)
-H5_DLLVAR hid_t H5E_CANTGET_g; /* Can't get value */
-H5_DLLVAR hid_t H5E_CANTSET_g; /* Can't set value */
-H5_DLLVAR hid_t H5E_DUPCLASS_g; /* Duplicate class name in parent class */
-H5_DLLVAR hid_t H5E_SETDISALLOWED_g; /* Disallowed operation */
+/* Datatype conversion errors */
+#define H5E_CANTCONVERT (H5OPEN H5E_CANTCONVERT_g)
+#define H5E_BADSIZE (H5OPEN H5E_BADSIZE_g)
+H5_DLLVAR hid_t H5E_CANTCONVERT_g; /* Can't convert datatypes */
+H5_DLLVAR hid_t H5E_BADSIZE_g; /* Bad size for object */
/* Free space errors */
#define H5E_CANTMERGE (H5OPEN H5E_CANTMERGE_g)
@@ -175,6 +165,18 @@ H5_DLLVAR hid_t H5E_CANTMERGE_g; /* Can't merge objects */
H5_DLLVAR hid_t H5E_CANTREVIVE_g; /* Can't revive object */
H5_DLLVAR hid_t H5E_CANTSHRINK_g; /* Can't shrink container */
+/* Argument errors */
+#define H5E_UNINITIALIZED (H5OPEN H5E_UNINITIALIZED_g)
+#define H5E_UNSUPPORTED (H5OPEN H5E_UNSUPPORTED_g)
+#define H5E_BADTYPE (H5OPEN H5E_BADTYPE_g)
+#define H5E_BADRANGE (H5OPEN H5E_BADRANGE_g)
+#define H5E_BADVALUE (H5OPEN H5E_BADVALUE_g)
+H5_DLLVAR hid_t H5E_UNINITIALIZED_g; /* Information is uinitialized */
+H5_DLLVAR hid_t H5E_UNSUPPORTED_g; /* Feature is unsupported */
+H5_DLLVAR hid_t H5E_BADTYPE_g; /* Inappropriate type */
+H5_DLLVAR hid_t H5E_BADRANGE_g; /* Out of range */
+H5_DLLVAR hid_t H5E_BADVALUE_g; /* Bad value */
+
/* Object header related errors */
#define H5E_LINKCOUNT (H5OPEN H5E_LINKCOUNT_g)
#define H5E_VERSION (H5OPEN H5E_VERSION_g)
@@ -195,9 +197,41 @@ H5_DLLVAR hid_t H5E_CANTPACK_g; /* Can't pack messages */
H5_DLLVAR hid_t H5E_CANTRESET_g; /* Can't reset object */
H5_DLLVAR hid_t H5E_CANTRENAME_g; /* Unable to rename object */
-/* System level errors */
-#define H5E_SYSERRSTR (H5OPEN H5E_SYSERRSTR_g)
-H5_DLLVAR hid_t H5E_SYSERRSTR_g; /* System error message */
+/* Resource errors */
+#define H5E_NOSPACE (H5OPEN H5E_NOSPACE_g)
+#define H5E_CANTALLOC (H5OPEN H5E_CANTALLOC_g)
+#define H5E_CANTCOPY (H5OPEN H5E_CANTCOPY_g)
+#define H5E_CANTFREE (H5OPEN H5E_CANTFREE_g)
+#define H5E_ALREADYEXISTS (H5OPEN H5E_ALREADYEXISTS_g)
+#define H5E_CANTLOCK (H5OPEN H5E_CANTLOCK_g)
+#define H5E_CANTUNLOCK (H5OPEN H5E_CANTUNLOCK_g)
+#define H5E_CANTGC (H5OPEN H5E_CANTGC_g)
+#define H5E_CANTGETSIZE (H5OPEN H5E_CANTGETSIZE_g)
+#define H5E_OBJOPEN (H5OPEN H5E_OBJOPEN_g)
+H5_DLLVAR hid_t H5E_NOSPACE_g; /* No space available for allocation */
+H5_DLLVAR hid_t H5E_CANTALLOC_g; /* Can't allocate space */
+H5_DLLVAR hid_t H5E_CANTCOPY_g; /* Unable to copy object */
+H5_DLLVAR hid_t H5E_CANTFREE_g; /* Unable to free object */
+H5_DLLVAR hid_t H5E_ALREADYEXISTS_g; /* Object already exists */
+H5_DLLVAR hid_t H5E_CANTLOCK_g; /* Unable to lock object */
+H5_DLLVAR hid_t H5E_CANTUNLOCK_g; /* Unable to unlock object */
+H5_DLLVAR hid_t H5E_CANTGC_g; /* Unable to garbage collect */
+H5_DLLVAR hid_t H5E_CANTGETSIZE_g; /* Unable to compute size */
+H5_DLLVAR hid_t H5E_OBJOPEN_g; /* Object is already open */
+
+/* Object atom related errors */
+#define H5E_BADATOM (H5OPEN H5E_BADATOM_g)
+#define H5E_BADGROUP (H5OPEN H5E_BADGROUP_g)
+#define H5E_CANTREGISTER (H5OPEN H5E_CANTREGISTER_g)
+#define H5E_CANTINC (H5OPEN H5E_CANTINC_g)
+#define H5E_CANTDEC (H5OPEN H5E_CANTDEC_g)
+#define H5E_NOIDS (H5OPEN H5E_NOIDS_g)
+H5_DLLVAR hid_t H5E_BADATOM_g; /* Unable to find atom information (already closed?) */
+H5_DLLVAR hid_t H5E_BADGROUP_g; /* Unable to find ID group information */
+H5_DLLVAR hid_t H5E_CANTREGISTER_g; /* Unable to register new atom */
+H5_DLLVAR hid_t H5E_CANTINC_g; /* Unable to increment reference count */
+H5_DLLVAR hid_t H5E_CANTDEC_g; /* Unable to decrement reference count */
+H5_DLLVAR hid_t H5E_NOIDS_g; /* Out of IDs for group */
/* I/O pipeline errors */
#define H5E_NOFILTER (H5OPEN H5E_NOFILTER_g)
@@ -213,57 +247,57 @@ H5_DLLVAR hid_t H5E_SETLOCAL_g; /* Error from filter 'set local' callback *
H5_DLLVAR hid_t H5E_NOENCODER_g; /* Filter present but encoding disabled */
H5_DLLVAR hid_t H5E_CANTFILTER_g; /* Filter operation failed */
-/* Group related errors */
-#define H5E_CANTOPENOBJ (H5OPEN H5E_CANTOPENOBJ_g)
-#define H5E_CANTCLOSEOBJ (H5OPEN H5E_CANTCLOSEOBJ_g)
-#define H5E_COMPLEN (H5OPEN H5E_COMPLEN_g)
-#define H5E_PATH (H5OPEN H5E_PATH_g)
-H5_DLLVAR hid_t H5E_CANTOPENOBJ_g; /* Can't open object */
-H5_DLLVAR hid_t H5E_CANTCLOSEOBJ_g; /* Can't close object */
-H5_DLLVAR hid_t H5E_COMPLEN_g; /* Name component is too long */
-H5_DLLVAR hid_t H5E_PATH_g; /* Problem with path to object */
-
-/* No error */
-#define H5E_NONE_MINOR (H5OPEN H5E_NONE_MINOR_g)
-H5_DLLVAR hid_t H5E_NONE_MINOR_g; /* No error */
-
-/* Plugin errors */
-#define H5E_OPENERROR (H5OPEN H5E_OPENERROR_g)
-H5_DLLVAR hid_t H5E_OPENERROR_g; /* Can't open directory or file */
+/* Generic low-level file I/O errors */
+#define H5E_SEEKERROR (H5OPEN H5E_SEEKERROR_g)
+#define H5E_READERROR (H5OPEN H5E_READERROR_g)
+#define H5E_WRITEERROR (H5OPEN H5E_WRITEERROR_g)
+#define H5E_CLOSEERROR (H5OPEN H5E_CLOSEERROR_g)
+#define H5E_OVERFLOW (H5OPEN H5E_OVERFLOW_g)
+#define H5E_FCNTL (H5OPEN H5E_FCNTL_g)
+H5_DLLVAR hid_t H5E_SEEKERROR_g; /* Seek failed */
+H5_DLLVAR hid_t H5E_READERROR_g; /* Read failed */
+H5_DLLVAR hid_t H5E_WRITEERROR_g; /* Write failed */
+H5_DLLVAR hid_t H5E_CLOSEERROR_g; /* Close failed */
+H5_DLLVAR hid_t H5E_OVERFLOW_g; /* Address overflowed */
+H5_DLLVAR hid_t H5E_FCNTL_g; /* File control (fcntl) failed */
-/* File accessibilty errors */
-#define H5E_FILEEXISTS (H5OPEN H5E_FILEEXISTS_g)
-#define H5E_FILEOPEN (H5OPEN H5E_FILEOPEN_g)
-#define H5E_CANTCREATE (H5OPEN H5E_CANTCREATE_g)
-#define H5E_CANTOPENFILE (H5OPEN H5E_CANTOPENFILE_g)
-#define H5E_CANTCLOSEFILE (H5OPEN H5E_CANTCLOSEFILE_g)
-#define H5E_NOTHDF5 (H5OPEN H5E_NOTHDF5_g)
-#define H5E_BADFILE (H5OPEN H5E_BADFILE_g)
-#define H5E_TRUNCATED (H5OPEN H5E_TRUNCATED_g)
-#define H5E_MOUNT (H5OPEN H5E_MOUNT_g)
-H5_DLLVAR hid_t H5E_FILEEXISTS_g; /* File already exists */
-H5_DLLVAR hid_t H5E_FILEOPEN_g; /* File already open */
-H5_DLLVAR hid_t H5E_CANTCREATE_g; /* Unable to create file */
-H5_DLLVAR hid_t H5E_CANTOPENFILE_g; /* Unable to open file */
-H5_DLLVAR hid_t H5E_CANTCLOSEFILE_g; /* Unable to close file */
-H5_DLLVAR hid_t H5E_NOTHDF5_g; /* Not an HDF5 file */
-H5_DLLVAR hid_t H5E_BADFILE_g; /* Bad file ID accessed */
-H5_DLLVAR hid_t H5E_TRUNCATED_g; /* File has been truncated */
-H5_DLLVAR hid_t H5E_MOUNT_g; /* File mount error */
+/* Heap errors */
+#define H5E_CANTRESTORE (H5OPEN H5E_CANTRESTORE_g)
+#define H5E_CANTCOMPUTE (H5OPEN H5E_CANTCOMPUTE_g)
+#define H5E_CANTEXTEND (H5OPEN H5E_CANTEXTEND_g)
+#define H5E_CANTATTACH (H5OPEN H5E_CANTATTACH_g)
+#define H5E_CANTUPDATE (H5OPEN H5E_CANTUPDATE_g)
+#define H5E_CANTOPERATE (H5OPEN H5E_CANTOPERATE_g)
+H5_DLLVAR hid_t H5E_CANTRESTORE_g; /* Can't restore condition */
+H5_DLLVAR hid_t H5E_CANTCOMPUTE_g; /* Can't compute value */
+H5_DLLVAR hid_t H5E_CANTEXTEND_g; /* Can't extend heap's space */
+H5_DLLVAR hid_t H5E_CANTATTACH_g; /* Can't attach object */
+H5_DLLVAR hid_t H5E_CANTUPDATE_g; /* Can't update object */
+H5_DLLVAR hid_t H5E_CANTOPERATE_g; /* Can't operate on object */
-/* Object atom related errors */
-#define H5E_BADATOM (H5OPEN H5E_BADATOM_g)
-#define H5E_BADGROUP (H5OPEN H5E_BADGROUP_g)
-#define H5E_CANTREGISTER (H5OPEN H5E_CANTREGISTER_g)
-#define H5E_CANTINC (H5OPEN H5E_CANTINC_g)
-#define H5E_CANTDEC (H5OPEN H5E_CANTDEC_g)
-#define H5E_NOIDS (H5OPEN H5E_NOIDS_g)
-H5_DLLVAR hid_t H5E_BADATOM_g; /* Unable to find atom information (already closed?) */
-H5_DLLVAR hid_t H5E_BADGROUP_g; /* Unable to find ID group information */
-H5_DLLVAR hid_t H5E_CANTREGISTER_g; /* Unable to register new atom */
-H5_DLLVAR hid_t H5E_CANTINC_g; /* Unable to increment reference count */
-H5_DLLVAR hid_t H5E_CANTDEC_g; /* Unable to decrement reference count */
-H5_DLLVAR hid_t H5E_NOIDS_g; /* Out of IDs for group */
+/* B-tree related errors */
+#define H5E_NOTFOUND (H5OPEN H5E_NOTFOUND_g)
+#define H5E_EXISTS (H5OPEN H5E_EXISTS_g)
+#define H5E_CANTENCODE (H5OPEN H5E_CANTENCODE_g)
+#define H5E_CANTDECODE (H5OPEN H5E_CANTDECODE_g)
+#define H5E_CANTSPLIT (H5OPEN H5E_CANTSPLIT_g)
+#define H5E_CANTREDISTRIBUTE (H5OPEN H5E_CANTREDISTRIBUTE_g)
+#define H5E_CANTSWAP (H5OPEN H5E_CANTSWAP_g)
+#define H5E_CANTINSERT (H5OPEN H5E_CANTINSERT_g)
+#define H5E_CANTLIST (H5OPEN H5E_CANTLIST_g)
+#define H5E_CANTMODIFY (H5OPEN H5E_CANTMODIFY_g)
+#define H5E_CANTREMOVE (H5OPEN H5E_CANTREMOVE_g)
+H5_DLLVAR hid_t H5E_NOTFOUND_g; /* Object not found */
+H5_DLLVAR hid_t H5E_EXISTS_g; /* Object already exists */
+H5_DLLVAR hid_t H5E_CANTENCODE_g; /* Unable to encode value */
+H5_DLLVAR hid_t H5E_CANTDECODE_g; /* Unable to decode value */
+H5_DLLVAR hid_t H5E_CANTSPLIT_g; /* Unable to split node */
+H5_DLLVAR hid_t H5E_CANTREDISTRIBUTE_g; /* Unable to redistribute records */
+H5_DLLVAR hid_t H5E_CANTSWAP_g; /* Unable to swap records */
+H5_DLLVAR hid_t H5E_CANTINSERT_g; /* Unable to insert object */
+H5_DLLVAR hid_t H5E_CANTLIST_g; /* Unable to list node */
+H5_DLLVAR hid_t H5E_CANTMODIFY_g; /* Unable to modify record */
+H5_DLLVAR hid_t H5E_CANTREMOVE_g; /* Unable to remove object */
/* Cache related errors */
#define H5E_CANTFLUSH (H5OPEN H5E_CANTFLUSH_g)
@@ -323,6 +357,30 @@ H5_DLLVAR hid_t H5E_NOTREGISTERED_g; /* Link class not registered */
H5_DLLVAR hid_t H5E_CANTMOVE_g; /* Can't move object */
H5_DLLVAR hid_t H5E_CANTSORT_g; /* Can't sort objects */
+/* Property list errors */
+#define H5E_CANTGET (H5OPEN H5E_CANTGET_g)
+#define H5E_CANTSET (H5OPEN H5E_CANTSET_g)
+#define H5E_DUPCLASS (H5OPEN H5E_DUPCLASS_g)
+#define H5E_SETDISALLOWED (H5OPEN H5E_SETDISALLOWED_g)
+H5_DLLVAR hid_t H5E_CANTGET_g; /* Can't get value */
+H5_DLLVAR hid_t H5E_CANTSET_g; /* Can't set value */
+H5_DLLVAR hid_t H5E_DUPCLASS_g; /* Duplicate class name in parent class */
+H5_DLLVAR hid_t H5E_SETDISALLOWED_g; /* Disallowed operation */
+
+/* Group related errors */
+#define H5E_CANTOPENOBJ (H5OPEN H5E_CANTOPENOBJ_g)
+#define H5E_CANTCLOSEOBJ (H5OPEN H5E_CANTCLOSEOBJ_g)
+#define H5E_COMPLEN (H5OPEN H5E_COMPLEN_g)
+#define H5E_PATH (H5OPEN H5E_PATH_g)
+H5_DLLVAR hid_t H5E_CANTOPENOBJ_g; /* Can't open object */
+H5_DLLVAR hid_t H5E_CANTCLOSEOBJ_g; /* Can't close object */
+H5_DLLVAR hid_t H5E_COMPLEN_g; /* Name component is too long */
+H5_DLLVAR hid_t H5E_PATH_g; /* Problem with path to object */
+
+/* No error */
+#define H5E_NONE_MINOR (H5OPEN H5E_NONE_MINOR_g)
+H5_DLLVAR hid_t H5E_NONE_MINOR_g; /* No error */
+
/* Parallel MPI errors */
#define H5E_MPI (H5OPEN H5E_MPI_g)
#define H5E_MPIERRSTR (H5OPEN H5E_MPIERRSTR_g)
@@ -331,64 +389,6 @@ H5_DLLVAR hid_t H5E_MPI_g; /* Some MPI function failed */
H5_DLLVAR hid_t H5E_MPIERRSTR_g; /* MPI Error String */
H5_DLLVAR hid_t H5E_CANTRECV_g; /* Can't receive data */
-/* Dataspace errors */
-#define H5E_CANTCLIP (H5OPEN H5E_CANTCLIP_g)
-#define H5E_CANTCOUNT (H5OPEN H5E_CANTCOUNT_g)
-#define H5E_CANTSELECT (H5OPEN H5E_CANTSELECT_g)
-#define H5E_CANTNEXT (H5OPEN H5E_CANTNEXT_g)
-#define H5E_BADSELECT (H5OPEN H5E_BADSELECT_g)
-#define H5E_CANTCOMPARE (H5OPEN H5E_CANTCOMPARE_g)
-#define H5E_CANTAPPEND (H5OPEN H5E_CANTAPPEND_g)
-H5_DLLVAR hid_t H5E_CANTCLIP_g; /* Can't clip hyperslab region */
-H5_DLLVAR hid_t H5E_CANTCOUNT_g; /* Can't count elements */
-H5_DLLVAR hid_t H5E_CANTSELECT_g; /* Can't select hyperslab */
-H5_DLLVAR hid_t H5E_CANTNEXT_g; /* Can't move to next iterator location */
-H5_DLLVAR hid_t H5E_BADSELECT_g; /* Invalid selection */
-H5_DLLVAR hid_t H5E_CANTCOMPARE_g; /* Can't compare objects */
-H5_DLLVAR hid_t H5E_CANTAPPEND_g; /* Can't append object */
-
-/* Argument errors */
-#define H5E_UNINITIALIZED (H5OPEN H5E_UNINITIALIZED_g)
-#define H5E_UNSUPPORTED (H5OPEN H5E_UNSUPPORTED_g)
-#define H5E_BADTYPE (H5OPEN H5E_BADTYPE_g)
-#define H5E_BADRANGE (H5OPEN H5E_BADRANGE_g)
-#define H5E_BADVALUE (H5OPEN H5E_BADVALUE_g)
-H5_DLLVAR hid_t H5E_UNINITIALIZED_g; /* Information is uinitialized */
-H5_DLLVAR hid_t H5E_UNSUPPORTED_g; /* Feature is unsupported */
-H5_DLLVAR hid_t H5E_BADTYPE_g; /* Inappropriate type */
-H5_DLLVAR hid_t H5E_BADRANGE_g; /* Out of range */
-H5_DLLVAR hid_t H5E_BADVALUE_g; /* Bad value */
-
-/* B-tree related errors */
-#define H5E_NOTFOUND (H5OPEN H5E_NOTFOUND_g)
-#define H5E_EXISTS (H5OPEN H5E_EXISTS_g)
-#define H5E_CANTENCODE (H5OPEN H5E_CANTENCODE_g)
-#define H5E_CANTDECODE (H5OPEN H5E_CANTDECODE_g)
-#define H5E_CANTSPLIT (H5OPEN H5E_CANTSPLIT_g)
-#define H5E_CANTREDISTRIBUTE (H5OPEN H5E_CANTREDISTRIBUTE_g)
-#define H5E_CANTSWAP (H5OPEN H5E_CANTSWAP_g)
-#define H5E_CANTINSERT (H5OPEN H5E_CANTINSERT_g)
-#define H5E_CANTLIST (H5OPEN H5E_CANTLIST_g)
-#define H5E_CANTMODIFY (H5OPEN H5E_CANTMODIFY_g)
-#define H5E_CANTREMOVE (H5OPEN H5E_CANTREMOVE_g)
-H5_DLLVAR hid_t H5E_NOTFOUND_g; /* Object not found */
-H5_DLLVAR hid_t H5E_EXISTS_g; /* Object already exists */
-H5_DLLVAR hid_t H5E_CANTENCODE_g; /* Unable to encode value */
-H5_DLLVAR hid_t H5E_CANTDECODE_g; /* Unable to decode value */
-H5_DLLVAR hid_t H5E_CANTSPLIT_g; /* Unable to split node */
-H5_DLLVAR hid_t H5E_CANTREDISTRIBUTE_g; /* Unable to redistribute records */
-H5_DLLVAR hid_t H5E_CANTSWAP_g; /* Unable to swap records */
-H5_DLLVAR hid_t H5E_CANTINSERT_g; /* Unable to insert object */
-H5_DLLVAR hid_t H5E_CANTLIST_g; /* Unable to list node */
-H5_DLLVAR hid_t H5E_CANTMODIFY_g; /* Unable to modify record */
-H5_DLLVAR hid_t H5E_CANTREMOVE_g; /* Unable to remove object */
-
-/* Datatype conversion errors */
-#define H5E_CANTCONVERT (H5OPEN H5E_CANTCONVERT_g)
-#define H5E_BADSIZE (H5OPEN H5E_BADSIZE_g)
-H5_DLLVAR hid_t H5E_CANTCONVERT_g; /* Can't convert datatypes */
-H5_DLLVAR hid_t H5E_BADSIZE_g; /* Bad size for object */
-
#ifdef __cplusplus
}
#endif
diff --git a/src/H5Eterm.h b/src/H5Eterm.h
index 49c0d18..afbfc02 100644
--- a/src/H5Eterm.h
+++ b/src/H5Eterm.h
@@ -22,87 +22,90 @@
/* Reset major error IDs */
-H5E_FUNC_g=
-H5E_FILE_g=
-H5E_SOHM_g=
H5E_SYM_g=
-H5E_PLUGIN_g=
-H5E_VFL_g=
-H5E_INTERNAL_g=
-H5E_BTREE_g=
-H5E_REFERENCE_g=
-H5E_DATASPACE_g=
+H5E_IO_g=
H5E_RESOURCE_g=
-H5E_RS_g=
-H5E_FARRAY_g=
+H5E_FUNC_g=
+H5E_ERROR_g=
+H5E_INTERNAL_g=
+H5E_CACHE_g=
+H5E_FSPACE_g=
+H5E_SLIST_g=
H5E_HEAP_g=
-H5E_ATTR_g=
-H5E_IO_g=
+H5E_DATATYPE_g=
+H5E_VFL_g=
H5E_EFL_g=
+H5E_DATASPACE_g=
+H5E_PLINE_g=
+H5E_SOHM_g=
H5E_TST_g=
-H5E_FSPACE_g=
-H5E_DATASET_g=
+H5E_EARRAY_g=
+H5E_RS_g=
+H5E_ATOM_g=
+H5E_NONE_MAJOR_g=
+H5E_BTREE_g=
+H5E_ARGS_g=
H5E_STORAGE_g=
+H5E_FILE_g=
+H5E_ATTR_g=
+H5E_FARRAY_g=
+H5E_REFERENCE_g=
H5E_LINK_g=
H5E_PLIST_g=
-H5E_DATATYPE_g=
H5E_OHDR_g=
-H5E_ATOM_g=
-H5E_NONE_MAJOR_g=
-H5E_SLIST_g=
-H5E_ARGS_g=
-H5E_EARRAY_g=
-H5E_PLINE_g=
-H5E_ERROR_g=
-H5E_CACHE_g= (-1);
+H5E_PLUGIN_g=
+H5E_DATASET_g= (-1);
/* Reset minor error IDs */
-/* Generic low-level file I/O errors */
-H5E_SEEKERROR_g=
-H5E_READERROR_g=
-H5E_WRITEERROR_g=
-H5E_CLOSEERROR_g=
-H5E_OVERFLOW_g=
-H5E_FCNTL_g=
+/* File accessibilty errors */
+H5E_FILEEXISTS_g=
+H5E_FILEOPEN_g=
+H5E_CANTCREATE_g=
+H5E_CANTOPENFILE_g=
+H5E_CANTCLOSEFILE_g=
+H5E_NOTHDF5_g=
+H5E_BADFILE_g=
+H5E_TRUNCATED_g=
+H5E_MOUNT_g=
-/* Resource errors */
-H5E_NOSPACE_g=
-H5E_CANTALLOC_g=
-H5E_CANTCOPY_g=
-H5E_CANTFREE_g=
-H5E_ALREADYEXISTS_g=
-H5E_CANTLOCK_g=
-H5E_CANTUNLOCK_g=
-H5E_CANTGC_g=
-H5E_CANTGETSIZE_g=
-H5E_OBJOPEN_g=
+/* System level errors */
+H5E_SYSERRSTR_g=
-/* Heap errors */
-H5E_CANTRESTORE_g=
-H5E_CANTCOMPUTE_g=
-H5E_CANTEXTEND_g=
-H5E_CANTATTACH_g=
-H5E_CANTUPDATE_g=
-H5E_CANTOPERATE_g=
+/* Plugin errors */
+H5E_OPENERROR_g=
+
+/* Dataspace errors */
+H5E_CANTCLIP_g=
+H5E_CANTCOUNT_g=
+H5E_CANTSELECT_g=
+H5E_CANTNEXT_g=
+H5E_BADSELECT_g=
+H5E_CANTCOMPARE_g=
+H5E_CANTAPPEND_g=
/* Function entry/exit interface errors */
H5E_CANTINIT_g=
H5E_ALREADYINIT_g=
H5E_CANTRELEASE_g=
-/* Property list errors */
-H5E_CANTGET_g=
-H5E_CANTSET_g=
-H5E_DUPCLASS_g=
-H5E_SETDISALLOWED_g=
+/* Datatype conversion errors */
+H5E_CANTCONVERT_g=
+H5E_BADSIZE_g=
/* Free space errors */
H5E_CANTMERGE_g=
H5E_CANTREVIVE_g=
H5E_CANTSHRINK_g=
+/* Argument errors */
+H5E_UNINITIALIZED_g=
+H5E_UNSUPPORTED_g=
+H5E_BADTYPE_g=
+H5E_BADRANGE_g=
+H5E_BADVALUE_g=
+
/* Object header related errors */
H5E_LINKCOUNT_g=
H5E_VERSION_g=
@@ -114,8 +117,25 @@ H5E_CANTPACK_g=
H5E_CANTRESET_g=
H5E_CANTRENAME_g=
-/* System level errors */
-H5E_SYSERRSTR_g=
+/* Resource errors */
+H5E_NOSPACE_g=
+H5E_CANTALLOC_g=
+H5E_CANTCOPY_g=
+H5E_CANTFREE_g=
+H5E_ALREADYEXISTS_g=
+H5E_CANTLOCK_g=
+H5E_CANTUNLOCK_g=
+H5E_CANTGC_g=
+H5E_CANTGETSIZE_g=
+H5E_OBJOPEN_g=
+
+/* Object atom related errors */
+H5E_BADATOM_g=
+H5E_BADGROUP_g=
+H5E_CANTREGISTER_g=
+H5E_CANTINC_g=
+H5E_CANTDEC_g=
+H5E_NOIDS_g=
/* I/O pipeline errors */
H5E_NOFILTER_g=
@@ -125,36 +145,34 @@ H5E_SETLOCAL_g=
H5E_NOENCODER_g=
H5E_CANTFILTER_g=
-/* Group related errors */
-H5E_CANTOPENOBJ_g=
-H5E_CANTCLOSEOBJ_g=
-H5E_COMPLEN_g=
-H5E_PATH_g=
-
-/* No error */
-H5E_NONE_MINOR_g=
-
-/* Plugin errors */
-H5E_OPENERROR_g=
+/* Generic low-level file I/O errors */
+H5E_SEEKERROR_g=
+H5E_READERROR_g=
+H5E_WRITEERROR_g=
+H5E_CLOSEERROR_g=
+H5E_OVERFLOW_g=
+H5E_FCNTL_g=
-/* File accessibilty errors */
-H5E_FILEEXISTS_g=
-H5E_FILEOPEN_g=
-H5E_CANTCREATE_g=
-H5E_CANTOPENFILE_g=
-H5E_CANTCLOSEFILE_g=
-H5E_NOTHDF5_g=
-H5E_BADFILE_g=
-H5E_TRUNCATED_g=
-H5E_MOUNT_g=
+/* Heap errors */
+H5E_CANTRESTORE_g=
+H5E_CANTCOMPUTE_g=
+H5E_CANTEXTEND_g=
+H5E_CANTATTACH_g=
+H5E_CANTUPDATE_g=
+H5E_CANTOPERATE_g=
-/* Object atom related errors */
-H5E_BADATOM_g=
-H5E_BADGROUP_g=
-H5E_CANTREGISTER_g=
-H5E_CANTINC_g=
-H5E_CANTDEC_g=
-H5E_NOIDS_g=
+/* B-tree related errors */
+H5E_NOTFOUND_g=
+H5E_EXISTS_g=
+H5E_CANTENCODE_g=
+H5E_CANTDECODE_g=
+H5E_CANTSPLIT_g=
+H5E_CANTREDISTRIBUTE_g=
+H5E_CANTSWAP_g=
+H5E_CANTINSERT_g=
+H5E_CANTLIST_g=
+H5E_CANTMODIFY_g=
+H5E_CANTREMOVE_g=
/* Cache related errors */
H5E_CANTFLUSH_g=
@@ -187,42 +205,24 @@ H5E_NOTREGISTERED_g=
H5E_CANTMOVE_g=
H5E_CANTSORT_g=
-/* Parallel MPI errors */
-H5E_MPI_g=
-H5E_MPIERRSTR_g=
-H5E_CANTRECV_g=
-
-/* Dataspace errors */
-H5E_CANTCLIP_g=
-H5E_CANTCOUNT_g=
-H5E_CANTSELECT_g=
-H5E_CANTNEXT_g=
-H5E_BADSELECT_g=
-H5E_CANTCOMPARE_g=
-H5E_CANTAPPEND_g=
+/* Property list errors */
+H5E_CANTGET_g=
+H5E_CANTSET_g=
+H5E_DUPCLASS_g=
+H5E_SETDISALLOWED_g=
-/* Argument errors */
-H5E_UNINITIALIZED_g=
-H5E_UNSUPPORTED_g=
-H5E_BADTYPE_g=
-H5E_BADRANGE_g=
-H5E_BADVALUE_g=
+/* Group related errors */
+H5E_CANTOPENOBJ_g=
+H5E_CANTCLOSEOBJ_g=
+H5E_COMPLEN_g=
+H5E_PATH_g=
-/* B-tree related errors */
-H5E_NOTFOUND_g=
-H5E_EXISTS_g=
-H5E_CANTENCODE_g=
-H5E_CANTDECODE_g=
-H5E_CANTSPLIT_g=
-H5E_CANTREDISTRIBUTE_g=
-H5E_CANTSWAP_g=
-H5E_CANTINSERT_g=
-H5E_CANTLIST_g=
-H5E_CANTMODIFY_g=
-H5E_CANTREMOVE_g=
+/* No error */
+H5E_NONE_MINOR_g=
-/* Datatype conversion errors */
-H5E_CANTCONVERT_g=
-H5E_BADSIZE_g= (-1);
+/* Parallel MPI errors */
+H5E_MPI_g=
+H5E_MPIERRSTR_g=
+H5E_CANTRECV_g= (-1);
#endif /* H5Eterm_H */
diff --git a/src/H5F.c b/src/H5F.c
index e54c49d..19a9c1d 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -406,7 +406,7 @@ H5Fis_hdf5(const char *name)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "no file name specified")
/* call the private is_HDF5 function */
- if((ret_value = H5F_is_hdf5(name)) < 0)
+ if((ret_value = H5F_is_hdf5(name, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "unable open file")
done:
@@ -446,7 +446,8 @@ hid_t
H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
{
H5F_t *new_file = NULL; /*file struct for new file */
- hid_t ret_value; /*return value */
+ hid_t dxpl_id = H5AC_dxpl_id; /*dxpl used by library */
+ hid_t ret_value; /*return value */
FUNC_ENTER_API(FAIL)
H5TRACE4("i", "*sIuii", filename, flags, fcpl_id, fapl_id);
@@ -470,12 +471,9 @@ H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
if(TRUE != H5P_isa_class(fcpl_id, H5P_FILE_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not file create property list")
- /* Check the file access property list */
- if(H5P_DEFAULT == fapl_id)
- fapl_id = H5P_FILE_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not file access property list")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&fapl_id, H5P_CLS_FACC, &dxpl_id, H5I_INVALID_HID, TRUE) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/*
* Adjust bit flags by turning on the creation bit and making sure that
@@ -489,7 +487,7 @@ H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
/*
* Create a new file or truncate an existing file.
*/
- if(NULL == (new_file = H5F_open(filename, flags, fcpl_id, fapl_id, H5AC_dxpl_id)))
+ if(NULL == (new_file = H5F_open(filename, flags, fcpl_id, fapl_id, dxpl_id)))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to create file")
/* Get an atom for the file */
@@ -552,7 +550,8 @@ hid_t
H5Fopen(const char *filename, unsigned flags, hid_t fapl_id)
{
H5F_t *new_file = NULL; /*file struct for new file */
- hid_t ret_value; /*return value */
+ hid_t dxpl_id = H5AC_dxpl_id; /*dxpl used by library */
+ hid_t ret_value; /*return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("i", "*sIui", filename, flags, fapl_id);
@@ -570,14 +569,13 @@ H5Fopen(const char *filename, unsigned flags, hid_t fapl_id)
/* Asking for SWMR read access on a non-read-only file is invalid */
if((flags & H5F_ACC_SWMR_READ) && (flags & H5F_ACC_RDWR))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "SWMR read access on a file open for read-write access is not allowed")
- if(H5P_DEFAULT == fapl_id)
- fapl_id = H5P_FILE_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not file access property list")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&fapl_id, H5P_CLS_FACC, &dxpl_id, H5I_INVALID_HID, TRUE) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Open the file */
- if(NULL == (new_file = H5F_open(filename, flags, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id)))
+ if(NULL == (new_file = H5F_open(filename, flags, H5P_FILE_CREATE_DEFAULT, fapl_id, dxpl_id)))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to open file")
/* Get an atom for the file */
@@ -919,7 +917,7 @@ H5Fget_freespace(hid_t file_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
/* Go get the actual amount of free space in the file */
- if(H5MF_get_freespace(file, H5AC_ind_dxpl_id, &tot_space, NULL) < 0)
+ if(H5MF_get_freespace(file, H5AC_dxpl_id, &tot_space, NULL) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to check free space for file")
ret_value = (hssize_t)tot_space;
@@ -1033,7 +1031,7 @@ H5Fget_file_image(hid_t file_id, void *buf_ptr, size_t buf_len)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
/* call private get_file_image function */
- if((ret_value = H5F_get_file_image(file, buf_ptr, buf_len)) < 0)
+ if((ret_value = H5F_get_file_image(file, buf_ptr, buf_len, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file image")
done:
@@ -1366,16 +1364,16 @@ H5Fget_info2(hid_t obj_id, H5F_info2_t *finfo)
HDmemset(finfo, 0, sizeof(*finfo));
/* Get the size of the superblock and any superblock extensions */
- if(H5F__super_size(f, H5AC_ind_dxpl_id, &finfo->super.super_size, &finfo->super.super_ext_size) < 0)
+ if(H5F__super_size(f, H5AC_dxpl_id, &finfo->super.super_size, &finfo->super.super_ext_size) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve superblock sizes")
/* Get the size of any persistent free space */
- if(H5MF_get_freespace(f, H5AC_ind_dxpl_id, &finfo->free.tot_space, &finfo->free.meta_size) < 0)
+ if(H5MF_get_freespace(f, H5AC_dxpl_id, &finfo->free.tot_space, &finfo->free.meta_size) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve free space information")
/* Check for SOHM info */
if(H5F_addr_defined(f->shared->sohm_addr))
- if(H5SM_ih_size(f, H5AC_ind_dxpl_id, &finfo->sohm.hdr_size, &finfo->sohm.msgs_info) < 0)
+ if(H5SM_ih_size(f, H5AC_dxpl_id, &finfo->sohm.hdr_size, &finfo->sohm.msgs_info) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve SOHM index & heap storage info")
/* Set version # fields */
@@ -1513,7 +1511,7 @@ H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "nsects must be > 0")
/* Go get the free-space section information in the file */
- if((ret_value = H5MF_get_free_sections(file, H5AC_ind_dxpl_id, type, nsects, sect_info)) < 0)
+ if((ret_value = H5MF_get_free_sections(file, H5AC_dxpl_id, type, nsects, sect_info)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to check free space for file")
done:
@@ -1877,8 +1875,9 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Fformat_convert_super (Internal)
*
- * Purpose: Downgrade the superblock version for the tool h5format_convert.
- * (NOTE: more needs to be done to this routine)
+ * Purpose: Downgrade the superblock version to v2 and
+ * downgrade persistent file space to non-persistent
+ * for 1.8 library.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1887,9 +1886,10 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Fformat_convert_super(hid_t fid)
+H5Fformat_convert(hid_t fid)
{
H5F_t *f = NULL; /* File to flush */
+ hbool_t mark_dirty = FALSE;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1899,13 +1899,37 @@ H5Fformat_convert_super(hid_t fid)
case H5I_FILE:
if(NULL == (f = (H5F_t *)H5I_object(fid)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
- if(f->shared->sblock->super_vers < HDF5_SUPERBLOCK_VERSION_LATEST)
+
+ if(f->shared->sblock->super_vers > HDF5_SUPERBLOCK_VERSION_V18_LATEST) {
+ f->shared->sblock->super_vers = HDF5_SUPERBLOCK_VERSION_V18_LATEST;
+ mark_dirty = TRUE;
+ }
+
+ if(f->shared->fs_strategy == H5F_FILE_SPACE_STRATEGY_DEF &&
+ f->shared->fs_threshold == H5F_FREE_SPACE_THRESHOLD_DEF) {
+ if(mark_dirty) {
+ /* Mark superblock as dirty */
+ if(H5F_super_dirty(f) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty")
+ }
HGOTO_DONE(SUCCEED)
- f->shared->sblock->super_vers = HDF5_SUPERBLOCK_VERSION_LATEST - 1;
+ }
+
+ /* Check to remove free-space manager info message from superblock extension */
+ if(H5F_addr_defined(f->shared->sblock->ext_addr)) {
+ if(H5F_super_ext_remove_msg(f, H5AC_dxpl_id, H5O_FSINFO_ID) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "error in removing message from superblock extension")
+ }
+
+ if(H5MF_try_close(f, H5AC_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "unable to free free-space address")
+
+ f->shared->fs_strategy = H5F_FILE_SPACE_STRATEGY_DEF;
+ f->shared->fs_threshold = H5F_FREE_SPACE_THRESHOLD_DEF;
/* Mark superblock as dirty */
if(H5F_super_dirty(f) < 0)
- HDONE_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty")
+ HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty")
break;
@@ -1930,4 +1954,4 @@ H5Fformat_convert_super(hid_t fid)
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Fformat_convert_super() */
+} /* end H5Fformat_convert() */
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index f4aa240..778baa0 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -1295,9 +1295,7 @@ H5FD__core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate memory block of %llu bytes", (unsigned long long)new_eof)
} /* end else */
-#ifdef H5_CLEAR_MEMORY
HDmemset(x + file->eof, 0, (size_t)(new_eof - file->eof));
-#endif /* H5_CLEAR_MEMORY */
file->mem = x;
file->eof = new_eof;
@@ -1469,10 +1467,8 @@ H5FD__core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate memory block")
} /* end else */
-#ifdef H5_CLEAR_MEMORY
if(file->eof < new_eof)
HDmemset(x + file->eof, 0, (size_t)(new_eof - file->eof));
-#endif /* H5_CLEAR_MEMORY */
file->mem = x;
/* Update backing store, if using it and if closing */
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index b3ef1f2..bbd3eca 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -96,12 +96,6 @@ static int H5FD_mpio_mpi_rank(const H5FD_t *_file);
static int H5FD_mpio_mpi_size(const H5FD_t *_file);
static MPI_Comm H5FD_mpio_communicator(const H5FD_t *_file);
-/* MPIO-specific file access properties */
-typedef struct H5FD_mpio_fapl_t {
- MPI_Comm comm; /*communicator */
- MPI_Info info; /*file information */
-} H5FD_mpio_fapl_t;
-
/* The MPIO file driver information */
static const H5FD_class_mpi_t H5FD_mpio_g = {
{ /* Start of superclass information */
@@ -1436,7 +1430,7 @@ H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t dxpl_id, had
#endif
/* Only look for MPI views for raw data transfers */
- if(type==H5FD_MEM_DRAW) {
+ if(type == H5FD_MEM_DRAW) {
H5FD_mpio_xfer_t xfer_mode; /* I/O tranfer mode */
/* Obtain the data transfer properties */
@@ -1793,6 +1787,7 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
if(H5FD_mpio_Debug[(int)'t'])
fprintf(stdout, "H5FD_mpio_write: using MPIO collective mode\n");
#endif
+
/* Get the collective_opt property to check whether the application wants to do IO individually. */
HDassert(plist);
/* get the transfer mode from the dxpl */
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index 2c18659..852e7af 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -96,6 +96,14 @@ typedef struct {
const void *driver_info; /* Driver info, for open callbacks */
} H5FD_driver_prop_t;
+#ifdef H5_HAVE_PARALLEL
+/* MPIO-specific file access properties */
+typedef struct H5FD_mpio_fapl_t {
+ MPI_Comm comm; /*communicator */
+ MPI_Info info; /*file information */
+} H5FD_mpio_fapl_t;
+#endif /* H5_HAVE_PARALLEL */
+
/*****************************/
/* Library Private Variables */
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index bc0b342..13ccd5c 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -127,23 +127,14 @@ typedef struct H5FD_stdio_t {
#endif /* H5_HAVE_MINGW */
#endif /* H5_HAVE_WIN32_API */
-/* Use file_xxx to indicate these are local macros, avoiding confusing
- * with the global HD_xxx macros.
- * Assume fseeko, which is POSIX standard, is always supported;
- * but prefer to use fseeko64 if supported.
+/* If these functions weren't re-defined for Windows, give them
+ * more platform-independent names.
*/
#ifndef file_fseek
- #ifdef H5_HAVE_FSEEKO64
- #define file_fseek fseeko64
- #define file_offset_t off64_t
- #define file_ftruncate ftruncate64
- #define file_ftell ftello64
- #else
- #define file_fseek fseeko
- #define file_offset_t off_t
- #define file_ftruncate ftruncate
- #define file_ftell ftello
- #endif /* H5_HAVE_FSEEKO64 */
+ #define file_fseek fseeko
+ #define file_offset_t off_t
+ #define file_ftruncate ftruncate
+ #define file_ftell ftello
#endif /* file_fseek */
/* These macros check for overflow of various quantities. These macros
diff --git a/src/H5Faccum.c b/src/H5Faccum.c
index d8cd614..ef7c827 100644
--- a/src/H5Faccum.c
+++ b/src/H5Faccum.c
@@ -164,9 +164,9 @@ H5F__accum_read(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr,
/* Note the new buffer size */
accum->alloc_size = new_alloc_size;
-#ifdef H5_CLEAR_MEMORY
- HDmemset(accum->buf + accum->size, 0, (accum->alloc_size - accum->size));
-#endif /* H5_CLEAR_MEMORY */
+
+ /* Clear the memory */
+ HDmemset(accum->buf + accum->size, 0, (accum->alloc_size - accum->size));
} /* end if */
/* Read the part before the metadata accumulator */
@@ -395,9 +395,9 @@ H5F__accum_adjust(H5F_meta_accum_t *accum, const H5F_io_info_t *fio_info,
/* Update accumulator info */
accum->buf = new_buf;
accum->alloc_size = new_size;
-#ifdef H5_CLEAR_MEMORY
-HDmemset(accum->buf + accum->size, 0, (accum->alloc_size - (accum->size + size)));
-#endif /* H5_CLEAR_MEMORY */
+
+ /* Clear the memory */
+ HDmemset(accum->buf + accum->size, 0, (accum->alloc_size - (accum->size + size)));
} /* end if */
} /* end if */
@@ -628,9 +628,9 @@ H5F__accum_write(const H5F_io_info_t *fio_info, H5FD_mem_t type, haddr_t addr,
/* Note the new buffer size */
accum->alloc_size = new_alloc_size;
-#ifdef H5_CLEAR_MEMORY
-HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
-#endif /* H5_CLEAR_MEMORY */
+
+ /* Clear the memory */
+ HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
} /* end if */
/* Copy the new metadata to the buffer */
@@ -661,6 +661,7 @@ HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
/* Check if we need to resize the buffer */
if(size > accum->alloc_size) {
size_t new_size; /* New size of accumulator */
+ size_t clear_size; /* Size of memory that needs clearing */
/* Adjust the buffer size to be a power of 2 that is large enough to hold data */
new_size = (size_t)1 << (1 + H5VM_log2_gen((uint64_t)(size - 1)));
@@ -671,12 +672,10 @@ HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
/* Note the new buffer size */
accum->alloc_size = new_size;
-#ifdef H5_CLEAR_MEMORY
-{
-size_t clear_size = MAX(accum->size, size);
-HDmemset(accum->buf + clear_size, 0, (accum->alloc_size - clear_size));
-}
-#endif /* H5_CLEAR_MEMORY */
+
+ /* Clear the memory */
+ clear_size = MAX(accum->size, size);
+ HDmemset(accum->buf + clear_size, 0, (accum->alloc_size - clear_size));
} /* end if */
else {
/* Check if we should shrink the accumulator buffer */
@@ -721,9 +720,9 @@ HDmemset(accum->buf + clear_size, 0, (accum->alloc_size - clear_size));
/* Note the new buffer size */
accum->alloc_size = new_size;
-#ifdef H5_CLEAR_MEMORY
-HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
-#endif /* H5_CLEAR_MEMORY */
+
+ /* Clear the memory */
+ HDmemset(accum->buf + size, 0, (accum->alloc_size - size));
} /* end if */
/* Update the metadata accumulator information */
diff --git a/src/H5Fdeprec.c b/src/H5Fdeprec.c
index d16e2d4..c995d5d 100644
--- a/src/H5Fdeprec.c
+++ b/src/H5Fdeprec.c
@@ -133,12 +133,12 @@ H5Fget_info1(hid_t obj_id, H5F_info1_t *finfo)
HDmemset(finfo, 0, sizeof(*finfo));
/* Get the size of the superblock extension */
- if(H5F__super_size(f, H5AC_ind_dxpl_id, NULL, &finfo->super_ext_size) < 0)
+ if(H5F__super_size(f, H5AC_dxpl_id, NULL, &finfo->super_ext_size) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve superblock extension size")
/* Check for SOHM info */
if(H5F_addr_defined(f->shared->sohm_addr))
- if(H5SM_ih_size(f, H5AC_ind_dxpl_id, &finfo->sohm.hdr_size, &finfo->sohm.msgs_info) < 0)
+ if(H5SM_ih_size(f, H5AC_dxpl_id, &finfo->sohm.hdr_size, &finfo->sohm.msgs_info) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve SOHM index & heap storage info")
done:
diff --git a/src/H5Fint.c b/src/H5Fint.c
index b6cc1f1..7f723e0 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -509,10 +509,11 @@ done:
*-------------------------------------------------------------------------
*/
htri_t
-H5F_is_hdf5(const char *name)
+H5F_is_hdf5(const char *name, hid_t dxpl_id)
{
H5FD_t *file = NULL; /* Low-level file struct */
haddr_t sig_addr; /* Addess of hdf5 file signature */
+ H5P_genplist_t *xfer_plist= NULL; /* Dataset transfer property list object */
htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -521,8 +522,12 @@ H5F_is_hdf5(const char *name)
if(NULL == (file = H5FD_open(name, H5F_ACC_RDONLY, H5P_FILE_ACCESS_DEFAULT, HADDR_UNDEF)))
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to open file")
+ /* Get the property list object */
+ if(NULL == (xfer_plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get new property list object")
+
/* The file is an hdf5 file if the hdf5 file signature can be found */
- if(H5FD_locate_signature(file, H5AC_ind_dxpl_g, &sig_addr) < 0)
+ if(H5FD_locate_signature(file, xfer_plist, &sig_addr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, FAIL, "unable to locate file signature")
ret_value = (HADDR_UNDEF != sig_addr);
@@ -2131,7 +2136,7 @@ H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag)
*-------------------------------------------------------------------------
*/
ssize_t
-H5F_get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len)
+H5F_get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len, hid_t dxpl_id)
{
H5FD_t *fd_ptr; /* file driver */
haddr_t eoa; /* End of file address */
@@ -2199,8 +2204,9 @@ H5F_get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len)
/* test to see if a buffer was provided -- if not, we are done */
if(buf_ptr != NULL) {
size_t space_needed; /* size of file image */
- hsize_t tmp;
+ hsize_t tmp;
size_t tmp_size;
+ H5P_genplist_t *xfer_plist= NULL; /* Dataset transfer property list object */
/* Check for buffer too small */
if((haddr_t)buf_len < eoa)
@@ -2208,12 +2214,16 @@ H5F_get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len)
space_needed = (size_t)eoa;
+ /* Get the property list object */
+ if(NULL == (xfer_plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_CACHE, H5E_BADATOM, FAIL, "can't get new property list object")
+
/* read in the file image */
/* (Note compensation for base address addition in internal routine) */
- if(H5FD_read(fd_ptr, H5AC_ind_dxpl_g, H5FD_MEM_DEFAULT, 0, space_needed, buf_ptr) < 0)
+ if(H5FD_read(fd_ptr, xfer_plist, H5FD_MEM_DEFAULT, 0, space_needed, buf_ptr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_READERROR, FAIL, "file image read request failed")
- /* Offset to "status_flags" in the superblock */
+ /* Offset to "status_flags" in the superblock */
tmp = H5F_SUPER_STATUS_FLAGS_OFF(file->shared->sblock->super_vers);
/* Size of "status_flags" depends on the superblock version */
tmp_size = H5F_SUPER_STATUS_FLAGS_SIZE(file->shared->sblock->super_vers);
diff --git a/src/H5Fmpi.c b/src/H5Fmpi.c
index fe2a774..9783947 100644
--- a/src/H5Fmpi.c
+++ b/src/H5Fmpi.c
@@ -258,5 +258,74 @@ H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag)
done:
FUNC_LEAVE_API(ret_value)
}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_mpi_retrieve_comm
+ *
+ * Purpose: Retrieves an MPI communicator from the file the location ID
+ * is in. If the loc_id is invalid, the fapl_id is used to
+ * retrieve the communicator.
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Mohamad Chaarawi
+ * Feb 14, 2012
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F_mpi_retrieve_comm(hid_t loc_id, hid_t acspl_id, MPI_Comm *mpi_comm)
+{
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ HDassert(mpi_comm);
+ *mpi_comm = MPI_COMM_NULL;
+
+ /* if the loc_id is valid, then get the comm from the file
+ attached to the loc_id */
+ if(H5I_INVALID_HID != loc_id) {
+ H5G_loc_t loc;
+ H5F_t *f = NULL;
+
+ /* retrieve the file structure */
+ if(H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ f = loc.oloc->file;
+ HDassert(f);
+
+ /* check if MPIO driver is used */
+ if(H5F_HAS_FEATURE(f, H5FD_FEAT_HAS_MPI)) {
+ /* retrieve the file communicator */
+ if(MPI_COMM_NULL == (*mpi_comm = H5F_mpi_get_comm(f)))
+ HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get MPI communicator")
+ }
+ }
+ /* otherwise, this if from H5Fopen or H5Fcreate and has to be collective */
+ else {
+ H5P_genplist_t *plist; /* Property list pointer */
+
+ HDassert(H5P_isa_class(acspl_id, H5P_FILE_ACCESS));
+
+ if(NULL == (plist = H5P_object_verify(acspl_id, H5P_FILE_ACCESS)))
+ HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access list")
+
+ if(H5FD_MPIO == H5P_peek_driver(plist)) {
+ const H5FD_mpio_fapl_t *fa; /* MPIO fapl info */
+
+ if(NULL == (fa = (const H5FD_mpio_fapl_t *)H5P_peek_driver_info(plist)))
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "bad VFL driver info")
+
+ *mpi_comm = fa->comm;
+ }
+ }
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5F_mpi_retrieve_comm */
+
#endif /* H5_HAVE_PARALLEL */
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index f9cd89f..627dec7 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -378,8 +378,9 @@ H5F_t *H5F_new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id,
hid_t fapl_id, H5FD_t *lf);
herr_t H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush);
H5_DLL herr_t H5F_flush(H5F_t *f, hid_t dxpl_id, hbool_t closing);
-H5_DLL htri_t H5F_is_hdf5(const char *name);
+H5_DLL htri_t H5F_is_hdf5(const char *name, hid_t dxpl_id);
H5_DLL herr_t H5F_get_objects(const H5F_t *f, unsigned types, size_t max_index, hid_t *obj_id_list, hbool_t app_ref, size_t *obj_id_count_ptr);
+H5_DLL ssize_t H5F_get_file_image(H5F_t *f, void *buf_ptr, size_t buf_len, hid_t dxpl_id);
H5_DLL herr_t H5F_close(H5F_t *f);
/* File mount related routines */
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 6be0cff..fdcffdf 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -485,6 +485,7 @@
#define HDF5_SUPERBLOCK_VERSION_2 2 /* Revised version with superblock extension and checksum */
#define HDF5_SUPERBLOCK_VERSION_3 3 /* With file locking and consistency flags (at least this version for SWMR support) */
#define HDF5_SUPERBLOCK_VERSION_LATEST HDF5_SUPERBLOCK_VERSION_3 /* The maximum super block format */
+#define HDF5_SUPERBLOCK_VERSION_V18_LATEST HDF5_SUPERBLOCK_VERSION_2 /* The latest superblock version for v18 */
#define HDF5_FREESPACE_VERSION 0 /* of the Free-Space Info */
#define HDF5_OBJECTDIR_VERSION 0 /* of the Object Directory format */
#define HDF5_SHAREDHEADER_VERSION 0 /* of the Shared-Header Info */
@@ -647,7 +648,6 @@ H5_DLL unsigned H5F_get_nopen_objs(const H5F_t *f);
H5_DLL unsigned H5F_incr_nopen_objs(H5F_t *f);
H5_DLL unsigned H5F_decr_nopen_objs(H5F_t *f);
H5_DLL hid_t H5F_get_file_id(const H5F_t *f);
-H5_DLL ssize_t H5F_get_file_image(H5F_t *f, void *buf_ptr, size_t buf_len);
H5_DLL H5F_t *H5F_get_parent(const H5F_t *f);
H5_DLL unsigned H5F_get_nmounts(const H5F_t *f);
H5_DLL unsigned H5F_get_read_attempts(const H5F_t *f);
@@ -746,6 +746,7 @@ H5_DLL herr_t H5F_super_dirty(H5F_t *f);
H5_DLL int H5F_mpi_get_rank(const H5F_t *f);
H5_DLL MPI_Comm H5F_mpi_get_comm(const H5F_t *f);
H5_DLL int H5F_mpi_get_size(const H5F_t *f);
+H5_DLL herr_t H5F_mpi_retrieve_comm(hid_t loc_id, hid_t acspl_id, MPI_Comm *mpi_comm);
#endif /* H5_HAVE_PARALLEL */
/* External file cache routines */
diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h
index 7c77a92..318f374 100644
--- a/src/H5Fpublic.h
+++ b/src/H5Fpublic.h
@@ -32,6 +32,14 @@
#define H5CHECK
#endif /* _H5private_H */
+/* When this header is included from a private HDF5 header, don't make calls to H5open() */
+#undef H5OPEN
+#ifndef _H5private_H
+#define H5OPEN H5open(),
+#else /* _H5private_H */
+#define H5OPEN
+#endif /* _H5private_H */
+
/*
* These are the bits that can be passed to the `flags' argument of
* H5Fcreate() and H5Fopen(). Use the bit-wise OR operator (|) to combine
@@ -44,12 +52,12 @@
* Note that H5F_ACC_DEBUG is deprecated (nonfuncational) but retained as a
* symbol for backward compatibility.
*/
-#define H5F_ACC_RDONLY (H5CHECK 0x0000u) /*absence of rdwr => rd-only */
-#define H5F_ACC_RDWR (H5CHECK 0x0001u) /*open for read and write */
-#define H5F_ACC_TRUNC (H5CHECK 0x0002u) /*overwrite existing files */
-#define H5F_ACC_EXCL (H5CHECK 0x0004u) /*fail if file already exists*/
+#define H5F_ACC_RDONLY (H5CHECK H5OPEN 0x0000u) /*absence of rdwr => rd-only */
+#define H5F_ACC_RDWR (H5CHECK H5OPEN 0x0001u) /*open for read and write */
+#define H5F_ACC_TRUNC (H5CHECK H5OPEN 0x0002u) /*overwrite existing files */
+#define H5F_ACC_EXCL (H5CHECK H5OPEN 0x0004u) /*fail if file already exists*/
/* NOTE: 0x0008u was H5F_ACC_DEBUG, now deprecated */
-#define H5F_ACC_CREAT (H5CHECK 0x0010u) /*create non-existing files */
+#define H5F_ACC_CREAT (H5CHECK H5OPEN 0x0010u) /*create non-existing files */
#define H5F_ACC_SWMR_WRITE (H5CHECK 0x0020u) /*indicate that this file is
* open for writing in a
* single-writer/multi-reader (SWMR)
@@ -70,7 +78,7 @@
/* Value passed to H5Pset_elink_acc_flags to cause flags to be taken from the
* parent file. */
-#define H5F_ACC_DEFAULT (H5CHECK 0xffffu) /*ignore setting on lapl */
+#define H5F_ACC_DEFAULT (H5CHECK H5OPEN 0xffffu) /*ignore setting on lapl */
/* Flags for H5Fget_obj_count() & H5Fget_obj_ids() calls */
#define H5F_OBJ_FILE (0x0001u) /* File objects */
@@ -246,7 +254,7 @@ H5_DLL herr_t H5Fstop_mdc_logging(hid_t file_id);
H5_DLL herr_t H5Fget_mdc_logging_status(hid_t file_id,
/*OUT*/ hbool_t *is_enabled,
/*OUT*/ hbool_t *is_currently_logging);
-H5_DLL herr_t H5Fformat_convert_super(hid_t fid);
+H5_DLL herr_t H5Fformat_convert(hid_t fid);
#ifdef H5_HAVE_PARALLEL
H5_DLL herr_t H5Fset_mpi_atomicity(hid_t file_id, hbool_t flag);
H5_DLL herr_t H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag);
@@ -259,7 +267,7 @@ H5_DLL herr_t H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag);
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Macros */
-#define H5F_ACC_DEBUG (H5CHECK 0x0000u) /*print debug info (deprecated)*/
+#define H5F_ACC_DEBUG (H5CHECK H5OPEN 0x0000u) /*print debug info (deprecated)*/
/* Typedefs */
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index 6f37ff6..e0b5df5 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -727,9 +727,6 @@ H5F__cache_superblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNU
/* (We'll rely on the cache to make sure it actually *is* flushed
last (and collectively in parallel), but this check doesn't hurt) */
HDassert(sblock->cache_info.flush_me_last);
-#ifdef H5_HAVE_PARALLEL
- HDassert(sblock->cache_info.flush_me_collectively);
-#endif
/* Encode the common portion of the file superblock for all versions */
HDmemcpy(image, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN);
diff --git a/src/H5Ftest.c b/src/H5Ftest.c
index b741e0d..e8cd8f4 100644
--- a/src/H5Ftest.c
+++ b/src/H5Ftest.c
@@ -109,7 +109,7 @@ H5F_get_sohm_mesg_count_test(hid_t file_id, unsigned type_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
/* Retrieve count for message type */
- if(H5SM_get_mesg_count_test(file, H5AC_ind_dxpl_id, type_id, mesg_count) < 0)
+ if(H5SM_get_mesg_count_test(file, H5AC_dxpl_id, type_id, mesg_count) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve shared message count")
done:
diff --git a/src/H5G.c b/src/H5G.c
index 21957d8..c27d3b1 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -290,6 +290,7 @@ H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id,
{
H5G_loc_t loc; /* Location to create group */
H5G_t *grp = NULL; /* New group created */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
hid_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -315,15 +316,12 @@ H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id,
if(TRUE != H5P_isa_class(gcpl_id, H5P_GROUP_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not group create property list")
- /* Check the group access property list */
- if(H5P_DEFAULT == gapl_id)
- gapl_id = H5P_GROUP_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(gapl_id, H5P_GROUP_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not group access property list")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&gapl_id, H5P_CLS_GACC, &dxpl_id, loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Create the new group & get its ID */
- if(NULL == (grp = H5G__create_named(&loc, name, lcpl_id, gcpl_id, gapl_id, H5AC_dxpl_id)))
+ if(NULL == (grp = H5G__create_named(&loc, name, lcpl_id, gcpl_id, gapl_id, dxpl_id)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group")
if((ret_value = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
@@ -378,6 +376,7 @@ H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id)
H5G_loc_t loc;
H5G_t *grp = NULL;
H5G_obj_create_t gcrt_info; /* Information for group creation */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
hid_t ret_value;
FUNC_ENTER_API(FAIL)
@@ -394,12 +393,9 @@ H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id)
if(TRUE != H5P_isa_class(gcpl_id, H5P_GROUP_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not group create property list")
- /* Check the group access property list */
- if(H5P_DEFAULT == gapl_id)
- gapl_id = H5P_GROUP_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(gapl_id, H5P_GROUP_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not group access property list")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&gapl_id, H5P_CLS_GACC, &dxpl_id, loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Set up group creation info */
gcrt_info.gcpl_id = gcpl_id;
@@ -407,7 +403,7 @@ H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id)
HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache));
/* Create the new group & get its ID */
- if(NULL == (grp = H5G__create(loc.oloc->file, &gcrt_info, H5AC_dxpl_id)))
+ if(NULL == (grp = H5G__create(loc.oloc->file, &gcrt_info, dxpl_id)))
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group")
if((ret_value = H5I_register(H5I_GROUP, grp, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group")
@@ -422,7 +418,7 @@ done:
HDONE_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get object location of group")
/* Decrement refcount on group's object header in memory */
- if(H5O_dec_rc_by_loc(oloc, H5AC_dxpl_id) < 0)
+ if(H5O_dec_rc_by_loc(oloc, dxpl_id) < 0)
HDONE_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "unable to decrement refcount on newly created object")
} /* end if */
@@ -457,6 +453,7 @@ H5Gopen2(hid_t loc_id, const char *name, hid_t gapl_id)
{
H5G_t *grp = NULL; /* Group opened */
H5G_loc_t loc; /* Location of parent for group */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
hid_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -468,15 +465,12 @@ H5Gopen2(hid_t loc_id, const char *name, hid_t gapl_id)
if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- /* Check the group access property list */
- if(H5P_DEFAULT == gapl_id)
- gapl_id = H5P_GROUP_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(gapl_id, H5P_GROUP_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not group access property list")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&gapl_id, H5P_CLS_GACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Open the group */
- if((grp = H5G__open_name(&loc, name, gapl_id, H5AC_ind_dxpl_id)) == NULL)
+ if((grp = H5G__open_name(&loc, name, gapl_id, dxpl_id)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
/* Register an ID for the group */
@@ -565,7 +559,7 @@ H5Gget_info(hid_t grp_id, H5G_info_t *grp_info)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
/* Retrieve the group's information */
- if(H5G__obj_info(loc.oloc, grp_info/*out*/, H5AC_ind_dxpl_id) < 0)
+ if(H5G__obj_info(loc.oloc, grp_info/*out*/, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info")
done:
@@ -595,6 +589,7 @@ H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *grp_info,
H5G_name_t grp_path; /* Opened object group hier. path */
H5O_loc_t grp_oloc; /* Opened object object location */
hbool_t loc_found = FALSE; /* Location at 'name' found */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -607,11 +602,10 @@ H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *grp_info,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
if(!grp_info)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Set up opened group location to fill in */
grp_loc.oloc = &grp_oloc;
@@ -619,12 +613,12 @@ H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *grp_info,
H5G_loc_reset(&grp_loc);
/* Find the group object */
- if(H5G_loc_find(&loc, name, &grp_loc/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if(H5G_loc_find(&loc, name, &grp_loc/*out*/, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found")
loc_found = TRUE;
/* Retrieve the group's information */
- if(H5G__obj_info(grp_loc.oloc, grp_info/*out*/, H5AC_ind_dxpl_id) < 0)
+ if(H5G__obj_info(grp_loc.oloc, grp_info/*out*/, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info")
done:
@@ -658,6 +652,7 @@ H5Gget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
H5G_name_t grp_path; /* Opened object group hier. path */
H5O_loc_t grp_oloc; /* Opened object object location */
hbool_t loc_found = FALSE; /* Entry at 'name' found */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -675,11 +670,10 @@ H5Gget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
if(!grp_info)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Set up opened group location to fill in */
grp_loc.oloc = &grp_oloc;
@@ -687,12 +681,13 @@ H5Gget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
H5G_loc_reset(&grp_loc);
/* Find the object's location, according to the order in the index */
- if(H5G_loc_find_by_idx(&loc, group_name, idx_type, order, n, &grp_loc/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if(H5G_loc_find_by_idx(&loc, group_name, idx_type, order, n, &grp_loc/*out*/,
+ lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found")
loc_found = TRUE;
/* Retrieve the group's information */
- if(H5G__obj_info(grp_loc.oloc, grp_info/*out*/, H5AC_ind_dxpl_id) < 0)
+ if(H5G__obj_info(grp_loc.oloc, grp_info/*out*/, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info")
done:
diff --git a/src/H5Gbtree2.c b/src/H5Gbtree2.c
index b464930..1a99b12 100644
--- a/src/H5Gbtree2.c
+++ b/src/H5Gbtree2.c
@@ -114,9 +114,7 @@ const H5B2_class_t H5G_BT2_NAME[1]={{ /* B-tree class information */
H5G_dense_btree2_name_compare, /* Record comparison callback */
H5G_dense_btree2_name_encode, /* Record encoding callback */
H5G_dense_btree2_name_decode, /* Record decoding callback */
- H5G_dense_btree2_name_debug, /* Record debugging callback */
- NULL, /* Create debugging context */
- NULL /* Destroy debugging context */
+ H5G_dense_btree2_name_debug /* Record debugging callback */
}};
/* v2 B-tree class for indexing 'creation order' field of links */
@@ -130,9 +128,7 @@ const H5B2_class_t H5G_BT2_CORDER[1]={{ /* B-tree class information */
H5G_dense_btree2_corder_compare, /* Record comparison callback */
H5G_dense_btree2_corder_encode, /* Record encoding callback */
H5G_dense_btree2_corder_decode, /* Record decoding callback */
- H5G_dense_btree2_corder_debug, /* Record debugging callback */
- NULL, /* Create debugging context */
- NULL /* Destroy debugging context */
+ H5G_dense_btree2_corder_debug /* Record debugging callback */
}};
/*****************************/
diff --git a/src/H5Gcache.c b/src/H5Gcache.c
index a4f9530..ed1c4a3 100644
--- a/src/H5Gcache.c
+++ b/src/H5Gcache.c
@@ -328,10 +328,8 @@ H5G__cache_node_serialize(const H5F_t *f, void *_image, size_t len,
if(H5G__ent_encode_vec(f, &image, sym->entry, sym->nsyms) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTENCODE, FAIL, "can't serialize")
-#ifdef H5_CLEAR_MEMORY
/* Clear rest of symbol table node */
HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
-#endif /* H5_CLEAR_MEMORY */
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index e0bc78e..919389f 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -274,7 +274,7 @@ H5Gopen1(hid_t loc_id, const char *name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
/* Open the group */
- if((grp = H5G__open_name(&loc, name, H5P_DEFAULT, H5AC_ind_dxpl_id)) == NULL)
+ if((grp = H5G__open_name(&loc, name, H5P_DEFAULT, H5AC_dxpl_id)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
/* Register an atom for the group */
@@ -602,7 +602,7 @@ H5Gget_linkval(hid_t loc_id, const char *name, size_t size, char *buf/*out*/)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
/* Call the new link routine which provides this capability */
- if(H5L_get_val(&loc, name, buf, size, H5P_DEFAULT, H5AC_ind_dxpl_id) < 0)
+ if(H5L_get_val(&loc, name, buf, size, H5P_DEFAULT, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "couldn't get link info")
done:
@@ -688,7 +688,7 @@ H5Gget_comment(hid_t loc_id, const char *name, size_t bufsize, char *buf)
if(bufsize > 0 && !buf)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no buffer specified")
- if((ret_value = (int)H5G_loc_get_comment(&loc, name, buf, bufsize, H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0)
+ if((ret_value = (int)H5G_loc_get_comment(&loc, name, buf, bufsize, H5P_DEFAULT, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to get comment value")
done:
@@ -752,7 +752,7 @@ H5Giterate(hid_t loc_id, const char *name, int *idx_p, H5G_iterate_t op,
lnk_op.op_func.op_old = op;
/* Call private function. */
- if((ret_value = H5G_iterate(loc_id, name, H5_INDEX_NAME, H5_ITER_INC, idx, &last_obj, &lnk_op, op_data, H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0)
+ if((ret_value = H5G_iterate(loc_id, name, H5_INDEX_NAME, H5_ITER_INC, idx, &last_obj, &lnk_op, op_data, H5P_DEFAULT, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "group iteration failed")
/* Set the index we stopped at */
@@ -794,7 +794,7 @@ H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs)
/* Check args */
if(H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location ID")
- if(H5O_obj_type(loc.oloc, &obj_type, H5AC_ind_dxpl_id) < 0)
+ if(H5O_obj_type(loc.oloc, &obj_type, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object type")
if(obj_type != H5O_TYPE_GROUP)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group")
@@ -802,7 +802,7 @@ H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "bad pointer to # of objects")
/* Retrieve information about the group */
- if(H5G__obj_info(loc.oloc, &grp_info, H5AC_ind_dxpl_id) < 0)
+ if(H5G__obj_info(loc.oloc, &grp_info, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "can't determine")
/* Set the number of objects [sic: links] in the group */
@@ -847,7 +847,7 @@ H5Gget_objinfo(hid_t loc_id, const char *name, hbool_t follow_link,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
/* Get info */
- if(H5G_get_objinfo(&loc, name, follow_link, statbuf, H5AC_ind_dxpl_id) < 0)
+ if(H5G_get_objinfo(&loc, name, follow_link, statbuf, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "cannot stat object")
done:
@@ -1040,13 +1040,13 @@ H5Gget_objname_by_idx(hid_t loc_id, hsize_t idx, char *name, size_t size)
/* Check args */
if(H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location ID")
- if(H5O_obj_type(loc.oloc, &obj_type, H5AC_ind_dxpl_id) < 0)
+ if(H5O_obj_type(loc.oloc, &obj_type, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get object type")
if(obj_type != H5O_TYPE_GROUP)
HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a group")
/* Call internal function */
- if((ret_value = H5G_obj_get_name_by_idx(loc.oloc, H5_INDEX_NAME, H5_ITER_INC, idx, name, size, H5AC_ind_dxpl_id)) < 0)
+ if((ret_value = H5G_obj_get_name_by_idx(loc.oloc, H5_INDEX_NAME, H5_ITER_INC, idx, name, size, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "can't get object name")
done:
@@ -1082,13 +1082,13 @@ H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx)
/* Check args */
if(H5G_loc(loc_id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "not a location ID")
- if(H5O_obj_type(loc.oloc, &obj_type, H5AC_ind_dxpl_id) < 0)
+ if(H5O_obj_type(loc.oloc, &obj_type, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5G_UNKNOWN, "can't get object type")
if(obj_type != H5O_TYPE_GROUP)
HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "not a group")
/* Call internal function*/
- if((ret_value = H5G_obj_get_type_by_idx(loc.oloc, idx, H5AC_ind_dxpl_id)) == H5G_UNKNOWN)
+ if((ret_value = H5G_obj_get_type_by_idx(loc.oloc, idx, H5AC_dxpl_id)) == H5G_UNKNOWN)
HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "can't get object type")
done:
diff --git a/src/H5Gint.c b/src/H5Gint.c
index f7f4afe..cd2a4fc 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -1209,17 +1209,17 @@ H5G_get_create_plist(H5G_t *grp)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
/* Retrieve any object creation properties */
- if(H5O_get_create_plist(&grp->oloc, H5AC_ind_dxpl_id, new_plist) < 0)
+ if(H5O_get_create_plist(&grp->oloc, H5AC_dxpl_id, new_plist) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object creation info")
/* Check for the group having a group info message */
- if((ginfo_exists = H5O_msg_exists(&(grp->oloc), H5O_GINFO_ID, H5AC_ind_dxpl_id)) < 0)
+ if((ginfo_exists = H5O_msg_exists(&(grp->oloc), H5O_GINFO_ID, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(ginfo_exists) {
H5O_ginfo_t ginfo; /* Group info message */
/* Read the group info */
- if(NULL == H5O_msg_read(&(grp->oloc), H5O_GINFO_ID, &ginfo, H5AC_ind_dxpl_id))
+ if(NULL == H5O_msg_read(&(grp->oloc), H5O_GINFO_ID, &ginfo, H5AC_dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get group info")
/* Set the group info for the property list */
@@ -1228,7 +1228,7 @@ H5G_get_create_plist(H5G_t *grp)
} /* end if */
/* Check for the group having a link info message */
- if((linfo_exists = H5G__obj_get_linfo(&(grp->oloc), &linfo, H5AC_ind_dxpl_id)) < 0)
+ if((linfo_exists = H5G__obj_get_linfo(&(grp->oloc), &linfo, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
if(linfo_exists) {
/* Set the link info for the property list */
@@ -1237,13 +1237,13 @@ H5G_get_create_plist(H5G_t *grp)
} /* end if */
/* Check for the group having a pipeline message */
- if((pline_exists = H5O_msg_exists(&(grp->oloc), H5O_PLINE_ID, H5AC_ind_dxpl_id)) < 0)
+ if((pline_exists = H5O_msg_exists(&(grp->oloc), H5O_PLINE_ID, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header")
if(pline_exists) {
H5O_pline_t pline; /* Pipeline message */
/* Read the pipeline */
- if(NULL == H5O_msg_read(&(grp->oloc), H5O_PLINE_ID, &pline, H5AC_ind_dxpl_id))
+ if(NULL == H5O_msg_read(&(grp->oloc), H5O_PLINE_ID, &pline, H5AC_dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get link pipeline")
/* Set the pipeline for the property list */
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h
index 1ab5522..2ef99fd 100644
--- a/src/H5Gprivate.h
+++ b/src/H5Gprivate.h
@@ -37,13 +37,6 @@
#include "H5RSprivate.h" /* Reference-counted strings */
/*
- * Define this to enable debugging.
- */
-#ifdef NDEBUG
-# undef H5G_DEBUG
-#endif
-
-/*
* The disk size for a symbol table entry...
*/
#define H5G_SIZEOF_SCRATCH 16
diff --git a/src/H5Gtest.c b/src/H5Gtest.c
index a8796fb..6b20ade 100644
--- a/src/H5Gtest.c
+++ b/src/H5Gtest.c
@@ -97,7 +97,7 @@ H5G__is_empty_test(hid_t gid)
H5G_t *grp = NULL; /* Pointer to group */
htri_t msg_exists = FALSE; /* Indicate that a header message is present */
htri_t linfo_exists = FALSE;/* Indicate that the 'link info' message is present */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
+ hid_t dxpl_id = H5AC_dxpl_id; /* transfer property list used for this operation */
htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_PACKAGE
@@ -209,7 +209,7 @@ H5G__has_links_test(hid_t gid, unsigned *nmsgs)
{
H5G_t *grp = NULL; /* Pointer to group */
htri_t msg_exists = 0; /* Indicate that a header message is present */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
+ hid_t dxpl_id = H5AC_dxpl_id; /* transfer property list used for this operation */
htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_PACKAGE
@@ -268,7 +268,7 @@ H5G__has_stab_test(hid_t gid)
{
H5G_t *grp = NULL; /* Pointer to group */
htri_t msg_exists = 0; /* Indicate that a header message is present */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
+ hid_t dxpl_id = H5AC_dxpl_id; /* transfer property list used for this operation */
htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_PACKAGE
@@ -319,7 +319,7 @@ H5G__is_new_dense_test(hid_t gid)
{
H5G_t *grp = NULL; /* Pointer to group */
htri_t msg_exists = 0; /* Indicate that a header message is present */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
+ hid_t dxpl_id = H5AC_dxpl_id; /* transfer property list used for this operation */
htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_PACKAGE
@@ -390,7 +390,7 @@ H5G__new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count)
H5B2_t *bt2_corder = NULL; /* v2 B-tree handle for creation order index */
H5O_linfo_t linfo; /* Link info message */
H5G_t *grp = NULL; /* Pointer to group */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
+ hid_t dxpl_id = H5AC_dxpl_id; /* transfer property list used for this operation */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -471,7 +471,7 @@ H5G__lheap_size_test(hid_t gid, size_t *lheap_size)
{
H5G_t *grp = NULL; /* Pointer to group */
H5O_stab_t stab; /* Symbol table message */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
+ hid_t dxpl_id = H5AC_dxpl_id; /* transfer property list used for this operation */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -613,7 +613,7 @@ H5G__verify_cached_stab_test(H5O_loc_t *grp_oloc, H5G_entry_t *ent)
{
H5O_stab_t stab; /* Symbol table */
H5HL_t *heap = NULL; /* Pointer to local heap */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
+ hid_t dxpl_id = H5AC_dxpl_id; /* transfer property list used for this operation */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_TAG(dxpl_id, grp_oloc->addr, FAIL)
@@ -770,7 +770,7 @@ H5G__verify_cached_stabs_test(hid_t gid)
H5O_stab_t stab; /* Symbol table message */
H5G_bt_common_t udata = {NULL, NULL}; /* Dummy udata so H5B_iterate doesn't freak out */
haddr_t prev_tag = HADDR_UNDEF; /* Previous metadata tag */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
+ hid_t dxpl_id = H5AC_dxpl_id; /* transfer property list used for this operation */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
diff --git a/src/H5HFbtree2.c b/src/H5HFbtree2.c
index d82de93..a79bf58 100644
--- a/src/H5HFbtree2.c
+++ b/src/H5HFbtree2.c
@@ -71,7 +71,6 @@ typedef struct H5HF_huge_bt2_ctx_t {
/* Common callbacks */
static void *H5HF__huge_bt2_crt_context(void *udata);
static herr_t H5HF__huge_bt2_dst_context(void *ctx);
-static void *H5HF__huge_bt2_crt_dbg_context(H5F_t *f, hid_t dxpl_id, haddr_t addr);
/* Callbacks for indirect objects */
static herr_t H5HF__huge_bt2_indir_store(void *native, const void *udata);
@@ -127,9 +126,7 @@ const H5B2_class_t H5HF_HUGE_BT2_INDIR[1]={{ /* B-tree class information */
H5HF__huge_bt2_indir_compare, /* Record comparison callback */
H5HF__huge_bt2_indir_encode, /* Record encoding callback */
H5HF__huge_bt2_indir_decode, /* Record decoding callback */
- H5HF__huge_bt2_indir_debug, /* Record debugging callback */
- H5HF__huge_bt2_crt_dbg_context, /* Create debugging context */
- H5HF__huge_bt2_dst_context /* Destroy debugging context */
+ H5HF__huge_bt2_indir_debug /* Record debugging callback */
}};
/* v2 B-tree class for indirectly accessed, filtered 'huge' objects */
@@ -143,9 +140,7 @@ const H5B2_class_t H5HF_HUGE_BT2_FILT_INDIR[1]={{ /* B-tree class information */
H5HF__huge_bt2_filt_indir_compare, /* Record comparison callback */
H5HF__huge_bt2_filt_indir_encode, /* Record encoding callback */
H5HF__huge_bt2_filt_indir_decode, /* Record decoding callback */
- H5HF__huge_bt2_filt_indir_debug, /* Record debugging callback */
- H5HF__huge_bt2_crt_dbg_context, /* Create debugging context */
- H5HF__huge_bt2_dst_context /* Destroy debugging context */
+ H5HF__huge_bt2_filt_indir_debug /* Record debugging callback */
}};
/* v2 B-tree class for directly accessed 'huge' objects */
@@ -159,9 +154,7 @@ const H5B2_class_t H5HF_HUGE_BT2_DIR[1]={{ /* B-tree class information */
H5HF__huge_bt2_dir_compare, /* Record comparison callback */
H5HF__huge_bt2_dir_encode, /* Record encoding callback */
H5HF__huge_bt2_dir_decode, /* Record decoding callback */
- H5HF__huge_bt2_dir_debug, /* Record debugging callback */
- H5HF__huge_bt2_crt_dbg_context, /* Create debugging context */
- H5HF__huge_bt2_dst_context /* Destroy debugging context */
+ H5HF__huge_bt2_dir_debug /* Record debugging callback */
}};
/* v2 B-tree class for directly accessed, filtered 'huge' objects */
@@ -175,9 +168,7 @@ const H5B2_class_t H5HF_HUGE_BT2_FILT_DIR[1]={{ /* B-tree class information */
H5HF__huge_bt2_filt_dir_compare, /* Record comparison callback */
H5HF__huge_bt2_filt_dir_encode, /* Record encoding callback */
H5HF__huge_bt2_filt_dir_decode, /* Record decoding callback */
- H5HF__huge_bt2_filt_dir_debug, /* Record debugging callback */
- H5HF__huge_bt2_crt_dbg_context, /* Create debugging context */
- H5HF__huge_bt2_dst_context /* Destroy debugging context */
+ H5HF__huge_bt2_filt_dir_debug /* Record debugging callback */
}};
/*****************************/
@@ -270,46 +261,6 @@ H5HF__huge_bt2_dst_context(void *_ctx)
/*-------------------------------------------------------------------------
- * Function: H5HF__huge_bt2_crt_dbg_context
- *
- * Purpose: Create context for debugging callback
- *
- * Return: Success: non-NULL
- * Failure: NULL
- *
- * Programmer: Quincey Koziol
- * Tuesday, December 1, 2009
- *
- *-------------------------------------------------------------------------
- */
-static void *
-H5HF__huge_bt2_crt_dbg_context(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t H5_ATTR_UNUSED addr)
-{
- H5HF_huge_bt2_ctx_t *ctx; /* Callback context structure */
- void *ret_value = NULL; /* Return value */
-
- FUNC_ENTER_STATIC
-
- /* Sanity check */
- HDassert(f);
-
- /* Allocate callback context */
- if(NULL == (ctx = H5FL_MALLOC(H5HF_huge_bt2_ctx_t)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate callback context")
-
- /* Determine the size of addresses & lengths in the file */
- ctx->sizeof_addr = H5F_SIZEOF_ADDR(f);
- ctx->sizeof_size = H5F_SIZEOF_SIZE(f);
-
- /* Set return value */
- ret_value = ctx;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5HF__huge_bt2_crt_dbg_context() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5HF__huge_bt2_indir_found
*
* Purpose: Retrieve record for indirectly accessed 'huge' object, when
diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c
index 73db840..1272ab0 100644
--- a/src/H5HFdblock.c
+++ b/src/H5HFdblock.c
@@ -146,9 +146,7 @@ H5HF_man_dblock_create(hid_t dxpl_id, H5HF_hdr_t *hdr, H5HF_indirect_t *par_iblo
/* XXX: Change to using free-list factories */
if((dblock->blk = H5FL_BLK_MALLOC(direct_block, dblock->size)) == NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
-#ifdef H5_CLEAR_MEMORY
-HDmemset(dblock->blk, 0, dblock->size);
-#endif /* H5_CLEAR_MEMORY */
+ HDmemset(dblock->blk, 0, dblock->size);
dblock->write_buf = NULL;
dblock->write_size = 0;
diff --git a/src/H5HFtiny.c b/src/H5HFtiny.c
index bdfe30d..711ceb9 100644
--- a/src/H5HFtiny.c
+++ b/src/H5HFtiny.c
@@ -177,10 +177,9 @@ HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
((enc_obj_size & H5HF_TINY_MASK_EXT_1) >> 8));
*id++ = enc_obj_size & H5HF_TINY_MASK_EXT_2;
} /* end else */
+
HDmemcpy(id, obj, obj_size);
-#ifdef H5_CLEAR_MEMORY
-HDmemset(id + obj_size, 0, (hdr->id_len - ((size_t)1 + (size_t)hdr->tiny_len_extended + obj_size)));
-#endif /* H5_CLEAR_MEMORY */
+ HDmemset(id + obj_size, 0, (hdr->id_len - ((size_t)1 + (size_t)hdr->tiny_len_extended + obj_size)));
/* Update statistics about heap */
hdr->tiny_size += obj_size;
diff --git a/src/H5HG.c b/src/H5HG.c
index 41c5007..f95b607 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -154,22 +154,20 @@ H5HG_create(H5F_t *f, hid_t dxpl_id, size_t size)
/* Create it */
H5_CHECK_OVERFLOW(size, size_t, hsize_t);
if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_GHEAP, dxpl_id, (hsize_t)size)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to allocate file space for global heap")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to allocate file space for global heap")
if(NULL == (heap = H5FL_MALLOC(H5HG_heap_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
heap->addr = addr;
heap->size = size;
heap->shared = H5F_SHARED(f);
if(NULL == (heap->chunk = H5FL_BLK_MALLOC(gheap_chunk, size)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
-#ifdef H5_CLEAR_MEMORY
-HDmemset(heap->chunk, 0, size);
-#endif /* H5_CLEAR_MEMORY */
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
+ HDmemset(heap->chunk, 0, size);
heap->nalloc = H5HG_NOBJS(f, size);
heap->nused = 1; /* account for index 0, which is used for the free object */
if(NULL == (heap->obj = H5FL_SEQ_MALLOC(H5HG_obj_t, heap->nalloc)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
/* Initialize the header */
HDmemcpy(heap->chunk, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC);
@@ -452,9 +450,7 @@ H5HG_extend(H5F_t *f, hid_t dxpl_id, haddr_t addr, size_t need)
/* Re-allocate the heap information in memory */
if(NULL == (new_chunk = H5FL_BLK_REALLOC(gheap_chunk, heap->chunk, (heap->size + need))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "new heap allocation failed")
-#ifdef H5_CLEAR_MEMORY
-HDmemset(new_chunk + heap->size, 0, need);
-#endif /* H5_CLEAR_MEMORY */
+ HDmemset(new_chunk + heap->size, 0, need);
/* Adjust the size of the heap */
old_size = heap->size;
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index 678da7f..d0dde89 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -630,10 +630,8 @@ H5HL__cache_prefix_serialize(const H5F_t *f, void *_image, size_t len,
/* Sanity check */
HDassert((size_t)(image - (uint8_t *)_image) <= len);
-#ifdef H5_CLEAR_MEMORY
/* Clear rest of local heap */
HDmemset(image, 0, len - (size_t)(image - (uint8_t *)_image));
-#endif /* H5_CLEAR_MEMORY */
} /* end else */
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5I.c b/src/H5I.c
index e952388..90182e7 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -2118,7 +2118,7 @@ H5Iget_name(hid_t id, char *name/*out*/, size_t size)
HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't retrieve object location")
/* Call internal group routine to retrieve object's name */
- if((ret_value = H5G_get_name(&loc, name, size, NULL, H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0)
+ if((ret_value = H5G_get_name(&loc, name, size, NULL, H5P_DEFAULT, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't retrieve object name")
done:
diff --git a/src/H5Itest.c b/src/H5Itest.c
index 9d451c6..43966e7 100644
--- a/src/H5Itest.c
+++ b/src/H5Itest.c
@@ -89,7 +89,7 @@ H5I_get_name_test(hid_t id, char *name/*out*/, size_t size, hbool_t *cached)
HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't retrieve object location")
/* Call internal group routine to retrieve object's name */
- if((ret_value = H5G_get_name(&loc, name, size, cached, H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0)
+ if((ret_value = H5G_get_name(&loc, name, size, cached, H5P_DEFAULT, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't retrieve object name")
done:
diff --git a/src/H5L.c b/src/H5L.c
index a1f3b6e..efe16aa 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -93,6 +93,17 @@ typedef struct {
hid_t dxpl_id; /* Dataset transfer property list */
} H5L_trav_mv2_t;
+/* User data for path traversal routine for checking if a link exists */
+typedef struct {
+ /* Down */
+ char *sep; /* Pointer to next separator in the string */
+ hid_t lapl_id; /* Link access property list */
+ hid_t dxpl_id; /* Dataset transfer property list */
+
+ /* Up */
+ hbool_t exists; /* Whether the link exists or not */
+} H5L_trav_le_t;
+
/* User data for path traversal routine for getting link value */
typedef struct {
size_t size; /* Size of user buffer */
@@ -170,10 +181,13 @@ static herr_t H5L_move_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
static herr_t H5L_move_dest_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
H5G_own_loc_t *own_loc/*out*/);
-static herr_t H5L_exists_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
+static herr_t H5L__exists_final_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
H5G_own_loc_t *own_loc/*out*/);
-static htri_t H5L_exists(const H5G_loc_t *loc, const char *name, hid_t lapl_id,
+static herr_t H5L__exists_inter_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
+ const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
+ H5G_own_loc_t *own_loc/*out*/);
+static htri_t H5L__exists(const H5G_loc_t *loc, const char *name, hid_t lapl_id,
hid_t dxpl_id);
static herr_t H5L_get_info_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
@@ -322,6 +336,7 @@ H5Lmove(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
{
H5G_loc_t src_loc, *src_loc_p;
H5G_loc_t dst_loc, *dst_loc_p;
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -342,6 +357,12 @@ H5Lmove(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
if(lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id,
+ ((src_loc_id != H5L_SAME_LOC) ? src_loc_id : dst_loc_id),
+ TRUE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
/* Set up src & dst location pointers */
src_loc_p = &src_loc;
dst_loc_p = &dst_loc;
@@ -352,7 +373,7 @@ H5Lmove(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
/* Move the link */
if(H5L_move(src_loc_p, src_name, dst_loc_p, dst_name, FALSE, lcpl_id,
- lapl_id, H5AC_dxpl_id) < 0)
+ lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link")
done:
@@ -380,6 +401,7 @@ H5Lcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
{
H5G_loc_t src_loc, *src_loc_p;
H5G_loc_t dst_loc, *dst_loc_p;
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -400,6 +422,12 @@ H5Lcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
if(lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id,
+ ((src_loc_id != H5L_SAME_LOC) ? src_loc_id : dst_loc_id),
+ TRUE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
/* Set up src & dst location pointers */
src_loc_p = &src_loc;
dst_loc_p = &dst_loc;
@@ -410,7 +438,7 @@ H5Lcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
/* Copy the link */
if(H5L_move(src_loc_p, src_name, dst_loc_p, dst_name, TRUE, lcpl_id,
- lapl_id, H5AC_dxpl_id) < 0)
+ lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link")
done:
@@ -441,6 +469,7 @@ H5Lcreate_soft(const char *link_target,
hid_t link_loc_id, const char *link_name, hid_t lcpl_id, hid_t lapl_id)
{
H5G_loc_t link_loc; /* Group location for new link */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -456,8 +485,12 @@ H5Lcreate_soft(const char *link_target,
if(lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, link_loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
/* Create the link */
- if(H5L_create_soft(link_target, &link_loc, link_name, lcpl_id, lapl_id, H5AC_dxpl_id) < 0)
+ if(H5L_create_soft(link_target, &link_loc, link_name, lcpl_id, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
done:
@@ -487,6 +520,7 @@ H5Lcreate_hard(hid_t cur_loc_id, const char *cur_name,
{
H5G_loc_t cur_loc, *cur_loc_p;
H5G_loc_t new_loc, *new_loc_p;
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -507,6 +541,10 @@ H5Lcreate_hard(hid_t cur_loc_id, const char *cur_name,
if(lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, cur_loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
/* Set up current & new location pointers */
cur_loc_p = &cur_loc;
new_loc_p = &new_loc;
@@ -519,7 +557,7 @@ H5Lcreate_hard(hid_t cur_loc_id, const char *cur_name,
/* Create the link */
if(H5L_create_hard(cur_loc_p, cur_name, new_loc_p, new_name,
- lcpl_id, lapl_id, H5AC_dxpl_id) < 0)
+ lcpl_id, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
done:
@@ -556,6 +594,7 @@ H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type,
const void *udata, size_t udata_size, hid_t lcpl_id, hid_t lapl_id)
{
H5G_loc_t link_loc;
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -570,8 +609,12 @@ H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type,
if(link_type < H5L_TYPE_UD_MIN || link_type > H5L_TYPE_MAX)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid link class")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, link_loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
/* Create external link */
- if(H5L_create_ud(&link_loc, link_name, udata, udata_size, link_type, lcpl_id, lapl_id, H5AC_dxpl_id) < 0)
+ if(H5L_create_ud(&link_loc, link_name, udata, udata_size, link_type, lcpl_id, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
done:
@@ -600,6 +643,7 @@ herr_t
H5Ldelete(hid_t loc_id, const char *name, hid_t lapl_id)
{
H5G_loc_t loc; /* Group's location */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -611,8 +655,12 @@ H5Ldelete(hid_t loc_id, const char *name, hid_t lapl_id)
if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
/* Unlink */
- if(H5L_delete(&loc, name, lapl_id, H5AC_dxpl_id) < 0)
+ if(H5L_delete(&loc, name, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link")
done:
@@ -645,6 +693,7 @@ H5Ldelete_by_idx(hid_t loc_id, const char *group_name,
{
H5G_loc_t loc; /* Group's location */
H5L_trav_rmbi_t udata; /* User data for callback */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -659,11 +708,10 @@ H5Ldelete_by_idx(hid_t loc_id, const char *group_name,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Set up user data for unlink operation */
udata.idx_type = idx_type;
@@ -672,7 +720,8 @@ H5Ldelete_by_idx(hid_t loc_id, const char *group_name,
udata.dxpl_id = H5AC_dxpl_id;
/* Traverse the group hierarchy to remove the link */
- if(H5G_traverse(&loc, group_name, H5G_TARGET_SLINK|H5G_TARGET_UDLINK|H5G_TARGET_MOUNT, H5L_delete_by_idx_cb, &udata, lapl_id, H5AC_dxpl_id) < 0)
+ if(H5G_traverse(&loc, group_name, H5G_TARGET_SLINK|H5G_TARGET_UDLINK|H5G_TARGET_MOUNT,
+ H5L_delete_by_idx_cb, &udata, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_EXISTS, FAIL, "name doesn't exist")
done:
@@ -704,6 +753,7 @@ H5Lget_val(hid_t loc_id, const char *name, void *buf/*out*/, size_t size,
hid_t lapl_id)
{
H5G_loc_t loc; /* Group location for location to query */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -714,14 +764,13 @@ H5Lget_val(hid_t loc_id, const char *name, void *buf/*out*/, size_t size,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Get the link value */
- if(H5L_get_val(&loc, name, buf, size, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if(H5L_get_val(&loc, name, buf, size, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to get link value for '%s'", name)
done:
@@ -754,6 +803,7 @@ H5Lget_val_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
{
H5G_loc_t loc; /* Group location for location to query */
H5L_trav_gvbi_t udata; /* User data for callback */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -769,22 +819,22 @@ H5Lget_val_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Set up user data for retrieving information */
udata.idx_type = idx_type;
udata.order = order;
udata.n = n;
- udata.dxpl_id = H5AC_ind_dxpl_id;
+ udata.dxpl_id = dxpl_id;
udata.buf = buf;
udata.size = size;
/* Traverse the group hierarchy to locate the object to get info about */
- if(H5G_traverse(&loc, group_name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L_get_val_by_idx_cb, &udata, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if(H5G_traverse(&loc, group_name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L_get_val_by_idx_cb,
+ &udata, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist")
@@ -810,6 +860,7 @@ htri_t
H5Lexists(hid_t loc_id, const char *name, hid_t lapl_id)
{
H5G_loc_t loc;
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
htri_t ret_value;
FUNC_ENTER_API(FAIL)
@@ -820,14 +871,13 @@ H5Lexists(hid_t loc_id, const char *name, hid_t lapl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Check for the existence of the link */
- if((ret_value = H5L_exists(&loc, name, lapl_id, H5AC_ind_dxpl_id)) < 0)
+ if((ret_value = H5L__exists(&loc, name, lapl_id, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to get link info")
done:
@@ -854,6 +904,7 @@ H5Lget_info(hid_t loc_id, const char *name, H5L_info_t *linfo /*out*/,
hid_t lapl_id)
{
H5G_loc_t loc;
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
@@ -864,15 +915,14 @@ H5Lget_info(hid_t loc_id, const char *name, H5L_info_t *linfo /*out*/,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Get the link information */
- if(H5L_get_info(&loc, name, linfo, lapl_id, H5AC_ind_dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to get link info")
+ if(H5L_get_info(&loc, name, linfo, lapl_id, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link info")
done:
FUNC_LEAVE_API(ret_value)
@@ -900,6 +950,7 @@ H5Lget_info_by_idx(hid_t loc_id, const char *group_name,
{
H5G_loc_t loc; /* Group location for group to query */
H5L_trav_gibi_t udata; /* User data for callback */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -915,23 +966,22 @@ H5Lget_info_by_idx(hid_t loc_id, const char *group_name,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Set up user data for callback */
udata.idx_type = idx_type;
udata.order = order;
udata.n = n;
- udata.dxpl_id = H5AC_ind_dxpl_id;
+ udata.dxpl_id = dxpl_id;
udata.linfo = linfo;
/* Traverse the group hierarchy to locate the object to get info about */
- if(H5G_traverse(&loc, group_name, H5G_TARGET_SLINK|H5G_TARGET_UDLINK, H5L_get_info_by_idx_cb, &udata, lapl_id, H5AC_ind_dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to get link info")
-
+ if(H5G_traverse(&loc, group_name, H5G_TARGET_SLINK|H5G_TARGET_UDLINK,
+ H5L_get_info_by_idx_cb, &udata, lapl_id, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to get link info")
done:
FUNC_LEAVE_API(ret_value)
@@ -1089,6 +1139,7 @@ H5Lget_name_by_idx(hid_t loc_id, const char *group_name,
{
H5G_loc_t loc; /* Location of group */
H5L_trav_gnbi_t udata; /* User data for callback */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
ssize_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1104,24 +1155,24 @@ H5Lget_name_by_idx(hid_t loc_id, const char *group_name,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Set up user data for callback */
udata.idx_type = idx_type;
udata.order = order;
udata.n = n;
- udata.dxpl_id = H5AC_ind_dxpl_id;
+ udata.dxpl_id = dxpl_id;
udata.name = name;
udata.size = size;
udata.name_len = -1;
/* Traverse the group hierarchy to locate the link to get name of */
- if(H5G_traverse(&loc, group_name, H5G_TARGET_SLINK|H5G_TARGET_UDLINK, H5L_get_name_by_idx_cb, &udata, lapl_id, H5AC_ind_dxpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_EXISTS, FAIL, "name doesn't exist")
+ if(H5G_traverse(&loc, group_name, H5G_TARGET_SLINK|H5G_TARGET_UDLINK,
+ H5L_get_name_by_idx_cb, &udata, lapl_id, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_EXISTS, FAIL, "name doesn't exist")
/* Set the return value */
ret_value = udata.name_len;
@@ -1186,7 +1237,7 @@ H5Literate(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order,
lnk_op.op_func.op_new = op;
/* Iterate over the links */
- if((ret_value = H5G_iterate(grp_id, ".", idx_type, order, idx, &last_lnk, &lnk_op, op_data, H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0)
+ if((ret_value = H5G_iterate(grp_id, ".", idx_type, order, idx, &last_lnk, &lnk_op, op_data, H5P_DEFAULT, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "link iteration failed")
/* Set the index we stopped at */
@@ -1228,6 +1279,7 @@ H5Literate_by_name(hid_t loc_id, const char *group_name,
H5G_link_iterate_t lnk_op; /* Link operator */
hsize_t last_lnk; /* Index of last object looked at */
hsize_t idx; /* Internal location to hold index */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1243,11 +1295,10 @@ H5Literate_by_name(hid_t loc_id, const char *group_name,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
if(!op)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no operator specified")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Set up iteration beginning/end info */
idx = (idx_p == NULL ? 0 : *idx_p);
@@ -1258,8 +1309,9 @@ H5Literate_by_name(hid_t loc_id, const char *group_name,
lnk_op.op_func.op_new = op;
/* Iterate over the links */
- if((ret_value = H5G_iterate(loc_id, group_name, idx_type, order, idx, &last_lnk, &lnk_op, op_data, lapl_id, H5AC_ind_dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "link iteration failed")
+ if((ret_value = H5G_iterate(loc_id, group_name, idx_type, order, idx, &last_lnk, &lnk_op,
+ op_data, lapl_id, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed")
/* Set the index we stopped at */
if(idx_p)
@@ -1320,7 +1372,7 @@ H5Lvisit(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified")
/* Call internal group visitation routine */
- if((ret_value = H5G_visit(grp_id, ".", idx_type, order, op, op_data, H5P_DEFAULT, H5AC_ind_dxpl_id)) < 0)
+ if((ret_value = H5G_visit(grp_id, ".", idx_type, order, op, op_data, H5P_DEFAULT, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "link visitation failed")
done:
@@ -1360,6 +1412,7 @@ herr_t
H5Lvisit_by_name(hid_t loc_id, const char *group_name, H5_index_t idx_type,
H5_iter_order_t order, H5L_iterate_t op, void *op_data, hid_t lapl_id)
{
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1375,15 +1428,14 @@ H5Lvisit_by_name(hid_t loc_id, const char *group_name, H5_index_t idx_type,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
if(!op)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Call internal group visitation routine */
- if((ret_value = H5G_visit(loc_id, group_name, idx_type, order, op, op_data, lapl_id, H5AC_ind_dxpl_id)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "link visitation failed")
+ if((ret_value = H5G_visit(loc_id, group_name, idx_type, order, op, op_data, lapl_id, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link visitation failed")
done:
FUNC_LEAVE_API(ret_value)
@@ -2716,9 +2768,10 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5L_exists_cb
+ * Function: H5L__exists_final_cb
*
- * Purpose: Callback for checking whether a link exists
+ * Purpose: Callback for checking whether a link exists, as the final
+ * component of a path
*
* Return: Non-negative on success/Negative on failure
*
@@ -2728,30 +2781,162 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5L_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED *name,
+H5L__exists_final_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED *name,
const H5O_link_t *lnk, H5G_loc_t H5_ATTR_UNUSED *obj_loc, void *_udata/*in,out*/,
H5G_own_loc_t *own_loc/*out*/)
{
- hbool_t *udata = (hbool_t *)_udata; /* User data passed in */
+ H5L_trav_le_t *udata = (H5L_trav_le_t *)_udata; /* User data passed in */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Check if the name in this group resolved to a valid link */
- *udata = (hbool_t)(lnk != NULL);
+ udata->exists = (hbool_t)(lnk != NULL);
/* Indicate that this callback didn't take ownership of the group *
* location for the object */
*own_loc = H5G_OWN_NONE;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5L_exists_cb() */
+} /* end H5L__exists_final_cb() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5L__exists_inter_cb
+ *
+ * Purpose: Callback for checking whether a link exists, as an intermediate
+ * component of a path
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Thursday, December 31 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5L__exists_inter_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED *name,
+ const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/,
+ H5G_own_loc_t *own_loc/*out*/)
+{
+ H5L_trav_le_t *udata = (H5L_trav_le_t *)_udata; /* User data passed in */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC
+
+ /* Check if the name in this group resolved to a valid link */
+ if(lnk != NULL) {
+ /* Check for more components to the path */
+ if(udata->sep) {
+ H5G_traverse_t cb_func; /* Callback function for tranversal */
+ char *next; /* Pointer to next component name */
+
+ /* Look for another separator */
+ next = udata->sep;
+ if(NULL == (udata->sep = HDstrchr(udata->sep, '/')))
+ cb_func = H5L__exists_final_cb;
+ else {
+ /* Chew through adjacent separators, if present */
+ do {
+ *udata->sep = '\0';
+ udata->sep++;
+ } while('/' == *udata->sep);
+ cb_func = H5L__exists_inter_cb;
+ } /* end else */
+ if(H5G_traverse(obj_loc, next, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, cb_func, udata, udata->lapl_id, udata->dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't determine if link exists")
+ } /* end if */
+ else
+ udata->exists = TRUE;
+ } /* end if */
+ else
+ udata->exists = FALSE;
+
+ /* Indicate that this callback didn't take ownership of the group *
+ * location for the object */
+ *own_loc = H5G_OWN_NONE;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5L__exists_inter_cb() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5L_exists_tolerant
+ *
+ * Purpose: Returns whether a link exists in a group
+ *
+ * Note: Same as H5L_exists, except that missing links are reported
+ * as 'FALSE' instead of causing failures
+ *
+ * Return: Non-negative (TRUE/FALSE) on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Thursday, December 31 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+htri_t
+H5L_exists_tolerant(const H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl_id)
+{
+ H5L_trav_le_t udata; /* User data for traversal */
+ H5G_traverse_t cb_func; /* Callback function for tranversal */
+ char *name_copy = NULL; /* Duplicate of name */
+ char *name_trav; /* Name to traverse */
+ htri_t ret_value = FAIL; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ /* Sanity checks */
+ HDassert(loc);
+ HDassert(name);
+
+ /* Copy the name and skip leading '/'s */
+ name_trav = name_copy = H5MM_strdup(name);
+ while('/' == *name_trav)
+ name_trav++;
+
+ /* A path of "/" will always exist in a file */
+ if('\0' == *name_trav)
+ HGOTO_DONE(TRUE)
+
+ /* Set up user data & correct callback */
+ udata.lapl_id = lapl_id;
+ udata.dxpl_id = dxpl_id;
+ udata.exists = FALSE;
+ if(NULL == (udata.sep = HDstrchr(name_trav, '/')))
+ cb_func = H5L__exists_final_cb;
+ else {
+ /* Chew through adjacent separators, if present */
+ do {
+ *udata.sep = '\0';
+ udata.sep++;
+ } while('/' == *udata.sep);
+ cb_func = H5L__exists_inter_cb;
+ } /* end else */
+
+ /* Traverse the group hierarchy to locate the link to check */
+ if(H5G_traverse(loc, name_trav, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, cb_func, &udata, lapl_id, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't determine if link exists")
+
+ /* Set return value */
+ ret_value = (htri_t)udata.exists;
+
+done:
+ /* Release duplicated string */
+ H5MM_xfree(name_copy);
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5L_exists_tolerant() */
/*-------------------------------------------------------------------------
- * Function: H5L_exists
+ * Function: H5L__exists
*
* Purpose: Returns whether a link exists in a group
*
+ * Note: Same as H5L_exists_tolerant, except that missing links are reported
+ * as failures
+ *
* Return: Non-negative (TRUE/FALSE) on success/Negative on failure
*
* Programmer: Quincey Koziol
@@ -2760,23 +2945,28 @@ H5L_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc/*in*/, const char H5_ATTR_UNUSED
*-------------------------------------------------------------------------
*/
static htri_t
-H5L_exists(const H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl_id)
+H5L__exists(const H5G_loc_t *loc, const char *name, hid_t lapl_id, hid_t dxpl_id)
{
- hbool_t exists = FALSE; /* Whether the link exists in the group */
+ H5L_trav_le_t udata; /* User data for traversal */
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
+
+ /* A path of "/" will always exist in a file */
+ if(0 == HDstrcmp(name, "/"))
+ HGOTO_DONE(TRUE)
/* Traverse the group hierarchy to locate the object to get info about */
- if(H5G_traverse(loc, name, H5G_TARGET_SLINK|H5G_TARGET_UDLINK, H5L_exists_cb, &exists, lapl_id, dxpl_id) < 0)
+ udata.exists = FALSE;
+ if(H5G_traverse(loc, name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L__exists_final_cb, &udata, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_EXISTS, FAIL, "path doesn't exist")
/* Set return value */
- ret_value = (htri_t)exists;
+ ret_value = (htri_t)udata.exists;
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5L_exists() */
+} /* H5L__exists() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c
index dd2061c..0d70b34 100644
--- a/src/H5Lexternal.c
+++ b/src/H5Lexternal.c
@@ -282,7 +282,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
parent_file_name = H5F_OPEN_NAME(loc.oloc->file);
/* Query length of parent group name */
- if((group_name_len = H5G_get_name(&loc, NULL, (size_t) 0, NULL, lapl_id, H5AC_ind_dxpl_id)) < 0)
+ if((group_name_len = H5G_get_name(&loc, NULL, (size_t) 0, NULL, lapl_id, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve length of group name")
/* Account for null terminator */
@@ -297,7 +297,7 @@ H5L_extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
parent_group_name = local_group_name;
/* Get parent group name */
- if(H5G_get_name(&loc, parent_group_name, (size_t) group_name_len, NULL, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if(H5G_get_name(&loc, parent_group_name, (size_t) group_name_len, NULL, lapl_id, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve group name")
/* Make callback */
@@ -563,6 +563,7 @@ H5Lcreate_external(const char *file_name, const char *obj_name,
size_t file_name_len; /* Length of file name string */
size_t norm_obj_name_len; /* Length of normalized object name string */
uint8_t *p; /* Pointer into external link buffer */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -597,8 +598,12 @@ H5Lcreate_external(const char *file_name, const char *obj_name,
p += file_name_len;
HDstrncpy((char *)p, norm_obj_name, buf_size - (file_name_len + 1)); /* External link's object */
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, link_loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
/* Create an external link */
- if(H5L_create_ud(&link_loc, link_name, ext_link_buf, buf_size, H5L_TYPE_EXTERNAL, lcpl_id, lapl_id, H5AC_dxpl_id) < 0)
+ if(H5L_create_ud(&link_loc, link_name, ext_link_buf, buf_size, H5L_TYPE_EXTERNAL, lcpl_id, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link")
done:
diff --git a/src/H5Lprivate.h b/src/H5Lprivate.h
index f3079bc..1c8690b 100644
--- a/src/H5Lprivate.h
+++ b/src/H5Lprivate.h
@@ -81,6 +81,8 @@ H5_DLL hid_t H5L_get_default_lcpl(void);
H5_DLL herr_t H5L_move(H5G_loc_t *src_loc, const char *src_name,
H5G_loc_t *dst_loc, const char *dst_name, hbool_t copy_flag,
hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id);
+H5_DLL htri_t H5L_exists_tolerant(const H5G_loc_t *loc, const char *name, hid_t lapl_id,
+ hid_t dxpl_id);
H5_DLL herr_t H5L_get_info(const H5G_loc_t *loc, const char *name,
H5L_info_t *linkbuf/*out*/, hid_t lapl_id, hid_t dxpl_id);
H5_DLL herr_t H5L_delete(H5G_loc_t *loc, const char *name, hid_t lapl_id,
diff --git a/src/H5MF.c b/src/H5MF.c
index 0f2857e..e7c122d 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -86,6 +86,7 @@ typedef struct {
/* Allocator routines */
static herr_t H5MF_alloc_create(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type);
static herr_t H5MF_alloc_close(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type);
+static herr_t H5MF_close_delete(H5F_t *f, hid_t dxpl_id);
/*********************/
@@ -1145,6 +1146,141 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_close_shrink_eoa() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5MF_close_delete
+ *
+ * Purpose: The coding is copied from H5MF_close() "else" statement
+ * to this routine so it can also be called by H5MF_try_close().
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer:
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5MF_close_delete(H5F_t *f, hid_t dxpl_id)
+{
+ H5FD_mem_t type; /* Memory type for iteration */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+#ifdef H5MF_ALLOC_DEBUG
+HDfprintf(stderr, "%s: Entering\n", FUNC);
+#endif /* H5MF_ALLOC_DEBUG */
+
+ /* check args */
+ HDassert(f);
+ HDassert(f->shared);
+
+ /* super_vers can be 0, 1, 2 */
+ /* Iterate over all the free space types that have managers and get each free list's space */
+ for(type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
+#ifdef H5MF_ALLOC_DEBUG_MORE
+HDfprintf(stderr, "%s: Check 1.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %a\n", FUNC, (unsigned)type, f->shared->fs_man[type], (unsigned)type, f->shared->fs_addr[type]);
+#endif /* H5MF_ALLOC_DEBUG_MORE */
+ /* If the free space manager for this type is open, close it */
+ if(f->shared->fs_man[type]) {
+#ifdef H5MF_ALLOC_DEBUG_MORE
+HDfprintf(stderr, "%s: Before closing free space manager\n", FUNC);
+#endif /* H5MF_ALLOC_DEBUG_MORE */
+ if(H5FS_close(f, dxpl_id, f->shared->fs_man[type]) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't release free space info")
+ f->shared->fs_man[type] = NULL;
+ f->shared->fs_state[type] = H5F_FS_STATE_CLOSED;
+ } /* end if */
+#ifdef H5MF_ALLOC_DEBUG_MORE
+HDfprintf(stderr, "%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %a\n", FUNC, (unsigned)type, f->shared->fs_man[type], (unsigned)type, f->shared->fs_addr[type]);
+#endif /* H5MF_ALLOC_DEBUG_MORE */
+
+ /* If there is free space manager info for this type, delete it */
+ if(H5F_addr_defined(f->shared->fs_addr[type])) {
+ haddr_t tmp_fs_addr; /* Temporary holder for free space manager address */
+
+ /* Put address into temporary variable and reset it */
+ /* (Avoids loopback in file space freeing routine) */
+ tmp_fs_addr = f->shared->fs_addr[type];
+ f->shared->fs_addr[type] = HADDR_UNDEF;
+
+ /* Shift to "deleting" state, to make certain we don't track any
+ * file space freed as a result of deleting the free space manager.
+ */
+ f->shared->fs_state[type] = H5F_FS_STATE_DELETING;
+
+#ifdef H5MF_ALLOC_DEBUG_MORE
+HDfprintf(stderr, "%s: Before deleting free space manager\n", FUNC);
+#endif /* H5MF_ALLOC_DEBUG_MORE */
+
+ /* Delete free space manager for this type */
+ if(H5FS_delete(f, dxpl_id, tmp_fs_addr) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "can't delete free space manager")
+
+ /* Shift [back] to closed state */
+ HDassert(f->shared->fs_state[type] == H5F_FS_STATE_DELETING);
+ f->shared->fs_state[type] = H5F_FS_STATE_CLOSED;
+
+ /* Sanity check that the free space manager for this type wasn't started up again */
+ HDassert(!H5F_addr_defined(f->shared->fs_addr[type]));
+ } /* end if */
+ } /* end for */
+
+done:
+#ifdef H5MF_ALLOC_DEBUG
+HDfprintf(stderr, "%s: Leaving\n", FUNC);
+#endif /* H5MF_ALLOC_DEBUG */
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5MF_close_delete() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5MF_try_close
+ *
+ * Purpose: This is called by H5Fformat_convert() to close and delete
+ * free-space managers when downgrading persistent free-space
+ * to non-persistent.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5MF_try_close(H5F_t *f, hid_t dxpl_id)
+{
+ H5P_genplist_t *dxpl = NULL; /* DXPL for setting ring */
+ H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(FAIL)
+#ifdef H5MF_ALLOC_DEBUG
+HDfprintf(stderr, "%s: Entering\n", FUNC);
+#endif /* H5MF_ALLOC_DEBUG */
+
+ /* check args */
+ HDassert(f);
+
+ /* Set the ring type in the DXPL */
+ if(H5AC_set_ring(dxpl_id, H5AC_RING_FSM, &dxpl, &orig_ring) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSET, FAIL, "unable to set ring value")
+
+ if(H5MF_close_delete(f, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTSET, FAIL, "unable to close delete free-space managers")
+
+done:
+ /* Reset the ring in the DXPL */
+ if(H5AC_reset_ring(dxpl, orig_ring) < 0)
+ HDONE_ERROR(H5E_RESOURCE, H5E_CANTSET, FAIL, "unable to set property value")
+
+#ifdef H5MF_ALLOC_DEBUG
+HDfprintf(stderr, "%s: Leaving\n", FUNC);
+#endif /* H5MF_ALLOC_DEBUG */
+ FUNC_LEAVE_NOAPI(ret_value)
+
+} /* H5MF_try_close() */
+
/*-------------------------------------------------------------------------
* Function: H5MF_close
@@ -1287,55 +1423,10 @@ HDfprintf(stderr, "%s: Entering\n", FUNC);
} /* end for */
} /* end if */
else { /* super_vers can be 0, 1, 2 */
- /* Iterate over all the free space types that have managers and get each free list's space */
- for(type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
-#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: Check 1.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %a\n", FUNC, (unsigned)type, f->shared->fs_man[type], (unsigned)type, f->shared->fs_addr[type]);
-#endif /* H5MF_ALLOC_DEBUG_MORE */
- /* If the free space manager for this type is open, close it */
- if(f->shared->fs_man[type]) {
-#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: Before closing free space manager\n", FUNC);
-#endif /* H5MF_ALLOC_DEBUG_MORE */
- if(H5FS_close(f, dxpl_id, f->shared->fs_man[type]) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't release free space info")
- f->shared->fs_man[type] = NULL;
- f->shared->fs_state[type] = H5F_FS_STATE_CLOSED;
- } /* end if */
-#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %a\n", FUNC, (unsigned)type, f->shared->fs_man[type], (unsigned)type, f->shared->fs_addr[type]);
-#endif /* H5MF_ALLOC_DEBUG_MORE */
- /* If there is free space manager info for this type, delete it */
- if(H5F_addr_defined(f->shared->fs_addr[type])) {
- haddr_t tmp_fs_addr; /* Temporary holder for free space manager address */
-
- /* Put address into temporary variable and reset it */
- /* (Avoids loopback in file space freeing routine) */
- tmp_fs_addr = f->shared->fs_addr[type];
- f->shared->fs_addr[type] = HADDR_UNDEF;
-
- /* Shift to "deleting" state, to make certain we don't track any
- * file space freed as a result of deleting the free space manager.
- */
- f->shared->fs_state[type] = H5F_FS_STATE_DELETING;
-
-#ifdef H5MF_ALLOC_DEBUG_MORE
-HDfprintf(stderr, "%s: Before deleting free space manager\n", FUNC);
-#endif /* H5MF_ALLOC_DEBUG_MORE */
-
- /* Delete free space manager for this type */
- if(H5FS_delete(f, dxpl_id, tmp_fs_addr) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "can't delete free space manager")
-
- /* Shift [back] to closed state */
- HDassert(f->shared->fs_state[type] == H5F_FS_STATE_DELETING);
- f->shared->fs_state[type] = H5F_FS_STATE_CLOSED;
+ if(H5MF_close_delete(f, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space")
- /* Sanity check that the free space manager for this type wasn't started up again */
- HDassert(!H5F_addr_defined(f->shared->fs_addr[type]));
- } /* end if */
- } /* end for */
} /* end else */
/* Free the space in aggregators (again) */
diff --git a/src/H5MFprivate.h b/src/H5MFprivate.h
index 024cc91..22ed308 100644
--- a/src/H5MFprivate.h
+++ b/src/H5MFprivate.h
@@ -21,8 +21,6 @@
*
* Purpose: Private header file for file memory management.
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
#ifndef _H5MFprivate_H
@@ -36,13 +34,6 @@
/* Library Private Macros */
/**************************/
-/*
- * Feature: Define H5MF_DEBUG on the compiler command line if you want to
- * see diagnostics from this layer.
- */
-#ifdef NDEBUG
-# undef H5MF_DEBUG
-#endif
/****************************/
/* Library Private Typedefs */
@@ -63,6 +54,7 @@ H5_DLL herr_t H5MF_init_merge_flags(H5F_t *f);
H5_DLL herr_t H5MF_get_freespace(H5F_t *f, hid_t dxpl_id, hsize_t *tot_space,
hsize_t *meta_size);
H5_DLL herr_t H5MF_close(H5F_t *f, hid_t dxpl_id);
+H5_DLL herr_t H5MF_try_close(H5F_t *f, hid_t dxpl_id);
/* File space allocation routines */
H5_DLL haddr_t H5MF_alloc(H5F_t *f, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
diff --git a/src/H5O.c b/src/H5O.c
index 2988567..ba2f352 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -282,6 +282,7 @@ H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
H5G_loc_t obj_loc; /* Location used to open group */
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
hbool_t loc_found = FALSE; /* Entry at 'name' found */
hid_t ret_value = FAIL;
@@ -297,11 +298,10 @@ H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid index type specified")
if(order <= H5_ITER_UNKNOWN || order >= H5_ITER_N)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -309,12 +309,12 @@ H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
H5G_loc_reset(&obj_loc);
/* Find the object's location, according to the order in the index */
- if(H5G_loc_find_by_idx(&loc, group_name, idx_type, order, n, &obj_loc/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if(H5G_loc_find_by_idx(&loc, group_name, idx_type, order, n, &obj_loc/*out*/, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "group not found")
loc_found = TRUE;
/* Open the object */
- if((ret_value = H5O_open_by_loc(&obj_loc, lapl_id, H5AC_ind_dxpl_id, TRUE)) < 0)
+ if((ret_value = H5O_open_by_loc(&obj_loc, lapl_id, dxpl_id, TRUE)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object")
done:
@@ -390,7 +390,7 @@ H5Oopen_by_addr(hid_t loc_id, haddr_t addr)
H5G_name_reset(obj_loc.path); /* objects opened through this routine don't have a path name */
/* Open the object */
- if((ret_value = H5O_open_by_loc(&obj_loc, lapl_id, H5AC_ind_dxpl_id, TRUE)) < 0)
+ if((ret_value = H5O_open_by_loc(&obj_loc, lapl_id, H5AC_dxpl_id, TRUE)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object")
done:
@@ -426,6 +426,7 @@ H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id,
{
H5G_loc_t new_loc;
H5G_loc_t obj_loc;
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -448,8 +449,12 @@ H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id,
if(lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, obj_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
/* Link to the object */
- if(H5L_link(&new_loc, new_name, &obj_loc, lcpl_id, lapl_id, H5AC_dxpl_id) < 0)
+ if(H5L_link(&new_loc, new_name, &obj_loc, lcpl_id, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to create link")
done:
@@ -556,6 +561,7 @@ htri_t
H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id)
{
H5G_loc_t loc; /* Location info */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
htri_t ret_value = FAIL; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -566,14 +572,13 @@ H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Check if the object exists */
- if((ret_value = H5G_loc_exists(&loc, name, lapl_id, H5AC_ind_dxpl_id)) < 0)
+ if((ret_value = H5G_loc_exists(&loc, name, lapl_id, dxpl_id)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine if '%s' exists", name)
done:
@@ -610,7 +615,7 @@ H5Oget_info(hid_t loc_id, H5O_info_t *oinfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
/* Retrieve the object's information */
- if(H5G_loc_info(&loc, ".", TRUE, oinfo/*out*/, H5P_LINK_ACCESS_DEFAULT, H5AC_ind_dxpl_id) < 0)
+ if(H5G_loc_info(&loc, ".", TRUE, oinfo/*out*/, H5P_LINK_ACCESS_DEFAULT, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found")
done:
@@ -635,6 +640,7 @@ herr_t
H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lapl_id)
{
H5G_loc_t loc; /* Location of group */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -647,14 +653,13 @@ H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lap
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
if(!oinfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Retrieve the object's information */
- if(H5G_loc_info(&loc, name, TRUE, oinfo/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if(H5G_loc_info(&loc, name, TRUE, oinfo/*out*/, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found")
done:
@@ -685,6 +690,7 @@ H5Oget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
hbool_t loc_found = FALSE; /* Entry at 'name' found */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -702,11 +708,10 @@ H5Oget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
if(!oinfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Set up opened group location to fill in */
obj_loc.oloc = &obj_oloc;
@@ -714,12 +719,12 @@ H5Oget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type,
H5G_loc_reset(&obj_loc);
/* Find the object's location, according to the order in the index */
- if(H5G_loc_find_by_idx(&loc, group_name, idx_type, order, n, &obj_loc/*out*/, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if(H5G_loc_find_by_idx(&loc, group_name, idx_type, order, n, &obj_loc/*out*/, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "group not found")
loc_found = TRUE;
/* Retrieve the object's information */
- if(H5O_get_info(obj_loc.oloc, H5AC_ind_dxpl_id, TRUE, oinfo) < 0)
+ if(H5O_get_info(obj_loc.oloc, H5AC_dxpl_id, TRUE, oinfo) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object info")
done:
@@ -762,7 +767,7 @@ H5Oset_comment(hid_t obj_id, const char *comment)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
/* (Re)set the object's comment */
- if(H5G_loc_set_comment(&loc, ".", comment, H5P_LINK_ACCESS_DEFAULT, H5AC_ind_dxpl_id) < 0)
+ if(H5G_loc_set_comment(&loc, ".", comment, H5P_LINK_ACCESS_DEFAULT, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found")
done:
@@ -792,6 +797,7 @@ H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment,
hid_t lapl_id)
{
H5G_loc_t loc; /* Location of group */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -802,14 +808,13 @@ H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* (Re)set the object's comment */
- if(H5G_loc_set_comment(&loc, name, comment, lapl_id, H5AC_ind_dxpl_id) < 0)
+ if(H5G_loc_set_comment(&loc, name, comment, lapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found")
done:
@@ -847,7 +852,7 @@ H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
/* Retrieve the object's comment */
- if((ret_value = H5G_loc_get_comment(&loc, ".", comment/*out*/, bufsize, H5P_LINK_ACCESS_DEFAULT, H5AC_ind_dxpl_id)) < 0)
+ if((ret_value = H5G_loc_get_comment(&loc, ".", comment/*out*/, bufsize, H5P_LINK_ACCESS_DEFAULT, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found")
done:
@@ -876,6 +881,7 @@ H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t buf
hid_t lapl_id)
{
H5G_loc_t loc; /* Location of group */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
ssize_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -886,14 +892,13 @@ H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t buf
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Retrieve the object's comment */
- if((ret_value = H5G_loc_get_comment(&loc, name, comment/*out*/, bufsize, lapl_id, H5AC_ind_dxpl_id)) < 0)
+ if((ret_value = H5G_loc_get_comment(&loc, name, comment/*out*/, bufsize, lapl_id, dxpl_id)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "object not found")
done:
@@ -951,7 +956,7 @@ H5Ovisit(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified")
/* Call internal object visitation routine */
- if((ret_value = H5O_visit(obj_id, ".", idx_type, order, op, op_data, H5P_LINK_ACCESS_DEFAULT, H5AC_ind_dxpl_id)) < 0)
+ if((ret_value = H5O_visit(obj_id, ".", idx_type, order, op, op_data, H5P_LINK_ACCESS_DEFAULT, H5AC_dxpl_id)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed")
done:
@@ -995,6 +1000,7 @@ herr_t
H5Ovisit_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
H5_iter_order_t order, H5O_iterate_t op, void *op_data, hid_t lapl_id)
{
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -1010,14 +1016,13 @@ H5Ovisit_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified")
if(!op)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified")
- if(H5P_DEFAULT == lapl_id)
- lapl_id = H5P_LINK_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not link access property list ID")
+
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&lapl_id, H5P_CLS_LACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Call internal object visitation routine */
- if((ret_value = H5O_visit(loc_id, obj_name, idx_type, order, op, op_data, lapl_id, H5AC_ind_dxpl_id)) < 0)
+ if((ret_value = H5O_visit(loc_id, obj_name, idx_type, order, op, op_data, lapl_id, dxpl_id)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "object visitation failed")
done:
@@ -1466,7 +1471,7 @@ H5O_open_name(H5G_loc_t *loc, const char *name, hid_t lapl_id, hbool_t app_ref)
H5G_name_t obj_path; /* Opened object group hier. path */
H5O_loc_t obj_oloc; /* Opened object object location */
hbool_t loc_found = FALSE; /* Entry at 'name' found */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* transfer property list used for this operation */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
hid_t ret_value = FAIL;
FUNC_ENTER_NOAPI(FAIL)
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index 28de0eb..c6aab44 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -1095,7 +1095,7 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing)
if(chk_proxy->cont_chunkno == 0)
parent = chk_proxy->oh;
else {
- if(NULL == (cont_chk_proxy = H5O_chunk_protect(chk_proxy->f, H5AC_ind_dxpl_id, chk_proxy->oh, chk_proxy->cont_chunkno)))
+ if(NULL == (cont_chk_proxy = H5O_chunk_protect(chk_proxy->f, H5AC_dxpl_id, chk_proxy->oh, chk_proxy->cont_chunkno)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk")
parent = cont_chk_proxy;
} /* end else */
@@ -1122,7 +1122,7 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing)
/* Add flush dependency on object header proxy, if proxy exists */
if(chk_proxy->oh->proxy_present)
- if(H5O__proxy_depend(chk_proxy->f, H5AC_ind_dxpl_id, chk_proxy->oh, chk_proxy) < 0)
+ if(H5O__proxy_depend(chk_proxy->f, H5AC_dxpl_id, chk_proxy->oh, chk_proxy) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDEPEND, FAIL, "can't create flush dependency on object header proxy")
case H5AC_NOTIFY_ACTION_AFTER_FLUSH:
@@ -1151,7 +1151,7 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing)
done:
if(cont_chk_proxy)
- if(H5O_chunk_unprotect(chk_proxy->f, H5AC_ind_dxpl_id, cont_chk_proxy, FALSE) < 0)
+ if(H5O_chunk_unprotect(chk_proxy->f, H5AC_dxpl_id, cont_chk_proxy, FALSE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index 97ed056..9298c04 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -213,10 +213,10 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
/* for opening the destination object */
H5G_name_t src_path; /* Opened source object hier. path */
H5O_loc_t src_oloc; /* Opened source object object location */
+ htri_t dst_exists; /* Does destination name exist already? */
hbool_t loc_found = FALSE; /* Location at 'name' found */
hbool_t obj_open = FALSE; /* Entry at 'name' found */
-
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("e", "i*si*sii", src_loc_id, src_name, dst_loc_id, dst_name,
@@ -233,22 +233,10 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no destination name specified")
/* check if destination name already exists */
- {
- H5G_name_t tmp_path;
- H5O_loc_t tmp_oloc;
- H5G_loc_t tmp_loc;
-
- /* Set up group location */
- tmp_loc.oloc = &tmp_oloc;
- tmp_loc.path = &tmp_path;
- H5G_loc_reset(&tmp_loc);
-
- /* Check if object already exists in destination */
- if(H5G_loc_find(&dst_loc, dst_name, &tmp_loc, H5P_DEFAULT, H5AC_ind_dxpl_id) >= 0) {
- H5G_name_free(&tmp_path);
- HGOTO_ERROR(H5E_SYM, H5E_EXISTS, FAIL, "destination object already exists")
- } /* end if */
- }
+ if((dst_exists = H5L_exists_tolerant(&dst_loc, dst_name, H5P_DEFAULT, H5AC_dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check if destination name exists")
+ if(TRUE == dst_exists)
+ HGOTO_ERROR(H5E_OHDR, H5E_EXISTS, FAIL, "destination object already exists")
/* Set up opened group location to fill in */
src_loc.oloc = &src_oloc;
@@ -256,7 +244,7 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
H5G_loc_reset(&src_loc);
/* Find the source object to copy */
- if(H5G_loc_find(&loc, src_name, &src_loc/*out*/, H5P_DEFAULT, H5AC_ind_dxpl_id) < 0)
+ if(H5G_loc_find(&loc, src_name, &src_loc/*out*/, H5P_DEFAULT, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "source object not found")
loc_found = TRUE;
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index ebcb5d3..f291305 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -527,7 +527,7 @@ H5O_fill_copy(const void *_src, void *_dst)
H5T_path_t *tpath; /* Conversion information */
/* Set up type conversion function */
- if(NULL == (tpath = H5T_path_find(src->type, dst->type, NULL, NULL, H5AC_ind_dxpl_id, FALSE)))
+ if(NULL == (tpath = H5T_path_find(src->type, dst->type, NULL, NULL, H5AC_dxpl_id, FALSE)))
HGOTO_ERROR(H5E_OHDR, H5E_UNSUPPORTED, NULL, "unable to convert between src and dst data types")
/* If necessary, convert fill value datatypes (which copies VL components, etc.) */
@@ -555,7 +555,7 @@ H5O_fill_copy(const void *_src, void *_dst)
} /* end if */
/* Convert fill value */
- if(H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, dst->buf, bkg_buf, H5AC_ind_dxpl_id) < 0) {
+ if(H5T_convert(tpath, src_id, dst_id, (size_t)1, (size_t)0, (size_t)0, dst->buf, bkg_buf, H5AC_dxpl_id) < 0) {
H5I_dec_ref(src_id);
H5I_dec_ref(dst_id);
if(bkg_buf)
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index 5963094..98647be 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -771,7 +771,7 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
UINT32ENCODE(heap_block_p, chksum)
/* Insert block into global heap */
- if(H5HG_insert(f, H5AC_ind_dxpl_id, block_size, heap_block, &((H5O_layout_t *)mesg)->storage.u.virt.serial_list_hobjid) < 0) /* Casting away const OK --NAF */
+ if(H5HG_insert(f, H5AC_dxpl_id, block_size, heap_block, &((H5O_layout_t *)mesg)->storage.u.virt.serial_list_hobjid) < 0) /* Casting away const OK --NAF */
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to insert virtual dataset heap block")
} /* end if */
diff --git a/src/H5Oproxy.c b/src/H5Oproxy.c
index 67388fb..f9c5d68 100644
--- a/src/H5Oproxy.c
+++ b/src/H5Oproxy.c
@@ -324,12 +324,12 @@ H5O__proxy_notify(H5AC_notify_action_t action, void *_thing)
/* Create flush dependencies on all other object header chunks */
for(u = 1; u < proxy->oh->nchunks; u++) {
- if(NULL == (chk_proxy = H5O_chunk_protect(proxy->f, H5AC_ind_dxpl_id, proxy->oh, u)))
+ if(NULL == (chk_proxy = H5O_chunk_protect(proxy->f, H5AC_dxpl_id, proxy->oh, u)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header chunk")
/* same as before, but looks backward...need to check into that..(proxy, chk_proxy) */
if(H5O__proxy_depend_core(chk_proxy, proxy) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDEPEND, FAIL, "unable to create flush dependency")
- if(H5O_chunk_unprotect(proxy->f, H5AC_ind_dxpl_id, chk_proxy, FALSE) < 0)
+ if(H5O_chunk_unprotect(proxy->f, H5AC_dxpl_id, chk_proxy, FALSE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
chk_proxy = NULL;
} /* end for */
@@ -372,7 +372,7 @@ H5O__proxy_notify(H5AC_notify_action_t action, void *_thing)
done:
if(chk_proxy) {
HDassert(ret_value < 0);
- if(H5O_chunk_unprotect(proxy->f, H5AC_ind_dxpl_id, chk_proxy, FALSE) < 0)
+ if(H5O_chunk_unprotect(proxy->f, H5AC_dxpl_id, chk_proxy, FALSE) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to unprotect object header chunk")
} /* end if */
diff --git a/src/H5Otest.c b/src/H5Otest.c
index 1c149e3..b9ed5be 100644
--- a/src/H5Otest.c
+++ b/src/H5Otest.c
@@ -108,14 +108,14 @@ H5O_is_attr_dense_test(hid_t oid)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found")
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC__READ_ONLY_FLAG)))
+ if(NULL == (oh = H5O_protect(loc, H5AC_dxpl_id, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
if(oh->version > H5O_VERSION_1) {
/* Check for (& retrieve if available) attribute info */
- if(H5A_get_ainfo(loc->file, H5AC_ind_dxpl_id, oh, &ainfo) < 0)
+ if(H5A_get_ainfo(loc->file, H5AC_dxpl_id, oh, &ainfo) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
} /* end if */
@@ -130,7 +130,7 @@ H5O_is_attr_dense_test(hid_t oid)
ret_value = FALSE;
done:
- if(oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ if(oh && H5O_unprotect(loc, H5AC_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
@@ -173,13 +173,13 @@ H5O_is_attr_empty_test(hid_t oid)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found")
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC__READ_ONLY_FLAG)))
+ if(NULL == (oh = H5O_protect(loc, H5AC_dxpl_id, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Check for attribute info stored */
if(oh->version > H5O_VERSION_1) {
/* Check for (& retrieve if available) attribute info */
- if((ainfo_exists = H5A_get_ainfo(loc->file, H5AC_ind_dxpl_id, oh, &ainfo)) < 0)
+ if((ainfo_exists = H5A_get_ainfo(loc->file, H5AC_dxpl_id, oh, &ainfo)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
} /* end if */
@@ -195,10 +195,10 @@ H5O_is_attr_empty_test(hid_t oid)
HDassert(nattrs == 0);
/* Set metadata tag in dxpl_id */
- H5_BEGIN_TAG(H5AC_ind_dxpl_id, loc->addr, FAIL);
+ H5_BEGIN_TAG(H5AC_dxpl_id, loc->addr, FAIL);
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.name_bt2_addr, NULL)))
+ if(NULL == (bt2_name = H5B2_open(loc->file, H5AC_dxpl_id, ainfo.name_bt2_addr, NULL)))
HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Reset metadata tag in dxpl_id */
@@ -221,9 +221,9 @@ H5O_is_attr_empty_test(hid_t oid)
done:
/* Release resources */
- if(bt2_name && H5B2_close(bt2_name, H5AC_ind_dxpl_id) < 0)
+ if(bt2_name && H5B2_close(bt2_name, H5AC_dxpl_id) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
- if(oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ if(oh && H5O_unprotect(loc, H5AC_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
@@ -266,14 +266,14 @@ H5O_num_attrs_test(hid_t oid, hsize_t *nattrs)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found")
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC__READ_ONLY_FLAG)))
+ if(NULL == (oh = H5O_protect(loc, H5AC_dxpl_id, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
if(oh->version > H5O_VERSION_1) {
/* Check for (& retrieve if available) attribute info */
- if(H5A_get_ainfo(loc->file, H5AC_ind_dxpl_id, oh, &ainfo) < 0)
+ if(H5A_get_ainfo(loc->file, H5AC_dxpl_id, oh, &ainfo) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
} /* end if */
@@ -288,10 +288,10 @@ H5O_num_attrs_test(hid_t oid, hsize_t *nattrs)
HDassert(obj_nattrs == 0);
/* Set metadata tag in dxpl_id */
- H5_BEGIN_TAG(H5AC_ind_dxpl_id, loc->addr, FAIL);
+ H5_BEGIN_TAG(H5AC_dxpl_id, loc->addr, FAIL);
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.name_bt2_addr, NULL)))
+ if(NULL == (bt2_name = H5B2_open(loc->file, H5AC_dxpl_id, ainfo.name_bt2_addr, NULL)))
HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Reset metadata tag in dxpl_id */
@@ -311,9 +311,9 @@ H5O_num_attrs_test(hid_t oid, hsize_t *nattrs)
done:
/* Release resources */
- if(bt2_name && H5B2_close(bt2_name, H5AC_ind_dxpl_id) < 0)
+ if(bt2_name && H5B2_close(bt2_name, H5AC_dxpl_id) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
- if(oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ if(oh && H5O_unprotect(loc, H5AC_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
@@ -358,17 +358,17 @@ H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found")
/* Set metadata tag in dxpl_id */
- H5_BEGIN_TAG(H5AC_ind_dxpl_id, loc->addr, FAIL);
+ H5_BEGIN_TAG(H5AC_dxpl_id, loc->addr, FAIL);
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC__READ_ONLY_FLAG)))
+ if(NULL == (oh = H5O_protect(loc, H5AC_dxpl_id, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Check for attribute info stored */
ainfo.fheap_addr = HADDR_UNDEF;
if(oh->version > H5O_VERSION_1) {
/* Check for (& retrieve if available) attribute info */
- if(H5A_get_ainfo(loc->file, H5AC_ind_dxpl_id, oh, &ainfo) < 0)
+ if(H5A_get_ainfo(loc->file, H5AC_dxpl_id, oh, &ainfo) < 0)
HGOTO_ERROR_TAG(H5E_ATTR, H5E_CANTGET, FAIL, "can't check for attribute info message")
} /* end if */
@@ -379,7 +379,7 @@ H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
HGOTO_DONE_TAG(FAIL, FAIL)
/* Open the name index v2 B-tree */
- if(NULL == (bt2_name = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.name_bt2_addr, NULL)))
+ if(NULL == (bt2_name = H5B2_open(loc->file, H5AC_dxpl_id, ainfo.name_bt2_addr, NULL)))
HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index")
/* Retrieve # of records in name index */
@@ -389,7 +389,7 @@ H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
/* Check if there is a creation order index */
if(H5F_addr_defined(ainfo.corder_bt2_addr)) {
/* Open the creation order index v2 B-tree */
- if(NULL == (bt2_corder = H5B2_open(loc->file, H5AC_ind_dxpl_id, ainfo.corder_bt2_addr, NULL)))
+ if(NULL == (bt2_corder = H5B2_open(loc->file, H5AC_dxpl_id, ainfo.corder_bt2_addr, NULL)))
HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for creation order index")
/* Retrieve # of records in creation order index */
@@ -404,11 +404,11 @@ H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
done:
/* Release resources */
- if(bt2_name && H5B2_close(bt2_name, H5AC_ind_dxpl_id) < 0)
+ if(bt2_name && H5B2_close(bt2_name, H5AC_dxpl_id) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for name index")
- if(bt2_corder && H5B2_close(bt2_corder, H5AC_ind_dxpl_id) < 0)
+ if(bt2_corder && H5B2_close(bt2_corder, H5AC_dxpl_id) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "can't close v2 B-tree for creation order index")
- if(oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ if(oh && H5O_unprotect(loc, H5AC_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
@@ -452,7 +452,7 @@ H5O_check_msg_marked_test(hid_t oid, hbool_t flag_val)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found")
/* Get the object header */
- if(NULL == (oh = H5O_protect(loc, H5AC_ind_dxpl_id, H5AC__READ_ONLY_FLAG)))
+ if(NULL == (oh = H5O_protect(loc, H5AC_dxpl_id, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Locate "unknown" message */
@@ -471,7 +471,7 @@ H5O_check_msg_marked_test(hid_t oid, hbool_t flag_val)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "'unknown' message type not found")
done:
- if(oh && H5O_unprotect(loc, H5AC_ind_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
+ if(oh && H5O_unprotect(loc, H5AC_dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 03a4668..280a949 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -1998,7 +1998,6 @@ H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/])
H5P_genplist_t *plist; /* Property list pointer */
H5O_layout_t chunk_layout; /* Layout information for setting chunk info */
uint64_t chunk_nelmts; /* Number of elements in chunk */
- unsigned max_enc_bytes_per_dim; /* Max. number of bytes required to encode this dimension */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2026,10 +2025,7 @@ H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/])
HDmemcpy(&chunk_layout, &H5D_def_layout_chunk_g, sizeof(H5D_def_layout_chunk_g));
HDmemset(&chunk_layout.u.chunk.dim, 0, sizeof(chunk_layout.u.chunk.dim));
chunk_nelmts = 1;
- max_enc_bytes_per_dim = 0;
for(u = 0; u < (unsigned)ndims; u++) {
- unsigned enc_bytes_per_dim; /* Number of bytes required to encode this dimension */
-
if(dim[u] == 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "all chunk dimensions must be positive")
if(dim[u] != (dim[u] & 0xffffffff))
@@ -2038,16 +2034,7 @@ H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/])
if(chunk_nelmts > (uint64_t)0xffffffff)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "number of elements in chunk must be < 4GB")
chunk_layout.u.chunk.dim[u] = (uint32_t)dim[u]; /* Store user's chunk dimensions */
-
- /* Get encoded size of dim, in bytes */
- enc_bytes_per_dim = (H5VM_log2_gen(dim[u]) + 8) / 8;
-
- /* Check if this is the largest value so far */
- if(enc_bytes_per_dim > max_enc_bytes_per_dim)
- max_enc_bytes_per_dim = enc_bytes_per_dim;
} /* end for */
- HDassert(max_enc_bytes_per_dim > 0 && max_enc_bytes_per_dim <= 8);
- chunk_layout.u.chunk.enc_bytes_per_dim = max_enc_bytes_per_dim;
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
@@ -2517,8 +2504,8 @@ done:
*
* If the length of the filename, which determines the
* required value of size, is unknown, a preliminary call to
- * H5Pget_virtual_filename with the last two parameters set
- * to NULL can be made. The return value of this call will
+ * H5Pget_virtual_filename with 'name' set to NULL and 'size'
+ * set to zero can be made. The return value of this call will
* be the size in bytes of the filename. That value, plus 1
* for a NULL terminator, is then assigned to size for a
* second H5Pget_virtual_filename call, which will retrieve
@@ -2578,14 +2565,14 @@ done:
* additional characters, if any, are not returned to the
* user application.
*
- * If the length of the filename, which determines the
+ * If the length of the dataset name, which determines the
* required value of size, is unknown, a preliminary call to
- * H5Pget_virtual_dsetname with the last two parameters set
- * to NULL can be made. The return value of this call will
- * be the size in bytes of the filename. That value, plus 1
+ * H5Pget_virtual_dsetname with 'name' set to NULL and 'size'
+ * set to zero can be made. The return value of this call will
+ * be the size in bytes of the dataset name. That value, plus 1
* for a NULL terminator, is then assigned to size for a
* second H5Pget_virtual_dsetname call, which will retrieve
- * the actual filename.
+ * the actual dataset name.
*
* Return: Returns the length of the name if successful, otherwise
* returns a negative value.
@@ -3246,7 +3233,7 @@ H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value)
HDmemcpy(fill.buf, value, (size_t)fill.size);
/* Set up type conversion function */
- if(NULL == (tpath = H5T_path_find(type, type, NULL, NULL, H5AC_ind_dxpl_id, FALSE)))
+ if(NULL == (tpath = H5T_path_find(type, type, NULL, NULL, H5AC_dxpl_id, FALSE)))
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest data types")
/* If necessary, convert fill value datatypes (which copies VL components, etc.) */
@@ -3258,7 +3245,7 @@ H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Convert the fill value */
- if(H5T_convert(tpath, type_id, type_id, (size_t)1, (size_t)0, (size_t)0, fill.buf, bkg_buf, H5AC_ind_dxpl_id) < 0) {
+ if(H5T_convert(tpath, type_id, type_id, (size_t)1, (size_t)0, (size_t)0, fill.buf, bkg_buf, H5AC_dxpl_id) < 0) {
if(bkg_buf)
bkg_buf = H5FL_BLK_FREE(type_conv, bkg_buf);
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed")
@@ -3413,7 +3400,7 @@ H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value/*out*/)
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
/* Get the fill value */
- if(H5P_get_fill_value(plist, type, value, H5AC_ind_dxpl_id) < 0)
+ if(H5P_get_fill_value(plist, type, value, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get fill value")
done:
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 40a529b..14991c4 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -471,13 +471,13 @@ H5P__facc_reg_prop(H5P_genclass_t *pclass)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
/* Register the core VFD backing store write tracking flag */
- if(H5P_register_real(pclass, H5F_ACS_CORE_WRITE_TRACKING_FLAG_NAME, H5F_ACS_CORE_WRITE_TRACKING_FLAG_SIZE, &H5F_def_core_write_tracking_flag_g ,
+ if(H5P_register_real(pclass, H5F_ACS_CORE_WRITE_TRACKING_FLAG_NAME, H5F_ACS_CORE_WRITE_TRACKING_FLAG_SIZE, &H5F_def_core_write_tracking_flag_g,
NULL, NULL, NULL, H5F_ACS_CORE_WRITE_TRACKING_FLAG_ENC, H5F_ACS_CORE_WRITE_TRACKING_FLAG_DEC,
NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
/* Register the size of the core VFD backing store page size */
- if(H5P_register_real(pclass, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_NAME, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_SIZE, &H5F_def_core_write_tracking_page_size_g ,
+ if(H5P_register_real(pclass, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_NAME, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_SIZE, &H5F_def_core_write_tracking_page_size_g,
NULL, NULL, NULL, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_ENC, H5F_ACS_CORE_WRITE_TRACKING_PAGE_SIZE_DEC,
NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
@@ -3475,6 +3475,9 @@ H5P__facc_multi_type_dec(const void **_pp, void *_value)
*
* Return: Non-negative on success/Negative on failure
*
+ * Programmer: Dana Robinson
+ * Tuesday, April 8, 2014
+ *
*-------------------------------------------------------------------------
*/
herr_t
@@ -3502,7 +3505,7 @@ H5Pset_core_write_tracking(hid_t plist_id, hbool_t is_enabled, size_t page_size)
done:
FUNC_LEAVE_API(ret_value)
-}
+} /* end H5Pset_core_write_tracking() */
/*-------------------------------------------------------------------------
@@ -3513,6 +3516,9 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
+ * Programmer: Dana Robinson
+ * Tuesday, April 8, 2014
+ *
*-------------------------------------------------------------------------
*/
herr_t
@@ -3541,7 +3547,7 @@ H5Pget_core_write_tracking(hid_t plist_id, hbool_t *is_enabled, size_t *page_siz
done:
FUNC_LEAVE_API(ret_value)
-}
+} /* end H5Pget_core_write_tracking() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Pint.c b/src/H5Pint.c
index 69b2791..b3d1976 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -30,6 +30,7 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
#include "H5FLprivate.h" /* Free lists */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
@@ -139,6 +140,8 @@ hid_t H5P_CLS_DATATYPE_ACCESS_ID_g = FAIL;
H5P_genclass_t *H5P_CLS_DATATYPE_ACCESS_g = NULL;
hid_t H5P_CLS_ATTRIBUTE_CREATE_ID_g = FAIL;
H5P_genclass_t *H5P_CLS_ATTRIBUTE_CREATE_g = NULL;
+hid_t H5P_CLS_ATTRIBUTE_ACCESS_ID_g = FAIL;
+H5P_genclass_t *H5P_CLS_ATTRIBUTE_ACCESS_g = NULL;
hid_t H5P_CLS_OBJECT_COPY_ID_g = FAIL;
H5P_genclass_t *H5P_CLS_OBJECT_COPY_g = NULL;
hid_t H5P_CLS_LINK_CREATE_ID_g = FAIL;
@@ -163,6 +166,7 @@ hid_t H5P_LST_GROUP_ACCESS_ID_g = FAIL;
hid_t H5P_LST_DATATYPE_CREATE_ID_g = FAIL;
hid_t H5P_LST_DATATYPE_ACCESS_ID_g = FAIL;
hid_t H5P_LST_ATTRIBUTE_CREATE_ID_g = FAIL;
+hid_t H5P_LST_ATTRIBUTE_ACCESS_ID_g = FAIL;
hid_t H5P_LST_OBJECT_COPY_ID_g = FAIL;
hid_t H5P_LST_LINK_CREATE_ID_g = FAIL;
hid_t H5P_LST_LINK_ACCESS_ID_g = FAIL;
@@ -186,6 +190,26 @@ const H5P_libclass_t H5P_CLS_ROOT[1] = {{
NULL /* Class close callback info */
}};
+/* Attribute access property list class library initialization object */
+/* (move to proper source code file when used for real) */
+const H5P_libclass_t H5P_CLS_AACC[1] = {{
+ "attribute access", /* Class name for debugging */
+ H5P_TYPE_ATTRIBUTE_ACCESS, /* Class type */
+
+ &H5P_CLS_LINK_ACCESS_g, /* Parent class */
+ &H5P_CLS_ATTRIBUTE_ACCESS_g, /* Pointer to class */
+ &H5P_CLS_ATTRIBUTE_ACCESS_ID_g, /* Pointer to class ID */
+ &H5P_LST_ATTRIBUTE_ACCESS_ID_g, /* Pointer to default property list ID */
+ NULL, /* Default property registration routine */
+
+ NULL, /* Class creation callback */
+ NULL, /* Class creation callback info */
+ NULL, /* Class copy callback */
+ NULL, /* Class copy callback info */
+ NULL, /* Class close callback */
+ NULL /* Class close callback info */
+}};
+
/* Group access property list class library initialization object */
/* (move to proper source code file when used for real) */
const H5P_libclass_t H5P_CLS_GACC[1] = {{
@@ -250,13 +274,10 @@ const H5P_libclass_t H5P_CLS_TACC[1] = {{
/* Library property list classes defined in other code modules */
H5_DLLVAR const H5P_libclass_t H5P_CLS_OCRT[1]; /* Object creation */
H5_DLLVAR const H5P_libclass_t H5P_CLS_STRCRT[1]; /* String create */
-H5_DLLVAR const H5P_libclass_t H5P_CLS_LACC[1]; /* Link access */
H5_DLLVAR const H5P_libclass_t H5P_CLS_GCRT[1]; /* Group create */
H5_DLLVAR const H5P_libclass_t H5P_CLS_OCPY[1]; /* Object copy */
H5_DLLVAR const H5P_libclass_t H5P_CLS_FCRT[1]; /* File creation */
-H5_DLLVAR const H5P_libclass_t H5P_CLS_FACC[1]; /* File access */
H5_DLLVAR const H5P_libclass_t H5P_CLS_DCRT[1]; /* Dataset creation */
-H5_DLLVAR const H5P_libclass_t H5P_CLS_DACC[1]; /* Dataset access */
H5_DLLVAR const H5P_libclass_t H5P_CLS_DXFR[1]; /* Data transfer */
H5_DLLVAR const H5P_libclass_t H5P_CLS_FMNT[1]; /* File mount */
H5_DLLVAR const H5P_libclass_t H5P_CLS_ACRT[1]; /* Attribute creation */
@@ -297,6 +318,7 @@ static H5P_libclass_t const * const init_class[] = {
H5P_CLS_TCRT, /* Datatype creation */
H5P_CLS_TACC, /* Datatype access */
H5P_CLS_ACRT, /* Attribute creation */
+ H5P_CLS_AACC, /* Attribute access */
H5P_CLS_LCRT /* Link creation */
};
@@ -487,6 +509,7 @@ H5P_term_package(void)
H5P_LST_DATATYPE_CREATE_ID_g =
H5P_LST_DATATYPE_ACCESS_ID_g =
H5P_LST_ATTRIBUTE_CREATE_ID_g =
+ H5P_LST_ATTRIBUTE_ACCESS_ID_g =
H5P_LST_OBJECT_COPY_ID_g =
H5P_LST_LINK_CREATE_ID_g =
H5P_LST_LINK_ACCESS_ID_g =
@@ -513,6 +536,7 @@ H5P_term_package(void)
H5P_CLS_DATATYPE_ACCESS_g =
H5P_CLS_STRING_CREATE_g =
H5P_CLS_ATTRIBUTE_CREATE_g =
+ H5P_CLS_ATTRIBUTE_ACCESS_g =
H5P_CLS_OBJECT_COPY_g =
H5P_CLS_LINK_CREATE_g =
H5P_CLS_LINK_ACCESS_g =
@@ -531,6 +555,7 @@ H5P_term_package(void)
H5P_CLS_DATATYPE_ACCESS_ID_g =
H5P_CLS_STRING_CREATE_ID_g =
H5P_CLS_ATTRIBUTE_CREATE_ID_g =
+ H5P_CLS_ATTRIBUTE_ACCESS_ID_g =
H5P_CLS_OBJECT_COPY_ID_g =
H5P_CLS_LINK_CREATE_ID_g =
H5P_CLS_LINK_ACCESS_ID_g =
@@ -1187,7 +1212,7 @@ H5P__find_prop_plist(const H5P_genplist_t *plist, const char *name)
/* Check if the property has been deleted from list */
if(H5SL_search(plist->del,name) != NULL) {
- HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "can't find property in skip list")
+ HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "property deleted from skip list")
} /* end if */
else {
/* Get the property data from the skip list */
@@ -5253,7 +5278,7 @@ H5P__new_plist_of_type(H5P_plist_type_t type)
FUNC_ENTER_PACKAGE
/* Sanity checks */
- HDcompile_assert(H5P_TYPE_LINK_ACCESS == (H5P_TYPE_MAX_TYPE - 1));
+ HDcompile_assert(H5P_TYPE_ATTRIBUTE_ACCESS == (H5P_TYPE_MAX_TYPE - 1));
HDassert(type >= H5P_TYPE_USER && type <= H5P_TYPE_LINK_ACCESS);
/* Check arguments */
@@ -5316,6 +5341,10 @@ H5P__new_plist_of_type(H5P_plist_type_t type)
class_id = H5P_CLS_ATTRIBUTE_CREATE_ID_g;
break;
+ case H5P_TYPE_ATTRIBUTE_ACCESS:
+ class_id = H5P_CLS_ATTRIBUTE_ACCESS_ID_g;
+ break;
+
case H5P_TYPE_OBJECT_COPY:
class_id = H5P_CLS_OBJECT_COPY_ID_g;
break;
@@ -5403,3 +5432,64 @@ H5P_get_class(const H5P_genplist_t *plist)
FUNC_LEAVE_NOAPI(plist->pclass)
} /* end H5P_get_class() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5P_verify_apl_and_dxpl
+ *
+ * Purpose: Validate access property list and/or switch from generic
+ * property list to default of correct type.
+ *
+ * Also, if using internal DXPL and collective flag is set,
+ * switch to internal collective DXPL.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Mohamad Chaarawi
+ * Sunday, June 21, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5P_verify_apl_and_dxpl(hid_t *acspl_id, const H5P_libclass_t *libclass,
+ hid_t *dxpl_id, hid_t loc_id, hbool_t is_collective)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ /* Sanity check */
+ HDassert(acspl_id);
+ HDassert(libclass);
+ HDassert(dxpl_id);
+
+ /* Set access plist to the default property list of the appropriate class if it's the generic default */
+ if(H5P_DEFAULT == *acspl_id)
+ *acspl_id = *libclass->def_plist_id;
+ else {
+ /* Sanity check the access property list class */
+ if(TRUE != H5P_isa_class(*acspl_id, *libclass->class_id))
+ HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not the required access property list")
+ } /* end else */
+
+#ifdef H5_HAVE_PARALLEL
+ /* If parallel is enabled and the file driver used in the MPI-IO
+ VFD, issue an MPI barrier for easier debugging if the API function
+ calling this is supposed to be called collectively. Note that this
+ happens only when the environment variable H5_COLL_BARRIER is set
+ to non 0. */
+ if(is_collective && H5_coll_api_sanity_check_g) {
+ MPI_Comm mpi_comm; /* file communicator */
+
+ /* retrieve the MPI communicator from the loc_id or the fapl_id */
+ if(H5F_mpi_retrieve_comm(loc_id, *acspl_id, &mpi_comm) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MPI communicator")
+
+ /* issue the barrier */
+ if(mpi_comm != MPI_COMM_NULL)
+ MPI_Barrier(mpi_comm);
+ }
+#endif /* H5_HAVE_PARALLEL */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5P_verify_apl_and_dxpl() */
diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h
index 6dffcec..7968416 100644
--- a/src/H5Ppkg.h
+++ b/src/H5Ppkg.h
@@ -115,33 +115,6 @@ struct H5P_genplist_t {
H5SL_t *props; /* Skip list containing properties */
};
-/* Function pointer for library classes with properties to register */
-typedef herr_t (*H5P_init_class_op_t)(H5P_genclass_t *pclass);
-typedef herr_t (*H5P_reg_prop_func_t)(H5P_genclass_t *pclass);
-
-/*
- * Each library property list class has a variable of this type that contains
- * class variables and methods used to initialize the class.
- */
-typedef struct H5P_libclass_t {
- const char *name; /* Class name */
- H5P_plist_type_t type; /* Class type */
-
- H5P_genclass_t * * par_pclass; /* Pointer to global parent class property list class */
- H5P_genclass_t * * pclass; /* Pointer to global property list class */
- hid_t * const class_id; /* Pointer to global property list class ID */
- hid_t * const def_plist_id; /* Pointer to global default property list ID */
- H5P_reg_prop_func_t reg_prop_func; /* Register class's properties */
-
- /* Class callback function pointers & info */
- H5P_cls_create_func_t create_func; /* Function to call when a property list is created */
- void *create_data; /* Pointer to user data to pass along to create callback */
- H5P_cls_copy_func_t copy_func; /* Function to call when a property list is copied */
- void *copy_data; /* Pointer to user data to pass along to copy callback */
- H5P_cls_close_func_t close_func; /* Function to call when a property list is closed */
- void *close_data; /* Pointer to user data to pass along to close callback */
-} H5P_libclass_t;
-
/* Property list/class iterator callback function pointer */
typedef int (*H5P_iterate_int_t)(H5P_genprop_t *prop, void *udata);
diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h
index 05830d1..d93e199 100644
--- a/src/H5Pprivate.h
+++ b/src/H5Pprivate.h
@@ -73,9 +73,36 @@ typedef enum H5P_plist_type_t {
H5P_TYPE_OBJECT_COPY = 15,
H5P_TYPE_LINK_CREATE = 16,
H5P_TYPE_LINK_ACCESS = 17,
+ H5P_TYPE_ATTRIBUTE_ACCESS = 18,
H5P_TYPE_MAX_TYPE
} H5P_plist_type_t;
+/* Function pointer for library classes with properties to register */
+typedef herr_t (*H5P_reg_prop_func_t)(H5P_genclass_t *pclass);
+
+/*
+ * Each library property list class has a variable of this type that contains
+ * class variables and methods used to initialize the class.
+ */
+typedef struct H5P_libclass_t {
+ const char *name; /* Class name */
+ H5P_plist_type_t type; /* Class type */
+
+ H5P_genclass_t * * par_pclass; /* Pointer to global parent class property list class */
+ H5P_genclass_t * * pclass; /* Pointer to global property list class */
+ hid_t * const class_id; /* Pointer to global property list class ID */
+ hid_t * const def_plist_id; /* Pointer to global default property list ID */
+ H5P_reg_prop_func_t reg_prop_func; /* Register class's properties */
+
+ /* Class callback function pointers & info */
+ H5P_cls_create_func_t create_func; /* Function to call when a property list is created */
+ void *create_data; /* Pointer to user data to pass along to create callback */
+ H5P_cls_copy_func_t copy_func; /* Function to call when a property list is copied */
+ void *copy_data; /* Pointer to user data to pass along to copy callback */
+ H5P_cls_close_func_t close_func; /* Function to call when a property list is closed */
+ void *close_data; /* Pointer to user data to pass along to close callback */
+} H5P_libclass_t;
+
/*****************************/
/* Library Private Variables */
/*****************************/
@@ -94,11 +121,20 @@ H5_DLLVAR H5P_genclass_t *H5P_CLS_GROUP_ACCESS_g;
H5_DLLVAR H5P_genclass_t *H5P_CLS_DATATYPE_CREATE_g;
H5_DLLVAR H5P_genclass_t *H5P_CLS_DATATYPE_ACCESS_g;
H5_DLLVAR H5P_genclass_t *H5P_CLS_ATTRIBUTE_CREATE_g;
+H5_DLLVAR H5P_genclass_t *H5P_CLS_ATTRIBUTE_ACCESS_g;
H5_DLLVAR H5P_genclass_t *H5P_CLS_OBJECT_COPY_g;
H5_DLLVAR H5P_genclass_t *H5P_CLS_LINK_CREATE_g;
H5_DLLVAR H5P_genclass_t *H5P_CLS_LINK_ACCESS_g;
H5_DLLVAR H5P_genclass_t *H5P_CLS_STRING_CREATE_g;
+/* Internal property list classes */
+H5_DLLVAR const struct H5P_libclass_t H5P_CLS_LACC[1]; /* Link access */
+H5_DLLVAR const struct H5P_libclass_t H5P_CLS_AACC[1]; /* Attribute access */
+H5_DLLVAR const struct H5P_libclass_t H5P_CLS_DACC[1]; /* Dataset access */
+H5_DLLVAR const struct H5P_libclass_t H5P_CLS_GACC[1]; /* Group access */
+H5_DLLVAR const struct H5P_libclass_t H5P_CLS_TACC[1]; /* Named datatype access */
+H5_DLLVAR const struct H5P_libclass_t H5P_CLS_FACC[1]; /* File access */
+
/******************************/
/* Library Private Prototypes */
@@ -124,6 +160,8 @@ H5_DLL herr_t H5P_remove(H5P_genplist_t *plist, const char *name);
H5_DLL htri_t H5P_exist_plist(const H5P_genplist_t *plist, const char *name);
H5_DLL htri_t H5P_class_isa(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2);
H5_DLL char *H5P_get_class_name(H5P_genclass_t *pclass);
+
+/* Internal helper routines */
H5_DLL herr_t H5P_get_nprops_pclass(const H5P_genclass_t *pclass, size_t *nprops,
hbool_t recurse);
H5_DLL hid_t H5P_peek_driver(H5P_genplist_t *plist);
@@ -143,6 +181,8 @@ H5_DLL herr_t H5P_get_filter_by_id(H5P_genplist_t *plist, H5Z_filter_t id,
unsigned int *flags, size_t *cd_nelmts, unsigned cd_values[],
size_t namelen, char name[], unsigned *filter_config);
H5_DLL htri_t H5P_filter_in_pline(H5P_genplist_t *plist, H5Z_filter_t id);
+H5_DLL herr_t H5P_verify_apl_and_dxpl(hid_t *acspl_id, const H5P_libclass_t *libclass,
+ hid_t *dxpl_id, hid_t loc_id, hbool_t is_collective);
/* Query internal fields of the property list struct */
H5_DLL hid_t H5P_get_plist_id(const H5P_genplist_t *plist);
@@ -152,12 +192,6 @@ H5_DLL H5P_genclass_t *H5P_get_class(const H5P_genplist_t *plist);
H5_DLL htri_t H5P_isa_class(hid_t plist_id, hid_t pclass_id);
H5_DLL H5P_genplist_t *H5P_object_verify(hid_t plist_id, hid_t pclass_id);
-/* Private functions to "peek" at properties of a certain type */
-H5_DLL unsigned H5P_peek_unsigned(H5P_genplist_t *plist, const char *name);
-H5_DLL hid_t H5P_peek_hid_t(H5P_genplist_t *plist, const char *name);
-H5_DLL void *H5P_peek_voidp(H5P_genplist_t *plist, const char *name);
-H5_DLL size_t H5P_peek_size_t(H5P_genplist_t *plist, const char *name);
-
/* Private DCPL routines */
H5_DLL herr_t H5P_fill_value_defined(H5P_genplist_t *plist,
H5D_fill_value_t *status);
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index 1cfba40..5be913d 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -66,6 +66,7 @@
#define H5P_DATATYPE_ACCESS (H5OPEN H5P_CLS_DATATYPE_ACCESS_ID_g)
#define H5P_STRING_CREATE (H5OPEN H5P_CLS_STRING_CREATE_ID_g)
#define H5P_ATTRIBUTE_CREATE (H5OPEN H5P_CLS_ATTRIBUTE_CREATE_ID_g)
+#define H5P_ATTRIBUTE_ACCESS (H5OPEN H5P_CLS_ATTRIBUTE_ACCESS_ID_g)
#define H5P_OBJECT_COPY (H5OPEN H5P_CLS_OBJECT_COPY_ID_g)
#define H5P_LINK_CREATE (H5OPEN H5P_CLS_LINK_CREATE_ID_g)
#define H5P_LINK_ACCESS (H5OPEN H5P_CLS_LINK_ACCESS_ID_g)
@@ -84,6 +85,7 @@
#define H5P_DATATYPE_CREATE_DEFAULT (H5OPEN H5P_LST_DATATYPE_CREATE_ID_g)
#define H5P_DATATYPE_ACCESS_DEFAULT (H5OPEN H5P_LST_DATATYPE_ACCESS_ID_g)
#define H5P_ATTRIBUTE_CREATE_DEFAULT (H5OPEN H5P_LST_ATTRIBUTE_CREATE_ID_g)
+#define H5P_ATTRIBUTE_ACCESS_DEFAULT (H5OPEN H5P_LST_ATTRIBUTE_ACCESS_ID_g)
#define H5P_OBJECT_COPY_DEFAULT (H5OPEN H5P_LST_OBJECT_COPY_ID_g)
#define H5P_LINK_CREATE_DEFAULT (H5OPEN H5P_LST_LINK_CREATE_ID_g)
#define H5P_LINK_ACCESS_DEFAULT (H5OPEN H5P_LST_LINK_ACCESS_ID_g)
@@ -189,6 +191,7 @@ H5_DLLVAR hid_t H5P_CLS_DATATYPE_CREATE_ID_g;
H5_DLLVAR hid_t H5P_CLS_DATATYPE_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_CLS_STRING_CREATE_ID_g;
H5_DLLVAR hid_t H5P_CLS_ATTRIBUTE_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_CLS_ATTRIBUTE_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_CLS_OBJECT_COPY_ID_g;
H5_DLLVAR hid_t H5P_CLS_LINK_CREATE_ID_g;
H5_DLLVAR hid_t H5P_CLS_LINK_ACCESS_ID_g;
@@ -206,6 +209,7 @@ H5_DLLVAR hid_t H5P_LST_GROUP_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_LST_DATATYPE_CREATE_ID_g;
H5_DLLVAR hid_t H5P_LST_DATATYPE_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_LST_ATTRIBUTE_CREATE_ID_g;
+H5_DLLVAR hid_t H5P_LST_ATTRIBUTE_ACCESS_ID_g;
H5_DLLVAR hid_t H5P_LST_OBJECT_COPY_ID_g;
H5_DLLVAR hid_t H5P_LST_LINK_CREATE_ID_g;
H5_DLLVAR hid_t H5P_LST_LINK_ACCESS_ID_g;
diff --git a/src/H5R.c b/src/H5R.c
index 61b45e1..04d61cd 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -621,7 +621,7 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *_r
file = loc.oloc->file;
/* Create reference */
- if((ret_value = H5R_dereference(file, oapl_id, H5AC_ind_dxpl_id, ref_type, _ref, TRUE)) < 0)
+ if((ret_value = H5R_dereference(file, oapl_id, H5AC_dxpl_id, ref_type, _ref, TRUE)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable to dereference object")
done:
@@ -740,7 +740,7 @@ H5Rget_region(hid_t id, H5R_type_t ref_type, const void *ref)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer")
/* Get the dataspace with the correct region selected */
- if((space = H5R_get_region(loc.oloc->file, H5AC_ind_dxpl_id, ref)) == NULL)
+ if((space = H5R_get_region(loc.oloc->file, H5AC_dxpl_id, ref)) == NULL)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create dataspace")
/* Atomize */
@@ -880,7 +880,7 @@ H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *ref,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer")
/* Get the object information */
- if(H5R_get_obj_type(loc.oloc->file, H5AC_ind_dxpl_id, ref_type, ref, obj_type) < 0)
+ if(H5R_get_obj_type(loc.oloc->file, H5AC_dxpl_id, ref_type, ref, obj_type) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable to determine object type")
done:
@@ -1044,7 +1044,7 @@ H5Rget_name(hid_t id, H5R_type_t ref_type, const void *_ref, char *name,
file = loc.oloc->file;
/* Get name */
- if((ret_value = H5R_get_name(file, H5P_DEFAULT, H5AC_ind_dxpl_id, id, ref_type, _ref, name, size)) < 0)
+ if((ret_value = H5R_get_name(file, H5P_DEFAULT, H5AC_dxpl_id, id, ref_type, _ref, name, size)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable to determine object path")
done:
diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c
index b8133b2..4f2f37a 100644
--- a/src/H5Rdeprec.c
+++ b/src/H5Rdeprec.c
@@ -125,7 +125,7 @@ H5Rget_obj_type1(hid_t id, H5R_type_t ref_type, const void *ref)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5G_UNKNOWN, "invalid reference pointer")
/* Get the object information */
- if(H5R_get_obj_type(loc.oloc->file, H5AC_ind_dxpl_id, ref_type, ref, &obj_type) < 0)
+ if(H5R_get_obj_type(loc.oloc->file, H5AC_dxpl_id, ref_type, ref, &obj_type) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, H5G_UNKNOWN, "unable to determine object type")
/* Set return value */
@@ -180,7 +180,7 @@ H5Rdereference1(hid_t obj_id, H5R_type_t ref_type, const void *_ref)
file = loc.oloc->file;
/* Create reference */
- if((ret_value = H5R_dereference(file, H5P_DATASET_ACCESS_DEFAULT, H5AC_ind_dxpl_id, ref_type, _ref, TRUE)) < 0)
+ if((ret_value = H5R_dereference(file, H5P_DATASET_ACCESS_DEFAULT, H5AC_dxpl_id, ref_type, _ref, TRUE)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable dereference object")
done:
diff --git a/src/H5SM.c b/src/H5SM.c
index 4a562dd..413ad1f 100644
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -1375,11 +1375,23 @@ H5SM_write_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
} /* end else */
} /* end else */
- if(found)
+ if(found) {
/* If the message was found, it's shared in the heap (now). Set up a
* shared message so we can mark it as shared.
*/
shared.type = H5O_SHARE_TYPE_SOHM;
+
+#ifdef H5_USING_MEMCHECKER
+ /* Reset the shared message payload if deferring. This doesn't matter
+ * in the long run since the payload will get overwritten when the
+ * non-deferred call to this routine occurs, but it stops memory
+ * checkers like valgrind from whining when the partially initialized
+ * shared message is serialized. -QAK
+ */
+ if(defer)
+ HDmemset(&shared.u, 0, sizeof(shared.u));
+#endif /* H5_USING_MEMCHECKER */
+ } /* end if */
else {
htri_t share_in_ohdr; /* Whether the new message can be shared in another object's header */
diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c
index e533ae8..0110c1e 100644
--- a/src/H5SMbtree2.c
+++ b/src/H5SMbtree2.c
@@ -50,7 +50,6 @@ static herr_t H5SM__bt2_dst_context(void *ctx);
static herr_t H5SM__bt2_store(void *native, const void *udata);
static herr_t H5SM__bt2_debug(FILE *stream, int indent, int fwidth,
const void *record, const void *_udata);
-static void *H5SM__bt2_crt_dbg_context(H5F_t *f, hid_t dxpl_id, haddr_t addr);
/*****************************/
@@ -67,9 +66,7 @@ const H5B2_class_t H5SM_INDEX[1]={{ /* B-tree class information */
H5SM__message_compare, /* Record comparison callback */
H5SM__message_encode, /* Record encoding callback */
H5SM__message_decode, /* Record decoding callback */
- H5SM__bt2_debug, /* Record debugging callback */
- H5SM__bt2_crt_dbg_context, /* Create debugging context */
- H5SM__bt2_dst_context /* Destroy debugging context */
+ H5SM__bt2_debug /* Record debugging callback */
}};
@@ -218,45 +215,6 @@ H5SM__bt2_debug(FILE *stream, int indent, int fwidth,
/*-------------------------------------------------------------------------
- * Function: H5SM__bt2_crt_dbg_context
- *
- * Purpose: Create context for debugging callback
- *
- * Return: Success: non-NULL
- * Failure: NULL
- *
- * Programmer: Quincey Koziol
- * Tuesday, December 1, 2009
- *
- *-------------------------------------------------------------------------
- */
-static void *
-H5SM__bt2_crt_dbg_context(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t H5_ATTR_UNUSED addr)
-{
- H5SM_bt2_ctx_t *ctx; /* Callback context structure */
- void *ret_value = NULL; /* Return value */
-
- FUNC_ENTER_STATIC
-
- /* Sanity check */
- HDassert(f);
-
- /* Allocate callback context */
- if(NULL == (ctx = H5FL_MALLOC(H5SM_bt2_ctx_t)))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate callback context")
-
- /* Determine the size of addresses & lengths in the file */
- ctx->sizeof_addr = H5F_SIZEOF_ADDR(f);
-
- /* Set return value */
- ret_value = ctx;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5SM__bt2_crt_dbg_context() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5SM_bt2_convert_to_list_op
*
* Purpose: An H5B2_remove_t callback function to convert a SOHM
diff --git a/src/H5SMcache.c b/src/H5SMcache.c
index 7b94743..ff2b09f 100644
--- a/src/H5SMcache.c
+++ b/src/H5SMcache.c
@@ -769,9 +769,8 @@ H5SM__cache_list_serialize(const H5F_t *f, void *_image, size_t len,
/* sanity check */
HDassert((size_t)(image - (uint8_t *)_image) <= list->header->list_size);
-#ifdef H5_CLEAR_MEMORY
+ /* Clear memory */
HDmemset(image, 0, (list->header->list_size - (size_t)(image - (uint8_t *)_image)));
-#endif /* H5_CLEAR_MEMORY */
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5STprivate.h b/src/H5STprivate.h
index 892f04a..9b49b07 100644
--- a/src/H5STprivate.h
+++ b/src/H5STprivate.h
@@ -58,7 +58,9 @@ H5_DLL H5ST_ptr_t H5ST_findfirst(H5ST_tree_t *p);
H5_DLL H5ST_ptr_t H5ST_findnext(H5ST_ptr_t p);
H5_DLL void *H5ST_remove(H5ST_tree_t *root, const char *s);
H5_DLL herr_t H5ST_delete(H5ST_tree_t *root, H5ST_ptr_t p);
-H5_DLL herr_t H5ST_dump(H5ST_ptr_t p);
+#ifdef H5ST_DEBUG
+H5_DLL herr_t H5ST_dump(H5ST_tree_t *tree);
+#endif /* H5ST_DEBUG */
#endif /* _H5STprivate_H */
diff --git a/src/H5T.c b/src/H5T.c
index 6514a35..703b6f4 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -993,24 +993,24 @@ H5T__init_package(void)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
status = 0;
- status |= H5T_register(H5T_PERS_SOFT, "i_i", fixedpt, fixedpt, H5T__conv_i_i, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_SOFT, "i_f", fixedpt, floatpt, H5T__conv_i_f, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_SOFT, "f_f", floatpt, floatpt, H5T__conv_f_f, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_SOFT, "f_i", floatpt, fixedpt, H5T__conv_f_i, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_SOFT, "s_s", string, string, H5T__conv_s_s, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_SOFT, "b_b", bitfield, bitfield, H5T__conv_b_b, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_SOFT, "ibo", fixedpt, fixedpt, H5T__conv_order, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_SOFT, "ibo(opt)", fixedpt, fixedpt, H5T__conv_order_opt, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_SOFT, "fbo", floatpt, floatpt, H5T__conv_order, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_SOFT, "fbo(opt)", floatpt, floatpt, H5T__conv_order_opt, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_SOFT, "struct(no-opt)", compound, compound, H5T__conv_struct, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_SOFT, "struct(opt)", compound, compound, H5T__conv_struct_opt, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_SOFT, "enum", enum_type, enum_type, H5T__conv_enum, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_SOFT, "enum_i", enum_type, fixedpt, H5T__conv_enum_numeric, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_SOFT, "enum_f", enum_type, floatpt, H5T__conv_enum_numeric, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_SOFT, "vlen", vlen, vlen, H5T__conv_vlen, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_SOFT, "array", array, array, H5T__conv_array, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_SOFT, "objref", objref, objref, H5T__conv_order_opt, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_SOFT, "i_i", fixedpt, fixedpt, H5T__conv_i_i, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_SOFT, "i_f", fixedpt, floatpt, H5T__conv_i_f, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_SOFT, "f_f", floatpt, floatpt, H5T__conv_f_f, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_SOFT, "f_i", floatpt, fixedpt, H5T__conv_f_i, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_SOFT, "s_s", string, string, H5T__conv_s_s, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_SOFT, "b_b", bitfield, bitfield, H5T__conv_b_b, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_SOFT, "ibo", fixedpt, fixedpt, H5T__conv_order, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_SOFT, "ibo(opt)", fixedpt, fixedpt, H5T__conv_order_opt, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_SOFT, "fbo", floatpt, floatpt, H5T__conv_order, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_SOFT, "fbo(opt)", floatpt, floatpt, H5T__conv_order_opt, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_SOFT, "struct(no-opt)", compound, compound, H5T__conv_struct, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_SOFT, "struct(opt)", compound, compound, H5T__conv_struct_opt, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_SOFT, "enum", enum_type, enum_type, H5T__conv_enum, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_SOFT, "enum_i", enum_type, fixedpt, H5T__conv_enum_numeric, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_SOFT, "enum_f", enum_type, floatpt, H5T__conv_enum_numeric, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_SOFT, "vlen", vlen, vlen, H5T__conv_vlen, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_SOFT, "array", array, array, H5T__conv_array, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_SOFT, "objref", objref, objref, H5T__conv_order_opt, H5AC_dxpl_id, FALSE);
/*
* Native conversions should be listed last since we can use hardware to
@@ -1021,221 +1021,221 @@ H5T__init_package(void)
*/
/* floating point */
- status |= H5T_register(H5T_PERS_HARD, "flt_dbl", native_float, native_double, H5T__conv_float_double, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "dbl_flt", native_double, native_float, H5T__conv_double_float, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "flt_dbl", native_float, native_double, H5T__conv_float_double, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "dbl_flt", native_double, native_float, H5T__conv_double_float, H5AC_dxpl_id, FALSE);
#if H5_SIZEOF_LONG_DOUBLE != 0
- status |= H5T_register(H5T_PERS_HARD, "flt_ldbl", native_float, native_ldouble, H5T__conv_float_ldouble, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "dbl_ldbl", native_double, native_ldouble, H5T__conv_double_ldouble, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ldbl_flt", native_ldouble, native_float, H5T__conv_ldouble_float, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ldbl_dbl", native_ldouble, native_double, H5T__conv_ldouble_double, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "flt_ldbl", native_float, native_ldouble, H5T__conv_float_ldouble, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "dbl_ldbl", native_double, native_ldouble, H5T__conv_double_ldouble, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ldbl_flt", native_ldouble, native_float, H5T__conv_ldouble_float, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ldbl_dbl", native_ldouble, native_double, H5T__conv_ldouble_double, H5AC_dxpl_id, FALSE);
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
/* from long long */
- status |= H5T_register(H5T_PERS_HARD, "llong_ullong", native_llong, native_ullong, H5T__conv_llong_ullong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ullong_llong", native_ullong, native_llong, H5T__conv_ullong_llong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "llong_long", native_llong, native_long, H5T__conv_llong_long, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "llong_ulong", native_llong, native_ulong, H5T__conv_llong_ulong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ullong_long", native_ullong, native_long, H5T__conv_ullong_long, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ullong_ulong", native_ullong, native_ulong, H5T__conv_ullong_ulong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "llong_short", native_llong, native_short, H5T__conv_llong_short, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "llong_ushort", native_llong, native_ushort, H5T__conv_llong_ushort, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ullong_short", native_ullong, native_short, H5T__conv_ullong_short, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ullong_ushort", native_ullong, native_ushort, H5T__conv_ullong_ushort, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "llong_int", native_llong, native_int, H5T__conv_llong_int, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "llong_uint", native_llong, native_uint, H5T__conv_llong_uint, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ullong_int", native_ullong, native_int, H5T__conv_ullong_int, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ullong_uint", native_ullong, native_uint, H5T__conv_ullong_uint, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "llong_schar", native_llong, native_schar, H5T__conv_llong_schar, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "llong_uchar", native_llong, native_uchar, H5T__conv_llong_uchar, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ullong_schar", native_ullong, native_schar, H5T__conv_ullong_schar, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ullong_uchar", native_ullong, native_uchar, H5T__conv_ullong_uchar, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "llong_ullong", native_llong, native_ullong, H5T__conv_llong_ullong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ullong_llong", native_ullong, native_llong, H5T__conv_ullong_llong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "llong_long", native_llong, native_long, H5T__conv_llong_long, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "llong_ulong", native_llong, native_ulong, H5T__conv_llong_ulong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ullong_long", native_ullong, native_long, H5T__conv_ullong_long, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ullong_ulong", native_ullong, native_ulong, H5T__conv_ullong_ulong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "llong_short", native_llong, native_short, H5T__conv_llong_short, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "llong_ushort", native_llong, native_ushort, H5T__conv_llong_ushort, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ullong_short", native_ullong, native_short, H5T__conv_ullong_short, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ullong_ushort", native_ullong, native_ushort, H5T__conv_ullong_ushort, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "llong_int", native_llong, native_int, H5T__conv_llong_int, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "llong_uint", native_llong, native_uint, H5T__conv_llong_uint, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ullong_int", native_ullong, native_int, H5T__conv_ullong_int, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ullong_uint", native_ullong, native_uint, H5T__conv_ullong_uint, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "llong_schar", native_llong, native_schar, H5T__conv_llong_schar, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "llong_uchar", native_llong, native_uchar, H5T__conv_llong_uchar, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ullong_schar", native_ullong, native_schar, H5T__conv_ullong_schar, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ullong_uchar", native_ullong, native_uchar, H5T__conv_ullong_uchar, H5AC_dxpl_id, FALSE);
/* From long */
- status |= H5T_register(H5T_PERS_HARD, "long_llong", native_long, native_llong, H5T__conv_long_llong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "long_ullong", native_long, native_ullong, H5T__conv_long_ullong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ulong_llong", native_ulong, native_llong, H5T__conv_ulong_llong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ulong_ullong", native_ulong, native_ullong, H5T__conv_ulong_ullong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "long_ulong", native_long, native_ulong, H5T__conv_long_ulong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ulong_long", native_ulong, native_long, H5T__conv_ulong_long, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "long_short", native_long, native_short, H5T__conv_long_short, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "long_ushort", native_long, native_ushort, H5T__conv_long_ushort, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ulong_short", native_ulong, native_short, H5T__conv_ulong_short, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ulong_ushort", native_ulong, native_ushort, H5T__conv_ulong_ushort, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "long_int", native_long, native_int, H5T__conv_long_int, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "long_uint", native_long, native_uint, H5T__conv_long_uint, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ulong_int", native_ulong, native_int, H5T__conv_ulong_int, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ulong_uint", native_ulong, native_uint, H5T__conv_ulong_uint, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "long_schar", native_long, native_schar, H5T__conv_long_schar, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "long_uchar", native_long, native_uchar, H5T__conv_long_uchar, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ulong_schar", native_ulong, native_schar, H5T__conv_ulong_schar, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ulong_uchar", native_ulong, native_uchar, H5T__conv_ulong_uchar, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "long_llong", native_long, native_llong, H5T__conv_long_llong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "long_ullong", native_long, native_ullong, H5T__conv_long_ullong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ulong_llong", native_ulong, native_llong, H5T__conv_ulong_llong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ulong_ullong", native_ulong, native_ullong, H5T__conv_ulong_ullong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "long_ulong", native_long, native_ulong, H5T__conv_long_ulong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ulong_long", native_ulong, native_long, H5T__conv_ulong_long, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "long_short", native_long, native_short, H5T__conv_long_short, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "long_ushort", native_long, native_ushort, H5T__conv_long_ushort, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ulong_short", native_ulong, native_short, H5T__conv_ulong_short, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ulong_ushort", native_ulong, native_ushort, H5T__conv_ulong_ushort, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "long_int", native_long, native_int, H5T__conv_long_int, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "long_uint", native_long, native_uint, H5T__conv_long_uint, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ulong_int", native_ulong, native_int, H5T__conv_ulong_int, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ulong_uint", native_ulong, native_uint, H5T__conv_ulong_uint, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "long_schar", native_long, native_schar, H5T__conv_long_schar, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "long_uchar", native_long, native_uchar, H5T__conv_long_uchar, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ulong_schar", native_ulong, native_schar, H5T__conv_ulong_schar, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ulong_uchar", native_ulong, native_uchar, H5T__conv_ulong_uchar, H5AC_dxpl_id, FALSE);
/* From short */
- status |= H5T_register(H5T_PERS_HARD, "short_llong", native_short, native_llong, H5T__conv_short_llong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "short_ullong", native_short, native_ullong, H5T__conv_short_ullong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ushort_llong", native_ushort, native_llong, H5T__conv_ushort_llong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ushort_ullong", native_ushort, native_ullong, H5T__conv_ushort_ullong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "short_long", native_short, native_long, H5T__conv_short_long, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "short_ulong", native_short, native_ulong, H5T__conv_short_ulong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ushort_long", native_ushort, native_long, H5T__conv_ushort_long, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ushort_ulong", native_ushort, native_ulong, H5T__conv_ushort_ulong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "short_ushort", native_short, native_ushort, H5T__conv_short_ushort, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ushort_short", native_ushort, native_short, H5T__conv_ushort_short, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "short_int", native_short, native_int, H5T__conv_short_int, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "short_uint", native_short, native_uint, H5T__conv_short_uint, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ushort_int", native_ushort, native_int, H5T__conv_ushort_int, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ushort_uint", native_ushort, native_uint, H5T__conv_ushort_uint, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "short_schar", native_short, native_schar, H5T__conv_short_schar, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "short_uchar", native_short, native_uchar, H5T__conv_short_uchar, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ushort_schar", native_ushort, native_schar, H5T__conv_ushort_schar, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ushort_uchar", native_ushort, native_uchar, H5T__conv_ushort_uchar, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "short_llong", native_short, native_llong, H5T__conv_short_llong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "short_ullong", native_short, native_ullong, H5T__conv_short_ullong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ushort_llong", native_ushort, native_llong, H5T__conv_ushort_llong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ushort_ullong", native_ushort, native_ullong, H5T__conv_ushort_ullong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "short_long", native_short, native_long, H5T__conv_short_long, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "short_ulong", native_short, native_ulong, H5T__conv_short_ulong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ushort_long", native_ushort, native_long, H5T__conv_ushort_long, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ushort_ulong", native_ushort, native_ulong, H5T__conv_ushort_ulong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "short_ushort", native_short, native_ushort, H5T__conv_short_ushort, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ushort_short", native_ushort, native_short, H5T__conv_ushort_short, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "short_int", native_short, native_int, H5T__conv_short_int, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "short_uint", native_short, native_uint, H5T__conv_short_uint, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ushort_int", native_ushort, native_int, H5T__conv_ushort_int, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ushort_uint", native_ushort, native_uint, H5T__conv_ushort_uint, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "short_schar", native_short, native_schar, H5T__conv_short_schar, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "short_uchar", native_short, native_uchar, H5T__conv_short_uchar, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ushort_schar", native_ushort, native_schar, H5T__conv_ushort_schar, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ushort_uchar", native_ushort, native_uchar, H5T__conv_ushort_uchar, H5AC_dxpl_id, FALSE);
/* From int */
- status |= H5T_register(H5T_PERS_HARD, "int_llong", native_int, native_llong, H5T__conv_int_llong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "int_ullong", native_int, native_ullong, H5T__conv_int_ullong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uint_llong", native_uint, native_llong, H5T__conv_uint_llong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uint_ullong", native_uint, native_ullong, H5T__conv_uint_ullong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "int_long", native_int, native_long, H5T__conv_int_long, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "int_ulong", native_int, native_ulong, H5T__conv_int_ulong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uint_long", native_uint, native_long, H5T__conv_uint_long, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uint_ulong", native_uint, native_ulong, H5T__conv_uint_ulong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "int_short", native_int, native_short, H5T__conv_int_short, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "int_ushort", native_int, native_ushort, H5T__conv_int_ushort, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uint_short", native_uint, native_short, H5T__conv_uint_short, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uint_ushort", native_uint, native_ushort, H5T__conv_uint_ushort, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "int_uint", native_int, native_uint, H5T__conv_int_uint, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uint_int", native_uint, native_int, H5T__conv_uint_int, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "int_schar", native_int, native_schar, H5T__conv_int_schar, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "int_uchar", native_int, native_uchar, H5T__conv_int_uchar, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uint_schar", native_uint, native_schar, H5T__conv_uint_schar, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uint_uchar", native_uint, native_uchar, H5T__conv_uint_uchar, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "int_llong", native_int, native_llong, H5T__conv_int_llong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "int_ullong", native_int, native_ullong, H5T__conv_int_ullong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uint_llong", native_uint, native_llong, H5T__conv_uint_llong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uint_ullong", native_uint, native_ullong, H5T__conv_uint_ullong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "int_long", native_int, native_long, H5T__conv_int_long, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "int_ulong", native_int, native_ulong, H5T__conv_int_ulong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uint_long", native_uint, native_long, H5T__conv_uint_long, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uint_ulong", native_uint, native_ulong, H5T__conv_uint_ulong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "int_short", native_int, native_short, H5T__conv_int_short, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "int_ushort", native_int, native_ushort, H5T__conv_int_ushort, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uint_short", native_uint, native_short, H5T__conv_uint_short, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uint_ushort", native_uint, native_ushort, H5T__conv_uint_ushort, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "int_uint", native_int, native_uint, H5T__conv_int_uint, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uint_int", native_uint, native_int, H5T__conv_uint_int, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "int_schar", native_int, native_schar, H5T__conv_int_schar, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "int_uchar", native_int, native_uchar, H5T__conv_int_uchar, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uint_schar", native_uint, native_schar, H5T__conv_uint_schar, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uint_uchar", native_uint, native_uchar, H5T__conv_uint_uchar, H5AC_dxpl_id, FALSE);
/* From char */
- status |= H5T_register(H5T_PERS_HARD, "schar_llong", native_schar, native_llong, H5T__conv_schar_llong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "schar_ullong", native_schar, native_ullong, H5T__conv_schar_ullong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uchar_llong", native_uchar, native_llong, H5T__conv_uchar_llong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uchar_ullong", native_uchar, native_ullong, H5T__conv_uchar_ullong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "schar_long", native_schar, native_long, H5T__conv_schar_long, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "schar_ulong", native_schar, native_ulong, H5T__conv_schar_ulong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uchar_long", native_uchar, native_long, H5T__conv_uchar_long, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uchar_ulong", native_uchar, native_ulong, H5T__conv_uchar_ulong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "schar_short", native_schar, native_short, H5T__conv_schar_short, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "schar_ushort", native_schar, native_ushort, H5T__conv_schar_ushort, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uchar_short", native_uchar, native_short, H5T__conv_uchar_short, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uchar_ushort", native_uchar, native_ushort, H5T__conv_uchar_ushort, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "schar_int", native_schar, native_int, H5T__conv_schar_int, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "schar_uint", native_schar, native_uint, H5T__conv_schar_uint, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uchar_int", native_uchar, native_int, H5T__conv_uchar_int, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uchar_uint", native_uchar, native_uint, H5T__conv_uchar_uint, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "schar_uchar", native_schar, native_uchar, H5T__conv_schar_uchar, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uchar_schar", native_uchar, native_schar, H5T__conv_uchar_schar, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "schar_llong", native_schar, native_llong, H5T__conv_schar_llong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "schar_ullong", native_schar, native_ullong, H5T__conv_schar_ullong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uchar_llong", native_uchar, native_llong, H5T__conv_uchar_llong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uchar_ullong", native_uchar, native_ullong, H5T__conv_uchar_ullong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "schar_long", native_schar, native_long, H5T__conv_schar_long, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "schar_ulong", native_schar, native_ulong, H5T__conv_schar_ulong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uchar_long", native_uchar, native_long, H5T__conv_uchar_long, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uchar_ulong", native_uchar, native_ulong, H5T__conv_uchar_ulong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "schar_short", native_schar, native_short, H5T__conv_schar_short, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "schar_ushort", native_schar, native_ushort, H5T__conv_schar_ushort, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uchar_short", native_uchar, native_short, H5T__conv_uchar_short, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uchar_ushort", native_uchar, native_ushort, H5T__conv_uchar_ushort, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "schar_int", native_schar, native_int, H5T__conv_schar_int, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "schar_uint", native_schar, native_uint, H5T__conv_schar_uint, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uchar_int", native_uchar, native_int, H5T__conv_uchar_int, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uchar_uint", native_uchar, native_uint, H5T__conv_uchar_uint, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "schar_uchar", native_schar, native_uchar, H5T__conv_schar_uchar, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uchar_schar", native_uchar, native_schar, H5T__conv_uchar_schar, H5AC_dxpl_id, FALSE);
/* From char to floats */
- status |= H5T_register(H5T_PERS_HARD, "schar_flt", native_schar, native_float, H5T__conv_schar_float, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "schar_dbl", native_schar, native_double, H5T__conv_schar_double, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "schar_ldbl", native_schar, native_ldouble, H5T__conv_schar_ldouble, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "schar_flt", native_schar, native_float, H5T__conv_schar_float, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "schar_dbl", native_schar, native_double, H5T__conv_schar_double, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "schar_ldbl", native_schar, native_ldouble, H5T__conv_schar_ldouble, H5AC_dxpl_id, FALSE);
/* From unsigned char to floats */
- status |= H5T_register(H5T_PERS_HARD, "uchar_flt", native_uchar, native_float, H5T__conv_uchar_float, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uchar_dbl", native_uchar, native_double, H5T__conv_uchar_double, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uchar_ldbl", native_uchar, native_ldouble, H5T__conv_uchar_ldouble, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uchar_flt", native_uchar, native_float, H5T__conv_uchar_float, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uchar_dbl", native_uchar, native_double, H5T__conv_uchar_double, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uchar_ldbl", native_uchar, native_ldouble, H5T__conv_uchar_ldouble, H5AC_dxpl_id, FALSE);
/* From short to floats */
- status |= H5T_register(H5T_PERS_HARD, "short_flt", native_short, native_float, H5T__conv_short_float, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "short_dbl", native_short, native_double, H5T__conv_short_double, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "short_ldbl", native_short, native_ldouble, H5T__conv_short_ldouble, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "short_flt", native_short, native_float, H5T__conv_short_float, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "short_dbl", native_short, native_double, H5T__conv_short_double, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "short_ldbl", native_short, native_ldouble, H5T__conv_short_ldouble, H5AC_dxpl_id, FALSE);
/* From unsigned short to floats */
- status |= H5T_register(H5T_PERS_HARD, "ushort_flt", native_ushort, native_float, H5T__conv_ushort_float, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ushort_dbl", native_ushort, native_double, H5T__conv_ushort_double, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ushort_ldbl", native_ushort, native_ldouble, H5T__conv_ushort_ldouble, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ushort_flt", native_ushort, native_float, H5T__conv_ushort_float, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ushort_dbl", native_ushort, native_double, H5T__conv_ushort_double, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ushort_ldbl", native_ushort, native_ldouble, H5T__conv_ushort_ldouble, H5AC_dxpl_id, FALSE);
/* From int to floats */
- status |= H5T_register(H5T_PERS_HARD, "int_flt", native_int, native_float, H5T__conv_int_float, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "int_dbl", native_int, native_double, H5T__conv_int_double, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "int_ldbl", native_int, native_ldouble, H5T__conv_int_ldouble, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "int_flt", native_int, native_float, H5T__conv_int_float, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "int_dbl", native_int, native_double, H5T__conv_int_double, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "int_ldbl", native_int, native_ldouble, H5T__conv_int_ldouble, H5AC_dxpl_id, FALSE);
/* From unsigned int to floats */
- status |= H5T_register(H5T_PERS_HARD, "uint_flt", native_uint, native_float, H5T__conv_uint_float, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uint_dbl", native_uint, native_double, H5T__conv_uint_double, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "uint_ldbl", native_uint, native_ldouble, H5T__conv_uint_ldouble, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uint_flt", native_uint, native_float, H5T__conv_uint_float, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uint_dbl", native_uint, native_double, H5T__conv_uint_double, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "uint_ldbl", native_uint, native_ldouble, H5T__conv_uint_ldouble, H5AC_dxpl_id, FALSE);
/* From long to floats */
- status |= H5T_register(H5T_PERS_HARD, "long_flt", native_long, native_float, H5T__conv_long_float, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "long_dbl", native_long, native_double, H5T__conv_long_double, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "long_ldbl", native_long, native_ldouble, H5T__conv_long_ldouble, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "long_flt", native_long, native_float, H5T__conv_long_float, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "long_dbl", native_long, native_double, H5T__conv_long_double, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "long_ldbl", native_long, native_ldouble, H5T__conv_long_ldouble, H5AC_dxpl_id, FALSE);
/* From unsigned long to floats */
- status |= H5T_register(H5T_PERS_HARD, "ulong_flt", native_ulong, native_float, H5T__conv_ulong_float, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ulong_dbl", native_ulong, native_double, H5T__conv_ulong_double, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ulong_ldbl", native_ulong, native_ldouble, H5T__conv_ulong_ldouble, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ulong_flt", native_ulong, native_float, H5T__conv_ulong_float, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ulong_dbl", native_ulong, native_double, H5T__conv_ulong_double, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ulong_ldbl", native_ulong, native_ldouble, H5T__conv_ulong_ldouble, H5AC_dxpl_id, FALSE);
/* From long long to floats */
- status |= H5T_register(H5T_PERS_HARD, "llong_flt", native_llong, native_float, H5T__conv_llong_float, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "llong_dbl", native_llong, native_double, H5T__conv_llong_double, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "llong_flt", native_llong, native_float, H5T__conv_llong_float, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "llong_dbl", native_llong, native_double, H5T__conv_llong_double, H5AC_dxpl_id, FALSE);
#ifdef H5T_CONV_INTERNAL_LLONG_LDOUBLE
- status |= H5T_register(H5T_PERS_HARD, "llong_ldbl", native_llong, native_ldouble, H5T__conv_llong_ldouble, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "llong_ldbl", native_llong, native_ldouble, H5T__conv_llong_ldouble, H5AC_dxpl_id, FALSE);
#endif /* H5T_CONV_INTERNAL_LLONG_LDOUBLE */
/* From unsigned long long to floats */
- status |= H5T_register(H5T_PERS_HARD, "ullong_flt", native_ullong, native_float, H5T__conv_ullong_float, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ullong_dbl", native_ullong, native_double, H5T__conv_ullong_double, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ullong_flt", native_ullong, native_float, H5T__conv_ullong_float, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ullong_dbl", native_ullong, native_double, H5T__conv_ullong_double, H5AC_dxpl_id, FALSE);
#ifdef H5T_CONV_INTERNAL_ULLONG_LDOUBLE
- status |= H5T_register(H5T_PERS_HARD, "ullong_ldbl", native_ullong, native_ldouble, H5T__conv_ullong_ldouble, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ullong_ldbl", native_ullong, native_ldouble, H5T__conv_ullong_ldouble, H5AC_dxpl_id, FALSE);
#endif /* H5T_CONV_INTERNAL_ULLONG_LDOUBLE */
/* From floats to char */
- status |= H5T_register(H5T_PERS_HARD, "flt_schar", native_float, native_schar, H5T__conv_float_schar, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "dbl_schar", native_double, native_schar, H5T__conv_double_schar, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ldbl_schar", native_ldouble, native_schar, H5T__conv_ldouble_schar, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "flt_schar", native_float, native_schar, H5T__conv_float_schar, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "dbl_schar", native_double, native_schar, H5T__conv_double_schar, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ldbl_schar", native_ldouble, native_schar, H5T__conv_ldouble_schar, H5AC_dxpl_id, FALSE);
/* From floats to unsigned char */
- status |= H5T_register(H5T_PERS_HARD, "flt_uchar", native_float, native_uchar, H5T__conv_float_uchar, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "dbl_uchar", native_double, native_uchar, H5T__conv_double_uchar, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ldbl_uchar", native_ldouble, native_uchar, H5T__conv_ldouble_uchar, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "flt_uchar", native_float, native_uchar, H5T__conv_float_uchar, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "dbl_uchar", native_double, native_uchar, H5T__conv_double_uchar, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ldbl_uchar", native_ldouble, native_uchar, H5T__conv_ldouble_uchar, H5AC_dxpl_id, FALSE);
/* From floats to short */
- status |= H5T_register(H5T_PERS_HARD, "flt_short", native_float, native_short, H5T__conv_float_short, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "dbl_short", native_double, native_short, H5T__conv_double_short, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ldbl_short", native_ldouble, native_short, H5T__conv_ldouble_short, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "flt_short", native_float, native_short, H5T__conv_float_short, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "dbl_short", native_double, native_short, H5T__conv_double_short, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ldbl_short", native_ldouble, native_short, H5T__conv_ldouble_short, H5AC_dxpl_id, FALSE);
/* From floats to unsigned short */
- status |= H5T_register(H5T_PERS_HARD, "flt_ushort", native_float, native_ushort, H5T__conv_float_ushort, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "dbl_ushort", native_double, native_ushort, H5T__conv_double_ushort, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ldbl_ushort", native_ldouble, native_ushort, H5T__conv_ldouble_ushort, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "flt_ushort", native_float, native_ushort, H5T__conv_float_ushort, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "dbl_ushort", native_double, native_ushort, H5T__conv_double_ushort, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ldbl_ushort", native_ldouble, native_ushort, H5T__conv_ldouble_ushort, H5AC_dxpl_id, FALSE);
/* From floats to int */
- status |= H5T_register(H5T_PERS_HARD, "flt_int", native_float, native_int, H5T__conv_float_int, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "dbl_int", native_double, native_int, H5T__conv_double_int, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ldbl_int", native_ldouble, native_int, H5T__conv_ldouble_int, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "flt_int", native_float, native_int, H5T__conv_float_int, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "dbl_int", native_double, native_int, H5T__conv_double_int, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ldbl_int", native_ldouble, native_int, H5T__conv_ldouble_int, H5AC_dxpl_id, FALSE);
/* From floats to unsigned int */
- status |= H5T_register(H5T_PERS_HARD, "flt_uint", native_float, native_uint, H5T__conv_float_uint, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "dbl_uint", native_double, native_uint, H5T__conv_double_uint, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ldbl_uint", native_ldouble, native_uint, H5T__conv_ldouble_uint, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "flt_uint", native_float, native_uint, H5T__conv_float_uint, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "dbl_uint", native_double, native_uint, H5T__conv_double_uint, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ldbl_uint", native_ldouble, native_uint, H5T__conv_ldouble_uint, H5AC_dxpl_id, FALSE);
/* From floats to long */
- status |= H5T_register(H5T_PERS_HARD, "flt_long", native_float, native_long, H5T__conv_float_long, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "dbl_long", native_double, native_long, H5T__conv_double_long, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ldbl_long", native_ldouble, native_long, H5T__conv_ldouble_long, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "flt_long", native_float, native_long, H5T__conv_float_long, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "dbl_long", native_double, native_long, H5T__conv_double_long, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ldbl_long", native_ldouble, native_long, H5T__conv_ldouble_long, H5AC_dxpl_id, FALSE);
/* From floats to unsigned long */
- status |= H5T_register(H5T_PERS_HARD, "flt_ulong", native_float, native_ulong, H5T__conv_float_ulong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "dbl_ulong", native_double, native_ulong, H5T__conv_double_ulong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "ldbl_ulong", native_ldouble, native_ulong, H5T__conv_ldouble_ulong, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "flt_ulong", native_float, native_ulong, H5T__conv_float_ulong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "dbl_ulong", native_double, native_ulong, H5T__conv_double_ulong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ldbl_ulong", native_ldouble, native_ulong, H5T__conv_ldouble_ulong, H5AC_dxpl_id, FALSE);
/* From floats to long long */
- status |= H5T_register(H5T_PERS_HARD, "flt_llong", native_float, native_llong, H5T__conv_float_llong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "dbl_llong", native_double, native_llong, H5T__conv_double_llong, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "flt_llong", native_float, native_llong, H5T__conv_float_llong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "dbl_llong", native_double, native_llong, H5T__conv_double_llong, H5AC_dxpl_id, FALSE);
#ifdef H5T_CONV_INTERNAL_LDOUBLE_LLONG
- status |= H5T_register(H5T_PERS_HARD, "ldbl_llong", native_ldouble, native_llong, H5T__conv_ldouble_llong, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ldbl_llong", native_ldouble, native_llong, H5T__conv_ldouble_llong, H5AC_dxpl_id, FALSE);
#endif /* H5T_CONV_INTERNAL_LDOUBLE_LLONG */
/* From floats to unsigned long long */
- status |= H5T_register(H5T_PERS_HARD, "flt_ullong", native_float, native_ullong, H5T__conv_float_ullong, H5AC_ind_dxpl_id, FALSE);
- status |= H5T_register(H5T_PERS_HARD, "dbl_ullong", native_double, native_ullong, H5T__conv_double_ullong, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "flt_ullong", native_float, native_ullong, H5T__conv_float_ullong, H5AC_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "dbl_ullong", native_double, native_ullong, H5T__conv_double_ullong, H5AC_dxpl_id, FALSE);
#if H5T_CONV_INTERNAL_LDOUBLE_ULLONG
- status |= H5T_register(H5T_PERS_HARD, "ldbl_ullong", native_ldouble, native_ullong, H5T__conv_ldouble_ullong, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "ldbl_ullong", native_ldouble, native_ullong, H5T__conv_ldouble_ullong, H5AC_dxpl_id, FALSE);
#endif /* H5T_CONV_INTERNAL_LDOUBLE_ULLONG */
/*
@@ -1243,7 +1243,7 @@ H5T__init_package(void)
* data types we use are not important as long as the source and
* destination are equal.
*/
- status |= H5T_register(H5T_PERS_HARD, "no-op", native_int, native_int, H5T__conv_noop, H5AC_ind_dxpl_id, FALSE);
+ status |= H5T_register(H5T_PERS_HARD, "no-op", native_int, native_int, H5T__conv_noop, H5AC_dxpl_id, FALSE);
/* Initialize the +/- Infinity values for floating-point types */
status |= H5T__init_inf();
@@ -1365,7 +1365,7 @@ H5T_top_term_package(void)
H5T__print_stats(path, &nprint/*in,out*/);
path->cdata.command = H5T_CONV_FREE;
if((path->func)((hid_t)FAIL, (hid_t)FAIL, &(path->cdata), (size_t)0,
- (size_t)0, (size_t)0, NULL, NULL,H5AC_ind_dxpl_id) < 0) {
+ (size_t)0, (size_t)0, NULL, NULL,H5AC_dxpl_id) < 0) {
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
fprintf(H5DEBUG(T), "H5T: conversion function "
@@ -2460,7 +2460,7 @@ H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no conversion function specified")
/* Go register the function */
- if(H5T_register(pers, name, src, dst, func, H5AC_ind_dxpl_id, TRUE) < 0)
+ if(H5T_register(pers, name, src, dst, func, H5AC_dxpl_id, TRUE) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't register conversion function")
done:
@@ -2599,7 +2599,7 @@ H5Tunregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id,
if(dst_id > 0 && (NULL == (dst = (H5T_t *)H5I_object_verify(dst_id, H5I_DATATYPE))))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dst is not a data type")
- if(H5T_unregister(pers, name, src, dst, func, H5AC_ind_dxpl_id) < 0)
+ if(H5T_unregister(pers, name, src, dst, func, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDELETE, FAIL, "internal unregister function failed")
done:
@@ -2643,7 +2643,7 @@ H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "no address to receive cdata pointer")
/* Find it */
- if(NULL == (path = H5T_path_find(src, dst, NULL, NULL, H5AC_ind_dxpl_id, FALSE)))
+ if(NULL == (path = H5T_path_find(src, dst, NULL, NULL, H5AC_dxpl_id, FALSE)))
HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL, "conversion function not found")
if(pcdata)
@@ -2939,7 +2939,7 @@ H5T_decode(const unsigned char *buf)
HGOTO_ERROR(H5E_DATATYPE, H5E_VERSION, NULL, "unknown version of encoded datatype")
/* Decode the serialized datatype message */
- if(NULL == (ret_value = (H5T_t *)H5O_msg_decode(f, H5AC_ind_dxpl_id, NULL, H5O_DTYPE_ID, buf)))
+ if(NULL == (ret_value = (H5T_t *)H5O_msg_decode(f, H5AC_dxpl_id, NULL, H5O_DTYPE_ID, buf)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, NULL, "can't decode object")
/* Mark datatype as being in memory now */
@@ -4772,7 +4772,7 @@ H5T_compiler_conv(H5T_t *src, H5T_t *dst)
FUNC_ENTER_NOAPI_NOINIT
/* Find it */
- if (NULL==(path=H5T_path_find(src, dst, NULL, NULL, H5AC_ind_dxpl_id, FALSE)))
+ if (NULL==(path=H5T_path_find(src, dst, NULL, NULL, H5AC_dxpl_id, FALSE)))
HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, FAIL, "conversion function not found")
ret_value = (htri_t)path->is_hard;
diff --git a/src/H5TS.c b/src/H5TS.c
index 987bead..6a64a14 100644
--- a/src/H5TS.c
+++ b/src/H5TS.c
@@ -255,19 +255,18 @@ H5TS_cancel_count_inc(void)
if (!cancel_counter) {
/*
- * First time thread calls library - create new counter and associate
+ * First time thread calls library - create new counter and associate
* with key
*/
- cancel_counter = (H5TS_cancel_t *)H5MM_calloc(sizeof(H5TS_cancel_t));
+ cancel_counter = (H5TS_cancel_t *)HDcalloc(1, sizeof(H5TS_cancel_t));
- if (!cancel_counter) {
- H5E_push_stack(NULL, "H5TS_cancel_count_inc",
- __FILE__, __LINE__, H5E_ERR_CLS_g, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed");
- return FAIL;
- }
+ if (!cancel_counter) {
+ H5E_push_stack(NULL, "H5TS_cancel_count_inc", __FILE__, __LINE__,
+ H5E_ERR_CLS_g, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed");
+ return FAIL;
+ }
- ret_value = pthread_setspecific(H5TS_cancel_key_g,
- (void *)cancel_counter);
+ ret_value = pthread_setspecific(H5TS_cancel_key_g, (void *)cancel_counter);
}
if (cancel_counter->cancel_count == 0)
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index 783d9d8..feb61e4 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -99,6 +99,7 @@ H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id,
{
H5G_loc_t loc; /* Location to create datatype */
H5T_t *type; /* Datatype for ID */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -126,15 +127,12 @@ H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id,
if(TRUE != H5P_isa_class(tcpl_id, H5P_DATATYPE_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not datatype creation property list")
- /* Get correct property list */
- if(H5P_DEFAULT == tapl_id)
- tapl_id = H5P_DATATYPE_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(tapl_id, H5P_DATATYPE_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not datatype access property list")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&tapl_id, H5P_CLS_TACC, &dxpl_id, loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Commit the type */
- if(H5T__commit_named(&loc, name, type, lcpl_id, tcpl_id, tapl_id, H5AC_dxpl_id) < 0)
+ if(H5T__commit_named(&loc, name, type, lcpl_id, tcpl_id, tapl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
done:
@@ -248,6 +246,7 @@ H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id)
{
H5G_loc_t loc; /* Group location for location */
H5T_t *type = NULL; /* Datatype created */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -266,15 +265,12 @@ H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id)
if(TRUE != H5P_isa_class(tcpl_id, H5P_DATATYPE_CREATE))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not datatype creation property list")
- /* Get correct property list */
- if(H5P_DEFAULT == tapl_id)
- tapl_id = H5P_DATATYPE_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(tapl_id, H5P_DATATYPE_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not datatype access property list")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&tapl_id, H5P_CLS_TACC, &dxpl_id, loc_id, TRUE) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Commit the type */
- if(H5T__commit(loc.oloc->file, type, tcpl_id, H5AC_dxpl_id) < 0)
+ if(H5T__commit(loc.oloc->file, type, tcpl_id, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
/* Release the datatype's object header */
@@ -286,7 +282,7 @@ H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get object location of committed datatype")
/* Decrement refcount on committed datatype's object header in memory */
- if(H5O_dec_rc_by_loc(oloc, H5AC_dxpl_id) < 0)
+ if(H5O_dec_rc_by_loc(oloc, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDEC, FAIL, "unable to decrement refcount on newly created object")
} /* end if */
@@ -533,7 +529,7 @@ H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id)
H5O_type_t obj_type; /* Type of object at location */
H5G_loc_t type_loc; /* Group object for datatype */
hbool_t obj_found = FALSE; /* Object at 'name' found */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* dxpl to use to open datatype */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl to use to open datatype */
hid_t ret_value = FAIL; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -545,12 +541,9 @@ H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id)
if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
- /* Get correct property list */
- if(H5P_DEFAULT == tapl_id)
- tapl_id = H5P_DATATYPE_ACCESS_DEFAULT;
- else
- if(TRUE != H5P_isa_class(tapl_id, H5P_DATATYPE_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not datatype access property list")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&tapl_id, H5P_CLS_TACC, &dxpl_id, loc_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
/* Set up datatype location to fill in */
type_loc.oloc = &oloc;
@@ -644,7 +637,7 @@ H5Tget_create_plist(hid_t dtype_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list")
/* Retrieve any object creation properties */
- if(H5O_get_create_plist(&type->oloc, H5AC_ind_dxpl_id, new_plist) < 0)
+ if(H5O_get_create_plist(&type->oloc, H5AC_dxpl_id, new_plist) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get object creation info")
} /* end if */
diff --git a/src/H5Tdeprec.c b/src/H5Tdeprec.c
index cd4de1d..89746bf 100644
--- a/src/H5Tdeprec.c
+++ b/src/H5Tdeprec.c
@@ -152,7 +152,7 @@ H5Topen1(hid_t loc_id, const char *name)
H5O_type_t obj_type; /* Type of object at location */
H5G_loc_t type_loc; /* Group object for datatype */
hbool_t obj_found = FALSE; /* Object at 'name' found */
- hid_t dxpl_id = H5AC_ind_dxpl_id; /* dxpl to use to open datatype */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl to use to open datatype */
hid_t ret_value = FAIL;
FUNC_ENTER_API(FAIL)
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index 2abdf6f..0ed8209 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -465,7 +465,7 @@ H5T_vlen_seq_mem_write(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, co
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for VL data")
} /* end if */
else { /* Default to system malloc */
- if(NULL==(vl.p=H5MM_malloc(len)))
+ if(NULL == (vl.p = HDmalloc(len)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for VL data")
} /* end else */
@@ -691,7 +691,7 @@ H5T_vlen_str_mem_write(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, co
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for VL data")
} /* end if */
else { /* Default to system malloc */
- if(NULL==(t = (char *)H5MM_malloc((seq_len+1)*base_size)))
+ if(NULL == (t = (char *)HDmalloc((seq_len + 1) * base_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for VL data")
} /* end else */
@@ -1073,14 +1073,14 @@ H5T_vlen_reclaim_recurse(void *elem, const H5T_t *dt, H5MM_free_t free_func, voi
if(free_func != NULL)
(*free_func)(vl->p, free_info);
else
- H5MM_xfree(vl->p);
+ HDfree(vl->p);
} /* end if */
} else if(dt->shared->u.vlen.type == H5T_VLEN_STRING) {
/* Free the VL string */
if(free_func != NULL)
(*free_func)(*(char **)elem, free_info);
else
- H5MM_xfree(*(char **)elem);
+ HDfree(*(char **)elem);
} else {
HDassert(0 && "Invalid VL type");
} /* end else */
diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index 0dc12a3..ae3d2a1 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -883,10 +883,8 @@ H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
-#ifdef H5_CLEAR_MEMORY
/* Initialize the parameters to a known state */
HDmemset(cd_values, 0, sizeof(cd_values));
-#endif /* H5_CLEAR_MEMORY */
/* Get the filter's current parameters */
if(H5P_get_filter_by_id(dcpl_plist, H5Z_FILTER_SCALEOFFSET, &flags, &cd_nelmts, cd_values, (size_t)0, NULL, NULL) < 0)
@@ -1005,7 +1003,7 @@ H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot use C integer datatype for cast")
/* Get dataset fill value and store in cd_values[] */
- if(H5Z_scaleoffset_set_parms_fillval(dcpl_plist, type, scale_type, cd_values, need_convert, H5AC_ind_dxpl_id) < 0)
+ if(H5Z_scaleoffset_set_parms_fillval(dcpl_plist, type, scale_type, cd_values, need_convert, H5AC_dxpl_id) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTSET, FAIL, "unable to set fill value")
} /* end else */
@@ -1266,13 +1264,11 @@ H5Z_filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_value
for(i = 0; i < sizeof(unsigned long long); i++)
((unsigned char *)outbuf)[5+i] = (unsigned char)((minval & ((unsigned long long)0xff << i*8)) >> i*8);
-#ifdef H5_CLEAR_MEMORY
/* Zero out remaining, unused bytes */
/* (Looks like an error in the original determination of how many
* bytes would be needed for parameters. - QAK, 2010/08/19)
*/
HDmemset(outbuf + 13, 0, (size_t)8);
-#endif /* H5_CLEAR_MEMORY */
/* special case: minbits equal to full precision */
if(minbits == p.size * 8) {
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index 0a9a4da..2627a29 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -1032,7 +1032,7 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void* array, size_t array_size
/* Free the temporary arrays we used */
if(data_xform_prop->dat_val_pointers->num_ptrs > 1)
for(i=0; i<data_xform_prop->dat_val_pointers->num_ptrs; i++)
- HDfree(data_xform_prop->dat_val_pointers->ptr_dat_val[i]);
+ H5MM_xfree(data_xform_prop->dat_val_pointers->ptr_dat_val[i]);
} /* end else */
done:
@@ -1042,7 +1042,7 @@ done:
if(data_xform_prop->dat_val_pointers->num_ptrs > 1)
for(i = 0; i < data_xform_prop->dat_val_pointers->num_ptrs; i++)
if(data_xform_prop->dat_val_pointers->ptr_dat_val[i])
- HDfree(data_xform_prop->dat_val_pointers->ptr_dat_val[i]);
+ H5MM_xfree(data_xform_prop->dat_val_pointers->ptr_dat_val[i]);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5config.h.in b/src/H5config.h.in
index 7a80d11..47e17c2 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -3,13 +3,12 @@
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
-/* Define if the memory buffers being written to disk should be cleared before
- writing. */
-#undef CLEAR_MEMORY
-
/* Define if C++ compiler recognizes offsetof */
#undef CXX_HAVE_OFFSETOF
+/* Define if this is a debug build. */
+#undef DEBUG_BUILD
+
/* Define the default plugins path to compile */
#undef DEFAULT_PLUGINDIR
@@ -136,24 +135,6 @@
/* Define to 1 if you have the `frexpl' function. */
#undef HAVE_FREXPL
-/* Define to 1 if you have the `fseeko' function. */
-#undef HAVE_FSEEKO
-
-/* Define to 1 if you have the `fseeko64' function. */
-#undef HAVE_FSEEKO64
-
-/* Define to 1 if you have the `fstat64' function. */
-#undef HAVE_FSTAT64
-
-/* Define to 1 if you have the `ftello' function. */
-#undef HAVE_FTELLO
-
-/* Define to 1 if you have the `ftello64' function. */
-#undef HAVE_FTELLO64
-
-/* Define to 1 if you have the `ftruncate64' function. */
-#undef HAVE_FTRUNCATE64
-
/* Define if the compiler understands the __FUNCTION__ keyword */
#undef HAVE_FUNCTION
@@ -181,7 +162,7 @@
/* Define if the compiler understands inline */
#undef HAVE_INLINE
-/* Define if library will contain instrumentation to detect correct
+/* Define if parallel library will contain instrumentation to detect correct
optimization operation */
#undef HAVE_INSTRUMENTED_LIBRARY
@@ -221,9 +202,6 @@
/* Define to 1 if you have the `longjmp' function. */
#undef HAVE_LONGJMP
-/* Define to 1 if you have the `lseek64' function. */
-#undef HAVE_LSEEK64
-
/* Define to 1 if you have the `lstat' function. */
#undef HAVE_LSTAT
@@ -287,9 +265,6 @@
/* Define to 1 if you have the `srandom' function. */
#undef HAVE_SRANDOM
-/* Define to 1 if you have the `stat64' function. */
-#undef HAVE_STAT64
-
/* Define if struct stat has the st_blocks field */
#undef HAVE_STAT_ST_BLOCKS
@@ -404,7 +379,7 @@
/* Define if the compiler understands __inline__ */
#undef HAVE___INLINE__
-/* Define if HDF5's high-level library headers should be included in hdf5.h */
+/* Define if the high-level library headers should be included in hdf5.h */
#undef INCLUDE_HL
/* Define if your system can convert long double to (unsigned) long long
@@ -423,7 +398,8 @@
with special algorithm. */
#undef LONG_TO_LDOUBLE_SPECIAL
-/* Define to the sub-directory where libtool stores uninstalled libraries. */
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
#undef LT_OBJDIR
/* Define to enable internal memory allocation sanity checking. */
@@ -528,9 +504,6 @@
/* The size of `long long', as computed by sizeof. */
#undef SIZEOF_LONG_LONG
-/* The size of `off64_t', as computed by sizeof. */
-#undef SIZEOF_OFF64_T
-
/* The size of `off_t', as computed by sizeof. */
#undef SIZEOF_OFF_T
@@ -610,6 +583,9 @@
/* Define using v1.6 public API symbols by default */
#undef USE_16_API_DEFAULT
+/* Define using v1.8 public API symbols by default */
+#undef USE_18_API_DEFAULT
+
/* Define if a memory checking tool will be used on the library, to cause
library to be very picky about memory operations and also disable the
internal free list manager code. */
diff --git a/src/H5private.h b/src/H5private.h
index c536566..74763a5 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -870,58 +870,37 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#endif /* HDfrexpl */
/* fscanf() variable arguments */
#ifndef HDfseek
- #ifdef H5_HAVE_FSEEKO
- #define HDfseek(F,O,W) fseeko(F,O,W)
- #else /* H5_HAVE_FSEEKO */
- #define HDfseek(F,O,W) fseek(F,O,W)
- #endif /* H5_HAVE_FSEEKO */
+ #define HDfseek(F,O,W) fseeko(F,O,W)
#endif /* HDfseek */
#ifndef HDfsetpos
#define HDfsetpos(F,P) fsetpos(F,P)
#endif /* HDfsetpos */
-/* definitions related to the file stat utilities.
- * For Unix, if off_t is not 64bit big, try use the pseudo-standard
- * xxx64 versions if available.
+#ifndef HDfstat
+ #define HDfstat(F,B) fstat(F,B)
+#endif /* HDfstat */
+#ifndef HDlstat
+ #define HDlstat(S,B) lstat(S,B)
+#endif /* HDlstat */
+#ifndef HDstat
+ #define HDstat(S,B) stat(S,B)
+#endif /* HDstat */
+
+#ifndef H5_HAVE_WIN32_API
+/* These definitions differ in Windows and are defined in
+ * H5win32defs for that platform.
*/
-#if !defined(HDfstat) || !defined(HDstat) || !defined(HDlstat)
- #if H5_SIZEOF_OFF_T!=8 && H5_SIZEOF_OFF64_T==8 && defined(H5_HAVE_STAT64)
- #ifndef HDfstat
- #define HDfstat(F,B) fstat64(F,B)
- #endif /* HDfstat */
- #ifndef HDlstat
- #define HDlstat(S,B) lstat64(S,B)
- #endif /* HDlstat */
- #ifndef HDstat
- #define HDstat(S,B) stat64(S,B)
- #endif /* HDstat */
- typedef struct stat64 h5_stat_t;
- typedef off64_t h5_stat_size_t;
- #define H5_SIZEOF_H5_STAT_SIZE_T H5_SIZEOF_OFF64_T
- #else /* H5_SIZEOF_OFF_T!=8 && ... */
- #ifndef HDfstat
- #define HDfstat(F,B) fstat(F,B)
- #endif /* HDfstat */
- #ifndef HDlstat
- #define HDlstat(S,B) lstat(S,B)
- #endif /* HDlstat */
- #ifndef HDstat
- #define HDstat(S,B) stat(S,B)
- #endif /* HDstat */
- typedef struct stat h5_stat_t;
- typedef off_t h5_stat_size_t;
- #define H5_SIZEOF_H5_STAT_SIZE_T H5_SIZEOF_OFF_T
- #endif /* H5_SIZEOF_OFF_T!=8 && ... */
-#endif /* !defined(HDfstat) || !defined(HDstat) */
+typedef struct stat h5_stat_t;
+typedef off_t h5_stat_size_t;
+#define HDoff_t off_t
+#endif /* H5_HAVE_WIN32_API */
+
+#define H5_SIZEOF_H5_STAT_SIZE_T H5_SIZEOF_OFF_T
#ifndef HDftell
- #define HDftell(F) ftell(F)
+ #define HDftell(F) ftello(F)
#endif /* HDftell */
#ifndef HDftruncate
- #ifdef H5_HAVE_FTRUNCATE64
- #define HDftruncate(F,L) ftruncate64(F,L)
- #else
#define HDftruncate(F,L) ftruncate(F,L)
- #endif
#endif /* HDftruncate */
#ifndef HDfwrite
#define HDfwrite(M,Z,N,F) fwrite(M,Z,N,F)
@@ -1064,15 +1043,8 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#ifndef HDlongjmp
#define HDlongjmp(J,N) longjmp(J,N)
#endif /* HDlongjmp */
-/* HDlseek and HDoff_t must be defined together for consistency. */
#ifndef HDlseek
- #ifdef H5_HAVE_LSEEK64
- #define HDlseek(F,O,W) lseek64(F,O,W)
- #define HDoff_t off64_t
- #else
- #define HDlseek(F,O,W) lseek(F,O,W)
- #define HDoff_t off_t
- #endif
+ #define HDlseek(F,O,W) lseek(F,O,W)
#endif /* HDlseek */
#ifndef HDmalloc
#define HDmalloc(Z) malloc(Z)
@@ -1283,7 +1255,9 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#ifndef HDsnprintf
#define HDsnprintf snprintf /*varargs*/
#endif /* HDsnprintf */
-/* sprintf() variable arguments */
+#ifndef HDsprintf
+ #define HDsprintf sprintf /*varargs*/
+#endif /* HDsprintf */
#ifndef HDsqrt
#define HDsqrt(X) sqrt(X)
#endif /* HDsqrt */
@@ -1699,6 +1673,7 @@ typedef struct H5_debug_t {
H5_debug_open_stream_t *open_stream; /* Stack of open output streams */
} H5_debug_t;
+extern hbool_t H5_coll_api_sanity_check_g;
extern H5_debug_t H5_debug_g;
#define H5DEBUG(X) (H5_debug_g.pkg[H5_PKG_##X].stream)
/* Do not use const else AIX strings does not show it. */
diff --git a/src/Makefile.in b/src/Makefile.in
index 535156b..1516038 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -546,16 +546,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -568,7 +569,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -630,8 +630,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -642,11 +642,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -654,6 +654,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -677,6 +678,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -692,6 +694,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/src/libhdf5.settings.in b/src/libhdf5.settings.in
index 90224c1..3bb2936 100644
--- a/src/libhdf5.settings.in
+++ b/src/libhdf5.settings.in
@@ -3,40 +3,47 @@
General Information:
-------------------
- HDF5 Version: @H5_VERSION@
- Configured on: @CONFIG_DATE@
- Configured by: @CONFIG_USER@
- Configure mode: @CONFIG_MODE@
- Host system: @host_cpu@-@host_vendor@-@host_os@
- Uname information: @UNAME_INFO@
- Byte sex: @BYTESEX@
- Libraries: @STATIC_SHARED@
- Installation point: @prefix@
+ HDF5 Version: @H5_VERSION@
+ Configured on: @CONFIG_DATE@
+ Configured by: @CONFIG_USER@
+ Host system: @host_cpu@-@host_vendor@-@host_os@
+ Uname information: @UNAME_INFO@
+ Byte sex: @BYTESEX@
+ Installation point: @prefix@
Compiling Options:
------------------
- Compilation Mode: @CONFIG_MODE@
- C Compiler: @CC_VERSION@
- CFLAGS: @CFLAGS@
- H5_CFLAGS: @H5_CFLAGS@
- AM_CFLAGS: @AM_CFLAGS@
- CPPFLAGS: @CPPFLAGS@
- H5_CPPFLAGS: @H5_CPPFLAGS@
- AM_CPPFLAGS: @AM_CPPFLAGS@
- Shared C Library: @enable_shared@
- Static C Library: @enable_static@
+ Build Mode: @BUILD_MODE@
+ Debugging Symbols: @SYMBOLS@
+ Asserts: @ASSERTS@
+ Profiling: @PROFILING@
+ Optimization Level: @OPTIMIZATION@
+
+Linking Options:
+----------------
+ Libraries: @STATIC_SHARED@
Statically Linked Executables: @LT_STATIC_EXEC@
LDFLAGS: @LDFLAGS@
H5_LDFLAGS: @H5_LDFLAGS@
AM_LDFLAGS: @AM_LDFLAGS@
- Extra libraries: @LIBS@
- Archiver: @AR@
- Ranlib: @RANLIB@
- Debugged Packages: @DEBUG_PKG@
- API Tracing: @TRACE_API@
+ Extra libraries: @LIBS@
+ Archiver: @AR@
+ Ranlib: @RANLIB@
Languages:
----------
+ C: yes
+ C Compiler: @CC_VERSION@
+ CPPFLAGS: @CPPFLAGS@
+ H5_CPPFLAGS: @H5_CPPFLAGS@
+ AM_CPPFLAGS: @AM_CPPFLAGS@
+ C Flags: @CFLAGS@
+ H5 C Flags: @H5_CFLAGS@
+ AM C Flags: @AM_CFLAGS@
+ Shared C Library: @enable_shared@
+ Static C Library: @enable_static@
+
+
Fortran: @HDF_FORTRAN@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Compiler: @FC_VERSION@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Flags: @FCFLAGS@
@@ -56,17 +63,19 @@ Languages:
Features:
---------
Parallel HDF5: @PARALLEL@
- High Level library: @HDF5_HL@
+ High-level library: @HDF5_HL@
Threadsafety: @THREADSAFE@
- Default API Mapping: @DEFAULT_API_VERSION@
- With Deprecated Public Symbols: @DEPRECATED_SYMBOLS@
+ Default API mapping: @DEFAULT_API_VERSION@
+ With deprecated public symbols: @DEPRECATED_SYMBOLS@
I/O filters (external): @EXTERNAL_FILTERS@
MPE: @MPE@
Direct VFD: @DIRECT_VFD@
dmalloc: @HAVE_DMALLOC@
-Clear file buffers before write: @CLEARFILEBUF@
+ Packages w/ extra debug output: @INTERNAL_DEBUG_OUTPUT@
+ API tracing: @TRACE_API@
Using memory checker: @USINGMEMCHECKER@
Memory allocation sanity checks: @MEMORYALLOCSANITYCHECK@
- Function Stack Tracing: @CODESTACK@
- Strict File Format Checks: @STRICT_FORMAT_CHECKS@
- Optimization Instrumentation: @INSTRUMENT@
+ Metadata trace file: @METADATATRACEFILE@
+ Function stack tracing: @CODESTACK@
+ Strict file format checks: @STRICT_FORMAT_CHECKS@
+ Optimization instrumentation: @INSTRUMENT_LIBRARY@
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 3a69371..79a7158 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -67,6 +67,85 @@ if (BUILD_SHARED_LIBS)
endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
+# Build SWMR test programs
+#
+# These programs are currently not used in CMake tests but we build them
+# here anyway for manual testing and to ensure that the code compiles
+# on all platforms.
+#-----------------------------------------------------------------------------
+MACRO (ADD_H5_SWMR_EXE file)
+ add_executable (${file}
+ ${HDF5_TEST_SOURCE_DIR}/${file}.c
+ ${HDF5_TEST_SOURCE_DIR}/swmr_common.c
+ ${HDF5_TEST_SOURCE_DIR}/swmr_common.h
+ )
+ TARGET_NAMING (${file} STATIC)
+ TARGET_C_PROPERTIES (${file} STATIC " " " ")
+ target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+ set_target_properties (${file} PROPERTIES FOLDER test)
+ if (BUILD_SHARED_LIBS)
+ add_executable (${file}-shared
+ ${HDF5_TEST_SOURCE_DIR}/${file}.c
+ ${HDF5_TEST_SOURCE_DIR}/swmr_common.c
+ ${HDF5_TEST_SOURCE_DIR}/swmr_common.h
+ )
+ TARGET_NAMING (${file}-shared SHARED)
+ TARGET_C_PROPERTIES (${file}-shared SHARED " " " ")
+ target_link_libraries (${file}-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (${file}-shared PROPERTIES FOLDER test)
+ endif (BUILD_SHARED_LIBS)
+ENDMACRO (ADD_H5_SWMR_EXE file)
+
+set (H5_SWMR_TESTS
+ swmr_addrem_writer
+ swmr_check_compat_vfd
+ swmr_generator
+ swmr_reader
+ swmr_remove_reader
+ swmr_remove_writer
+ swmr_sparse_reader
+ swmr_sparse_writer
+ swmr_start_write
+ swmr_writer
+)
+
+foreach (test ${H5_SWMR_TESTS})
+ ADD_H5_SWMR_EXE(${test})
+endforeach (test ${H5_SWMR_TESTS})
+
+#-----------------------------------------------------------------------------
+# Build VDS SWMR test programs
+#
+# These programs are currently not used in CMake tests but we build them
+# here anyway for manual testing and to ensure that the code compiles
+# on all platforms.
+#-----------------------------------------------------------------------------
+MACRO (ADD_H5_VDS_SWMR_EXE file)
+ add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
+ TARGET_NAMING (${file} STATIC)
+ TARGET_C_PROPERTIES (${file} STATIC " " " ")
+ target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+ set_target_properties (${file} PROPERTIES FOLDER test)
+ if (BUILD_SHARED_LIBS)
+ add_executable (${file}-shared ${HDF5_TEST_SOURCE_DIR}/${file}.c)
+ TARGET_NAMING (${file}-shared SHARED)
+ TARGET_C_PROPERTIES (${file}-shared SHARED " " " ")
+ target_link_libraries (${file}-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (${file}-shared PROPERTIES FOLDER test)
+ endif (BUILD_SHARED_LIBS)
+ENDMACRO (ADD_H5_VDS_SWMR_EXE file)
+
+set (H5_VDS_SWMR_TESTS
+ vds_swmr_gen
+ vds_swmr_reader
+ vds_swmr_writer
+)
+
+foreach (test ${H5_VDS_SWMR_TESTS})
+ ADD_H5_VDS_SWMR_EXE(${test})
+endforeach (test ${H5_VDS_SWMR_TESTS})
+
+#-----------------------------------------------------------------------------
# If plugin library tests can be tested
#-----------------------------------------------------------------------------
# make plugins dir
@@ -74,7 +153,7 @@ endif (BUILD_SHARED_LIBS)
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir2")
#-----------------------------------------------------------------------------
- # Define Test Library Sources
+ # Define Plugin Test Sources
#-----------------------------------------------------------------------------
set (TEST_PLUGIN_LIBS
dynlib1
diff --git a/test/Makefile.in b/test/Makefile.in
index f3dae07..9d38e11 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -964,16 +964,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -986,7 +987,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -1048,8 +1048,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -1060,11 +1060,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -1072,6 +1072,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -1095,6 +1096,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -1110,6 +1112,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/test/btree2.c b/test/btree2.c
index 7a2432c..2c9bbae 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -36,8 +36,11 @@ const char *FILENAME[] = {
};
#define INSERT_SPLIT_ROOT_NREC 63
-#define INSERT_MANY (1000*1000)
-#define FIND_MANY (INSERT_MANY/100)
+#define INSERT_SPLIT_ROOT_NREC_REC 64
+#define INSERT_MANY (1000 * 1000)
+#define INSERT_MANY_REC (2700 * 1000)
+#define FIND_MANY (INSERT_MANY / 100)
+#define FIND_MANY_REC (INSERT_MANY_REC / 100)
#define FIND_NEIGHBOR 2000
#define DELETE_SMALL 20
#define DELETE_MEDIUM 200
@@ -63,7 +66,7 @@ typedef struct bt2_test_param_t {
*-------------------------------------------------------------------------
*/
static int
-init_cparam(H5B2_create_t *cparam)
+init_cparam(H5B2_create_t *cparam, H5B2_create_t *cparam2)
{
/* Wipe out background */
HDmemset(cparam, 0, sizeof(*cparam));
@@ -75,6 +78,16 @@ init_cparam(H5B2_create_t *cparam)
cparam->split_percent = 100;
cparam->merge_percent = 40;
+ /* Wipe out background */
+ HDmemset(cparam2, 0, sizeof(*cparam2));
+
+ /* General parameters */
+ cparam2->cls = H5B2_TEST2;
+ cparam2->node_size = (size_t)1024;
+ cparam2->rrec_size = (size_t)16;
+ cparam2->split_percent = 100;
+ cparam2->merge_percent = 40;
+
return(0);
} /* init_cparam() */
@@ -154,6 +167,47 @@ error:
/*-------------------------------------------------------------------------
+ * Function: reopen_file
+ *
+ * Purpose: Re-open the file
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Monday, December 28, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+reopen_file(hid_t *file, H5F_t **f, hid_t fapl)
+{
+ char filename[1024]; /* Filename to use */
+
+ /* Set the filename to use for this test (dependent on fapl) */
+ h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
+
+ /* Create the file to work on */
+ if((*file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
+ TEST_ERROR
+
+ /* Get a pointer to the internal file object */
+ if(NULL == (*f = (H5F_t *)H5I_object(*file)))
+ STACK_ERROR
+
+ /* Ignore metadata tags in the file's cache */
+ if(H5AC_ignore_tags(*f) < 0)
+ STACK_ERROR
+
+ /* Success */
+ return(0);
+
+error:
+ return(-1);
+} /* end create_file() */
+
+
+/*-------------------------------------------------------------------------
* Function: reopen_btree
*
* Purpose: Perform common "re-open" operations on B-tree for testing
@@ -237,11 +291,11 @@ error:
*-------------------------------------------------------------------------
*/
static int
-check_node_depth(H5B2_t *bt2, hid_t dxpl, hsize_t record, unsigned depth)
+check_node_depth(H5B2_t *bt2, hid_t dxpl, void *record, unsigned depth)
{
int rec_depth; /* Depth of record in B-tree */
- if((rec_depth = H5B2_get_node_depth_test(bt2, dxpl, &record)) < 0)
+ if((rec_depth = H5B2_get_node_depth_test(bt2, dxpl, record)) < 0)
FAIL_STACK_ERROR
if((unsigned)rec_depth != depth)
TEST_ERROR
@@ -285,7 +339,7 @@ check_node_info(H5B2_t *bt2, hid_t dxpl, hsize_t record,
error:
return(-1);
-} /* end check_node_depth() */
+} /* end check_node_info() */
/*-------------------------------------------------------------------------
@@ -294,7 +348,6 @@ error:
* Purpose: v2 B-tree iterator callback
*
* Return: Success: 0
- *
* Failure: 1
*
* Programmer: Quincey Koziol
@@ -317,12 +370,41 @@ iter_cb(const void *_record, void *_op_data)
/*-------------------------------------------------------------------------
+ * Function: iter_rec_cb
+ *
+ * Purpose: v2 B-tree iterator callback for H5B2_test_rec_t records
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Friday, December 25, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+iter_rec_cb(const void *_record, void *_op_data)
+{
+ const H5B2_test_rec_t *record = (const H5B2_test_rec_t *)_record;
+ H5B2_test_rec_t *idx = (H5B2_test_rec_t *)_op_data;
+
+ if(record->key != idx->key)
+ return(H5_ITER_ERROR);
+ if(record->val != idx->val)
+ return(H5_ITER_ERROR);
+
+ idx->key++;
+ idx->val += 2;
+ return(H5_ITER_CONT);
+} /* end iter_rec_cb() */
+
+
+/*-------------------------------------------------------------------------
* Function: find_cb
*
* Purpose: v2 B-tree find callback
*
* Return: Success: TRUE/FALSE
- *
* Failure: FAIL
*
* Programmer: Quincey Koziol
@@ -344,6 +426,33 @@ find_cb(const void *_record, void *_op_data)
/*-------------------------------------------------------------------------
+ * Function: find_rec_cb
+ *
+ * Purpose: v2 B-tree find callback for H5B2_test_rec_t records
+ *
+ * Return: Success: TRUE/FALSE
+ * Failure: FAIL
+ *
+ * Programmer: Quincey Koziol
+ * Friday, December 25, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+find_rec_cb(const void *_record, void *_op_data)
+{
+ const H5B2_test_rec_t *record = (const H5B2_test_rec_t *)_record;
+ H5B2_test_rec_t *search = (H5B2_test_rec_t *)_op_data;
+
+ if(record->key != search->key)
+ return(FALSE);
+
+ search->val = record->val;
+ return(TRUE);
+} /* end find_rec_cb() */
+
+
+/*-------------------------------------------------------------------------
* Function: find_dec_cb
*
* Purpose: v2 B-tree find callback for indexing in decreasing order
@@ -372,6 +481,34 @@ find_dec_cb(const void *_record, void *_op_data)
/*-------------------------------------------------------------------------
+ * Function: index_rec_cb
+ *
+ * Purpose: v2 B-tree index callback for H5B2_test_rec_t records
+ *
+ * Return: Success: TRUE/FALSE
+ * Failure: FAIL
+ *
+ * Programmer: Quincey Koziol
+ * Friday, December 25, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+index_rec_cb(const void *_record, void *_op_data)
+{
+ const H5B2_test_rec_t *record = (const H5B2_test_rec_t *)_record;
+ H5B2_test_rec_t *search = (H5B2_test_rec_t *)_op_data;
+
+ HDassert(record);
+ HDassert(search);
+
+ search->key = record->key;
+ search->val = record->val;
+ return(TRUE);
+} /* end index_rec_cb() */
+
+
+/*-------------------------------------------------------------------------
* Function: neighbor_cb
*
* Purpose: v2 B-tree neighbor callback
@@ -425,6 +562,57 @@ modify_cb(void *_record, void *_op_data, hbool_t *changed)
/*-------------------------------------------------------------------------
+ * Function: modify_rec_cb
+ *
+ * Purpose: v2 B-tree modify callback for H5B2_test_rec_t records
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Friday, December 25, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+modify_rec_cb(void *_record, void *_op_data, hbool_t *changed)
+{
+ H5B2_test_rec_t *record = (H5B2_test_rec_t *)_record;
+ H5B2_test_rec_t *modify = (H5B2_test_rec_t *)_op_data;
+
+ HDassert(record->key == modify->key);
+ record->val = modify->val;
+ *changed = TRUE;
+
+ return(0);
+} /* end modify_rec_cb() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: no_modify_cb
+ *
+ * Purpose: v2 B-tree modify callback for updates which shouldn't change
+ * the record (ie. inserting not modifying)
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Wednesday, December 23, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+no_modify_cb(void H5_ATTR_UNUSED *_record, void H5_ATTR_UNUSED *_op_data,
+ hbool_t *changed)
+{
+ *changed = FALSE;
+
+ return(1);
+} /* end no_modify_cb() */
+
+
+/*-------------------------------------------------------------------------
* Function: remove_cb
*
* Purpose: v2 B-tree remove callback
@@ -717,7 +905,8 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC - 1);
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)33, (unsigned)0) < 0)
+ record = (hsize_t)33;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -734,7 +923,8 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)33, (unsigned)1) < 0)
+ record = (hsize_t)33;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -755,7 +945,8 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC + 2);
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)33, (unsigned)1) < 0)
+ record = (hsize_t)33;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -889,7 +1080,8 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)INSERT_SPLIT_ROOT_NREC, (unsigned)1) < 0)
+ record = (hsize_t)INSERT_SPLIT_ROOT_NREC;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -909,7 +1101,8 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC + (INSERT_SPLIT_ROOT_NREC / 2) + 1);
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)((INSERT_SPLIT_ROOT_NREC / 2) + (INSERT_SPLIT_ROOT_NREC / 4) + 1), (unsigned)1) < 0)
+ record = (hsize_t)((INSERT_SPLIT_ROOT_NREC / 2) + (INSERT_SPLIT_ROOT_NREC / 4) + 1);
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
@@ -940,7 +1133,8 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)(INSERT_SPLIT_ROOT_NREC / 2), (unsigned)1) < 0)
+ record = (hsize_t)(INSERT_SPLIT_ROOT_NREC / 2);
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -959,7 +1153,8 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC + (INSERT_SPLIT_ROOT_NREC / 2) + 1;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)((INSERT_SPLIT_ROOT_NREC / 2) + (INSERT_SPLIT_ROOT_NREC / 4) + 1), (unsigned)1) < 0)
+ record = (hsize_t)((INSERT_SPLIT_ROOT_NREC / 2) + (INSERT_SPLIT_ROOT_NREC / 4) + 1);
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
@@ -1041,7 +1236,7 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = INSERT_SPLIT_ROOT_NREC + (INSERT_SPLIT_ROOT_NREC / 2);
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1061,10 +1256,10 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 31;
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 63;
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
@@ -1096,7 +1291,7 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = (INSERT_SPLIT_ROOT_NREC / 2);
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1115,9 +1310,11 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = 2 * INSERT_SPLIT_ROOT_NREC;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)62, (unsigned)1) < 0)
+ record = 62;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)94, (unsigned)1) < 0)
+ record = 94;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
@@ -1202,7 +1399,7 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = (2 * INSERT_SPLIT_ROOT_NREC);
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1222,10 +1419,10 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = (INSERT_SPLIT_ROOT_NREC / 2);
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = (INSERT_SPLIT_ROOT_NREC + (INSERT_SPLIT_ROOT_NREC / 2) + 1);
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1244,9 +1441,11 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (2 * INSERT_SPLIT_ROOT_NREC) + (INSERT_SPLIT_ROOT_NREC / 2) + 1;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)52, (unsigned)1) < 0)
+ record = 52;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)105, (unsigned)1) < 0)
+ record = 105;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1343,7 +1542,7 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = (2 * INSERT_SPLIT_ROOT_NREC) + (INSERT_SPLIT_ROOT_NREC / 2);
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1362,11 +1561,14 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = 3 * INSERT_SPLIT_ROOT_NREC;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)62, (unsigned)1) < 0)
+ record = 62;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)94, (unsigned)1) < 0)
+ record = 94;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)126, (unsigned)1) < 0)
+ record = 126;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1464,7 +1666,8 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC * 29) + 1;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)948, (unsigned)2) < 0)
+ record = 948;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1513,7 +1716,8 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam,
FAIL_STACK_ERROR
/* Check with B-tree */
- if(check_node_depth(bt2, dxpl, (hsize_t)948, (unsigned)2) < 0)
+ record = 948;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
/* Attempt to find existant record in internal node of level-2 B-tree */
@@ -1522,7 +1726,8 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam,
FAIL_STACK_ERROR
/* Check with B-tree */
- if(check_node_depth(bt2, dxpl, (hsize_t)505, (unsigned)1) < 0)
+ record = 505;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Attempt to find existant record in leaf of level-2 B-tree */
@@ -1531,7 +1736,8 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam,
FAIL_STACK_ERROR
/* Check with B-tree */
- if(check_node_depth(bt2, dxpl, (hsize_t)555, (unsigned)0) < 0)
+ record = 555;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Attempt to index non-existant record in level-2 B-tree */
@@ -1642,11 +1848,14 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC * 29) + (INSERT_SPLIT_ROOT_NREC / 2);
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1008, (unsigned)2) < 0)
+ record = 1008;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1859, (unsigned)1) < 0)
+ record = 1859;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1921, (unsigned)0) < 0)
+ record = 1921;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1663,11 +1872,14 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC * 29) + (INSERT_SPLIT_ROOT_NREC / 2) + 1;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1008, (unsigned)2) < 0)
+ record = 1008;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1875, (unsigned)1) < 0)
+ record = 1875;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1922, (unsigned)0) < 0)
+ record = 1922;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
PASSED();
@@ -1683,11 +1895,14 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC * 29) + (INSERT_SPLIT_ROOT_NREC / 2) + 1;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1008, (unsigned)2) < 0)
+ record = 1008;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)94, (unsigned)1) < 0)
+ record = 94;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)32, (unsigned)0) < 0)
+ record = 32;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Add more records to left-most leaf, to force a 2->1 split and then a
@@ -1704,11 +1919,14 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC * 30) + 1;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1008, (unsigned)2) < 0)
+ record = 1008;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)47, (unsigned)1) < 0)
+ record = 47;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)0, (unsigned)0) < 0)
+ record = 0;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
PASSED();
@@ -1724,13 +1942,17 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC * 30) + 1;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1008, (unsigned)2) < 0) /* Record in root node */
+ record = 1008;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) /* Record in root node */
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)535, (unsigned)1) < 0) /* Record in middle node before insertion point */
+ record = 535;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node before insertion point */
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)630, (unsigned)1) < 0) /* Record in middle node after insertion point */
+ record = 630;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node after insertion point */
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)568, (unsigned)0) < 0) /* Record in leaf node just after insertion point */
+ record = 568;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) /* Record in leaf node just after insertion point */
TEST_ERROR
/* Add more records to middle leaf, to force a split and a 3 node redistribution on middle leaf */
@@ -1745,13 +1967,17 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC * 30) + (INSERT_SPLIT_ROOT_NREC / 2) + 2;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1008, (unsigned)2) < 0) /* Record in root node */
+ record = 1008;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) /* Record in root node */
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)524, (unsigned)1) < 0) /* Record in middle node before insertion point */
+ record = 524;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node before insertion point */
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)577, (unsigned)1) < 0) /* Record in middle node after insertion point */
+ record = 577;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node after insertion point */
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)568, (unsigned)0) < 0) /* Record in leaf node just after insertion point */
+ record = 568;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) /* Record in leaf node just after insertion point */
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1851,13 +2077,13 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 946; /* Record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 1797; /* Right-most record in right internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 1859; /* Right-most record in right-most leaf */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1877,16 +2103,16 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 946; /* Record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 1828; /* Next-to-right-most record in right-most internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 1860; /* Right-most record in right-most internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 1891; /* Right-most record in right-most leaf */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
PASSED();
@@ -1903,13 +2129,13 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 946; /* Record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 63; /* Left-most record in left-most internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 1; /* Left-most record in left-most leaf */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Add another record to left-most leaf, to force a 1->2 node split on left leaf */
@@ -1923,16 +2149,16 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 946; /* Record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 63; /* Left-most record in left-most internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 32; /* Left-most record in left internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 0; /* Left-most record in left-most leaf */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
PASSED();
@@ -1949,16 +2175,16 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 946; /* Record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 504; /* Record in internal node just before insertion point */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 568; /* Record in internal node just after insertion point */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 506; /* Record in leaf node just after insertion point */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Add another record to middle leaf, to force a node split on middle leaf */
@@ -1972,19 +2198,19 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 946; /* Record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 504; /* Left-most record of split in left internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 537; /* Middle record of split in left internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 568; /* Right-most record of split in left internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 506; /* Record in leaf node just after insertion point */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2081,13 +2307,13 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1318; /* Record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3114; /* Right-most record in right internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 3145; /* Right-most record in right leaf node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2105,13 +2331,13 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1822; /* Record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3114; /* Right-most record in right internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 3146; /* Right-most record in right leaf node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
PASSED();
@@ -2128,13 +2354,13 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1822; /* Record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 436; /* Left-most record in left internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 374; /* Left-most record in left leaf node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Force left-most internal node to redistribute */
@@ -2150,13 +2376,13 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1570; /* Record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 61; /* Left-most record in left internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 0; /* Left-most record in left leaf node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2253,13 +2479,13 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 2759; /* Record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 4555; /* Right-most record in right internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 4586; /* Right-most record in right leaf node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2277,16 +2503,16 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 2759; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3704; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 4555; /* Right-most record in right internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 4387; /* Right-most record in right leaf node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
PASSED();
@@ -2303,13 +2529,13 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 2759; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 932; /* Left-most record in left internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 870; /* Left-most record in left leaf node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Force left-most internal node to split */
@@ -2325,16 +2551,16 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 870; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 1814; /* Next-to-left-most record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 61; /* Left-most record in left internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 0; /* Left-most record in left leaf node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2436,19 +2662,19 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3703; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 2267; /* Record to left of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 3199; /* Record to right of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 3137; /* Record just above insertion point in leaf node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2468,19 +2694,19 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3703; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3104; /* Record to left of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 3137; /* Record to right of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 3135; /* Record just above insertion point in leaf node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2498,21 +2724,21 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1574; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3104; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
#ifdef NONE
record = 2862; /* Record to left of insertion point in right internal node (now) */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
#endif /* NONE */
record = 3137; /* Record to right of insertion point in right internal node (now) */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 3135; /* Record just above insertion point in leaf node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2619,19 +2845,19 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3703; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 1952; /* Record to left of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 2884; /* Record to right of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 2822; /* Record just after insertion point in leaf node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Insert records to fill up middle internal node */
@@ -2647,19 +2873,19 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3703; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 2789; /* Record to left of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 2822; /* Record to right of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 2823; /* Record just above insertion point in leaf node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2677,24 +2903,24 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 2789; /* Middle record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3703; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
#ifdef NONE
record = 3049; /* Record to left of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
#endif /* NONE */
record = 2822; /* Record to right of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 2823; /* Record just above insertion point in leaf node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2967,6 +3193,2019 @@ error:
/*-------------------------------------------------------------------------
+ * Function: test_update_basic
+ *
+ * Purpose: Basic tests for the v2 B-tree update operation
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Wednesday, December 23, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
+ const bt2_test_param_t *tparam)
+{
+ hid_t file = -1; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_test_rec_t modify; /* Modified value */
+ H5B2_test_rec_t find; /* Record to find */
+ herr_t ret; /* Generic error return value */
+
+ /* Create the file for the test */
+ if(create_file(&file, &f, fapl) < 0)
+ TEST_ERROR
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ TEST_ERROR
+
+ /*
+ * Test insert record into empty v2 B-tree
+ */
+ TESTING("B-tree update: inserting first record in empty B-tree");
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ record.key = 42;
+ record.val = 72;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ /* Attempt to find non-existant record in B-tree with 1 record */
+ /* (Should not be found, but not fail) */
+ find.key = 10;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE)
+ FAIL_STACK_ERROR
+ if(find.val != (hsize_t)-1)
+ TEST_ERROR
+
+ /* Try again with NULL 'op' */
+ /* (Should not be found, but not fail) */
+ if(H5B2_find(bt2, dxpl, &find, NULL, NULL) != FALSE)
+ FAIL_STACK_ERROR
+ if(find.val != (hsize_t)-1)
+ TEST_ERROR
+
+ /* Attempt to find existant record in B-tree with 1 record */
+ find.key = 42;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ FAIL_STACK_ERROR
+ if(find.val != 72)
+ TEST_ERROR
+
+ /* Try again with NULL 'op' */
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, NULL, NULL) != TRUE)
+ FAIL_STACK_ERROR
+ if(find.val != (hsize_t)-1)
+ TEST_ERROR
+
+ /* Attempt to index non-existant record in B-tree with 1 record */
+ H5E_BEGIN_TRY {
+ ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, index_rec_cb, NULL);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+
+ /* Attempt to index existing record in B-tree with 1 record */
+ find.key = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0)
+ FAIL_STACK_ERROR
+ if(find.key != 42)
+ TEST_ERROR
+ if(find.val != 72)
+ TEST_ERROR
+
+ PASSED();
+
+
+ /*
+ * Test update only record into v2 B-tree
+ */
+ TESTING("B-tree update: update only record in B-tree");
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ modify.key = 42;
+ modify.val = 43;
+ if(H5B2_update(bt2, dxpl, &modify, modify_rec_cb, &modify) < 0)
+ FAIL_STACK_ERROR
+
+ /* Attempt to find non-existant record in B-tree with 1 record */
+ /* (Should not be found, but not fail) */
+ find.key = 10;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE)
+ FAIL_STACK_ERROR
+ if(find.val != (hsize_t)-1)
+ TEST_ERROR
+
+ /* Try again with NULL 'op' */
+ /* (Should not be found, but not fail) */
+ if(H5B2_find(bt2, dxpl, &find, NULL, NULL) != FALSE)
+ FAIL_STACK_ERROR
+ if(find.val != (hsize_t)-1)
+ TEST_ERROR
+
+ /* Attempt to find modified record in B-tree with 1 record */
+ find.key = 42;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ FAIL_STACK_ERROR
+ if(find.val != 43)
+ TEST_ERROR
+
+ /* Try again with NULL 'op' */
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, NULL, NULL) != TRUE)
+ FAIL_STACK_ERROR
+ if(find.val != (hsize_t)-1)
+ TEST_ERROR
+
+ /* Attempt to index non-existant record in B-tree with 1 record */
+ H5E_BEGIN_TRY {
+ ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, index_rec_cb, NULL);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+
+ /* Attempt to index existing record in B-tree with 1 record */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0)
+ FAIL_STACK_ERROR
+ if(find.key != 42)
+ TEST_ERROR
+ if(find.val != 43)
+ TEST_ERROR
+
+ PASSED();
+
+
+ /*
+ * Test inserting more records into v2 B-tree
+ */
+ TESTING("B-tree update: insert several records");
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ /*
+ * Test inserting second record into v2 B-tree, before all other records
+ */
+ record.key = 34;
+ record.val = 11;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ /*
+ * Test inserting third record into v2 B-tree, after all other records
+ */
+ record.key = 56;
+ record.val = 12;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ /*
+ * Test inserting fourth record into v2 B-tree, in the middle of other records
+ */
+ record.key = 38;
+ record.val = 13;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ /* Attempt to find non-existant record in level-0 B-tree with several records */
+ /* (Should not be found, but not fail) */
+ find.key = 10;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE)
+ TEST_ERROR
+ if(find.val != (hsize_t)-1)
+ TEST_ERROR
+
+ /* Attempt to find existant record in level-0 B-tree with several records */
+ find.key = 56;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ TEST_ERROR
+ if(find.val != 12)
+ TEST_ERROR
+
+ /* Attempt to index non-existant record in B-tree with several records */
+ H5E_BEGIN_TRY {
+ ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)4, index_rec_cb, NULL);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+
+ /* Attempt to index existing record in B-tree with several records */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0)
+ TEST_ERROR
+ if(find.key != 34)
+ TEST_ERROR
+ if(find.val != 11)
+ TEST_ERROR
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, index_rec_cb, &find) < 0)
+ TEST_ERROR
+ if(find.key != 38)
+ TEST_ERROR
+ if(find.val != 13)
+ TEST_ERROR
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)2, index_rec_cb, &find) < 0)
+ TEST_ERROR
+ if(find.key != 42)
+ TEST_ERROR
+ if(find.val != 43)
+ TEST_ERROR
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)3, index_rec_cb, &find) < 0)
+ TEST_ERROR
+ if(find.key != 56)
+ TEST_ERROR
+ if(find.val != 12)
+ TEST_ERROR
+
+ PASSED();
+
+
+ /*
+ * Test updating all existing records in v2 B-tree
+ */
+ TESTING("B-tree update: update several records");
+
+ record.key = 34;
+ modify.key = 34;
+ modify.val = 21;
+ if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0)
+ FAIL_STACK_ERROR
+ record.key = 38;
+ modify.key = 38;
+ modify.val = 23;
+ if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0)
+ FAIL_STACK_ERROR
+ record.key = 42;
+ modify.key = 42;
+ modify.val = 24;
+ if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0)
+ FAIL_STACK_ERROR
+ record.key = 56;
+ modify.key = 56;
+ modify.val = 22;
+ if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0)
+ FAIL_STACK_ERROR
+
+ /* Attempt to find non-existant record in level-0 B-tree with several records */
+ /* (Should not be found, but not fail) */
+ find.key = 41;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE)
+ TEST_ERROR
+ if(find.val != (hsize_t)-1)
+ TEST_ERROR
+
+ /* Attempt to find existant record in level-0 B-tree with several record */
+ find.key = 56;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ TEST_ERROR
+ if(find.val != 22)
+ TEST_ERROR
+
+ /* Attempt to index non-existant record in B-tree with several records */
+ H5E_BEGIN_TRY {
+ ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)4, index_rec_cb, NULL);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+
+ /* Attempt to index existing record in B-tree with several records */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0)
+ TEST_ERROR
+ if(find.key != 34)
+ TEST_ERROR
+ if(find.val != 21)
+ TEST_ERROR
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, index_rec_cb, &find) < 0)
+ TEST_ERROR
+ if(find.key != 38)
+ TEST_ERROR
+ if(find.val != 23)
+ TEST_ERROR
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)2, index_rec_cb, &find) < 0)
+ TEST_ERROR
+ if(find.key != 42)
+ TEST_ERROR
+ if(find.val != 24)
+ TEST_ERROR
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)3, index_rec_cb, &find) < 0)
+ TEST_ERROR
+ if(find.key != 56)
+ TEST_ERROR
+ if(find.val != 22)
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ /* Close the file */
+ if(H5Fclose(file) < 0)
+ TEST_ERROR
+
+ PASSED();
+
+
+ /* All tests passed */
+ return(0);
+
+error:
+ H5E_BEGIN_TRY {
+ if(bt2)
+ H5B2_close(bt2, dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return(1);
+} /* test_update_basic() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_update_split_root
+ *
+ * Purpose: Basic tests for the B-tree v2 code. This test inserts enough
+ * records to split the root node and force the tree to depth 1.
+ * It also continues to add a few more records to each of the
+ * left and right leaf nodes after the split
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Wednesday, December 23, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
+ const bt2_test_param_t *tparam)
+{
+ hid_t file = -1; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_test_rec_t modify; /* Modified value */
+ H5B2_test_rec_t find; /* Record to find */
+ H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic error return value */
+
+ /*
+ * Test inserting enough records into v2 B-tree to split the root node
+ */
+ TESTING("B-tree update: split root");
+
+ /* Create the file for the test */
+ if(create_file(&file, &f, fapl) < 0)
+ TEST_ERROR
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ TEST_ERROR
+
+ /* Insert records to fill root leaf node */
+ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC - 1); u++) {
+ record.key = u + 2;
+ record.val = u * 2 + 4;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 0;
+ bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC_REC - 1);
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 33;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ /* Insert record to split root leaf node */
+ record.key = INSERT_SPLIT_ROOT_NREC_REC + 1;
+ record.val = (INSERT_SPLIT_ROOT_NREC_REC - 1) * 2 + 4;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 33;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Iterate over B-tree to check records have been inserted correctly */
+ idx.key = 2;
+ idx.val = 4;
+ if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the index is correct */
+ if(idx.key != (INSERT_SPLIT_ROOT_NREC_REC + 2))
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ /* Modify all records */
+ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
+ record.key = u + 2;
+ modify.key = u + 2;
+ modify.val = u * 2 + 5;
+ if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 33;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Iterate over B-tree to check records have been inserted correctly */
+ idx.key = 2;
+ idx.val = 5;
+ if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the index is correct */
+ if(idx.key != (INSERT_SPLIT_ROOT_NREC_REC + 2))
+ TEST_ERROR
+
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ /* Insert a couple more records, on the left side of the B-tree */
+ record.key = 0;
+ record.val = 1;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ record.key = 1;
+ record.val = 3;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC_REC + 2);
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 33;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+
+ /* Iterate over B-tree to check records have been inserted correctly */
+ idx.key = 0;
+ idx.val = 1;
+ if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the index is correct */
+ if(idx.key != (INSERT_SPLIT_ROOT_NREC_REC + 2))
+ TEST_ERROR
+
+ /* Attempt to find non-existant record in level-1 B-tree */
+ /* (Should not be found, but not fail) */
+ find.key = 800;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE)
+ TEST_ERROR
+ if(find.val != (hsize_t)-1)
+ TEST_ERROR
+
+ /* Attempt to find existant record in root of level-1 B-tree */
+ find.key = 33;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ FAIL_STACK_ERROR
+ if(find.key != 33)
+ TEST_ERROR
+ if(find.val != 67)
+ TEST_ERROR
+
+ /* Attempt to find existant record in leaf of level-1 B-tree */
+ find.key = 56;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ FAIL_STACK_ERROR
+ if(find.key != 56)
+ TEST_ERROR
+ if(find.val != 113)
+ TEST_ERROR
+
+ /* Attempt to index non-existant record in level-1 B-tree */
+ H5E_BEGIN_TRY {
+ ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC + 2), index_rec_cb, NULL);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+
+ /* Attempt to index existing record in root of level-1 B-tree */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)33, index_rec_cb, &find) < 0)
+ FAIL_STACK_ERROR
+ if(find.key != 33)
+ TEST_ERROR
+ if(find.val != 67)
+ TEST_ERROR
+
+ /* Attempt to index existing record in left leaf of level-1 B-tree */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0)
+ FAIL_STACK_ERROR
+ if(find.key != 0)
+ TEST_ERROR
+ if(find.val != 1)
+ TEST_ERROR
+
+ /* Attempt to index existing record in right leaf of level-1 B-tree */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)50, index_rec_cb, &find) < 0)
+ FAIL_STACK_ERROR
+ if(find.key != 50)
+ TEST_ERROR
+ if(find.val != 101)
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ if(H5Fclose(file) < 0)
+ TEST_ERROR
+
+ PASSED();
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ if(bt2)
+ H5B2_close(bt2, dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+} /* test_update_split_root() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_update_level1_2leaf_redistrib
+ *
+ * Purpose: Basic tests for the B-tree v2 code. This test inserts enough
+ * records to split the root node and force the tree to depth 1.
+ * It continues to add a more records to the each of the
+ * left and right leaf nodes after the split to force a 2 node
+ * redistribution
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Saturday, December 26, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
+ const bt2_test_param_t *tparam)
+{
+ hid_t file = -1; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ TESTING("B-tree update: redistribute 2 leaves in level 1 B-tree (l->r)");
+
+ /* Create the file for the test */
+ if(create_file(&file, &f, fapl) < 0)
+ TEST_ERROR
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ TEST_ERROR
+
+ /* Insert enough records to force root to split into 2 leaves */
+ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
+ record.key = u + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1;
+ record.val = u + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 10;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = INSERT_SPLIT_ROOT_NREC_REC;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+
+ /* Force redistribution from left node into right node */
+ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1; u++) {
+ record.key = u;
+ record.val = u + 9;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC_REC + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1);
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) + (INSERT_SPLIT_ROOT_NREC_REC / 4);
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ PASSED();
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ TESTING("B-tree update: redistribute 2 leaves in level 1 B-tree (r->l)");
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ TEST_ERROR
+
+ /* Insert enough records to force root to split into 2 leaves */
+ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
+ record.key = u;
+ record.val = u + 9;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ /* Force redistribution from left node into right node */
+ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1; u++) {
+ record.key = u + INSERT_SPLIT_ROOT_NREC_REC;
+ record.val = u + INSERT_SPLIT_ROOT_NREC_REC + 9;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC_REC + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) + (INSERT_SPLIT_ROOT_NREC_REC / 4) - 1;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ /* Close file */
+ if(H5Fclose(file) < 0)
+ FAIL_STACK_ERROR
+
+ PASSED();
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ if(bt2)
+ H5B2_close(bt2, dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+} /* test_update_level1_2leaf_redistrib() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_update_level1_side_split
+ *
+ * Purpose: Basic tests for the B-tree v2 code. This test inserts enough
+ * records to split the root node and force the tree to depth 1.
+ * It continues to add a more records to the each of the
+ * left and right leaf nodes after the split to force a 2 node
+ * split, adding another node to the B-tree
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Saturday, December 26, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
+ const bt2_test_param_t *tparam)
+{
+ hid_t file = -1; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ TESTING("B-tree update: split side leaf into 2 leaves in level 1 B-tree (l->r)");
+
+ /* Create the file for the test */
+ if(create_file(&file, &f, fapl) < 0)
+ TEST_ERROR
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ TEST_ERROR
+
+ /* Insert enough records to force root to split into 2 leaves */
+ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
+ record.key = u + INSERT_SPLIT_ROOT_NREC_REC;
+ record.val = u + INSERT_SPLIT_ROOT_NREC_REC + 10;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = INSERT_SPLIT_ROOT_NREC_REC + (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ /* Force left node to split */
+ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
+ record.key = u;
+ record.val = u + 10;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = 2 * INSERT_SPLIT_ROOT_NREC_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 31;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+ record.key = 64;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ PASSED();
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ TESTING("B-tree update: split side leaf into 2 leaves in level 1 B-tree (r->l)");
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ TEST_ERROR
+
+ /* Insert enough records to force root to split into 2 leaves */
+ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
+ record.key = u;
+ record.val = u + 10;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ /* Force right node to split */
+ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
+ record.key = u + INSERT_SPLIT_ROOT_NREC_REC;
+ record.val = u + INSERT_SPLIT_ROOT_NREC_REC + 10;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = 2 * INSERT_SPLIT_ROOT_NREC_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 63;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+ record.key = 95;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ /* Close file */
+ if(H5Fclose(file) < 0)
+ FAIL_STACK_ERROR
+
+ PASSED();
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ if(bt2)
+ H5B2_close(bt2, dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+} /* test_update_level1_side_split() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_update_level1_3leaf_redistrib
+ *
+ * Purpose: Basic tests for the B-tree v2 code. This test inserts enough
+ * records to split the root node and force the tree to depth 1.
+ * It continues to add a more records to the each of the
+ * left and right leaf nodes after the split to force a 2 node
+ * split, adding another node to the B-tree, then continues to
+ * add records until a 3 node redistribution occurs
+ *
+ * Return: Success: 0
+ *
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Saturday, December 26, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
+ const bt2_test_param_t *tparam)
+{
+ hid_t file = -1; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ TESTING("B-tree update: redistribute 3 leaves in level 1 B-tree");
+
+ /* Create the file for the test */
+ if(create_file(&file, &f, fapl) < 0)
+ TEST_ERROR
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ TEST_ERROR
+
+ /* Insert enough records to force root to split into 2 leaves */
+ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
+ record.key = u + (INSERT_SPLIT_ROOT_NREC_REC + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1);
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = (2 * INSERT_SPLIT_ROOT_NREC_REC);
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ /* Force left node to split */
+ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
+ record.key = u;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = 2 * INSERT_SPLIT_ROOT_NREC_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+ record.key = INSERT_SPLIT_ROOT_NREC_REC + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ /* Insert records to force middle node to redistribute */
+ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC_REC / 2) + 1); u++) {
+ record.key = u + INSERT_SPLIT_ROOT_NREC_REC;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = (2 * INSERT_SPLIT_ROOT_NREC_REC) + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 52;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+ record.key = 107;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ /* Iterate over B-tree to check records have been inserted correctly */
+ idx.key = 0;
+ idx.val = 0;
+ if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the index is correct */
+ if(idx.key != ((INSERT_SPLIT_ROOT_NREC_REC * 2) + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1))
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ /* Close file */
+ if(H5Fclose(file) < 0)
+ FAIL_STACK_ERROR
+
+ PASSED();
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ if(bt2)
+ H5B2_close(bt2, dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+} /* test_update_level1_3leaf_redistrib() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_update_level1_middle_split
+ *
+ * Purpose: Basic tests for the B-tree v2 code. This test inserts enough
+ * records to split the root node and force the tree to depth 1.
+ * It continues to add a more records to the each of the
+ * left and right leaf nodes after the split to force a 2 node
+ * split, adding another node to the B-tree, then continues to
+ * add records until a 3 node split occurs
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Saturday, December 26, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam,
+ const bt2_test_param_t *tparam)
+{
+ hid_t file = -1; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ TESTING("B-tree update: split middle leaf into 2 leaves in level 1 B-tree");
+
+ /* Create the file for the test */
+ if(create_file(&file, &f, fapl) < 0)
+ TEST_ERROR
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ TEST_ERROR
+
+ /* Insert enough records to force root to split into 2 leaves */
+ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
+ record.key = u + (INSERT_SPLIT_ROOT_NREC_REC * 2);
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = (2 * INSERT_SPLIT_ROOT_NREC_REC) + (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ /* Force split from left node into right node */
+ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC * 2); u++) {
+ record.key = u;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = 3 * INSERT_SPLIT_ROOT_NREC_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 63;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+ record.key = 95;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+ record.key = 128;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ /* Iterate over B-tree to check records have been inserted correctly */
+ idx.key = 0;
+ idx.val = 0;
+ if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the index is correct */
+ if(idx.key != (INSERT_SPLIT_ROOT_NREC_REC * 3))
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ /* Close file */
+ if(H5Fclose(file) < 0)
+ STACK_ERROR
+
+ PASSED();
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ if(bt2)
+ H5B2_close(bt2, dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+} /* test_update_level1_middle_split() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_update_make_level2
+ *
+ * Purpose: Basic tests for the B-tree v2 code. This test inserts enough
+ * records to make a level 2 B-tree
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Saturday, December 26, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
+ const bt2_test_param_t *tparam)
+{
+ hid_t file = -1; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_test_rec_t find; /* Record to find */
+ H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic error return value */
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ TESTING("B-tree update: make level 2 B-tree (l->r)");
+
+ /* Create the file for the test */
+ if(create_file(&file, &f, fapl) < 0)
+ TEST_ERROR
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ TEST_ERROR
+
+ /* Insert enough records to force root to split into 2 internal nodes */
+ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC * 9); u++) {
+ record.key = u + 2; /* Leave a gap for later insertion */
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+ for(; u < (INSERT_SPLIT_ROOT_NREC_REC * 41); u++) {
+ record.key = u + 4; /* Leave a gap for later insertion */
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 2;
+ bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC_REC * 41);
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 1347;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ /* Add some extra records to left-most leaf */
+ record.key = 0;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ record.key = 1;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ /* Add some extra records to middle leaf */
+ record.key = (INSERT_SPLIT_ROOT_NREC_REC * 9) + 2;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ record.key = (INSERT_SPLIT_ROOT_NREC_REC * 9) + 3;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+
+ /* Iterate over B-tree to check records have been inserted correctly */
+ idx.key = 0;
+ idx.val = 0;
+ if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the index is correct */
+ if(idx.key != ((INSERT_SPLIT_ROOT_NREC_REC * 41) + 4))
+ TEST_ERROR
+
+ /* Attempt to find non-existant record in level-2 B-tree */
+ /* (Should not be found, but not fail) */
+ find.key = INSERT_SPLIT_ROOT_NREC_REC * 42;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE)
+ TEST_ERROR
+ if(find.val != (hsize_t)-1)
+ TEST_ERROR
+
+ /* Attempt to find existant record in root of level-2 B-tree */
+ find.key = 1347;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ FAIL_STACK_ERROR
+ if(find.val != (1347 * 2))
+ TEST_ERROR
+
+ /* Check with B-tree */
+ record.key = 1347;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ TEST_ERROR
+
+ /* Attempt to find existant record in internal node of level-2 B-tree */
+ find.key = 513;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ FAIL_STACK_ERROR
+ if(find.val != (513 * 2))
+ TEST_ERROR
+
+ /* Check with B-tree */
+ record.key = 513;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Attempt to find existant record in leaf of level-2 B-tree */
+ find.key = 555;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ FAIL_STACK_ERROR
+ if(find.val != (555 * 2))
+ TEST_ERROR
+
+ /* Check with B-tree */
+ record.key = 555;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ TEST_ERROR
+
+ /* Attempt to index non-existant record in level-2 B-tree */
+ H5E_BEGIN_TRY {
+ ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+
+ /* Attempt to index existing record in root of level-2 B-tree */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1347, index_rec_cb, &find) < 0)
+ FAIL_STACK_ERROR
+ if(find.key != 1347)
+ TEST_ERROR
+ if(find.val != (1347 * 2))
+ TEST_ERROR
+
+ /* Attempt to index existing record in internal node of level-2 B-tree */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)513, index_rec_cb, &find) < 0)
+ FAIL_STACK_ERROR
+ if(find.key != 513)
+ TEST_ERROR
+ if(find.val != (513 * 2))
+ TEST_ERROR
+
+ /* Attempt to index existing record in leaf of level-2 B-tree */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0)
+ FAIL_STACK_ERROR
+ if(find.key != 555)
+ TEST_ERROR
+ if(find.val != (555 * 2))
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ PASSED();
+
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ TESTING("B-tree update: make level 2 B-tree (r->l)");
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ TEST_ERROR
+
+ /* Insert enough records to force root to split into 2 internal nodes */
+ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC * 9); u++) {
+ record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) + 1) - u;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+ for(; u < (INSERT_SPLIT_ROOT_NREC_REC * 41); u++) {
+ record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) + 1) - (u +2); /* Leave a gap for later insertion */
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 2;
+ bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC_REC * 41);
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 1344;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ /* Add some extra records to right-most leaf */
+ record.key = (INSERT_SPLIT_ROOT_NREC_REC * 41) + 2;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ record.key = (INSERT_SPLIT_ROOT_NREC_REC * 41) + 3;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ /* Add some extra records to middle leaf */
+ record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) - (INSERT_SPLIT_ROOT_NREC_REC * 9));
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) - (INSERT_SPLIT_ROOT_NREC_REC * 9)) + 1;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+
+ /* Iterate over B-tree to check records have been inserted correctly */
+ idx.key = 0;
+ idx.val = 0;
+ if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the index is correct */
+ if(idx.key != ((INSERT_SPLIT_ROOT_NREC_REC * 41) + 4))
+ TEST_ERROR
+
+ /* Attempt to find non-existant record in level-2 B-tree */
+ /* (Should not be found, but not fail) */
+ find.key = INSERT_SPLIT_ROOT_NREC_REC * 42;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE)
+ TEST_ERROR
+ if(find.val != (hsize_t)-1)
+ TEST_ERROR
+
+ /* Attempt to find existant record in root of level-2 B-tree */
+ find.key = 1344;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ FAIL_STACK_ERROR
+ if(find.val != (1344 * 2))
+ TEST_ERROR
+
+ /* Check with B-tree */
+ record.key = 1344;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ TEST_ERROR
+
+ /* Attempt to find existant record in internal node of level-2 B-tree */
+ find.key = 512;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ FAIL_STACK_ERROR
+ if(find.val != (512 * 2))
+ TEST_ERROR
+
+ /* Check with B-tree */
+ record.key = 512;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Attempt to find existant record in leaf of level-2 B-tree */
+ find.key = 555;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ FAIL_STACK_ERROR
+ if(find.val != (555 * 2))
+ TEST_ERROR
+
+ /* Check with B-tree */
+ record.key = 555;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ TEST_ERROR
+
+ /* Attempt to index non-existant record in level-2 B-tree */
+ H5E_BEGIN_TRY {
+ ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+
+ /* Attempt to index existing record in root of level-2 B-tree */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1344, index_rec_cb, &find) < 0)
+ FAIL_STACK_ERROR
+ if(find.key != 1344)
+ TEST_ERROR
+ if(find.val != (1344 * 2))
+ TEST_ERROR
+
+ /* Attempt to index existing record in internal node of level-2 B-tree */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)512, index_rec_cb, &find) < 0)
+ FAIL_STACK_ERROR
+ if(find.key != 512)
+ TEST_ERROR
+ if(find.val != (512 * 2))
+ TEST_ERROR
+
+ /* Attempt to index existing record in leaf of level-2 B-tree */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0)
+ FAIL_STACK_ERROR
+ if(find.key != 555)
+ TEST_ERROR
+ if(find.val != (555 * 2))
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ PASSED();
+
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ TESTING("B-tree update: make level 2 B-tree (l+r->middle)");
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ TEST_ERROR
+
+ /* Insert enough records to force root to split into 2 internal nodes */
+ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC * 9); u++) {
+ record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) + 3) - u;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+ for(; u < (INSERT_SPLIT_ROOT_NREC_REC * 41); u++) {
+ record.key = u - ((INSERT_SPLIT_ROOT_NREC_REC * 9) - 2); /* Leave a gap for later insertion */
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 2;
+ bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC_REC * 41);
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 1345;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ /* Add some extra records to right-most leaf */
+ record.key = (INSERT_SPLIT_ROOT_NREC_REC * 41) + 4;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ record.key = (INSERT_SPLIT_ROOT_NREC_REC * 41) + 5;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ /* Add some extra records to middle leaf */
+ record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) - (INSERT_SPLIT_ROOT_NREC_REC * 9)) + 2;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) - (INSERT_SPLIT_ROOT_NREC_REC * 9)) + 3;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ /* Add some extra records to left-most leaf */
+ record.key = 0;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ record.key = 1;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+
+ /* Iterate over B-tree to check records have been inserted correctly */
+ idx.key = 0;
+ idx.val = 0;
+ if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the index is correct */
+ if(idx.key != ((INSERT_SPLIT_ROOT_NREC_REC * 41) + 6))
+ TEST_ERROR
+
+ /* Attempt to find non-existant record in level-2 B-tree */
+ /* (Should not be found, but not fail) */
+ find.key = INSERT_SPLIT_ROOT_NREC_REC * 42;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE)
+ TEST_ERROR
+ if(find.val != (hsize_t)-1)
+ TEST_ERROR
+
+ /* Attempt to find existant record in root of level-2 B-tree */
+ find.key = 1345;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ FAIL_STACK_ERROR
+ if(find.val != (1345 * 2))
+ TEST_ERROR
+
+ /* Check with B-tree */
+ record.key = 1345;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ TEST_ERROR
+
+ /* Attempt to find existant record in internal node of level-2 B-tree */
+ find.key = 513;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ FAIL_STACK_ERROR
+ if(find.val != (513 * 2))
+ TEST_ERROR
+
+ /* Check with B-tree */
+ record.key = 513;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Attempt to find existant record in leaf of level-2 B-tree */
+ find.key = 555;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ FAIL_STACK_ERROR
+ if(find.val != (555 * 2))
+ TEST_ERROR
+
+ /* Check with B-tree */
+ record.key = 555;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ TEST_ERROR
+
+ /* Attempt to index non-existant record in level-2 B-tree */
+ H5E_BEGIN_TRY {
+ ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+
+ /* Attempt to index existing record in level-2 B-tree */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1345, index_rec_cb, &find) < 0)
+ FAIL_STACK_ERROR
+ if(find.key != 1345)
+ TEST_ERROR
+ if(find.val != (1345 * 2))
+ TEST_ERROR
+
+ /* Attempt to index existing record in internal node of level-2 B-tree */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)513, index_rec_cb, &find) < 0)
+ FAIL_STACK_ERROR
+ if(find.key != 513)
+ TEST_ERROR
+ if(find.val != (513 * 2))
+ TEST_ERROR
+
+ /* Attempt to index existing record in leaf of level-2 B-tree */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0)
+ FAIL_STACK_ERROR
+ if(find.key != 555)
+ TEST_ERROR
+ if(find.val != (555 * 2))
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ /* Close file */
+ if(H5Fclose(file) < 0)
+ FAIL_STACK_ERROR
+
+ PASSED();
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ if(bt2)
+ H5B2_close(bt2, dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+} /* test_update_make_level2() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_update_lots
+ *
+ * Purpose: Basic tests for the B-tree v2 code. This test inserts many
+ * records in random order, enough to make at a level 4 B-tree.
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Sunday, December 27, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_update_lots(hid_t fapl, const H5B2_create_t *cparam,
+ const bt2_test_param_t *tparam)
+{
+ hid_t file = -1; /* File ID */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
+ haddr_t bt2_addr; /* Address of B-tree created */
+ time_t curr_time; /* Current time, for seeding random number generator */
+ H5B2_test_rec_t *records; /* Record #'s for random insertion */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_test_rec_t modify; /* Modified value */
+ H5B2_test_rec_t find; /* Record to find */
+ H5B2_test_rec_t iter; /* Index within B-tree, for iterator */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t nrec; /* Number of records in B-tree */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic error return value */
+
+ /* Initialize random number seed */
+ curr_time = HDtime(NULL);
+#ifdef QAK
+curr_time = 1451342093;
+HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
+#endif /* QAK */
+ HDsrandom((unsigned)curr_time);
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ TESTING("B-tree update: create random level 4 B-tree");
+
+ /* Allocate space for the records */
+ if(NULL == (records = (H5B2_test_rec_t *)HDmalloc(sizeof(H5B2_test_rec_t) * INSERT_MANY_REC)))
+ TEST_ERROR
+
+ /* Initialize record #'s */
+ for(u = 0; u < INSERT_MANY_REC; u++) {
+ records[u].key = u;
+ records[u].val = u * 2;
+ } /* end for */
+
+ /* Shuffle record #'s */
+ for(u = 0; u < INSERT_MANY_REC; u++) {
+ H5B2_test_rec_t temp_rec; /* Temporary record */
+ unsigned swap_idx; /* Location to swap with when shuffling */
+
+ swap_idx = ((unsigned)HDrandom() % (INSERT_MANY_REC - u)) + u;
+ temp_rec = records[u];
+ records[u] = records[swap_idx];
+ records[swap_idx] = temp_rec;
+ } /* end for */
+
+ /* Create the file for the test */
+ if(create_file(&file, &f, fapl) < 0)
+ TEST_ERROR
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ TEST_ERROR
+
+ /* Insert random records */
+ for(u = 0; u < INSERT_MANY_REC; u++) {
+ record = records[u];
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 4;
+ bt2_stat.nrecords = INSERT_MANY_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ /* Close file */
+ if(H5Fclose(file) < 0)
+ STACK_ERROR
+ file = -1;
+
+ /* Re-open the file for the test */
+ if(reopen_file(&file, &f, fapl) < 0)
+ TEST_ERROR
+
+ /* Re-open v2 B-tree */
+ if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f)))
+ FAIL_STACK_ERROR
+
+ /* Check up on B-tree after re-open */
+ bt2_stat.depth = 4;
+ bt2_stat.nrecords = INSERT_MANY_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+
+ /* Iterate over B-tree to check records have been inserted correctly */
+ iter.key = 0;
+ iter.val = 0;
+ if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &iter) < 0)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the index is correct */
+ if(iter.key != INSERT_MANY_REC)
+ TEST_ERROR
+
+ /* Attempt to find non-existant record in level-4 B-tree */
+ /* (Should not be found, but not fail) */
+ find.key = INSERT_MANY_REC * 2;
+ find.val = (hsize_t)-1;
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE)
+ TEST_ERROR
+ if(find.val != (hsize_t)-1)
+ TEST_ERROR
+
+ /* Find random records */
+ for(u = 0; u < FIND_MANY_REC; u++) {
+ /* Pick random record */
+ find.key = (hsize_t)(HDrandom() % INSERT_MANY_REC);
+ find.val = (hsize_t)-1;
+
+ /* Attempt to find existant record in level-4 B-tree */
+ if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ FAIL_STACK_ERROR
+ if(find.val != (find.key * 2))
+ TEST_ERROR
+ } /* end for */
+
+ /* Attempt to index non-existant record in level-4 B-tree, in increasing & decreasing order */
+ H5E_BEGIN_TRY {
+ ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_MANY_REC * 3), find_rec_cb, NULL);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+ H5E_BEGIN_TRY {
+ ret = H5B2_index(bt2, dxpl, H5_ITER_DEC, (hsize_t)(INSERT_MANY_REC * 3), find_rec_cb, NULL);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+
+ /* Find random records */
+ for(u = 0; u < FIND_MANY_REC; u++) {
+ hsize_t idx; /* Record index */
+
+ /* Pick random record */
+ idx = (hsize_t)(HDrandom() % INSERT_MANY_REC);
+
+ /* Reset find record */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+
+ /* Attempt to find existant record in level-4 B-tree */
+ /* (in increasing order) */
+ if(H5B2_index(bt2, dxpl, H5_ITER_INC, idx, index_rec_cb, &find) < 0)
+ FAIL_STACK_ERROR
+ if(find.key != idx)
+ TEST_ERROR
+ if(find.val != (find.key * 2))
+ TEST_ERROR
+
+ /* Reset find record */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+
+ /* Attempt to find existant record in level-4 B-tree */
+ /* (in decreasing order) */
+ if(H5B2_index(bt2, dxpl, H5_ITER_DEC, idx, index_rec_cb, &find) < 0)
+ FAIL_STACK_ERROR
+ if(find.key != (INSERT_MANY_REC - (idx + 1)))
+ TEST_ERROR
+ if(find.val != (find.key * 2))
+ TEST_ERROR
+ } /* end for */
+
+ PASSED();
+
+ TESTING("B-tree update: update record in level 4 B-tree");
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ record.key = INSERT_MANY_REC / 2;
+ modify.key = INSERT_MANY_REC / 2;
+ modify.val = record.key * 3;
+ if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0)
+ FAIL_STACK_ERROR
+
+ /* Query the number of records in the B-tree */
+ if(H5B2_get_nrec(bt2, &nrec) < 0)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the # of records is correct */
+ if(nrec != INSERT_MANY_REC)
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ /* Close file */
+ if(H5Fclose(file) < 0)
+ TEST_ERROR
+
+ PASSED();
+
+ HDfree(records);
+
+ return 0;
+
+error:
+ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
+ H5E_BEGIN_TRY {
+ if(bt2)
+ H5B2_close(bt2, dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ HDfree(records);
+
+ return 1;
+} /* test_update_lots() */
+
+
+/*-------------------------------------------------------------------------
* Function: test_remove_basic
*
* Purpose: Basic tests for the B-tree v2 code
@@ -3365,13 +5604,13 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
/* Check up on B-tree */
record = 62; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 94; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = (INSERT_SPLIT_ROOT_NREC * 2) - 2;
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
rrecord = 0;
@@ -3384,10 +5623,10 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
/* Make certain that the leaf nodes didn't redistribute */
record = 62; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 94; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -3409,7 +5648,7 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
/* Check up on B-tree */
record = 0;
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
rrecord = 1;
@@ -3422,10 +5661,10 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
/* Make certain that the leaf nodes didn't redistribute */
record = 62; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 94; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -3447,7 +5686,7 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
/* Check up on B-tree */
record = INSERT_SPLIT_ROOT_NREC;
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
rrecord = 0;
@@ -3460,10 +5699,10 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
/* Make certain that the leaf nodes didn't redistribute */
record = 62; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 94; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -3545,10 +5784,10 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 62; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 94; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -3593,10 +5832,10 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 62; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 90; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
PASSED();
@@ -3629,10 +5868,10 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 64; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 90; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
PASSED();
@@ -3665,10 +5904,10 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 64; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 91; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
@@ -3742,7 +5981,7 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 62; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
@@ -3815,7 +6054,7 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 62; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
@@ -3921,7 +6160,7 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 62; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
@@ -4047,13 +6286,13 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 62; /* Left-most record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 125; /* Center-Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 188; /* Center-Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 4;
@@ -4093,13 +6332,13 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 62; /* Left-most record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 125; /* Center-Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 188; /* Center-Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 4;
@@ -4139,13 +6378,13 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 63; /* Left-most record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 125; /* Center-Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 188; /* Center-Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 4;
@@ -4181,13 +6420,13 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 63; /* Left-most record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 126; /* Center-Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 188; /* Center-Right record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 4;
@@ -4274,7 +6513,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
/* Check record values in root of B-tree */
record = 62; /* Left-most record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
@@ -4335,7 +6574,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
/* Check record values in root of B-tree */
record = 62; /* Left-most record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
@@ -4422,7 +6661,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
/* Check record values in root of B-tree */
record = 62; /* Left-most record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
@@ -4483,7 +6722,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
/* Check record values in root of B-tree */
record = 39; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
@@ -4570,7 +6809,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 62; /* Left-most record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
@@ -4715,7 +6954,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 62; /* Left-most record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
@@ -4999,7 +7238,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
@@ -5285,7 +7524,7 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t *
/* Check record values in root of B-tree */
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
@@ -5435,7 +7674,7 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t *
/* Check record values in root of B-tree */
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
@@ -5585,7 +7824,7 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar
/* Check record values in root of B-tree */
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
@@ -5736,7 +7975,7 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar
/* Check record values in root of B-tree */
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
@@ -5887,7 +8126,7 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
@@ -6013,7 +8252,7 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam
/* Check record values in root of B-tree */
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
@@ -6139,7 +8378,7 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
@@ -6266,7 +8505,7 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
@@ -7750,7 +9989,7 @@ error:
int
main(void)
{
- H5B2_create_t cparam; /* Creation parameters for v2 B-tree */
+ H5B2_create_t cparam, cparam2; /* Creation parameters for v2 B-tree */
bt2_test_param_t tparam; /* Test parameters for v2 B-tree */
hid_t fapl = -1; /* File access property list for data files */
unsigned nerrors = 0; /* Cumulative error count */
@@ -7770,8 +10009,7 @@ main(void)
printf("***Express test mode on. Some tests may be skipped\n");
/* Initialize v2 B-tree creation parameters */
- init_cparam(&cparam);
-
+ init_cparam(&cparam, &cparam2);
/* Loop over re-opening B-tree during tests */
for(reopen = FALSE; reopen <= TRUE; reopen++) {
@@ -7785,7 +10023,7 @@ main(void)
} /* end else */
/* Test B-tree record insertion */
- /* Iteration, find & index routines tested in these routines as well */
+ /* (Iteration, find & index routines exercised in these routines as well) */
nerrors += test_insert_basic(fapl, &cparam, &tparam);
nerrors += test_insert_split_root(fapl, &cparam, &tparam);
nerrors += test_insert_level1_2leaf_redistrib(fapl, &cparam, &tparam);
@@ -7804,6 +10042,20 @@ main(void)
else
nerrors += test_insert_lots(fapl, &cparam, &tparam);
+ /* Test B-tree record update (ie. insert/modify) */
+ /* (Iteration, find & index routines exercised in these routines as well) */
+ nerrors += test_update_basic(fapl, &cparam2, &tparam);
+ nerrors += test_update_split_root(fapl, &cparam2, &tparam);
+ nerrors += test_update_level1_2leaf_redistrib(fapl, &cparam2, &tparam);
+ nerrors += test_update_level1_side_split(fapl, &cparam2, &tparam);
+ nerrors += test_update_level1_3leaf_redistrib(fapl, &cparam2, &tparam);
+ nerrors += test_update_level1_middle_split(fapl, &cparam2, &tparam);
+ nerrors += test_update_make_level2(fapl, &cparam2, &tparam);
+ if(ExpressMode > 1)
+ printf("***Express test mode on. test_update_lots skipped\n");
+ else
+ nerrors += test_update_lots(fapl, &cparam2, &tparam);
+
/* Test B-tree record removal */
/* Querying the number of records routine also tested in these routines as well */
nerrors += test_remove_basic(fapl, &cparam, &tparam);
diff --git a/test/cache_common.c b/test/cache_common.c
index 0433f1c..7cbe561 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -3600,7 +3600,7 @@ insert_entry(H5F_t * file_ptr,
{
H5C_t * cache_ptr;
herr_t result;
- hid_t xfer = H5AC_ind_dxpl_id;
+ hid_t xfer = H5AC_dxpl_id;
hbool_t insert_pinned;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -3887,7 +3887,7 @@ protect_entry(H5F_t * file_ptr,
test_entry_t * base_addr;
test_entry_t * entry_ptr;
haddr_t baddrs;
- hid_t xfer = H5AC_ind_dxpl_id;
+ hid_t xfer = H5AC_dxpl_id;
H5C_cache_entry_t * cache_entry_ptr;
if ( pass ) {
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 470f7a1..4a1e7ae 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -3866,26 +3866,26 @@ check_invalid_tag_application(void)
/* Call H5HL_create, an internal function that calls H5AC_insert_entry without setting up a tag */
/* Ensure this returns FAILURE, as a tag has not been set up. */
- if ( H5HL_create(f, H5AC_ind_dxpl_id, (size_t)1024, &addr) >= 0) TEST_ERROR;
+ if ( H5HL_create(f, H5AC_dxpl_id, (size_t)1024, &addr) >= 0) TEST_ERROR;
/* Now set up a tag in the dxpl */
- if ( H5AC_tag(H5AC_ind_dxpl_id, (haddr_t)25, NULL) < 0) TEST_ERROR;
+ if ( H5AC_tag(H5AC_dxpl_id, (haddr_t)25, NULL) < 0) TEST_ERROR;
/* Verify the same call to H5HL_create now works as intended, with a tag set up. */
- if ( H5HL_create(f, H5AC_ind_dxpl_id, (size_t)1024, &addr) < 0) TEST_ERROR;
+ if ( H5HL_create(f, H5AC_dxpl_id, (size_t)1024, &addr) < 0) TEST_ERROR;
/* Reset dxpl to use invalid tag. */
- if ( H5AC_tag(H5AC_ind_dxpl_id, H5AC__INVALID_TAG, NULL) < 0) TEST_ERROR;
+ if ( H5AC_tag(H5AC_dxpl_id, H5AC__INVALID_TAG, NULL) < 0) TEST_ERROR;
/* Call H5HL_protect to protect the local heap created above. */
/* This should fail as no tag is set up during the protect call */
- if (( lheap = H5HL_protect(f, H5AC_ind_dxpl_id, addr, H5AC__NO_FLAGS_SET)) != NULL ) TEST_ERROR;
+ if (( lheap = H5HL_protect(f, H5AC_dxpl_id, addr, H5AC__NO_FLAGS_SET)) != NULL ) TEST_ERROR;
/* Again, set up a valid tag in the DXPL */
- if ( H5AC_tag(H5AC_ind_dxpl_id, (haddr_t)25, NULL) < 0) TEST_ERROR;
+ if ( H5AC_tag(H5AC_dxpl_id, (haddr_t)25, NULL) < 0) TEST_ERROR;
/* Call H5HL_protect again to protect the local heap. This should succeed. */
- if (( lheap = H5HL_protect(f, H5AC_ind_dxpl_id, addr, H5AC__NO_FLAGS_SET)) == NULL ) TEST_ERROR;
+ if (( lheap = H5HL_protect(f, H5AC_dxpl_id, addr, H5AC__NO_FLAGS_SET)) == NULL ) TEST_ERROR;
/* Now unprotect the heap, as we're done with the test. */
if ( H5HL_unprotect(lheap) < 0 ) TEST_ERROR;
diff --git a/test/dsets.c b/test/dsets.c
index 4b7123d..e06d81d 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -66,6 +66,7 @@ const char *FILENAME[] = {
"earray_hdr_fd", /* 19 */
"farray_hdr_fd", /* 20 */
"bt2_hdr_fd", /* 21 */
+ "dls_01_strings.h5",/* 22 */ /* used by dls_01 test only */
NULL
};
#define FILENAME_BUF_SIZE 1024
@@ -11766,6 +11767,278 @@ error:
return -1;
} /* end test_gather_error() */
+/*-------------------------------------------------------------------------
+ * DLS bug -- HDFFV-9672
+ *
+ * The following functions replicate the test code provided by DLS to
+ * expose bug hdffv-9672. All functions associated with this test
+ * have the prefix DLS_01_
+ *
+ * The note documenting the bug is reproduced below:
+ *
+ * ------------------------------------------------------
+ *
+ * Hi,
+ * We've found an issue regarding fixed length strings.
+ *
+ * If we create a chunked dataset of large fixed length strings
+ * (up to 1kb per string) with small chunk sizes (~8 elements per
+ * chunk) then the resulting dataset may not be read later.
+ * This only happens if the file is created with LIBVER_LATEST
+ * for the version bounds.
+ *
+ * Calling H5Oget_info(...) on the dataset results in the following:
+ *
+ * H5Dearray.c:250: H5D__earray_crt_context: Assertion
+ * `udata->chunk_size > 0' failed.
+ *
+ * Example:
+ * void create_data(...)
+ * {
+ * ...
+ *
+ * hsize_t chunks[1] = {8} ;
+ *
+ * err = H5Tset_size( tid, 256 );
+ *
+ * err = H5Pset_chunk( dcpl, 1, chunks );
+ *
+ * H5Dcreate2( fid, "data", tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT );
+ *
+ * // write data
+ * }
+ *
+ * void read_data(...)
+ * {
+ * ...
+ *
+ * H5O_into_t info; status = H5Oget_info( did, &info ) // crash
+ * ...
+ * }
+ *
+ * If the size of the chunk is increased (usually matching the
+ * string length) then this problem disappears.
+ *
+ * A full program that produces such a file (and crashes trying to
+ * read it) is attached.
+ *
+ * Tested with 1.10.0-alpha1.
+ *
+ * Regards,
+ *
+ * Charles Mita
+ * Software Engineer
+ * Diamond Light Source Ltd.
+ * +44 1235 778029
+ *
+ * ------------------------------------------------------
+ *
+ * The bug in question turned out to be caused by a failure to update
+ * the enc_bytes_per_dim field in the layout if the size of the
+ * underlying type required more bytes to encode than any of the
+ * chunk dimensions.
+ *
+ * At least in debug builds, the following test code exposes the
+ * failure via an assertion failure.
+ *
+ * Note that the test code make no attempt to run with different
+ * file drivers, as the bug is in the actual on disk encoding of
+ * the chunk layout.
+ *
+ * JRM -- 2/5/16
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#define DLS_01_DATASET "data"
+#define DLS_01_STR_SIZE 256
+#define DLS_01_CHUNK_SIZE 8
+#define DLS_01_DIMS 4
+
+static herr_t dls_01_setup_file( hid_t fid );
+static herr_t dls_01_write_data( hid_t fid, char* buffer );
+static herr_t dls_01_read_stuff( hid_t fid );
+static herr_t dls_01_main( void );
+
+static herr_t
+dls_01_setup_file( hid_t fid ) {
+
+ int status = 0;
+ hid_t sid = 0, did = 0, tid = 0, dcpl = 0;
+ int ndims = 1;
+ hsize_t max_shape[1] = {H5S_UNLIMITED};
+ hsize_t initial_shape[1] = {0};
+ hsize_t chunks[1] = {DLS_01_CHUNK_SIZE};
+
+ sid = H5Screate_simple( ndims, initial_shape, max_shape );
+ if ( sid <= 0 ) TEST_ERROR
+
+ tid = H5Tcopy( H5T_C_S1 );
+ if ( tid <= 0 ) TEST_ERROR
+
+ status = H5Tset_size( tid, DLS_01_STR_SIZE );
+ if ( status != 0 ) TEST_ERROR
+
+ dcpl = H5Pcreate( H5P_DATASET_CREATE );
+ if ( dcpl <= 0 ) TEST_ERROR
+
+ status = H5Pset_chunk( dcpl, ndims, chunks );
+ if ( status != 0 ) TEST_ERROR
+
+ did = H5Dcreate2( fid, DLS_01_DATASET, tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT );
+ if ( did <= 0 ) TEST_ERROR
+
+ status = H5Dclose( did );
+ if ( status != 0 ) TEST_ERROR
+
+ status = H5Pclose( dcpl );
+ if ( status != 0 ) TEST_ERROR
+
+ status = H5Tclose( tid );
+ if ( status != 0 ) TEST_ERROR
+
+ status = H5Sclose( sid );
+ if ( status != 0 ) TEST_ERROR
+
+ return 0;
+
+error:
+
+ return -1;
+
+} /* dls_01_setup_file */
+
+static herr_t
+dls_01_write_data( hid_t fid, char* buffer ) {
+
+ int status = 0;
+ hid_t did = 0, tid = 0;
+ hsize_t extent[1] = {4};
+
+ did = H5Dopen2( fid, DLS_01_DATASET, H5P_DEFAULT );
+ if ( did <= 0 ) TEST_ERROR
+
+ tid = H5Dget_type( did );
+ if ( tid <= 0 ) TEST_ERROR
+
+ status = H5Dset_extent( did, extent );
+ if ( status != 0 ) TEST_ERROR
+
+ status = H5Dwrite( did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buffer );
+ if ( status != 0 ) TEST_ERROR
+
+ status = H5Fflush( fid, H5F_SCOPE_LOCAL );
+ if ( status != 0 ) TEST_ERROR
+
+ status = H5Tclose( tid );
+ if ( status != 0 ) TEST_ERROR
+
+ status = H5Dclose( did );
+ if ( status != 0 ) TEST_ERROR
+
+ return 0;
+
+error:
+
+ return -1;
+
+} /* dls_01_write_data */
+
+static herr_t
+dls_01_read_stuff( hid_t fid ) {
+
+ int status = 0;
+ hid_t did = 0;
+ H5O_info_t info;
+
+ did = H5Dopen2( fid, DLS_01_DATASET, H5P_DEFAULT );
+ if ( did <= 0 ) TEST_ERROR
+
+ status = H5Oget_info( did, &info );
+ if ( status != 0 ) TEST_ERROR
+
+ status = H5Dclose( did );
+ if ( status != 0 ) TEST_ERROR
+
+ return 0;
+
+error:
+
+ return -1;
+
+} /* dls_01_read_stuff() */
+
+static herr_t
+dls_01_main( void ) {
+
+ char filename[512];
+ int status = 0;
+ hid_t fapl = 0, fid = 0;
+ const char* strings[DLS_01_DIMS] =
+ { "String 1", "Test string 2", "Another string", "Final String" };
+ char* buffer = NULL;
+
+ TESTING("Testing DLS bugfix 1");
+
+ if ( NULL == h5_fixname(FILENAME[22], H5P_DEFAULT, filename,
+ sizeof(filename)) )
+ TEST_ERROR
+
+ buffer = (char *)HDcalloc( DLS_01_DIMS, DLS_01_STR_SIZE );
+ if ( NULL == buffer )
+ TEST_ERROR
+
+ HDstrcpy( buffer, strings[0] );
+ HDstrcpy( buffer + DLS_01_STR_SIZE, strings[1] );
+ HDstrcpy( buffer + DLS_01_STR_SIZE * 2, strings[2] );
+ HDstrcpy( buffer + DLS_01_STR_SIZE * 3, strings[3] );
+
+ fapl = H5Pcreate( H5P_FILE_ACCESS );
+ if ( fapl <= 0 ) TEST_ERROR
+
+ status = H5Pset_libver_bounds( fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST );
+ if ( status != 0 ) TEST_ERROR
+
+ fid = H5Fcreate( filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl );
+ if ( fid <= 0 ) TEST_ERROR
+
+ if ( 0 != dls_01_setup_file( fid ) )
+ goto error;
+
+ if ( 0 != dls_01_write_data( fid, buffer ) )
+ goto error;
+
+ status = H5Fclose( fid );
+ if ( status != 0 ) TEST_ERROR
+
+ fid = H5Fopen( filename, H5F_ACC_RDONLY, fapl );
+ if ( fid <= 0 ) TEST_ERROR
+
+ if ( 0 != dls_01_read_stuff( fid ) )
+ goto error;
+
+ status = H5Fclose( fid );
+ if ( status != 0 ) TEST_ERROR
+
+ status = H5Pclose( fapl );
+ if ( status != 0 ) TEST_ERROR
+
+ HDfree(buffer);
+
+ PASSED();
+
+ return 0;
+
+error:
+
+ if ( buffer ) HDfree(buffer);
+
+ return -1;
+
+} /* dls_01_main() */
+
+
+
/*-------------------------------------------------------------------------
* Function: main
@@ -11920,6 +12193,9 @@ main(void)
nerrors += (test_scatter_error() < 0 ? 1 : 0);
nerrors += (test_gather_error() < 0 ? 1 : 0);
+ /* Run misc tests */
+ nerrors += dls_01_main();
+
/* Verify symbol table messages are cached */
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
diff --git a/test/dtypes.c b/test/dtypes.c
index 326294f..984b6c6 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -1789,6 +1789,13 @@ test_compound_9(void)
goto error;
} /* end if */
+ if(H5Dvlen_reclaim(dup_tid, space_id, H5P_DEFAULT, &rdata) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
+ rdata.str = NULL;
+
if(H5Dclose(dset_id) < 0)
goto error;
if(H5Tclose(cmpd_tid) < 0)
@@ -1815,6 +1822,12 @@ test_compound_9(void)
goto error;
} /* end if */
+ if((space_id = H5Dget_space(dset_id)) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't get space\n");
+ goto error;
+ } /* end if */
+
if((cmpd_tid = H5Dget_type(dset_id)) < 0) {
H5_FAILED(); AT();
printf("cannot open dataset\n");
@@ -1842,10 +1855,19 @@ test_compound_9(void)
goto error;
} /* end if */
+ if(H5Dvlen_reclaim(dup_tid, space_id, H5P_DEFAULT, &rdata) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't read data\n");
+ goto error;
+ } /* end if */
+ rdata.str = NULL;
+
if(rdata.str) HDfree(rdata.str);
if(H5Dclose(dset_id) < 0)
goto error;
+ if(H5Sclose(space_id) < 0)
+ goto error;
if(H5Tclose(cmpd_tid) < 0)
goto error;
if(H5Tclose(dup_tid) < 0)
@@ -2020,12 +2042,17 @@ test_compound_10(void)
printf("incorrect VL read data\n");
goto error;
}
-
- HDfree(t1);
- HDfree(t2);
- HDfree(wdata[i].str);
- HDfree(rdata[i].str);
} /* end for */
+ if(H5Dvlen_reclaim(arr_tid, space_id, H5P_DEFAULT, &rdata) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
+ if(H5Dvlen_reclaim(arr_tid, space_id, H5P_DEFAULT, &wdata) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
if(H5Dclose(dset_id) < 0)
goto error;
@@ -2090,6 +2117,8 @@ test_compound_11(void)
hid_t big_tid, little_tid; /* Datatype IDs for type conversion */
hid_t big_tid2, little_tid2; /* Datatype IDs for type conversion */
hid_t opaq_src_tid, opaq_dst_tid; /* Datatype IDs for type conversion */
+ hid_t space_id; /* Dataspace for buffer elements */
+ hsize_t dim[1]; /* Dimensions for dataspace */
void *buf = NULL; /* Conversion buffer */
void *buf_orig = NULL; /* Copy of original conversion buffer */
void *bkg = NULL; /* Background buffer */
@@ -2138,6 +2167,13 @@ test_compound_11(void)
/* Make copy of buffer before conversion */
HDmemcpy(buf_orig,buf,sizeof(big_t)*NTESTELEM);
+ dim[0] = NTESTELEM;
+ if((space_id = H5Screate_simple(1, dim, NULL)) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't create space\n");
+ goto error;
+ } /* end if */
+
/* Make copies of the 'big' and 'little' datatypes, so the type
* conversion routine doesn't use the same ones this time and next time
*/
@@ -2169,8 +2205,12 @@ test_compound_11(void)
(unsigned)u,((big_t *)buf_orig)[u].s1,(unsigned)u,((little_t *)buf)[u].s1);
TEST_ERROR
} /* end if */
- HDfree(((little_t *)buf)[u].s1);
} /* end for */
+ if(H5Dvlen_reclaim(little_tid2, space_id, H5P_DEFAULT, buf) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim data\n");
+ goto error;
+ } /* end if */
/* Build source and destination types for conversion routine */
if((opaq_src_tid=H5Tcreate(H5T_OPAQUE, (size_t)4)) < 0) TEST_ERROR
@@ -2209,8 +2249,12 @@ test_compound_11(void)
(unsigned)u,((big_t *)buf_orig)[u].s1,(unsigned)u,((little_t *)buf)[u].s1);
TEST_ERROR
} /* end if */
- HDfree(((little_t *)buf)[u].s1);
} /* end for */
+ if(H5Dvlen_reclaim(little_tid, space_id, H5P_DEFAULT, buf) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim data\n");
+ goto error;
+ } /* end if */
/* Unregister the conversion routine */
if(H5Tunregister(H5T_PERS_HARD, "opaq_test", opaq_src_tid, opaq_dst_tid, convert_opaque) < 0) TEST_ERROR
@@ -2243,12 +2287,17 @@ test_compound_11(void)
(unsigned)u,((big_t *)buf_orig)[u].s1,(unsigned)u,((little_t *)buf)[u].s1);
TEST_ERROR
} /* end if */
- HDfree(((little_t *)buf)[u].s1);
} /* end for */
+ if(H5Dvlen_reclaim(little_tid, space_id, H5P_DEFAULT, buf) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim data\n");
+ goto error;
+ } /* end if */
/* Free everything */
for(u=0; u<NTESTELEM; u++)
HDfree(((big_t *)buf_orig)[u].s1);
+ if(H5Sclose(space_id) < 0) TEST_ERROR
if(H5Tclose(opaq_dst_tid) < 0) TEST_ERROR
if(H5Tclose(opaq_src_tid) < 0) TEST_ERROR
if(H5Tclose(little_tid2) < 0) TEST_ERROR
@@ -2727,6 +2776,18 @@ test_compound_14(void)
goto error;
} /* end if */
+ if(H5Dvlen_reclaim(cmpd_m1_tid, space_id, H5P_DEFAULT, &rdata1) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
+ rdata1.str = NULL;
+ if(H5Dvlen_reclaim(cmpd_m2_tid, space_id, H5P_DEFAULT, &rdata2) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
+ rdata2.str = NULL;
if(H5Dclose(dset1_id) < 0)
goto error;
if(H5Dclose(dset2_id) < 0)
@@ -2761,6 +2822,12 @@ test_compound_14(void)
goto error;
} /* end if */
+ if((space_id = H5Dget_space(dset2_id)) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't get space\n");
+ goto error;
+ } /* end if */
+
rdata1.c1 = rdata1.c2 = 0;
if(rdata1.str) HDfree(rdata1.str);
@@ -2796,13 +2863,25 @@ test_compound_14(void)
goto error;
} /* end if */
- if(rdata1.str) HDfree(rdata1.str);
- if(rdata2.str) HDfree(rdata2.str);
+ if(H5Dvlen_reclaim(cmpd_m1_tid, space_id, H5P_DEFAULT, &rdata1) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
+ rdata1.str = NULL;
+ if(H5Dvlen_reclaim(cmpd_m2_tid, space_id, H5P_DEFAULT, &rdata2) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
+ rdata2.str = NULL;
if(H5Dclose(dset1_id) < 0)
goto error;
if(H5Dclose(dset2_id) < 0)
goto error;
+ if(H5Sclose(space_id) < 0)
+ goto error;
if(H5Tclose(cmpd_m1_tid) < 0)
goto error;
if(H5Tclose(cmpd_m2_tid) < 0)
diff --git a/test/external.c b/test/external.c
index cbc9fc6..181f43b 100644
--- a/test/external.c
+++ b/test/external.c
@@ -17,977 +17,955 @@
* Programmer: Robb Matzke <matzke@llnl.gov>
* Tuesday, March 3, 1998
*
- * Purpose: Tests datasets stored in external raw files.
+ * Purpose: Tests datasets stored in external raw files.
*/
#include "h5test.h"
-#include "H5srcdir.h"
-
-/* File for external link test. Created with gen_udlinks.c */
-#define LINKED_FILE "be_extlink2.h5"
const char *FILENAME[] = {
"extern_1",
"extern_2",
"extern_3",
- "extern_4",
NULL
};
/*-------------------------------------------------------------------------
- * Function: same_contents
- *
- * Purpose: Determines whether two files are exactly the same.
+ * Function: files_have_same_contents
*
- * Return: Success: nonzero if same, zero if different.
+ * Purpose: Determines whether two files contain the same data.
*
- * Failure: zero
+ * Return: Success: nonzero if same, zero if different.
+ * Failure: zero
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, March 4, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-static int
-same_contents (const char *name1, const char *name2)
+static hbool_t
+files_have_same_contents(const char *name1, const char *name2)
{
- int fd1, fd2;
- ssize_t n1, n2;
- char buf1[1024], buf2[1024];
+ int fd1 = 0, fd2 = 0;
+ ssize_t n1, n2;
+ char buf1[1024], buf2[1024];
+ hbool_t ret = false; /* not equal until proven otherwise */
- fd1 = HDopen(name1, O_RDONLY, 0666);
- fd2 = HDopen(name2, O_RDONLY, 0666);
- assert(fd1 >= 0 && fd2 >= 0);
+ if((fd1 = HDopen(name1, O_RDONLY, 0666)) < 0)
+ goto out;
+ if((fd2 = HDopen(name2, O_RDONLY, 0666)) < 0)
+ goto out;
+ /* Loop until files are empty or we encounter a problem */
while(1) {
- /* Asserts will catch negative return values */
+ HDmemset(buf1, 0, sizeof(buf1));
+ HDmemset(buf2, 0, sizeof(buf2));
+
n1 = HDread(fd1, buf1, sizeof(buf1));
+ if(n1 < 0 || (size_t)n1 > sizeof(buf1))
+ break;
n2 = HDread(fd2, buf2, sizeof(buf2));
- assert(n1 >= 0 && (size_t)n1 <= sizeof(buf1));
- assert(n2 >= 0 && (size_t)n2 <= sizeof(buf2));
- assert(n1 == n2);
+ if(n2 < 0 || (size_t)n2 > sizeof(buf2))
+ break;
+
+ if(n1 != n2)
+ break;
- if(n1 == 0 && n2 == 0)
+ if(n1 == 0 && n2 == 0) {
+ ret = true;
break;
- if(HDmemcmp(buf1, buf2, (size_t)n1)) {
- HDclose(fd1);
- HDclose(fd2);
- return 0;
}
- }
- HDclose(fd1);
- HDclose(fd2);
- return 1;
-}
+
+ if(HDmemcmp(buf1, buf2, (size_t)n1))
+ break;
+
+ } /* end while */
+
+out:
+ if(fd1)
+ HDclose(fd1);
+ if(fd2)
+ HDclose(fd2);
+ return ret;
+} /* end files_have_same_contents() */
/*-------------------------------------------------------------------------
- * Function: test_1a
+ * Function: test_non_extendible
*
- * Purpose: Tests a non-extendible dataset with a single external file.
+ * Purpose: Tests a non-extendible dataset with a single external file.
*
- * Return: Success: 0
+ * Return: Success: 0
+ * Failure: 1
*
- * Failure: number of errors
- *
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, November 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_1a(hid_t file)
+test_non_extendible(hid_t file)
{
- hid_t dcpl=-1; /*dataset creation properties */
- hid_t space=-1; /*data space */
- hid_t dset=-1; /*dataset */
- hsize_t cur_size[1]; /*data space current size */
- hsize_t max_size[1]; /*data space maximum size */
- int n; /*number of external files */
- char name[256]; /*external file name */
- off_t file_offset; /*external file offset */
- hsize_t file_size; /*sizeof external file segment */
- haddr_t dset_addr; /*address of dataset */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t space = -1; /* data space */
+ hid_t dset = -1; /* dataset */
+ hsize_t cur_size[1]; /* data space current size */
+ hsize_t max_size[1]; /* data space maximum size */
+ int n; /* number of external files */
+ char name[256]; /* external file name */
+ off_t file_offset; /* external file offset */
+ hsize_t file_size; /* sizeof external file segment */
+ haddr_t dset_addr; /* address of dataset */
TESTING("fixed-size data space, exact storage");
/* Create the dataset */
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
cur_size[0] = max_size[0] = 100;
- if(H5Pset_external(dcpl, "ext1.data", (off_t)0,
- (hsize_t)(max_size[0] * sizeof(int))) < 0) goto error;
- if((space = H5Screate_simple(1, cur_size, max_size)) < 0) goto error;
+ if(H5Pset_external(dcpl, "ext1.data", (off_t)0, (hsize_t)(max_size[0] * sizeof(int))) < 0)
+ FAIL_STACK_ERROR
+ if((space = H5Screate_simple(1, cur_size, max_size)) < 0)
+ FAIL_STACK_ERROR
if((dset = H5Dcreate2(file, "dset1", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- goto error;
- if(H5Dclose(dset) < 0) goto error;
- if(H5Sclose(space) < 0) goto error;
- if(H5Pclose(dcpl) < 0) goto error;
+ FAIL_STACK_ERROR
+ if(H5Dclose(dset) < 0)
+ FAIL_STACK_ERROR
+ if(H5Sclose(space) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0)
+ FAIL_STACK_ERROR
/* Read dataset creation information */
- if((dset = H5Dopen2(file, "dset1", H5P_DEFAULT)) < 0) goto error;
+ if((dset = H5Dopen2(file, "dset1", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
/* Test dataset address. Should be undefined. */
H5E_BEGIN_TRY {
dset_addr = H5Dget_offset(dset);
} H5E_END_TRY;
- if(dset_addr != HADDR_UNDEF) goto error;
-
- if((dcpl = H5Dget_create_plist(dset)) < 0) goto error;
- if((n = H5Pget_external_count(dcpl)) < 0) goto error;
+ if(dset_addr != HADDR_UNDEF)
+ FAIL_STACK_ERROR
+
+ /* Check external count */
+ if((dcpl = H5Dget_create_plist(dset)) < 0)
+ FAIL_STACK_ERROR
+ if((n = H5Pget_external_count(dcpl)) < 0)
+ FAIL_STACK_ERROR
if(1 != n) {
- H5_FAILED();
- puts(" Returned external count is wrong.");
- printf(" got: %d\n ans: 1\n", n);
- goto error;
- }
+ H5_FAILED();
+ HDputs(" Returned external count is wrong.");
+ printf(" got: %d\n ans: 1\n", n);
+ goto error;
+ } /* end if */
+
HDstrcpy(name + sizeof(name) - 4, "...");
- if(H5Pget_external(dcpl, 0, sizeof(name) - 4, name, &file_offset,
- &file_size) < 0) goto error;
+ if(H5Pget_external(dcpl, 0, sizeof(name) - 4, name, &file_offset, &file_size) < 0)
+ FAIL_STACK_ERROR
+
+ /* Check file offset */
if(file_offset != 0) {
- H5_FAILED();
- puts(" Wrong file offset.");
- printf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
- goto error;
- }
+ H5_FAILED();
+ HDputs(" Wrong file offset.");
+ printf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
+ goto error;
+ } /* end if */
+
+ /* Check file size */
if(file_size != (max_size[0] * sizeof(int))) {
- H5_FAILED();
- puts(" Wrong file size.");
- printf(" got: %lu\n ans: %lu\n", (unsigned long)file_size,
- (unsigned long)max_size[0]*sizeof(int));
- goto error;
- }
- if (H5Pclose (dcpl) < 0) goto error;
- if (H5Dclose (dset) < 0) goto error;
+ H5_FAILED();
+ HDputs(" Wrong file size.");
+ printf(" got: %lu\n ans: %lu\n", (unsigned long)file_size, (unsigned long)max_size[0]*sizeof(int));
+ goto error;
+ } /* end if */
+
+ /* Done (dataspace was previously closed) */
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
PASSED();
return 0;
+
error:
H5E_BEGIN_TRY {
- H5Pclose(dcpl);
- H5Sclose(space);
- H5Dclose(dset);
+ H5Pclose(dcpl);
+ H5Sclose(space);
+ H5Dclose(dset);
} H5E_END_TRY;
return 1;
-}
+} /* end test_non_extendible() */
/*-------------------------------------------------------------------------
- * Function: test_1b
+ * Function: test_too_small
*
- * Purpose: Test a single external file which is too small to represent
- * all the data.
+ * Purpose: Test a single external file which is too small to represent
+ * all the data.
*
- * Return: Success: 0
+ * Return: Success: 0
+ * Failure: 1
*
- * Failure: number of errors
- *
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, November 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_1b(hid_t file)
+test_too_small(hid_t file)
{
- hid_t dcpl = -1; /*dataset creation properties */
- hid_t space = -1; /*data space */
- hid_t dset = -1; /*dataset */
- hsize_t cur_size[1]; /*current data space size */
- hsize_t max_size[1]; /*maximum data space size */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t space = -1; /* data space */
+ hid_t dset = -1; /* dataset */
+ hsize_t cur_size[1]; /* current data space size */
+ hsize_t max_size[1]; /* maximum data space size */
TESTING("external storage is too small");
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
cur_size[0] = max_size[0] = 100;
- if(H5Pset_external(dcpl, "ext1.data", (off_t)0,
- (hsize_t)(max_size[0] * sizeof(int) - 1)) < 0) goto error;
- if((space = H5Screate_simple(1, cur_size, max_size)) < 0) goto error;
+ if(H5Pset_external(dcpl, "ext1.data", (off_t)0, (hsize_t)(max_size[0] * sizeof(int) - 1)) < 0)
+ FAIL_STACK_ERROR
+ if((space = H5Screate_simple(1, cur_size, max_size)) < 0)
+ FAIL_STACK_ERROR
+
H5E_BEGIN_TRY {
- dset = H5Dcreate2(file, "dset2", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ dset = H5Dcreate2(file, "dset2", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
} H5E_END_TRY;
- if(dset >= 0) {
- H5_FAILED();
- puts(" Small external file succeeded instead of failing.");
- goto error;
- }
- if(H5Sclose(space) < 0) goto error;
- if(H5Pclose(dcpl) < 0) goto error;
+ if(dset >= 0)
+ FAIL_PUTS_ERROR(" Small external file succeeded instead of failing.");
+ if(H5Sclose(space) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0)
+ FAIL_STACK_ERROR
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Sclose(space);
- H5Pclose(dcpl);
- H5Dclose(dset);
+ H5Sclose(space);
+ H5Pclose(dcpl);
+ H5Dclose(dset);
} H5E_END_TRY;
return 1;
-}
+} /* end test_too_small() */
/*-------------------------------------------------------------------------
- * Function: test_1c
+ * Function: test_large_enough_current_eventual
*
- * Purpose: Test a single external file which is large enough to
- * represent the current data and large enough to represent the
- * eventual size of the data.
+ * Purpose: Test a single external file which is large enough to
+ * represent the current data and large enough to represent the
+ * eventual size of the data.
*
- * Return: Success: 0
+ * Return: Success: 0
+ * Failure: 1
*
- * Failure: number of errors
- *
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, November 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_1c(hid_t file)
+test_large_enough_current_eventual(hid_t file)
{
- hid_t dcpl=-1; /*dataset creation properties */
- hid_t space=-1; /*data space */
- hid_t dset=-1; /*dataset */
- hsize_t cur_size[1]; /*current data space size */
- hsize_t max_size[1]; /*maximum data space size */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t space = -1; /* data space */
+ hid_t dset = -1; /* dataset */
+ hsize_t cur_size[1]; /* current data space size */
+ hsize_t max_size[1]; /* maximum data space size */
TESTING("extendible dataspace, exact external size");
- if((dcpl = H5Pcreate (H5P_DATASET_CREATE)) < 0) goto error;
+ if((dcpl = H5Pcreate (H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
cur_size[0] = 100;
max_size[0] = 200;
- if(H5Pset_external(dcpl, "ext1.data", (off_t)0,
- (hsize_t)(max_size[0] * sizeof(int))) < 0) goto error;
- if((space = H5Screate_simple(1, cur_size, max_size)) < 0) goto error;
+ if(H5Pset_external(dcpl, "ext1.data", (off_t)0, (hsize_t)(max_size[0] * sizeof(int))) < 0)
+ FAIL_STACK_ERROR
+ if((space = H5Screate_simple(1, cur_size, max_size)) < 0)
+ FAIL_STACK_ERROR
if((dset = H5Dcreate2(file, "dset3", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- goto error;
- if(H5Dclose(dset) < 0) goto error;
- if(H5Sclose(space) < 0) goto error;
- if(H5Pclose(dcpl) < 0) goto error;
+ FAIL_STACK_ERROR
+
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(space) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Dclose(dset);
- H5Pclose(dcpl);
- H5Sclose(space);
+ H5Dclose(dset);
+ H5Pclose(dcpl);
+ H5Sclose(space);
} H5E_END_TRY;
return 1;
-}
+} /* end test_large_enough_current_eventual() */
/*-------------------------------------------------------------------------
- * Function: test_1d
- *
- * Purpose: Test a single external file which is large enough for the
- * current data size but not large enough for the eventual size.
+ * Function: test_large_enough_current_not_eventual
*
- * Return: Success: 0
+ * Purpose: Test a single external file which is large enough for the
+ * current data size but not large enough for the eventual size.
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, November 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_1d(hid_t file)
+test_large_enough_current_not_eventual(hid_t file)
{
- hid_t dcpl=-1; /*dataset creation properties */
- hid_t space=-1; /*data space */
- hid_t dset=-1; /*dataset */
- hsize_t cur_size[1]; /*current data space size */
- hsize_t max_size[1]; /*maximum data space size */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t space = -1; /* data space */
+ hid_t dset = -1; /* dataset */
+ hsize_t cur_size[1]; /* current data space size */
+ hsize_t max_size[1]; /* maximum data space size */
TESTING("extendible dataspace, external storage is too small");
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
cur_size[0] = 100;
max_size[0] = 200;
- if(H5Pset_external(dcpl, "ext1.data", (off_t)0,
- (hsize_t)(max_size[0] * sizeof(int) - 1)) < 0) goto error;
- if((space = H5Screate_simple(1, cur_size, max_size)) < 0) goto error;
+ if(H5Pset_external(dcpl, "ext1.data", (off_t)0, (hsize_t)(max_size[0] * sizeof(int) - 1)) < 0)
+ FAIL_STACK_ERROR
+ if((space = H5Screate_simple(1, cur_size, max_size)) < 0)
+ FAIL_STACK_ERROR
+
H5E_BEGIN_TRY {
- dset = H5Dcreate2(file, "dset4", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ dset = H5Dcreate2(file, "dset4", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
} H5E_END_TRY;
- if(dset >= 0) {
- H5_FAILED();
- puts(" Small external file succeeded instead of failing.");
- goto error;
- }
- if(H5Sclose(space) < 0) goto error;
- if(H5Pclose(dcpl) < 0) goto error;
+ if(dset >= 0)
+ FAIL_PUTS_ERROR(" Small external file succeeded instead of failing.");
+
+ if(H5Sclose(space) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Dclose(dset);
- H5Pclose(dcpl);
- H5Sclose(space);
+ H5Dclose(dset);
+ H5Pclose(dcpl);
+ H5Sclose(space);
} H5E_END_TRY;
return 1;
-}
+} /* end test_large_enough_current_not_eventual() */
/*-------------------------------------------------------------------------
- * Function: test_1e
- *
- * Purpose: Test a single external file of unlimited size and an
- * unlimited data space.
+ * Function: test_1e
*
- * Return: Success: 0
+ * Purpose: Test a single external file of unlimited size and an
+ * unlimited data space.
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, November 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_1e(hid_t file)
+test_unlimited(hid_t file)
{
- hid_t dcpl=-1; /*dataset creation properties */
- hid_t space=-1; /*data space */
- hid_t dset=-1; /*dataset */
- hsize_t cur_size[1]; /*data space current size */
- hsize_t max_size[1]; /*data space maximum size */
- int n; /*number of external files */
- char name[256]; /*external file name */
- off_t file_offset; /*external file offset */
- hsize_t file_size; /*sizeof external file segment */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t space = -1; /* data space */
+ hid_t dset = -1; /* dataset */
+ hsize_t cur_size[1]; /* data space current size */
+ hsize_t max_size[1]; /* data space maximum size */
+ int n; /* number of external files */
+ char name[256]; /* external file name */
+ off_t file_offset; /* external file offset */
+ hsize_t file_size; /* sizeof external file segment */
TESTING("unlimited dataspace, unlimited external storage");
/* Create dataset */
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
- if(H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED) < 0) goto error;
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED) < 0)
+ FAIL_STACK_ERROR
cur_size[0] = 100;
max_size[0] = H5S_UNLIMITED;
- if((space = H5Screate_simple(1, cur_size, max_size)) < 0) goto error;
+ if((space = H5Screate_simple(1, cur_size, max_size)) < 0)
+ FAIL_STACK_ERROR
if((dset = H5Dcreate2(file, "dset5", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- goto error;
- if(H5Dclose(dset) < 0) goto error;
- if(H5Sclose(space) < 0) goto error;
- if(H5Pclose(dcpl) < 0) goto error;
+ FAIL_STACK_ERROR
+
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(space) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
/* Read dataset creation information */
- if((dset = H5Dopen2(file, "dset5", H5P_DEFAULT)) < 0) goto error;
- if((dcpl = H5Dget_create_plist(dset)) < 0) goto error;
- if((n = H5Pget_external_count(dcpl)) < 0) goto error;
+ if((dset = H5Dopen2(file, "dset5", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ if((dcpl = H5Dget_create_plist(dset)) < 0)
+ FAIL_STACK_ERROR
+ if((n = H5Pget_external_count(dcpl)) < 0)
+ FAIL_STACK_ERROR
if(1 != n) {
- H5_FAILED();
- puts(" Returned external count is wrong.");
- printf(" got: %d\n ans: 1\n", n);
- goto error;
- }
+ H5_FAILED();
+ HDputs(" Returned external count is wrong.");
+ printf(" got: %d\n ans: 1\n", n);
+ goto error;
+ } /* end if */
+
HDstrcpy(name + sizeof(name) - 4, "...");
- if(H5Pget_external(dcpl, 0, sizeof(name) - 4, name, &file_offset,
- &file_size) < 0) goto error;
+ if(H5Pget_external(dcpl, 0, sizeof(name) - 4, name, &file_offset, &file_size) < 0)
+ FAIL_STACK_ERROR
if(file_offset != 0) {
- H5_FAILED();
- puts(" Wrong file offset.");
- printf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
- goto error;
- }
+ H5_FAILED();
+ HDputs(" Wrong file offset.");
+ printf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
+ goto error;
+ } /* end if */
+
if(H5F_UNLIMITED != file_size) {
- H5_FAILED();
- puts(" Wrong file size.");
- printf(" got: %lu\n ans: INF\n", (unsigned long)file_size);
- goto error;
- }
- if(H5Pclose(dcpl) < 0) goto error;
- if(H5Dclose(dset) < 0) goto error;
+ H5_FAILED();
+ HDputs(" Wrong file size.");
+ printf(" got: %lu\n ans: INF\n", (unsigned long)file_size);
+ goto error;
+ } /* end if */
+
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Dclose(dset);
- H5Pclose(dcpl);
- H5Sclose(space);
+ H5Dclose(dset);
+ H5Pclose(dcpl);
+ H5Sclose(space);
} H5E_END_TRY;
return 1;
-}
+} /* end test_unlimited() */
/*-------------------------------------------------------------------------
- * Function: test_1f
- *
- * Purpose: Test multiple external files for a dataset.
+ * Function: test_multiple_files
*
- * Return: Success: 0
+ * Purpose: Test multiple external files for a dataset.
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, November 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_1f(hid_t file)
+test_multiple_files(hid_t file)
{
- hid_t dcpl=-1; /*dataset creation properties */
- hid_t space=-1; /*data space */
- hid_t dset=-1; /*dataset */
- hsize_t cur_size[1]; /*data space current size */
- hsize_t max_size[1]; /*data space maximum size */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t space = -1; /* dataspace */
+ hid_t dset = -1; /* dataset */
+ hsize_t cur_size[1]; /* data space current size */
+ hsize_t max_size[1]; /* data space maximum size */
TESTING("multiple external files");
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+
cur_size[0] = max_size[0] = 100;
- if(H5Pset_external(dcpl, "ext1.data", (off_t)0,
- (hsize_t)(max_size[0]*sizeof(int)/4)) < 0) goto error;
- if(H5Pset_external(dcpl, "ext2.data", (off_t)0,
- (hsize_t)(max_size[0]*sizeof(int)/4)) < 0) goto error;
- if(H5Pset_external(dcpl, "ext3.data", (off_t)0,
- (hsize_t)(max_size[0]*sizeof(int)/4)) < 0) goto error;
- if(H5Pset_external(dcpl, "ext4.data", (off_t)0,
- (hsize_t)(max_size[0]*sizeof(int)/4)) < 0) goto error;
- if((space = H5Screate_simple(1, cur_size, max_size)) < 0) goto error;
+
+ if(H5Pset_external(dcpl, "ext1.data", (off_t)0, (hsize_t)(max_size[0]*sizeof(int)/4)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)(max_size[0]*sizeof(int)/4)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_external(dcpl, "ext3.data", (off_t)0, (hsize_t)(max_size[0]*sizeof(int)/4)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_external(dcpl, "ext4.data", (off_t)0, (hsize_t)(max_size[0]*sizeof(int)/4)) < 0)
+ FAIL_STACK_ERROR
+ if((space = H5Screate_simple(1, cur_size, max_size)) < 0)
+ FAIL_STACK_ERROR
if((dset = H5Dcreate2(file, "dset6", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- goto error;
- if(H5Dclose(dset) < 0) goto error;
- if(H5Sclose(space) < 0) goto error;
- if(H5Pclose(dcpl) < 0) goto error;
+ FAIL_STACK_ERROR
+
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(space) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Dclose(dset);
- H5Pclose(dcpl);
- H5Sclose(space);
+ H5Dclose(dset);
+ H5Pclose(dcpl);
+ H5Sclose(space);
} H5E_END_TRY;
return 1;
-}
+} /* end test_multiple_files() */
/*-------------------------------------------------------------------------
- * Function: test_1g
- *
- * Purpose: It should be impossible to define an unlimited external file
- * and then follow it with another external file.
+ * Function: test_add_to_unlimited
*
- * Return: Success: 0
+ * Purpose: It should be impossible to define an unlimited external file
+ * and then follow it with another external file.
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, November 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_1g(void)
+test_add_to_unlimited(void)
{
- hid_t dcpl=-1; /*dataset creation properties */
- herr_t status; /*function return status */
- int n; /*number of external files */
+ hid_t dcpl = -1; /* dataset creation properties */
+ herr_t status; /* function return status */
+ int n; /* number of external files */
TESTING("external file following unlimited file");
- if ((dcpl=H5Pcreate (H5P_DATASET_CREATE)) < 0) goto error;
- if (H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED) < 0) goto error;
+
+ if((dcpl = H5Pcreate (H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED) < 0)
+ FAIL_STACK_ERROR
+
H5E_BEGIN_TRY {
- status = H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)100);
+ status = H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)100);
} H5E_END_TRY;
- if (status>=0) {
- H5_FAILED();
- puts (" H5Pset_external() succeeded when it should have failed.");
- goto error;
- }
- if ((n = H5Pget_external_count(dcpl)) < 0) goto error;
- if (1!=n) {
- H5_FAILED();
- puts(" Wrong external file count returned.");
- goto error;
- }
- if (H5Pclose(dcpl) < 0) goto error;
+ if(status >= 0)
+ FAIL_PUTS_ERROR(" H5Pset_external() succeeded when it should have failed.");
+
+ if((n = H5Pget_external_count(dcpl)) < 0)
+ FAIL_STACK_ERROR
+ if(1 != n)
+ FAIL_PUTS_ERROR(" Wrong external file count returned.");
+
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Pclose(dcpl);
+ H5Pclose(dcpl);
} H5E_END_TRY;
return 1;
-}
+} /* end test_add_to_unlimited() */
/*-------------------------------------------------------------------------
- * Function: test_1h
+ * Function: test_overflow
*
- * Purpose: It should be impossible to create a set of external files
- * whose total size overflows a size_t integer.
+ * Purpose: It should be impossible to create a set of external files
+ * whose total size overflows a size_t integer.
*
- * Return: Success: 0
+ * Return: Success: 0
+ * Failure: 1
*
- * Failure: number of errors
- *
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, November 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_1h(void)
+test_overflow(void)
{
- hid_t dcpl=-1; /*dataset creation properties */
- herr_t status; /*return status */
+ hid_t dcpl = -1; /* dataset creation properties */
+ herr_t status; /* return status */
TESTING("address overflow in external files");
- if((dcpl=H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
- if (H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED-1) < 0) goto error;
+
+ if((dcpl=H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED-1) < 0)
+ FAIL_STACK_ERROR
+
H5E_BEGIN_TRY {
- status = H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)100);
+ status = H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)100);
} H5E_END_TRY;
- if (status>=0) {
- H5_FAILED();
- puts(" H5Pset_external() succeeded when it should have failed.");
- goto error;
- }
- if (H5Pclose(dcpl) < 0) goto error;
+ if(status >= 0)
+ FAIL_PUTS_ERROR(" H5Pset_external() succeeded when it should have failed.");
+
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
+
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Pclose(dcpl);
+ H5Pclose(dcpl);
} H5E_END_TRY;
return 1;
-}
+} /* end test_overflow() */
/*-------------------------------------------------------------------------
- * Function: test_2
+ * Function: test_read_file_set
*
- * Purpose: Tests reading from an external file set.
+ * Purpose: Tests reading from an external file set.
*
- * Return: Success: 0
+ * Return: Success: 0
+ * Failure: 1
*
- * Failure: number of errors
- *
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, March 4, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_2 (hid_t fapl)
+test_read_file_set(hid_t fapl)
{
- hid_t file=-1; /*file to write to */
- hid_t dcpl=-1; /*dataset creation properties */
- hid_t space=-1; /*data space */
- hid_t dset=-1; /*dataset */
- hid_t grp=-1; /*group to emit diagnostics */
- int fd; /*external file descriptors */
- size_t i, j; /*miscellaneous counters */
- hssize_t n; /*bytes of I/O */
- char filename[1024]; /*file names */
- int part[25], whole[100]; /*raw data buffers */
- hsize_t cur_size; /*current data space size */
- hid_t hs_space; /*hyperslab data space */
- hsize_t hs_start = 30; /*hyperslab starting offset */
- hsize_t hs_count = 25; /*hyperslab size */
- int temparray[10] = {0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f};
+ hid_t file = -1; /* file to write to */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t space = -1; /* data space */
+ hid_t dset = -1; /* dataset */
+ hid_t grp = -1; /* group to emit diagnostics */
+ int fd = -1; /* external file descriptors */
+ size_t i, j; /* miscellaneous counters */
+ hssize_t n; /* bytes of I/O */
+ char filename[1024]; /* file names */
+ int part[25], whole[100]; /* raw data buffers */
+ hsize_t cur_size; /* current data space size */
+ hid_t hs_space; /* hyperslab data space */
+ hsize_t hs_start = 30; /* hyperslab starting offset */
+ hsize_t hs_count = 25; /* hyperslab size */
+ int temparray[10] = {0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f};
TESTING("read external dataset");
/* Write the data to external files directly */
- for (i=0; i<4; i++) {
- for (j=0; j<25; j++) {
- part[j] = (int)(i*25+j);
- }
- sprintf (filename, "extern_%lua.raw", (unsigned long)i+1);
- fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, 0666);
- assert (fd>=0);
-/* n = lseek (fd, (off_t)(i*10), SEEK_SET);
-*/
- n = HDwrite(fd,temparray,(size_t)i*10);
- assert (n>=0 && (size_t)n==i*10);
- n = HDwrite(fd, part, sizeof(part));
- assert (n==sizeof(part));
- HDclose(fd);
- }
+ for(i=0; i<4; i++) {
+ for(j=0; j<25; j++) {
+ part[j] = (int)(i*25+j);
+ } /* end for */
+ HDsprintf(filename, "extern_%lua.raw", (unsigned long)i+1);
+ if((fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0)
+ TEST_ERROR
+ n = HDwrite(fd, temparray, (size_t)i*10);
+ if(n < 0 || (size_t)n != i*10)
+ TEST_ERROR
+ n = HDwrite(fd, part, sizeof(part));
+ if(n != sizeof(part))
+ TEST_ERROR
+ HDclose(fd);
+ } /* end for */
/*
* Create the file and an initial group. This causes messages about
* debugging to be emitted before we start playing games with what the
* output looks like.
*/
- h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
- if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
- if((grp = H5Gcreate2(file, "emit-diagnostics", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ h5_fixname(FILENAME[1], fapl, filename, sizeof(filename));
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ FAIL_STACK_ERROR
+ if((grp = H5Gcreate2(file, "emit-diagnostics", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
if(H5Gclose(grp) < 0) FAIL_STACK_ERROR
/* Create the dataset */
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
if(H5Pset_external(dcpl, "extern_1a.raw", (off_t)0, (hsize_t)sizeof part) < 0 ||
H5Pset_external(dcpl, "extern_2a.raw", (off_t)10, (hsize_t)sizeof part) < 0 ||
H5Pset_external(dcpl, "extern_3a.raw", (off_t)20, (hsize_t)sizeof part) < 0 ||
H5Pset_external(dcpl, "extern_4a.raw", (off_t)30, (hsize_t)sizeof part) < 0)
- goto error;
+ FAIL_STACK_ERROR
cur_size = 100;
- if((space = H5Screate_simple(1, &cur_size, NULL)) < 0) goto error;
- if((dset = H5Dcreate2(file, "dset1", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
+ if((space = H5Screate_simple(1, &cur_size, NULL)) < 0)
+ FAIL_STACK_ERROR
+ if((dset = H5Dcreate2(file, "dset1", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
/*
* Read the entire dataset and compare with the original
*/
- memset(whole, 0, sizeof(whole));
- if(H5Dread(dset, H5T_NATIVE_INT, space, space, H5P_DEFAULT, whole) < 0) goto error;
- for(i = 0; i < 100; i++)
- if(whole[i] != (signed)i) {
- H5_FAILED();
- puts(" Incorrect value(s) read.");
- goto error;
- } /* end if */
-
- /*
- * Read the middle of the dataset
- */
- if((hs_space = H5Scopy(space)) < 0) goto error;
- if(H5Sselect_hyperslab(hs_space, H5S_SELECT_SET, &hs_start, NULL,
- &hs_count, NULL) < 0) goto error;
HDmemset(whole, 0, sizeof(whole));
- if(H5Dread(dset, H5T_NATIVE_INT, hs_space, hs_space, H5P_DEFAULT,
- whole) < 0) goto error;
- if(H5Sclose(hs_space) < 0) goto error;
- for(i = hs_start; i<hs_start+hs_count; i++) {
- if(whole[i] != (signed)i) {
- H5_FAILED();
- puts(" Incorrect value(s) read.");
- goto error;
- }
- }
-
- if (H5Dclose(dset) < 0) goto error;
- if (H5Pclose(dcpl) < 0) goto error;
- if (H5Sclose(space) < 0) goto error;
- if (H5Fclose(file) < 0) goto error;
+ if(H5Dread(dset, H5T_NATIVE_INT, space, space, H5P_DEFAULT, whole) < 0)
+ FAIL_STACK_ERROR
+ for(i = 0; i < 100; i++)
+ if(whole[i] != (signed)i)
+ FAIL_PUTS_ERROR(" Incorrect value(s) read.");
+
+ /* Read the middle of the dataset */
+ if((hs_space = H5Scopy(space)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Sselect_hyperslab(hs_space, H5S_SELECT_SET, &hs_start, NULL, &hs_count, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ HDmemset(whole, 0, sizeof(whole));
+ if(H5Dread(dset, H5T_NATIVE_INT, hs_space, hs_space, H5P_DEFAULT, whole) < 0)
+ FAIL_STACK_ERROR
+
+ if(H5Sclose(hs_space) < 0) FAIL_STACK_ERROR
+
+ for(i = hs_start; i<hs_start+hs_count; i++) {
+ if(whole[i] != (signed)i)
+ FAIL_PUTS_ERROR(" Incorrect value(s) read.");
+ } /* end for */
+
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(space) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(file) < 0) FAIL_STACK_ERROR
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Dclose(dset);
- H5Pclose(dcpl);
- H5Sclose(space);
- H5Fclose(file);
+ H5Dclose(dset);
+ H5Pclose(dcpl);
+ H5Sclose(space);
+ H5Fclose(file);
} H5E_END_TRY;
return 1;
-}
+} /* end test_read_file_set() */
/*-------------------------------------------------------------------------
- * Function: test_3
+ * Function: test_write_file_set
*
- * Purpose: Tests writing to an external file set.
+ * Purpose: Tests writing to an external file set.
*
- * Return: Success: 0
+ * Return: Success: 0
+ * Failure: 1
*
- * Failure: number of errors
- *
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, March 4, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_3 (hid_t fapl)
+test_write_file_set(hid_t fapl)
{
- hid_t file=-1; /*file to which to write */
- hid_t dcpl=-1; /*dataset creation properties */
- hid_t mem_space=-1; /*memory data space */
- hid_t file_space=-1; /*file data space */
- hid_t dset=-1; /*dataset */
- unsigned i; /*miscellaneous counters */
- int fd; /*external file descriptor */
- int part[25],whole[100]; /*raw data buffers */
- hsize_t cur_size=100; /*current data space size */
- hsize_t max_size=200; /*maximum data space size */
- hsize_t hs_start=100; /*hyperslab starting offset */
- hsize_t hs_count=100; /*hyperslab size */
- char filename[1024]; /*file name */
- int temparray[10] = {0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f};
+ hid_t file = -1; /* file to which to write */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t mem_space = -1; /* memory data space */
+ hid_t file_space = -1; /* file data space */
+ hid_t dset = -1; /* dataset */
+ unsigned i; /* miscellaneous counters */
+ int fd = -1; /* external file descriptor */
+ int part[25], whole[100]; /* raw data buffers */
+ hsize_t cur_size = 100; /* current data space size */
+ hsize_t max_size = 200; /* maximum data space size */
+ hsize_t hs_start = 100; /* hyperslab starting offset */
+ hsize_t hs_count = 100; /* hyperslab size */
+ char filename[1024]; /* file name */
+ int temparray[10] = {0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f};
TESTING("write external dataset");
/* Create another file */
h5_fixname(FILENAME[2], fapl, filename, sizeof filename);
- if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) {
- goto error;
- }
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ FAIL_STACK_ERROR
/* Create the external file list */
- if((dcpl=H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
- if (H5Pset_external(dcpl, "extern_1b.raw", (off_t)0, (hsize_t)sizeof part) < 0 ||
- H5Pset_external(dcpl, "extern_2b.raw", (off_t)10, (hsize_t)sizeof part) < 0 ||
- H5Pset_external(dcpl, "extern_3b.raw", (off_t)20, (hsize_t)sizeof part) < 0 ||
- H5Pset_external(dcpl, "extern_4b.raw", (off_t)30, H5F_UNLIMITED) < 0)
- goto error;
+ if((dcpl=H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_external(dcpl, "extern_1b.raw", (off_t)0, (hsize_t)sizeof part) < 0 ||
+ H5Pset_external(dcpl, "extern_2b.raw", (off_t)10, (hsize_t)sizeof part) < 0 ||
+ H5Pset_external(dcpl, "extern_3b.raw", (off_t)20, (hsize_t)sizeof part) < 0 ||
+ H5Pset_external(dcpl, "extern_4b.raw", (off_t)30, H5F_UNLIMITED) < 0)
+ FAIL_STACK_ERROR
/* Make sure the output files are fresh*/
- for (i=1; i<=4; i++) {
- sprintf(filename, "extern_%db.raw", i);
- if ((fd= HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0) {
- H5_FAILED();
- printf(" cannot open %s: %s\n", filename, strerror(errno));
- goto error;
- }
-
- HDwrite(fd, temparray, (i-1)*10);
- HDclose(fd);
- }
+ for(i=1; i<=4; i++) {
+ HDsprintf(filename, "extern_%db.raw", i);
+ if((fd= HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0) {
+ H5_FAILED();
+ printf(" cannot open %s: %s\n", filename, HDstrerror(errno));
+ goto error;
+ } /* end if */
+
+ if(HDwrite(fd, temparray, (i-1)*10) < 0) {
+ H5_FAILED();
+ printf(" write error to file %s: %s\n", filename, HDstrerror(errno));
+ goto error;
+ }
+ HDclose(fd);
+ } /* end for */
/* Create the dataset */
- if((mem_space = H5Screate_simple(1, &cur_size, &max_size)) < 0) goto error;
- if((file_space = H5Scopy(mem_space)) < 0) goto error;
+ if((mem_space = H5Screate_simple(1, &cur_size, &max_size)) < 0)
+ FAIL_STACK_ERROR
+ if((file_space = H5Scopy(mem_space)) < 0)
+ FAIL_STACK_ERROR
if((dset = H5Dcreate2(file, "dset1", H5T_NATIVE_INT, file_space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- goto error;
+ FAIL_STACK_ERROR
/* Write the entire dataset and compare with the original */
for(i = 0; i < cur_size; i++)
- whole[i] = i;
- if(H5Dwrite(dset, H5T_NATIVE_INT, mem_space, file_space, H5P_DEFAULT, whole) < 0) goto error;
+ whole[i] = (int)i;
+ if(H5Dwrite(dset, H5T_NATIVE_INT, mem_space, file_space, H5P_DEFAULT, whole) < 0)
+ FAIL_STACK_ERROR
for(i = 0; i < 4; i++) {
- char name1[64], name2[64];
-
- sprintf(name1, "extern_%da.raw", i + 1);
- sprintf(name2, "extern_%db.raw", i + 1);
- if(!same_contents(name1, name2)) {
- H5_FAILED();
- puts (" Output differs from expected value.");
- goto error;
- } /* end if */
+ char name1[64], name2[64];
+
+ HDsprintf(name1, "extern_%da.raw", i + 1);
+ HDsprintf(name2, "extern_%db.raw", i + 1);
+ if(!files_have_same_contents(name1, name2))
+ FAIL_PUTS_ERROR(" Output differs from expected value.")
} /* end for */
/* Extend the dataset by another 100 elements */
- if(H5Dset_extent(dset, &max_size) < 0) goto error;
- if(H5Sclose(file_space) < 0) goto error;
- if((file_space = H5Dget_space(dset)) < 0) goto error;
+ if(H5Dset_extent(dset, &max_size) < 0)
+ FAIL_STACK_ERROR
+ if(H5Sclose(file_space) < 0)
+ FAIL_STACK_ERROR
+ if((file_space = H5Dget_space(dset)) < 0)
+ FAIL_STACK_ERROR
/* Write second half of dataset */
for(i = 0; i < hs_count; i++)
- whole[i] = 100 + i;
- if(H5Sselect_hyperslab(file_space, H5S_SELECT_SET, &hs_start, NULL, &hs_count, NULL) < 0) goto error;
- if(H5Dwrite(dset, H5T_NATIVE_INT, mem_space, file_space, H5P_DEFAULT, whole) < 0) goto error;
+ whole[i] = 100 + (int)i;
+ if(H5Sselect_hyperslab(file_space, H5S_SELECT_SET, &hs_start, NULL, &hs_count, NULL) < 0)
+ FAIL_STACK_ERROR
+ if(H5Dwrite(dset, H5T_NATIVE_INT, mem_space, file_space, H5P_DEFAULT, whole) < 0)
+ FAIL_STACK_ERROR
- if(H5Dclose(dset) < 0) goto error;
- if(H5Pclose(dcpl) < 0) goto error;
- if(H5Sclose(mem_space) < 0) goto error;
- if(H5Sclose(file_space) < 0) goto error;
- if(H5Fclose(file) < 0) goto error;
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(mem_space) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(file_space) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(file) < 0) FAIL_STACK_ERROR
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Dclose(dset);
- H5Pclose(dcpl);
- H5Sclose(mem_space);
- H5Sclose(file_space);
- H5Fclose(file);
+ H5Dclose(dset);
+ H5Pclose(dcpl);
+ H5Sclose(mem_space);
+ H5Sclose(file_space);
+ H5Fclose(file);
} H5E_END_TRY;
return 1;
-}
+} /* end test_write_file_set() */
/*-------------------------------------------------------------------------
- * Function: test_4
+ * Function: main
*
- * Purpose: Tests opening an external link twice. It exposed a bug
- * in the library. This function tests the fix. This test
- * doesn't work with MULTI driver.
+ * Purpose: Runs external dataset tests.
*
- * Return: Success: 0
+ * Return: Success: exit(0)
+ * Failure: exit(non-zero)
*
- * Failure: number of errors
- *
- * Programmer: Raymond Lu
- * 5 November 2007
- *
- * Modifications:
+ * Programmer: Robb Matzke
+ * Tuesday, March 3, 1998
*
*-------------------------------------------------------------------------
*/
-static int
-test_4 (hid_t fapl)
+int
+main(void)
{
- hid_t fid = -1;
- hid_t gid = -1;
- hid_t xid = -1;
- hid_t xid2 = -1;
- char filename[1024]; /*file name */
- const char *pathname = H5_get_srcdir_filename(LINKED_FILE); /* Corrected test file name */
-
- TESTING("opening external link twice");
-
- /* Make a copy of the FAPL, in order to switch to the sec2 driver */
- /* (useful when running test with another VFD) */
- if((fapl = H5Pcopy(fapl)) < 0) FAIL_STACK_ERROR;
-
- /* Switch local copy of the fapl to the sec2 driver */
- if(H5Pset_fapl_sec2(fapl) < 0) FAIL_STACK_ERROR;
-
- h5_fixname(FILENAME[3], fapl, filename, sizeof filename);
+ hid_t fapl_id_old = -1; /* file access properties (old format) */
+ hid_t fapl_id_new = -1; /* file access properties (new format) */
+ hid_t fid = -1; /* file for test_1* functions */
+ hid_t gid = -1; /* group to emit diagnostics */
+ char filename[1024]; /* file name for test_1* funcs */
+ unsigned latest_format; /* default or latest file format */
+ int nerrors = 0; /* number of errors */
- if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- goto error;
-
- if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0)
- goto error;
-
- /* Create an external link to an existing file*/
- if(H5Lcreate_external(pathname, "/group", gid, " link", H5P_DEFAULT, H5P_DEFAULT) < 0)
- goto error;
-
- if(H5Gclose(gid) < 0)
- goto error;
-
- if(H5Fclose(fid) < 0)
- goto error;
-
- /* Reopen the file */
- if((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- goto error;
-
- /* Open the external link which is "/ link" as created previously via H5Lcreate_external() */
- if((xid = H5Gopen2(fid, "/ link", H5P_DEFAULT)) < 0)
- goto error;
-
- /* Open the external link twice */
- if((xid2 = H5Gopen2(xid, ".", H5P_DEFAULT)) < 0)
- goto error;
-
- if(H5Gclose(xid2) < 0)
- goto error;
+ h5_reset();
- if(H5Gclose(xid) < 0)
- goto error;
+ /* Get a fapl for the old (default) file format */
+ fapl_id_old = h5_fileaccess();
+ h5_fixname(FILENAME[0], fapl_id_old, filename, sizeof(filename));
+
+ /* Copy and set up a fapl for the latest file format */
+ if((fapl_id_new = H5Pcopy(fapl_id_old)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_libver_bounds(fapl_id_new, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ FAIL_STACK_ERROR
+
+ /* Test with old & new format groups */
+ for(latest_format = FALSE; latest_format <= TRUE; latest_format++) {
+ hid_t current_fapl_id = -1;
+
+ /* Set the fapl for different file formats */
+ if(latest_format) {
+ puts("\nTesting with the latest file format:");
+ current_fapl_id = fapl_id_new;
+ } /* end if */
+ else {
+ puts("Testing with the default file format:");
+ current_fapl_id = fapl_id_old;
+ } /* end else */
+
+ /* Create the common file used by some of the tests */
+ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, current_fapl_id)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create a group that will be used in the file set read test */
+ if((gid = H5Gcreate2(fid, "emit-diagnostics", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Gclose(gid) < 0) FAIL_STACK_ERROR
+
+ /* These tests use a common file */
+ nerrors += test_non_extendible(fid);
+ nerrors += test_too_small(fid);
+ nerrors += test_large_enough_current_eventual(fid);
+ nerrors += test_large_enough_current_not_eventual(fid);
+ nerrors += test_unlimited(fid);
+ nerrors += test_multiple_files(fid);
+
+ /* These tests use no file */
+ nerrors += test_add_to_unlimited();
+ nerrors += test_overflow();
+
+ /* These tests use the VFD-aware fapl */
+ nerrors += test_read_file_set(current_fapl_id);
+ nerrors += test_write_file_set(current_fapl_id);
+
+ /* Verify symbol table messages are cached */
+ nerrors += (h5_verify_cached_stabs(FILENAME, current_fapl_id) < 0 ? 1 : 0);
+
+ /* Close the common file */
+ if(H5Fclose(fid) < 0) FAIL_STACK_ERROR
- if(H5Fclose(fid) < 0)
- goto error;
-
- if(H5Pclose(fapl) < 0)
- TEST_ERROR
+ } /* end for */
- PASSED();
+ if(nerrors > 0) goto error;
- return 0;
+ /* Close the new ff fapl. h5_cleanup will take care of the old ff fapl */
+ if(H5Pclose(fapl_id_new) < 0) FAIL_STACK_ERROR
- error:
- H5E_BEGIN_TRY {
- H5Gclose(gid);
- H5Gclose(xid);
- H5Gclose(xid2);
- H5Fclose(fid);
- } H5E_END_TRY;
- return 1;
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: main
- *
- * Purpose: Runs external dataset tests.
- *
- * Return: Success: exit(0)
- *
- * Failure: exit(non-zero)
- *
- * Programmer: Robb Matzke
- * Tuesday, March 3, 1998
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-int
-main (void)
-{
- hid_t fapl=-1; /*file access properties */
- hid_t file=-1; /*file for test_1* functions */
- char filename[1024]; /*file name for test_1* funcs */
- hid_t grp=-1; /*group to emit diagnostics */
- int nerrors=0; /*number of errors */
+ HDputs("All external storage tests passed.");
- h5_reset();
- fapl = h5_fileaccess();
- h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
- if((grp = H5Gcreate2(file, "emit-diagnostics", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- if(H5Gclose(grp) < 0) goto error;
-
- nerrors += test_1a(file);
- nerrors += test_1b(file);
- nerrors += test_1c(file);
- nerrors += test_1d(file);
- nerrors += test_1e(file);
- nerrors += test_1f(file);
- nerrors += test_1g();
- nerrors += test_1h();
- nerrors += test_2(fapl);
- nerrors += test_3(fapl);
- nerrors += test_4(fapl);
-
- /* Verify symbol table messages are cached */
- nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
-
- if (nerrors>0) goto error;
-
- if (H5Fclose(file) < 0) goto error;
- puts("All external storage tests passed.");
- if (h5_cleanup(FILENAME, fapl)) {
- remove("extern_1a.raw");
- remove("extern_1b.raw");
- remove("extern_2a.raw");
- remove("extern_2b.raw");
- remove("extern_3a.raw");
- remove("extern_3b.raw");
- remove("extern_4a.raw");
- remove("extern_4b.raw");
- }
+ /* Clean up files used by file set tests */
+ if(h5_cleanup(FILENAME, fapl_id_old)) {
+ HDremove("extern_1a.raw");
+ HDremove("extern_1b.raw");
+ HDremove("extern_2a.raw");
+ HDremove("extern_2b.raw");
+ HDremove("extern_3a.raw");
+ HDremove("extern_3b.raw");
+ HDremove("extern_4a.raw");
+ HDremove("extern_4b.raw");
+ } /* end if */
- return 0;
+ return EXIT_SUCCESS;
error:
H5E_BEGIN_TRY {
- H5Fclose(file);
- H5Pclose(fapl);
+ H5Fclose(fid);
+ H5Pclose(fapl_id_old);
+ H5Pclose(fapl_id_new);
+ H5Gclose(gid);
} H5E_END_TRY;
nerrors = MAX(1, nerrors);
printf ("%d TEST%s FAILED.\n", nerrors, 1==nerrors?"":"s");
- return 1;
-}
+ return EXIT_FAILURE;
+} /* end main() */
diff --git a/test/fheap.c b/test/fheap.c
index 25784a9..61a8298 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -470,16 +470,16 @@ get_del_string(const fheap_test_param_t *tparam)
/* Remove half of total objects from heap */
if(tparam->del_dir == FHEAP_DEL_FORWARD)
if(tparam->drain_half == FHEAP_DEL_DRAIN_ALL)
- str = HDstrdup("(all - forward)");
+ str = H5MM_strdup("(all - forward)");
else
- str = HDstrdup("(half, refill, all - forward)");
+ str = H5MM_strdup("(half, refill, all - forward)");
else if(tparam->del_dir == FHEAP_DEL_REVERSE)
if(tparam->drain_half == FHEAP_DEL_DRAIN_ALL)
- str = HDstrdup("(all - reverse)");
+ str = H5MM_strdup("(all - reverse)");
else
- str = HDstrdup("(half, refill, all - reverse)");
+ str = H5MM_strdup("(half, refill, all - reverse)");
else
- str = HDstrdup("(all - deleting heap)");
+ str = H5MM_strdup("(all - deleting heap)");
return(str);
} /* get_del_string() */
diff --git a/test/file_image.c b/test/file_image.c
index 52d0b28..6d1845f 100644
--- a/test/file_image.c
+++ b/test/file_image.c
@@ -156,8 +156,8 @@ error:
if(H5Pclose(fapl_1) < 0) retval = 1;
if(H5Pclose(fapl_2) < 0) retval = 1;
HDfree(buffer);
- HDfree(temp);
- HDfree(temp2);
+ H5free_memory(temp);
+ H5free_memory(temp2);
if(retval == 0)
PASSED();
diff --git a/test/gen_udlinks.c b/test/gen_udlinks.c
index fc044da..55abab0 100644
--- a/test/gen_udlinks.c
+++ b/test/gen_udlinks.c
@@ -22,9 +22,6 @@
* They will be named according to the platform and should
* be placed in the hdf5/test directory so that the links test can use them.
*
- * Note: The be_extlink2.h5 is also used by external.c to test opening
- * external link twice. -SLU 2007/11/7
- *
*/
#include "hdf5.h"
diff --git a/test/h5test.c b/test/h5test.c
index cbe067f..723ecdc 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -193,6 +193,107 @@ h5_clean_files(const char *base_name[], hid_t fapl)
/*-------------------------------------------------------------------------
+ * Function: h5_delete_test_file
+ *
+ * Purpose Clean up temporary test files.
+ *
+ * When a test calls h5_fixname() get a VFD-dependent
+ * test file name, this function can be used to clean it up.
+ *
+ * Return: void
+ *
+ * Since this is a cleanup file, we don't care if it fails.
+ *
+ * Programmer: Dana Robinson
+ * February 2016
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+h5_delete_test_file(const char *base_name, hid_t fapl)
+{
+ char filename[1024]; /* VFD-dependent filename to delete */
+ char sub_filename[2048]; /* sub-files in multi & family VFDs */
+ hid_t driver = -1; /* VFD ID */
+
+ /* Get the VFD-dependent filename */
+ if(NULL == h5_fixname(base_name, fapl, filename, sizeof(filename)))
+ return;
+
+ driver = H5Pget_driver(fapl);
+
+ if(driver == H5FD_FAMILY) {
+ int j;
+ for(j = 0; /*void*/; j++) {
+ HDsnprintf(sub_filename, sizeof(sub_filename), filename, j);
+
+ /* If we can't access the file, it probably doesn't exist
+ * and we are done deleting the sub-files.
+ */
+ if(HDaccess(sub_filename, F_OK) < 0)
+ break;
+
+ HDremove(sub_filename);
+ } /* end for */
+ } else if(driver == H5FD_CORE) {
+ hbool_t backing; /* Whether the core file has backing store */
+
+ H5Pget_fapl_core(fapl, NULL, &backing);
+
+ /* If the file was stored to disk with bacing store, remove it */
+ if(backing)
+ HDremove(filename);
+ } else if (driver == H5FD_MULTI) {
+ H5FD_mem_t mt;
+
+ HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+
+ for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) {
+ HDsnprintf(sub_filename, sizeof(sub_filename), "%s-%c.h5", filename, multi_letters[mt]);
+ HDremove(sub_filename);
+ } /* end for */
+ } else {
+ HDremove(filename);
+ } /* end if */
+
+ return;
+} /* end h5_delete_test_file() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: h5_delete_all_test_files
+ *
+ * Purpose Clean up temporary test files.
+ *
+ * When a test calls h5_fixname() get a VFD-dependent
+ * test file name, this function can be used to clean it up.
+ *
+ * This function takes an array of filenames that ends with
+ * a NULL string and cleans them all.
+ *
+ * Return: void
+ *
+ * Since this is a cleanup file, we don't care if it fails.
+ *
+ * Programmer: Dana Robinson
+ * February 2016
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+h5_delete_all_test_files(const char *base_name[], hid_t fapl)
+{
+ int i; /* iterator */
+
+ for(i = 0; base_name[i]; i++) {
+ h5_delete_test_file(base_name[i], fapl);
+ } /* end for */
+
+ return;
+} /* end h5_delete_all_test_files() */
+
+
+/*-------------------------------------------------------------------------
* Function: h5_cleanup
*
* Purpose: Cleanup temporary test files.
@@ -226,6 +327,35 @@ h5_cleanup(const char *base_name[], hid_t fapl)
/*-------------------------------------------------------------------------
+ * Function: h5_test_shutdown
+ *
+ * Purpose: Performs any special test cleanup required before the test
+ * ends.
+ *
+ * NOTE: This function should normally only be called once
+ * in a given test, usually just before leaving main(). It
+ * is intended for use in the single-file unit tests, not
+ * testhdf5.
+ *
+ * Return: void
+ *
+ * Programmer: Dana Robinson
+ * February 2016
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+h5_test_shutdown(void)
+{
+
+ /* Restore the original error reporting routine */
+ h5_restore_err();
+
+ return;
+} /* end h5_test_shutdown() */
+
+
+/*-------------------------------------------------------------------------
* Function: h5_restore_err
*
* Purpose: Restore the default error handler.
@@ -303,6 +433,39 @@ h5_reset(void)
/*-------------------------------------------------------------------------
+ * Function: h5_test_init
+ *
+ * Purpose: Performs any special actions before the test begins.
+ *
+ * NOTE: This function should normally only be called once
+ * in a given test, usually at the beginning of main(). It
+ * is intended for use in the single-file unit tests, not
+ * testhdf5.
+ *
+ * Return: void
+ *
+ * Programmer: Dana Robinson
+ * February 2016
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+h5_test_init(void)
+{
+ HDfflush(stdout);
+ HDfflush(stderr);
+ H5close();
+
+ /* Save current error stack reporting routine and redirect to our local one */
+ HDassert(err_func == NULL);
+ H5Eget_auto2(H5E_DEFAULT, &err_func, NULL);
+ H5Eset_auto2(H5E_DEFAULT, h5_errors, NULL);
+
+ return;
+} /* end h5_test_init() */
+
+
+/*-------------------------------------------------------------------------
* Function: h5_fixname
*
* Purpose: Create a file name from a file base name like `test' and
@@ -744,6 +907,137 @@ h5_fileaccess(void)
/*-------------------------------------------------------------------------
+ * Function: h5_get_vfd_fapl
+ *
+ * Purpose: Returns a file access property list which is the default
+ * fapl but with a file driver set according to the constant or
+ * environment variable HDF5_DRIVER.
+ *
+ * Return: Success: A file access property list ID
+ * Failure: -1
+ *
+ * Programmer: Dana Robinson
+ * February 2016
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+h5_get_vfd_fapl(void)
+{
+ const char *env = NULL; /* HDF5_DRIVER environment variable */
+ const char *tok = NULL; /* strtok pointer */
+ char buf[1024]; /* buffer for tokenizing HDF5_DRIVER */
+ hid_t fapl = -1; /* fapl to be returned */
+
+ /* Get the environment variable, if it exists */
+ env = HDgetenv("HDF5_DRIVER");
+
+ /* Create a default fapl */
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ return -1;
+
+ /* If the environment variable was not set, just return
+ * the default fapl.
+ */
+ if(!env || !*env)
+ return fapl;
+
+ /* Get the first 'word' of the environment variable.
+ * If it's nothing (environment variable was whitespace)
+ * just return the default fapl.
+ */
+ HDstrncpy(buf, env, sizeof(buf));
+ HDmemset(buf, 0, sizeof(buf));
+ if(NULL == (tok = HDstrtok(buf, " \t\n\r")))
+ return fapl;
+
+ if(!HDstrcmp(tok, "sec2")) {
+ /* POSIX (section 2) read() and write() system calls */
+ if(H5Pset_fapl_sec2(fapl) < 0)
+ return -1;
+ } else if(!HDstrcmp(tok, "stdio")) {
+ /* Standard C fread() and fwrite() system calls */
+ if(H5Pset_fapl_stdio(fapl) < 0)
+ return -1;
+ } else if(!HDstrcmp(tok, "core")) {
+ /* In-memory driver settings (backing store on, 1 MB increment) */
+ if(H5Pset_fapl_core(fapl, (size_t)1, TRUE) < 0)
+ return -1;
+ } else if(!HDstrcmp(tok, "core_paged")) {
+ /* In-memory driver with write tracking and paging on */
+ if(H5Pset_fapl_core(fapl, (size_t)1, TRUE) < 0)
+ return -1;
+ if(H5Pset_core_write_tracking(fapl, TRUE, (size_t)4096) < 0)
+ return -1;
+ } else if(!HDstrcmp(tok, "split")) {
+ /* Split meta data and raw data each using default driver */
+ if(H5Pset_fapl_split(fapl,
+ "-m.h5", H5P_DEFAULT,
+ "-r.h5", H5P_DEFAULT) < 0)
+ return -1;
+ } else if(!HDstrcmp(tok, "multi")) {
+ /* Multi-file driver, general case of the split driver */
+ H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
+ hid_t memb_fapl[H5FD_MEM_NTYPES];
+ const char *memb_name[H5FD_MEM_NTYPES];
+ char sv[H5FD_MEM_NTYPES][1024];
+ haddr_t memb_addr[H5FD_MEM_NTYPES];
+ H5FD_mem_t mt;
+
+ HDmemset(memb_map, 0, sizeof(memb_map));
+ HDmemset(memb_fapl, 0, sizeof(memb_fapl));
+ HDmemset(memb_name, 0, sizeof(memb_name));
+ HDmemset(memb_addr, 0, sizeof(memb_addr));
+
+ HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+ for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, mt)) {
+ memb_fapl[mt] = H5P_DEFAULT;
+ HDsprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
+ memb_name[mt] = sv[mt];
+ memb_addr[mt] = (haddr_t)MAX(mt - 1, 0) * (HADDR_MAX / 10);
+ } /* end for */
+
+ if(H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name,
+ memb_addr, FALSE) < 0) {
+ return -1;
+ } /* end if */
+ } else if(!HDstrcmp(tok, "family")) {
+ /* Family of files, each 1MB and using the default driver */
+ hsize_t fam_size = 100*1024*1024; /*100 MB*/
+
+ /* Was a family size specified in the environment variable? */
+ if((tok = HDstrtok(NULL, " \t\n\r")))
+ fam_size = (hsize_t)(HDstrtod(tok, NULL) * 1024*1024);
+ if(H5Pset_fapl_family(fapl, fam_size, H5P_DEFAULT) < 0)
+ return -1;
+ } else if(!HDstrcmp(tok, "log")) {
+ /* Log file access */
+ unsigned log_flags = H5FD_LOG_LOC_IO | H5FD_LOG_ALLOC;
+
+ /* Were special log file flags specified in the environment variable? */
+ if((tok = HDstrtok(NULL, " \t\n\r")))
+ log_flags = (unsigned)HDstrtol(tok, NULL, 0);
+
+ if(H5Pset_fapl_log(fapl, NULL, log_flags, (size_t)0) < 0)
+ return -1;
+#ifdef H5_HAVE_DIRECT
+ } else if(!HDstrcmp(tok, "direct")) {
+ /* Linux direct read() and write() system calls. Set memory boundary,
+ * file block size, and copy buffer size to the default values.
+ */
+ if(H5Pset_fapl_direct(fapl, 1024, 4096, 8*4096)<0)
+ return -1;
+#endif
+ } else {
+ /* Unknown driver */
+ return -1;
+ } /* end if */
+
+ return fapl;
+} /* end h5_get_vfd_fapl() */
+
+
+/*-------------------------------------------------------------------------
* Function: h5_no_hwconv
*
* Purpose: Turn off hardware data type conversions.
diff --git a/test/h5test.h b/test/h5test.h
index a91da5d..450099a 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -142,6 +142,23 @@ H5TEST_DLL int print_func(const char *format, ...);
H5TEST_DLL int h5_make_local_copy(const char *origfilename, const char *local_copy_name);
H5TEST_DLL herr_t h5_verify_cached_stabs(const char *base_name[], hid_t fapl);
+/* Functions that will replace VFD-dependent functions that violate
+ * the single responsibility principle. Unlike their predecessors,
+ * these new functions do not have hidden side effects.
+ */
+/* h5_fileaccess() replacement */
+H5TEST_DLL hid_t h5_get_vfd_fapl(void);
+
+/* h5_clean_files() replacements */
+H5TEST_DLL void h5_delete_test_file(const char *base_name, hid_t fapl);
+H5TEST_DLL void h5_delete_all_test_files(const char *base_name[], hid_t fapl);
+
+/* h5_reset() replacement */
+H5TEST_DLL void h5_test_init(void);
+
+/* h5_cleanup() replacement */
+H5TEST_DLL void h5_test_shutdown(void);
+
/* Routines for operating on the list of tests (for the "all in one" tests) */
H5TEST_DLL void TestUsage(void);
H5TEST_DLL void AddTest(const char *TheName, void (*TheCall) (void),
diff --git a/test/links.c b/test/links.c
index 7e63bfa..a791c89 100644
--- a/test/links.c
+++ b/test/links.c
@@ -140,7 +140,7 @@ const char *FILENAME[] = {
#define H5L_DIM1 100
#define H5L_DIM2 100
-#define FILTER_FILESIZE_MAX_FRACTION 0.9F
+#define FILTER_FILESIZE_MAX_FRACTION (double)0.9F
/* Creation order macros */
#define CORDER_GROUP_NAME "corder_group"
@@ -552,8 +552,27 @@ cklinks(hid_t fapl, hbool_t new_format)
HDputs(" expected file location.");
TEST_ERROR
} /* end if */
+ if(H5Lexists(file, "/", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR
if(H5Lexists(file, "d1", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR
if(H5Lexists(file, "grp1/hard", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR
+ if(H5Lexists(file, "/grp1", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR
+ if(H5Lexists(file, "/grp1/hard", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR
+ H5E_BEGIN_TRY {
+ status = H5Lexists(file, "no_grp1/hard", H5P_DEFAULT);
+ } H5E_END_TRY;
+ if(status >= 0) {
+ H5_FAILED();
+ HDputs(" H5Lexists() should have failed for a path with missing components.");
+ TEST_ERROR
+ } /* end if */
+ H5E_BEGIN_TRY {
+ status = H5Lexists(file, "/no_grp1/hard", H5P_DEFAULT);
+ } H5E_END_TRY;
+ if(status >= 0) {
+ H5_FAILED();
+ HDputs(" H5Lexists() should have failed for a path with missing components.");
+ TEST_ERROR
+ } /* end if */
/* Symbolic link */
if(H5Oget_info_by_name(file, "grp1/soft", &oinfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
@@ -7380,7 +7399,7 @@ error:
} H5E_END_TRY
return -1;
-} /* end efc_open_twice */
+} /* end external_open_twice() */
/*-------------------------------------------------------------------------
@@ -11085,6 +11104,7 @@ link_info_by_idx(hid_t fapl)
char filename[NAME_BUF_SIZE];/* File name */
char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
unsigned u; /* Local index variable */
+ ssize_t name_len; /* Length of name */
herr_t ret; /* Generic return value */
/* Loop over creating hard or soft links */
@@ -11126,9 +11146,9 @@ link_info_by_idx(hid_t fapl)
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
H5E_BEGIN_TRY {
- ret = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
+ name_len = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
} H5E_END_TRY;
- if(ret >= 0) TEST_ERROR
+ if(name_len >= 0) TEST_ERROR
/* Create several links, up to limit of compact form */
for(u = 0; u < max_compact; u++) {
@@ -11168,9 +11188,9 @@ link_info_by_idx(hid_t fapl)
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
H5E_BEGIN_TRY {
- ret = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
+ name_len = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
} H5E_END_TRY;
- if(ret >= 0) TEST_ERROR
+ if(name_len >= 0) TEST_ERROR
/* Create more links, to push group into dense form */
for(; u < (max_compact * 2); u++) {
@@ -11210,9 +11230,9 @@ link_info_by_idx(hid_t fapl)
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
H5E_BEGIN_TRY {
- ret = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
+ name_len = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
} H5E_END_TRY;
- if(ret >= 0) TEST_ERROR
+ if(name_len >= 0) TEST_ERROR
/* Close the group */
if(H5Gclose(group_id) < 0) TEST_ERROR
@@ -11267,6 +11287,7 @@ link_info_by_idx_old(hid_t fapl)
char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
char tmpval[NAME_BUF_SIZE]; /* Temporary link value */
unsigned u; /* Local index variable */
+ ssize_t name_len; /* Length of name */
herr_t ret; /* Generic return value */
/* Loop over creating hard or soft links */
@@ -11378,9 +11399,9 @@ link_info_by_idx_old(hid_t fapl)
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
H5E_BEGIN_TRY {
- ret = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
+ name_len = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
} H5E_END_TRY;
- if(ret >= 0) TEST_ERROR
+ if(name_len >= 0) TEST_ERROR
/* Verify state of group */
if(H5G__has_stab_test(group_id) != TRUE) TEST_ERROR
@@ -12138,7 +12159,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
iter_info->order = order;
iter_info->stop = -1;
iter_info->ncalled = 0;
- iter_info->curr = order != H5_ITER_DEC ? skip : ((max_links - 1) - skip);
+ iter_info->curr = (int64_t)(order != H5_ITER_DEC ? skip : ((max_links - 1) - skip));
HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if(H5Literate(group_id, idx_type, order, &skip, link_iterate_cb, iter_info) < 0) TEST_ERROR
@@ -12166,11 +12187,11 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Skip over some links in group, with H5Giterate */
- iter_info->nskipped = gskip = max_links / 2;
+ iter_info->nskipped = (unsigned)(gskip = (int)(max_links / 2));
iter_info->order = order;
iter_info->stop = -1;
iter_info->ncalled = 0;
- iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - gskip);
+ iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - (unsigned)gskip);
HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if(H5Giterate(group_id, ".", &gskip, group_iterate_cb, iter_info) < 0) TEST_ERROR
@@ -12211,7 +12232,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Iterate over links in group, stopping in the middle, with H5Giterate() */
- iter_info->nskipped = gskip = 0;
+ iter_info->nskipped = (unsigned)(gskip = 0);
iter_info->order = order;
iter_info->stop = 3;
iter_info->ncalled = 0;
@@ -12568,7 +12589,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Iterate over links in group, with H5Giterate */
- iter_info->nskipped = gskip = 0;
+ iter_info->nskipped = (unsigned)(gskip = 0);
iter_info->order = order;
iter_info->stop = -1;
iter_info->ncalled = 0;
@@ -12588,7 +12609,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
iter_info->order = order;
iter_info->stop = -1;
iter_info->ncalled = 0;
- iter_info->curr = order != H5_ITER_DEC ? skip : ((max_links - 1) - skip);
+ iter_info->curr = (int64_t)(order != H5_ITER_DEC ? skip : ((max_links - 1) - skip));
HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if(H5Literate(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_cb, iter_info) < 0) TEST_ERROR
@@ -12616,11 +12637,11 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Skip over some links in group, with H5Giterate */
- iter_info->nskipped = gskip = max_links / 2;
+ iter_info->nskipped = (unsigned)(gskip = (int)(max_links / 2));
iter_info->order = order;
iter_info->stop = -1;
iter_info->ncalled = 0;
- iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - gskip);
+ iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - (unsigned)gskip);
HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if(H5Giterate(group_id, ".", &gskip, group_iterate_old_cb, iter_info) < 0) TEST_ERROR
@@ -12661,7 +12682,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Iterate over links in group, stopping in the middle, with H5Giterate() */
- iter_info->nskipped = gskip = 0;
+ iter_info->nskipped = (unsigned)(gskip = 0);
iter_info->order = order;
iter_info->stop = 3;
iter_info->ncalled = 0;
diff --git a/test/objcopy.c b/test/objcopy.c
index 4c10602..f4b6a3e 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -218,7 +218,7 @@ addr_insert(H5O_info_t *oi)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static H5_ATTR_PURE hbool_t
addr_lookup(H5O_info_t *oi)
{
size_t n;
@@ -533,8 +533,12 @@ test_copy_attach_attribute_vl(hid_t loc_id)
ret_value = 0;
done:
- if(tid >0 && sid > 0)
- H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ if(tid >0 && sid > 0) {
+ hid_t dxpl_id = H5Pcreate(H5P_DATASET_XFER);
+ H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL);
+ H5Dvlen_reclaim(tid, sid, dxpl_id, buf);
+ H5Pclose(dxpl_id);
+ }
if(sid > 0)
H5Sclose(sid);
if(tid > 0)
@@ -2386,9 +2390,7 @@ test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TESTING("H5Ocopy(): compound dataset");
-#ifdef H5_CLEAR_MEMORY
HDmemset(buf, 0, sizeof(buf));
-#endif /* H5_CLEAR_MEMORY */
for(i = 0; i < DIM_SIZE_1; i++) {
buf[i].a = i;
buf[i].d = (double)1.0F / (double)(i + 1);
@@ -5030,6 +5032,7 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
hid_t tid = -1; /* Datatype ID */
hid_t sid = -1; /* Dataspace ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -5113,7 +5116,12 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -5129,6 +5137,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Sclose(sid);
H5Fclose(fid_dst);
@@ -5160,6 +5169,7 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
@@ -5289,7 +5299,12 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -5305,6 +5320,8 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
H5Tclose(tid);
H5Sclose(sid);
H5Fclose(fid_dst);
@@ -5336,6 +5353,7 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -5426,7 +5444,12 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -5442,6 +5465,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Sclose(sid);
H5Fclose(fid_dst);
@@ -5589,6 +5613,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
hid_t tid = -1; /* Datatype ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
hsize_t dim2d[2]; /* Dataset dimensions */
hsize_t chunk_dim2d[2] ={CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
hvl_t buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
@@ -5688,7 +5713,12 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
if(H5Fclose(fid_dst) < 0) TEST_ERROR
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -5707,6 +5737,7 @@ error:
H5Dclose(did);
H5Pclose(pid);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Sclose(sid);
H5Fclose(fid_dst);
@@ -7396,6 +7427,7 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -7495,7 +7527,12 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid_copy, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid_copy) < 0) TEST_ERROR
@@ -7512,6 +7549,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Tclose(tid_copy);
H5Sclose(sid);
@@ -7543,6 +7581,7 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
hid_t tid = -1, tid_copy=-1; /* Datatype ID */
hid_t sid = -1; /* Dataspace ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -7635,7 +7674,12 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid_copy, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid_copy) < 0) TEST_ERROR
@@ -7651,6 +7695,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Tclose(tid_copy);
H5Sclose(sid);
@@ -7683,6 +7728,7 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -7783,7 +7829,12 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid_copy, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid_copy) < 0) TEST_ERROR
@@ -7800,6 +7851,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Tclose(tid_copy);
H5Sclose(sid);
@@ -7832,6 +7884,7 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -7933,7 +7986,12 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid_copy, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid_copy) < 0) TEST_ERROR
@@ -7950,6 +8008,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Tclose(tid_copy);
H5Sclose(sid);
@@ -7982,6 +8041,7 @@ test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j, k; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -8088,7 +8148,12 @@ test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
if(H5Fclose(fid_dst) < 0) TEST_ERROR
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid2, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -8105,6 +8170,8 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
H5Tclose(tid);
H5Tclose(tid2);
H5Sclose(sid);
@@ -8137,6 +8204,7 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j, k; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -8242,7 +8310,12 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
if(H5Fclose(fid_dst) < 0) TEST_ERROR
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid2, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -8259,6 +8332,8 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
H5Tclose(tid);
H5Tclose(tid2);
H5Sclose(sid);
@@ -8291,6 +8366,7 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j, k; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -8435,7 +8511,12 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid2, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -8453,6 +8534,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Tclose(tid2);
H5Sclose(sid);
@@ -8485,6 +8567,7 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j, k; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -8592,7 +8675,12 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid2, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -8610,6 +8698,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Tclose(tid2);
H5Sclose(sid);
@@ -8652,6 +8741,7 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
hid_t sid = -1; /* Dataspace ID */
hid_t did = -1; /* Dataset ID */
hid_t did2 = -1; /* Dataset ID */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -8741,7 +8831,12 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid2) < 0) TEST_ERROR
@@ -8758,6 +8853,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid2);
H5Tclose(tid);
H5Sclose(sid);
@@ -8790,6 +8886,7 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
@@ -8887,7 +8984,12 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid2) < 0) TEST_ERROR
@@ -8904,6 +9006,8 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
H5Tclose(tid2);
H5Tclose(tid);
H5Sclose(sid);
@@ -8936,6 +9040,7 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -9032,7 +9137,12 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid2) < 0) TEST_ERROR
@@ -9049,6 +9159,8 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
H5Tclose(tid2);
H5Tclose(tid);
H5Sclose(sid);
@@ -13483,6 +13595,16 @@ main(void)
puts ("All object copying tests passed.");
+ /* call H5Pclose(fapl2) to mask property list management bug.
+ *
+ * Needless to say, this bug must be fixed properly, but we
+ * will sweep it under the rug for now.
+ *
+ * To expose the bug, delete this call, and run with either split
+ * or multi file driver.
+ */
+ H5Pclose(fapl2);
+
h5_cleanup(FILENAME, fapl);
return 0;
diff --git a/test/swmr_addrem_writer.c b/test/swmr_addrem_writer.c
index 8ce3f6c..fb5cb8e 100644
--- a/test/swmr_addrem_writer.c
+++ b/test/swmr_addrem_writer.c
@@ -33,9 +33,7 @@
/* Headers */
/***********/
-#include <assert.h>
-#include <sys/time.h>
-
+#include "h5test.h"
#include "swmr_common.h"
/****************/
@@ -82,7 +80,7 @@ open_skeleton(const char *filename, unsigned verbose)
hsize_t dim[2]; /* Dataspace dimension */
unsigned u, v; /* Local index variable */
- assert(filename);
+ HDassert(filename);
/* Create file access property list */
if((fapl = h5_fileaccess()) < 0)
@@ -99,8 +97,8 @@ open_skeleton(const char *filename, unsigned verbose)
mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
H5Pget_mdc_config(fapl, &mdc_config);
- fprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
- fprintf(stderr, "mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
+ HDfprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
+ HDfprintf(stderr, "mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
mdc_config.set_initial_size = 1;
mdc_config.initial_size = 16 * 1024 * 1024;
/* mdc_config.epoch_length = 5000; */
@@ -122,7 +120,7 @@ open_skeleton(const char *filename, unsigned verbose)
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Opening datasets\n");
+ HDfprintf(stderr, "Opening datasets\n");
/* Open the datasets */
for(u = 0; u < NLEVELS; u++)
@@ -178,10 +176,10 @@ addrem_records(hid_t fid, unsigned verbose, unsigned long nops, unsigned long fl
unsigned long op_to_flush; /* # of operations before flush */
unsigned long u, v; /* Local index variables */
- assert(fid > 0);
+ HDassert(fid > 0);
/* Reset the buffer */
- memset(&buf, 0, sizeof(buf));
+ HDmemset(&buf, 0, sizeof(buf));
/* Create a dataspace for the record to add */
if((mem_sid = H5Screate_simple(2, count, NULL)) < 0)
@@ -196,7 +194,7 @@ addrem_records(hid_t fid, unsigned verbose, unsigned long nops, unsigned long fl
mdc_config_orig.version = H5AC__CURR_CACHE_CONFIG_VERSION;
if(H5Fget_mdc_config(fid, &mdc_config_orig) < 0)
return -1;
- memcpy(&mdc_config_cork, &mdc_config_orig, sizeof(mdc_config_cork));
+ HDmemcpy(&mdc_config_cork, &mdc_config_orig, sizeof(mdc_config_cork));
mdc_config_cork.evictions_enabled = FALSE;
mdc_config_cork.incr_mode = H5C_incr__off;
mdc_config_cork.flash_incr_mode = H5C_flash_incr__off;
@@ -213,7 +211,7 @@ addrem_records(hid_t fid, unsigned verbose, unsigned long nops, unsigned long fl
symbol = choose_dataset();
/* Decide whether to shrink or expand, and by how much */
- count[1] = (hsize_t)random() % (MAX_SIZE_CHANGE * 2) + 1;
+ count[1] = (hsize_t)HDrandom() % (MAX_SIZE_CHANGE * 2) + 1;
if(count[1] > MAX_SIZE_CHANGE) {
/* Add records */
@@ -291,7 +289,7 @@ addrem_records(hid_t fid, unsigned verbose, unsigned long nops, unsigned long fl
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Closing datasets\n");
+ HDfprintf(stderr, "Closing datasets\n");
/* Close the datasets */
for(u = 0; u < NLEVELS; u++)
@@ -319,7 +317,7 @@ usage(void)
printf("Defaults to verbose (no '-q' given), flushing every 1000 operations\n");
printf("('-f 1000'), and will generate a random seed (no -r given).\n");
printf("\n");
- exit(1);
+ HDexit(1);
}
int main(int argc, const char *argv[])
@@ -343,7 +341,7 @@ int main(int argc, const char *argv[])
switch(argv[u][1]) {
/* # of records to write between flushing file */
case 'f':
- flush_count = atol(argv[u + 1]);
+ flush_count = HDatol(argv[u + 1]);
if(flush_count < 0)
usage();
u += 2;
@@ -358,7 +356,7 @@ int main(int argc, const char *argv[])
/* Random # seed */
case 'r':
use_seed = 1;
- temp = atoi(argv[u + 1]);
+ temp = HDatoi(argv[u + 1]);
if(temp < 0)
usage();
else
@@ -373,7 +371,7 @@ int main(int argc, const char *argv[])
} /* end if */
else {
/* Get the number of records to append */
- nops = atol(argv[u]);
+ nops = HDatol(argv[u]);
if(nops <= 0)
usage();
@@ -388,24 +386,24 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose) {
- fprintf(stderr, "Parameters:\n");
- fprintf(stderr, "\t# of operations between flushes = %ld\n", flush_count);
- fprintf(stderr, "\t# of operations = %ld\n", nops);
+ HDfprintf(stderr, "Parameters:\n");
+ HDfprintf(stderr, "\t# of operations between flushes = %ld\n", flush_count);
+ HDfprintf(stderr, "\t# of operations = %ld\n", nops);
} /* end if */
/* Set the random seed */
if(0 == use_seed) {
struct timeval t;
- gettimeofday(&t, NULL);
+ HDgettimeofday(&t, NULL);
random_seed = (unsigned)(t.tv_usec);
} /* end if */
- srandom(random_seed);
+ HDsrandom(random_seed);
/* ALWAYS emit the random seed for possible debugging */
- fprintf(stderr, "Using writer random seed: %u\n", random_seed);
+ HDfprintf(stderr, "Using writer random seed: %u\n", random_seed);
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Generating symbol names\n");
+ HDfprintf(stderr, "Generating symbol names\n");
/* Generate dataset names */
if(generate_symbols() < 0)
@@ -413,12 +411,12 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Opening skeleton file: %s\n", FILENAME);
+ HDfprintf(stderr, "Opening skeleton file: %s\n", FILENAME);
/* Open file skeleton */
if((fid = open_skeleton(FILENAME, verbose)) < 0) {
- fprintf(stderr, "Error opening skeleton file!\n");
- exit(1);
+ HDfprintf(stderr, "Error opening skeleton file!\n");
+ HDexit(1);
} /* end if */
/* Send a message to indicate "H5Fopen" is complete--releasing the file lock */
@@ -426,32 +424,32 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Adding and removing records\n");
+ HDfprintf(stderr, "Adding and removing records\n");
/* Grow and shrink datasets */
if(addrem_records(fid, verbose, (unsigned long)nops, (unsigned long)flush_count) < 0) {
- fprintf(stderr, "Error adding and removing records from datasets!\n");
- exit(1);
+ HDfprintf(stderr, "Error adding and removing records from datasets!\n");
+ HDexit(1);
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Releasing symbols\n");
+ HDfprintf(stderr, "Releasing symbols\n");
/* Clean up the symbols */
if(shutdown_symbols() < 0) {
- fprintf(stderr, "Error releasing symbols!\n");
- exit(1);
+ HDfprintf(stderr, "Error releasing symbols!\n");
+ HDexit(1);
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Closing objects\n");
+ HDfprintf(stderr, "Closing objects\n");
/* Close objects opened */
if(H5Fclose(fid) < 0) {
- fprintf(stderr, "Error closing file!\n");
- exit(1);
+ HDfprintf(stderr, "Error closing file!\n");
+ HDexit(1);
} /* end if */
return 0;
diff --git a/test/swmr_check_compat_vfd.c b/test/swmr_check_compat_vfd.c
index 87b87c4..1bbfda3 100644
--- a/test/swmr_check_compat_vfd.c
+++ b/test/swmr_check_compat_vfd.c
@@ -19,14 +19,12 @@
* It is intended for use in shell scripts.
*/
-#include <stdlib.h>
-
-#include "H5private.h"
+#include "h5test.h"
/* This file needs to access the file driver testing code */
-#define H5FD_FRIEND /*suppress error about including H5FDpkg */
+#define H5FD_FRIEND /*suppress error about including H5FDpkg */
#define H5FD_TESTING
-#include "H5FDpkg.h" /* File drivers */
+#include "H5FDpkg.h" /* File drivers */
/*-------------------------------------------------------------------------
@@ -56,4 +54,3 @@ main(void)
return EXIT_FAILURE;
} /* end main() */
-
diff --git a/test/swmr_common.c b/test/swmr_common.c
index 30e1b3e..8bd98b6 100644
--- a/test/swmr_common.c
+++ b/test/swmr_common.c
@@ -26,8 +26,7 @@
/* Headers */
/***********/
-#include <assert.h>
-
+#include "h5test.h"
#include "swmr_common.h"
/*******************/
@@ -96,10 +95,10 @@ choose_dataset(void)
unsigned offset; /* The "offset" of the dataset at that level */
/* Determine level of dataset */
- level = symbol_mapping[random() % NMAPPING];
+ level = symbol_mapping[HDrandom() % NMAPPING];
/* Determine the offset of the level */
- offset = random() % symbol_count[level];
+ offset = HDrandom() % symbol_count[level];
return &symbol_info[level][offset];
} /* end choose_dataset() */
@@ -172,7 +171,7 @@ create_symbol_datatype(void)
int
generate_name(char *name_buf, unsigned level, unsigned count)
{
- assert(name_buf);
+ HDassert(name_buf);
sprintf(name_buf, "%u-%04u", level, count);
@@ -198,13 +197,13 @@ generate_symbols(void)
unsigned u, v; /* Local index variables */
for(u = 0; u < NLEVELS; u++) {
- symbol_info[u] = (symbol_info_t *)malloc(symbol_count[u] * sizeof(symbol_info_t));
+ symbol_info[u] = (symbol_info_t *)HDmalloc(symbol_count[u] * sizeof(symbol_info_t));
for(v = 0; v < symbol_count[u]; v++) {
char name_buf[64];
generate_name(name_buf, u, v);
- symbol_info[u][v].name = (char *)malloc(strlen(name_buf) + 1);
- strcpy(symbol_info[u][v].name, name_buf);
+ symbol_info[u][v].name = (char *)HDmalloc(HDstrlen(name_buf) + 1);
+ HDstrcpy(symbol_info[u][v].name, name_buf);
symbol_info[u][v].dsid = -1;
symbol_info[u][v].nrecords = 0;
} /* end for */
@@ -234,8 +233,8 @@ shutdown_symbols(void)
/* Clean up the symbols */
for(u = 0; u < NLEVELS; u++) {
for(v = 0; v < symbol_count[u]; v++)
- free(symbol_info[u][v].name);
- free(symbol_info[u]);
+ HDfree(symbol_info[u][v].name);
+ HDfree(symbol_info[u]);
} /* end for */
return 0;
@@ -262,31 +261,30 @@ print_metadata_retries_info(hid_t fid)
/* Retrieve the collection of retries */
if(H5Fget_metadata_read_retry_info(fid, &info) < 0)
- return (-1);
+ return (-1);
/* Print information for each non-NULL retries[i] */
for(i = 0; i < H5F_NUM_METADATA_READ_RETRY_TYPES; i++) {
unsigned power;
unsigned j;
- if(NULL == info.retries[i])
- continue;
-
- fprintf(stderr, "Metadata read retries for item %u:\n", i);
- power = 1;
- for(j = 0; j < info.nbins; j++) {
- if(info.retries[i][j])
- fprintf(stderr, "\t# of retries for %u - %u retries: %u\n",
- power, (power * 10) - 1, info.retries[i][j]);
- power *= 10;
- } /* end for */
+ if(NULL == info.retries[i])
+ continue;
+
+ HDfprintf(stderr, "Metadata read retries for item %u:\n", i);
+ power = 1;
+ for(j = 0; j < info.nbins; j++) {
+ if(info.retries[i][j])
+ HDfprintf(stderr, "\t# of retries for %u - %u retries: %u\n",
+ power, (power * 10) - 1, info.retries[i][j]);
+ power *= 10;
+ } /* end for */
} /* end for */
/* Free memory for each non-NULL retries[i] */
for(i = 0; i < H5F_NUM_METADATA_READ_RETRY_TYPES; i++)
if(info.retries[i] != NULL)
- free(info.retries[i]);
+ HDfree(info.retries[i]);
return 0;
} /* print_metadata_retries_info() */
-
diff --git a/test/swmr_common.h b/test/swmr_common.h
index 1778f8e..31b5fa6 100644
--- a/test/swmr_common.h
+++ b/test/swmr_common.h
@@ -16,15 +16,10 @@
#ifndef _SWMR_COMMON_H
#define _SWMR_COMMON_H
-/* Headers needed */
+/***********/
+/* Headers */
+/***********/
-#include <limits.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-
-#include "hdf5.h"
#include "h5test.h"
/**********/
@@ -75,4 +70,3 @@ int shutdown_symbols(void);
int print_metadata_retries_info(hid_t fid);
#endif /* _SWMR_COMMON_H */
-
diff --git a/test/swmr_generator.c b/test/swmr_generator.c
index bbc1e18..3b782da 100644
--- a/test/swmr_generator.c
+++ b/test/swmr_generator.c
@@ -27,9 +27,7 @@
/* Headers */
/***********/
-#include <assert.h>
-#include <sys/time.h>
-
+#include "h5test.h"
#include "swmr_common.h"
/****************/
@@ -95,8 +93,8 @@ gen_skeleton(const char *filename, unsigned verbose, unsigned swmr_write,
#endif /* FILLVAL_WORKS */
unsigned u, v; /* Local index variable */
- assert(filename);
- assert(index_type);
+ HDassert(filename);
+ HDassert(index_type);
/* Create file access property list */
if((fapl = h5_fileaccess()) < 0)
@@ -104,15 +102,15 @@ gen_skeleton(const char *filename, unsigned verbose, unsigned swmr_write,
/* Can create a file for SWMR support with: (a) (write+latest-format) or (b) (SWMR write+non-latest-format) */
if(!swmr_write) {
- if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- return -1;
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ return -1;
}
/* There are two chunk indexes tested here.
* With one unlimited dimension, we get the extensible array index
* type, with two unlimited dimensions, we get a v-2 B-tree.
*/
- if(!strcmp(index_type, "b2"))
+ if(!HDstrcmp(index_type, "b2"))
max_dims[0] = H5S_UNLIMITED;
#ifdef QAK
@@ -122,8 +120,8 @@ gen_skeleton(const char *filename, unsigned verbose, unsigned swmr_write,
mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
H5Pget_mdc_config(fapl, &mdc_config);
- fprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
- fprintf(stderr, "mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
+ HDfprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
+ HDfprintf(stderr, "mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
mdc_config.set_initial_size = 1;
mdc_config.initial_size = 16 * 1024 * 1024;
/* mdc_config.epoch_length = 5000; */
@@ -149,7 +147,7 @@ gen_skeleton(const char *filename, unsigned verbose, unsigned swmr_write,
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Creating file\n");
+ HDfprintf(stderr, "Creating file\n");
/* Create the file */
if((fid = H5Fcreate(filename, H5F_ACC_TRUNC | (swmr_write ? H5F_ACC_SWMR_WRITE : 0), fcpl, fapl)) < 0)
@@ -194,7 +192,7 @@ gen_skeleton(const char *filename, unsigned verbose, unsigned swmr_write,
/* Currently fill values do not work because they can bump the dataspace
* message to the second object header chunk. We should enable the fillval
* here when this is fixed. -NAF 8/11/11 */
- memset(&fillval, 0, sizeof(fillval));
+ HDmemset(&fillval, 0, sizeof(fillval));
fillval.rec_id = (uint64_t)ULLONG_MAX;
if(H5Pset_fill_value(dcpl, tid, &fillval) < 0)
return -1;
@@ -202,7 +200,7 @@ gen_skeleton(const char *filename, unsigned verbose, unsigned swmr_write,
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Creating datasets\n");
+ HDfprintf(stderr, "Creating datasets\n");
/* Create the datasets */
for(u = 0; u < NLEVELS; u++)
@@ -220,7 +218,7 @@ gen_skeleton(const char *filename, unsigned verbose, unsigned swmr_write,
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Closing objects\n");
+ HDfprintf(stderr, "Closing objects\n");
/* Close everythign */
if(H5Pclose(dcpl) < 0)
@@ -255,7 +253,7 @@ usage(void)
printf("compression ('-c -1'), v1 b-tree indexing (-i b1), and will generate a random\n");
printf("seed (no -r given).\n");
printf("\n");
- exit(1);
+ HDexit(1);
} /* end usage() */
int main(int argc, const char *argv[])
@@ -277,7 +275,7 @@ int main(int argc, const char *argv[])
switch(argv[u][1]) {
/* Compress dataset chunks */
case 'c':
- comp_level = atoi(argv[u + 1]);
+ comp_level = HDatoi(argv[u + 1]);
if(comp_level < -1 || comp_level > 9)
usage();
u += 2;
@@ -286,8 +284,8 @@ int main(int argc, const char *argv[])
/* Chunk index type */
case 'i':
index_type = argv[u + 1];
- if(strcmp(index_type, "ea")
- && strcmp(index_type, "b2"))
+ if(HDstrcmp(index_type, "ea")
+ && HDstrcmp(index_type, "b2"))
usage();
u += 2;
break;
@@ -295,7 +293,7 @@ int main(int argc, const char *argv[])
/* Random # seed */
case 'r':
use_seed = 1;
- temp = atoi(argv[u + 1]);
+ temp = HDatoi(argv[u + 1]);
if(temp < 0)
usage();
else
@@ -325,30 +323,30 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose) {
- fprintf(stderr, "Parameters:\n");
- fprintf(stderr, "\tswmr writes %s\n", swmr_write ? "on" : "off");
- fprintf(stderr, "\tcompression level = %d\n", comp_level);
- fprintf(stderr, "\tindex type = %s\n", index_type);
+ HDfprintf(stderr, "Parameters:\n");
+ HDfprintf(stderr, "\tswmr writes %s\n", swmr_write ? "on" : "off");
+ HDfprintf(stderr, "\tcompression level = %d\n", comp_level);
+ HDfprintf(stderr, "\tindex type = %s\n", index_type);
} /* end if */
/* Set the random seed */
if(0 == use_seed) {
struct timeval t;
- gettimeofday(&t, NULL);
+ HDgettimeofday(&t, NULL);
random_seed = (unsigned)(t.tv_usec);
} /* end if */
- srandom(random_seed);
+ HDsrandom(random_seed);
/* ALWAYS emit the random seed for possible debugging */
- fprintf(stderr, "Using generator random seed (used in sparse test only): %u\n", random_seed);
+ HDfprintf(stderr, "Using generator random seed (used in sparse test only): %u\n", random_seed);
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Generating skeleton file: %s\n", FILENAME);
+ HDfprintf(stderr, "Generating skeleton file: %s\n", FILENAME);
/* Generate file skeleton */
if(gen_skeleton(FILENAME, verbose, swmr_write, comp_level, index_type, random_seed) < 0) {
- fprintf(stderr, "Error generating skeleton file!\n");
- exit(1);
+ HDfprintf(stderr, "Error generating skeleton file!\n");
+ HDexit(1);
} /* end if */
return 0;
diff --git a/test/swmr_reader.c b/test/swmr_reader.c
index f7b7e96..24b5366 100644
--- a/test/swmr_reader.c
+++ b/test/swmr_reader.c
@@ -30,10 +30,7 @@
/* Headers */
/***********/
-#include <assert.h>
-#include <unistd.h>
-#include <sys/time.h>
-
+#include "h5test.h"
#include "swmr_common.h"
/********************/
@@ -90,10 +87,10 @@ check_dataset(hid_t fid, unsigned verbose, const char *sym_name, symbol_t *recor
hssize_t snpoints; /* Number of elements in dataset */
hsize_t start[2] = {0, 0}, count[2] = {1, 1}; /* Hyperslab selection values */
- assert(fid >= 0);
- assert(sym_name);
- assert(record);
- assert(rec_sid >= 0);
+ HDassert(fid >= 0);
+ HDassert(sym_name);
+ HDassert(record);
+ HDassert(rec_sid >= 0);
/* Open dataset for symbol */
if((dsid = H5Dopen2(fid, sym_name, H5P_DEFAULT)) < 0)
@@ -109,7 +106,7 @@ check_dataset(hid_t fid, unsigned verbose, const char *sym_name, symbol_t *recor
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Symbol = '%s', # of records = %lld\n", sym_name, (long long)snpoints);
+ HDfprintf(stderr, "Symbol = '%s', # of records = %lld\n", sym_name, (long long)snpoints);
/* Check if there are records for symbol */
if(snpoints > 0) {
@@ -125,9 +122,9 @@ check_dataset(hid_t fid, unsigned verbose, const char *sym_name, symbol_t *recor
/* Verify record value */
if(record->rec_id != start[1]) {
- fprintf(stderr, "*** ERROR ***\n");
- fprintf(stderr, "Incorrect record value!\n");
- fprintf(stderr, "Symbol = '%s', # of records = %lld, record->rec_id = %llu\n", sym_name, (long long)snpoints, (unsigned long long)record->rec_id);
+ HDfprintf(stderr, "*** ERROR ***\n");
+ HDfprintf(stderr, "Incorrect record value!\n");
+ HDfprintf(stderr, "Symbol = '%s', # of records = %lld, record->rec_id = %llu\n", sym_name, (long long)snpoints, (unsigned long long)record->rec_id);
return -1;
} /* end if */
} /* end if */
@@ -193,22 +190,22 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds,
symbol_t record; /* The record to read from the dataset */
unsigned v; /* Local index variable */
- assert(filename);
- assert(nseconds != 0);
- assert(poll_time != 0);
+ HDassert(filename);
+ HDassert(nseconds != 0);
+ HDassert(poll_time != 0);
/* Reset the record */
/* (record's 'info' field might need to change for each record read, also) */
- memset(&record, 0, sizeof(record));
+ HDmemset(&record, 0, sizeof(record));
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Choosing datasets\n");
+ HDfprintf(stderr, "Choosing datasets\n");
/* Allocate space for 'common' datasets, if any */
if(ncommon > 0) {
/* Allocate array to hold pointers to symbols for common datasets */
- if(NULL == (sym_com = (symbol_info_t **)malloc(sizeof(symbol_info_t *) * ncommon)))
+ if(NULL == (sym_com = (symbol_info_t **)HDmalloc(sizeof(symbol_info_t *) * ncommon)))
return -1;
/* Open the common datasets */
@@ -217,19 +214,19 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds,
/* Determine the offset of the symbol, within level 0 symbols */
/* (level 0 symbols are the most common symbols) */
- offset = (unsigned)(random() % symbol_count[0]);
+ offset = (unsigned)(HDrandom() % symbol_count[0]);
sym_com[v] = &symbol_info[0][offset];
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Common symbol #%u = '%s'\n", v, symbol_info[0][offset].name);
+ HDfprintf(stderr, "Common symbol #%u = '%s'\n", v, symbol_info[0][offset].name);
} /* end for */
} /* end if */
/* Allocate space for 'random' datasets, if any */
if(nrandom > 0) {
/* Allocate array to hold pointers to symbols for random datasets */
- if(NULL == (sym_rand = (symbol_info_t **)malloc(sizeof(symbol_info_t *) * nrandom)))
+ if(NULL == (sym_rand = (symbol_info_t **)HDmalloc(sizeof(symbol_info_t *) * nrandom)))
return -1;
/* Determine the random datasets */
@@ -243,7 +240,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds,
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Random symbol #%u = '%s'\n", v, sym->name);
+ HDfprintf(stderr, "Random symbol #%u = '%s'\n", v, sym->name);
} /* end for */
} /* end if */
@@ -253,10 +250,10 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds,
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Reading records\n");
+ HDfprintf(stderr, "Reading records\n");
/* Get the starting time */
- start_time = time(NULL);
+ start_time = HDtime(NULL);
curr_time = start_time;
/* Create file access property list */
@@ -268,7 +265,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds,
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Opening file: %s\n", filename);
+ HDfprintf(stderr, "Opening file: %s\n", filename);
/* Open the file */
if((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
@@ -278,14 +275,14 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds,
if(ncommon > 0) {
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Checking common symbols\n");
+ HDfprintf(stderr, "Checking common symbols\n");
/* Iterate over common datasets */
for(v = 0; v < ncommon; v++) {
/* Check common dataset */
if(check_dataset(fid, verbose, sym_com[v]->name, &record, mem_sid) < 0)
return -1;
- memset(&record, 0, sizeof(record));
+ HDmemset(&record, 0, sizeof(record));
} /* end for */
} /* end if */
@@ -293,30 +290,30 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds,
if(nrandom > 0) {
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Checking random symbols\n");
+ HDfprintf(stderr, "Checking random symbols\n");
/* Iterate over random datasets */
for(v = 0; v < nrandom; v++) {
/* Check random dataset */
if(check_dataset(fid, verbose, sym_rand[v]->name, &record, mem_sid) < 0)
return -1;
- memset(&record, 0, sizeof(record));
+ HDmemset(&record, 0, sizeof(record));
} /* end for */
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Closing file\n");
+ HDfprintf(stderr, "Closing file\n");
/* Close the file */
if(H5Fclose(fid) < 0)
return -1;
/* Sleep for the appropriate # of seconds */
- sleep(poll_time);
+ HDsleep(poll_time);
/* Retrieve the current time */
- curr_time = time(NULL);
+ curr_time = HDtime(NULL);
} /* end while */
/* Close the memory dataspace */
@@ -329,18 +326,18 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds,
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Closing datasets\n");
+ HDfprintf(stderr, "Closing datasets\n");
/* Close 'random' datasets, if any */
if(nrandom > 0) {
/* Release array holding dataset ID's for random datasets */
- free(sym_rand);
+ HDfree(sym_rand);
} /* end if */
/* Close 'common' datasets, if any */
if(ncommon > 0) {
/* Release array holding dataset ID's for common datasets */
- free(sym_com);
+ HDfree(sym_com);
} /* end if */
return 0;
@@ -362,7 +359,7 @@ usage(void)
printf("5 common symbols to poll ('-h 5'), 10 random symbols to poll ('-l 10'),\n");
printf("and will generate a random seed (no -r given).\n");
printf("\n");
- exit(1);
+ HDexit(1);
}
int main(int argc, const char *argv[])
@@ -387,7 +384,7 @@ int main(int argc, const char *argv[])
switch(argv[u][1]) {
/* # of common symbols to poll */
case 'h':
- ncommon = atoi(argv[u + 1]);
+ ncommon = HDatoi(argv[u + 1]);
if(ncommon < 0)
usage();
u += 2;
@@ -395,7 +392,7 @@ int main(int argc, const char *argv[])
/* # of random symbols to poll */
case 'l':
- nrandom = atoi(argv[u + 1]);
+ nrandom = HDatoi(argv[u + 1]);
if(nrandom < 0)
usage();
u += 2;
@@ -410,7 +407,7 @@ int main(int argc, const char *argv[])
/* Random # seed */
case 'r':
use_seed = 1;
- temp = atoi(argv[u + 1]);
+ temp = HDatoi(argv[u + 1]);
if(temp < 0)
usage();
else
@@ -420,7 +417,7 @@ int main(int argc, const char *argv[])
/* # of seconds between polling */
case 's':
- poll_time = atoi(argv[u + 1]);
+ poll_time = HDatoi(argv[u + 1]);
if(poll_time < 0)
usage();
u += 2;
@@ -433,7 +430,7 @@ int main(int argc, const char *argv[])
} /* end if */
else {
/* Get the number of records to append */
- nseconds = atol(argv[u]);
+ nseconds = HDatol(argv[u]);
if(nseconds <= 0)
usage();
@@ -448,31 +445,31 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose) {
- fprintf(stderr, "Parameters:\n");
- fprintf(stderr, "\t# of seconds between polling = %d\n", poll_time);
- fprintf(stderr, "\t# of common symbols to poll = %d\n", ncommon);
- fprintf(stderr, "\t# of random symbols to poll = %d\n", nrandom);
- fprintf(stderr, "\t# of seconds to test = %ld\n", nseconds);
+ HDfprintf(stderr, "Parameters:\n");
+ HDfprintf(stderr, "\t# of seconds between polling = %d\n", poll_time);
+ HDfprintf(stderr, "\t# of common symbols to poll = %d\n", ncommon);
+ HDfprintf(stderr, "\t# of random symbols to poll = %d\n", nrandom);
+ HDfprintf(stderr, "\t# of seconds to test = %ld\n", nseconds);
} /* end if */
/* Set the random seed */
if(0 == use_seed) {
struct timeval t;
- gettimeofday(&t, NULL);
+ HDgettimeofday(&t, NULL);
random_seed = (unsigned)(t.tv_usec);
} /* end if */
- srandom(random_seed);
+ HDsrandom(random_seed);
/* ALWAYS emit the random seed for possible debugging */
- fprintf(stderr, "Using reader random seed: %u\n", random_seed);
+ HDfprintf(stderr, "Using reader random seed: %u\n", random_seed);
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Generating symbol names\n");
+ HDfprintf(stderr, "Generating symbol names\n");
/* Generate dataset names */
if(generate_symbols() < 0) {
- fprintf(stderr, "Error generating symbol names!\n");
- exit(1);
+ HDfprintf(stderr, "Error generating symbol names!\n");
+ HDexit(1);
} /* end if */
/* Create datatype for creating datasets */
@@ -481,28 +478,28 @@ int main(int argc, const char *argv[])
/* Reading records from datasets */
if(read_records(FILENAME, verbose, (unsigned long)nseconds, (unsigned)poll_time, (unsigned)ncommon, (unsigned)nrandom) < 0) {
- fprintf(stderr, "Error reading records from datasets!\n");
- exit(1);
+ HDfprintf(stderr, "Error reading records from datasets!\n");
+ HDexit(1);
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Releasing symbols\n");
+ HDfprintf(stderr, "Releasing symbols\n");
/* Clean up the symbols */
if(shutdown_symbols() < 0) {
- fprintf(stderr, "Error releasing symbols!\n");
- exit(1);
+ HDfprintf(stderr, "Error releasing symbols!\n");
+ HDexit(1);
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Closing objects\n");
+ HDfprintf(stderr, "Closing objects\n");
/* Close objects created */
if(H5Tclose(symbol_tid) < 0) {
- fprintf(stderr, "Error closing symbol datatype!\n");
- exit(1);
+ HDfprintf(stderr, "Error closing symbol datatype!\n");
+ HDexit(1);
} /* end if */
return 0;
diff --git a/test/swmr_remove_reader.c b/test/swmr_remove_reader.c
index 76c44fa..689b010 100644
--- a/test/swmr_remove_reader.c
+++ b/test/swmr_remove_reader.c
@@ -31,10 +31,7 @@
/* Headers */
/***********/
-#include <assert.h>
-#include <unistd.h>
-#include <sys/time.h>
-
+#include "h5test.h"
#include "swmr_common.h"
/*******************/
@@ -92,10 +89,10 @@ check_dataset(hid_t fid, unsigned verbose, const char *sym_name, symbol_t *recor
hssize_t snpoints; /* Number of elements in dataset */
hsize_t start[2] = {0, 0}, count[2] = {1, 1}; /* Hyperslab selection values */
- assert(fid >= 0);
- assert(sym_name);
- assert(record);
- assert(rec_sid >= 0);
+ HDassert(fid >= 0);
+ HDassert(sym_name);
+ HDassert(record);
+ HDassert(rec_sid >= 0);
/* Open dataset for symbol */
if((dsid = H5Dopen2(fid, sym_name, H5P_DEFAULT)) < 0)
@@ -111,13 +108,13 @@ check_dataset(hid_t fid, unsigned verbose, const char *sym_name, symbol_t *recor
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Symbol = '%s', # of records = %lld\n", sym_name, (long long)snpoints);
+ HDfprintf(stderr, "Symbol = '%s', # of records = %lld\n", sym_name, (long long)snpoints);
/* Check if there are records for symbol */
if(snpoints > 0) {
/* Choose a random record in the dataset, choosing the last record half
* the time */
- start[1] = (hsize_t)(random() % (snpoints * 2));
+ start[1] = (hsize_t)(HDrandom() % (snpoints * 2));
if(start[1] > (hsize_t)(snpoints - 1))
start[1] = (hsize_t)(snpoints - 1);
if(H5Sselect_hyperslab(file_sid, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
@@ -140,9 +137,9 @@ check_dataset(hid_t fid, unsigned verbose, const char *sym_name, symbol_t *recor
* chunk may be deleted before the object header has the updated
* dimensions */
if(record->rec_id != start[1] && record->rec_id != (uint64_t)0) {
- fprintf(stderr, "*** ERROR ***\n");
- fprintf(stderr, "Incorrect record value!\n");
- fprintf(stderr, "Symbol = '%s', # of records = %lld, record->rec_id = %llx\n", sym_name, (long long)snpoints, (unsigned long long)record->rec_id);
+ HDfprintf(stderr, "*** ERROR ***\n");
+ HDfprintf(stderr, "Incorrect record value!\n");
+ HDfprintf(stderr, "Symbol = '%s', # of records = %lld, record->rec_id = %llx\n", sym_name, (long long)snpoints, (unsigned long long)record->rec_id);
return -1;
} /* end if */
} /* end if */
@@ -208,22 +205,22 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds,
symbol_t record; /* The record to add to the dataset */
unsigned v; /* Local index variable */
- assert(filename);
- assert(nseconds != 0);
- assert(poll_time != 0);
+ HDassert(filename);
+ HDassert(nseconds != 0);
+ HDassert(poll_time != 0);
/* Reset the record */
/* (record's 'info' field might need to change for each record written, also) */
- memset(&record, 0, sizeof(record));
+ HDmemset(&record, 0, sizeof(record));
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Choosing datasets\n");
+ HDfprintf(stderr, "Choosing datasets\n");
/* Allocate space for 'common' datasets, if any */
if(ncommon > 0) {
/* Allocate array to hold pointers to symbols for common datasets */
- if(NULL == (sym_com = (symbol_info_t **)malloc(sizeof(symbol_info_t *) * ncommon)))
+ if(NULL == (sym_com = (symbol_info_t **)HDmalloc(sizeof(symbol_info_t *) * ncommon)))
return -1;
/* Open the common datasets */
@@ -232,19 +229,19 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds,
/* Determine the offset of the symbol, within level 0 symbols */
/* (level 0 symbols are the most common symbols) */
- offset = (unsigned)(random() % symbol_count[0]);
+ offset = (unsigned)(HDrandom() % symbol_count[0]);
sym_com[v] = &symbol_info[0][offset];
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Common symbol #%u = '%s'\n", v, symbol_info[0][offset].name);
+ HDfprintf(stderr, "Common symbol #%u = '%s'\n", v, symbol_info[0][offset].name);
} /* end for */
} /* end if */
/* Allocate space for 'random' datasets, if any */
if(nrandom > 0) {
/* Allocate array to hold pointers to symbols for random datasets */
- if(NULL == (sym_rand = (symbol_info_t **)malloc(sizeof(symbol_info_t *) * nrandom)))
+ if(NULL == (sym_rand = (symbol_info_t **)HDmalloc(sizeof(symbol_info_t *) * nrandom)))
return -1;
/* Determine the random datasets */
@@ -258,7 +255,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds,
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Random symbol #%u = '%s'\n", v, sym->name);
+ HDfprintf(stderr, "Random symbol #%u = '%s'\n", v, sym->name);
} /* end for */
} /* end if */
@@ -268,10 +265,10 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds,
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Reading records\n");
+ HDfprintf(stderr, "Reading records\n");
/* Get the starting time */
- start_time = time(NULL);
+ start_time = HDtime(NULL);
curr_time = start_time;
/* Create file access property list */
@@ -283,7 +280,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds,
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Opening file: %s\n", filename);
+ HDfprintf(stderr, "Opening file: %s\n", filename);
/* Open the file */
if((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
@@ -293,14 +290,14 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds,
if(ncommon > 0) {
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Checking common symbols\n");
+ HDfprintf(stderr, "Checking common symbols\n");
/* Iterate over common datasets */
for(v = 0; v < ncommon; v++) {
/* Check common dataset */
if(check_dataset(fid, verbose, sym_com[v]->name, &record, mem_sid) < 0)
return -1;
- memset(&record, 0, sizeof(record));
+ HDmemset(&record, 0, sizeof(record));
} /* end for */
} /* end if */
@@ -308,30 +305,30 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds,
if(nrandom > 0) {
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Checking random symbols\n");
+ HDfprintf(stderr, "Checking random symbols\n");
/* Iterate over random datasets */
for(v = 0; v < nrandom; v++) {
/* Check random dataset */
if(check_dataset(fid, verbose, sym_rand[v]->name, &record, mem_sid) < 0)
return -1;
- memset(&record, 0, sizeof(record));
+ HDmemset(&record, 0, sizeof(record));
} /* end for */
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Closing file\n");
+ HDfprintf(stderr, "Closing file\n");
/* Close the file */
if(H5Fclose(fid) < 0)
return -1;
/* Sleep for the appropriate # of seconds */
- sleep(poll_time);
+ HDsleep(poll_time);
/* Retrieve the current time */
- curr_time = time(NULL);
+ curr_time = HDtime(NULL);
} /* end while */
/* Close the fapl */
@@ -344,18 +341,18 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds,
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Closing datasets\n");
+ HDfprintf(stderr, "Closing datasets\n");
/* Close 'random' datasets, if any */
if(nrandom > 0) {
/* Release array holding dataset ID's for random datasets */
- free(sym_rand);
+ HDfree(sym_rand);
} /* end if */
/* Close 'common' datasets, if any */
if(ncommon > 0) {
/* Release array holding dataset ID's for common datasets */
- free(sym_com);
+ HDfree(sym_com);
} /* end if */
return 0;
@@ -375,7 +372,7 @@ usage(void)
printf("5 common symbols to poll ('-h 5'), 10 random symbols to poll ('-l 10'),\n");
printf("and will generate a random seed (no -r given).\n");
printf("\n");
- exit(1);
+ HDexit(1);
}
int main(int argc, const char *argv[])
@@ -400,7 +397,7 @@ int main(int argc, const char *argv[])
switch(argv[u][1]) {
/* # of common symbols to poll */
case 'h':
- ncommon = atoi(argv[u + 1]);
+ ncommon = HDatoi(argv[u + 1]);
if(ncommon < 0)
usage();
u += 2;
@@ -408,7 +405,7 @@ int main(int argc, const char *argv[])
/* # of random symbols to poll */
case 'l':
- nrandom = atoi(argv[u + 1]);
+ nrandom = HDatoi(argv[u + 1]);
if(nrandom < 0)
usage();
u += 2;
@@ -423,7 +420,7 @@ int main(int argc, const char *argv[])
/* Random # seed */
case 'r':
use_seed = 1;
- temp = atoi(argv[u + 1]);
+ temp = HDatoi(argv[u + 1]);
if(temp < 0)
usage();
else
@@ -433,7 +430,7 @@ int main(int argc, const char *argv[])
/* # of seconds between polling */
case 's':
- poll_time = atoi(argv[u + 1]);
+ poll_time = HDatoi(argv[u + 1]);
if(poll_time < 0)
usage();
u += 2;
@@ -446,7 +443,7 @@ int main(int argc, const char *argv[])
} /* end if */
else {
/* Get the number of records to append */
- nseconds = atol(argv[u]);
+ nseconds = HDatol(argv[u]);
if(nseconds <= 0)
usage();
@@ -461,31 +458,31 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose) {
- fprintf(stderr, "Parameters:\n");
- fprintf(stderr, "\t# of seconds between polling = %d\n", poll_time);
- fprintf(stderr, "\t# of common symbols to poll = %d\n", ncommon);
- fprintf(stderr, "\t# of random symbols to poll = %d\n", nrandom);
- fprintf(stderr, "\t# of seconds to test = %ld\n", nseconds);
+ HDfprintf(stderr, "Parameters:\n");
+ HDfprintf(stderr, "\t# of seconds between polling = %d\n", poll_time);
+ HDfprintf(stderr, "\t# of common symbols to poll = %d\n", ncommon);
+ HDfprintf(stderr, "\t# of random symbols to poll = %d\n", nrandom);
+ HDfprintf(stderr, "\t# of seconds to test = %ld\n", nseconds);
} /* end if */
/* Set the random seed */
if(0 == use_seed) {
struct timeval t;
- gettimeofday(&t, NULL);
+ HDgettimeofday(&t, NULL);
random_seed = (unsigned)(t.tv_usec);
} /* end if */
- srandom(random_seed);
+ HDsrandom(random_seed);
/* ALWAYS emit the random seed for possible debugging */
- fprintf(stderr, "Using reader random seed: %u\n", random_seed);
+ HDfprintf(stderr, "Using reader random seed: %u\n", random_seed);
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Generating symbol names\n");
+ HDfprintf(stderr, "Generating symbol names\n");
/* Generate dataset names */
if(generate_symbols() < 0) {
- fprintf(stderr, "Error generating symbol names!\n");
- exit(1);
+ HDfprintf(stderr, "Error generating symbol names!\n");
+ HDexit(1);
} /* end if */
/* Create datatype for creating datasets */
@@ -494,28 +491,28 @@ int main(int argc, const char *argv[])
/* Reading records from datasets */
if(read_records(FILENAME, verbose, (unsigned long)nseconds, (unsigned)poll_time, (unsigned)ncommon, (unsigned)nrandom) < 0) {
- fprintf(stderr, "Error reading records from datasets!\n");
- exit(1);
+ HDfprintf(stderr, "Error reading records from datasets!\n");
+ HDexit(1);
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Releasing symbols\n");
+ HDfprintf(stderr, "Releasing symbols\n");
/* Clean up the symbols */
if(shutdown_symbols() < 0) {
- fprintf(stderr, "Error releasing symbols!\n");
- exit(1);
+ HDfprintf(stderr, "Error releasing symbols!\n");
+ HDexit(1);
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Closing objects\n");
+ HDfprintf(stderr, "Closing objects\n");
/* Close objects created */
if(H5Tclose(symbol_tid) < 0) {
- fprintf(stderr, "Error closing symbol datatype!\n");
- exit(1);
+ HDfprintf(stderr, "Error closing symbol datatype!\n");
+ HDexit(1);
} /* end if */
return 0;
diff --git a/test/swmr_remove_writer.c b/test/swmr_remove_writer.c
index a4f030c..8f111a2 100644
--- a/test/swmr_remove_writer.c
+++ b/test/swmr_remove_writer.c
@@ -33,9 +33,7 @@
/* Headers */
/***********/
-#include <assert.h>
-#include <sys/time.h>
-
+#include "h5test.h"
#include "swmr_common.h"
/****************/
@@ -82,16 +80,16 @@ open_skeleton(const char *filename, unsigned verbose, unsigned old)
hsize_t dim[2]; /* Dataspace dimensions */
unsigned u, v; /* Local index variable */
- assert(filename);
+ HDassert(filename);
/* Create file access property list */
if((fapl = h5_fileaccess()) < 0)
return -1;
if(!old) {
- /* Set to use the latest library format */
- if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- return -1;
+ /* Set to use the latest library format */
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ return -1;
}
#ifdef QAK
@@ -101,8 +99,8 @@ open_skeleton(const char *filename, unsigned verbose, unsigned old)
mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
H5Pget_mdc_config(fapl, &mdc_config);
- fprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
- fprintf(stderr, "mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
+ HDfprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
+ HDfprintf(stderr, "mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
mdc_config.set_initial_size = 1;
mdc_config.initial_size = 16 * 1024 * 1024;
/* mdc_config.epoch_length = 5000; */
@@ -124,7 +122,7 @@ open_skeleton(const char *filename, unsigned verbose, unsigned old)
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Opening datasets\n");
+ HDfprintf(stderr, "Opening datasets\n");
/* Open the datasets */
for(u = 0; u < NLEVELS; u++)
@@ -174,7 +172,7 @@ remove_records(hid_t fid, unsigned verbose, unsigned long nshrinks, unsigned lon
hsize_t dim[2] = {1,0}; /* Dataspace dimensions */
unsigned long u, v; /* Local index variables */
- assert(fid >= 0);
+ HDassert(fid >= 0);
/* Remove records from random datasets, according to frequency distribution */
shrink_to_flush = flush_count;
@@ -186,7 +184,7 @@ remove_records(hid_t fid, unsigned verbose, unsigned long nshrinks, unsigned lon
symbol = choose_dataset();
/* Shrink the dataset's dataspace */
- remove_size = (hsize_t)random() % MAX_REMOVE_SIZE + 1;
+ remove_size = (hsize_t)HDrandom() % MAX_REMOVE_SIZE + 1;
if(remove_size > symbol->nrecords)
symbol->nrecords = 0;
else
@@ -214,7 +212,7 @@ remove_records(hid_t fid, unsigned verbose, unsigned long nshrinks, unsigned lon
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Closing datasets\n");
+ HDfprintf(stderr, "Closing datasets\n");
/* Close the datasets */
for(u = 0; u < NLEVELS; u++)
@@ -240,7 +238,7 @@ usage(void)
printf("Defaults to verbose (no '-q' given), latest format when opening file (no '-o' given),\n");
printf("flushing every 1000 shrinks ('-f 1000'), and will generate a random seed (no -r given).\n");
printf("\n");
- exit(1);
+ HDexit(1);
}
int main(int argc, const char *argv[])
@@ -249,7 +247,7 @@ int main(int argc, const char *argv[])
long nshrinks = 0; /* # of times to shrink the dataset */
long flush_count = 1000; /* # of records to write between flushing file */
unsigned verbose = 1; /* Whether to emit some informational messages */
- unsigned old = 0; /* Whether to use non-latest-format when opening file */
+ unsigned old = 0; /* Whether to use non-latest-format when opening file */
unsigned use_seed = 0; /* Set to 1 if a seed was set on the command line */
unsigned random_seed = 0; /* Random # seed */
unsigned u; /* Local index variable */
@@ -265,7 +263,7 @@ int main(int argc, const char *argv[])
switch(argv[u][1]) {
/* # of records to write between flushing file */
case 'f':
- flush_count = atol(argv[u + 1]);
+ flush_count = HDatol(argv[u + 1]);
if(flush_count < 0)
usage();
u += 2;
@@ -280,16 +278,16 @@ int main(int argc, const char *argv[])
/* Random # seed */
case 'r':
use_seed = 1;
- temp = atoi(argv[u + 1]);
+ temp = HDatoi(argv[u + 1]);
random_seed = (unsigned)temp;
u += 2;
break;
- /* Use non-latest-format when opening file */
+ /* Use non-latest-format when opening file */
case 'o':
- old = 1;
- u++;
- break;
+ old = 1;
+ u++;
+ break;
default:
usage();
@@ -298,7 +296,7 @@ int main(int argc, const char *argv[])
} /* end if */
else {
/* Get the number of records to append */
- nshrinks = atol(argv[u]);
+ nshrinks = HDatol(argv[u]);
if(nshrinks <= 0)
usage();
@@ -313,24 +311,24 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose) {
- fprintf(stderr, "Parameters:\n");
- fprintf(stderr, "\t# of shrinks between flushes = %ld\n", flush_count);
- fprintf(stderr, "\t# of shrinks = %ld\n", nshrinks);
+ HDfprintf(stderr, "Parameters:\n");
+ HDfprintf(stderr, "\t# of shrinks between flushes = %ld\n", flush_count);
+ HDfprintf(stderr, "\t# of shrinks = %ld\n", nshrinks);
} /* end if */
/* Set the random seed */
if(0 == use_seed) {
struct timeval t;
- gettimeofday(&t, NULL);
+ HDgettimeofday(&t, NULL);
random_seed = (unsigned)(t.tv_usec);
} /* end if */
- srandom(random_seed);
+ HDsrandom(random_seed);
/* ALWAYS emit the random seed for possible debugging */
- fprintf(stderr, "Using writer random seed: %u\n", random_seed);
+ HDfprintf(stderr, "Using writer random seed: %u\n", random_seed);
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Generating symbol names\n");
+ HDfprintf(stderr, "Generating symbol names\n");
/* Generate dataset names */
if(generate_symbols() < 0)
@@ -338,12 +336,12 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Opening skeleton file: %s\n", FILENAME);
+ HDfprintf(stderr, "Opening skeleton file: %s\n", FILENAME);
/* Open file skeleton */
if((fid = open_skeleton(FILENAME, verbose, old)) < 0) {
- fprintf(stderr, "Error opening skeleton file!\n");
- exit(1);
+ HDfprintf(stderr, "Error opening skeleton file!\n");
+ HDexit(1);
} /* end if */
/* Send a message to indicate "H5Fopen" is complete--releasing the file lock */
@@ -351,32 +349,32 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Removing records\n");
+ HDfprintf(stderr, "Removing records\n");
/* Remove records from datasets */
if(remove_records(fid, verbose, (unsigned long)nshrinks, (unsigned long)flush_count) < 0) {
- fprintf(stderr, "Error removing records from datasets!\n");
- exit(1);
+ HDfprintf(stderr, "Error removing records from datasets!\n");
+ HDexit(1);
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Releasing symbols\n");
+ HDfprintf(stderr, "Releasing symbols\n");
/* Clean up the symbols */
if(shutdown_symbols() < 0) {
- fprintf(stderr, "Error releasing symbols!\n");
- exit(1);
+ HDfprintf(stderr, "Error releasing symbols!\n");
+ HDexit(1);
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Closing objects\n");
+ HDfprintf(stderr, "Closing objects\n");
/* Close objects opened */
if(H5Fclose(fid) < 0) {
- fprintf(stderr, "Error closing file!\n");
- exit(1);
+ HDfprintf(stderr, "Error closing file!\n");
+ HDexit(1);
} /* end if */
return 0;
diff --git a/test/swmr_sparse_reader.c b/test/swmr_sparse_reader.c
index c7841a9..f755cd2 100644
--- a/test/swmr_sparse_reader.c
+++ b/test/swmr_sparse_reader.c
@@ -31,11 +31,9 @@
/* Headers */
/***********/
-#include <assert.h>
+#include "h5test.h"
#include "swmr_common.h"
-#include <unistd.h>
-
/****************/
/* Local Macros */
/****************/
@@ -98,10 +96,10 @@ check_dataset(hid_t fid, unsigned verbose, const symbol_info_t *symbol, symbol_t
hsize_t start[2] = {0, 0}; /* Hyperslab selection values */
hsize_t count[2] = {1, 1}; /* Hyperslab selection values */
- assert(fid >= 0);
- assert(symbol);
- assert(record);
- assert(rec_sid >= 0);
+ HDassert(fid >= 0);
+ HDassert(symbol);
+ HDassert(record);
+ HDassert(rec_sid >= 0);
/* Open dataset for symbol */
if((dsid = H5Dopen2(fid, symbol->name, H5P_DEFAULT)) < 0)
@@ -113,13 +111,13 @@ check_dataset(hid_t fid, unsigned verbose, const symbol_info_t *symbol, symbol_t
/* Choose the random record in the dataset (will be the same as chosen by
* the writer) */
- start[1] = (hsize_t)random() % symbol->nrecords;
+ start[1] = (hsize_t)HDrandom() % symbol->nrecords;
if(H5Sselect_hyperslab(file_sid, H5S_SELECT_SET, start, NULL, count, NULL) < 0)
return -1;
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Symbol = '%s', location = %lld\n", symbol->name, (long long)start);
+ HDfprintf(stderr, "Symbol = '%s', location = %lld\n", symbol->name, (long long)start);
/* Read record from dataset */
record->rec_id = (uint64_t)ULLONG_MAX;
@@ -128,10 +126,10 @@ check_dataset(hid_t fid, unsigned verbose, const symbol_info_t *symbol, symbol_t
/* Verify record value */
if(record->rec_id != start[1]) {
- fprintf(stderr, "*** ERROR ***\n");
- fprintf(stderr, "Incorrect record value!\n");
- fprintf(stderr, "Symbol = '%s', location = %lld, record->rec_id = %llu\n", symbol->name, (long long)start, (unsigned long long)record->rec_id);
- return(-1);
+ HDfprintf(stderr, "*** ERROR ***\n");
+ HDfprintf(stderr, "Incorrect record value!\n");
+ HDfprintf(stderr, "Symbol = '%s', location = %lld, record->rec_id = %llu\n", symbol->name, (long long)start, (unsigned long long)record->rec_id);
+ return -1;
} /* end if */
/* Close the dataset's dataspace */
@@ -187,8 +185,8 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords,
unsigned long u; /* Local index variable */
hid_t fapl;
- assert(filename);
- assert(poll_time != 0);
+ HDassert(filename);
+ HDassert(poll_time != 0);
/* Create file access property list */
if((fapl = h5_fileaccess()) < 0)
@@ -198,7 +196,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords,
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Opening file: %s\n", filename);
+ HDfprintf(stderr, "Opening file: %s\n", filename);
/* Open the file */
if((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
@@ -211,11 +209,11 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords,
return -1;
if(H5Aclose(aid) < 0)
return -1;
- srandom(seed);
+ HDsrandom(seed);
/* Reset the record */
/* (record's 'info' field might need to change for each record written, also) */
- memset(&record, 0, sizeof(record));
+ HDmemset(&record, 0, sizeof(record));
/* Create a dataspace for the record to read */
if((mem_sid = H5Screate(H5S_SCALAR)) < 0)
@@ -223,10 +221,10 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords,
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Reading records\n");
+ HDfprintf(stderr, "Reading records\n");
/* Get the starting time */
- start_time = time(NULL);
+ start_time = HDtime(NULL);
/* Read records */
for(u = 0; u < nrecords; u++) {
@@ -263,17 +261,17 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords,
} /* end if */
/* Check for timeout */
- if(time(NULL) >= (time_t)(start_time + (time_t)TIMEOUT)) {
- fprintf(stderr, "Reader timed out\n");
+ if(HDtime(NULL) >= (time_t)(start_time + (time_t)TIMEOUT)) {
+ HDfprintf(stderr, "Reader timed out\n");
return -1;
} /* end if */
/* Pause */
- sleep(poll_time);
+ HDsleep(poll_time);
- /* Retrieve and print the collection of metadata read retries */
- if(print_metadata_retries_info(fid) < 0)
- fprintf(stderr, "Warning: could not obtain metadata retries info\n");
+ /* Retrieve and print the collection of metadata read retries */
+ if(print_metadata_retries_info(fid) < 0)
+ HDfprintf(stderr, "Warning: could not obtain metadata retries info\n");
/* Reopen the file */
if(H5Fclose(fid) < 0)
@@ -285,23 +283,23 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords,
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Checking dataset %lu\n", u);
+ HDfprintf(stderr, "Checking dataset %lu\n", u);
/* Check dataset */
if(check_dataset(fid, verbose, symbol, &record, mem_sid) < 0)
return -1;
- memset(&record, 0, sizeof(record));
+ HDmemset(&record, 0, sizeof(record));
/* Check for reopen */
iter_to_reopen--;
if(iter_to_reopen == 0) {
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Reopening file: %s\n", filename);
+ HDfprintf(stderr, "Reopening file: %s\n", filename);
- /* Retrieve and print the collection of metadata read retries */
- if(print_metadata_retries_info(fid) < 0)
- fprintf(stderr, "Warning: could not obtain metadata retries info\n");
+ /* Retrieve and print the collection of metadata read retries */
+ if(print_metadata_retries_info(fid) < 0)
+ HDfprintf(stderr, "Warning: could not obtain metadata retries info\n");
/* Reopen the file */
if(H5Fclose(fid) < 0)
@@ -314,7 +312,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords,
/* Retrieve and print the collection of metadata read retries */
if(print_metadata_retries_info(fid) < 0)
- fprintf(stderr, "Warning: could not obtain metadata retries info\n");
+ HDfprintf(stderr, "Warning: could not obtain metadata retries info\n");
/* Close file */
if(H5Fclose(fid) < 0)
@@ -342,7 +340,7 @@ usage(void)
printf("Note that the # of records *must* be the same as that supplied to\n");
printf("swmr_sparse_writer\n");
printf("\n");
- exit(1);
+ HDexit(1);
} /* end usage() */
int main(int argc, const char *argv[])
@@ -363,7 +361,7 @@ int main(int argc, const char *argv[])
switch(argv[u][1]) {
/* # of reads between reopens */
case 'n':
- reopen_count = atoi(argv[u + 1]);
+ reopen_count = HDatoi(argv[u + 1]);
if(reopen_count < 0)
usage();
u += 2;
@@ -377,7 +375,7 @@ int main(int argc, const char *argv[])
/* # of seconds between polling */
case 's':
- poll_time = atoi(argv[u + 1]);
+ poll_time = HDatoi(argv[u + 1]);
if(poll_time < 0)
usage();
u += 2;
@@ -390,7 +388,7 @@ int main(int argc, const char *argv[])
} /* end if */
else {
/* Get the number of records to read */
- nrecords = atol(argv[u]);
+ nrecords = HDatol(argv[u]);
if(nrecords <= 0)
usage();
@@ -401,20 +399,20 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose) {
- fprintf(stderr, "Parameters:\n");
- fprintf(stderr, "\t# of seconds between polling = %d\n", poll_time);
- fprintf(stderr, "\t# of reads between reopens = %d\n", reopen_count);
- fprintf(stderr, "\t# of records to read = %ld\n", nrecords);
+ HDfprintf(stderr, "Parameters:\n");
+ HDfprintf(stderr, "\t# of seconds between polling = %d\n", poll_time);
+ HDfprintf(stderr, "\t# of reads between reopens = %d\n", reopen_count);
+ HDfprintf(stderr, "\t# of records to read = %ld\n", nrecords);
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Generating symbol names\n");
+ HDfprintf(stderr, "Generating symbol names\n");
/* Generate dataset names */
if(generate_symbols() < 0) {
- fprintf(stderr, "Error generating symbol names!\n");
- exit(1);
+ HDfprintf(stderr, "Error generating symbol names!\n");
+ HDexit(1);
} /* end if */
/* Create datatype for creating datasets */
@@ -423,28 +421,28 @@ int main(int argc, const char *argv[])
/* Reading records from datasets */
if(read_records(FILENAME, verbose, (unsigned long) nrecords, (unsigned)poll_time, (unsigned)reopen_count) < 0) {
- fprintf(stderr, "Error reading records from datasets!\n");
- exit(1);
+ HDfprintf(stderr, "Error reading records from datasets!\n");
+ HDexit(1);
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Releasing symbols\n");
+ HDfprintf(stderr, "Releasing symbols\n");
/* Clean up the symbols */
if(shutdown_symbols() < 0) {
- fprintf(stderr, "Error releasing symbols!\n");
- exit(1);
+ HDfprintf(stderr, "Error releasing symbols!\n");
+ HDexit(1);
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Closing objects\n");
+ HDfprintf(stderr, "Closing objects\n");
/* Close objects created */
if(H5Tclose(symbol_tid) < 0) {
- fprintf(stderr, "Error closing symbol datatype!\n");
- exit(1);
+ HDfprintf(stderr, "Error closing symbol datatype!\n");
+ HDexit(1);
} /* end if */
return 0;
diff --git a/test/swmr_sparse_writer.c b/test/swmr_sparse_writer.c
index e752cb3..66afb3b 100644
--- a/test/swmr_sparse_writer.c
+++ b/test/swmr_sparse_writer.c
@@ -30,8 +30,7 @@
/* Headers */
/***********/
-#include <assert.h>
-
+#include "h5test.h"
#include "swmr_common.h"
/****************/
@@ -80,7 +79,7 @@ open_skeleton(const char *filename, unsigned verbose)
unsigned seed; /* Seed for random number generator */
unsigned u, v; /* Local index variable */
- assert(filename);
+ HDassert(filename);
/* Create file access property list */
if((fapl = h5_fileaccess()) < 0)
@@ -97,8 +96,8 @@ open_skeleton(const char *filename, unsigned verbose)
mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
H5Pget_mdc_config(fapl, &mdc_config);
- fprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
- fprintf(stderr,"mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
+ HDfprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
+ HDfprintf(stderr,"mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
mdc_config.set_initial_size = 1;
mdc_config.initial_size = 16 * 1024 * 1024;
/* mdc_config.epoch_length = 5000; */
@@ -129,7 +128,7 @@ open_skeleton(const char *filename, unsigned verbose)
return -1;
if(H5Aclose(aid) < 0)
return -1;
- srandom(seed);
+ HDsrandom(seed);
/* Open the datasets */
for(u = 0; u < NLEVELS; u++)
@@ -181,11 +180,11 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
hsize_t dim[2] = {1,0}; /* Dataspace dimensions */
unsigned long u, v; /* Local index variables */
- assert(fid >= 0);
+ HDassert(fid >= 0);
/* Reset the record */
/* (record's 'info' field might need to change for each record written, also) */
- memset(&record, 0, sizeof(record));
+ HDmemset(&record, 0, sizeof(record));
/* Create a dataspace for the record to add */
if((mem_sid = H5Screate(H5S_SCALAR)) < 0)
@@ -200,7 +199,7 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
mdc_config_orig.version = H5AC__CURR_CACHE_CONFIG_VERSION;
if(H5Fget_mdc_config(fid, &mdc_config_orig) < 0)
return -1;
- memcpy(&mdc_config_cork, &mdc_config_orig, sizeof(mdc_config_cork));
+ HDmemcpy(&mdc_config_cork, &mdc_config_orig, sizeof(mdc_config_cork));
mdc_config_cork.evictions_enabled = FALSE;
mdc_config_cork.incr_mode = H5C_incr__off;
mdc_config_cork.flash_incr_mode = H5C_flash_incr__off;
@@ -241,7 +240,7 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
return -1;
/* Get the coordinate to write */
- start[1] = (hsize_t)random() % symbol->nrecords;
+ start[1] = (hsize_t)HDrandom() % symbol->nrecords;
/* Set the record's ID (equal to its position) */
record.rec_id = start[1];
@@ -345,7 +344,7 @@ usage(void)
printf("Defaults to verbose (no '-q' given) and flushing every 1000 records\n");
printf("('-f 1000')\n");
printf("\n");
- exit(1);
+ HDexit(1);
}
int main(int argc, const char *argv[])
@@ -366,7 +365,7 @@ int main(int argc, const char *argv[])
switch(argv[u][1]) {
/* # of records to write between flushing file */
case 'f':
- flush_count = atol(argv[u + 1]);
+ flush_count = HDatol(argv[u + 1]);
if(flush_count < 0)
usage();
u += 2;
@@ -385,7 +384,7 @@ int main(int argc, const char *argv[])
} /* end if */
else {
/* Get the number of records to append */
- nrecords = atol(argv[u]);
+ nrecords = HDatol(argv[u]);
if(nrecords <= 0)
usage();
@@ -400,14 +399,14 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose) {
- fprintf(stderr, "Parameters:\n");
- fprintf(stderr, "\t# of records between flushes = %ld\n", flush_count);
- fprintf(stderr, "\t# of records to write = %ld\n", nrecords);
+ HDfprintf(stderr, "Parameters:\n");
+ HDfprintf(stderr, "\t# of records between flushes = %ld\n", flush_count);
+ HDfprintf(stderr, "\t# of records to write = %ld\n", nrecords);
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Generating symbol names\n");
+ HDfprintf(stderr, "Generating symbol names\n");
/* Generate dataset names */
if(generate_symbols() < 0)
@@ -415,12 +414,12 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Opening skeleton file: %s\n", FILENAME);
+ HDfprintf(stderr, "Opening skeleton file: %s\n", FILENAME);
/* Open file skeleton */
if((fid = open_skeleton(FILENAME, verbose)) < 0) {
- fprintf(stderr, "Error opening skeleton file!\n");
- exit(1);
+ HDfprintf(stderr, "Error opening skeleton file!\n");
+ HDexit(1);
} /* end if */
/* Send a message to indicate "H5Fopen" is complete--releasing the file lock */
@@ -428,32 +427,32 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Adding records\n");
+ HDfprintf(stderr, "Adding records\n");
/* Append records to datasets */
if(add_records(fid, verbose, (unsigned long)nrecords, (unsigned long)flush_count) < 0) {
- fprintf(stderr, "Error appending records to datasets!\n");
- exit(1);
+ HDfprintf(stderr, "Error appending records to datasets!\n");
+ HDexit(1);
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Releasing symbols\n");
+ HDfprintf(stderr, "Releasing symbols\n");
/* Clean up the symbols */
if(shutdown_symbols() < 0) {
- fprintf(stderr, "Error releasing symbols!\n");
- exit(1);
+ HDfprintf(stderr, "Error releasing symbols!\n");
+ HDexit(1);
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Closing objects\n");
+ HDfprintf(stderr, "Closing objects\n");
/* Close objects opened */
if(H5Fclose(fid) < 0) {
- fprintf(stderr, "Error closing file!\n");
- exit(1);
+ HDfprintf(stderr, "Error closing file!\n");
+ HDexit(1);
} /* end if */
return 0;
diff --git a/test/swmr_start_write.c b/test/swmr_start_write.c
index 0069bc7..fe8690f 100644
--- a/test/swmr_start_write.c
+++ b/test/swmr_start_write.c
@@ -18,12 +18,12 @@
* Created: swmr_start_write.c
*
* Purpose: This program enables SWMR writing mode via H5Fstart_swmr_write().
- * It writes data to a randomly selected subset of the datasets
+ * It writes data to a randomly selected subset of the datasets
* in the SWMR test file; and it is intended to run concurrently
* with the swmr_reader program.
*
* NOTE: The routines in this program are basically copied and modified from
- * swmr*.c.
+ * swmr*.c.
*-------------------------------------------------------------------------
*/
@@ -31,9 +31,7 @@
/* Headers */
/***********/
-#include <assert.h>
-#include <sys/time.h>
-
+#include "h5test.h"
#include "swmr_common.h"
/********************/
@@ -61,12 +59,12 @@ static void usage(void);
* which will be used for testing H5Fstart_swmr_write().
*
* Parameters:
- * filename: The SWMR test file's name.
+ * filename: The SWMR test file's name.
* verbose: whether verbose console output is desired.
* index_type: The chunk index type (b1 | b2 | ea | fa)
- * random_seed: The random seed to store in the file.
- * The sparse tests use this value.
- *
+ * random_seed: The random seed to store in the file.
+ * The sparse tests use this value.
+ *
* Return: Success: the file ID
* Failure: -1
*
@@ -86,8 +84,8 @@ create_file(const char *filename, unsigned verbose,
symbol_t fillval; /* Dataset fill value */
#endif /* FILLVAL_WORKS */
- assert(filename);
- assert(index_type);
+ HDassert(filename);
+ HDassert(index_type);
/* Create file access property list */
if((fapl = h5_fileaccess()) < 0)
@@ -101,7 +99,7 @@ create_file(const char *filename, unsigned verbose,
* With one unlimited dimension, we get the extensible array index
* type, with two unlimited dimensions, we get a v-2 B-tree.
*/
- if(!strcmp(index_type, "b2"))
+ if(!HDstrcmp(index_type, "b2"))
max_dims[0] = H5S_UNLIMITED;
/* Create file creation property list */
@@ -110,7 +108,7 @@ create_file(const char *filename, unsigned verbose,
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Creating file without SWMR access\n");
+ HDfprintf(stderr, "Creating file without SWMR access\n");
/* Create the file */
if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
@@ -144,10 +142,10 @@ create_file(const char *filename, unsigned verbose,
* Function: create_datasets
*
* Purpose: Create datasets (and keep them opened) which will be used for testing
- * H5Fstart_swmr_write().
+ * H5Fstart_swmr_write().
*
* Parameters:
- * fid: file ID for the SWMR test file
+ * fid: file ID for the SWMR test file
* comp_level: the compresssion level
* verbose: whether verbose console output is desired.
*
@@ -187,7 +185,7 @@ create_datasets(hid_t fid, int comp_level, unsigned verbose)
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Creating datasets\n");
+ HDfprintf(stderr, "Creating datasets\n");
/* Create the datasets */
for(u = 0; u < NLEVELS; u++)
@@ -207,10 +205,10 @@ create_datasets(hid_t fid, int comp_level, unsigned verbose)
* Function: create_close_datasets
*
* Purpose: Create and close datasets which will be used for testing
- * H5Fstart_swmr_write().
+ * H5Fstart_swmr_write().
*
* Parameters:
- * fid: file ID for the SWMR test file
+ * fid: file ID for the SWMR test file
* comp_level: the compresssion level
* verbose: whether verbose console output is desired.
*
@@ -250,7 +248,7 @@ create_close_datasets(hid_t fid, int comp_level, unsigned verbose)
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Creating datasets\n");
+ HDfprintf(stderr, "Creating datasets\n");
/* Create the datasets */
for(u = 0; u < NLEVELS; u++)
@@ -284,7 +282,7 @@ create_close_datasets(hid_t fid, int comp_level, unsigned verbose)
* Purpose: Opens the HDF5 test file without SWMR access.
*
* Parameters:
- * filename: The filename of the HDF5 file to open
+ * filename: The filename of the HDF5 file to open
* verbose: whether or not to emit verbose console messages
*
* Return: Success: The file ID of the opened SWMR file
@@ -298,7 +296,7 @@ open_file(const char *filename, unsigned verbose)
hid_t fid; /* File ID for new HDF5 file */
hid_t fapl; /* File access property list */
- assert(filename);
+ HDassert(filename);
/* Create file access property list */
if((fapl = h5_fileaccess()) < 0)
@@ -310,7 +308,7 @@ open_file(const char *filename, unsigned verbose)
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Opening the file without SWMR access: %s\n", filename);
+ HDfprintf(stderr, "Opening the file without SWMR access: %s\n", filename);
/* Open the file */
if((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
@@ -331,7 +329,7 @@ open_file(const char *filename, unsigned verbose)
* Purpose: Opens the datasets.
*
* Parameters:
-* filename: the filename of the SWMR HDF5 file to open
+ * filename: the filename of the SWMR HDF5 file to open
* verbose: whether or not to emit verbose console messages
*
* Return: Success: 0
@@ -346,7 +344,7 @@ open_datasets(hid_t fid, unsigned verbose)
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Opening datasets\n");
+ HDfprintf(stderr, "Opening datasets\n");
/* Open the datasets */
for(u = 0; u < NLEVELS; u++)
@@ -367,7 +365,7 @@ open_datasets(hid_t fid, unsigned verbose)
* the SWMR test file.
*
* Parameters:
-* fid: The file ID of the SWMR HDF5 file
+ * fid: The file ID of the SWMR HDF5 file
* verbose: Whether or not to emit verbose console messages
* nrecords: # of records to write to the datasets
* flush_count: # of records to write before flushing the file to disk
@@ -390,11 +388,11 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
unsigned long rec_to_flush; /* # of records left to write before flush */
unsigned long u, v; /* Local index variables */
- assert(fid >= 0);
+ HDassert(fid >= 0);
/* Reset the record */
/* (record's 'info' field might need to change for each record written, also) */
- memset(&record, 0, sizeof(record));
+ HDmemset(&record, 0, sizeof(record));
/* Create a dataspace for the record to add */
if((mem_sid = H5Screate(H5S_SCALAR)) < 0)
@@ -409,7 +407,7 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
mdc_config_orig.version = H5AC__CURR_CACHE_CONFIG_VERSION;
if(H5Fget_mdc_config(fid, &mdc_config_orig) < 0)
return -1;
- memcpy(&mdc_config_cork, &mdc_config_orig, sizeof(mdc_config_cork));
+ HDmemcpy(&mdc_config_cork, &mdc_config_orig, sizeof(mdc_config_cork));
mdc_config_cork.evictions_enabled = FALSE;
mdc_config_cork.incr_mode = H5C_incr__off;
mdc_config_cork.flash_incr_mode = H5C_flash_incr__off;
@@ -479,7 +477,7 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Closing datasets\n");
+ HDfprintf(stderr, "Closing datasets\n");
/* Close the datasets */
for(u = 0; u < NLEVELS; u++)
@@ -513,7 +511,7 @@ usage(void)
printf("v1 b-tree indexing (-i b1), compression ('-c -1'),\n");
printf("will generate a random seed (no -r given), and verbose (no '-q' given)\n");
printf("\n");
- exit(1);
+ HDexit(1);
} /* usage() */
/*
@@ -525,16 +523,16 @@ usage(void)
*/
int main(int argc, const char *argv[])
{
- hid_t fid; /* File ID for file opened */
- long nrecords = 0; /* # of records to append */
- long flush_count = 10000; /* # of records to write between flushing file */
- unsigned verbose = 1; /* Whether to emit some informational messages */
- unsigned use_seed = 0; /* Set to 1 if a seed was set on the command line */
- unsigned random_seed = 0; /* Random # seed */
- int comp_level = -1; /* Compression level (-1 is no compression) */
- const char *index_type = "b1"; /* Chunk index type */
- unsigned u; /* Local index variable */
- int temp; /* Temporary variable */
+ hid_t fid; /* File ID for file opened */
+ long nrecords = 0; /* # of records to append */
+ long flush_count = 10000; /* # of records to write between flushing file */
+ unsigned verbose = 1; /* Whether to emit some informational messages */
+ unsigned use_seed = 0; /* Set to 1 if a seed was set on the command line */
+ unsigned random_seed = 0; /* Random # seed */
+ int comp_level = -1; /* Compression level (-1 is no compression) */
+ const char *index_type = "b1"; /* Chunk index type */
+ unsigned u; /* Local index variable */
+ int temp; /* Temporary variable */
/* Parse command line options */
if(argc < 2)
@@ -544,9 +542,9 @@ int main(int argc, const char *argv[])
while(u < (unsigned)argc) {
if(argv[u][0] == '-') {
switch(argv[u][1]) {
- /* Compress dataset chunks */
+ /* Compress dataset chunks */
case 'c':
- comp_level = atoi(argv[u + 1]);
+ comp_level = HDatoi(argv[u + 1]);
if(comp_level < -1 || comp_level > 9)
usage();
u += 2;
@@ -555,15 +553,15 @@ int main(int argc, const char *argv[])
/* Chunk index type */
case 'i':
index_type = argv[u + 1];
- if(strcmp(index_type, "ea")
- && strcmp(index_type, "b2"))
+ if(HDstrcmp(index_type, "ea")
+ && HDstrcmp(index_type, "b2"))
usage();
u += 2;
break;
/* # of records to write between flushing file */
case 'f':
- flush_count = atol(argv[u + 1]);
+ flush_count = HDatol(argv[u + 1]);
if(flush_count < 0)
usage();
u += 2;
@@ -578,7 +576,7 @@ int main(int argc, const char *argv[])
/* Random # seed */
case 'r':
use_seed = 1;
- temp = atoi(argv[u + 1]);
+ temp = HDatoi(argv[u + 1]);
if(temp < 0)
usage();
else
@@ -593,7 +591,7 @@ int main(int argc, const char *argv[])
} /* end if */
else {
/* Get the number of records to append */
- nrecords = atol(argv[u]);
+ nrecords = HDatol(argv[u]);
if(nrecords <= 0)
usage();
@@ -609,32 +607,32 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose) {
- fprintf(stderr, "Parameters:\n");
- fprintf(stderr, "\tindex type = %s\n", index_type);
- fprintf(stderr, "\tcompression level = %d\n", comp_level);
- fprintf(stderr, "\t# of records between flushes = %ld\n", flush_count);
- fprintf(stderr, "\t# of records to write = %ld\n", nrecords);
+ HDfprintf(stderr, "Parameters:\n");
+ HDfprintf(stderr, "\tindex type = %s\n", index_type);
+ HDfprintf(stderr, "\tcompression level = %d\n", comp_level);
+ HDfprintf(stderr, "\t# of records between flushes = %ld\n", flush_count);
+ HDfprintf(stderr, "\t# of records to write = %ld\n", nrecords);
} /* end if */
/* Set the random seed */
if(0 == use_seed) {
struct timeval t;
- gettimeofday(&t, NULL);
+ HDgettimeofday(&t, NULL);
random_seed = (unsigned)(t.tv_usec);
} /* end if */
- srandom(random_seed);
+ HDsrandom(random_seed);
/* ALWAYS emit the random seed for possible debugging */
- fprintf(stderr, "Using writer random seed: %u\n", random_seed);
+ HDfprintf(stderr, "Using writer random seed: %u\n", random_seed);
/* Create the test file */
if((fid = create_file(FILENAME, verbose, index_type, random_seed)) < 0) {
- fprintf(stderr, "Error creating the file...\n");
- exit(1);
+ HDfprintf(stderr, "Error creating the file...\n");
+ HDexit(1);
}
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Generating symbol names\n");
+ HDfprintf(stderr, "Generating symbol names\n");
/* Generate dataset names */
if(generate_symbols() < 0)
@@ -642,43 +640,43 @@ int main(int argc, const char *argv[])
/* Create the datasets in the file */
if(create_datasets(fid, comp_level, verbose) < 0) {
- fprintf(stderr, "Error creating datasets...\n");
- exit(1);
+ HDfprintf(stderr, "Error creating datasets...\n");
+ HDexit(1);
}
/* Enable SWMR writing mode */
if(H5Fstart_swmr_write(fid) < 0) {
- fprintf(stderr, "Error starting SWMR writing mode...\n");
- exit(1);
+ HDfprintf(stderr, "Error starting SWMR writing mode...\n");
+ HDexit(1);
}
#ifdef OUT
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Creating and closing datasets: %s\n", FILENAME);
+ HDfprintf(stderr, "Creating and closing datasets: %s\n", FILENAME);
/* Create and close the datasets in the file */
if(create_close_datasets(fid, comp_level, verbose) < 0) {
- fprintf(stderr, "Error creating datasets...\n");
- exit(1);
+ HDfprintf(stderr, "Error creating datasets...\n");
+ HDexit(1);
}
/* Close the file */
if(H5Fclose(fid) < 0) {
- fprintf(stderr, "Error closing file!\n");
- exit(1);
+ HDfprintf(stderr, "Error closing file!\n");
+ HDexit(1);
} /* end if */
/* Open the file */
if((fid = open_file(FILENAME, verbose)) < 0) {
- fprintf(stderr, "Error opening the file...\n");
- exit(1);
+ HDfprintf(stderr, "Error opening the file...\n");
+ HDexit(1);
}
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Generating symbol names\n");
+ HDfprintf(stderr, "Generating symbol names\n");
/* Generate dataset names */
if(generate_symbols() < 0)
@@ -686,19 +684,19 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Opening datasets: %s\n", FILENAME);
+ HDfprintf(stderr, "Opening datasets: %s\n", FILENAME);
/* Open the file's datasets */
if(open_datasets(fid, verbose) < 0) {
- fprintf(stderr, "Error opening datasets...\n");
- exit(1);
+ HDfprintf(stderr, "Error opening datasets...\n");
+ HDexit(1);
} /* end if */
/* Enable SWMR writing mode */
if(H5Fstart_swmr_write(fid) < 0) {
- fprintf(stderr, "Error starting SWMR writing mode...\n");
- exit(1);
+ HDfprintf(stderr, "Error starting SWMR writing mode...\n");
+ HDexit(1);
}
#endif
@@ -707,32 +705,32 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Adding records\n");
+ HDfprintf(stderr, "Adding records\n");
/* Append records to datasets */
if(add_records(fid, verbose, (unsigned long)nrecords, (unsigned long)flush_count) < 0) {
- fprintf(stderr, "Error appending records to datasets!\n");
- exit(1);
+ HDfprintf(stderr, "Error appending records to datasets!\n");
+ HDexit(1);
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Releasing symbols\n");
+ HDfprintf(stderr, "Releasing symbols\n");
/* Clean up the symbols */
if(shutdown_symbols() < 0) {
- fprintf(stderr, "Error releasing symbols!\n");
- exit(1);
+ HDfprintf(stderr, "Error releasing symbols!\n");
+ HDexit(1);
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Closing the file\n");
+ HDfprintf(stderr, "Closing the file\n");
/* Close objects opened */
if(H5Fclose(fid) < 0) {
- fprintf(stderr, "Error closing file!\n");
- exit(1);
+ HDfprintf(stderr, "Error closing file!\n");
+ HDexit(1);
} /* end if */
return 0;
diff --git a/test/swmr_writer.c b/test/swmr_writer.c
index 4ab6287..afeab7ee1 100644
--- a/test/swmr_writer.c
+++ b/test/swmr_writer.c
@@ -30,9 +30,7 @@
/* Headers */
/***********/
-#include <assert.h>
-#include <sys/time.h>
-
+#include "h5test.h"
#include "swmr_common.h"
/********************/
@@ -70,16 +68,16 @@ open_skeleton(const char *filename, unsigned verbose, unsigned old)
hid_t fapl; /* File access property list */
unsigned u, v; /* Local index variable */
- assert(filename);
+ HDassert(filename);
/* Create file access property list */
if((fapl = h5_fileaccess()) < 0)
return -1;
if(!old) {
- /* Set to use the latest library format */
- if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- return -1;
+ /* Set to use the latest library format */
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ return -1;
}
#ifdef QAK
@@ -89,8 +87,8 @@ open_skeleton(const char *filename, unsigned verbose, unsigned old)
mdc_config.version = H5AC__CURR_CACHE_CONFIG_VERSION;
H5Pget_mdc_config(fapl, &mdc_config);
- fprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
- fprintf(stderr, "mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
+ HDfprintf(stderr, "mdc_config.initial_size = %lu\n", (unsigned long)mdc_config.initial_size);
+ HDfprintf(stderr, "mdc_config.epoch_length = %lu\n", (unsigned long)mdc_config.epoch_length);
mdc_config.set_initial_size = 1;
mdc_config.initial_size = 16 * 1024 * 1024;
/* mdc_config.epoch_length = 5000; */
@@ -112,7 +110,7 @@ open_skeleton(const char *filename, unsigned verbose, unsigned old)
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Opening datasets\n");
+ HDfprintf(stderr, "Opening datasets\n");
/* Open the datasets */
for(u = 0; u < NLEVELS; u++)
@@ -162,11 +160,11 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
unsigned long rec_to_flush; /* # of records left to write before flush */
unsigned long u, v; /* Local index variables */
- assert(fid >= 0);
+ HDassert(fid >= 0);
/* Reset the record */
/* (record's 'info' field might need to change for each record written, also) */
- memset(&record, 0, sizeof(record));
+ HDmemset(&record, 0, sizeof(record));
/* Create a dataspace for the record to add */
if((mem_sid = H5Screate(H5S_SCALAR)) < 0)
@@ -181,7 +179,7 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
mdc_config_orig.version = H5AC__CURR_CACHE_CONFIG_VERSION;
if(H5Fget_mdc_config(fid, &mdc_config_orig) < 0)
return -1;
- memcpy(&mdc_config_cork, &mdc_config_orig, sizeof(mdc_config_cork));
+ HDmemcpy(&mdc_config_cork, &mdc_config_orig, sizeof(mdc_config_cork));
mdc_config_cork.evictions_enabled = FALSE;
mdc_config_cork.incr_mode = H5C_incr__off;
mdc_config_cork.flash_incr_mode = H5C_flash_incr__off;
@@ -260,7 +258,7 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Closing datasets\n");
+ HDfprintf(stderr, "Closing datasets\n");
/* Close the datasets */
for(u = 0; u < NLEVELS; u++)
@@ -288,7 +286,7 @@ usage(void)
printf("Defaults to verbose (no '-q' given), latest format when opening file (no '-o' given),\n");
printf("flushing every 10000 records ('-f 10000'), and will generate a random seed (no -r given).\n");
printf("\n");
- exit(1);
+ HDexit(1);
}
int main(int argc, const char *argv[])
@@ -297,7 +295,7 @@ int main(int argc, const char *argv[])
long nrecords = 0; /* # of records to append */
long flush_count = 10000; /* # of records to write between flushing file */
unsigned verbose = 1; /* Whether to emit some informational messages */
- unsigned old = 0; /* Whether to use non-latest-format when opening file */
+ unsigned old = 0; /* Whether to use non-latest-format when opening file */
unsigned use_seed = 0; /* Set to 1 if a seed was set on the command line */
unsigned random_seed = 0; /* Random # seed */
unsigned u; /* Local index variable */
@@ -313,7 +311,7 @@ int main(int argc, const char *argv[])
switch(argv[u][1]) {
/* # of records to write between flushing file */
case 'f':
- flush_count = atol(argv[u + 1]);
+ flush_count = HDatol(argv[u + 1]);
if(flush_count < 0)
usage();
u += 2;
@@ -328,12 +326,12 @@ int main(int argc, const char *argv[])
/* Random # seed */
case 'r':
use_seed = 1;
- temp = atoi(argv[u + 1]);
+ temp = HDatoi(argv[u + 1]);
random_seed = (unsigned)temp;
u += 2;
break;
- /* Use non-latest-format when opening file */
+ /* Use non-latest-format when opening file */
case 'o':
old = 1;
u++;
@@ -346,7 +344,7 @@ int main(int argc, const char *argv[])
} /* end if */
else {
/* Get the number of records to append */
- nrecords = atol(argv[u]);
+ nrecords = HDatol(argv[u]);
if(nrecords <= 0)
usage();
@@ -361,24 +359,24 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose) {
- fprintf(stderr, "Parameters:\n");
- fprintf(stderr, "\t# of records between flushes = %ld\n", flush_count);
- fprintf(stderr, "\t# of records to write = %ld\n", nrecords);
+ HDfprintf(stderr, "Parameters:\n");
+ HDfprintf(stderr, "\t# of records between flushes = %ld\n", flush_count);
+ HDfprintf(stderr, "\t# of records to write = %ld\n", nrecords);
} /* end if */
/* Set the random seed */
if(0 == use_seed) {
struct timeval t;
- gettimeofday(&t, NULL);
+ HDgettimeofday(&t, NULL);
random_seed = (unsigned)(t.tv_usec);
} /* end if */
- srandom(random_seed);
+ HDsrandom(random_seed);
/* ALWAYS emit the random seed for possible debugging */
- fprintf(stderr, "Using writer random seed: %u\n", random_seed);
+ HDfprintf(stderr, "Using writer random seed: %u\n", random_seed);
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Generating symbol names\n");
+ HDfprintf(stderr, "Generating symbol names\n");
/* Generate dataset names */
if(generate_symbols() < 0)
@@ -386,12 +384,12 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Opening skeleton file: %s\n", FILENAME);
+ HDfprintf(stderr, "Opening skeleton file: %s\n", FILENAME);
/* Open file skeleton */
if((fid = open_skeleton(FILENAME, verbose, old)) < 0) {
- fprintf(stderr, "Error opening skeleton file!\n");
- exit(1);
+ HDfprintf(stderr, "Error opening skeleton file!\n");
+ HDexit(1);
} /* end if */
/* Send a message to indicate "H5Fopen" is complete--releasing the file lock */
@@ -399,32 +397,32 @@ int main(int argc, const char *argv[])
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Adding records\n");
+ HDfprintf(stderr, "Adding records\n");
/* Append records to datasets */
if(add_records(fid, verbose, (unsigned long)nrecords, (unsigned long)flush_count) < 0) {
- fprintf(stderr, "Error appending records to datasets!\n");
- exit(1);
+ HDfprintf(stderr, "Error appending records to datasets!\n");
+ HDexit(1);
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Releasing symbols\n");
+ HDfprintf(stderr, "Releasing symbols\n");
/* Clean up the symbols */
if(shutdown_symbols() < 0) {
- fprintf(stderr, "Error releasing symbols!\n");
- exit(1);
+ HDfprintf(stderr, "Error releasing symbols!\n");
+ HDexit(1);
} /* end if */
/* Emit informational message */
if(verbose)
- fprintf(stderr, "Closing objects\n");
+ HDfprintf(stderr, "Closing objects\n");
/* Close objects opened */
if(H5Fclose(fid) < 0) {
- fprintf(stderr, "Error closing file!\n");
- exit(1);
+ HDfprintf(stderr, "Error closing file!\n");
+ HDexit(1);
} /* end if */
return 0;
diff --git a/test/testswmr.sh.in b/test/testswmr.sh.in
index 5165fd1..32f80ff 100644
--- a/test/testswmr.sh.in
+++ b/test/testswmr.sh.in
@@ -161,7 +161,7 @@ do
echo "## Use H5Fstart_swmr_write() to enable SWMR writing mode"
echo "###############################################################################"
- # Remove any possible writer message file before launching writer
+ # Remove any possible writer message file before launching writer
rm -f $WRITER_MESSAGE
#
# Launch the Writer
@@ -170,7 +170,7 @@ do
./swmr_start_write $compress $index_type $Nrecords $seed &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
- #
+
# Wait for message from writer process before starting reader(s)
WAIT_MESSAGE $WRITER_MESSAGE
@@ -228,7 +228,8 @@ do
echo generator had error
nerrors=`expr $nerrors + 1`
fi
- # Remove any possible writer message file before launching writer
+
+ # Remove any possible writer message file before launching writer
rm -f $WRITER_MESSAGE
#
# Launch the Writer
@@ -237,7 +238,7 @@ do
./swmr_writer -o $Nrecords $seed &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
- #
+
# Wait for message from writer process before starting reader(s)
WAIT_MESSAGE $WRITER_MESSAGE
#
@@ -286,7 +287,7 @@ do
echo "###############################################################################"
echo "## Remove test - test shrinking the dataset"
echo "###############################################################################"
- #
+
# Remove any possible writer message file before launching writer
rm -f $WRITER_MESSAGE
# Launch the Remove Writer
@@ -295,7 +296,7 @@ do
./swmr_remove_writer -o $Nrecs_rem $seed &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
- #
+
# Wait for message from writer process before starting reader(s)
WAIT_MESSAGE $WRITER_MESSAGE
#
@@ -361,7 +362,7 @@ do
echo writer had error
nerrors=`expr $nerrors + 1`
fi
- #
+
# Remove any possible writer message file before launching writer
rm -f $WRITER_MESSAGE
#
@@ -371,7 +372,7 @@ do
./swmr_addrem_writer $Nrecords $seed &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
- #
+
# Wait for message from writer process before starting reader(s)
WAIT_MESSAGE $WRITER_MESSAGE
#
@@ -431,7 +432,7 @@ do
echo generator had error
nerrors=`expr $nerrors + 1`
fi
- #
+
# Remove any possible writer message file before launching writer
rm -f $WRITER_MESSAGE
# Launch the Sparse writer
@@ -439,7 +440,7 @@ do
nice -n 20 ./swmr_sparse_writer $Nrecs_spa &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
- #
+
# Wait for message from writer process before starting reader(s)
WAIT_MESSAGE $WRITER_MESSAGE
#
@@ -448,7 +449,7 @@ do
pid_readers=""
echo launch $Nrdrs_spa swmr_sparse_readers
while [ $n -lt $Nrdrs_spa ]; do
- # The sparse writer spits out a LOT of data so it's set to 'quiet'
+ # The sparse reader spits out a LOT of data so it's set to 'quiet'
./swmr_sparse_reader -q $Nrecs_spa &
pid_readers="$pid_readers $!"
n=`expr $n + 1`
@@ -495,3 +496,4 @@ else
echo "SWMR tests failed with $nerrors errors."
exit 1
fi
+
diff --git a/test/tgenprop.c b/test/tgenprop.c
index c4f3a3f..b670c0d 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -1780,7 +1780,7 @@ test_genprop_path(void)
CHECK_PTR(path, "H5P_get_class_path_test");
if(HDstrcmp(path,CLASS1_PATH)!=0)
TestErrPrintf("Class names don't match!, path=%s, CLASS1_PATH=%s\n",path,CLASS1_PATH);
- HDfree(path);
+ H5free_memory(path);
/* Create another new generic class, derived from first class */
cid2 = H5Pcreate_class(cid1,CLASS2_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
@@ -1805,7 +1805,7 @@ test_genprop_path(void)
VERIFY(ret, 1, "H5Pequal");
/* Release the path string */
- HDfree(path);
+ H5free_memory(path);
/* Close class */
ret = H5Pclose_class(cid3);
diff --git a/test/tmisc.c b/test/tmisc.c
index 1298f6b..011486a 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -462,7 +462,8 @@ static void test_misc2_write_attribute(void)
ret = H5Aread(att1, type, &data_check);
CHECK(ret, FAIL, "H5Aread");
- HDfree(data_check.string);
+ ret = H5Dvlen_reclaim(type, dataspace, H5P_DEFAULT, &data_check);
+ CHECK(ret, FAIL, "H5Dvlen_reclaim");
ret = H5Aclose(att1);
CHECK(ret, FAIL, "HAclose");
@@ -487,7 +488,8 @@ static void test_misc2_write_attribute(void)
ret = H5Aread(att2, type, &data_check);
CHECK(ret, FAIL, "H5Aread");
- HDfree(data_check.string);
+ ret = H5Dvlen_reclaim(type, dataspace, H5P_DEFAULT, &data_check);
+ CHECK(ret, FAIL, "H5Dvlen_reclaim");
ret = H5Aclose(att2);
CHECK(ret, FAIL, "HAclose");
@@ -514,6 +516,7 @@ static void test_misc2_read_attribute(const char *filename, const char *att_name
{
hid_t file, root, att;
hid_t type;
+ hid_t space;
herr_t ret;
misc2_struct data_check;
@@ -528,10 +531,17 @@ static void test_misc2_read_attribute(const char *filename, const char *att_name
att = H5Aopen(root, att_name, H5P_DEFAULT);
CHECK(att, FAIL, "H5Aopen");
+ space = H5Aget_space(att);
+ CHECK(space, FAIL, "H5Aget_space");
+
ret = H5Aread(att, type, &data_check);
CHECK(ret, FAIL, "H5Aread");
- HDfree(data_check.string);
+ ret = H5Dvlen_reclaim(type, space, H5P_DEFAULT, &data_check);
+ CHECK(ret, FAIL, "H5Dvlen_reclaim");
+
+ ret = H5Sclose(space);
+ CHECK(ret, FAIL, "H5Sclose");
ret = H5Aclose(att);
CHECK(ret, FAIL, "H5Aclose");
diff --git a/test/tvlstr.c b/test/tvlstr.c
index 02bd59d..dbc3083 100644
--- a/test/tvlstr.c
+++ b/test/tvlstr.c
@@ -604,7 +604,7 @@ static void test_write_vl_string_attribute(void)
if(HDstrcmp(string_att_check,string_att) != 0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n",string_att,string_att_check);
- HDfree(string_att_check);
+ H5free_memory(string_att_check);
string_att_check = NULL;
ret = H5Aclose(att);
@@ -626,7 +626,7 @@ static void test_write_vl_string_attribute(void)
if(HDstrcmp(string_att_check,string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",string_att_write,string_att_check);
- HDfree(string_att_check);
+ H5free_memory(string_att_check);
string_att_check = NULL;
/* The attribute string written is freed below, in the test_read_vl_string_attribute() test */
@@ -687,7 +687,7 @@ static void test_read_vl_string_attribute(void)
if(HDstrcmp(string_att_check,string_att) != 0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n",string_att,string_att_check);
- HDfree(string_att_check);
+ H5free_memory(string_att_check);
string_att_check = NULL;
ret = H5Aclose(att);
@@ -704,7 +704,7 @@ static void test_read_vl_string_attribute(void)
if(HDstrcmp(string_att_check,string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",string_att_write,string_att_check);
- HDfree(string_att_check);
+ H5free_memory(string_att_check);
string_att_check = NULL;
}
@@ -762,7 +762,8 @@ static void read_scalar_dset(hid_t file, hid_t type, hid_t space, char *name, ch
if(HDstrcmp(data, data_read))
TestErrPrintf("Expected %s for dataset %s but read %s\n", data, name, data_read);
- HDfree(data_read);
+ ret = H5Dvlen_reclaim(type, space, H5P_DEFAULT, &data_read);
+ CHECK(ret, FAIL, "H5Dvlen_reclaim");
}
/****************************************************************
diff --git a/test/vds_swmr_reader.c b/test/vds_swmr_reader.c
index 34cb3eb..7a08c62 100644
--- a/test/vds_swmr_reader.c
+++ b/test/vds_swmr_reader.c
@@ -134,7 +134,7 @@ error:
if(fsid >= 0)
(void)H5Sclose(fsid);
if(buffer != NULL)
- free(buffer);
+ HDfree(buffer);
} H5E_END_TRY
HDfprintf(stderr, "ERROR: SWMR reader exited with errors\n");
diff --git a/test/vds_swmr_writer.c b/test/vds_swmr_writer.c
index fa1d1a0..1029192 100644
--- a/test/vds_swmr_writer.c
+++ b/test/vds_swmr_writer.c
@@ -52,7 +52,7 @@ main(int argc, char *argv[])
return EXIT_FAILURE;
}
- file_number = atoi(argv[1]);
+ file_number = HDatoi(argv[1]);
if(file_number < 0 || file_number >= N_SOURCES)
TEST_ERROR
@@ -110,8 +110,8 @@ main(int argc, char *argv[])
TEST_ERROR
/* Wait one second between writing planes */
- delay = time(0) + 1;
- while(time(0) < delay)
+ delay = HDtime(0) + 1;
+ while(HDtime(0) < delay)
;
/* Flush */
diff --git a/testpar/Makefile.in b/testpar/Makefile.in
index e258776..73cc120 100644
--- a/testpar/Makefile.in
+++ b/testpar/Makefile.in
@@ -451,16 +451,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -473,7 +474,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -535,8 +535,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -547,11 +547,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -559,6 +559,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -582,6 +583,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -597,6 +599,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 2e07a983..37be50f 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -419,16 +419,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -441,7 +442,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -503,8 +503,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -515,11 +515,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -527,6 +527,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -550,6 +551,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -565,6 +567,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in
index db0ef9e..532f269 100644
--- a/tools/h5copy/Makefile.in
+++ b/tools/h5copy/Makefile.in
@@ -427,16 +427,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -449,7 +450,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -511,8 +511,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -523,11 +523,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -535,6 +535,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -558,6 +559,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -573,6 +575,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in
index 28b2c25..d83cdf1 100644
--- a/tools/h5diff/Makefile.in
+++ b/tools/h5diff/Makefile.in
@@ -434,16 +434,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -456,7 +457,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -518,8 +518,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -530,11 +530,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -542,6 +542,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -565,6 +566,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -580,6 +582,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/tools/h5dump/CMakeTestsVDS.cmake b/tools/h5dump/CMakeTestsVDS.cmake
index 58287fa..cc68896 100644
--- a/tools/h5dump/CMakeTestsVDS.cmake
+++ b/tools/h5dump/CMakeTestsVDS.cmake
@@ -22,6 +22,11 @@
tvds_layout-3_2.ddl
tvds_layout-4.ddl
tvds_layout-5.ddl
+ vds-first.ddl
+ vds-gap1.ddl
+ vds-gap2.ddl
+ vds_layout-eiger.ddl
+ vds_layout-maxmin.ddl
)
set (HDF5_REFERENCE_TEST_VDS
1_a.h5
@@ -47,6 +52,14 @@
5_b.h5
5_c.h5
5_vds.h5
+ a.h5
+ b.h5
+ c.h5
+ d.h5
+ vds-percival-unlim-maxmin.h5
+ f-0.h5
+ f-3.h5
+ vds-eiger.h5
)
set (HDF5_ERROR_REFERENCE_VDS
)
@@ -184,6 +197,12 @@
tvds-4.out.err
tvds-5.out
tvds-5.out.err
+ vds-first.out
+ vds-first.out.err
+ vds-gap1.out
+ vds-gap1.out.err
+ vds-gap2.out
+ vds-gap2.out.err
tvds_layout-1.out
tvds_layout-1.out.err
tvds_layout-2.out
@@ -196,6 +215,10 @@
tvds_layout-4.out.err
tvds_layout-5.out
tvds_layout-5.out.err
+ vds_layout-eiger.out
+ vds_layout-eiger.out.err
+ vds_layout-maxmin.out
+ vds_layout-maxmin.out.err
)
set_tests_properties (H5DUMP_VDS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
if (NOT "${last_vds_test}" STREQUAL "")
@@ -225,6 +248,9 @@
ADD_H5_VDS_TEST (tvds-3_2 0 --enable-error-stack 3_2_vds.h5)
ADD_H5_VDS_TEST (tvds-4 0 --enable-error-stack 4_vds.h5)
ADD_H5_VDS_TEST (tvds-5 0 --enable-error-stack 5_vds.h5)
+ ADD_H5_VDS_TEST (vds-first 0 --vds-view-first-missing --enable-error-stack vds-percival-unlim-maxmin.h5)
+ ADD_H5_VDS_TEST (vds-gap1 0 -d /VDS-Eiger --vds-gap-size=1 --enable-error-stack vds-eiger.h5)
+ ADD_H5_VDS_TEST (vds-gap2 0 --vds-gap-size=2 --enable-error-stack vds-eiger.h5)
endif (USE_FILTER_DEFLATE)
# Layout read
@@ -235,4 +261,6 @@
ADD_H5_VDS_LAYOUT (tvds_layout-3_2 0 --enable-error-stack 3_2_vds.h5)
ADD_H5_VDS_LAYOUT (tvds_layout-4 0 --enable-error-stack 4_vds.h5)
ADD_H5_VDS_LAYOUT (tvds_layout-5 0 --enable-error-stack 5_vds.h5)
+ ADD_H5_VDS_LAYOUT (vds_layout-eiger 0 --enable-error-stack vds-eiger.h5)
+ ADD_H5_VDS_LAYOUT (vds_layout-maxmin 0 --enable-error-stack vds-percival-unlim-maxmin.h5)
endif (USE_FILTER_DEFLATE)
diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in
index f6d54d7..0b5802c 100644
--- a/tools/h5dump/Makefile.in
+++ b/tools/h5dump/Makefile.in
@@ -434,16 +434,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -456,7 +457,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -518,8 +518,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -530,11 +530,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -542,6 +542,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -565,6 +566,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -580,6 +582,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/tools/h5dump/errfiles/tdset-2.err b/tools/h5dump/errfiles/tdset-2.err
index 775351e..e594c1b 100644
--- a/tools/h5dump/errfiles/tdset-2.err
+++ b/tools/h5dump/errfiles/tdset-2.err
@@ -19,7 +19,7 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
minor: Object not found
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in H5Lget_info(): unable to get link info
- major: Symbol table
+ major: Links
minor: Object not found
#001: (file name) line (number) in H5L_get_info(): name doesn't exist
major: Symbol table
diff --git a/tools/h5dump/errfiles/tperror.err b/tools/h5dump/errfiles/tperror.err
index 29f9e7f..b469029 100644
--- a/tools/h5dump/errfiles/tperror.err
+++ b/tools/h5dump/errfiles/tperror.err
@@ -19,7 +19,7 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
minor: Object not found
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in H5Lget_info(): unable to get link info
- major: Symbol table
+ major: Links
minor: Object not found
#001: (file name) line (number) in H5L_get_info(): name doesn't exist
major: Symbol table
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index ffba581..7c24fa4 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -71,7 +71,7 @@ struct handler_t {
*/
/* The following initialization makes use of C language cancatenating */
/* "xxx" "yyy" into "xxxyyy". */
-static const char *s_opts = "hn*peyBHirVa:c:d:f:g:k:l:t:w:xD:uX:o*b*F:s:S:A*q:z:m:RECM:O*N:";
+static const char *s_opts = "hn*peyBHirVa:c:d:f:g:k:l:t:w:xD:uX:o*b*F:s:S:A*q:z:m:RECM:O*N:vG:";
static struct long_options l_opts[] = {
{ "help", no_arg, 'h' },
{ "hel", no_arg, 'h' },
@@ -190,6 +190,8 @@ static struct long_options l_opts[] = {
{ "no-compact-subset", no_arg, 'C' },
{ "ddl", optional_arg, 'O' },
{ "any_path", require_arg, 'N' },
+ { "vds-view-first-missing", no_arg, 'v' },
+ { "vds-gap-size", require_arg, 'G' },
{ NULL, 0, '\0' }
};
@@ -256,6 +258,8 @@ usage(const char *prog)
PRINTVALSTREAM(rawoutstream, " P can be the absolute path or just a relative path.\n");
PRINTVALSTREAM(rawoutstream, " -A, --onlyattr Print the header and value of attributes\n");
PRINTVALSTREAM(rawoutstream, " Optional value 0 suppresses printing attributes.\n");
+ PRINTVALSTREAM(rawoutstream, " --vds-view-first-missing Set the VDS bounds to first missing mapped elements.\n");
+ PRINTVALSTREAM(rawoutstream, " --vds-gap-size=N Set the missing file gap size, N=non-negative integers\n");
PRINTVALSTREAM(rawoutstream, "--------------- Object Property Options ---------------\n");
PRINTVALSTREAM(rawoutstream, " -i, --object-ids Print the object ids\n");
PRINTVALSTREAM(rawoutstream, " -p, --properties Print dataset filters, storage layout and fill value\n");
@@ -1121,6 +1125,16 @@ parse_start:
}
display_packed_bits = TRUE;
break;
+ case 'v':
+ display_vds_first = TRUE;
+ break;
+ case 'G':
+ vds_gap_size = HDatoi(opt_arg);
+ if (vds_gap_size < 0) {
+ usage(h5tools_getprogname());
+ goto error;
+ }
+ break;
/** begin XML parameters **/
case 'x':
diff --git a/tools/h5dump/h5dump.h b/tools/h5dump/h5dump.h
index 2b1fb04..7cf4efd 100644
--- a/tools/h5dump/h5dump.h
+++ b/tools/h5dump/h5dump.h
@@ -78,6 +78,8 @@ int enable_error_stack= FALSE; /* re-enable error stack */
int disable_compact_subset= FALSE; /* disable compact form of subset notation */
int display_packed_bits = FALSE; /*print 1-8 byte numbers as packed bits*/
int include_attrs = TRUE; /* Display attributes */
+int display_vds_first = FALSE; /* vds display to all by default*/
+int vds_gap_size = 0; /* vds skip missing files default is none */
/* sort parameters */
H5_index_t sort_by = H5_INDEX_NAME; /*sort_by [creation_order | name] */
diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c
index fd50710..09751ab 100644
--- a/tools/h5dump/h5dump_ddl.c
+++ b/tools/h5dump/h5dump_ddl.c
@@ -26,12 +26,12 @@
typedef struct {
hid_t fid; /* File ID being traversed */
- char *op_name; /* Object name wanted */
+ char *op_name; /* Object name wanted */
} trav_handle_udata_t;
typedef struct {
- char *path; /* Path of object being searched */
- char *op_name; /* Object name wanted */
+ char *path; /* Path of object being searched */
+ char *op_name; /* Object name wanted */
} trav_attr_udata_t;
/* callback function used by H5Literate() */
@@ -90,7 +90,7 @@ dump_dataspace(hid_t space)
HDmemset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent/COL;
ctx.cur_column = dump_indent;
-
+
h5tools_dump_dataspace(rawoutstream, outputformat, &ctx, space);
}
@@ -117,19 +117,19 @@ dump_attr_cb(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *
h5tools_context_t ctx; /* print context */
h5tool_format_t *outputformat = &h5tools_dataformat;
h5tool_format_t string_dataformat;
-
+
hid_t attr_id;
herr_t ret = SUCCEED;
HDmemset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent/COL;
ctx.cur_column = dump_indent;
-
+
attr_id = H5Aopen(oid, attr_name, H5P_DEFAULT);
oid_output = display_oid;
data_output = display_data;
attr_data_output = display_attr_data;
-
+
string_dataformat = *outputformat;
if (fp_format) {
@@ -155,7 +155,7 @@ dump_attr_cb(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
}
-
+
return ret;
}
@@ -185,6 +185,7 @@ static herr_t
dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR_UNUSED *op_data)
{
hid_t obj;
+ hid_t dapl_id = H5P_DEFAULT; /* dataset access property list ID */
herr_t ret = SUCCEED;
char *obj_path = NULL; /* Full path of object */
h5tools_str_t buffer; /* string into which to render */
@@ -199,7 +200,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR
HDmemset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent/COL;
ctx.cur_column = dump_indent;
-
+
string_dataformat = *outputformat;
if (fp_format) {
@@ -222,8 +223,8 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR
if(!obj_path) {
ret = FAIL;
goto done;
- }
-
+ }
+
HDstrcpy(obj_path, prefix);
HDstrcat(obj_path, "/");
HDstrcat(obj_path, name);
@@ -269,7 +270,20 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR
break;
case H5O_TYPE_DATASET:
- if((obj = H5Dopen2(group, name, H5P_DEFAULT)) >= 0) {
+ if(display_data) {
+ if ((dapl_id = H5Pcreate(H5P_DATASET_ACCESS)) < 0) {
+ error_msg("error in creating default access property list ID\n");
+ }
+ if (display_vds_first) {
+ if(H5Pset_virtual_view(dapl_id, H5D_VDS_FIRST_MISSING) < 0)
+ error_msg("error in setting access property list ID, virtual_view\n");
+ }
+ if (vds_gap_size > 0) {
+ if(H5Pset_virtual_printf_gap(dapl_id, (hsize_t)vds_gap_size) < 0)
+ error_msg("error in setting access property list ID, virtual_printf_gap\n");
+ }
+ }
+ if((obj = H5Dopen2(group, name, dapl_id)) >= 0) {
if(oinfo.rc > 1 || hit_elink) {
obj_t *found_obj; /* Found object */
@@ -308,9 +322,11 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
+ if (dapl_id != H5P_DEFAULT)
+ H5Pclose(dapl_id);
H5Dclose(obj);
goto done;
- }
+ }
else if(found_obj->displayed) {
ctx.need_prefix = TRUE;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
@@ -347,18 +363,24 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datasetend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
+ if (dapl_id != H5P_DEFAULT)
+ H5Pclose(dapl_id);
H5Dclose(obj);
goto done;
- }
+ }
else {
found_obj->displayed = TRUE;
}
} /* end if */
dump_function_table->dump_dataset_function(obj, name, NULL);
+ if (dapl_id != H5P_DEFAULT)
+ H5Pclose(dapl_id);
H5Dclose(obj);
- }
+ }
else {
+ if (dapl_id)
+ H5Pclose(dapl_id && dapl_id != H5P_DEFAULT);
error_msg("unable to dump dataset \"%s\"\n", name);
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -370,7 +392,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR
error_msg("unable to dump datatype \"%s\"\n", name);
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
- }
+ }
else {
dump_function_table->dump_named_datatype_function(obj, name);
H5Tclose(obj);
@@ -408,7 +430,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR
error_msg("unable to get link value\n");
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
- }
+ }
else {
/* print the value of a soft link */
/* Standard DDL: no modification */
@@ -558,7 +580,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR
done:
h5tools_str_close(&buffer);
-
+
if(obj_path)
HDfree(obj_path);
return ret;
@@ -650,7 +672,7 @@ dump_named_datatype(hid_t tid, const char *name)
HDmemset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent/COL;
ctx.cur_column = dump_indent;
-
+
string_dataformat = *outputformat;
if (fp_format) {
@@ -685,7 +707,7 @@ dump_named_datatype(hid_t tid, const char *name)
}
ctx.need_prefix = TRUE;
-
+
/* Render the element */
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s \"%s\" %s",
@@ -718,7 +740,7 @@ dump_named_datatype(hid_t tid, const char *name)
else
found_obj->displayed = TRUE;
} /* end if */
-
+
/* Render the element */
h5tools_str_reset(&buffer);
h5tools_print_datatype(rawoutstream, &buffer, outputformat, &ctx, tid, FALSE);
@@ -726,7 +748,7 @@ dump_named_datatype(hid_t tid, const char *name)
if(H5Tget_class(tid) != H5T_COMPOUND) {
h5tools_str_append(&buffer, ";");
}
-
+
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
/* print attributes */
@@ -813,7 +835,7 @@ dump_group(hid_t gid, const char *name)
HDmemset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent/COL;
ctx.cur_column = dump_indent;
-
+
string_dataformat = *outputformat;
if (fp_format) {
@@ -839,7 +861,7 @@ dump_group(hid_t gid, const char *name)
h5tools_dump_header_format->groupbegin, name,
h5tools_dump_header_format->groupblockbegin);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
-
+
ctx.indent_level++;
dump_indent += COL;
@@ -948,7 +970,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
HDmemset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent/COL;
ctx.cur_column = dump_indent;
-
+
string_dataformat = *outputformat;
if (fp_format) {
@@ -982,7 +1004,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
ctx.need_prefix = TRUE;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
-
+
/* Render the element */
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s \"%s\" %s",
@@ -994,7 +1016,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
dump_indent += COL;
ctx.indent_level++;
-
+
type = H5Dget_type(did);
h5dump_type_table = type_table;
h5tools_dump_datatype(rawoutstream, outputformat, &ctx, type);
@@ -1018,6 +1040,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
if(display_data) {
int data_loop = 1;
int i;
+
if(display_packed_bits)
data_loop = packed_bits_num;
for(i=0; i<data_loop; i++) {
@@ -1042,7 +1065,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "DATA{ not yet implemented.}");
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
-
+
ctx.indent_level--;
break;
@@ -1079,7 +1102,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
ctx.need_prefix = TRUE;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
-
+
/* Render the element */
h5tools_str_reset(&buffer);
if(HDstrlen(h5tools_dump_header_format->datasetblockend)) {
@@ -1189,7 +1212,7 @@ dump_fcpl(hid_t fid)
fdriver=H5Pget_driver(fapl);
H5Pclose(fapl);
#endif
-
+
/*-------------------------------------------------------------------------
* SUPER_BLOCK
*-------------------------------------------------------------------------
@@ -1308,54 +1331,54 @@ static herr_t
attr_search(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ainfo, void *_op_data)
{
herr_t ret = SUCCEED;
- int i;
- int j;
- int k;
- char *obj_op_name;
+ int i;
+ int j;
+ int k;
+ char *obj_op_name;
char *obj_name;
- trav_attr_udata_t *attr_data = (trav_attr_udata_t*)_op_data;
+ trav_attr_udata_t *attr_data = (trav_attr_udata_t*)_op_data;
char *buf = attr_data->path;
- char *op_name = attr_data->op_name;
+ char *op_name = attr_data->op_name;
j = (int)HDstrlen(op_name) - 1;
/* find the last / */
while(j >= 0) {
- if (op_name[j] == '/' && (j==0 || (j>0 && op_name[j-1]!='\\')))
- break;
- j--;
+ if (op_name[j] == '/' && (j==0 || (j>0 && op_name[j-1]!='\\')))
+ break;
+ j--;
}
obj_op_name = h5tools_str_replace(op_name + j + 1, "\\/", "/");
if(obj_op_name == NULL) {
- h5tools_setstatus(EXIT_FAILURE);
- ret = FAIL;
+ h5tools_setstatus(EXIT_FAILURE);
+ ret = FAIL;
}
else {
- if(HDstrcmp(attr_name, obj_op_name)==0) {
- /* object name */
- i = (int)HDstrlen(buf);
- j = (int)HDstrlen(op_name);
- k = (size_t)i + 1 + (size_t)j + 1 + 2;
- obj_name = (char *)HDmalloc((size_t)k);
- if(obj_name == NULL) {
- h5tools_setstatus(EXIT_FAILURE);
- ret = FAIL;
- }
- else {
- HDmemset(obj_name, '\0', (size_t)k);
- if(op_name[0] != '/') {
- HDstrncat(obj_name, buf, (size_t)i + 1);
- if(buf[i-1] != '/')
- HDstrncat(obj_name, "/", (size_t)2);
- }
- HDstrncat(obj_name, op_name, (size_t)j + 1);
-
- handle_attributes(oid, obj_name, NULL, 0, NULL);
- HDfree(obj_name);
- }
- }
- HDfree(obj_op_name);
+ if(HDstrcmp(attr_name, obj_op_name)==0) {
+ /* object name */
+ i = (int)HDstrlen(buf);
+ j = (int)HDstrlen(op_name);
+ k = (size_t)i + 1 + (size_t)j + 1 + 2;
+ obj_name = (char *)HDmalloc((size_t)k);
+ if(obj_name == NULL) {
+ h5tools_setstatus(EXIT_FAILURE);
+ ret = FAIL;
+ }
+ else {
+ HDmemset(obj_name, '\0', (size_t)k);
+ if(op_name[0] != '/') {
+ HDstrncat(obj_name, buf, (size_t)i + 1);
+ if(buf[i-1] != '/')
+ HDstrncat(obj_name, "/", (size_t)2);
+ }
+ HDstrncat(obj_name, op_name, (size_t)j + 1);
+
+ handle_attributes(oid, obj_name, NULL, 0, NULL);
+ HDfree(obj_name);
+ }
+ }
+ HDfree(obj_op_name);
}
return ret;
} /* end attr_search() */
@@ -1363,7 +1386,7 @@ attr_search(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *a
static herr_t
obj_search(const char *path, const H5O_info_t *oi, const char H5_ATTR_UNUSED *already_visited, void *_op_data)
{
- trav_handle_udata_t *handle_data = (trav_handle_udata_t*)_op_data;
+ trav_handle_udata_t *handle_data = (trav_handle_udata_t*)_op_data;
char *op_name = (char*)handle_data->op_name;
trav_attr_udata_t attr_data;
@@ -1372,22 +1395,22 @@ obj_search(const char *path, const H5O_info_t *oi, const char H5_ATTR_UNUSED *al
H5Aiterate_by_name(handle_data->fid, path, H5_INDEX_NAME, H5_ITER_INC, NULL, attr_search, (void*)&attr_data, H5P_DEFAULT);
if(HDstrcmp(path, op_name)==0) {
- switch(oi->type) {
- case H5O_TYPE_GROUP:
- handle_groups(handle_data->fid, path, NULL, 0, NULL);
- break;
- case H5O_TYPE_DATASET:
- handle_datasets(handle_data->fid, path, NULL, 0, NULL);
- break;
- case H5O_TYPE_NAMED_DATATYPE:
- handle_datatypes(handle_data->fid, path, NULL, 0, NULL);
- break;
- case H5O_TYPE_UNKNOWN:
- case H5O_TYPE_NTYPES:
- default:
- error_msg("unknown object type value\n");
- h5tools_setstatus(EXIT_FAILURE);
- } /* end switch */
+ switch(oi->type) {
+ case H5O_TYPE_GROUP:
+ handle_groups(handle_data->fid, path, NULL, 0, NULL);
+ break;
+ case H5O_TYPE_DATASET:
+ handle_datasets(handle_data->fid, path, NULL, 0, NULL);
+ break;
+ case H5O_TYPE_NAMED_DATATYPE:
+ handle_datatypes(handle_data->fid, path, NULL, 0, NULL);
+ break;
+ case H5O_TYPE_UNKNOWN:
+ case H5O_TYPE_NTYPES:
+ default:
+ error_msg("unknown object type value\n");
+ h5tools_setstatus(EXIT_FAILURE);
+ } /* end switch */
}
return 0;
@@ -1397,48 +1420,48 @@ static herr_t
lnk_search(const char *path, const H5L_info_t *li, void *_op_data)
{
int search_len;
- int k;
+ int k;
char *search_name;
- trav_handle_udata_t *handle_data = (trav_handle_udata_t*)_op_data;
+ trav_handle_udata_t *handle_data = (trav_handle_udata_t*)_op_data;
char *op_name = (char*)handle_data->op_name;
search_len = HDstrlen(op_name);
if(search_len > 0 && op_name[0] != '/') {
- k = 2;
+ k = 2;
}
else
k = 1;
- search_name = (char *)HDmalloc((size_t)(search_len + k));
+ search_name = (char *)HDmalloc((size_t)(search_len + k));
if(search_name == NULL) {
- error_msg("creating temporary link\n");
- h5tools_setstatus(EXIT_FAILURE);
+ error_msg("creating temporary link\n");
+ h5tools_setstatus(EXIT_FAILURE);
}
else {
- if (k == 2) {
- HDstrcpy(search_name, "/");
- HDstrncat(search_name, op_name, (size_t)search_len + 1);
- }
- else
- HDstrncpy(search_name, op_name, (size_t)search_len + 1);
- search_name[search_len + k - 1] = '\0';
-
- if(HDstrcmp(path, search_name) == 0) {
- switch(li->type) {
- case H5L_TYPE_SOFT:
- case H5L_TYPE_EXTERNAL:
- handle_links(handle_data->fid, op_name, NULL, 0, NULL);
- break;
-
- case H5L_TYPE_HARD:
- case H5L_TYPE_MAX:
- case H5L_TYPE_ERROR:
- default:
- error_msg("unknown link type value\n");
- h5tools_setstatus(EXIT_FAILURE);
- break;
- } /* end switch() */
- }
- HDfree(search_name);
+ if (k == 2) {
+ HDstrcpy(search_name, "/");
+ HDstrncat(search_name, op_name, (size_t)search_len + 1);
+ }
+ else
+ HDstrncpy(search_name, op_name, (size_t)search_len + 1);
+ search_name[search_len + k - 1] = '\0';
+
+ if(HDstrcmp(path, search_name) == 0) {
+ switch(li->type) {
+ case H5L_TYPE_SOFT:
+ case H5L_TYPE_EXTERNAL:
+ handle_links(handle_data->fid, op_name, NULL, 0, NULL);
+ break;
+
+ case H5L_TYPE_HARD:
+ case H5L_TYPE_MAX:
+ case H5L_TYPE_ERROR:
+ default:
+ error_msg("unknown link type value\n");
+ h5tools_setstatus(EXIT_FAILURE);
+ break;
+ } /* end switch() */
+ }
+ HDfree(search_name);
}
return 0;
} /* end lnk_search() */
@@ -1465,7 +1488,7 @@ handle_paths(hid_t fid, const char *path_name, void H5_ATTR_UNUSED * data, int H
hid_t gcpl_id;
unsigned crt_order_flags;
unsigned attr_crt_order_flags;
- trav_handle_udata_t handle_udata; /* User data for traversal */
+ trav_handle_udata_t handle_udata; /* User data for traversal */
if ((gcpl_id = H5Gget_create_plist(gid)) < 0) {
error_msg("error in getting group creation property list ID\n");
@@ -1489,12 +1512,12 @@ handle_paths(hid_t fid, const char *path_name, void H5_ATTR_UNUSED * data, int H
h5tools_setstatus(EXIT_FAILURE);
}
- handle_udata.fid = fid;
- handle_udata.op_name = (char*)path_name;
- if(h5trav_visit(fid, "/", TRUE, TRUE, obj_search, lnk_search, &handle_udata) < 0) {
- error_msg("error traversing information\n");
- h5tools_setstatus(EXIT_FAILURE);
- }
+ handle_udata.fid = fid;
+ handle_udata.op_name = (char*)path_name;
+ if(h5trav_visit(fid, "/", TRUE, TRUE, obj_search, lnk_search, &handle_udata) < 0) {
+ error_msg("error traversing information\n");
+ h5tools_setstatus(EXIT_FAILURE);
+ }
}
}
@@ -1536,7 +1559,7 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED * data, int H
/* find the last / */
while(j >= 0) {
- if (attr[j] == '/' && (j==0 || (j>0 && attr[j-1]!='\\')))
+ if (attr[j] == '/' && (j==0 || (j>0 && attr[j-1]!='\\')))
break;
j--;
}
@@ -1571,7 +1594,7 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED * data, int H
string_dataformat.do_escape = display_escape;
outputformat = &string_dataformat;
- attr_name = h5tools_str_replace(attr + j + 1, "\\/", "/");
+ attr_name = h5tools_str_replace(attr + j + 1, "\\/", "/");
/* handle error case: cannot open the object with the attribute */
if((oid = H5Oopen(fid, obj_name, H5P_DEFAULT)) < 0) {
@@ -1627,7 +1650,7 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED * data, int H
} /* end if */
HDfree(obj_name);
- HDfree(attr_name);
+ HDfree(attr_name);
dump_indent -= COL;
return;
@@ -1635,9 +1658,9 @@ error:
h5tools_setstatus(EXIT_FAILURE);
if(obj_name)
HDfree(obj_name);
-
- if (attr_name)
- HDfree(attr_name);
+
+ if (attr_name)
+ HDfree(attr_name);
H5E_BEGIN_TRY {
H5Oclose(oid);
@@ -1672,10 +1695,24 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
{
H5O_info_t oinfo;
hid_t dsetid;
+ hid_t dapl_id = H5P_DEFAULT; /* dataset access property list ID */
struct subset_t *sset = (struct subset_t *)data;
const char *real_name = display_name ? display_name : dset;
- if((dsetid = H5Dopen2(fid, dset, H5P_DEFAULT)) < 0) {
+ if(display_data) {
+ if ((dapl_id = H5Pcreate(H5P_DATASET_ACCESS)) < 0) {
+ error_msg("error in creating default access property list ID\n");
+ }
+ if (display_vds_first) {
+ if(H5Pset_virtual_view(dapl_id, H5D_VDS_FIRST_MISSING) < 0)
+ error_msg("error in setting access property list ID, virtual_view\n");
+ }
+ if (vds_gap_size > 0) {
+ if(H5Pset_virtual_printf_gap(dapl_id, (hsize_t)vds_gap_size) < 0)
+ error_msg("error in setting access property list ID, virtual_printf_gap\n");
+ }
+ }
+ if((dsetid = H5Dopen2(fid, dset, dapl_id)) < 0) {
if (pe) {
handle_links(fid, dset, data, pe, display_name);
}
@@ -1752,7 +1789,7 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
h5tools_setstatus(EXIT_FAILURE);
return;
}
-
+
/*-------------------------------------------------------------------------
* check for block overlap
*-------------------------------------------------------------------------
@@ -1785,7 +1822,7 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
PRINTSTREAM(rawoutstream, "%s \"%s\"\n", HARDLINK, found_obj->objname);
indentation(dump_indent);
end_obj(h5tools_dump_header_format->datasetend, h5tools_dump_header_format->datasetblockend);
- }
+ }
else {
found_obj->displayed = TRUE;
dump_indent += COL;
@@ -1801,7 +1838,8 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
dump_dataset(dsetid, real_name, sset);
dump_indent -= COL;
}
-
+ if (dapl_id != H5P_DEFAULT)
+ H5Pclose(dapl_id);
if(H5Dclose(dsetid) < 0)
h5tools_setstatus(EXIT_FAILURE);
}
@@ -1884,11 +1922,11 @@ handle_links(hid_t fid, const char *links, void H5_ATTR_UNUSED * data, int H5_AT
if(H5Lget_info(fid, links, &linfo, H5P_DEFAULT) < 0) {
error_msg("unable to get link info from \"%s\"\n", links);
h5tools_setstatus(EXIT_FAILURE);
- }
+ }
else if(linfo.type == H5L_TYPE_HARD) {
error_msg("\"%s\" is a hard link\n", links);
h5tools_setstatus(EXIT_FAILURE);
- }
+ }
else {
char *buf = (char *)HDmalloc(linfo.u.val_size);
PRINTVALSTREAM(rawoutstream, "\n");
@@ -1925,12 +1963,12 @@ handle_links(hid_t fid, const char *links, void H5_ATTR_UNUSED * data, int H5_AT
PRINTSTREAM(rawoutstream, "TARGETFILE \"%s\"\n", elink_file);
indentation(COL);
PRINTSTREAM(rawoutstream, "TARGETPATH \"%s\"\n", elink_path);
- }
+ }
else {
error_msg("h5dump error: unable to unpack external link value for \"%s\"\n", links);
h5tools_setstatus(EXIT_FAILURE);
}
- }
+ }
else {
error_msg("h5dump error: unable to get external link value for \"%s\"\n", links);
h5tools_setstatus(EXIT_FAILURE);
diff --git a/tools/h5dump/h5dump_extern.h b/tools/h5dump/h5dump_extern.h
index 08f9e36..62477d0 100644
--- a/tools/h5dump/h5dump_extern.h
+++ b/tools/h5dump/h5dump_extern.h
@@ -77,6 +77,8 @@ extern int enable_error_stack; /* re-enable error stack */
extern int disable_compact_subset; /* disable compact form of subset notation */
extern int display_packed_bits; /*print 1-8 byte numbers as packed bits*/
extern int include_attrs; /* Display attributes */
+extern int display_vds_first; /* vds display to first missing */
+extern int vds_gap_size; /* vds skip missing files */
/* sort parameters */
extern H5_index_t sort_by; /*sort_by [creation_order | name] */
diff --git a/tools/h5dump/testh5dumpvds.sh.in b/tools/h5dump/testh5dumpvds.sh.in
index b15606f..850c03a 100644
--- a/tools/h5dump/testh5dumpvds.sh.in
+++ b/tools/h5dump/testh5dumpvds.sh.in
@@ -98,6 +98,14 @@ $SRC_H5DUMP_TESTFILES/vds/5_a.h5
$SRC_H5DUMP_TESTFILES/vds/5_b.h5
$SRC_H5DUMP_TESTFILES/vds/5_c.h5
$SRC_H5DUMP_TESTFILES/vds/5_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/a.h5
+$SRC_H5DUMP_TESTFILES/vds/b.h5
+$SRC_H5DUMP_TESTFILES/vds/c.h5
+$SRC_H5DUMP_TESTFILES/vds/d.h5
+$SRC_H5DUMP_TESTFILES/vds/vds-percival-unlim-maxmin.h5
+$SRC_H5DUMP_TESTFILES/vds/f-0.h5
+$SRC_H5DUMP_TESTFILES/vds/f-3.h5
+$SRC_H5DUMP_TESTFILES/vds/vds-eiger.h5
"
LIST_OTHER_TEST_FILES="
@@ -113,6 +121,11 @@ $SRC_H5DUMP_TESTFILES/vds/tvds_layout-3_1.ddl
$SRC_H5DUMP_TESTFILES/vds/tvds_layout-3_2.ddl
$SRC_H5DUMP_TESTFILES/vds/tvds_layout-4.ddl
$SRC_H5DUMP_TESTFILES/vds/tvds_layout-5.ddl
+$SRC_H5DUMP_TESTFILES/vds/vds-first.ddl
+$SRC_H5DUMP_TESTFILES/vds/vds-gap1.ddl
+$SRC_H5DUMP_TESTFILES/vds/vds-gap2.ddl
+$SRC_H5DUMP_TESTFILES/vds/vds_layout-eiger.ddl
+$SRC_H5DUMP_TESTFILES/vds/vds_layout-maxmin.ddl
"
LIST_ERROR_TEST_FILES="
@@ -480,6 +493,9 @@ if test $USE_FILTER_DEFLATE = "yes" ; then
TOOLTEST tvds-3_2.ddl --enable-error-stack 3_2_vds.h5
TOOLTEST tvds-4.ddl --enable-error-stack 4_vds.h5
TOOLTEST tvds-5.ddl --enable-error-stack 5_vds.h5
+ TOOLTEST vds-first.ddl --vds-view-first-missing --enable-error-stack vds-percival-unlim-maxmin.h5
+ TOOLTEST vds-gap1.ddl -d /VDS-Eiger --vds-gap-size=1 --enable-error-stack vds-eiger.h5
+ TOOLTEST vds-gap2.ddl --vds-gap-size=2 --enable-error-stack vds-eiger.h5
fi
# Layout read
@@ -490,6 +506,8 @@ if test $USE_FILTER_DEFLATE = "yes" ; then
TOOLTEST tvds_layout-3_2.ddl -p --enable-error-stack 3_2_vds.h5
TOOLTEST tvds_layout-4.ddl -p --enable-error-stack 4_vds.h5
TOOLTEST tvds_layout-5.ddl -p --enable-error-stack 5_vds.h5
+ TOOLTEST vds_layout-eiger.ddl -p --enable-error-stack vds-eiger.h5
+ TOOLTEST vds_layout-maxmin.ddl -p --enable-error-stack vds-percival-unlim-maxmin.h5
fi
# Clean up temporary files/directories
diff --git a/tools/h5format_convert/Makefile.in b/tools/h5format_convert/Makefile.in
index 79bc42f..fd31dce 100644
--- a/tools/h5format_convert/Makefile.in
+++ b/tools/h5format_convert/Makefile.in
@@ -432,16 +432,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -454,7 +455,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -516,8 +516,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -528,11 +528,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -540,6 +540,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -563,6 +564,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -578,6 +580,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/tools/h5format_convert/h5fc_gentest.c b/tools/h5format_convert/h5fc_gentest.c
index 888aa27..54ef3df 100644
--- a/tools/h5format_convert/h5fc_gentest.c
+++ b/tools/h5format_convert/h5fc_gentest.c
@@ -23,15 +23,30 @@
* of the expected output and update the corresponding *.ddl files.
*/
#include "hdf5.h"
+#include "H5private.h"
+
+#define NON_V3_FILE "h5fc_non_v3.h5"
+#define EDGE_V3_FILE "h5fc_edge_v3.h5"
+
+const char *FILENAME[] = {
+ "h5fc_ext1_i.h5", /* 0 */
+ "h5fc_ext1_s.h5", /* 1 */
+ "h5fc_ext1_f.h5", /* 2 */
+ "h5fc_ext2_is.h5", /* 3 */
+ "h5fc_ext2_if.h5", /* 4 */
+ "h5fc_ext2_sf.h5", /* 5 */
+ "h5fc_ext3_isf.h5", /* 6 */
+ "h5fc_ext_none.h5", /* 7 */
+ NULL
+};
#define GROUP "GROUP"
-#define OLD_V1_FILE "h5fc_v1.h5"
-#define DSET_NON_CHUNKED "DSET_NON_CHUNKED"
#define DSET_BT1 "DSET_BT1"
#define DSET_NDATA_BT1 "DSET_NDATA_BT1"
+#define DSET_COMPACT "DSET_COMPACT"
+#define DSET_CONTIGUOUS "DSET_CONTIGUOUS"
-#define LATEST_V3_FILE "h5fc_latest_v3.h5"
#define DSET_EA "DSET_EA"
#define DSET_NDATA_EA "DSET_NDATA_EA"
#define DSET_BT2 "DSET_BT2"
@@ -41,58 +56,84 @@
#define DSET_NONE "DSET_NONE"
#define DSET_NDATA_NONE "DSET_NDATA_NONE"
-#define NON_V3_FILE "h5fc_non_v3.h5"
-
-#define EDGE_V3_FILE "h5fc_edge_v3.h5"
#define DSET_EDGE "DSET_EDGE"
+#define ISTORE_IK 64
+
/*
- * Function: gen_old()
+ * Function: gen_latest()
*
- * Create an old format file with:
- * 1) 1 non-chunked dataset
- * 2) 2 chunked datasets with version 1 B-tree chunk indexing type: with/without data
+ * Create a file with write+latest-format--this will result in v3 superblock+latest version support:
+ * 1) 2 chunked datasets with extensible array chunk indexing type (with/without data)
+ * 2) 2 chunked datasets with version 2 B-tree chunk indexing type (with/without data)
+ * 3) 2 chunked datasets with fixed array chunk indexing type (with/without data)
+ * 4) 2 chunked datasets with implicit array chunk indexing type (with/without data)
+ */
+
+/*
+ * Function: gen_non()
+ *
+ * Create a file with SWMR write+non-latest-format--this will result in v3 superbock+latest version support:
+ * 1) 1 chunked dataset with extensible array chunk indexing type (without data)
+ * 2) 1 chunked dataset with version 2 B-tree chunk indexing type (with data)
+ * Re-open the file with write+non-latest-format and create:
+ * 3) 1 chunked dataset with version 2 B-tree chunk indexing type (without data)
+ * 4) 1 chunked dataset with extensible array indexing type (with data)
+ * 5) 1 compact and 1 contiguous datasets
*/
static void
-gen_old(const char *fname)
+gen_non(const char *fname)
{
- hid_t fid = -1; /* file id */
- hid_t fcpl = -1;
- hid_t gid = -1; /* group id */
- hid_t sid = -1; /* space id */
- hid_t dcpl = -1; /* dataset creation property id */
+ hid_t fid = -1; /* file id */
+ hid_t fcpl = -1; /* file creation property list */
+ hid_t gid = -1; /* group id */
+ hid_t sid = -1; /* space id */
+ hid_t dcpl = -1; /* dataset creation property id */
hid_t did1 = -1, did2 = -1; /* dataset id */
hsize_t dims1[1] = {10}; /* dataset dimension */
hsize_t dims2[2] = {4, 6}; /* dataset dimension */
+ hsize_t max_dims[2]; /* maximum dataset dimension */
hsize_t c_dims[2] = {2, 3}; /* chunk dimension */
int i; /* local index variable */
int buf[24]; /* data buffer */
if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
goto error;
-
+ if(H5Pset_shared_mesg_nindexes(fcpl, 4) < 0)
+ goto error;
if(H5Pset_istore_k(fcpl, 64) < 0)
goto error;
- /* Create file */
- if((fid = H5Fcreate(fname, H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0)
+ /* Create a new file with SWMR_WRITE + non-latest-format */
+ if((fid = H5Fcreate(fname, H5F_ACC_TRUNC|H5F_ACC_SWMR_WRITE, fcpl, H5P_DEFAULT)) < 0)
goto error;
/* Create a group */
if((gid = H5Gcreate2(fid, GROUP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
+ /* Create data */
+ for(i = 0; i < 24; i++)
+ buf[i] = i;
+
+ /* Set chunk */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto error;
+ if(H5Pset_chunk(dcpl, 2, c_dims) < 0)
+ goto error;
/*
- * Create a non-chunked dataset
+ * Create a chunked dataset with extensible array chunk indexing type (without data)
*/
/* Create dataspace */
- if((sid = H5Screate_simple(1, dims1, NULL)) < 0)
+ max_dims[0] = 10;
+ max_dims[1] = H5S_UNLIMITED;
+ if((sid = H5Screate_simple(2, dims2, max_dims)) < 0)
goto error;
/* Create the dataset */
- if((did1 = H5Dcreate2(fid, DSET_NON_CHUNKED, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((did1 = H5Dcreate2(fid, DSET_NDATA_EA, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto error;
/* Closing */
@@ -102,114 +143,70 @@ gen_old(const char *fname)
goto error;
/*
- * Create two chunked datasets with version 1 B-tree chunk indexing type
- * (one with data, one without data)
+ * Create a chunked dataset with version 2 B-tree chunk indexing type (with data)
*/
- /* Create data */
- for(i = 0; i < 24; i++)
- buf[i] = i;
-
- /* Set chunk */
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- goto error;
- if(H5Pset_chunk(dcpl, 2, c_dims) < 0)
- goto error;
-
/* Create dataspace */
- if((sid = H5Screate_simple(2, dims2, NULL)) < 0)
+ max_dims[0] = 10;
+ max_dims[0] = H5S_UNLIMITED;
+ max_dims[1] = H5S_UNLIMITED;
+ if((sid = H5Screate_simple(2, dims2, max_dims)) < 0)
goto error;
- /* Create the 2 datasets */
- if((did1 = H5Dcreate2(fid, DSET_NDATA_BT1, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ /* Create the dataset */
+ if((did1 = H5Dcreate2(gid, DSET_BT2, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto error;
- if((did2 = H5Dcreate2(gid, DSET_BT1, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- goto error;
-
- /* Write to one dataset */
- if(H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ /* Write to the dataset */
+ if(H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
/* Closing */
- if(H5Pclose(dcpl) < 0)
- goto error;
if(H5Sclose(sid) < 0)
goto error;
if(H5Dclose(did1) < 0)
goto error;
- if(H5Dclose(did2) < 0)
+ if(H5Pclose(dcpl) < 0)
goto error;
-
if(H5Gclose(gid) < 0)
goto error;
if(H5Fclose(fid) < 0)
goto error;
-error:
- H5E_BEGIN_TRY {
- H5Pclose(dcpl);
- H5Sclose(sid);
- H5Dclose(did1);
- H5Dclose(did2);
- H5Gclose(gid);
- H5Fclose(fid);
- } H5E_END_TRY;
+ /* Re-open the file with old format */
+ if((fid = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ goto error;
-} /* gen_old() */
+ /* Open the group */
+ if((gid = H5Gopen2(fid, GROUP, H5P_DEFAULT)) < 0)
+ goto error;
-/*
- * Function: gen_latest()
- *
- * Create a file with write+latest-format--this will result in v3 superblock+latest version support:
- * 1) 2 chunked datasets with extensible array chunk indexing type (with/without data)
- * 2) 2 chunked datasets with version 2 B-tree chunk indexing type (with/without data)
- * 3) 2 chunked datasets with fixed array chunk indexing type (with/without data)
- * 4) 2 chunked datasets with implicit array chunk indexing type (with/without data)
- */
-static void
-gen_latest(const char *fname)
-{
- hid_t fid = -1; /* file id */
- hid_t fapl = -1; /* file access property list */
- hid_t fcpl = -1; /* file creation property list */
- hid_t gid = -1; /* group id */
- hid_t sid = -1; /* space id */
- hid_t dcpl = -1; /* dataset creation property id */
- hid_t did1 = -1, did2 = -1; /* dataset id */
- hsize_t dims2[2] = {4, 6}; /* dataset dimension */
- hsize_t max_dims[2]; /* maximum dataset dimension */
- hsize_t c_dims[2] = {2, 3}; /* chunk dimension */
- int i; /* local index variable */
- int buf[24]; /* data buffer */
+ /*
+ * Create a dataset with version 2 B-btree chunk indexing type (without data)
+ */
- /* Create a new format file */
- if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ /* Set chunk */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
- if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ if(H5Pset_chunk(dcpl, 2, c_dims) < 0)
goto error;
- if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- goto error;
- if(H5Pset_shared_mesg_nindexes(fcpl, 4) < 0)
- goto error;
-
- if((fid = H5Fcreate(fname, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
+ /* Create dataspace */
+ max_dims[0] = H5S_UNLIMITED;
+ max_dims[1] = H5S_UNLIMITED;
+ if((sid = H5Screate_simple(2, dims2, max_dims)) < 0)
goto error;
- /* Create a group */
- if((gid = H5Gcreate2(fid, GROUP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ /* Create the dataset */
+ if((did1 = H5Dcreate2(fid, DSET_NDATA_BT2, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto error;
- /* Set chunk */
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- goto error;
- if(H5Pset_chunk(dcpl, 2, c_dims) < 0)
+ /* Close the dataspace */
+ if(H5Sclose(sid) < 0)
goto error;
- /*
- * Create 2 chunked datasets with extensible array chunk indexing type
- * (one with data; one without data)
+ /*
+ * Create a dataset with extensible array chunk indexing type (with data) in the group
*/
/* Create dataspace */
@@ -218,127 +215,155 @@ gen_latest(const char *fname)
if((sid = H5Screate_simple(2, dims2, max_dims)) < 0)
goto error;
- /* Create the 2 datasets */
- if((did1 = H5Dcreate2(gid, DSET_NDATA_EA, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- goto error;
-
- if((did2 = H5Dcreate2(fid, DSET_EA, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ /* Create the dataset */
+ if((did2 = H5Dcreate2(gid, DSET_EA, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto error;
- /* Create data */
- for(i = 0; i < 24; i++)
- buf[i] = i;
-
- /* Write to one dataset */
+ /* Write to the dataset */
if(H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
/* Closing */
if(H5Sclose(sid) < 0)
goto error;
+ if(H5Pclose(dcpl) < 0)
+ goto error;
if(H5Dclose(did1) < 0)
goto error;
if(H5Dclose(did2) < 0)
goto error;
-
/*
- * Create 2 chunked datasets with version 2 B-tree chunk indexing type
- * (one with data; one without data)
+ * Create a compact dataset in the group
*/
/* Create dataspace */
- max_dims[0] = 10;
- max_dims[0] = H5S_UNLIMITED;
- max_dims[1] = H5S_UNLIMITED;
- if((sid = H5Screate_simple(2, dims2, max_dims)) < 0)
+ if((sid = H5Screate_simple(1, dims1, NULL)) < 0)
goto error;
- /* Create the 2 datasets */
- if((did1 = H5Dcreate2(fid, DSET_NDATA_BT2, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
-
- if((did2 = H5Dcreate2(gid, DSET_BT2, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ if(H5Pset_layout(dcpl, H5D_COMPACT) < 0)
goto error;
- /* Write to one dataset */
- if(H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ /* Create the dataset */
+ if((did1 = H5Dcreate2(gid, DSET_COMPACT, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
/* Closing */
- if(H5Sclose(sid) < 0)
- goto error;
if(H5Dclose(did1) < 0)
goto error;
- if(H5Dclose(did2) < 0)
+ if(H5Pclose(dcpl) < 0)
+ goto error;
+ if(H5Sclose(sid) < 0)
goto error;
- /*
- * Create 2 chunked datasets with fixed array chunk indexing type
- * (one with data; one without data)
+ /*
+ * Create a contiguous dataset with (2d with data) in the file
*/
-
- /* Create dataspace */
- max_dims[0] = 20;
- max_dims[1] = 10;
- if((sid = H5Screate_simple(2, dims2, max_dims)) < 0)
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
-
- /* Create the datasets */
- if((did1 = H5Dcreate2(fid, DSET_FA, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ if(H5Pset_layout(dcpl, H5D_CONTIGUOUS) < 0)
goto error;
- if((did2 = H5Dcreate2(gid, DSET_NDATA_FA, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ if((sid = H5Screate_simple(2, dims2, NULL)) < 0)
goto error;
+ /* Create the dataset */
+ if((did2 = H5Dcreate2(fid, DSET_CONTIGUOUS, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
/* Write to the dataset */
- if(H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ if(H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
/* Closing */
+ if(H5Dclose(did2) < 0)
+ goto error;
+ if(H5Pclose(dcpl) < 0)
+ goto error;
if(H5Sclose(sid) < 0)
goto error;
- if(H5Dclose(did1) < 0)
+
+ if(H5Gclose(gid) < 0)
goto error;
- if(H5Dclose(did2) < 0)
+ if(H5Fclose(fid) < 0)
goto error;
+error:
+ H5E_BEGIN_TRY {
+ H5Pclose(dcpl);
+ H5Sclose(sid);
+ H5Dclose(did1);
+ H5Dclose(did2);
+ H5Gclose(gid);
+ H5Fclose(fid);
+ } H5E_END_TRY;
- /*
- * Create 2 chunked datasets with implicit chunk indexing type
- * (one with data; one without data)
- */
+} /* gen_non() */
- /* Create dataspace */
- if((sid = H5Screate_simple(2, dims2, NULL)) < 0)
- goto error;
+/*
+ * Function: gen_edge()
+ *
+ * Create a file with write+latest-format--this will result in v3 superblock+latest version support:
+ * A dataset: chunked, filtered, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS enabled
+ * (i.e. the dataset does not filter partial edge chunks)
+ */
+static void
+gen_edge(const char *fname)
+{
+ hid_t fid = -1; /* file id */
+ hid_t fapl = -1; /* file access property list */
+ hid_t sid = -1; /* dataspace id */
+ hid_t dcpl = -1; /* dataset creation property id */
+ hid_t did = -1; /* dataset id */
+ hsize_t dims2[2] = {12, 6}; /* Dataset dimensions */
+ hsize_t c_dims[2] = {5, 5}; /* Chunk dimensions */
+ float buf[12][6]; /* Buffer for writing data */
+ int i, j; /* local index variable */
- /* Set early allocation */
- if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0)
+ /* Create a new format file */
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
goto error;
-
- /* Create the 2 datasets */
- if((did1 = H5Dcreate2(fid, DSET_NONE, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ goto error;
+ if((fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
goto error;
- if((did2 = H5Dcreate2(gid, DSET_NDATA_NONE, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ /* Set chunk, filter, no-filter-edge-chunk */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
+ if(H5Pset_chunk(dcpl, 2, c_dims) < 0)
+ goto error;
+ if(H5Pset_deflate(dcpl, 9) < 0)
+ goto error;
+ if(H5Pset_chunk_opts(dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) < 0)
+ goto error;
- /* Write to one dataset */
- if(H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ /* Create dataspace */
+ if((sid = H5Screate_simple(2, dims2, NULL)) < 0)
+ goto error;
+
+ /* Create the dataset */
+ if((did = H5Dcreate2(fid, DSET_EDGE, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Create data */
+ for (i = 0; i< 12; i++)
+ for (j = 0; j< 6; j++)
+ buf[i][j] = 100.0F;
+
+ /* Write to the dataset */
+ if(H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
/* Closing */
- if(H5Dclose(did1) < 0)
- goto error;
- if(H5Dclose(did2) < 0)
+ if(H5Pclose(dcpl) < 0)
goto error;
if(H5Sclose(sid) < 0)
goto error;
-
- if(H5Pclose(dcpl) < 0)
+ if(H5Dclose(did) < 0)
goto error;
- if(H5Gclose(gid) < 0)
+ if(H5Pclose(fapl) < 0)
goto error;
if(H5Fclose(fid) < 0)
goto error;
@@ -347,34 +372,35 @@ error:
H5E_BEGIN_TRY {
H5Pclose(dcpl);
H5Sclose(sid);
- H5Dclose(did1);
- H5Dclose(did2);
- H5Gclose(gid);
+ H5Dclose(did);
H5Fclose(fid);
H5Pclose(fapl);
} H5E_END_TRY;
-} /* gen_latest() */
+} /* gen_edge() */
+
/*
- * Function: gen_non()
+ * Function: gen_ext()
*
- * Create a file with SWMR write+non-latest-format--this will result in v3 superbock+latest version support:
- * 1) 1 chunked dataset with extensible array chunk indexing type (without data)
- * 2) 1 chunked dataset with version 2 B-tree chunk indexing type (with data)
- * Re-open the file with write+non-latest-format and create:
- * 3) 1 chunked dataset with version 2 B-tree chunk indexing type (without data)
- * 4) 1 chunked dataset with extensible array indexing type (with data)
- * 5) 1 non-chunked dataset
+ * Create a file with/without latest format with:
+ * 1) 1 contiguous dataset (without data)
+ * 2) 2 chunked datasets with extensible array chunk indexing type (with/without data)
+ * 3) 2 chunked datasets with version 2 B-tree chunk indexing type (with/without data)
+ * 4) 2 chunked datasets with fixed array chunk indexing type (with/without data)
+ * 5) 2 chunked datasets with implicit array chunk indexing type (with/without data)
+ * It will create the file with/without messages in the superblock extension depending
+ * on the parameter "what".
*/
static void
-gen_non(const char *fname)
+gen_ext(const char *fname, unsigned new, unsigned what)
{
- hid_t fid = -1; /* file id */
- hid_t fcpl = -1; /* file creation property list */
- hid_t gid = -1; /* group id */
+ hid_t fid = -1; /* file id */
+ hid_t fapl = -1; /* file access property list */
+ hid_t fcpl = -1; /* file creation property list */
+ hid_t gid = -1; /* group id */
hid_t sid = -1; /* space id */
- hid_t dcpl = -1; /* dataset creation property id */
+ hid_t dcpl = -1; /* dataset creation property id */
hid_t did1 = -1, did2 = -1; /* dataset id */
hsize_t dims1[1] = {10}; /* dataset dimension */
hsize_t dims2[2] = {4, 6}; /* dataset dimension */
@@ -383,43 +409,75 @@ gen_non(const char *fname)
int i; /* local index variable */
int buf[24]; /* data buffer */
- if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- goto error;
- if(H5Pset_shared_mesg_nindexes(fcpl, 4) < 0)
- goto error;
- if(H5Pset_istore_k(fcpl, 64) < 0)
- goto error;
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ goto error;
- /* Create a new file with SWMR_WRITE + non-latest-format */
- if((fid = H5Fcreate(fname, H5F_ACC_TRUNC|H5F_ACC_SWMR_WRITE, fcpl, H5P_DEFAULT)) < 0)
+ if(new) {
+ /* Create a new format file */
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ goto error;
+ }
+
+ /* Create a file creation property list */
+ fcpl = H5Pcreate(H5P_FILE_CREATE);
+
+ /* Generate messages that might be placed in superblock extension */
+ switch(what) {
+ case 0:
+ H5Pset_istore_k(fcpl, ISTORE_IK);
+ break;
+ case 1:
+ H5Pset_shared_mesg_nindexes(fcpl, 4);
+ break;
+ case 2:
+ H5Pset_file_space(fcpl, H5F_FILE_SPACE_ALL_PERSIST, (hsize_t)0);
+ break;
+ case 3:
+ H5Pset_istore_k(fcpl, ISTORE_IK);
+ H5Pset_shared_mesg_nindexes(fcpl, 4);
+ break;
+ case 4:
+ H5Pset_istore_k(fcpl, ISTORE_IK);
+ H5Pset_file_space(fcpl, 0, (hsize_t)2);
+ break;
+ case 5:
+ H5Pset_shared_mesg_nindexes(fcpl, 4);
+ H5Pset_file_space(fcpl, H5F_FILE_SPACE_VFD, (hsize_t)0);
+ break;
+ case 6:
+ H5Pset_istore_k(fcpl, ISTORE_IK);
+ H5Pset_shared_mesg_nindexes(fcpl, 4);
+ H5Pset_file_space(fcpl, H5F_FILE_SPACE_AGGR_VFD, (hsize_t)0);
+ break;
+ default:
+ break;
+ }
+
+ /* Create the file */
+ if((fid = H5Fcreate(fname, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
goto error;
/* Create a group */
if((gid = H5Gcreate2(fid, GROUP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
- /* Create data */
- for(i = 0; i < 24; i++)
- buf[i] = i;
-
/* Set chunk */
if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto error;
if(H5Pset_chunk(dcpl, 2, c_dims) < 0)
goto error;
+
/*
- * Create a chunked dataset with extensible array chunk indexing type (without data)
+ * Create a contiguous dataset
*/
/* Create dataspace */
- max_dims[0] = 10;
- max_dims[1] = H5S_UNLIMITED;
- if((sid = H5Screate_simple(2, dims2, max_dims)) < 0)
+ if((sid = H5Screate_simple(1, dims1, NULL)) < 0)
goto error;
/* Create the dataset */
- if((did1 = H5Dcreate2(fid, DSET_NDATA_EA, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ if((did1 = H5Dcreate2(fid, DSET_CONTIGUOUS, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
/* Closing */
@@ -429,22 +487,29 @@ gen_non(const char *fname)
goto error;
/*
- * Create a chunked dataset with version 2 B-tree chunk indexing type (with data)
+ * Create 2 chunked datasets with extensible array chunk indexing type
+ * (one with data; one without data)
*/
/* Create dataspace */
max_dims[0] = 10;
- max_dims[0] = H5S_UNLIMITED;
max_dims[1] = H5S_UNLIMITED;
if((sid = H5Screate_simple(2, dims2, max_dims)) < 0)
goto error;
- /* Create the dataset */
- if((did1 = H5Dcreate2(gid, DSET_BT2, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ /* Create the 2 datasets */
+ if((did1 = H5Dcreate2(gid, DSET_NDATA_EA, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto error;
- /* Write to the dataset */
- if(H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ if((did2 = H5Dcreate2(fid, DSET_EA, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Create data */
+ for(i = 0; i < 24; i++)
+ buf[i] = i;
+
+ /* Write to one dataset */
+ if(H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
/* Closing */
@@ -452,61 +517,61 @@ gen_non(const char *fname)
goto error;
if(H5Dclose(did1) < 0)
goto error;
- if(H5Pclose(dcpl) < 0)
- goto error;
- if(H5Gclose(gid) < 0)
- goto error;
- if(H5Fclose(fid) < 0)
- goto error;
-
- /* Re-open the file with old format */
- if((fid = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if(H5Dclose(did2) < 0)
goto error;
- /* Open the group */
- if((gid = H5Gopen2(fid, GROUP, H5P_DEFAULT)) < 0)
- goto error;
- /*
- * Create a dataset with version 2 B-btree chunk indexing type (without data)
+ /*
+ * Create 2 chunked datasets with version 2 B-tree chunk indexing type
+ * (one with data; one without data)
*/
- /* Set chunk */
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- goto error;
- if(H5Pset_chunk(dcpl, 2, c_dims) < 0)
- goto error;
-
/* Create dataspace */
+ max_dims[0] = 10;
max_dims[0] = H5S_UNLIMITED;
max_dims[1] = H5S_UNLIMITED;
if((sid = H5Screate_simple(2, dims2, max_dims)) < 0)
goto error;
- /* Create the dataset */
- if((did1 = H5Dcreate2(fid, DSET_NDATA_BT2, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ /* Create the 2 datasets */
+ if((did1 = H5Dcreate2(fid, DSET_NDATA_BT2, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto error;
- /* Close the dataspace */
+ if((did2 = H5Dcreate2(gid, DSET_BT2, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Write to one dataset */
+ if(H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ goto error;
+
+ /* Closing */
if(H5Sclose(sid) < 0)
goto error;
+ if(H5Dclose(did1) < 0)
+ goto error;
+ if(H5Dclose(did2) < 0)
+ goto error;
/*
- * Create a dataset with version extensible array chunk indexing type (with data) in the group
+ * Create 2 chunked datasets with fixed array chunk indexing type
+ * (one with data; one without data)
*/
/* Create dataspace */
- max_dims[0] = 10;
- max_dims[1] = H5S_UNLIMITED;
+ max_dims[0] = 20;
+ max_dims[1] = 10;
if((sid = H5Screate_simple(2, dims2, max_dims)) < 0)
goto error;
- /* Create the dataset */
- if((did2 = H5Dcreate2(gid, DSET_EA, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ /* Create the datasets */
+ if((did1 = H5Dcreate2(fid, DSET_FA, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ if((did2 = H5Dcreate2(gid, DSET_NDATA_FA, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto error;
/* Write to the dataset */
- if(H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ if(H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
/* Closing */
@@ -517,106 +582,42 @@ gen_non(const char *fname)
if(H5Dclose(did2) < 0)
goto error;
+
/*
- * Create a non-chunked dataset in the group
+ * Create 2 chunked datasets with implicit chunk indexing type
+ * (one with data; one without data)
*/
/* Create dataspace */
- if((sid = H5Screate_simple(1, dims1, NULL)) < 0)
+ if((sid = H5Screate_simple(2, dims2, NULL)) < 0)
goto error;
- /* Create the dataset */
- if((did1 = H5Dcreate2(gid, DSET_NON_CHUNKED, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ /* Set early allocation */
+ if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0)
goto error;
- /* Closing */
- if(H5Sclose(sid) < 0)
- goto error;
- if(H5Dclose(did1) < 0)
+ /* Create the 2 datasets */
+ if((did1 = H5Dcreate2(fid, DSET_NONE, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto error;
- if(H5Gclose(gid) < 0)
- goto error;
- if(H5Fclose(fid) < 0)
- goto error;
- if(H5Pclose(dcpl) < 0)
+ if((did2 = H5Dcreate2(gid, DSET_NDATA_NONE, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto error;
-error:
- H5E_BEGIN_TRY {
- H5Pclose(dcpl);
- H5Sclose(sid);
- H5Dclose(did1);
- H5Dclose(did2);
- H5Gclose(gid);
- H5Fclose(fid);
- } H5E_END_TRY;
-
-} /* gen_non() */
-
-/*
- * Function: gen_edge()
- *
- * Create a file with write+latest-format--this will result in v3 superblock+latest version support:
- * A dataset: chunked, filtered, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS enabled
- * (i.e. the dataset does not filter partial edge chunks)
- */
-static void
-gen_edge(const char *fname)
-{
- hid_t fid = -1; /* file id */
- hid_t fapl = -1; /* file access property list */
- hid_t sid = -1; /* dataspace id */
- hid_t dcpl = -1; /* dataset creation property id */
- hid_t did = -1; /* dataset id */
- hsize_t dims2[2] = {12, 6}; /* Dataset dimensions */
- hsize_t c_dims[2] = {5, 5}; /* Chunk dimensions */
- float buf[12][6]; /* Buffer for writing data */
- int i, j; /* local index variable */
-
- /* Create a new format file */
- if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
- goto error;
- if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- goto error;
- if((fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ /* Write to one dataset */
+ if(H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
- /* Set chunk, filter, no-filter-edge-chunk */
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ /* Closing */
+ if(H5Dclose(did1) < 0)
goto error;
- if(H5Pset_chunk(dcpl, 2, c_dims) < 0)
+ if(H5Dclose(did2) < 0)
goto error;
- if(H5Pset_deflate(dcpl, 9) < 0)
- goto error;
- if(H5Pset_chunk_opts(dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) < 0)
- goto error;
-
- /* Create dataspace */
- if((sid = H5Screate_simple(2, dims2, NULL)) < 0)
- goto error;
-
- /* Create the dataset */
- if((did = H5Dcreate2(fid, DSET_EDGE, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- goto error;
-
- /* Create data */
- for (i = 0; i< 12; i++)
- for (j = 0; j< 6; j++)
- buf[i][j] = 100.0F;
-
- /* Write to the dataset */
- if(H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ if(H5Sclose(sid) < 0)
goto error;
- /* Closing */
if(H5Pclose(dcpl) < 0)
goto error;
- if(H5Sclose(sid) < 0)
- goto error;
- if(H5Dclose(did) < 0)
- goto error;
- if(H5Pclose(fapl) < 0)
+ if(H5Gclose(gid) < 0)
goto error;
if(H5Fclose(fid) < 0)
goto error;
@@ -625,25 +626,39 @@ error:
H5E_BEGIN_TRY {
H5Pclose(dcpl);
H5Sclose(sid);
- H5Dclose(did);
+ H5Dclose(did1);
+ H5Dclose(did2);
+ H5Gclose(gid);
H5Fclose(fid);
H5Pclose(fapl);
+ H5Pclose(fcpl);
} H5E_END_TRY;
-} /* gen_edge() */
+} /* gen_ext() */
int main(void)
{
- /* Generate an old format file with v1 superbock */
- gen_old(OLD_V1_FILE);
-
- /* Generate a latest-format file with v3 superblock */
- gen_latest(LATEST_V3_FILE);
+ unsigned i, new;
/* Generate a non-latest-format file with v3 superblock */
gen_non(NON_V3_FILE);
- /* Generate a new format file with a no-filter-edge-chunk dataset for testing */
+ /* Generate a new format file with a no-filter-edge-chunk dataset */
gen_edge(EDGE_V3_FILE);
+
+ /* Generate old/new format file with/without messages in the superblock extension */
+ for(new = FALSE; new <= TRUE; new++) {
+ for(i = 0; i < 8; i++) {
+ char filename[50];
+
+ HDmemset(filename, 0, sizeof(filename));
+ if(!new)
+ HDstrcat(filename, "old_");
+ HDstrcat(filename, FILENAME[i]);
+
+ gen_ext(filename, new, i);
+ }
+ } /* end for new */
+
return 0;
}
diff --git a/tools/h5format_convert/h5format_convert.c b/tools/h5format_convert/h5format_convert.c
index a80e332..105ac5d 100644
--- a/tools/h5format_convert/h5format_convert.c
+++ b/tools/h5format_convert/h5format_convert.c
@@ -88,16 +88,20 @@ static void usage(const char *prog)
printf("Examples of use:\n");
printf("\n");
printf("h5format_convert -d /group/dataset file_name\n");
- printf(" Convert the chunk indexing type to version 1 B-tree\n");
- printf(" for the chunked dataset </group/dataset> in the HDF5 file <file_name>.\n");
+ printf(" Convert the dataset </group/dataset> in the HDF5 file <file_name>:\n");
+ printf(" a. chunked dataset: convert the chunk indexing type to version 1 B-tree\n");
+ printf(" b. compact/contiguous dataset: downgrade the layout version to 3\n");
+ printf(" c. virtual dataset: no action\n");
printf("\n");
printf("h5format_convert file_name\n");
- printf(" Convert the chunk indexing type to version 1 B-tree\n");
- printf(" for all the chunked datasets in the HDF5 file <file_name>.\n");
+ printf(" Convert all datasets in the HDF5 file <file_name>:\n");
+ printf(" a. chunked dataset: convert the chunk indexing type to version 1 B-tree\n");
+ printf(" b. compact/contiguous dataset: downgrade the layout version to 3\n");
+ printf(" c. virtual dataset: no action\n");
printf("\n");
printf("h5format_convert -n -d /group/dataset file_name\n");
printf(" Go through all the steps except the actual conversion when \n");
- printf(" converting the chunked dataset </group/dataset> in the HDF5 file <file_name>.\n");
+ printf(" converting the dataset </group/dataset> in the HDF5 file <file_name>.\n");
} /* usage() */
/*-------------------------------------------------------------------------
@@ -200,11 +204,15 @@ leave(int ret)
/*-------------------------------------------------------------------------
* Function: convert()
*
- * Purpose: To change the chunk indexing type for the dataset to version 1 B-tree.
- * -- the dataset has to be chunked
- * -- the dataset's chunk indexing type is not already version 1 B-tree.
- * If the above conditions are not fulfilled, the tool will not perform
- * the conversion but will exit with success.
+ * Purpose: To downgrade a dataset's indexing type or layout version:
+ * For chunked:
+ * Downgrade the chunk indexing type to version 1 B-tree
+ * If type is already version 1 B-tree, no further action
+ * For compact/contiguous:
+ * Downgrade the layout version from 4 to 3
+ * If version is already <= 3, no further action
+ * For virtual:
+ * No further action
*
* Return: Success: 0
* Failure: 1
@@ -244,34 +252,49 @@ convert(hid_t fid, const char *dname)
} else if(verbose_g)
printf("Retrieve the dataset's layout\n");
- /* No further action if not a chunked dataset */
- if(layout_type != H5D_CHUNKED) {
- if(verbose_g)
- printf("Dataset is not chunked: no further action\n");
- h5tools_setstatus(EXIT_SUCCESS);
- goto done;
+ switch(layout_type) {
+ case H5D_CHUNKED:
+ if(verbose_g)
+ printf("Dataset is a chunked dataset\n");
- } else if(verbose_g)
- printf("Verify the dataset is a chunked dataset\n");
+ /* Get the dataset's chunk indexing type */
+ if(H5Dget_chunk_index_type(did, &idx_type) < 0) {
+ error_msg("unable to get the chunk indexing type for \"%s\"\n", dname);
+ h5tools_setstatus(EXIT_FAILURE);
+ goto error;
+ } else if(verbose_g)
+ printf("Retrieve the dataset's chunk indexing type\n");
- /* Get the dataset's chunk indexing type */
- if(H5Dget_chunk_index_type(did, &idx_type) < 0) {
- error_msg("unable to get the chunk indexing type for \"%s\"\n", dname);
- h5tools_setstatus(EXIT_FAILURE);
- goto error;
+ if(idx_type == H5D_CHUNK_IDX_BTREE) {
+ if(verbose_g)
+ printf("Dataset's chunk indexing type is already version 1 B-tree: no further action\n");
+ h5tools_setstatus(EXIT_SUCCESS);
+ goto done;
+ } else if (verbose_g)
+ printf("Dataset's chunk indexing type is not version 1 B-tree\n");
+ break;
- } else if(verbose_g)
- printf("Retrieve the dataset's chunk indexing type\n");
+ case H5D_CONTIGUOUS:
+ if(verbose_g)
+ printf("Dataset is a contiguous dataset: downgrade layout version as needed\n");
+ break;
- /* No further action if the chunk indexing type is already version 1 B-tree */
- if(idx_type == H5D_CHUNK_IDX_BTREE) {
- if(verbose_g)
- printf("Chunk indexing type is already version 1 B-tree: no further action\n");
- h5tools_setstatus(EXIT_SUCCESS);
- goto done;
+ case H5D_COMPACT:
+ if(verbose_g)
+ printf("Dataset is a compact dataset: downgrade layout version as needed\n");
+ break;
+
+ case H5D_VIRTUAL:
+ if(verbose_g)
+ printf("No further action for virtual dataset\n");
+ goto done;
- } else if (verbose_g)
- printf("Verify the dataset's chunk indexing type is not version 1 B-tree\n");
+ default:
+ error_msg("unknown layout type for \"%s\"\n", dname);
+ h5tools_setstatus(EXIT_FAILURE);
+ goto error;
+
+ } /* end switch */
/* No further action if it is a noop */
if(noop_g) {
@@ -284,12 +307,11 @@ convert(hid_t fid, const char *dname)
if(verbose_g)
printf("Converting the dataset...\n");
- /* Convert the dataset's chunk indexing type to version 1 B-tree */
+ /* Downgrade the dataset */
if(H5Dformat_convert(did) < 0) {
- error_msg("unable to convert chunk indexing for \"%s\"\n", dname);
+ error_msg("unable to downgrade dataset for \"%s\"\n", dname);
h5tools_setstatus(EXIT_FAILURE);
goto error;
-
} else if(verbose_g)
printf("Done\n");
@@ -377,9 +399,6 @@ main(int argc, const char *argv[])
H5E_auto2_t func;
void *edata;
hid_t fid = -1;
- hid_t fcpl = -1;
- H5F_file_space_type_t strategy;
- hsize_t threshold;
h5tools_setprogname(PROGRAMNAME);
h5tools_setstatus(EXIT_SUCCESS);
@@ -408,28 +427,6 @@ main(int argc, const char *argv[])
} else if(verbose_g)
printf("Open the file %s\n", fname_g);
- /* A temporaray fix:
- * need to handle H5O_FSINFO_ID message when downgrade superblock version from 3 to 2
- */
- if((fcpl = H5Fget_create_plist(fid)) < 0) {
- error_msg("unable to get file creation property list for \"%s\"\n", fname_g);
- h5tools_setstatus(EXIT_FAILURE);
- goto done;
- }
- if(H5Pget_file_space(fcpl, &strategy, &threshold) < 0) {
- error_msg("unable to get file space strategy/threshold\n");
- h5tools_setstatus(EXIT_FAILURE);
- goto done;
- }
- /* Check for non-default strategy/threshold:
- * --whether there is H5O_FSINFO_ID message in the superblock extension
- */
- if(strategy != H5F_FILE_SPACE_ALL || threshold != 1) {
- error_msg("unable to convert due to non-default file space strategy/threshold\n");
- h5tools_setstatus(EXIT_FAILURE);
- goto done;
- }
-
if(dset_g) { /* Convert a specified dataset in the file */
if(verbose_g)
printf("Going to process dataset: %s...\n", dname_g);
@@ -443,16 +440,17 @@ main(int argc, const char *argv[])
}
if(verbose_g) {
- if(noop_g) {
- printf("Not processing the file's superblock version...\n");
- h5tools_setstatus(EXIT_SUCCESS);
- goto done;
- }
- printf("Processing the file's superblock version...\n");
+ if(noop_g) {
+ printf("Not processing the file's superblock...\n");
+ h5tools_setstatus(EXIT_SUCCESS);
+ goto done;
+ }
+ printf("Processing the file's superblock...\n");
}
- if(H5Fformat_convert_super(fid) < 0) {
- error_msg("unable to convert file's superblock version\"%s\"\n", fname_g);
+ /* Process superblock */
+ if(H5Fformat_convert(fid) < 0) {
+ error_msg("unable to convert file's superblock\"%s\"\n", fname_g);
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
diff --git a/tools/h5format_convert/testfiles/h5fc_d_file.ddl b/tools/h5format_convert/testfiles/h5fc_d_file.ddl
index 3641a4f..ad7a2f4 100644
--- a/tools/h5format_convert/testfiles/h5fc_d_file.ddl
+++ b/tools/h5format_convert/testfiles/h5fc_d_file.ddl
@@ -9,14 +9,18 @@ usage: h5format_convert [OPTIONS] file_name
Examples of use:
h5format_convert -d /group/dataset file_name
- Convert the chunk indexing type to version 1 B-tree
- for the chunked dataset </group/dataset> in the HDF5 file <file_name>.
+ Convert the dataset </group/dataset> in the HDF5 file <file_name>:
+ a. chunked dataset: convert the chunk indexing type to version 1 B-tree
+ b. compact/contiguous dataset: downgrade the layout version to 3
+ c. virtual dataset: no action
h5format_convert file_name
- Convert the chunk indexing type to version 1 B-tree
- for all the chunked datasets in the HDF5 file <file_name>.
+ Convert all datasets in the HDF5 file <file_name>:
+ a. chunked dataset: convert the chunk indexing type to version 1 B-tree
+ b. compact/contiguous dataset: downgrade the layout version to 3
+ c. virtual dataset: no action
h5format_convert -n -d /group/dataset file_name
Go through all the steps except the actual conversion when
- converting the chunked dataset </group/dataset> in the HDF5 file <file_name>.
+ converting the dataset </group/dataset> in the HDF5 file <file_name>.
h5format_convert error: missing file name
diff --git a/tools/h5format_convert/testfiles/h5fc_dname.ddl b/tools/h5format_convert/testfiles/h5fc_dname.ddl
index c391764..0de42cb 100644
--- a/tools/h5format_convert/testfiles/h5fc_dname.ddl
+++ b/tools/h5format_convert/testfiles/h5fc_dname.ddl
@@ -9,14 +9,18 @@ usage: h5format_convert [OPTIONS] file_name
Examples of use:
h5format_convert -d /group/dataset file_name
- Convert the chunk indexing type to version 1 B-tree
- for the chunked dataset </group/dataset> in the HDF5 file <file_name>.
+ Convert the dataset </group/dataset> in the HDF5 file <file_name>:
+ a. chunked dataset: convert the chunk indexing type to version 1 B-tree
+ b. compact/contiguous dataset: downgrade the layout version to 3
+ c. virtual dataset: no action
h5format_convert file_name
- Convert the chunk indexing type to version 1 B-tree
- for all the chunked datasets in the HDF5 file <file_name>.
+ Convert all datasets in the HDF5 file <file_name>:
+ a. chunked dataset: convert the chunk indexing type to version 1 B-tree
+ b. compact/contiguous dataset: downgrade the layout version to 3
+ c. virtual dataset: no action
h5format_convert -n -d /group/dataset file_name
Go through all the steps except the actual conversion when
- converting the chunked dataset </group/dataset> in the HDF5 file <file_name>.
+ converting the dataset </group/dataset> in the HDF5 file <file_name>.
h5format_convert error: No dataset name
diff --git a/tools/h5format_convert/testfiles/h5fc_ext1_f.ddl b/tools/h5format_convert/testfiles/h5fc_ext1_f.ddl
new file mode 100644
index 0000000..fb5192d
--- /dev/null
+++ b/tools/h5format_convert/testfiles/h5fc_ext1_f.ddl
@@ -0,0 +1,58 @@
+HDF5 "./testfiles/tmp.h5" {
+SUPER_BLOCK {
+ SUPERBLOCK_VERSION 2
+ FREELIST_VERSION 0
+ SYMBOLTABLE_VERSION 0
+ OBJECTHEADER_VERSION 0
+ OFFSET_SIZE 8
+ LENGTH_SIZE 8
+ BTREE_RANK 16
+ BTREE_LEAF 4
+ ISTORE_K 32
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
+ USER_BLOCK {
+ USERBLOCK_SIZE 0
+ }
+}
+GROUP "/" {
+ DATASET "DSET_CONTIGUOUS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
+ }
+ DATASET "DSET_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ GROUP "GROUP" {
+ DATASET "DSET_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ }
+}
+}
diff --git a/tools/h5format_convert/testfiles/h5fc_ext1_f.h5 b/tools/h5format_convert/testfiles/h5fc_ext1_f.h5
new file mode 100644
index 0000000..b5c5867
--- /dev/null
+++ b/tools/h5format_convert/testfiles/h5fc_ext1_f.h5
Binary files differ
diff --git a/tools/h5format_convert/testfiles/h5fc_ext1_i.ddl b/tools/h5format_convert/testfiles/h5fc_ext1_i.ddl
new file mode 100644
index 0000000..2fff4ac
--- /dev/null
+++ b/tools/h5format_convert/testfiles/h5fc_ext1_i.ddl
@@ -0,0 +1,58 @@
+HDF5 "./testfiles/tmp.h5" {
+SUPER_BLOCK {
+ SUPERBLOCK_VERSION 2
+ FREELIST_VERSION 0
+ SYMBOLTABLE_VERSION 0
+ OBJECTHEADER_VERSION 0
+ OFFSET_SIZE 8
+ LENGTH_SIZE 8
+ BTREE_RANK 16
+ BTREE_LEAF 4
+ ISTORE_K 64
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
+ USER_BLOCK {
+ USERBLOCK_SIZE 0
+ }
+}
+GROUP "/" {
+ DATASET "DSET_CONTIGUOUS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
+ }
+ DATASET "DSET_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ GROUP "GROUP" {
+ DATASET "DSET_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ }
+}
+}
diff --git a/tools/h5format_convert/testfiles/h5fc_ext1_i.h5 b/tools/h5format_convert/testfiles/h5fc_ext1_i.h5
new file mode 100644
index 0000000..960a8d5
--- /dev/null
+++ b/tools/h5format_convert/testfiles/h5fc_ext1_i.h5
Binary files differ
diff --git a/tools/h5format_convert/testfiles/h5fc_ext1_s.ddl b/tools/h5format_convert/testfiles/h5fc_ext1_s.ddl
new file mode 100644
index 0000000..fb5192d
--- /dev/null
+++ b/tools/h5format_convert/testfiles/h5fc_ext1_s.ddl
@@ -0,0 +1,58 @@
+HDF5 "./testfiles/tmp.h5" {
+SUPER_BLOCK {
+ SUPERBLOCK_VERSION 2
+ FREELIST_VERSION 0
+ SYMBOLTABLE_VERSION 0
+ OBJECTHEADER_VERSION 0
+ OFFSET_SIZE 8
+ LENGTH_SIZE 8
+ BTREE_RANK 16
+ BTREE_LEAF 4
+ ISTORE_K 32
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
+ USER_BLOCK {
+ USERBLOCK_SIZE 0
+ }
+}
+GROUP "/" {
+ DATASET "DSET_CONTIGUOUS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
+ }
+ DATASET "DSET_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ GROUP "GROUP" {
+ DATASET "DSET_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ }
+}
+}
diff --git a/tools/h5format_convert/testfiles/h5fc_ext1_s.h5 b/tools/h5format_convert/testfiles/h5fc_ext1_s.h5
new file mode 100644
index 0000000..103bde6
--- /dev/null
+++ b/tools/h5format_convert/testfiles/h5fc_ext1_s.h5
Binary files differ
diff --git a/tools/h5format_convert/testfiles/h5fc_ext2_if.ddl b/tools/h5format_convert/testfiles/h5fc_ext2_if.ddl
new file mode 100644
index 0000000..2fff4ac
--- /dev/null
+++ b/tools/h5format_convert/testfiles/h5fc_ext2_if.ddl
@@ -0,0 +1,58 @@
+HDF5 "./testfiles/tmp.h5" {
+SUPER_BLOCK {
+ SUPERBLOCK_VERSION 2
+ FREELIST_VERSION 0
+ SYMBOLTABLE_VERSION 0
+ OBJECTHEADER_VERSION 0
+ OFFSET_SIZE 8
+ LENGTH_SIZE 8
+ BTREE_RANK 16
+ BTREE_LEAF 4
+ ISTORE_K 64
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
+ USER_BLOCK {
+ USERBLOCK_SIZE 0
+ }
+}
+GROUP "/" {
+ DATASET "DSET_CONTIGUOUS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
+ }
+ DATASET "DSET_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ GROUP "GROUP" {
+ DATASET "DSET_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ }
+}
+}
diff --git a/tools/h5format_convert/testfiles/h5fc_ext2_if.h5 b/tools/h5format_convert/testfiles/h5fc_ext2_if.h5
new file mode 100644
index 0000000..88e42e7
--- /dev/null
+++ b/tools/h5format_convert/testfiles/h5fc_ext2_if.h5
Binary files differ
diff --git a/tools/h5format_convert/testfiles/h5fc_ext2_is.ddl b/tools/h5format_convert/testfiles/h5fc_ext2_is.ddl
new file mode 100644
index 0000000..2fff4ac
--- /dev/null
+++ b/tools/h5format_convert/testfiles/h5fc_ext2_is.ddl
@@ -0,0 +1,58 @@
+HDF5 "./testfiles/tmp.h5" {
+SUPER_BLOCK {
+ SUPERBLOCK_VERSION 2
+ FREELIST_VERSION 0
+ SYMBOLTABLE_VERSION 0
+ OBJECTHEADER_VERSION 0
+ OFFSET_SIZE 8
+ LENGTH_SIZE 8
+ BTREE_RANK 16
+ BTREE_LEAF 4
+ ISTORE_K 64
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
+ USER_BLOCK {
+ USERBLOCK_SIZE 0
+ }
+}
+GROUP "/" {
+ DATASET "DSET_CONTIGUOUS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
+ }
+ DATASET "DSET_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ GROUP "GROUP" {
+ DATASET "DSET_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ }
+}
+}
diff --git a/tools/h5format_convert/testfiles/h5fc_ext2_is.h5 b/tools/h5format_convert/testfiles/h5fc_ext2_is.h5
new file mode 100644
index 0000000..4d76436
--- /dev/null
+++ b/tools/h5format_convert/testfiles/h5fc_ext2_is.h5
Binary files differ
diff --git a/tools/h5format_convert/testfiles/h5fc_ext2_sf.ddl b/tools/h5format_convert/testfiles/h5fc_ext2_sf.ddl
new file mode 100644
index 0000000..fb5192d
--- /dev/null
+++ b/tools/h5format_convert/testfiles/h5fc_ext2_sf.ddl
@@ -0,0 +1,58 @@
+HDF5 "./testfiles/tmp.h5" {
+SUPER_BLOCK {
+ SUPERBLOCK_VERSION 2
+ FREELIST_VERSION 0
+ SYMBOLTABLE_VERSION 0
+ OBJECTHEADER_VERSION 0
+ OFFSET_SIZE 8
+ LENGTH_SIZE 8
+ BTREE_RANK 16
+ BTREE_LEAF 4
+ ISTORE_K 32
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
+ USER_BLOCK {
+ USERBLOCK_SIZE 0
+ }
+}
+GROUP "/" {
+ DATASET "DSET_CONTIGUOUS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
+ }
+ DATASET "DSET_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ GROUP "GROUP" {
+ DATASET "DSET_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ }
+}
+}
diff --git a/tools/h5format_convert/testfiles/h5fc_ext2_sf.h5 b/tools/h5format_convert/testfiles/h5fc_ext2_sf.h5
new file mode 100644
index 0000000..c59a3ca
--- /dev/null
+++ b/tools/h5format_convert/testfiles/h5fc_ext2_sf.h5
Binary files differ
diff --git a/tools/h5format_convert/testfiles/h5fc_ext3_isf.ddl b/tools/h5format_convert/testfiles/h5fc_ext3_isf.ddl
new file mode 100644
index 0000000..2fff4ac
--- /dev/null
+++ b/tools/h5format_convert/testfiles/h5fc_ext3_isf.ddl
@@ -0,0 +1,58 @@
+HDF5 "./testfiles/tmp.h5" {
+SUPER_BLOCK {
+ SUPERBLOCK_VERSION 2
+ FREELIST_VERSION 0
+ SYMBOLTABLE_VERSION 0
+ OBJECTHEADER_VERSION 0
+ OFFSET_SIZE 8
+ LENGTH_SIZE 8
+ BTREE_RANK 16
+ BTREE_LEAF 4
+ ISTORE_K 64
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
+ USER_BLOCK {
+ USERBLOCK_SIZE 0
+ }
+}
+GROUP "/" {
+ DATASET "DSET_CONTIGUOUS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
+ }
+ DATASET "DSET_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ GROUP "GROUP" {
+ DATASET "DSET_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ }
+}
+}
diff --git a/tools/h5format_convert/testfiles/h5fc_ext3_isf.h5 b/tools/h5format_convert/testfiles/h5fc_ext3_isf.h5
new file mode 100644
index 0000000..d00fc55
--- /dev/null
+++ b/tools/h5format_convert/testfiles/h5fc_ext3_isf.h5
Binary files differ
diff --git a/tools/h5format_convert/testfiles/h5fc_latest_v3.h5 b/tools/h5format_convert/testfiles/h5fc_ext_none.h5
index f7de743..b1b1553 100644
--- a/tools/h5format_convert/testfiles/h5fc_latest_v3.h5
+++ b/tools/h5format_convert/testfiles/h5fc_ext_none.h5
Binary files differ
diff --git a/tools/h5format_convert/testfiles/h5fc_help.ddl b/tools/h5format_convert/testfiles/h5fc_help.ddl
index 9081ab8..aef8c63 100644
--- a/tools/h5format_convert/testfiles/h5fc_help.ddl
+++ b/tools/h5format_convert/testfiles/h5fc_help.ddl
@@ -9,13 +9,17 @@ usage: h5format_convert [OPTIONS] file_name
Examples of use:
h5format_convert -d /group/dataset file_name
- Convert the chunk indexing type to version 1 B-tree
- for the chunked dataset </group/dataset> in the HDF5 file <file_name>.
+ Convert the dataset </group/dataset> in the HDF5 file <file_name>:
+ a. chunked dataset: convert the chunk indexing type to version 1 B-tree
+ b. compact/contiguous dataset: downgrade the layout version to 3
+ c. virtual dataset: no action
h5format_convert file_name
- Convert the chunk indexing type to version 1 B-tree
- for all the chunked datasets in the HDF5 file <file_name>.
+ Convert all datasets in the HDF5 file <file_name>:
+ a. chunked dataset: convert the chunk indexing type to version 1 B-tree
+ b. compact/contiguous dataset: downgrade the layout version to 3
+ c. virtual dataset: no action
h5format_convert -n -d /group/dataset file_name
Go through all the steps except the actual conversion when
- converting the chunked dataset </group/dataset> in the HDF5 file <file_name>.
+ converting the dataset </group/dataset> in the HDF5 file <file_name>.
diff --git a/tools/h5format_convert/testfiles/h5fc_non_v3.h5 b/tools/h5format_convert/testfiles/h5fc_non_v3.h5
index b1bffa8..af2e8c4 100644
--- a/tools/h5format_convert/testfiles/h5fc_non_v3.h5
+++ b/tools/h5format_convert/testfiles/h5fc_non_v3.h5
Binary files differ
diff --git a/tools/h5format_convert/testfiles/h5fc_nooption.ddl b/tools/h5format_convert/testfiles/h5fc_nooption.ddl
index 9081ab8..aef8c63 100644
--- a/tools/h5format_convert/testfiles/h5fc_nooption.ddl
+++ b/tools/h5format_convert/testfiles/h5fc_nooption.ddl
@@ -9,13 +9,17 @@ usage: h5format_convert [OPTIONS] file_name
Examples of use:
h5format_convert -d /group/dataset file_name
- Convert the chunk indexing type to version 1 B-tree
- for the chunked dataset </group/dataset> in the HDF5 file <file_name>.
+ Convert the dataset </group/dataset> in the HDF5 file <file_name>:
+ a. chunked dataset: convert the chunk indexing type to version 1 B-tree
+ b. compact/contiguous dataset: downgrade the layout version to 3
+ c. virtual dataset: no action
h5format_convert file_name
- Convert the chunk indexing type to version 1 B-tree
- for all the chunked datasets in the HDF5 file <file_name>.
+ Convert all datasets in the HDF5 file <file_name>:
+ a. chunked dataset: convert the chunk indexing type to version 1 B-tree
+ b. compact/contiguous dataset: downgrade the layout version to 3
+ c. virtual dataset: no action
h5format_convert -n -d /group/dataset file_name
Go through all the steps except the actual conversion when
- converting the chunked dataset </group/dataset> in the HDF5 file <file_name>.
+ converting the dataset </group/dataset> in the HDF5 file <file_name>.
diff --git a/tools/h5format_convert/testfiles/h5fc_v_all.ddl b/tools/h5format_convert/testfiles/h5fc_v_all.ddl
index 5a35c55..5e7365d 100644
--- a/tools/h5format_convert/testfiles/h5fc_v_all.ddl
+++ b/tools/h5format_convert/testfiles/h5fc_v_all.ddl
@@ -1,27 +1,77 @@
Process command line options
Open the file tmp.h5
Processing all datasets in the file...
-Going to process dataset:/DSET_NDATA_BT1...
+Going to process dataset:/DSET_CONTIGUOUS...
Open the dataset
Retrieve the dataset's layout
-Verify the dataset is a chunked dataset
+Dataset is a contiguous dataset: downgrade layout version as needed
+Converting the dataset...
+Done
+Close the dataset
+Close the dataset creation property list
+Going to process dataset:/DSET_EA...
+Open the dataset
+Retrieve the dataset's layout
+Dataset is a chunked dataset
+Retrieve the dataset's chunk indexing type
+Dataset's chunk indexing type is already version 1 B-tree: no further action
+Close the dataset
+Close the dataset creation property list
+Going to process dataset:/DSET_FA...
+Open the dataset
+Retrieve the dataset's layout
+Dataset is a chunked dataset
+Retrieve the dataset's chunk indexing type
+Dataset's chunk indexing type is already version 1 B-tree: no further action
+Close the dataset
+Close the dataset creation property list
+Going to process dataset:/DSET_NDATA_BT2...
+Open the dataset
+Retrieve the dataset's layout
+Dataset is a chunked dataset
+Retrieve the dataset's chunk indexing type
+Dataset's chunk indexing type is already version 1 B-tree: no further action
+Close the dataset
+Close the dataset creation property list
+Going to process dataset:/DSET_NONE...
+Open the dataset
+Retrieve the dataset's layout
+Dataset is a chunked dataset
Retrieve the dataset's chunk indexing type
-Chunk indexing type is already version 1 B-tree: no further action
+Dataset's chunk indexing type is already version 1 B-tree: no further action
Close the dataset
Close the dataset creation property list
-Going to process dataset:/DSET_NON_CHUNKED...
+Going to process dataset:/GROUP/DSET_BT2...
Open the dataset
Retrieve the dataset's layout
-Dataset is not chunked: no further action
+Dataset is a chunked dataset
+Retrieve the dataset's chunk indexing type
+Dataset's chunk indexing type is already version 1 B-tree: no further action
+Close the dataset
+Close the dataset creation property list
+Going to process dataset:/GROUP/DSET_NDATA_EA...
+Open the dataset
+Retrieve the dataset's layout
+Dataset is a chunked dataset
+Retrieve the dataset's chunk indexing type
+Dataset's chunk indexing type is already version 1 B-tree: no further action
+Close the dataset
+Close the dataset creation property list
+Going to process dataset:/GROUP/DSET_NDATA_FA...
+Open the dataset
+Retrieve the dataset's layout
+Dataset is a chunked dataset
+Retrieve the dataset's chunk indexing type
+Dataset's chunk indexing type is already version 1 B-tree: no further action
Close the dataset
Close the dataset creation property list
-Going to process dataset:/GROUP/DSET_BT1...
+Going to process dataset:/GROUP/DSET_NDATA_NONE...
Open the dataset
Retrieve the dataset's layout
-Verify the dataset is a chunked dataset
+Dataset is a chunked dataset
Retrieve the dataset's chunk indexing type
-Chunk indexing type is already version 1 B-tree: no further action
+Dataset's chunk indexing type is already version 1 B-tree: no further action
Close the dataset
Close the dataset creation property list
-Processing the file's superblock version...
+Processing the file's superblock...
Close the file
diff --git a/tools/h5format_convert/testfiles/h5fc_v_bt1.ddl b/tools/h5format_convert/testfiles/h5fc_v_bt1.ddl
index c96b647..c501eb0 100644
--- a/tools/h5format_convert/testfiles/h5fc_v_bt1.ddl
+++ b/tools/h5format_convert/testfiles/h5fc_v_bt1.ddl
@@ -1,12 +1,12 @@
Process command line options
Open the file tmp.h5
-Going to process dataset: /GROUP/DSET_BT1...
+Going to process dataset: /GROUP/DSET_BT2...
Open the dataset
Retrieve the dataset's layout
-Verify the dataset is a chunked dataset
+Dataset is a chunked dataset
Retrieve the dataset's chunk indexing type
-Chunk indexing type is already version 1 B-tree: no further action
+Dataset's chunk indexing type is already version 1 B-tree: no further action
Close the dataset
Close the dataset creation property list
-Processing the file's superblock version...
+Processing the file's superblock...
Close the file
diff --git a/tools/h5format_convert/testfiles/h5fc_v_n_1d.ddl b/tools/h5format_convert/testfiles/h5fc_v_n_1d.ddl
index a7a622a..ff5da4a 100644
--- a/tools/h5format_convert/testfiles/h5fc_v_n_1d.ddl
+++ b/tools/h5format_convert/testfiles/h5fc_v_n_1d.ddl
@@ -4,11 +4,11 @@ Open the file tmp.h5
Going to process dataset: /DSET_EA...
Open the dataset
Retrieve the dataset's layout
-Verify the dataset is a chunked dataset
+Dataset is a chunked dataset
Retrieve the dataset's chunk indexing type
-Verify the dataset's chunk indexing type is not version 1 B-tree
+Dataset's chunk indexing type is not version 1 B-tree
Not converting the dataset
Close the dataset
Close the dataset creation property list
-Not processing the file's superblock version...
+Not processing the file's superblock...
Close the file
diff --git a/tools/h5format_convert/testfiles/h5fc_v_n_all.ddl b/tools/h5format_convert/testfiles/h5fc_v_n_all.ddl
index 3e92568..d2ffbbf 100644
--- a/tools/h5format_convert/testfiles/h5fc_v_n_all.ddl
+++ b/tools/h5format_convert/testfiles/h5fc_v_n_all.ddl
@@ -2,47 +2,55 @@ Process command line options
It is noop...
Open the file tmp.h5
Processing all datasets in the file...
+Going to process dataset:/DSET_CONTIGUOUS...
+Open the dataset
+Retrieve the dataset's layout
+Dataset is a contiguous dataset: downgrade layout version as needed
+Not converting the dataset
+Close the dataset
+Close the dataset creation property list
Going to process dataset:/DSET_NDATA_BT2...
Open the dataset
Retrieve the dataset's layout
-Verify the dataset is a chunked dataset
+Dataset is a chunked dataset
Retrieve the dataset's chunk indexing type
-Verify the dataset's chunk indexing type is not version 1 B-tree
+Dataset's chunk indexing type is not version 1 B-tree
Not converting the dataset
Close the dataset
Close the dataset creation property list
Going to process dataset:/DSET_NDATA_EA...
Open the dataset
Retrieve the dataset's layout
-Verify the dataset is a chunked dataset
+Dataset is a chunked dataset
Retrieve the dataset's chunk indexing type
-Verify the dataset's chunk indexing type is not version 1 B-tree
+Dataset's chunk indexing type is not version 1 B-tree
Not converting the dataset
Close the dataset
Close the dataset creation property list
Going to process dataset:/GROUP/DSET_BT2...
Open the dataset
Retrieve the dataset's layout
-Verify the dataset is a chunked dataset
+Dataset is a chunked dataset
Retrieve the dataset's chunk indexing type
-Verify the dataset's chunk indexing type is not version 1 B-tree
+Dataset's chunk indexing type is not version 1 B-tree
Not converting the dataset
Close the dataset
Close the dataset creation property list
-Going to process dataset:/GROUP/DSET_EA...
+Going to process dataset:/GROUP/DSET_COMPACT...
Open the dataset
Retrieve the dataset's layout
-Verify the dataset is a chunked dataset
-Retrieve the dataset's chunk indexing type
-Verify the dataset's chunk indexing type is not version 1 B-tree
+Dataset is a contiguous dataset: downgrade layout version as needed
Not converting the dataset
Close the dataset
Close the dataset creation property list
-Going to process dataset:/GROUP/DSET_NON_CHUNKED...
+Going to process dataset:/GROUP/DSET_EA...
Open the dataset
Retrieve the dataset's layout
-Dataset is not chunked: no further action
+Dataset is a chunked dataset
+Retrieve the dataset's chunk indexing type
+Dataset's chunk indexing type is not version 1 B-tree
+Not converting the dataset
Close the dataset
Close the dataset creation property list
-Not processing the file's superblock version...
+Not processing the file's superblock...
Close the file
diff --git a/tools/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl b/tools/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl
index bdf3380..ba794a7 100644
--- a/tools/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl
+++ b/tools/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl
@@ -1,13 +1,13 @@
Process command line options
It is noop...
Open the file tmp.h5
-Going to process dataset: /DSET_NDATA_BT1...
+Going to process dataset: /DSET_NDATA_BT2...
Open the dataset
Retrieve the dataset's layout
-Verify the dataset is a chunked dataset
+Dataset is a chunked dataset
Retrieve the dataset's chunk indexing type
-Chunk indexing type is already version 1 B-tree: no further action
+Dataset's chunk indexing type is already version 1 B-tree: no further action
Close the dataset
Close the dataset creation property list
-Not processing the file's superblock version...
+Not processing the file's superblock...
Close the file
diff --git a/tools/h5format_convert/testfiles/h5fc_v_non_chunked.ddl b/tools/h5format_convert/testfiles/h5fc_v_non_chunked.ddl
index 4caafe9..aba0740 100644
--- a/tools/h5format_convert/testfiles/h5fc_v_non_chunked.ddl
+++ b/tools/h5format_convert/testfiles/h5fc_v_non_chunked.ddl
@@ -1,10 +1,12 @@
Process command line options
Open the file tmp.h5
-Going to process dataset: /DSET_NON_CHUNKED...
+Going to process dataset: /DSET_CONTIGUOUS...
Open the dataset
Retrieve the dataset's layout
-Dataset is not chunked: no further action
+Dataset is a contiguous dataset: downgrade layout version as needed
+Converting the dataset...
+Done
Close the dataset
Close the dataset creation property list
-Processing the file's superblock version...
+Processing the file's superblock...
Close the file
diff --git a/tools/h5format_convert/testfiles/old_h5fc_ext1_f.ddl b/tools/h5format_convert/testfiles/old_h5fc_ext1_f.ddl
new file mode 100644
index 0000000..fb5192d
--- /dev/null
+++ b/tools/h5format_convert/testfiles/old_h5fc_ext1_f.ddl
@@ -0,0 +1,58 @@
+HDF5 "./testfiles/tmp.h5" {
+SUPER_BLOCK {
+ SUPERBLOCK_VERSION 2
+ FREELIST_VERSION 0
+ SYMBOLTABLE_VERSION 0
+ OBJECTHEADER_VERSION 0
+ OFFSET_SIZE 8
+ LENGTH_SIZE 8
+ BTREE_RANK 16
+ BTREE_LEAF 4
+ ISTORE_K 32
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
+ USER_BLOCK {
+ USERBLOCK_SIZE 0
+ }
+}
+GROUP "/" {
+ DATASET "DSET_CONTIGUOUS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
+ }
+ DATASET "DSET_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ GROUP "GROUP" {
+ DATASET "DSET_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ }
+}
+}
diff --git a/tools/h5format_convert/testfiles/old_h5fc_ext1_f.h5 b/tools/h5format_convert/testfiles/old_h5fc_ext1_f.h5
new file mode 100644
index 0000000..3cbc7f4
--- /dev/null
+++ b/tools/h5format_convert/testfiles/old_h5fc_ext1_f.h5
Binary files differ
diff --git a/tools/h5format_convert/testfiles/old_h5fc_ext1_i.ddl b/tools/h5format_convert/testfiles/old_h5fc_ext1_i.ddl
new file mode 100644
index 0000000..c906082
--- /dev/null
+++ b/tools/h5format_convert/testfiles/old_h5fc_ext1_i.ddl
@@ -0,0 +1,58 @@
+HDF5 "./testfiles/tmp.h5" {
+SUPER_BLOCK {
+ SUPERBLOCK_VERSION 1
+ FREELIST_VERSION 0
+ SYMBOLTABLE_VERSION 0
+ OBJECTHEADER_VERSION 0
+ OFFSET_SIZE 8
+ LENGTH_SIZE 8
+ BTREE_RANK 16
+ BTREE_LEAF 4
+ ISTORE_K 64
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
+ USER_BLOCK {
+ USERBLOCK_SIZE 0
+ }
+}
+GROUP "/" {
+ DATASET "DSET_CONTIGUOUS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
+ }
+ DATASET "DSET_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ GROUP "GROUP" {
+ DATASET "DSET_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ }
+}
+}
diff --git a/tools/h5format_convert/testfiles/old_h5fc_ext1_i.h5 b/tools/h5format_convert/testfiles/old_h5fc_ext1_i.h5
new file mode 100644
index 0000000..a2c9187
--- /dev/null
+++ b/tools/h5format_convert/testfiles/old_h5fc_ext1_i.h5
Binary files differ
diff --git a/tools/h5format_convert/testfiles/old_h5fc_ext1_s.ddl b/tools/h5format_convert/testfiles/old_h5fc_ext1_s.ddl
new file mode 100644
index 0000000..fb5192d
--- /dev/null
+++ b/tools/h5format_convert/testfiles/old_h5fc_ext1_s.ddl
@@ -0,0 +1,58 @@
+HDF5 "./testfiles/tmp.h5" {
+SUPER_BLOCK {
+ SUPERBLOCK_VERSION 2
+ FREELIST_VERSION 0
+ SYMBOLTABLE_VERSION 0
+ OBJECTHEADER_VERSION 0
+ OFFSET_SIZE 8
+ LENGTH_SIZE 8
+ BTREE_RANK 16
+ BTREE_LEAF 4
+ ISTORE_K 32
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
+ USER_BLOCK {
+ USERBLOCK_SIZE 0
+ }
+}
+GROUP "/" {
+ DATASET "DSET_CONTIGUOUS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
+ }
+ DATASET "DSET_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ GROUP "GROUP" {
+ DATASET "DSET_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ }
+}
+}
diff --git a/tools/h5format_convert/testfiles/old_h5fc_ext1_s.h5 b/tools/h5format_convert/testfiles/old_h5fc_ext1_s.h5
new file mode 100644
index 0000000..fdf4f33
--- /dev/null
+++ b/tools/h5format_convert/testfiles/old_h5fc_ext1_s.h5
Binary files differ
diff --git a/tools/h5format_convert/testfiles/old_h5fc_ext2_if.ddl b/tools/h5format_convert/testfiles/old_h5fc_ext2_if.ddl
new file mode 100644
index 0000000..2fff4ac
--- /dev/null
+++ b/tools/h5format_convert/testfiles/old_h5fc_ext2_if.ddl
@@ -0,0 +1,58 @@
+HDF5 "./testfiles/tmp.h5" {
+SUPER_BLOCK {
+ SUPERBLOCK_VERSION 2
+ FREELIST_VERSION 0
+ SYMBOLTABLE_VERSION 0
+ OBJECTHEADER_VERSION 0
+ OFFSET_SIZE 8
+ LENGTH_SIZE 8
+ BTREE_RANK 16
+ BTREE_LEAF 4
+ ISTORE_K 64
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
+ USER_BLOCK {
+ USERBLOCK_SIZE 0
+ }
+}
+GROUP "/" {
+ DATASET "DSET_CONTIGUOUS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
+ }
+ DATASET "DSET_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ GROUP "GROUP" {
+ DATASET "DSET_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ }
+}
+}
diff --git a/tools/h5format_convert/testfiles/old_h5fc_ext2_if.h5 b/tools/h5format_convert/testfiles/old_h5fc_ext2_if.h5
new file mode 100644
index 0000000..6bf0a2f
--- /dev/null
+++ b/tools/h5format_convert/testfiles/old_h5fc_ext2_if.h5
Binary files differ
diff --git a/tools/h5format_convert/testfiles/old_h5fc_ext2_is.ddl b/tools/h5format_convert/testfiles/old_h5fc_ext2_is.ddl
new file mode 100644
index 0000000..2fff4ac
--- /dev/null
+++ b/tools/h5format_convert/testfiles/old_h5fc_ext2_is.ddl
@@ -0,0 +1,58 @@
+HDF5 "./testfiles/tmp.h5" {
+SUPER_BLOCK {
+ SUPERBLOCK_VERSION 2
+ FREELIST_VERSION 0
+ SYMBOLTABLE_VERSION 0
+ OBJECTHEADER_VERSION 0
+ OFFSET_SIZE 8
+ LENGTH_SIZE 8
+ BTREE_RANK 16
+ BTREE_LEAF 4
+ ISTORE_K 64
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
+ USER_BLOCK {
+ USERBLOCK_SIZE 0
+ }
+}
+GROUP "/" {
+ DATASET "DSET_CONTIGUOUS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
+ }
+ DATASET "DSET_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ GROUP "GROUP" {
+ DATASET "DSET_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ }
+}
+}
diff --git a/tools/h5format_convert/testfiles/old_h5fc_ext2_is.h5 b/tools/h5format_convert/testfiles/old_h5fc_ext2_is.h5
new file mode 100644
index 0000000..c0c7ecc
--- /dev/null
+++ b/tools/h5format_convert/testfiles/old_h5fc_ext2_is.h5
Binary files differ
diff --git a/tools/h5format_convert/testfiles/old_h5fc_ext2_sf.ddl b/tools/h5format_convert/testfiles/old_h5fc_ext2_sf.ddl
new file mode 100644
index 0000000..fb5192d
--- /dev/null
+++ b/tools/h5format_convert/testfiles/old_h5fc_ext2_sf.ddl
@@ -0,0 +1,58 @@
+HDF5 "./testfiles/tmp.h5" {
+SUPER_BLOCK {
+ SUPERBLOCK_VERSION 2
+ FREELIST_VERSION 0
+ SYMBOLTABLE_VERSION 0
+ OBJECTHEADER_VERSION 0
+ OFFSET_SIZE 8
+ LENGTH_SIZE 8
+ BTREE_RANK 16
+ BTREE_LEAF 4
+ ISTORE_K 32
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
+ USER_BLOCK {
+ USERBLOCK_SIZE 0
+ }
+}
+GROUP "/" {
+ DATASET "DSET_CONTIGUOUS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
+ }
+ DATASET "DSET_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ GROUP "GROUP" {
+ DATASET "DSET_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ }
+}
+}
diff --git a/tools/h5format_convert/testfiles/old_h5fc_ext2_sf.h5 b/tools/h5format_convert/testfiles/old_h5fc_ext2_sf.h5
new file mode 100644
index 0000000..055cabf
--- /dev/null
+++ b/tools/h5format_convert/testfiles/old_h5fc_ext2_sf.h5
Binary files differ
diff --git a/tools/h5format_convert/testfiles/old_h5fc_ext3_isf.ddl b/tools/h5format_convert/testfiles/old_h5fc_ext3_isf.ddl
new file mode 100644
index 0000000..2fff4ac
--- /dev/null
+++ b/tools/h5format_convert/testfiles/old_h5fc_ext3_isf.ddl
@@ -0,0 +1,58 @@
+HDF5 "./testfiles/tmp.h5" {
+SUPER_BLOCK {
+ SUPERBLOCK_VERSION 2
+ FREELIST_VERSION 0
+ SYMBOLTABLE_VERSION 0
+ OBJECTHEADER_VERSION 0
+ OFFSET_SIZE 8
+ LENGTH_SIZE 8
+ BTREE_RANK 16
+ BTREE_LEAF 4
+ ISTORE_K 64
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
+ USER_BLOCK {
+ USERBLOCK_SIZE 0
+ }
+}
+GROUP "/" {
+ DATASET "DSET_CONTIGUOUS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
+ }
+ DATASET "DSET_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ GROUP "GROUP" {
+ DATASET "DSET_BT2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( H5S_UNLIMITED, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_EA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 10, H5S_UNLIMITED ) }
+ }
+ DATASET "DSET_NDATA_FA" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 20, 10 ) }
+ }
+ DATASET "DSET_NDATA_NONE" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 4, 6 ) / ( 4, 6 ) }
+ }
+ }
+}
+}
diff --git a/tools/h5format_convert/testfiles/old_h5fc_ext3_isf.h5 b/tools/h5format_convert/testfiles/old_h5fc_ext3_isf.h5
new file mode 100644
index 0000000..f4caaf4
--- /dev/null
+++ b/tools/h5format_convert/testfiles/old_h5fc_ext3_isf.h5
Binary files differ
diff --git a/tools/h5format_convert/testfiles/old_h5fc_ext_none.h5 b/tools/h5format_convert/testfiles/old_h5fc_ext_none.h5
new file mode 100644
index 0000000..d0bf344
--- /dev/null
+++ b/tools/h5format_convert/testfiles/old_h5fc_ext_none.h5
Binary files differ
diff --git a/tools/h5format_convert/testh5fc.sh.in b/tools/h5format_convert/testh5fc.sh.in
index dc5aa48..f712434 100644
--- a/tools/h5format_convert/testh5fc.sh.in
+++ b/tools/h5format_convert/testh5fc.sh.in
@@ -41,6 +41,8 @@ RM='rm -rf'
CMP='cmp -s'
DIFF='diff -c'
CP='cp'
+H5DUMP=../h5dump/h5dump # The h5dump tool name
+H5DUMP_BIN=`pwd`/$H5DUMP # The path of the h5dump tool binary
DIRNAME='dirname'
LS='ls'
AWK='awk'
@@ -79,10 +81,24 @@ TMPFILE=tmp.h5
# Comment '#' without space can be used.
# --------------------------------------------------------------------
LIST_HDF5_TEST_FILES="
-$SRC_H5FORMCONV_TESTFILES/h5fc_v1.h5
-$SRC_H5FORMCONV_TESTFILES/h5fc_latest_v3.h5
$SRC_H5FORMCONV_TESTFILES/h5fc_non_v3.h5
$SRC_H5FORMCONV_TESTFILES/h5fc_edge_v3.h5
+$SRC_H5FORMCONV_TESTFILES/h5fc_ext_none.h5
+$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext_none.h5
+$SRC_H5FORMCONV_TESTFILES/h5fc_ext1_i.h5
+$SRC_H5FORMCONV_TESTFILES/h5fc_ext1_s.h5
+$SRC_H5FORMCONV_TESTFILES/h5fc_ext1_f.h5
+$SRC_H5FORMCONV_TESTFILES/h5fc_ext2_if.h5
+$SRC_H5FORMCONV_TESTFILES/h5fc_ext2_is.h5
+$SRC_H5FORMCONV_TESTFILES/h5fc_ext2_sf.h5
+$SRC_H5FORMCONV_TESTFILES/h5fc_ext3_isf.h5
+$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext1_i.h5
+$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext1_s.h5
+$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext1_f.h5
+$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext2_if.h5
+$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext2_is.h5
+$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext2_sf.h5
+$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext3_isf.h5
"
LIST_OTHER_TEST_FILES="
@@ -98,6 +114,20 @@ $SRC_H5FORMCONV_TESTFILES/h5fc_v_ndata_bt1.ddl
$SRC_H5FORMCONV_TESTFILES/h5fc_v_all.ddl
$SRC_H5FORMCONV_TESTFILES/h5fc_v_n_1d.ddl
$SRC_H5FORMCONV_TESTFILES/h5fc_v_n_all.ddl
+$SRC_H5FORMCONV_TESTFILES/h5fc_ext1_i.ddl
+$SRC_H5FORMCONV_TESTFILES/h5fc_ext1_s.ddl
+$SRC_H5FORMCONV_TESTFILES/h5fc_ext1_f.ddl
+$SRC_H5FORMCONV_TESTFILES/h5fc_ext2_if.ddl
+$SRC_H5FORMCONV_TESTFILES/h5fc_ext2_is.ddl
+$SRC_H5FORMCONV_TESTFILES/h5fc_ext2_sf.ddl
+$SRC_H5FORMCONV_TESTFILES/h5fc_ext3_isf.ddl
+$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext1_i.ddl
+$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext1_s.ddl
+$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext1_f.ddl
+$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext2_if.ddl
+$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext2_is.ddl
+$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext2_sf.ddl
+$SRC_H5FORMCONV_TESTFILES/old_h5fc_ext3_isf.ddl
"
#
@@ -199,14 +229,7 @@ TOOLTEST_OUT() {
cat $actual_err >> $actual
# Compare output
- if $CMP $expect $actual; then
- echo " PASSED"
- else
- echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
- fi
+ COMPARE_OUT $expect $actual
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
@@ -243,8 +266,8 @@ CHECKING() {
echo "Verifying $* $SPACES" | cut -c1-80 | tr -d '\012'
}
-# $1 dataset name
# Assume $TESTDIR/$TMPFILE is the converted test file
+# $1 dataset name
IDX_CHECK() {
CHECKING $1
$RUNSERIAL $CHK_IDX_BIN $TESTDIR/$TMPFILE $1
@@ -258,6 +281,39 @@ IDX_CHECK() {
fi
}
+# $1 is the expected output
+# $2 is the output from testing
+COMPARE_OUT() {
+ if $CMP $1 $2; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+}
+
+# Assume $TESTDIR/$TMPFILE is the converted test file
+# $1 is the test file for verifying h5dump output
+# $2 is the expected output from h5dump
+H5DUMP_CHECK() {
+ CHECKING h5dump output for $1
+ expect="$TESTDIR/$2"
+ actual="$TESTDIR/`basename $2 .ddl`.out"
+ actual_err="$TESTDIR/`basename $2 .ddl`.err"
+ $RUNSERIAL $H5DUMP_BIN -BH $TESTDIR/$TMPFILE > $actual 2>$actual_err
+ cat $actual_err >> $actual
+
+ # Compare output
+ COMPARE_OUT $expect $actual
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ $RM $actual $actual_err
+ fi
+}
+
# Print a "SKIP" message
SKIP() {
TESTING $STAT $@
@@ -284,31 +340,31 @@ TOOLTEST_OUT h5fc_nooption.ddl ''
TOOLTEST_OUT h5fc_nonexistfile.ddl nonexist.h5
#
#
-# h5format_convert -d h5fc_v1.h5 (just -d option, file exists)
-# h5format_convert --dname h5fc_v1.h5 (just --dname option, file exists)
+# h5format_convert -d old_h5fc_ext_none.h5 (just -d option, file exists)
+# h5format_convert --dname old_h5fc_ext_none.h5 (just --dname option, file exists)
# h5format_convert --dname (just --dname option)
-# h5format_convert --dname=nonexist h5fc_v1.h5 (dataset does not exist, file exists)
-TOOLTEST_OUT h5fc_d_file.ddl h5fc_v1.h5 -d
-TOOLTEST_OUT h5fc_d_file.ddl h5fc_v1.h5 --dname
+# h5format_convert --dname=nonexist old_h5fc_ext_none.h5 (dataset does not exist, file exists)
+TOOLTEST_OUT h5fc_d_file.ddl old_h5fc_ext_none.h5 -d
+TOOLTEST_OUT h5fc_d_file.ddl old_h5fc_ext_none.h5 --dname
TOOLTEST_OUT h5fc_dname.ddl '' --dname
-TOOLTEST_OUT h5fc_nonexistdset_file.ddl h5fc_v1.h5 --dname=nonexist
+TOOLTEST_OUT h5fc_nonexistdset_file.ddl old_h5fc_ext_none.h5 --dname=nonexist
#
#
#
-# h5format_convert -d /DSET_NON_CHUNKED -v h5fc_v1.h5 (verbose, non-chunked dataset)
-# h5format_convert -d /GROUP/DSET_BT1 --verbose h5fc_v1.h5 (verbose, bt1 dataset)
-# h5format_convert -d /DSET_NDATA_BT1 -v -n h5fc_v1.h5 (verbose, noop, bt1+nodata dataset)
-# h5format_convert -v h5fc_v1.h5 (verbose, all datasets)
-TOOLTEST_OUT h5fc_v_non_chunked.ddl h5fc_v1.h5 -d /DSET_NON_CHUNKED -v
-TOOLTEST_OUT h5fc_v_bt1.ddl h5fc_v1.h5 -d /GROUP/DSET_BT1 --verbose
-TOOLTEST_OUT h5fc_v_ndata_bt1.ddl h5fc_v1.h5 -d /DSET_NDATA_BT1 -v -n
-TOOLTEST_OUT h5fc_v_all.ddl h5fc_v1.h5 -v
+# h5format_convert -d /DSET_CONTIGUOUS -v old_h5fc_ext_none.h5 (verbose, contiguous dataset)
+# h5format_convert -d /GROUP/DSET_BT2 --verbose old_h5fc_ext_none.h5 (verbose, bt1 dataset)
+# h5format_convert -d /DSET_NDATA_BT2 -v -n old_h5fc_ext_none.h5 (verbose, noop, bt1+nodata dataset)
+# h5format_convert -v old_h5fc_ext_none.h5 (verbose, all datasets)
+TOOLTEST_OUT h5fc_v_non_chunked.ddl old_h5fc_ext_none.h5 -d /DSET_CONTIGUOUS -v
+TOOLTEST_OUT h5fc_v_bt1.ddl old_h5fc_ext_none.h5 -d /GROUP/DSET_BT2 --verbose
+TOOLTEST_OUT h5fc_v_ndata_bt1.ddl old_h5fc_ext_none.h5 -d /DSET_NDATA_BT2 -v -n
+TOOLTEST_OUT h5fc_v_all.ddl old_h5fc_ext_none.h5 -v
#
#
#
-# h5format_convert -d /DSET_EA -v -n h5fc_latest_v3.h5 (verbose, noop, one ea dataset)
+# h5format_convert -d /DSET_EA -v -n h5fc_ext_none.h5 (verbose, noop, one ea dataset)
# h5format_convert -v -n h5fc_non_v3.h5 (verbose, noop, all datasets)
-TOOLTEST_OUT h5fc_v_n_1d.ddl h5fc_latest_v3.h5 -d /DSET_EA -v -n
+TOOLTEST_OUT h5fc_v_n_1d.ddl h5fc_ext_none.h5 -d /DSET_EA -v -n
TOOLTEST_OUT h5fc_v_n_all.ddl h5fc_non_v3.h5 -v -n
#
#
@@ -316,45 +372,45 @@ TOOLTEST_OUT h5fc_v_n_all.ddl h5fc_non_v3.h5 -v -n
# No output from tests
# 1) Use the tool to convert the dataset
# 2) Verify the chunk indexing type is correct
-# h5format_convert -d /DSET_EA h5fc_latest_v3.h5
-# h5format_convert -d /GROUP/DSET_NDATA_EA h5fc_latest_v3.h5
-# h5format_convert -d /GROUP/DSET_BT2 h5fc_latest_v3.h5
-# h5format_convert -d /DSET_NDATA_BT2 h5fc_latest_v3.h5
-# h5format_convert -d /DSET_FA h5fc_latest_v3.h5
-# h5format_convert -d /GROUP/DSET_FA h5fc_latest_v3.h5
-# h5format_convert -d /DSET_NONE h5fc_latest_v3.h5
-# h5format_convert -d /GROUP/DSET_NONE h5fc_latest_v3.h5
-TOOLTEST h5fc_latest_v3.h5 -d /DSET_EA
+# h5format_convert -d /DSET_EA h5fc_ext_none.h5
+# h5format_convert -d /GROUP/DSET_NDATA_EA h5fc_ext_none.h5
+# h5format_convert -d /GROUP/DSET_BT2 h5fc_ext_none.h5
+# h5format_convert -d /DSET_NDATA_BT2 h5fc_ext_none.h5
+# h5format_convert -d /DSET_FA h5fc_ext_none.h5
+# h5format_convert -d /GROUP/DSET_FA h5fc_ext_none.h5
+# h5format_convert -d /DSET_NONE h5fc_ext_none.h5
+# h5format_convert -d /GROUP/DSET_NDATA_NONE h5fc_ext_none.h5
+TOOLTEST h5fc_ext_none.h5 -d /DSET_EA
IDX_CHECK /DSET_EA
#
-TOOLTEST h5fc_latest_v3.h5 -d /GROUP/DSET_NDATA_EA
+TOOLTEST h5fc_ext_none.h5 -d /GROUP/DSET_NDATA_EA
IDX_CHECK /GROUP/DSET_NDATA_EA
#
-TOOLTEST h5fc_latest_v3.h5 -d /GROUP/DSET_BT2
+TOOLTEST h5fc_ext_none.h5 -d /GROUP/DSET_BT2
IDX_CHECK /GROUP/DSET_BT2
#
-TOOLTEST h5fc_latest_v3.h5 -d /DSET_NDATA_BT2
+TOOLTEST h5fc_ext_none.h5 -d /DSET_NDATA_BT2
IDX_CHECK /DSET_NDATA_BT2
#
-TOOLTEST h5fc_latest_v3.h5 -d /DSET_FA
+TOOLTEST h5fc_ext_none.h5 -d /DSET_FA
IDX_CHECK /DSET_FA
#
-TOOLTEST h5fc_latest_v3.h5 -d /GROUP/DSET_NDATA_FA
+TOOLTEST h5fc_ext_none.h5 -d /GROUP/DSET_NDATA_FA
IDX_CHECK /GROUP/DSET_NDATA_FA
#
-TOOLTEST h5fc_latest_v3.h5 -d /DSET_NONE
+TOOLTEST h5fc_ext_none.h5 -d /DSET_NONE
IDX_CHECK /DSET_NONE
#
-TOOLTEST h5fc_latest_v3.h5 -d /GROUP/DSET_NDATA_NONE
+TOOLTEST h5fc_ext_none.h5 -d /GROUP/DSET_NDATA_NONE
IDX_CHECK /GROUP/DSET_NDATA_NONE
#
#
#
# No output from tests: just check exit code
-# h5format_convert -d /DSET_NDATA_BT1 h5fc_v1.h5 (v1-btree dataset)
-# h5format_convert -d /GROUP/DSET_NON_CHUNKED h5fc_non_v3.h5 (non-chunked dataset)
-TOOLTEST h5fc_v1.h5 -d /DSET_NDATA_BT1
-TOOLTEST h5fc_non_v3.h5 -d /GROUP/DSET_NON_CHUNKED
+# h5format_convert -d /DSET_NDATA_BT2 old_h5fc_ext_none.h5 (v1-btree dataset)
+# h5format_convert -d /DSET_CONTIGUOUS h5fc_non_v3.h5 (non-chunked dataset)
+TOOLTEST old_h5fc_ext_none.h5 -d /DSET_NDATA_BT2
+TOOLTEST h5fc_non_v3.h5 -d /DSET_CONTIGUOUS
#
#
#
@@ -386,6 +442,44 @@ TOOLTEST h5fc_edge_v3.h5
IDX_CHECK /DSET_EDGE
#
#
+
+# The following test files have messages in the superblock extension.
+# Verify h5dump output for correctness after conversion
+TOOLTEST h5fc_ext1_i.h5
+H5DUMP_CHECK h5fc_ext1_i.h5 h5fc_ext1_i.ddl
+TOOLTEST h5fc_ext1_s.h5
+H5DUMP_CHECK h5fc_ext1_s.h5 h5fc_ext1_s.ddl
+TOOLTEST h5fc_ext1_f.h5
+H5DUMP_CHECK h5fc_ext1_f.h5 h5fc_ext1_f.ddl
+#
+TOOLTEST h5fc_ext2_if.h5
+H5DUMP_CHECK h5fc_ext2_if.h5 h5fc_ext2_if.ddl
+TOOLTEST h5fc_ext2_is.h5
+H5DUMP_CHECK h5fc_ext2_is.h5 h5fc_ext2_is.ddl
+TOOLTEST h5fc_ext2_sf.h5
+H5DUMP_CHECK h5fc_ext2_sf.h5 h5fc_ext2_sf.ddl
+#
+TOOLTEST h5fc_ext3_isf.h5
+H5DUMP_CHECK h5fc_ext3_isf.h5 h5fc_ext3_isf.ddl
+#
+#
+#
+TOOLTEST old_h5fc_ext1_i.h5
+H5DUMP_CHECK old_h5fc_ext1_i.h5 old_h5fc_ext1_i.ddl
+TOOLTEST old_h5fc_ext1_s.h5
+H5DUMP_CHECK old_h5fc_ext1_s.h5 old_h5fc_ext1_s.ddl
+TOOLTEST old_h5fc_ext1_f.h5
+H5DUMP_CHECK old_h5fc_ext1_f.h5 old_h5fc_ext1_f.ddl
+#
+TOOLTEST old_h5fc_ext2_if.h5
+H5DUMP_CHECK old_h5fc_ext2_if.h5 old_h5fc_ext2_if.ddl
+TOOLTEST old_h5fc_ext2_is.h5
+H5DUMP_CHECK old_h5fc_ext2_is.h5 old_h5fc_ext2_is.ddl
+TOOLTEST old_h5fc_ext2_sf.h5
+H5DUMP_CHECK old_h5fc_ext2_sf.h5 old_h5fc_ext2_sf.ddl
+#
+TOOLTEST old_h5fc_ext3_isf.h5
+H5DUMP_CHECK old_h5fc_ext3_isf.h5 old_h5fc_ext3_isf.ddl
#
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in
index 9744c03..efc6aeb 100644
--- a/tools/h5import/Makefile.in
+++ b/tools/h5import/Makefile.in
@@ -427,16 +427,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -449,7 +450,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -511,8 +511,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -523,11 +523,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -535,6 +535,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -558,6 +559,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -573,6 +575,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in
index d864971..0c25e28 100644
--- a/tools/h5jam/Makefile.in
+++ b/tools/h5jam/Makefile.in
@@ -439,16 +439,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -461,7 +462,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -523,8 +523,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -535,11 +535,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -547,6 +547,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -570,6 +571,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -585,6 +587,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in
index 616ec9b..5c14ded 100644
--- a/tools/h5ls/Makefile.in
+++ b/tools/h5ls/Makefile.in
@@ -419,16 +419,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -441,7 +442,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -503,8 +503,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -515,11 +515,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -527,6 +527,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -550,6 +551,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -565,6 +567,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index c962e80..91e1c93 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -974,7 +974,7 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
/* Release resources */
for(i = 0; i < (unsigned)nmembs; i++)
- HDfree(name[i]);
+ H5free_memory(name[i]);
HDfree(name);
HDfree(value);
}
@@ -1857,13 +1857,10 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
if (vmaps) {
size_t next;
- ssize_t ssize_out;
h5tools_str_append(&buffer, " %-10s {%ld} Source {\n", "Maps:", vmaps);
for (next = 0; next < (unsigned) vmaps; next++) {
- ssize_out = H5Pget_virtual_filename(dcpl, next, NULL, 0);
H5Pget_virtual_filename(dcpl, next, f_name, sizeof(f_name));
- ssize_out = H5Pget_virtual_dsetname(dcpl, next, NULL, 0);
H5Pget_virtual_dsetname(dcpl, next, dset_name, sizeof(dset_name));
h5tools_str_append(&buffer, " %-10s ", " ");
print_string(&buffer, f_name, TRUE);
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt
index 7631ae8..9b1fbcf 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -58,7 +58,7 @@ if (BUILD_TESTING)
target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (
${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME}
- SHARED
+ SHARED ${HDF5_PACKAGE_SOVERSION}
HDF5_TOOL_PLUGIN_LIB_NAME_RELEASE
HDF5_TOOL_PLUGIN_LIB_NAME_DEBUG
)
@@ -72,13 +72,13 @@ if (BUILD_TESTING)
TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different
+ ARGS -E copy_if_different
"$<TARGET_FILE:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
"${CMAKE_BINARY_DIR}/plugins/$<TARGET_FILE_NAME:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
)
include (CMakeTests.cmake)
-
+
endif (BUILD_TESTING)
##############################################################################
diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in
index 9cc1a32..d1093dc 100644
--- a/tools/h5repack/Makefile.in
+++ b/tools/h5repack/Makefile.in
@@ -451,16 +451,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -473,7 +474,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -535,8 +535,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -547,11 +547,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -559,6 +559,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -582,6 +583,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -597,6 +599,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in
index 782bf79..0329c57 100644
--- a/tools/h5stat/Makefile.in
+++ b/tools/h5stat/Makefile.in
@@ -429,16 +429,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -451,7 +452,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -513,8 +513,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -525,11 +525,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -537,6 +537,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -560,6 +561,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -575,6 +577,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt
index 38c84a2..0b39a2b 100644
--- a/tools/lib/CMakeLists.txt
+++ b/tools/lib/CMakeLists.txt
@@ -61,7 +61,7 @@ if (BUILD_SHARED_LIBS)
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (
${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TOOLS_LIB_NAME}
- SHARED
+ SHARED ${HDF5_TOOLS_PACKAGE_SOVERSION}
HDF5_TOOLS_LIB_NAME_RELEASE
HDF5_TOOLS_LIB_NAME_DEBUG
)
diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in
index 9b4c3a7..8b5224d 100644
--- a/tools/lib/Makefile.in
+++ b/tools/lib/Makefile.in
@@ -416,16 +416,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -438,7 +439,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -500,8 +500,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -512,11 +512,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -524,6 +524,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -547,6 +548,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -562,6 +564,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in
index c027976..76aa536 100644
--- a/tools/misc/Makefile.in
+++ b/tools/misc/Makefile.in
@@ -514,16 +514,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -536,7 +537,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -598,8 +598,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -610,11 +610,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -622,6 +622,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -645,6 +646,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -660,6 +662,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c
index aac14db..b4cbfee 100644
--- a/tools/misc/h5debug.c
+++ b/tools/misc/h5debug.c
@@ -129,6 +129,10 @@ get_H5B2_class(const uint8_t *sig)
cls = H5D_BT2_FILT;
break;
+ case H5B2_TEST2_ID:
+ cls = H5B2_TEST2;
+ break;
+
case H5B2_NUM_BTREE_ID:
default:
HDfprintf(stderr, "Unknown v2 B-tree subtype %u\n", (unsigned)(subtype));
diff --git a/tools/misc/vds/Makefile.in b/tools/misc/vds/Makefile.in
index 065ce09..d2af32e 100644
--- a/tools/misc/vds/Makefile.in
+++ b/tools/misc/vds/Makefile.in
@@ -435,16 +435,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -457,7 +458,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -519,8 +519,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -531,11 +531,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -543,6 +543,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -566,6 +567,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -581,6 +583,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in
index d8066ad..5f375f5 100644
--- a/tools/perform/Makefile.in
+++ b/tools/perform/Makefile.in
@@ -457,16 +457,17 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AR = @AR@
+ASSERTS = @ASSERTS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
-CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -479,7 +480,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CXX_VERSION = @CXX_VERSION@
CYGPATH_W = @CYGPATH_W@
-DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -541,8 +541,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTRUMENT = @INSTRUMENT@
INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
@@ -553,11 +553,11 @@ LL_PATH = @LL_PATH@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
-LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -565,6 +565,7 @@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -588,6 +589,7 @@ PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
PARALLEL = @PARALLEL@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
RANLIB = @RANLIB@
ROOT = @ROOT@
RUNPARALLEL = @RUNPARALLEL@
@@ -603,6 +605,7 @@ STATIC_EXEC = @STATIC_EXEC@
STATIC_SHARED = @STATIC_SHARED@
STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
STRIP = @STRIP@
+SYMBOLS = @SYMBOLS@
TESTPARALLEL = @TESTPARALLEL@
THREADSAFE = @THREADSAFE@
TIME = @TIME@
diff --git a/tools/testfiles/h5dump-help.txt b/tools/testfiles/h5dump-help.txt
index 444dd97..7ebefc6 100644
--- a/tools/testfiles/h5dump-help.txt
+++ b/tools/testfiles/h5dump-help.txt
@@ -25,6 +25,8 @@ usage: h5dump [OPTIONS] files
P can be the absolute path or just a relative path.
-A, --onlyattr Print the header and value of attributes
Optional value 0 suppresses printing attributes.
+ --vds-view-first-missing Set the VDS bounds to first missing mapped elements.
+ --vds-gap-size=N Set the missing file gap size, N=non-negative integers
--------------- Object Property Options ---------------
-i, --object-ids Print the object ids
-p, --properties Print dataset filters, storage layout and fill value
diff --git a/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl b/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl
index 64a2880..1a1b7e8 100644
--- a/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl
+++ b/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl
@@ -25,6 +25,8 @@ usage: h5dump [OPTIONS] files
P can be the absolute path or just a relative path.
-A, --onlyattr Print the header and value of attributes
Optional value 0 suppresses printing attributes.
+ --vds-view-first-missing Set the VDS bounds to first missing mapped elements.
+ --vds-gap-size=N Set the missing file gap size, N=non-negative integers
--------------- Object Property Options ---------------
-i, --object-ids Print the object ids
-p, --properties Print dataset filters, storage layout and fill value
diff --git a/tools/testfiles/pbits/tpbitsIncomplete.ddl b/tools/testfiles/pbits/tpbitsIncomplete.ddl
index cdb1f91..2a2778a 100644
--- a/tools/testfiles/pbits/tpbitsIncomplete.ddl
+++ b/tools/testfiles/pbits/tpbitsIncomplete.ddl
@@ -25,6 +25,8 @@ usage: h5dump [OPTIONS] files
P can be the absolute path or just a relative path.
-A, --onlyattr Print the header and value of attributes
Optional value 0 suppresses printing attributes.
+ --vds-view-first-missing Set the VDS bounds to first missing mapped elements.
+ --vds-gap-size=N Set the missing file gap size, N=non-negative integers
--------------- Object Property Options ---------------
-i, --object-ids Print the object ids
-p, --properties Print dataset filters, storage layout and fill value
diff --git a/tools/testfiles/pbits/tpbitsLengthExceeded.ddl b/tools/testfiles/pbits/tpbitsLengthExceeded.ddl
index 6d2492a..5e00073 100644
--- a/tools/testfiles/pbits/tpbitsLengthExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsLengthExceeded.ddl
@@ -25,6 +25,8 @@ usage: h5dump [OPTIONS] files
P can be the absolute path or just a relative path.
-A, --onlyattr Print the header and value of attributes
Optional value 0 suppresses printing attributes.
+ --vds-view-first-missing Set the VDS bounds to first missing mapped elements.
+ --vds-gap-size=N Set the missing file gap size, N=non-negative integers
--------------- Object Property Options ---------------
-i, --object-ids Print the object ids
-p, --properties Print dataset filters, storage layout and fill value
diff --git a/tools/testfiles/pbits/tpbitsLengthPositive.ddl b/tools/testfiles/pbits/tpbitsLengthPositive.ddl
index 4f56619..f2574d4 100644
--- a/tools/testfiles/pbits/tpbitsLengthPositive.ddl
+++ b/tools/testfiles/pbits/tpbitsLengthPositive.ddl
@@ -25,6 +25,8 @@ usage: h5dump [OPTIONS] files
P can be the absolute path or just a relative path.
-A, --onlyattr Print the header and value of attributes
Optional value 0 suppresses printing attributes.
+ --vds-view-first-missing Set the VDS bounds to first missing mapped elements.
+ --vds-gap-size=N Set the missing file gap size, N=non-negative integers
--------------- Object Property Options ---------------
-i, --object-ids Print the object ids
-p, --properties Print dataset filters, storage layout and fill value
diff --git a/tools/testfiles/pbits/tpbitsMaxExceeded.ddl b/tools/testfiles/pbits/tpbitsMaxExceeded.ddl
index 3432433..15c0abc 100644
--- a/tools/testfiles/pbits/tpbitsMaxExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsMaxExceeded.ddl
@@ -25,6 +25,8 @@ usage: h5dump [OPTIONS] files
P can be the absolute path or just a relative path.
-A, --onlyattr Print the header and value of attributes
Optional value 0 suppresses printing attributes.
+ --vds-view-first-missing Set the VDS bounds to first missing mapped elements.
+ --vds-gap-size=N Set the missing file gap size, N=non-negative integers
--------------- Object Property Options ---------------
-i, --object-ids Print the object ids
-p, --properties Print dataset filters, storage layout and fill value
diff --git a/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl b/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl
index e51a09e..c62e290 100644
--- a/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl
@@ -25,6 +25,8 @@ usage: h5dump [OPTIONS] files
P can be the absolute path or just a relative path.
-A, --onlyattr Print the header and value of attributes
Optional value 0 suppresses printing attributes.
+ --vds-view-first-missing Set the VDS bounds to first missing mapped elements.
+ --vds-gap-size=N Set the missing file gap size, N=non-negative integers
--------------- Object Property Options ---------------
-i, --object-ids Print the object ids
-p, --properties Print dataset filters, storage layout and fill value
diff --git a/tools/testfiles/pbits/tpbitsOffsetNegative.ddl b/tools/testfiles/pbits/tpbitsOffsetNegative.ddl
index ba6e46d..5621a60 100644
--- a/tools/testfiles/pbits/tpbitsOffsetNegative.ddl
+++ b/tools/testfiles/pbits/tpbitsOffsetNegative.ddl
@@ -25,6 +25,8 @@ usage: h5dump [OPTIONS] files
P can be the absolute path or just a relative path.
-A, --onlyattr Print the header and value of attributes
Optional value 0 suppresses printing attributes.
+ --vds-view-first-missing Set the VDS bounds to first missing mapped elements.
+ --vds-gap-size=N Set the missing file gap size, N=non-negative integers
--------------- Object Property Options ---------------
-i, --object-ids Print the object ids
-p, --properties Print dataset filters, storage layout and fill value
diff --git a/tools/h5format_convert/testfiles/h5fc_v1.h5 b/tools/testfiles/vds/a.h5
index d3d66f8..fa19535 100644
--- a/tools/h5format_convert/testfiles/h5fc_v1.h5
+++ b/tools/testfiles/vds/a.h5
Binary files differ
diff --git a/tools/testfiles/vds/b.h5 b/tools/testfiles/vds/b.h5
new file mode 100644
index 0000000..08449ca
--- /dev/null
+++ b/tools/testfiles/vds/b.h5
Binary files differ
diff --git a/tools/testfiles/vds/c.h5 b/tools/testfiles/vds/c.h5
new file mode 100644
index 0000000..ba9af30
--- /dev/null
+++ b/tools/testfiles/vds/c.h5
Binary files differ
diff --git a/tools/testfiles/vds/d.h5 b/tools/testfiles/vds/d.h5
new file mode 100644
index 0000000..8eceb4a
--- /dev/null
+++ b/tools/testfiles/vds/d.h5
Binary files differ
diff --git a/tools/testfiles/vds/f-0.h5 b/tools/testfiles/vds/f-0.h5
new file mode 100644
index 0000000..242df07
--- /dev/null
+++ b/tools/testfiles/vds/f-0.h5
Binary files differ
diff --git a/tools/testfiles/vds/f-3.h5 b/tools/testfiles/vds/f-3.h5
new file mode 100644
index 0000000..539c1c9
--- /dev/null
+++ b/tools/testfiles/vds/f-3.h5
Binary files differ
diff --git a/tools/testfiles/vds/vds-eiger.h5 b/tools/testfiles/vds/vds-eiger.h5
new file mode 100644
index 0000000..23d1fd3
--- /dev/null
+++ b/tools/testfiles/vds/vds-eiger.h5
Binary files differ
diff --git a/tools/testfiles/vds/vds-first.ddl b/tools/testfiles/vds/vds-first.ddl
new file mode 100644
index 0000000..97b1ecf
--- /dev/null
+++ b/tools/testfiles/vds/vds-first.ddl
@@ -0,0 +1,210 @@
+HDF5 "vds-percival-unlim-maxmin.h5" {
+GROUP "/" {
+ DATASET "VDS-Percival-unlim-maxmin" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 20, 10, 10 ) / ( H5S_UNLIMITED, 10, 10 ) }
+ DATA {
+ (0,0,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (0,1,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (0,2,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (0,3,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (0,4,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (0,5,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (0,6,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (0,7,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (0,8,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (0,9,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (1,0,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (1,1,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (1,2,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (1,3,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (1,4,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (1,5,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (1,6,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (1,7,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (1,8,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (1,9,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (2,0,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (2,1,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (2,2,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (2,3,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (2,4,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (2,5,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (2,6,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (2,7,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (2,8,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (2,9,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (3,0,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (3,1,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (3,2,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (3,3,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (3,4,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (3,5,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (3,6,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (3,7,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (3,8,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (3,9,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (4,0,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (4,1,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (4,2,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (4,3,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (4,4,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (4,5,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (4,6,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (4,7,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (4,8,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (4,9,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (5,0,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,1,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,2,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,3,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,4,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,5,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,6,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,7,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,8,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,9,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (6,0,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (6,1,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (6,2,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (6,3,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (6,4,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (6,5,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (6,6,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (6,7,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (6,8,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (6,9,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (7,0,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (7,1,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (7,2,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (7,3,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (7,4,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (7,5,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (7,6,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (7,7,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (7,8,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (7,9,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (8,0,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (8,1,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (8,2,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (8,3,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (8,4,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (8,5,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (8,6,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (8,7,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (8,8,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (8,9,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (9,0,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (9,1,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (9,2,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (9,3,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (9,4,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (9,5,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (9,6,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (9,7,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (9,8,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (9,9,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (10,0,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (10,1,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (10,2,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (10,3,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (10,4,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (10,5,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (10,6,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (10,7,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (10,8,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (10,9,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (11,0,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (11,1,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (11,2,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (11,3,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (11,4,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (11,5,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (11,6,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (11,7,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (11,8,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (11,9,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (12,0,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (12,1,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (12,2,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (12,3,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (12,4,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (12,5,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (12,6,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (12,7,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (12,8,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (12,9,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (13,0,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (13,1,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (13,2,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (13,3,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (13,4,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (13,5,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (13,6,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (13,7,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (13,8,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (13,9,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (14,0,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (14,1,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (14,2,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (14,3,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (14,4,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (14,5,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (14,6,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (14,7,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (14,8,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (14,9,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (15,0,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (15,1,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (15,2,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (15,3,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (15,4,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (15,5,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (15,6,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (15,7,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (15,8,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (15,9,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (16,0,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (16,1,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (16,2,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (16,3,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (16,4,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (16,5,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (16,6,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (16,7,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (16,8,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (16,9,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (17,0,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (17,1,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (17,2,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (17,3,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (17,4,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (17,5,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (17,6,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (17,7,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (17,8,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (17,9,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (18,0,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (18,1,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (18,2,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (18,3,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (18,4,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (18,5,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (18,6,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (18,7,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (18,8,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (18,9,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (19,0,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (19,1,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (19,2,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (19,3,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (19,4,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (19,5,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (19,6,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (19,7,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (19,8,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (19,9,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40
+ }
+ }
+}
+}
diff --git a/tools/testfiles/vds/vds-gap1.ddl b/tools/testfiles/vds/vds-gap1.ddl
new file mode 100644
index 0000000..cace781
--- /dev/null
+++ b/tools/testfiles/vds/vds-gap1.ddl
@@ -0,0 +1,58 @@
+HDF5 "vds-eiger.h5" {
+DATASET "/VDS-Eiger" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 5, 10, 10 ) / ( H5S_UNLIMITED, 10, 10 ) }
+ DATA {
+ (0,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/vds/vds-gap2.ddl b/tools/testfiles/vds/vds-gap2.ddl
new file mode 100644
index 0000000..24da48f
--- /dev/null
+++ b/tools/testfiles/vds/vds-gap2.ddl
@@ -0,0 +1,210 @@
+HDF5 "vds-eiger.h5" {
+GROUP "/" {
+ DATASET "VDS-Eiger" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 20, 10, 10 ) / ( H5S_UNLIMITED, 10, 10 ) }
+ DATA {
+ (0,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (8,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (8,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (8,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (8,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (8,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (8,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (8,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (8,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (8,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (8,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (9,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (9,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (9,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (9,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (9,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (9,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (9,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (9,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (9,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (9,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (10,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (10,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (10,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (10,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (10,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (10,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (10,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (10,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (10,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (10,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (11,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (11,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (11,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (11,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (11,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (11,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (11,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (11,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (11,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (11,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (12,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (12,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (12,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (12,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (12,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (12,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (12,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (12,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (12,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (12,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (13,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (13,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (13,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (13,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (13,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (13,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (13,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (13,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (13,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (13,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (14,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (14,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (14,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (14,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (14,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (14,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (14,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (14,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (14,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (14,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (15,0,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (15,1,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (15,2,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (15,3,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (15,4,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (15,5,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (15,6,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (15,7,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (15,8,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (15,9,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (16,0,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (16,1,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (16,2,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (16,3,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (16,4,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (16,5,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (16,6,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (16,7,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (16,8,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (16,9,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (17,0,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (17,1,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (17,2,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (17,3,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (17,4,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (17,5,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (17,6,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (17,7,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (17,8,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (17,9,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (18,0,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (18,1,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (18,2,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (18,3,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (18,4,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (18,5,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (18,6,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (18,7,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (18,8,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (18,9,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (19,0,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (19,1,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (19,2,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (19,3,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (19,4,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (19,5,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (19,6,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (19,7,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (19,8,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (19,9,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
+ }
+ }
+}
+}
diff --git a/tools/testfiles/vds/vds-percival-unlim-maxmin.h5 b/tools/testfiles/vds/vds-percival-unlim-maxmin.h5
new file mode 100644
index 0000000..b7f8827
--- /dev/null
+++ b/tools/testfiles/vds/vds-percival-unlim-maxmin.h5
Binary files differ
diff --git a/tools/testfiles/vds/vds_layout-eiger.ddl b/tools/testfiles/vds/vds_layout-eiger.ddl
new file mode 100644
index 0000000..0ea4994
--- /dev/null
+++ b/tools/testfiles/vds/vds_layout-eiger.ddl
@@ -0,0 +1,87 @@
+HDF5 "vds-eiger.h5" {
+GROUP "/" {
+ DATASET "VDS-Eiger" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 5, 10, 10 ) / ( H5S_UNLIMITED, 10, 10 ) }
+ STORAGE_LAYOUT {
+ MAPPING 0 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (5,1,1)
+ COUNT (H5S_UNLIMITED,1,1)
+ BLOCK (5,10,10)
+ }
+ }
+ SOURCE {
+ FILE "f-%b.h5"
+ DATASET "A"
+ SELECTION ALL
+ }
+ }
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ DATA {
+ (0,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ }
+}
+}
diff --git a/tools/testfiles/vds/vds_layout-maxmin.ddl b/tools/testfiles/vds/vds_layout-maxmin.ddl
new file mode 100644
index 0000000..0b5b583
--- /dev/null
+++ b/tools/testfiles/vds/vds_layout-maxmin.ddl
@@ -0,0 +1,422 @@
+HDF5 "vds-percival-unlim-maxmin.h5" {
+GROUP "/" {
+ DATASET "VDS-Percival-unlim-maxmin" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 32, 10, 10 ) / ( H5S_UNLIMITED, 10, 10 ) }
+ STORAGE_LAYOUT {
+ MAPPING 0 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (4,1,1)
+ COUNT (H5S_UNLIMITED,1,1)
+ BLOCK (1,10,10)
+ }
+ }
+ SOURCE {
+ FILE "a.h5"
+ DATASET "A"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (H5S_UNLIMITED,1,1)
+ BLOCK (1,10,10)
+ }
+ }
+ }
+ MAPPING 1 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (1,0,0)
+ STRIDE (4,1,1)
+ COUNT (H5S_UNLIMITED,1,1)
+ BLOCK (1,10,10)
+ }
+ }
+ SOURCE {
+ FILE "b.h5"
+ DATASET "B"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (H5S_UNLIMITED,1,1)
+ BLOCK (1,10,10)
+ }
+ }
+ }
+ MAPPING 2 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (2,0,0)
+ STRIDE (4,1,1)
+ COUNT (H5S_UNLIMITED,1,1)
+ BLOCK (1,10,10)
+ }
+ }
+ SOURCE {
+ FILE "c.h5"
+ DATASET "C"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (H5S_UNLIMITED,1,1)
+ BLOCK (1,10,10)
+ }
+ }
+ }
+ MAPPING 3 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (3,0,0)
+ STRIDE (4,1,1)
+ COUNT (H5S_UNLIMITED,1,1)
+ BLOCK (1,10,10)
+ }
+ }
+ SOURCE {
+ FILE "d.h5"
+ DATASET "D"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (H5S_UNLIMITED,1,1)
+ BLOCK (1,10,10)
+ }
+ }
+ }
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_LATE
+ }
+ DATA {
+ (0,0,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (0,1,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (0,2,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (0,3,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (0,4,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (0,5,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (0,6,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (0,7,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (0,8,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (0,9,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (1,0,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (1,1,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (1,2,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (1,3,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (1,4,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (1,5,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (1,6,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (1,7,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (1,8,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (1,9,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (2,0,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (2,1,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (2,2,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (2,3,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (2,4,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (2,5,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (2,6,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (2,7,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (2,8,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (2,9,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (3,0,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (3,1,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (3,2,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (3,3,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (3,4,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (3,5,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (3,6,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (3,7,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (3,8,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (3,9,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (4,0,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (4,1,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (4,2,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (4,3,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (4,4,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (4,5,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (4,6,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (4,7,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (4,8,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (4,9,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (5,0,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,1,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,2,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,3,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,4,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,5,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,6,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,7,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,8,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (5,9,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (6,0,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (6,1,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (6,2,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (6,3,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (6,4,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (6,5,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (6,6,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (6,7,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (6,8,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (6,9,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (7,0,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (7,1,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (7,2,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (7,3,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (7,4,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (7,5,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (7,6,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (7,7,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (7,8,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (7,9,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (8,0,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (8,1,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (8,2,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (8,3,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (8,4,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (8,5,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (8,6,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (8,7,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (8,8,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (8,9,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (9,0,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (9,1,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (9,2,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (9,3,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (9,4,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (9,5,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (9,6,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (9,7,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (9,8,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (9,9,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (10,0,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (10,1,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (10,2,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (10,3,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (10,4,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (10,5,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (10,6,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (10,7,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (10,8,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (10,9,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (11,0,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (11,1,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (11,2,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (11,3,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (11,4,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (11,5,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (11,6,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (11,7,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (11,8,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (11,9,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (12,0,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (12,1,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (12,2,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (12,3,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (12,4,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (12,5,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (12,6,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (12,7,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (12,8,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (12,9,0): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ (13,0,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (13,1,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (13,2,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (13,3,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (13,4,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (13,5,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (13,6,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (13,7,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (13,8,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (13,9,0): 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ (14,0,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (14,1,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (14,2,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (14,3,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (14,4,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (14,5,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (14,6,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (14,7,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (14,8,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (14,9,0): 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ (15,0,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (15,1,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (15,2,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (15,3,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (15,4,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (15,5,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (15,6,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (15,7,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (15,8,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (15,9,0): 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ (16,0,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (16,1,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (16,2,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (16,3,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (16,4,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (16,5,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (16,6,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (16,7,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (16,8,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (16,9,0): 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ (17,0,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (17,1,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (17,2,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (17,3,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (17,4,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (17,5,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (17,6,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (17,7,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (17,8,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (17,9,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (18,0,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (18,1,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (18,2,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (18,3,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (18,4,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (18,5,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (18,6,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (18,7,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (18,8,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (18,9,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (19,0,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (19,1,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (19,2,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (19,3,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (19,4,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (19,5,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (19,6,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (19,7,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (19,8,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (19,9,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (20,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (20,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (20,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (20,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (20,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (20,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (20,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (20,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (20,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (20,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (21,0,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (21,1,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (21,2,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (21,3,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (21,4,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (21,5,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (21,6,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (21,7,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (21,8,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (21,9,0): 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ (22,0,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (22,1,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (22,2,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (22,3,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (22,4,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (22,5,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (22,6,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (22,7,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (22,8,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (22,9,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (23,0,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (23,1,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (23,2,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (23,3,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (23,4,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (23,5,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (23,6,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (23,7,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (23,8,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (23,9,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (24,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (24,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (24,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (24,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (24,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (24,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (24,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (24,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (24,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (24,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (25,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (25,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (25,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (25,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (25,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (25,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (25,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (25,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (25,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (25,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (26,0,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (26,1,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (26,2,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (26,3,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (26,4,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (26,5,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (26,6,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (26,7,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (26,8,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (26,9,0): 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ (27,0,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (27,1,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (27,2,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (27,3,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (27,4,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (27,5,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (27,6,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (27,7,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (27,8,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (27,9,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (28,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (28,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (28,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (28,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (28,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (28,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (28,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (28,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (28,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (28,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (29,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (29,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (29,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (29,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (29,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (29,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (29,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (29,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (29,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (29,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (30,0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (30,1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (30,2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (30,3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (30,4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (30,5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (30,6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (30,7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (30,8,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (30,9,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (31,0,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (31,1,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (31,2,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (31,3,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (31,4,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (31,5,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (31,6,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (31,7,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (31,8,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ (31,9,0): 40, 40, 40, 40, 40, 40, 40, 40, 40, 40
+ }
+ }
+}
+}