[hdf4] 01/11: New upstream version 4.2.13

Bas Couwenberg sebastic at debian.org
Wed Jun 28 21:45:52 UTC 2017


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository hdf4.

commit 3a9cd6441e2b9959f9ef92b95bde4b458fc9d849
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Wed Jun 28 21:58:45 2017 +0200

    New upstream version 4.2.13
---
 CMakeFilters.cmake                              |  109 +-
 CMakeInstallation.cmake                         |  152 +-
 CMakeLists.txt                                  |  204 +--
 COPYING                                         |    2 +-
 CTestConfig.cmake                               |   15 +-
 MANIFEST                                        |   25 +-
 Makefile                                        |   12 +-
 Makefile.dist                                   |   12 +-
 Makefile.in                                     |    1 +
 README.txt                                      |   14 +-
 UserMacros.cmake                                |    5 +-
 bin/chkmanifest                                 |  121 +-
 bin/cmakehdf4                                   |   88 +-
 bin/h4_release_check.sh                         |    6 +-
 bin/h4vers                                      |   93 +-
 bin/locate_sw                                   |   44 +-
 bin/newer                                       |   12 +-
 bin/reconfigure                                 |    2 +-
 bin/release                                     |  228 ++-
 bin/yodconfigure                                |   12 +-
 config/cmake/CMakeFindJavaCommon.cmake          |   30 +
 config/cmake/CTestScript.cmake                  |  156 ++
 config/cmake/ConfigureChecks.cmake              |    8 +-
 config/cmake/FindHDF4.cmake.in                  |   82 -
 config/cmake/FindJNI.cmake                      |   61 +-
 config/cmake/FindXDR.cmake                      |   45 +
 config/cmake/HDF4Macros.cmake                   |   28 +-
 config/cmake/HDF4_Examples.cmake.in             |  192 +--
 config/cmake/HDF4_Examples_options.cmake        |   33 +
 config/cmake/README.txt.cmake.in                |    8 +-
 config/cmake/UseJava.cmake                      |  194 ++-
 config/cmake/UseJavaClassFilelist.cmake         |   15 +-
 config/cmake/UseJavaSymlinks.cmake              |   15 +-
 config/cmake/UserMacros/Windows_MT.cmake        |   19 +-
 config/cmake/cacheinit.cmake                    |    6 +-
 config/cmake/hdf4-config-version.cmake.in       |   16 +-
 config/cmake/hdf4-config.cmake.in               |   15 +-
 config/cmake/jrunTest.cmake                     |  183 ++-
 config/cmake/mccacheinit.cmake                  |   14 +-
 config/cmake/scripts/CTestScript.cmake          |  298 ++++
 config/cmake/scripts/HDF4config.cmake           |  199 +++
 config/cmake/scripts/HDF4options.cmake          |   36 +
 config/cmake_ext_mod/CheckTypeSize.cmake        |   24 +-
 config/cmake_ext_mod/ConfigureChecks.cmake      |  410 +----
 config/cmake_ext_mod/FindSZIP.cmake             |   44 +-
 config/cmake_ext_mod/HDFCXXTests.cpp            |   35 +
 config/cmake_ext_mod/HDFLibMacros.cmake         |   54 +-
 config/cmake_ext_mod/HDFMacros.cmake            |  205 +--
 config/cmake_ext_mod/HDFTests.c                 |  397 -----
 config/cmake_ext_mod/HDFUseFortran.cmake        |   23 +-
 config/cmake_ext_mod/NSIS.InstallOptions.ini.in |    2 +-
 config/cmake_ext_mod/grepTest.cmake             |   20 +-
 config/cmake_ext_mod/prunTest.cmake             |  145 --
 config/cmake_ext_mod/runTest.cmake              |  218 ++-
 config/commence.am                              |   10 +-
 config/conclude.am                              |   14 +-
 config/examples.am                              |   10 +-
 configure                                       |   90 +-
 configure.ac                                    |   39 +-
 hdf/CMakeLists.txt                              |    6 +-
 hdf/Makefile.in                                 |    1 +
 hdf/examples/CMakeLists.txt                     |   38 +-
 hdf/examples/CMakeTests.cmake                   |   16 +-
 hdf/examples/Makefile.am                        |    4 +-
 hdf/examples/Makefile.in                        |    5 +-
 hdf/examples/run-all-ex.sh                      |   12 +-
 hdf/examples/run-c-ex.sh                        |   13 +-
 hdf/fortran/CMakeLists.txt                      |   22 +-
 hdf/fortran/CMakeTests.cmake                    |   22 +-
 hdf/fortran/Makefile.in                         |    1 +
 hdf/fortran/examples/CMakeLists.txt             |   38 +-
 hdf/fortran/examples/CMakeTests.cmake           |   18 +-
 hdf/fortran/examples/Makefile.am                |    2 +-
 hdf/fortran/examples/Makefile.in                |    3 +-
 hdf/fortran/examples/run-fortran-ex.sh          |   12 +-
 hdf/src/CMakeLists.txt                          |    2 +
 hdf/src/H4api_adpt.h                            |    8 +-
 hdf/src/Makefile.in                             |    1 +
 hdf/src/atom.c                                  |   10 +-
 hdf/src/atom.h                                  |   10 +-
 hdf/src/bitvect.c                               |   10 +-
 hdf/src/bitvect.h                               |   10 +-
 hdf/src/cdeflate.c                              |   10 +-
 hdf/src/cdeflate.h                              |   10 +-
 hdf/src/cnbit.c                                 |   10 +-
 hdf/src/cnbit.h                                 |   10 +-
 hdf/src/cnone.c                                 |   10 +-
 hdf/src/cnone.h                                 |   10 +-
 hdf/src/crle.c                                  |   10 +-
 hdf/src/crle.h                                  |   10 +-
 hdf/src/cskphuff.c                              |   10 +-
 hdf/src/cskphuff.h                              |   10 +-
 hdf/src/cszip.c                                 |   10 +-
 hdf/src/cszip.h                                 |   10 +-
 hdf/src/df.h                                    |   10 +-
 hdf/src/df24.c                                  |   10 +-
 hdf/src/df24f.c                                 |   10 +-
 hdf/src/df24ff.f                                |   10 +-
 hdf/src/dfan.c                                  |   10 +-
 hdf/src/dfan.h                                  |   10 +-
 hdf/src/dfanf.c                                 |   10 +-
 hdf/src/dfanff.f                                |   10 +-
 hdf/src/dfcomp.c                                |   10 +-
 hdf/src/dfconv.c                                |   10 +-
 hdf/src/dfconvrt.h                              |   10 +-
 hdf/src/dff.c                                   |   10 +-
 hdf/src/dfff.f                                  |   10 +-
 hdf/src/dffunc.inc                              |    6 +-
 hdf/src/dfgr.c                                  |   10 +-
 hdf/src/dfgr.h                                  |   10 +-
 hdf/src/dfgroup.c                               |   10 +-
 hdf/src/dfi.h                                   |   10 +-
 hdf/src/dfimcomp.c                              |   10 +-
 hdf/src/dfjpeg.c                                |   10 +-
 hdf/src/dfknat.c                                |   10 +-
 hdf/src/dfkswap.c                               |   10 +-
 hdf/src/dfp.c                                   |   10 +-
 hdf/src/dfpf.c                                  |   10 +-
 hdf/src/dfpff.f                                 |   10 +-
 hdf/src/dfr8.c                                  |   10 +-
 hdf/src/dfr8f.c                                 |   10 +-
 hdf/src/dfr8ff.f                                |   26 +-
 hdf/src/dfrig.h                                 |   11 +-
 hdf/src/dfrle.c                                 |   10 +-
 hdf/src/dfsd.c                                  |   10 +-
 hdf/src/dfsd.h                                  |   11 +-
 hdf/src/dfsdf.c                                 |   10 +-
 hdf/src/dfsdff.f                                |   26 +-
 hdf/src/dfstubs.c                               |   10 +-
 hdf/src/dfstubs.h                               |   10 +-
 hdf/src/dfufp2i.c                               |   10 +-
 hdf/src/dfufp2i.h                               |   10 +-
 hdf/src/dfufp2if.c                              |    8 +-
 hdf/src/dfufp2iff.f                             |   24 +-
 hdf/src/dfunjpeg.c                              |   10 +-
 hdf/src/dfutil.c                                |   10 +-
 hdf/src/dfutilf.c                               |   10 +-
 hdf/src/dynarray.c                              |   10 +-
 hdf/src/dynarray.h                              |   10 +-
 hdf/src/glist.c                                 |    8 +-
 hdf/src/glist.h                                 |   10 +-
 hdf/src/hbitio.c                                |   10 +-
 hdf/src/hbitio.h                                |   10 +-
 hdf/src/hblocks.c                               |   10 +-
 hdf/src/hbuffer.c                               |   10 +-
 hdf/src/hchunks.c                               |   10 +-
 hdf/src/hchunks.h                               |   10 +-
 hdf/src/hcomp.c                                 |   10 +-
 hdf/src/hcomp.h                                 |   10 +-
 hdf/src/hcompi.h                                |   10 +-
 hdf/src/hcompri.c                               |   10 +-
 hdf/src/hconv.h                                 |   10 +-
 hdf/src/hdatainfo.c                             |    8 +-
 hdf/src/hdatainfo.h                             |    8 +-
 hdf/src/hdf.h                                   |   10 +-
 hdf/src/hdf.inc                                 |    2 +-
 hdf/src/hdfalloc.c                              |   10 +-
 hdf/src/hdfi.h                                  |   10 +-
 hdf/src/herr.c                                  |   11 +-
 hdf/src/herr.h                                  |   10 +-
 hdf/src/herrf.c                                 |   10 +-
 hdf/src/hextelt.c                               |   26 +-
 hdf/src/hfile.c                                 |   10 +-
 hdf/src/hfile.h                                 |   14 +-
 hdf/src/hfiledd.c                               |   10 +-
 hdf/src/hfilef.c                                |   10 +-
 hdf/src/hfileff.f                               |   26 +-
 hdf/src/hkit.c                                  |   10 +-
 hdf/src/hkit.h                                  |   10 +-
 hdf/src/hlimits.h                               |   10 +-
 hdf/src/hntdefs.h                               |   10 +-
 hdf/src/hproto.h                                |   10 +-
 hdf/src/hproto_fortran.h                        |    8 +-
 hdf/src/hqueue.h                                |    2 +-
 hdf/src/htags.h                                 |   10 +-
 hdf/src/linklist.c                              |   10 +-
 hdf/src/linklist.h                              |   10 +-
 hdf/src/maldebug.c                              |   10 +-
 hdf/src/maldebug.h                              |   10 +-
 hdf/src/mcache.c                                |    2 +-
 hdf/src/mcache.h                                |    2 +-
 hdf/src/mfan.c                                  |   10 +-
 hdf/src/mfan.h                                  |   10 +-
 hdf/src/mfanf.c                                 |   10 +-
 hdf/src/mfgr.c                                  |   10 +-
 hdf/src/mfgr.h                                  |   10 +-
 hdf/src/mfgrf.c                                 |   10 +-
 hdf/src/mfgrff.f                                |   26 +-
 hdf/src/mstdio.c                                |   10 +-
 hdf/src/mstdio.h                                |   10 +-
 hdf/src/src.inc                                 |    2 +-
 hdf/src/tbbt.c                                  |   10 +-
 hdf/src/tbbt.h                                  |   10 +-
 hdf/src/vattr.c                                 |   10 +-
 hdf/src/vattr.h                                 |   10 +-
 hdf/src/vattrf.c                                |   10 +-
 hdf/src/vattrff.f                               |   26 +-
 hdf/src/vconv.c                                 |   10 +-
 hdf/src/vg.c                                    |    8 +-
 hdf/src/vg.h                                    |   10 +-
 hdf/src/vgf.c                                   |   10 +-
 hdf/src/vgff.f                                  |   26 +-
 hdf/src/vgint.h                                 |   10 +-
 hdf/src/vgp.c                                   |   10 +-
 hdf/src/vhi.c                                   |   10 +-
 hdf/src/vio.c                                   |   10 +-
 hdf/src/vparse.c                                |    8 +-
 hdf/src/vrw.c                                   |   10 +-
 hdf/src/vsfld.c                                 |   10 +-
 hdf/test/CMakeLists.txt                         |   40 +-
 hdf/test/CMakeTests.cmake                       |   62 +-
 hdf/test/Makefile.am                            |    1 +
 hdf/test/Makefile.in                            |    4 +-
 hdf/test/an.c                                   |   10 +-
 hdf/test/anfile.c                               |   10 +-
 hdf/test/bitio.c                                |   10 +-
 hdf/test/blocks.c                               |   10 +-
 hdf/test/buffer.c                               |   10 +-
 hdf/test/chunks.c                               |   10 +-
 hdf/test/comp.c                                 |   10 +-
 hdf/test/conv.c                                 |   10 +-
 hdf/test/egfhi.f                                |   28 +-
 hdf/test/extelt.c                               |   10 +-
 hdf/test/file.c                                 |   10 +-
 hdf/test/file1.c                                |   10 +-
 hdf/test/forsupf.c                              |   10 +-
 hdf/test/forsupff.f                             |   31 +-
 hdf/test/fortest.c                              |   12 +-
 hdf/test/fortest.h                              |   10 +-
 hdf/test/fortest.inc                            |    4 +-
 hdf/test/fortestF.f                             |   28 +-
 hdf/test/gentest.c                              |   10 +-
 hdf/test/litend.c                               |   10 +-
 hdf/test/macros.c                               |    8 +-
 hdf/test/man.c                                  |   10 +-
 hdf/test/manf.f                                 |   66 +-
 hdf/test/mgr.c                                  |   10 +-
 hdf/test/mgrf.f                                 |   74 +-
 hdf/test/mgrf_sunOS.f                           |   28 +-
 hdf/test/nbit.c                                 |   10 +-
 hdf/test/rig.c                                  |   10 +-
 hdf/test/sdmms.c                                |   10 +-
 hdf/test/sdnmms.c                               |   10 +-
 hdf/test/sdstr.c                                |   10 +-
 hdf/test/slab.c                                 |    8 +-
 hdf/test/slabwf.f                               |   28 +-
 hdf/test/t24f.f                                 |   28 +-
 hdf/test/tanf.f                                 |   36 +-
 hdf/test/tanfilef.f                             |   32 +-
 hdf/test/tattdatainfo.c                         |    8 +-
 hdf/test/tbv.c                                  |   10 +-
 hdf/test/tdatainfo.c                            |    8 +-
 hdf/test/tdatainfo.h                            |    8 +-
 hdf/test/tdfr8.c                                |    8 +-
 hdf/test/tdupimgs.c                             |    8 +-
 hdf/test/testhdf.c                              |   10 +-
 hdf/test/tmgrattr.c                             |    8 +-
 hdf/test/tmgrcomp.c                             |    8 +-
 hdf/test/tpf.f                                  |   32 +-
 hdf/test/tproto.h                               |   10 +-
 hdf/test/tr8f.f                                 |   32 +-
 hdf/test/tree.c                                 |   10 +-
 hdf/test/tsdmmsf.f                              |   36 +-
 hdf/test/tsdnmmsf.f                             |   26 +-
 hdf/test/tsdnntf.f                              |   47 +-
 hdf/test/tsdntf.f                               |   36 +-
 hdf/test/tsdstrf.f                              |   26 +-
 hdf/test/tstubsf.f                              |   29 +-
 hdf/test/tszip.c                                |    8 +-
 hdf/test/tutils.c                               |    8 +-
 hdf/test/tutils.h                               |   10 +-
 hdf/test/tvattr.c                               |   10 +-
 hdf/test/tvattrf.f                              |   49 +-
 hdf/test/tvnameclass.c                          |   10 +-
 hdf/test/tvset.c                                |   12 +-
 hdf/test/tvsetf.f                               |   28 +-
 hdf/test/tvsfpack.c                             |    8 +-
 hdf/test/vers.c                                 |   10 +-
 hdf/util/CMakeLists.txt                         |   14 +-
 hdf/util/CMakeTests.cmake                       |  106 +-
 hdf/util/Makefile.in                            |    1 +
 hdf/util/decompress.c                           |    8 +-
 hdf/util/fp2hdf.c                               |    8 +-
 hdf/util/fptest.c                               |    8 +-
 hdf/util/gif2hdf.c                              |    8 +-
 hdf/util/gif2mem.c                              |    8 +-
 hdf/util/gifread.c                              |    8 +-
 hdf/util/hdf24to8.c                             |   10 +-
 hdf/util/hdf2gif.c                              |    8 +-
 hdf/util/hdf2jpeg.c                             |   10 +-
 hdf/util/hdf8to24.c                             |   10 +-
 hdf/util/hdfcomp.c                              |   10 +-
 hdf/util/hdfgifwr.c                             |    8 +-
 hdf/util/hdfls.c                                |   10 +-
 hdf/util/hdfpack.c                              |   10 +-
 hdf/util/hdftopal.c                             |   10 +-
 hdf/util/hdftor8.c                              |   10 +-
 hdf/util/hdfunpac.c                             |   10 +-
 hdf/util/he.h                                   |   10 +-
 hdf/util/he_cntrl.c                             |   10 +-
 hdf/util/he_disp.c                              |   10 +-
 hdf/util/he_file.c                              |   10 +-
 hdf/util/he_main.c                              |   10 +-
 hdf/util/he_proto.h                             |   10 +-
 hdf/util/jpeg2hdf.c                             |   10 +-
 hdf/util/paltohdf.c                             |   10 +-
 hdf/util/r8tohdf.c                              |   10 +-
 hdf/util/ristosds.c                             |   10 +-
 hdf/util/vmake.c                                |   10 +-
 hdf/util/vshow.c                                |   10 +-
 hdf/util/writehdf.c                             |    8 +-
 java/CMakeLists.txt                             |   12 +-
 java/Makefile.in                                |    1 +
 java/examples/CMakeLists.txt                    |   33 +-
 java/examples/Makefile.in                       |    1 +
 java/src/CMakeLists.txt                         |    2 +-
 java/src/Makefile.in                            |    1 +
 java/src/hdf/CMakeLists.txt                     |    2 +-
 java/src/hdf/hdflib/CMakeLists.txt              |    4 +-
 java/src/hdf/hdflib/HDFLibrary.java             |   78 +-
 java/src/hdf/overview.html                      |    2 +-
 java/src/jni/CMakeLists.txt                     |   18 +-
 java/src/jni/Makefile.in                        |    1 +
 java/src/jni/h4jni.h                            |   32 +-
 java/src/jni/hdfanImp.c                         |    4 +-
 java/src/jni/hdfdfpalImp.c                      |    2 +-
 java/src/jni/hdfexceptionImp.c                  |   14 +-
 java/src/jni/hdfgrImp.c                         |    8 +-
 java/src/jni/hdfr24Imp.c                        |    2 +-
 java/src/jni/hdfr8Imp.c                         |    2 +-
 java/src/jni/hdfsdsImp.c                        |    8 +-
 java/src/jni/hdfstructsutil.c                   |   14 +-
 java/src/jni/hdfvdataImp.c                      |   18 +-
 java/src/jni/hdfvgroupImp.c                     |   16 +-
 java/src/jni/hdfvhImp.c                         |   14 +-
 java/test/CMakeLists.txt                        |   18 +-
 java/test/Makefile.in                           |    1 +
 libhdf4.settings.in                             |    2 +-
 man/Makefile.in                                 |    1 +
 man/hdf.1                                       |   14 +-
 man/hdfunpac.1                                  |    2 +-
 mfhdf/CMakeLists.txt                            |   14 +-
 mfhdf/Makefile.in                               |    1 +
 mfhdf/dumper/CMakeLists.txt                     |   17 +-
 mfhdf/dumper/CMakeTests.cmake                   |   58 +-
 mfhdf/dumper/Makefile.in                        |    1 +
 mfhdf/dumper/hdp.c                              |   10 +-
 mfhdf/dumper/hdp.h                              |   10 +-
 mfhdf/dumper/hdp_dump.c                         |   10 +-
 mfhdf/dumper/hdp_gr.c                           |   10 +-
 mfhdf/dumper/hdp_list.c                         |   10 +-
 mfhdf/dumper/hdp_rig.c                          |   10 +-
 mfhdf/dumper/hdp_sds.c                          |   82 +-
 mfhdf/dumper/hdp_util.c                         |    8 +-
 mfhdf/dumper/hdp_vd.c                           |   10 +-
 mfhdf/dumper/hdp_vg.c                           |   10 +-
 mfhdf/dumper/show.c                             |    8 +-
 mfhdf/dumper/testfiles/vslongname.c             |    8 +-
 mfhdf/dumper/testhdp.sh.in                      |    2 +-
 mfhdf/examples/CMakeLists.txt                   |    8 +-
 mfhdf/examples/CMakeTests.cmake                 |    8 +-
 mfhdf/examples/Makefile.am                      |    2 +-
 mfhdf/examples/Makefile.in                      |    3 +-
 mfhdf/fortran/CMakeLists.txt                    |   44 +-
 mfhdf/fortran/CMakeTests.cmake                  |   26 +-
 mfhdf/fortran/Makefile.in                       |    1 +
 mfhdf/fortran/examples/CMakeLists.txt           |   44 +-
 mfhdf/fortran/examples/CMakeTests.cmake         |   10 +-
 mfhdf/fortran/examples/Makefile.am              |    2 +-
 mfhdf/fortran/examples/Makefile.in              |    3 +-
 mfhdf/fortran/hdftest.f                         |    8 +-
 mfhdf/fortran/hdftest1.f                        |    8 +-
 mfhdf/fortran/mfsdf.c                           |   26 +-
 mfhdf/fortran/mfsdf.h                           |    8 +-
 mfhdf/fortran/mfsdff.f                          |   10 +-
 mfhdf/fortran/tszip.f                           |    8 +-
 mfhdf/hdfimport/CMakeLists.txt                  |   21 +-
 mfhdf/hdfimport/CMakeTests.cmake                |   64 +-
 mfhdf/hdfimport/Makefile.in                     |    1 +
 mfhdf/hdfimport/crtSDSfloats.c                  |   12 +-
 mfhdf/hdfimport/gen_sds_floats.c                |   12 +-
 mfhdf/hdfimport/hdfimport.c                     |    8 +-
 mfhdf/hdfimport/hdfimporttest.c                 |    8 +-
 mfhdf/hdiff/CMakeLists.txt                      |   19 +-
 mfhdf/hdiff/CMakeTests.cmake                    |   32 +-
 mfhdf/hdiff/Makefile.in                         |    1 +
 mfhdf/hdiff/hdiff.c                             |    8 +-
 mfhdf/hdiff/hdiff_array.c                       |    8 +-
 mfhdf/hdiff/hdiff_dim.c                         |    8 +-
 mfhdf/hdiff/hdiff_gattr.c                       |    8 +-
 mfhdf/hdiff/hdiff_gr.c                          |    8 +-
 mfhdf/hdiff/hdiff_list.c                        |    8 +-
 mfhdf/hdiff/hdiff_main.c                        |    8 +-
 mfhdf/hdiff/hdiff_mattbl.c                      |    8 +-
 mfhdf/hdiff/hdiff_misc.c                        |    8 +-
 mfhdf/hdiff/hdiff_sds.c                         |    8 +-
 mfhdf/hdiff/hdiff_table.c                       |    8 +-
 mfhdf/hdiff/hdiff_vs.c                          |    8 +-
 mfhdf/hdiff/testhdiff.sh.in                     |    2 +-
 mfhdf/hrepack/CMakeLists.txt                    |   25 +-
 mfhdf/hrepack/CMakeTests.cmake                  |   28 +-
 mfhdf/hrepack/Makefile.in                       |    1 +
 mfhdf/hrepack/hrepack.c                         |    8 +-
 mfhdf/hrepack/hrepack.h                         |    8 +-
 mfhdf/hrepack/hrepack_an.c                      |    8 +-
 mfhdf/hrepack/hrepack_an.h                      |    8 +-
 mfhdf/hrepack/hrepack_dim.c                     |    8 +-
 mfhdf/hrepack/hrepack_gr.c                      |    8 +-
 mfhdf/hrepack/hrepack_gr.h                      |    8 +-
 mfhdf/hrepack/hrepack_list.c                    |    8 +-
 mfhdf/hrepack/hrepack_lsttable.c                |    8 +-
 mfhdf/hrepack/hrepack_lsttable.h                |    8 +-
 mfhdf/hrepack/hrepack_main.c                    |    8 +-
 mfhdf/hrepack/hrepack_opttable.c                |    8 +-
 mfhdf/hrepack/hrepack_opttable.h                |    8 +-
 mfhdf/hrepack/hrepack_parse.c                   |    8 +-
 mfhdf/hrepack/hrepack_parse.h                   |    8 +-
 mfhdf/hrepack/hrepack_sds.c                     |    8 +-
 mfhdf/hrepack/hrepack_sds.h                     |    8 +-
 mfhdf/hrepack/hrepack_utils.c                   |    8 +-
 mfhdf/hrepack/hrepack_utils.h                   |    8 +-
 mfhdf/hrepack/hrepack_vg.c                      |    8 +-
 mfhdf/hrepack/hrepack_vs.c                      |    8 +-
 mfhdf/hrepack/hrepack_vs.h                      |    8 +-
 mfhdf/hrepack/hrepacktst.c                      |    8 +-
 mfhdf/hrepack/pal_rgb.h                         |    8 +-
 mfhdf/libsrc/CMakeLists.txt                     |   32 +-
 mfhdf/libsrc/Makefile.in                        |    1 +
 mfhdf/libsrc/alloc.h                            |   10 +-
 mfhdf/libsrc/array.c                            |   14 +-
 mfhdf/libsrc/attr.c                             |   10 +-
 mfhdf/libsrc/cdf.c                              |   10 +-
 mfhdf/libsrc/dim.c                              |   10 +-
 mfhdf/libsrc/error.c                            |    8 +-
 mfhdf/libsrc/error.h                            |   10 +-
 mfhdf/libsrc/file.c                             |   10 +-
 mfhdf/libsrc/globdef.c                          |   10 +-
 mfhdf/libsrc/hdf2netcdf.h                       |   10 +-
 mfhdf/libsrc/hdfnctest.c                        |    8 +-
 mfhdf/libsrc/hdfsds.c                           | 1977 ++++++++++++-----------
 mfhdf/libsrc/iarray.c                           |   10 +-
 mfhdf/libsrc/local_nc.h                         |   30 +-
 mfhdf/libsrc/mfdatainfo.c                       |    8 +-
 mfhdf/libsrc/mfdatainfo.h                       |    8 +-
 mfhdf/libsrc/mfhdf.h                            |   10 +-
 mfhdf/libsrc/mfhdfi.h                           |    8 +-
 mfhdf/libsrc/mfprivate.h                        |    8 +-
 mfhdf/libsrc/mfsd.c                             |   10 +-
 mfhdf/libsrc/netcdf.h.in                        |    2 +-
 mfhdf/libsrc/nssdc.c                            |    8 +-
 mfhdf/libsrc/putget.c                           |   10 +-
 mfhdf/libsrc/putgetg.c                          |   10 +-
 mfhdf/libsrc/sharray.c                          |   10 +-
 mfhdf/libsrc/string.c                           |   10 +-
 mfhdf/libsrc/var.c                              |   10 +-
 mfhdf/libsrc/xdrposix.c                         |    2 +-
 mfhdf/libsrc/xdrstdio.c                         |    2 +-
 mfhdf/ncdump/CMakeLists.txt                     |   14 +-
 mfhdf/ncdump/CMakeTests.cmake                   |    8 +-
 mfhdf/ncdump/Makefile.in                        |    1 +
 mfhdf/ncdump/dumplib.c                          |    2 +-
 mfhdf/ncdump/dumplib.h                          |    2 +-
 mfhdf/ncdump/ncdump.1                           |    4 +-
 mfhdf/ncdump/ncdump.c                           |    2 +-
 mfhdf/ncdump/ncdump.h                           |    2 +-
 mfhdf/ncdump/vardata.c                          |    2 +-
 mfhdf/ncdump/vardata.h                          |    2 +-
 mfhdf/ncgen/CMakeLists.txt                      |   16 +-
 mfhdf/ncgen/CMakeTests.cmake                    |    8 +-
 mfhdf/ncgen/Makefile.in                         |    1 +
 mfhdf/ncgen/close.c                             |    2 +-
 mfhdf/ncgen/escapes.c                           |    2 +-
 mfhdf/ncgen/generate.c                          |    2 +-
 mfhdf/ncgen/generic.h                           |    2 +-
 mfhdf/ncgen/genlib.c                            |    2 +-
 mfhdf/ncgen/genlib.h                            |    2 +-
 mfhdf/ncgen/getfill.c                           |    2 +-
 mfhdf/ncgen/init.c                              |    2 +-
 mfhdf/ncgen/load.c                              |    2 +-
 mfhdf/ncgen/main.c                              |    2 +-
 mfhdf/ncgen/ncgen.1                             |    4 +-
 mfhdf/ncgen/ncgen.h                             |    2 +-
 mfhdf/ncgen/ncgen.l                             |    2 +-
 mfhdf/ncgen/ncgen.y                             |    4 +-
 mfhdf/nctest/CMakeLists.txt                     |   24 +-
 mfhdf/nctest/Makefile.in                        |    1 +
 mfhdf/nctest/add.c                              |    2 +-
 mfhdf/nctest/add.h                              |    2 +-
 mfhdf/nctest/atttests.c                         |    2 +-
 mfhdf/nctest/cdftests.c                         |    2 +-
 mfhdf/nctest/dimtests.c                         |    2 +-
 mfhdf/nctest/driver.c                           |    2 +-
 mfhdf/nctest/emalloc.c                          |    2 +-
 mfhdf/nctest/emalloc.h                          |    2 +-
 mfhdf/nctest/error.c                            |    2 +-
 mfhdf/nctest/error.h                            |    2 +-
 mfhdf/nctest/misctest.c                         |    2 +-
 mfhdf/nctest/rec.c                              |    2 +-
 mfhdf/nctest/slabs.c                            |    2 +-
 mfhdf/nctest/testcdf.h                          |    2 +-
 mfhdf/nctest/tests.h                            |    2 +-
 mfhdf/nctest/val.c                              |    2 +-
 mfhdf/nctest/val.h                              |    2 +-
 mfhdf/nctest/vardef.c                           |    2 +-
 mfhdf/nctest/varget.c                           |    2 +-
 mfhdf/nctest/vargetg.c                          |    2 +-
 mfhdf/nctest/varput.c                           |    2 +-
 mfhdf/nctest/varputg.c                          |    2 +-
 mfhdf/nctest/vartests.c                         |    2 +-
 mfhdf/nctest/vputget.c                          |    2 +-
 mfhdf/nctest/vputgetg.c                         |    2 +-
 mfhdf/test/CMakeLists.txt                       |   38 +-
 mfhdf/test/CMakeTests.cmake                     |   22 +-
 mfhdf/test/Makefile.in                          |    1 +
 mfhdf/test/cdftest.c                            |    8 +-
 mfhdf/test/gen_sds_szipped.c                    |    8 +-
 mfhdf/test/hdfnctest.c                          |    8 +-
 mfhdf/test/hdftest.c                            |    8 +-
 mfhdf/test/hdftest.h                            |    8 +-
 mfhdf/test/tattdatainfo.c                       |    8 +-
 mfhdf/test/tattributes.c                        |    8 +-
 mfhdf/test/tchunk.c                             |    8 +-
 mfhdf/test/tcomp.c                              |    8 +-
 mfhdf/test/tcoordvar.c                          |    8 +-
 mfhdf/test/tdatainfo.c                          |    8 +-
 mfhdf/test/tdatasizes.c                         |    8 +-
 mfhdf/test/tdim.c                               |    9 +-
 mfhdf/test/temptySDSs.c                         |    8 +-
 mfhdf/test/texternal.c                          |  286 ++--
 mfhdf/test/tfile.c                              |    8 +-
 mfhdf/test/tmixed_apis.c                        |    8 +-
 mfhdf/test/tncunlim.c                           |    9 +-
 mfhdf/test/tncvargetfill.c                      |    9 +-
 mfhdf/test/tnetcdf.c                            |    8 +-
 mfhdf/test/trank0.c                             |    8 +-
 mfhdf/test/tsd.c                                |    8 +-
 mfhdf/test/tsdsprops.c                          |    8 +-
 mfhdf/test/tszip.c                              |    8 +-
 mfhdf/test/tunlim.c                             |    9 +-
 mfhdf/test/tutils.c                             |   99 +-
 mfhdf/xdr/CMakeLists.txt                        |   16 +-
 mfhdf/xdr/Makefile.in                           |    1 +
 mfhdf/xdr/README                                |    2 +-
 release_notes/HISTORY.txt                       |  290 +++-
 release_notes/INSTALL                           |   12 +-
 release_notes/INSTALL_CMake.txt                 |   48 +-
 release_notes/INSTALL_CYGWIN.txt                |   10 +-
 release_notes/RELEASE.txt                       |  157 +-
 release_notes/USING_CMake_Examples.txt          |   12 +-
 release_notes/USING_HDF4_CMake.txt              |   13 +-
 550 files changed, 6743 insertions(+), 6067 deletions(-)

diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake
index 0114f7f..fac64a6 100644
--- a/CMakeFilters.cmake
+++ b/CMakeFilters.cmake
@@ -4,14 +4,21 @@
 #-----------------------------------------------------------------------------
 
 include (ExternalProject)
-#option (HDF4_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO SVN TGZ)" "NO")
-set (HDF4_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)")
-set_property (CACHE HDF4_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ)
-if (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+#option (HDF4_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT SVN TGZ)" "NO")
+set (HDF4_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT SVN TGZ)")
+set_property (CACHE HDF4_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NOGIT SVN TGZ)
+if (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
   option (JPEG_USE_EXTERNAL "Use External Library Building for JPEG" 1)
   option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1)
   option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1)
-  if (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
+  if (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
+    set (JPEG_URL ${JPEG_GIT_URL})
+    set (JPEG_BRANCH ${JPEG_GIT_BRANCH})
+    set (ZLIB_URL ${ZLIB_GIT_URL})
+    set (ZLIB_BRANCH ${ZLIB_GIT_BRANCH})
+    set (SZIP_URL ${SZIP_GIT_URL})
+    set (SZIP_BRANCH ${SZIP_GIT_BRANCH})
+  elseif (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
     set (JPEG_URL ${JPEG_SVN_URL})
     set (ZLIB_URL ${ZLIB_SVN_URL})
     set (SZIP_URL ${SZIP_SVN_URL})
@@ -22,12 +29,12 @@ if (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MAT
     set (JPEG_URL ${TGZPATH}/${JPEG_TGZ_NAME})
     set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME})
     set (SZIP_URL ${TGZPATH}/${SZIP_TGZ_NAME})
-  else (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
+  else ()
     set (JPEG_USE_EXTERNAL 0)
     set (ZLIB_USE_EXTERNAL 0)
     set (SZIP_USE_EXTERNAL 0)
-  endif (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
-endif (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+  endif ()
+endif ()
 
 #-----------------------------------------------------------------------------
 # Option for LibJpeg support
@@ -42,49 +49,49 @@ if (HDF4_ENABLE_JPEG_LIB_SUPPORT)
         if (JPEG_FOUND)
           set (LINK_LIBS ${LINK_LIBS} ${JPEG_LIBRARIES})
           set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${JPEG_LIBRARIES})
-        endif (JPEG_FOUND)
-      endif (NOT JPEG_FOUND)
-    endif (NOT JPEG_USE_EXTERNAL)
+        endif ()
+      endif ()
+    endif ()
     if (JPEG_FOUND)
       set (H4_HAVE_JPEGLIB_H 1)
       set (H4_HAVE_LIBJPEG 1)
       set (H4_JPEGLIB_HEADER "jpeglib.h")
       set (JPEG_INCLUDE_DIR_GEN ${JPEG_INCLUDE_DIR})
       set (JPEG_INCLUDE_DIRS ${JPEG_INCLUDE_DIRS} ${JPEG_INCLUDE_DIR})
-    else (JPEG_FOUND)
-      if (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+    else ()
+      if (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
         # May need to build JPEG with PIC on x64 machines with gcc
         # Need to use CMAKE_ANSI_CFLAGS define so that compiler test works
         if (BUILD_JPEG_WITH_PIC)
           set (JPEG_CMAKE_C_FLAGS "-fPIC")
-        else (BUILD_JPEG_WITH_PIC)
+        else ()
           if (DEFINED CMAKE_ANSI_CFLAGS)
             set (JPEG_CMAKE_C_FLAGS ${CMAKE_ANSI_CFLAGS})
-          else (DEFINED CMAKE_ANSI_CFLAGS)
+          else ()
             set (JPEG_CMAKE_C_FLAGS " ")
-          endif (DEFINED CMAKE_ANSI_CFLAGS)
-        endif (BUILD_JPEG_WITH_PIC)
+          endif ()
+        endif ()
 
         EXTERNAL_JPEG_LIBRARY (${HDF4_ALLOW_EXTERNAL_SUPPORT} ${JPEG_CMAKE_C_FLAGS})
         set (H4_HAVE_JPEGLIB_H 1)
         set (H4_HAVE_LIBJPEG 1)
         set (H4_JPEGLIB_HEADER "jpeglib.h")
         message (STATUS "JPEGLIB is built")
-      else (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+      else ()
         message (FATAL_ERROR " JPEGLib is Required for JPEGLib support in HDF4")
-      endif (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
-    endif (JPEG_FOUND)
-  else (NOT H4_JPEGLIB_HEADER)
+      endif ()
+    endif ()
+  else ()
     # This project is being called from within another and JPEGLib is already configured
     set (H4_HAVE_JPEGLIB_H 1)
-  endif (NOT H4_JPEGLIB_HEADER)
-  if (BUILD_SHARED_LIBS) 
+  endif ()
+  if (BUILD_SHARED_LIBS)
     set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${JPEG_SHARED_LIBRARY})
-  endif (BUILD_SHARED_LIBS) 
+  endif ()
   set (LINK_LIBS ${LINK_LIBS} ${JPEG_STATIC_LIBRARY})
   INCLUDE_DIRECTORIES (${JPEG_INCLUDE_DIRS})
   message (STATUS "JPEGLIB is ON")
-endif (HDF4_ENABLE_JPEG_LIB_SUPPORT)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Option for ZLib support
@@ -99,9 +106,9 @@ if (HDF4_ENABLE_Z_LIB_SUPPORT)
         if (ZLIB_FOUND)
           set (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES})
           set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${ZLIB_LIBRARIES})
-        endif (ZLIB_FOUND)
-      endif (NOT ZLIB_FOUND)
-    endif (NOT ZLIB_USE_EXTERNAL)
+        endif ()
+      endif ()
+    endif ()
     if (ZLIB_FOUND)
       set (H4_HAVE_FILTER_DEFLATE 1)
       set (H4_HAVE_ZLIB_H 1)
@@ -109,30 +116,30 @@ if (HDF4_ENABLE_Z_LIB_SUPPORT)
       set (H4_ZLIB_HEADER "zlib.h")
       set (ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR})
       set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
-    else (ZLIB_FOUND)
-      if (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+    else ()
+      if (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
         EXTERNAL_ZLIB_LIBRARY (${HDF4_ALLOW_EXTERNAL_SUPPORT})
         set (H4_HAVE_FILTER_DEFLATE 1)
         set (H4_HAVE_ZLIB_H 1)
         set (H4_HAVE_LIBZ 1)
         message (STATUS "Filter ZLIB is built")
-      else (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+      else ()
         message (FATAL_ERROR " ZLib is Required for ZLib support in HDF4")
-      endif (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
-    endif (ZLIB_FOUND)
-  else (NOT H4_ZLIB_HEADER)
+      endif ()
+    endif ()
+  else ()
     # This project is being called from within another and ZLib is already configured
     set (H4_HAVE_FILTER_DEFLATE 1)
     set (H4_HAVE_ZLIB_H 1)
     set (H4_HAVE_LIBZ 1)
-  endif (NOT H4_ZLIB_HEADER)
-  if (BUILD_SHARED_LIBS) 
+  endif ()
+  if (BUILD_SHARED_LIBS)
     set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${ZLIB_SHARED_LIBRARY})
-  endif (BUILD_SHARED_LIBS) 
+  endif ()
   set (LINK_LIBS ${LINK_LIBS} ${ZLIB_STATIC_LIBRARY})
   INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS})
   message (STATUS "Filter ZLIB is ON")
-endif (HDF4_ENABLE_Z_LIB_SUPPORT)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Option for SzLib support
@@ -148,36 +155,36 @@ if (HDF4_ENABLE_SZIP_SUPPORT)
       if (SZIP_FOUND)
         set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
         set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${SZIP_LIBRARIES})
-      endif (SZIP_FOUND)
-    endif (NOT SZIP_FOUND)
-  endif (NOT SZIP_USE_EXTERNAL)
+      endif ()
+    endif ()
+  endif ()
   if (SZIP_FOUND)
     set (H4_HAVE_FILTER_SZIP 1)
     set (H4_HAVE_SZLIB_H 1)
     set (H4_HAVE_LIBSZ 1)
     set (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
     set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR})
-  else (SZIP_FOUND)
-    if (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+  else ()
+    if (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
       EXTERNAL_SZIP_LIBRARY (${HDF4_ALLOW_EXTERNAL_SUPPORT} ${HDF4_ENABLE_SZIP_ENCODING})
       set (H4_HAVE_FILTER_SZIP 1)
       set (H4_HAVE_SZLIB_H 1)
       set (H4_HAVE_LIBSZ 1)
       message (STATUS "Filter SZIP is built")
-    else (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+    else ()
       message (FATAL_ERROR "SZIP is Required for SZIP support in HDF4")
-    endif (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
-  endif (SZIP_FOUND)
-  if (BUILD_SHARED_LIBS) 
+    endif ()
+  endif ()
+  if (BUILD_SHARED_LIBS)
     set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${SZIP_SHARED_LIBRARY})
-  endif (BUILD_SHARED_LIBS) 
+  endif ()
   set (LINK_LIBS ${LINK_LIBS} ${SZIP_STATIC_LIBRARY})
   INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS})
   message (STATUS "Filter SZIP is ON")
   if (HDF4_ENABLE_SZIP_ENCODING)
     set (H4_HAVE_SZIP_ENCODER 1)
     set (SZIP_INFO "enabled with encoder")
-  else (HDF4_ENABLE_SZIP_ENCODING)
+  else ()
     set (SZIP_INFO "enabled with decoder only")
-  endif (HDF4_ENABLE_SZIP_ENCODING)
-endif (HDF4_ENABLE_SZIP_SUPPORT)
+  endif ()
+endif ()
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index 20113e1..37f54e4 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -10,7 +10,7 @@ if (WIN32)
     file(TO_CMAKE_PATH "$ENV{WIX}" CPACK_WIX_ROOT)
   endif()
   find_program (WIX_EXECUTABLE candle  PATHS "${CPACK_WIX_ROOT}/bin")
-endif (WIN32)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Add file(s) to CMake Install
@@ -21,7 +21,7 @@ if (NOT HDF4_INSTALL_NO_DEVELOPMENT)
       DESTINATION ${HDF4_INSTALL_INCLUDE_DIR}
       COMPONENT headers
   )
-endif (NOT HDF4_INSTALL_NO_DEVELOPMENT)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Add Target(s) to CMake Install for import into other projects
@@ -31,17 +31,19 @@ if (NOT HDF4_EXTERNALLY_CONFIGURED)
       EXPORT ${HDF4_EXPORTED_TARGETS}
       DESTINATION ${HDF4_INSTALL_CMAKE_DIR}
       FILE ${HDF4_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
+      NAMESPACE ${HDF4_PACKAGE}::
       COMPONENT configinstall
   )
-endif (NOT HDF4_EXTERNALLY_CONFIGURED)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Export all exported targets to the build tree for use by parent project
 #-----------------------------------------------------------------------------
 if (NOT HDF4_EXTERNALLY_CONFIGURED)
   export (
-      TARGETS ${HDF4_LIBRARIES_TO_EXPORT} ${HDF4_LIB_DEPENDENCIES}
+      TARGETS ${HDF4_LIBRARIES_TO_EXPORT} ${HDF4_LIB_DEPENDENCIES} ${HDF4_UTILS_TO_EXPORT}
       FILE ${HDF4_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
+      NAMESPACE ${HDF4_PACKAGE}::
   )
 endif (NOT HDF4_EXTERNALLY_CONFIGURED)
 
@@ -77,21 +79,6 @@ configure_package_config_file (
 )
 
 #-----------------------------------------------------------------------------
-# Configure the FindHDF4.cmake file for the install directory
-#-----------------------------------------------------------------------------
-if (NOT HDF4_EXTERNALLY_CONFIGURED)
-  configure_file (
-      ${HDF_RESOURCES_DIR}/FindHDF4.cmake.in
-      ${HDF4_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindHDF4${HDF_PACKAGE_EXT}.cmake @ONLY
-  )
-  install (
-      FILES ${HDF4_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindHDF4${HDF_PACKAGE_EXT}.cmake
-      DESTINATION ${HDF4_INSTALL_CMAKE_DIR}
-      COMPONENT configinstall
-  )
-endif (NOT HDF4_EXTERNALLY_CONFIGURED)
-
-#-----------------------------------------------------------------------------
 # Configure the hdf4-config.cmake file for the install directory
 #-----------------------------------------------------------------------------
 set (INCLUDE_INSTALL_DIR ${HDF4_INSTALL_INCLUDE_DIR})
@@ -109,7 +96,7 @@ if (NOT HDF4_EXTERNALLY_CONFIGURED)
       DESTINATION ${HDF4_INSTALL_CMAKE_DIR}
       COMPONENT configinstall
   )
-endif (NOT HDF4_EXTERNALLY_CONFIGURED)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Configure the hdf4-config-version .cmake file for the install directory
@@ -124,16 +111,16 @@ if (NOT HDF4_EXTERNALLY_CONFIGURED)
       DESTINATION ${HDF4_INSTALL_CMAKE_DIR}
       COMPONENT configinstall
   )
-endif (NOT HDF4_EXTERNALLY_CONFIGURED)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Configure the libhdf4.settings file for the lib info
 #-----------------------------------------------------------------------------
 if (H4_WORDS_BIGENDIAN)
   set (BYTESEX big-endian)
-else (H4_WORDS_BIGENDIAN)
+else ()
   set (BYTESEX little-endian)
-endif (H4_WORDS_BIGENDIAN)
+endif ()
 configure_file (
     ${HDF_RESOURCES_DIR}/libhdf4.settings.cmake.in
     ${HDF4_BINARY_DIR}/libhdf4.settings @ONLY
@@ -168,14 +155,26 @@ if (HDF4_PACK_EXAMPLES)
       USE_SOURCE_PERMISSIONS
       COMPONENT hdfdocuments
     )
-    install (
-        FILES
-            ${HDF4_SOURCE_DIR}/release_notes/USING_CMake_Examples.txt
-        DESTINATION ${HDF4_INSTALL_DATA_DIR}
-        COMPONENT hdfdocuments
-    )
-  endif (EXISTS "${HDF4_EXAMPLES_COMPRESSED_DIR}/${HDF4_EXAMPLES_COMPRESSED}")
-endif (HDF4_PACK_EXAMPLES)
+  endif ()
+  install (
+      FILES
+          ${HDF4_SOURCE_DIR}/release_notes/USING_CMake_Examples.txt
+      DESTINATION ${HDF4_INSTALL_DATA_DIR}
+      COMPONENT hdfdocuments
+  )
+  install (
+      FILES
+          ${HDF_RESOURCES_DIR}/CTestScript.cmake
+      DESTINATION ${HDF4_INSTALL_DATA_DIR}
+      COMPONENT hdfdocuments
+  )
+  install (
+      FILES
+          ${HDF_RESOURCES_DIR}/HDF4_Examples_options.cmake
+      DESTINATION ${HDF4_INSTALL_DATA_DIR}
+      COMPONENT hdfdocuments
+  )
+endif ()
 
 #-----------------------------------------------------------------------------
 # Configure the README.txt file for the binary package
@@ -187,7 +186,7 @@ HDF_README_PROPERTIES(HDF4_BUILD_FORTRAN)
 #-----------------------------------------------------------------------------
 if (WIN32)
   configure_file (${HDF4_SOURCE_DIR}/COPYING ${HDF4_BINARY_DIR}/COPYING.txt @ONLY)
-endif (WIN32)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Add Document File(s) to CMake Install
@@ -209,7 +208,7 @@ if (NOT HDF4_EXTERNALLY_CONFIGURED)
           ${release_files}
           ${HDF4_SOURCE_DIR}/release_notes/USING_HDF4_VS.txt
       )
-    endif (WIN32)
+    endif ()
     if (HDF4_PACK_INSTALL_DOCS)
       set (release_files
           ${release_files}
@@ -222,34 +221,34 @@ if (NOT HDF4_EXTERNALLY_CONFIGURED)
             ${release_files}
             ${HDF4_SOURCE_DIR}/release_notes/INSTALL_Windows.txt
         )
-      endif (WIN32)
+      endif ()
       if (CYGWIN)
         set (release_files
             ${release_files}
             ${HDF4_SOURCE_DIR}/release_notes/INSTALL_Cygwin.txt
         )
-      endif (CYGWIN)
-    endif (HDF4_PACK_INSTALL_DOCS)
+      endif ()
+    endif ()
     install (
         FILES ${release_files}
         DESTINATION ${HDF4_INSTALL_DATA_DIR}
         COMPONENT hdfdocuments
     )
-  endif (EXISTS "${HDF4_SOURCE_DIR}/release_notes" AND IS_DIRECTORY "${HDF4_SOURCE_DIR}/release_notes")
-endif (NOT HDF4_EXTERNALLY_CONFIGURED)
+  endif ()
+endif ()
 
 if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
   if (CMAKE_HOST_UNIX)
-    set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/HDF_Group/${HDF4_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
+    set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/HDF_Group/${HDF4_PACKAGE_NAME}/${HDF4_PACKAGE_VERSION}"
       CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
-  else (CMAKE_HOST_UNIX)
+  else ()
     GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
     set (CMAKE_INSTALL_PREFIX
       "${CMAKE_GENERIC_PROGRAM_FILES}/HDF_Group/${HDF4_PACKAGE_NAME}/${HDF4_PACKAGE_VERSION}"
       CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
     set (CMAKE_GENERIC_PROGRAM_FILES)
-  endif (CMAKE_HOST_UNIX)
-endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+  endif ()
+endif ()
 
 #-----------------------------------------------------------------------------
 # Set the cpack variables
@@ -259,9 +258,9 @@ if (NOT HDF4_EXTERNALLY_CONFIGURED AND NOT HDF4_NO_PACKAGES)
   set (CPACK_PACKAGE_NAME "${HDF4_PACKAGE_NAME}")
   if (CDASH_LOCAL)
     set (CPACK_PACKAGE_VERSION "${HDF4_PACKAGE_VERSION}")
-  else (CDASH_LOCAL)
+  else ()
     set (CPACK_PACKAGE_VERSION "${HDF4_PACKAGE_VERSION_STRING}")
-  endif (CDASH_LOCAL)
+  endif ()
   set (CPACK_PACKAGE_VERSION_MAJOR "${HDF4_PACKAGE_VERSION_MAJOR}")
   set (CPACK_PACKAGE_VERSION_MINOR "${HDF4_PACKAGE_VERSION_MINOR}")
   set (CPACK_PACKAGE_VERSION_PATCH "")
@@ -269,13 +268,13 @@ if (NOT HDF4_EXTERNALLY_CONFIGURED AND NOT HDF4_NO_PACKAGES)
   if (EXISTS "${HDF4_SOURCE_DIR}/release_notes")
     set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/release_notes/RELEASE.txt")
     set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_notes/RELEASE.txt")
-  endif (EXISTS "${HDF4_SOURCE_DIR}/release_notes")
+  endif ()
   set (CPACK_PACKAGE_RELOCATABLE TRUE)
   if (OVERRIDE_INSTALL_VERSION)
     set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${OVERRIDE_INSTALL_VERSION}")
-  else (OVERRIDE_INSTALL_VERSION)
+  else ()
     set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
-  endif (OVERRIDE_INSTALL_VERSION)
+  endif ()
   set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.bmp")
 
   set (CPACK_GENERATOR "TGZ")
@@ -284,7 +283,7 @@ if (NOT HDF4_EXTERNALLY_CONFIGURED AND NOT HDF4_NO_PACKAGES)
 
     if (NSIS_EXECUTABLE)
       list (APPEND CPACK_GENERATOR "NSIS")
-    endif (NSIS_EXECUTABLE)
+    endif ()
     # Installers for 32- vs. 64-bit CMake:
     #  - Root install directory (displayed to end user at installer-run time)
     #  - "NSIS package/display name" (text used in the installer GUI)
@@ -293,10 +292,10 @@ if (NOT HDF4_EXTERNALLY_CONFIGURED AND NOT HDF4_NO_PACKAGES)
     if (CMAKE_CL_64)
       set (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
       set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION} (Win64)")
-    else (CMAKE_CL_64)
+    else ()
       set (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
       set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
-    endif (CMAKE_CL_64)
+    endif ()
     # set the install/unistall icon used for the installer itself
     # There is a bug in NSI that does not handle full unix paths properly.
     set (CPACK_NSIS_MUI_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.ico")
@@ -306,15 +305,15 @@ if (NOT HDF4_EXTERNALLY_CONFIGURED AND NOT HDF4_NO_PACKAGES)
     set (CPACK_NSIS_DISPLAY_NAME "${CPACK_NSIS_PACKAGE_NAME}")
     if (OVERRIDE_INSTALL_VERSION)
       set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${OVERRIDE_INSTALL_VERSION}")
-    else (OVERRIDE_INSTALL_VERSION)
+    else ()
       set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}")
-    endif (OVERRIDE_INSTALL_VERSION)
+    endif ()
     set (CPACK_NSIS_CONTACT "${HDF4_PACKAGE_BUGREPORT}")
     set (CPACK_NSIS_MODIFY_PATH ON)
 
     if (WIX_EXECUTABLE)
       list (APPEND CPACK_GENERATOR "WIX")
-    endif (WIX_EXECUTABLE)
+    endif ()
 #WiX variables
     set (CPACK_WIX_UNINSTALL "1")
 # .. variable:: CPACK_WIX_LICENSE_RTF
@@ -357,8 +356,9 @@ if (NOT HDF4_EXTERNALLY_CONFIGURED AND NOT HDF4_NO_PACKAGES)
     set(CPACK_WIX_PROPERTY_ARPHELPLINK "${HDF4_PACKAGE_BUGREPORT}")
     if (BUILD_SHARED_LIBS)
       set(CPACK_WIX_PATCH_FILE "${HDF_RESOURCES_DIR}/patch.xml")
-    endif (BUILD_SHARED_LIBS)
+    endif ()
   elseif (APPLE)
+    list (APPEND CPACK_GENERATOR "STGZ")
     list (APPEND CPACK_GENERATOR "DragNDrop")
     set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
     set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
@@ -391,8 +391,8 @@ if (NOT HDF4_EXTERNALLY_CONFIGURED AND NOT HDF4_NO_PACKAGES)
           FILES ${HDF4_BINARY_DIR}/CMakeFiles/PkgInfo
           DESTINATION ..
       )
-    endif (HDF4_PACK_MACOSX_FRAMEWORK AND HDF4_BUILD_FRAMEWORKS)
-  else (WIN32)
+    endif ()
+  else ()
     list (APPEND CPACK_GENERATOR "STGZ")
     set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
     set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
@@ -428,49 +428,49 @@ The HDF data model, file format, API, library, and tools are open and distribute
     #-----------------------------------------------------------------------------
     # Configure the spec file for the install RPM
     #-----------------------------------------------------------------------------
-#    configure_file ("${HDF5_RESOURCES_DIR}/hdf5.spec.in" "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec" @ONLY IMMEDIATE)
-#    set (CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec")
-  endif (WIN32)
+#    configure_file ("${HDF4_RESOURCES_DIR}/hdf4.spec.in" "${CMAKE_CURRENT_BINARY_DIR}/${HDF4_PACKAGE_NAME}.spec" @ONLY IMMEDIATE)
+#    set (CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/${HDF4_PACKAGE_NAME}.spec")
+  endif ()
 
   # By default, do not warn when built on machines using only VS Express:
   if (NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
     set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
-  endif (NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
+  endif ()
   include (InstallRequiredSystemLibraries)
 
   set (CPACK_INSTALL_CMAKE_PROJECTS "${HDF4_BINARY_DIR};HDF4;ALL;/")
 
   if (HDF4_PACKAGE_EXTLIBS)
-    if (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+    if (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
       if (JPEG_FOUND AND JPEG_USE_EXTERNAL)
         if (WIN32)
           set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${JPEG_INCLUDE_DIR_GEN};JPEG;ALL;/")
-        else (WIN32)
+        else ()
           set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${JPEG_INCLUDE_DIR_GEN};JPEG;libraries;/")
           set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${JPEG_INCLUDE_DIR_GEN};JPEG;headers;/")
           set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${JPEG_INCLUDE_DIR_GEN};JPEG;configinstall;/")
-        endif (WIN32)
-      endif (JPEG_FOUND AND JPEG_USE_EXTERNAL)
+        endif ()
+      endif ()
       if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
         if (WIN32)
           set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;ALL;/")
-        else (WIN32)
+        else ()
           set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;libraries;/")
           set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;headers;/")
           set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;configinstall;/")
-        endif (WIN32)
-      endif (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
+        endif ()
+      endif ()
       if (SZIP_FOUND AND SZIP_USE_EXTERNAL)
         if (WIN32)
           set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;ALL;/")
-        else (WIN32)
+        else ()
           set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/")
           set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;headers;/")
           set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/")
-        endif (WIN32)
-      endif (SZIP_FOUND AND SZIP_USE_EXTERNAL)
-    endif (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
-  endif (HDF4_PACKAGE_EXTLIBS)
+        endif ()
+      endif ()
+    endif ()
+  endif ()
 
   include (CPack)
 
@@ -529,7 +529,7 @@ The HDF data model, file format, API, library, and tools are open and distribute
         GROUP Runtime
         INSTALL_TYPES Full Developer User
     )
-  endif (HDF4_BUILD_FORTRAN)
+  endif ()
 
   if (HDF4_BUILD_TOOLS)
     cpack_add_component (toolsapplications
@@ -538,7 +538,7 @@ The HDF data model, file format, API, library, and tools are open and distribute
         GROUP Applications
         INSTALL_TYPES Full Developer User
     )
-  endif (HDF4_BUILD_TOOLS)
+  endif ()
 
   if (HDF4_BUILD_UTILS)
     cpack_add_component (utilsapplications
@@ -547,5 +547,5 @@ The HDF data model, file format, API, library, and tools are open and distribute
         GROUP Applications
         INSTALL_TYPES Full Developer User
     )
-  endif (HDF4_BUILD_UTILS)
-endif (NOT HDF4_EXTERNALLY_CONFIGURED AND NOT HDF4_NO_PACKAGES)
+  endif ()
+endif ()
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 63312d9..3996036 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 PROJECT (HDF4 C CXX)
 
 #-----------------------------------------------------------------------------
@@ -81,13 +81,13 @@ endif ()
 #     # Override the zlib header file
 #     if (PRJ_USE_SYSTEM_ZLIB)
 #       set (H4_ZLIB_HEADER "zlib.h")
-#     else (PRJ_USE_SYSTEM_ZLIB)
+#     else ()
 #      set (H4_ZLIB_HEADER "prj_zlib.h")
 #       # Set vars that FindZlib would have set if used in sub project
 #       set (ZLIB_INCLUDE_DIRS "${PRJ_ZLIB_INCLUDE_DIRS}")
 #       set (ZLIB_LIBRARIES prjzlib)
-#     endif (PRJ_USE_SYSTEM_ZLIB)
-#  endif (HDF4_ENABLE_Z_LIB_SUPPORT)
+#     endif ()
+#  endif ()
 #
 #   # Add the sub project
 #   add_subdirectory (Utilities/hdf4.2.5)
@@ -106,13 +106,13 @@ string(TIMESTAMP CONFIG_DATE "%Y-%m-%d")
 #-----------------------------------------------------------------------------
 # Provide a way for Visual Studio Express users to turn OFF the new FOLDER
 # organization feature. Default to ON for non-Express users. Express users must
-# explicitly turn off this option to build HDF5 in the Express IDE...
+# explicitly turn off this option to build HDF4 in the Express IDE...
 #
 option (HDF4_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON)
 mark_as_advanced (HDF4_USE_FOLDERS)
 if (HDF4_USE_FOLDERS)
   set_property (GLOBAL PROPERTY USE_FOLDERS ON)
-endif (HDF4_USE_FOLDERS)
+endif ()
 option (HDF4_NO_PACKAGES "CPACK - Disable packaging" OFF)
 mark_as_advanced (HDF4_NO_PACKAGES)
 
@@ -202,50 +202,50 @@ set (HDF4_JAVA_LOGGING_SIMPLE_JAR  ${HDF4_SOURCE_DIR}/java/lib/ext/slf4j-simple-
 
 if (APPLE)
   option (HDF4_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE)
-endif (APPLE)
+endif ()
 
 if (NOT HDF4_INSTALL_BIN_DIR)
   set (HDF4_INSTALL_BIN_DIR bin)
   set (HDF4_INSTALL_UTILS_BIN_DIR ${HDF4_INSTALL_BIN_DIR})
   set (HDF4_INSTALL_TOOLS_BIN_DIR ${HDF4_INSTALL_BIN_DIR})
-endif (NOT HDF4_INSTALL_BIN_DIR)
+endif ()
 if (NOT HDF4_INSTALL_LIB_DIR)
   if (APPLE)
     if (HDF4_BUILD_FRAMEWORKS)
       set (HDF4_INSTALL_JAR_DIR ../Java)
-    else (HDF4_BUILD_FRAMEWORKS)
+    else ()
       set (HDF4_INSTALL_JAR_DIR lib)
-    endif (HDF4_BUILD_FRAMEWORKS)
+    endif ()
     set (HDF4_INSTALL_FMWK_DIR ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
-  else (APPLE)
+  else ()
     set (HDF4_INSTALL_JAR_DIR lib)
-  endif (APPLE)
+  endif ()
   set (HDF4_INSTALL_LIB_DIR lib)
-endif (NOT HDF4_INSTALL_LIB_DIR)
+endif ()
 if (NOT HDF4_INSTALL_INCLUDE_DIR)
   set (HDF4_INSTALL_INCLUDE_DIR include)
-endif (NOT HDF4_INSTALL_INCLUDE_DIR)
+endif ()
 if (NOT HDF4_INSTALL_DATA_DIR)
   if (NOT WIN32)
     if (APPLE)
       if (HDF4_BUILD_FRAMEWORKS)
         set (HDF4_INSTALL_EXTRA_DIR ../SharedSupport)
-      else (HDF4_BUILD_FRAMEWORKS)
+      else ()
         set (HDF4_INSTALL_EXTRA_DIR share)
-      endif (HDF4_BUILD_FRAMEWORKS)
+      endif ()
       set (HDF4_INSTALL_FWRK_DIR ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
-    endif (APPLE)
+    endif ()
     set (HDF4_INSTALL_DATA_DIR share)
     set (HDF4_INSTALL_CMAKE_DIR share/cmake)
-  else (NOT WIN32)
+  else ()
     set (HDF4_INSTALL_DATA_DIR ".")
     set (HDF4_INSTALL_CMAKE_DIR cmake)
-  endif (NOT WIN32)
-endif (NOT HDF4_INSTALL_DATA_DIR)
+  endif ()
+endif ()
 
 if(DEFINED ADDITIONAL_CMAKE_PREFIX_PATH AND EXISTS "${ADDITIONAL_CMAKE_PREFIX_PATH}")
   set (CMAKE_PREFIX_PATH ${ADDITIONAL_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH})
-endif(DEFINED ADDITIONAL_CMAKE_PREFIX_PATH AND EXISTS "${ADDITIONAL_CMAKE_PREFIX_PATH}")
+endif()
 
 #-----------------------------------------------------------------------------
 # parse the full version number from hfile.h and include in H4_VERS_INFO
@@ -272,7 +272,7 @@ set (HDF4_PACKAGE_VERSION_MINOR "${H4_VERS_RELEASE}")
 set (HDF4_PACKAGE_VERSION_STRING "${HDF4_PACKAGE_VERSION}")
 if (NOT "${H4_VERS_SUBRELEASE}" STREQUAL "")
   set (HDF4_PACKAGE_VERSION_STRING "${HDF4_PACKAGE_VERSION_STRING}-${H4_VERS_SUBRELEASE}")
-endif (NOT "${H4_VERS_SUBRELEASE}" STREQUAL "")
+endif ()
 set (HDF4_PACKAGE_STRING "${HDF4_PACKAGE_NAME} ${HDF4_PACKAGE_VERSION_STRING}")
 set (HDF4_PACKAGE_TARNAME "${HDF4_PACKAGE}${HDF_PACKAGE_EXT}")
 set (HDF4_PACKAGE_URL "http://www.hdfgroup.org")
@@ -303,16 +303,19 @@ if (NOT HDF4_EXTERNALLY_CONFIGURED)
   )
   if (WIN32)
     set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE})
-  else (WIN32)
+    set (CMAKE_PDB_OUTPUT_DIRECTORY
+        ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files."
+    )
+  else ()
     set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
-  endif (WIN32)
-else (NOT HDF4_EXTERNALLY_CONFIGURED)
+  endif ()
+else ()
   # if we are externally configured, but the project uses old cmake scripts
   # this may not be set and utilities like Hdetect will fail
   if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
     set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
-  endif (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
-endif (NOT HDF4_EXTERNALLY_CONFIGURED)
+  endif ()
+endif ()
 
 #-----------------------------------------------------------------------------
 # Targets built within this project are exported at Install time for use
@@ -320,7 +323,7 @@ endif (NOT HDF4_EXTERNALLY_CONFIGURED)
 #-----------------------------------------------------------------------------
 if (NOT HDF4_EXPORTED_TARGETS)
   set (HDF4_EXPORTED_TARGETS "hdf4-targets")
-endif (NOT HDF4_EXPORTED_TARGETS)
+endif ()
 
 #-----------------------------------------------------------------------------
 # To include a library in the list exported by the project AT BUILD TIME,
@@ -328,6 +331,7 @@ endif (NOT HDF4_EXPORTED_TARGETS)
 # which include hdf4 as a sub-project within their build tree
 #-----------------------------------------------------------------------------
 set_global_variable (HDF4_LIBRARIES_TO_EXPORT "")
+set_global_variable (HDF4_UTILS_TO_EXPORT "")
 set (EXTERNAL_HEADER_LIST "")
 set (EXTERNAL_LIBRARY_LIST "")
 set (EXTERNAL_LIBRARYDLL_LIST "")
@@ -344,7 +348,7 @@ set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
 #-----------------------------------------------------------------------------
 if (HDF4_BUILD_FRAMEWORKS AND NOT BUILD_SHARED_LIBS)
   set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries")
-endif (HDF4_BUILD_FRAMEWORKS AND NOT BUILD_SHARED_LIBS)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Option to Build Shared and Static libs, default is static
@@ -354,7 +358,7 @@ set (H4_ENABLE_SHARED_LIB NO)
 if (BUILD_SHARED_LIBS)
   set (H4_ENABLE_SHARED_LIB YES)
   set (LINK_SHARED_LIBS ${LINK_LIBS})
-endif (BUILD_SHARED_LIBS)
+endif ()
 set (H4_ENABLE_STATIC_LIB YES)
 set (CMAKE_POSITION_INDEPENDENT_CODE ON)
 
@@ -372,9 +376,9 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR CYGWIN)
       CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
     if (${flag_var} MATCHES "O3")
       string (REGEX REPLACE "O3" "O0" ${flag_var} "${${flag_var}}")
-    endif (${flag_var} MATCHES "O3")
-  endforeach (flag_var)
-endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR CYGWIN)
+    endif ()
+  endforeach ()
+endif ()
 
 #-----------------------------------------------------------------------------
 # Option to use code coverage
@@ -384,7 +388,7 @@ if (HDF4_ENABLE_COVERAGE)
     set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
     set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
     set (LDFLAGS "${LDFLAGS} -fprofile-arcs -ftest-coverage")
-endif (HDF4_ENABLE_COVERAGE)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Option to use deprecated public API symbols
@@ -392,9 +396,9 @@ endif (HDF4_ENABLE_COVERAGE)
 option (HDF4_ENABLE_DEPRECATED_SYMBOLS "Enable deprecated public API symbols" ON)
 if (HDF4_ENABLE_DEPRECATED_SYMBOLS)
   set (H4_NO_DEPRECATED_SYMBOLS 0)
-else (HDF4_ENABLE_DEPRECATED_SYMBOLS)
+else ()
   set (H4_NO_DEPRECATED_SYMBOLS 1)
-endif (HDF4_ENABLE_DEPRECATED_SYMBOLS)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Include the main src and config directories
@@ -421,24 +425,24 @@ if (WIN32)
     add_definitions (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1)
     add_definitions (-D_CRT_SECURE_NO_WARNINGS)
     add_definitions (-D_CONSOLE)
-  endif (NOT CYGWIN)
-endif (WIN32)
+  endif ()
+endif ()
 
 if (MSVC)
   set (CMAKE_MFC_FLAG 0)
   set (WIN_COMPILE_FLAGS "")
   set (WIN_LINK_FLAGS "")
-endif (MSVC)
+endif ()
 
 set (MAKE_SYSTEM)
 if (CMAKE_BUILD_TOOL MATCHES "make")
   set (MAKE_SYSTEM 1)
-endif (CMAKE_BUILD_TOOL MATCHES "make")
+endif ()
 
 set (CFG_INIT "/${CMAKE_CFG_INTDIR}")
 if (MAKE_SYSTEM)
   set (CFG_INIT "")
-endif (MAKE_SYSTEM)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Add some definitions for Debug Builds
@@ -447,8 +451,8 @@ if (CMAKE_BUILD_TYPE MATCHES Debug)
   #-- NMake Makefiles will overwhelm the console with warnings if -Wall is used.
   if (NOT WIN32)
     add_definitions (-Wall)
-  endif (NOT WIN32)
-endif (CMAKE_BUILD_TYPE MATCHES Debug)
+  endif ()
+endif ()
 
 #-----------------------------------------------------------------------------
 # Compiler specific flags : Shouldn't there be compiler tests for these
@@ -456,17 +460,17 @@ endif (CMAKE_BUILD_TYPE MATCHES Debug)
 if (CMAKE_COMPILER_IS_GNUCC)
   if (CMAKE_BUILD_TYPE MATCHES Debug)
     set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -finline-functions -fno-common")
-  else (CMAKE_BUILD_TYPE MATCHES Debug)
+  else ()
     set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common")
-  endif (CMAKE_BUILD_TYPE MATCHES Debug)
-endif (CMAKE_COMPILER_IS_GNUCC)
+  endif ()
+endif ()
 if (CMAKE_COMPILER_IS_GNUCXX)
   if (CMAKE_BUILD_TYPE MATCHES Debug)
     set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -finline-functions -fno-common")
-  else (CMAKE_BUILD_TYPE MATCHES Debug)
+  else ()
     set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common")
-  endif (CMAKE_BUILD_TYPE MATCHES Debug)
-endif (CMAKE_COMPILER_IS_GNUCXX)
+  endif ()
+endif ()
 
 #-----------------------------------------------------------------------------
 # Option to allow the user to disable compiler warnings
@@ -481,22 +485,22 @@ if (HDF4_DISABLE_COMPILER_WARNINGS)
     set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /w")
     string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
     set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /w")
-  endif (MSVC)
+  endif ()
   if (WIN32)
     add_definitions (-D_CRT_SECURE_NO_WARNINGS)
-  endif (WIN32)
+  endif ()
   # Borland uses -w- to suppress warnings.
   if (BORLAND)
     set (HDF4_WARNINGS_BLOCKED 1)
     set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
-  endif (BORLAND)
+  endif ()
 
   # Most compilers use -w to suppress warnings.
   if (NOT HDF4_WARNINGS_BLOCKED)
     set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
     set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
-  endif (NOT HDF4_WARNINGS_BLOCKED)
-endif (HDF4_DISABLE_COMPILER_WARNINGS)
+  endif ()
+endif ()
 
 #-----------------------------------------------------------------------------
 # This is in here to help some of the GCC based IDES like Eclipse
@@ -504,10 +508,10 @@ endif (HDF4_DISABLE_COMPILER_WARNINGS)
 #-----------------------------------------------------------------------------
 if (CMAKE_COMPILER_IS_GNUCC)
   set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0")
-endif (CMAKE_COMPILER_IS_GNUCC)
+endif ()
 if (CMAKE_COMPILER_IS_GNUCXX)
   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0")
-endif (CMAKE_COMPILER_IS_GNUCXX)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Option to Enable MPI Parallel
@@ -526,18 +530,18 @@ if (HDF4_ENABLE_PARALLEL)
     # Used by Fortran + MPI
     CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "${MPI_C_INCLUDE_PATH}/mpi.h"  H4_HAVE_MPI_MULTI_LANG_Comm)
     CHECK_SYMBOL_EXISTS (MPI_Info_c2f "${MPI_C_INCLUDE_PATH}/mpi.h"  H4_HAVE_MPI_MULTI_LANG_Info)
-  else (MPI_C_FOUND)
+  else ()
     message (STATUS "Parallel libraries not found")
-  endif (MPI_C_FOUND)
-endif (HDF4_ENABLE_PARALLEL)
+  endif ()
+endif ()
 
 # Parallel IO usage requires MPI to be Linked and Included
 if (H4_HAVE_PARALLEL)
   set (LINK_LIBS ${LINK_LIBS} ${MPI_C_LIBRARIES})
   if (MPI_C_LINK_FLAGS)
     set (CMAKE_EXE_LINKER_FLAGS "${MPI_C_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
-  endif (MPI_C_LINK_FLAGS)
-endif (H4_HAVE_PARALLEL)
+  endif ()
+endif ()
 
 #-----------------------------------------------------------------------------
 # Include user macros
@@ -558,17 +562,17 @@ if (NOT HDF4_EXTERNALLY_CONFIGURED)
     set (HDF4_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
     if (HDF4_ENABLE_JPEG_LIB_SUPPORT AND JPEG_FOUND)
       PACKAGE_JPEG_LIBRARY (${HDF4_ALLOW_EXTERNAL_SUPPORT})
-    endif (HDF4_ENABLE_JPEG_LIB_SUPPORT AND JPEG_FOUND)
+    endif ()
 
     if (HDF4_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
       PACKAGE_ZLIB_LIBRARY (${HDF4_ALLOW_EXTERNAL_SUPPORT})
-    endif (HDF4_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
+    endif ()
 
     if (HDF4_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
       PACKAGE_SZIP_LIBRARY (${HDF4_ALLOW_EXTERNAL_SUPPORT})
-    endif (HDF4_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
-  endif (HDF4_PACKAGE_EXTLIBS)
-endif (NOT HDF4_EXTERNALLY_CONFIGURED)
+    endif ()
+  endif ()
+endif ()
 
 #-----------------------------------------------------------------------------
 # Option to build HDF4 xdr Library
@@ -576,11 +580,23 @@ endif (NOT HDF4_EXTERNALLY_CONFIGURED)
 option (HDF4_BUILD_XDR_LIB  "Build HDF4 XDR Library" OFF)
 if (WIN32 AND NOT MINGW)
   set (HDF4_BUILD_XDR_LIB ON CACHE BOOL "Build HDF4 XDR Library" FORCE)
-endif (WIN32 AND NOT MINGW)
+else ()
+  include (FindXDR)
+  if (XDR_FOUND)
+    set (CMAKE_REQUIRED_LIBRARIES "${XDR_LIBRARIES}" )
+    message (STATUS "HDF4 XDR Library found: ${XDR_LIBRARIES}")
+    set (LINK_LIBS ${LINK_LIBS} ${XDR_LIBRARIES})
+    set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${XDR_LIBRARIES})
+    include_directories(${XDR_INCLUDE_DIRS})
+  else ()
+    set (HDF4_BUILD_XDR_LIB ON CACHE BOOL "Build HDF4 XDR Library" FORCE)
+    message (STATUS "HDF4 XDR Library will be built")
+  endif ()
+endif ()
 
 if (HDF4_BUILD_XDR_LIB)
   add_subdirectory (${HDF4_SOURCE_DIR}/mfhdf/xdr ${PROJECT_BINARY_DIR}/xdr)
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Add the HDF4 Library Target to the build
@@ -588,33 +604,33 @@ endif (HDF4_BUILD_XDR_LIB)
 add_subdirectory (${HDF4_SOURCE_DIR}/hdf/src    ${PROJECT_BINARY_DIR}/hdf/src )
 add_subdirectory (${HDF4_SOURCE_DIR}/mfhdf/libsrc   ${PROJECT_BINARY_DIR}/mfhdf/libsrc)
 
-if (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+if (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
   if (JPEG_FOUND AND JPEG_USE_EXTERNAL)
     add_dependencies (${HDF4_SRC_LIB_TARGET} JPEG)
     if (BUILD_SHARED_LIBS)
       add_dependencies (${HDF4_SRC_LIBSH_TARGET} JPEG)
-    endif (BUILD_SHARED_LIBS)
-  endif (JPEG_FOUND AND JPEG_USE_EXTERNAL)
+    endif ()
+  endif ()
   if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
     add_dependencies (${HDF4_SRC_LIB_TARGET} ZLIB)
     if (BUILD_SHARED_LIBS)
       add_dependencies (${HDF4_SRC_LIBSH_TARGET} ZLIB)
-    endif (BUILD_SHARED_LIBS)
-  endif (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
+    endif ()
+  endif ()
   if (SZIP_FOUND AND SZIP_USE_EXTERNAL)
     add_dependencies (${HDF4_SRC_LIB_TARGET} SZIP)
     if (BUILD_SHARED_LIBS)
       add_dependencies (${HDF4_SRC_LIBSH_TARGET} SZIP)
-    endif (BUILD_SHARED_LIBS)
-  endif (SZIP_FOUND AND SZIP_USE_EXTERNAL)
-endif (HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF4_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+    endif ()
+  endif ()
+endif ()
 
 if (HDF4_BUILD_XDR_LIB)
   add_dependencies (${HDF4_MF_LIB_TARGET} ${HDF4_MF_XDR_LIB_TARGET})
   if (BUILD_SHARED_LIBS)
     add_dependencies (${HDF4_MF_LIBSH_TARGET} ${HDF4_MF_XDR_LIBSH_TARGET})
-  endif (BUILD_SHARED_LIBS)
-endif (HDF4_BUILD_XDR_LIB)
+  endif ()
+endif ()
 
 #-----------------------------------------------------------------------------
 # Dashboard and Testing Settings
@@ -634,12 +650,12 @@ if (BUILD_TESTING)
   if (NOT HDF4_EXTERNALLY_CONFIGURED)
     if (EXISTS "${HDF4_SOURCE_DIR}/hdf/test" AND IS_DIRECTORY "${HDF4_SOURCE_DIR}/hdf/test")
       add_subdirectory (${HDF4_SOURCE_DIR}/hdf/test   ${PROJECT_BINARY_DIR}/hdf/test)
-    endif (EXISTS "${HDF4_SOURCE_DIR}/hdf/test" AND IS_DIRECTORY "${HDF4_SOURCE_DIR}/hdf/test")
+    endif ()
     if (EXISTS "${HDF4_SOURCE_DIR}/mfhdf/test" AND IS_DIRECTORY "${HDF4_SOURCE_DIR}/mfhdf/test")
       add_subdirectory (${HDF4_SOURCE_DIR}/mfhdf/test ${PROJECT_BINARY_DIR}/mfhdf/test)
-    endif (EXISTS "${HDF4_SOURCE_DIR}/mfhdf/test" AND IS_DIRECTORY "${HDF4_SOURCE_DIR}/mfhdf/test")
-  endif (NOT HDF4_EXTERNALLY_CONFIGURED)
-endif (BUILD_TESTING)
+    endif ()
+  endif ()
+endif ()
 
 #-----------------------------------------------------------------------------
 # Option to build Fortran bindings/tests/examples
@@ -655,18 +671,18 @@ if (EXISTS "${HDF4_SOURCE_DIR}/mfhdf/fortran" AND IS_DIRECTORY "${HDF4_SOURCE_DI
     if (WIN32)
       set (H4_F77_FUNC "H4_F77_FUNC(name,NAME) NAME")
       set (H4_F77_FUNC_ "H4_F77_FUNC_(name,NAME) NAME")
-    endif (WIN32)
+    endif ()
     include (${HDF_RESOURCES_DIR}/HDF4UseFortran.cmake)
     add_subdirectory (${HDF4_SOURCE_DIR}/mfhdf/fortran ${PROJECT_BINARY_DIR}/mfhdf/fortran)
     add_subdirectory (${HDF4_SOURCE_DIR}/hdf/fortran ${PROJECT_BINARY_DIR}/hdf/fortran)
-  endif (HDF4_BUILD_FORTRAN)
-endif (EXISTS "${HDF4_SOURCE_DIR}/mfhdf/fortran" AND IS_DIRECTORY "${HDF4_SOURCE_DIR}/mfhdf/fortran")
+  endif ()
+endif ()
 
 if (MSVC OR MINGW)
   set (H4_HDSETVBUF "HDsetvbuf(F,S,M,Z) (((Z)>1)?setvbuf(F,S,M,Z):setvbuf(F,S,M,2))")
-else (MSVC OR MINGW)
+else ()
   set (H4_HDSETVBUF "NOP")
-endif (MSVC OR MINGW)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Library utilities
@@ -683,16 +699,16 @@ if (EXISTS "${HDF4_SOURCE_DIR}/mfhdf/examples" AND IS_DIRECTORY "${HDF4_SOURCE_D
     if (HDF4_BUILD_FORTRAN)
       if (EXISTS "${HDF4_SOURCE_DIR}/hdf/fortran/examples" AND IS_DIRECTORY "${HDF4_SOURCE_DIR}/hdf/fortran/examples")
         add_subdirectory (${HDF4_SOURCE_DIR}/hdf/fortran/examples     ${PROJECT_BINARY_DIR}/hdf/fortran/examples)
-      endif (EXISTS "${HDF4_SOURCE_DIR}/hdf/fortran/examples" AND IS_DIRECTORY "${HDF4_SOURCE_DIR}/hdf/fortran/examples")
+      endif ()
       if (EXISTS "${HDF4_SOURCE_DIR}/mfhdf/fortran/examples" AND IS_DIRECTORY "${HDF4_SOURCE_DIR}/mfhdf/fortran/examples")
         add_subdirectory (${HDF4_SOURCE_DIR}/mfhdf/fortran/examples     ${PROJECT_BINARY_DIR}/mfhdf/fortran/examples)
-      endif (EXISTS "${HDF4_SOURCE_DIR}/mfhdf/fortran/examples" AND IS_DIRECTORY "${HDF4_SOURCE_DIR}/mfhdf/fortran/examples")
-    endif (HDF4_BUILD_FORTRAN)
+      endif ()
+    endif ()
 
     add_subdirectory (${HDF4_SOURCE_DIR}/hdf/examples    ${PROJECT_BINARY_DIR}/hdf/examples)
     add_subdirectory (${HDF4_SOURCE_DIR}/mfhdf/examples    ${PROJECT_BINARY_DIR}/mfhdf/examples)
-  endif (HDF4_BUILD_EXAMPLES)
-endif (EXISTS "${HDF4_SOURCE_DIR}/mfhdf/examples" AND IS_DIRECTORY "${HDF4_SOURCE_DIR}/mfhdf/examples")
+  endif ()
+endif ()
 
 #-----------------------------------------------------------------------------
 # Option to build HDF4 Java Library
@@ -701,8 +717,8 @@ if (EXISTS "${HDF4_SOURCE_DIR}/java" AND IS_DIRECTORY "${HDF4_SOURCE_DIR}/java")
   option (HDF4_BUILD_JAVA  "Build Java HDF Library" OFF)
   if (HDF4_BUILD_JAVA)
     add_subdirectory (${HDF4_SOURCE_DIR}/java ${PROJECT_BINARY_DIR}/java)
-  endif (HDF4_BUILD_JAVA)
-endif (EXISTS "${HDF4_SOURCE_DIR}/java" AND IS_DIRECTORY "${HDF4_SOURCE_DIR}/java")
+  endif ()
+endif ()
 
 #-----------------------------------------------------------------------------
 # Generate the H4config.h file containing user settings needed by compilation
diff --git a/COPYING b/COPYING
index ecd09c0..2123b80 100644
--- a/COPYING
+++ b/COPYING
@@ -4,7 +4,7 @@ Hierarchical Data Format (HDF) Software Library and Utilities
 ---------------------------------------------------------------------------
 
 Hierarchical Data Format (HDF) Software Library and Utilities
-Copyright 2006-2016 by The HDF Group.
+Copyright 2006 by The HDF Group.
 
 NCSA Hierarchical Data Format (HDF) Software Library and Utilities
 Copyright 1988-2006 by the Board of Trustees of the University of Illinois.
diff --git a/CTestConfig.cmake b/CTestConfig.cmake
index ae5da48..38a6e4c 100644
--- a/CTestConfig.cmake
+++ b/CTestConfig.cmake
@@ -9,24 +9,23 @@ set (CTEST_NIGHTLY_START_TIME "18:00:00 CST")
 
 set (CTEST_DROP_METHOD "http")
 if (CDASH_LOCAL)
-  set (CTEST_DROP_SITE "10.10.10.82")
+  set (CTEST_DROP_SITE "cdash-internal.hdfgroup.org")
   set (CTEST_DROP_LOCATION "/submit.php?project=HDF4")
-else (CDASH_LOCAL)
+else ()
   set (CTEST_DROP_SITE "cdash.hdfgroup.org")
   set (CTEST_DROP_LOCATION "/submit.php?project=HDF4")
-endif (CDASH_LOCAL)
+endif ()
 set (CTEST_DROP_SITE_CDASH TRUE)
 
-set (UPDATE_TYPE svn)
+set (UPDATE_TYPE git)
 
 set (VALGRIND_COMMAND "/usr/bin/valgrind")
 set (VALGRIND_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
 
-set (CTEST_TEST_TIMEOUT 3600 CACHE STRING 
-    "Maximum time allowed before CTest will kill the test.") 
-set (DART_TESTING_TIMEOUT 3600 CACHE STRING 
+set (CTEST_TEST_TIMEOUT 3600 CACHE STRING
+    "Maximum time allowed before CTest will kill the test.")
+set (DART_TESTING_TIMEOUT 3600 CACHE STRING
     "Maximum time allowed before CTest will kill the test." FORCE)
 
 set (CTEST_SUBMIT_RETRY_DELAY 20 CACHE STRING
     "How long to wait between timed-out CTest submissions.")
-    
\ No newline at end of file
diff --git a/MANIFEST b/MANIFEST
index ee3c6bd..a280ed1 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -5,10 +5,10 @@
 #
 # This file is part of HDF.  The full HDF 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
-# http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have
-# access to either file, you may request a copy from help at hdfgroup.org.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
 #------------------------------------------------------------------------------
 #
 # This is the list of files that are part of HDF4 source distribution.
@@ -19,6 +19,8 @@
 #------------------------------------------------------------------------------
 
 
+./.gitattributes       _DO_NOT_DISTRIBUTE_
+./.gitignore           _DO_NOT_DISTRIBUTE_
 ./MANIFEST
 ./COPYING
 ./Makefile.am
@@ -78,6 +80,10 @@
 ./bin/yodconfigure
 ./bin/h4vers
 ./bin/release
+./bin/pkgscrpts/h4rmflags                  _DO_NOT_DISTRIBUTE_
+./bin/pkgscrpts/makeHDF4BinaryTarfiles.pl  _DO_NOT_DISTRIBUTE_
+./bin/pkgscrpts/makeInternalhdf4README.pl  _DO_NOT_DISTRIBUTE_
+./bin/pkgscrpts/makeOuterhdf4README.pl     _DO_NOT_DISTRIBUTE_
 
 ./config/BlankForm
 ./config/aix
@@ -1138,11 +1144,12 @@
 ./UserMacros.cmake
 
 ./config/cmake/cacheinit.cmake
+./config/cmake/CMakeFindJavaCommon.cmake
 ./config/cmake/ConfigureChecks.cmake
 ./config/cmake/CPack.Info.plist.in
 ./config/cmake/CTestCustom.cmake
-./config/cmake/FindHDF4.cmake.in
 ./config/cmake/FindJNI.cmake
+./config/cmake/FindXDR.cmake
 ./config/cmake/h4config.h.in
 ./config/cmake/HDF4_Examples.cmake.in
 ./config/cmake/hdf4-config-version.cmake.in
@@ -1177,13 +1184,19 @@
 ./config/cmake_ext_mod/HDFUseFortran.cmake
 ./config/cmake_ext_mod/NSIS.InstallOptions.ini.in
 ./config/cmake_ext_mod/NSIS.template.in
-./config/cmake_ext_mod/prunTest.cmake
 ./config/cmake_ext_mod/runTest.cmake
 ./config/cmake_ext_mod/version.plist.in
 
 # CMake-specific User Files
 ./config/cmake/UserMacros/Windows_MT.cmake
 
+# CMake-specific User Scripts
+./config/cmake/CTestScript.cmake
+./config/cmake/HDF4_Examples_options.cmake
+./config/cmake/scripts/CTestScript.cmake
+./config/cmake/scripts/HDF4config.cmake
+./config/cmake/scripts/HDF4options.cmake
+
 ./release_notes/HISTORY.txt
 ./release_notes/RELEASE.txt
 ./release_notes/INSTALL
diff --git a/Makefile b/Makefile
index 6bbb361..49d9528 100644
--- a/Makefile
+++ b/Makefile
@@ -4,12 +4,12 @@
 # Copyright by the Board of Trustees of the University of Illinois.
 # All rights reserved.
 #
-# This file is part of HDF.  The full HDF 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      
-# http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have 
-# access to either file, you may request a copy from help at hdfgroup.org.     
+# This file is part of HDF.  The full HDF copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
 
 
 # This Makefile is a stub (copied from Makefile.dist) which will run
diff --git a/Makefile.dist b/Makefile.dist
index 6bbb361..49d9528 100644
--- a/Makefile.dist
+++ b/Makefile.dist
@@ -4,12 +4,12 @@
 # Copyright by the Board of Trustees of the University of Illinois.
 # All rights reserved.
 #
-# This file is part of HDF.  The full HDF 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      
-# http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have 
-# access to either file, you may request a copy from help at hdfgroup.org.     
+# This file is part of HDF.  The full HDF copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
 
 
 # This Makefile is a stub (copied from Makefile.dist) which will run
diff --git a/Makefile.in b/Makefile.in
index 67dc12b..72f713d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -302,6 +302,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/README.txt b/README.txt
index 4feb53b..a8943c5 100644
--- a/README.txt
+++ b/README.txt
@@ -1,4 +1,4 @@
-HDF version 4.2.12 released on 2016-06-29
+HDF version 4.2.13 released on 2017-06-24
 ===================================================
 
 Information about HDF
@@ -6,17 +6,17 @@ Information about HDF
 
  The HDF (or HDF4) home page is located here:
 
-    https://www.hdfgroup.org/products/hdf4/index.html  
+    https://support.hdfgroup.org/products/hdf4/
 
  The most recent version of the software can be obtained from:
 
-    https://www.hdfgroup.org/release4/obtain.html
+    https://support.hdfgroup.org/release4/obtain.html
 
  The HDF documentation can be found in:
 
-    https://www.hdfgroup.org/release4/doc.html 
+    https://support.hdfgroup.org/release4/doc/index.html
+
 
-     
 Source Distribution Layout
 --------------------------
 
@@ -35,6 +35,8 @@ Source Distribution Layout
 
    java   -- The Java HDF JNI library
 
+   m4     -- Autotools macros and libtool files for building with autotools.
+
    mfhdf  -- The netCDF(mfhdf) part of the HDF/mfhdf distribution and
              additional HDF utilities, such as hdp, hrepack, hdfimport, etc.
 
@@ -64,6 +66,6 @@ System Requirements
 
 Configuring/Testing/Installing 
 ------------------------------
- See the INSTALL file for instructions on configuring, testing, 
+ See the file release_notes/INSTALL for instructions on configuring, testing,
  and installing this software on Unix and non-UNIX systems.
 
diff --git a/UserMacros.cmake b/UserMacros.cmake
index 65ea5d4..4593753 100644
--- a/UserMacros.cmake
+++ b/UserMacros.cmake
@@ -9,14 +9,13 @@
 #-----------------------------------------------------------------------------
 MACRO (MACRO_USER_DEFINED_LIBS)
   set (USER_DEFINED_VALUE "FALSE")
-ENDMACRO (MACRO_USER_DEFINED_LIBS)
+ENDMACRO ()
 
 #-------------------------------------------------------------------------------
 option (BUILD_USER_DEFINED_LIBS "Build With User Defined Values" OFF)
 if (BUILD_USER_DEFINED_LIBS)
   MACRO_USER_DEFINED_LIBS ()
-endif (BUILD_USER_DEFINED_LIBS)
+endif ()
 #-----------------------------------------------------------------------------
 #------------------- E X A M P L E   E N D -----------------------------------
 #-----------------------------------------------------------------------------
- 
\ No newline at end of file
diff --git a/bin/chkmanifest b/bin/chkmanifest
index da4a98a..b6afcc5 100755
--- a/bin/chkmanifest
+++ b/bin/chkmanifest
@@ -12,69 +12,9 @@
 verbose=yes
 MANIFEST=/tmp/HD_MANIFEST.$$
 SVNENTRY=/tmp/HD_SVNENTRY.$$
-USE_SVN_LS=""
 
 # function definitions
 
-GETSVNENTRIES_13 ()
-# Purpose: Extract filenames from the svn v1.3.* entries file
-# $1: directory name in which the svn entries is.
-# steps:
-# 1. remove all single line entries so that step 2 does not fail on them. 
-# 2. merge all multiple lines entries into single lines.
-# 3. remove all non file entries.
-# 4. insert a blank line because some entries files has no kind="file"
-#    entry and ed does not like to do g on an empty file.
-# 5. remove everything except the file name.
-# 6. remove all blank lines, including the inserted one.
-{
-cp $1/entries $SVNENTRY
-chmod u+w $SVNENTRY	# entries file is not writable.
-ed - $SVNENTRY <<EOF
-g/^<.*>$/d
-g/^</.,/>$/j
-v/kind="file"/d
-a
-
-.
-g/.*name="/s///
-g/".*/s///
-g/^$/d
-w
-q
-EOF
-cat $SVNENTRY
-rm $SVNENTRY
-}
-
-GETSVNENTRIES_14 ()
-# Purpose: Extract filenames from the svn v1.4.* entries file
-# $1: directory name in which the svn entries is.
-# steps:
-# 1. all valid files are followed by a line containing "file" only.
-# 2. find them by looking for "file" first, then mark its preceding line as
-#    wanted.
-# 3. remove all non-marked line.
-# 4. insert a blank line because some entries files has no kind="file"
-#    entry and ed does not like to do g on an empty file.
-# 5. remove the marks.
-{
-cp $1/entries $SVNENTRY
-chmod u+w $SVNENTRY	# entries file is not writable.
-ed - $SVNENTRY <<EOF
-g/^file$/-s/^/%WANTED%/
-v/%WANTED%/d
-a
-
-.
-g/^%WANTED%/s///
-w
-q
-EOF
-cat $SVNENTRY
-rm $SVNENTRY
-}
-
 
 # Main
 test "$verbose" && echo "   Checking MANIFEST..." 1>&2
@@ -124,55 +64,22 @@ for file in `cat $MANIFEST`; do
     fi
 done
 
-# Inspect the .svn/entries to figure out what version of svn file entry is
-# used.
-# The following algorithm is formed via reverse engineering.
-# I don't know what the official svn format is if such a specification exists.
-# Algorithm:
-# If the first line of the file has 'xml version="1.0"' in it, it is created
-# by svn 1.3 or older; else if it has '^file$' in it, it is created by 
-# svn 1.4 - 1.6.  Otherwise it is assumed to be newer, and 'svn ls -R'
-# will give a list of checked in files.
-svn_entry_file=.svn/entries
-if head -1 $svn_entry_file | grep 'xml version="1.0"' > /dev/null 2>&1;then
-    getsvnentries=GETSVNENTRIES_13
-elif grep '^file$' $svn_entry_file > /dev/null 2>&1; then
-    getsvnentries=GETSVNENTRIES_14
-else
-    USE_SVN_LS="yes"
-#    echo "Unknown svn entries format. Aborted"
-#    exit 1
-fi
 
-if [ -z "${USE_SVN_LS}" ]; then
-    for svn in `find . -type d -name .svn -print`; do
-        path=`echo $svn |sed 's/\/.svn//'`
-        for file in `$getsvnentries $svn`; do
-       	    if (grep ^$path/$file$ $MANIFEST >/dev/null); then
-    	        :
-       	    else
-       	        echo "+ $path/$file"
-                fail=yes
-            fi
-        done
-    done
-else
-    # Next check svn ls, which gets a list of all files that are
-    # checked in.
-    svn_ls=`svn ls -R`
-    for file in $svn_ls; do
-        path="./${file}"
-        # Ignore directories
-        if [ ! -d $path ]; then
-            if (grep ^$path$ $MANIFEST >/dev/null); then
-                :
-            else
-                echo "+ $path"
-                fail=yes
-            fi
+# Next check git ls-files, which gets a list of all files that are
+# checked in and staged to be committed.
+git_ls=`git ls-files`
+for file in $git_ls; do
+    path="./${file}"
+    # Ignore directories
+    if [ ! -d $path ]; then
+        if (grep ^$path$ $MANIFEST >/dev/null); then
+            :
+        else
+            echo "+ $path"
+            fail=yes
         fi
-    done
-fi
+    fi
+done
 
 if [ "X$fail" = "Xyes" ]; then
     cat 1>&2 <<EOF
diff --git a/bin/cmakehdf4 b/bin/cmakehdf4
index 85174ce..61319cb 100755
--- a/bin/cmakehdf4
+++ b/bin/cmakehdf4
@@ -4,7 +4,7 @@
 #         Albert Cheng
 # Creation Date: Nov 2012
 # Modified:
-#	Changed to use the quick steps described in INSTALL_CMake.txt. (AKC 2014/1/7)
+#    Changed to use the quick steps described in INSTALL_CMake.txt. (AKC 2014/1/7)
 
 # Copyright: The HDF Group, 2012-14
 
@@ -17,7 +17,7 @@ if [ "$1" != "--script" ]; then
 # variable names
 # The "extra" number is the step number and easier to see all logfiles in
 # the sorted order of steps
-progname=`basename $0`	# program name
+progname=`basename $0`    # program name
 configlog="#${progname}_1config.log"
 makelog="#${progname}_2build.log"
 testlog="#${progname}_3test.log"
@@ -30,7 +30,7 @@ exit_code=0
 # "bin/$progname". So, by striping bin/$program from $0,
 # we can find $srcdir.
 if [ $0 == bin/$progname ]; then
-    srcdir="."		# current directory
+    srcdir="."        # current directory
 else
     # $0 is $srdir/bin/$progname
     srcdir=`echo $0 | sed -e s%/bin/$progname\$%%`
@@ -74,12 +74,12 @@ STEP()
 
     echo "$banner" with output saved in $logfile
     (TIMESTAMP; nerror=0 ;
-	echo "eval $command"
-	eval $command || nerror=1 ;
-	TIMESTAMP; exit $nerror) < /dev/null >> "$logfile" 2>&1
+    echo "eval $command"
+    eval $command || nerror=1 ;
+    TIMESTAMP; exit $nerror) < /dev/null >> "$logfile" 2>&1
     if [ $? -ne 0 ]; then
-	echo "error in '$banner'.  $progname aborted."
-	exit 1
+    echo "error in '$banner'.  $progname aborted."
+    exit 1
     fi
 }
 
@@ -115,16 +115,16 @@ echo Running Cmake for HDF4-${version} ...
 
 #      4. Configure the C library, tools and tests with this command:
 STEP "Configure..." "cmake -C $srcdir/config/cmake/cacheinit.cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX:PATH="$PWD" -DHDF4_ALLOW_EXTERNAL_SUPPORT:STRING="" -DHDF4_PACKAGE_EXTLIBS:BOOL=OFF -DHDF4_BUILD_TOOLS:BOOL=ON -DHDF4_BUILD_UTILS:BOOL=ON -DBUILD_TESTING:BOOL=ON $srcdir" $configlog
-      
+
 #      5. Build the C library, tools and tests with this command:
 STEP "Build the library, tools and tests, ..." "cmake --build . --config Release" $makelog
-      
+
 #      6. Test the C library and tools with this command:
 STEP "Test the library and tools..." "ctest . -C Release" $testlog
-      
+
 #      7. Create an install image with this command:
 STEP "Create an install image..." "cpack -C Release CPackConfig.cmake" $packlog
-      
+
 #      8. Install with this command:
 STEP "Install..." "./HDF-${version}-Linux.sh --skip-license" $installlog
 # save the last exit code
@@ -140,9 +140,9 @@ else
 # ---------------
 
 # variable names
-progname=`basename $0`	# program name
+progname=`basename $0`    # program name
 cminfile="cmakemin.$$" # Cmake minimum file
-cfgfile=$progname.$$	# configure file
+cfgfile=$progname.$$    # configure file
 ctest_log=ctest.log    # output of ctest script
 install_log=install.log  # output of installation
 $DPRINT $cfgfile
@@ -190,7 +190,7 @@ EOF
 #==========
 #==========
 cat > $cfgfile <<'EOF'
-cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR)
 ########################################################
 # This dashboard is maintained by The HDF Group
 # For any comments please contact cdashhelp at hdfgroup.org
@@ -201,11 +201,11 @@ set (CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
 set (CTEST_SOURCE_DIRECTORY "../hdf4")
 set (CTEST_BINARY_DIRECTORY ".")
 set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
-set (CTEST_BUILD_CONFIGURATION "Release")
+set (CTEST_CONFIGURATION_TYPE "Release")
 set (CTEST_MAX_N 8)
 
 # -- CDash variables
-set (LOCAL_NO_SUBMIT TRUE)	# No CDash submit.
+set (LOCAL_NO_SUBMIT TRUE)    # No CDash submit.
 set (MODEL "Experimental")
 set (CDASH_LOCAL TRUE)
 set (SITE_BUILDNAME_SUFFIX "cmakehdf4")
@@ -213,7 +213,7 @@ set (SITE_BUILDNAME_SUFFIX "cmakehdf4")
 # -- URL set for internal check, default is to not update
 set (LOCAL_SKIP_UPDATE TRUE)
 set (REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf4/trunk")
-# -- Standard build options  
+# -- Standard build options
 set (ADD_BUILD_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=${CTEST_BINARY_DIRECTORY} -DHDF4_ALLOW_EXTERNAL_SUPPORT:STRING=\"SVN\" -DHDF4_PACKAGE_EXTLIBS:BOOL=ON")
 
 # Use multiple CPU cores to build
@@ -222,14 +222,14 @@ ProcessorCount(N)
 if(NOT N EQUAL 0)
   if(N GREATER ${CTEST_MAX_N})
     set(N ${CTEST_MAX_N})
-  endif(N GREATER ${CTEST_MAX_N})
+  endif()
   set(CTEST_BUILD_FLAGS -j${N})
   set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
 endif()
 
-# -----------------------------------------------------------  
+# -----------------------------------------------------------
 # -- Get environment
-# -----------------------------------------------------------  
+# -----------------------------------------------------------
   ## -- set hostname
   ## --------------------------
   find_program (HOSTNAME_CMD NAMES hostname)
@@ -246,13 +246,13 @@ endif()
 
   if (SITE_BUILDNAME_SUFFIX)
     set (CTEST_BUILD_NAME  "${osname}-${osrel}-${cpu}-${SITE_BUILDNAME_SUFFIX}")
-  else (SITE_BUILDNAME_SUFFIX)
+  else ()
     set (CTEST_BUILD_NAME  "${osname}-${osrel}-${cpu}")
-  endif (SITE_BUILDNAME_SUFFIX)
-# -----------------------------------------------------------  
-  
+  endif ()
+# -----------------------------------------------------------
+
 set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
- 
+
 #-----------------------------------------------------------------------------
 # MAC machines need special option
 #-----------------------------------------------------------------------------
@@ -262,20 +262,20 @@ if (APPLE)
   execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
   SET(ENV{CC} "${XCODE_CC}")
   SET(ENV{CXX} "${XCODE_CXX}")
-  # Shared fortran is not supported, build static 
+  # Shared fortran is not supported, build static
   set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_JPEG_WITH_PIC:BOOL=ON -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
   set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
-endif (APPLE)
+endif ()
 
 
-# -----------------------------------------------------------  
+# -----------------------------------------------------------
 find_package (Subversion)
 set (CTEST_UPDATE_COMMAND "${Subversion_SVN_EXECUTABLE}")
-# -- Only clean build folder if LOCAL_CLEAR_BUILD is set  
+# -- Only clean build folder if LOCAL_CLEAR_BUILD is set
 if (LOCAL_CLEAR_BUILD)
   set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
   ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
-endif (LOCAL_CLEAR_BUILD)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Send the main script as a note.
@@ -292,18 +292,18 @@ foreach (req
     )
   if (NOT DEFINED ${req})
     message(FATAL_ERROR "The containing script must set ${req}")
-  endif (NOT DEFINED ${req})
-endforeach (req)
+  endif (})
+endforeach ()
 
 ## -- set output to english
 set($ENV{LC_MESSAGES}  "en_EN")
- 
+
 #-----------------------------------------------------------------------------
 # Initialize the CTEST commands
 #------------------------------
 set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
 set (CTEST_CONFIGURE_COMMAND
-    "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"")
+    "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"")
 
 # Print summary information.
 foreach (v
@@ -312,18 +312,18 @@ foreach (v
     CTEST_SOURCE_DIRECTORY
     CTEST_BINARY_DIRECTORY
     CTEST_CMAKE_GENERATOR
-    CTEST_BUILD_CONFIGURATION
+    CTEST_CONFIGURATION_TYPE
     CTEST_CONFIGURE_COMMAND
     CTEST_SCRIPT_DIRECTORY
     )
   set (vars "${vars}  ${v}=[${${v}}]\n")
-endforeach (v)
+endforeach ()
 message ("Dashboard script configuration:\n${vars}\n")
 
 CTEST_START (${MODEL} TRACK ${MODEL})
 if (NOT LOCAL_SKIP_UPDATE)
   CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
-endif (NOT LOCAL_SKIP_UPDATE)
+endif ()
 CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
 if(NOT res STREQUAL "0")
   message (FATAL_ERROR "Configure FAILED")
@@ -332,11 +332,11 @@ message ("Configure DONE")
 CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}")
 if (NOT LOCAL_NO_SUBMIT)
   CTEST_SUBMIT (PARTS Update Configure Notes)
-endif (NOT LOCAL_NO_SUBMIT)
+endif ()
 CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res)
 if (NOT LOCAL_NO_SUBMIT)
   CTEST_SUBMIT (PARTS Build)
-endif (NOT LOCAL_NO_SUBMIT)
+endif ()
 if(NOT res STREQUAL "0")
   message (FATAL_ERROR "Build FAILED")
 endif()
@@ -345,24 +345,24 @@ if (NOT LOCAL_SKIP_TEST)
   CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
   if (NOT LOCAL_NO_SUBMIT)
     CTEST_SUBMIT (PARTS Test)
-  endif (NOT LOCAL_NO_SUBMIT)
+  endif ()
   if(NOT res STREQUAL "0")
     message (FATAL_ERROR "Test FAILED")
   endif()
   message ("test DONE")
-endif (NOT LOCAL_SKIP_TEST)
+endif ()
 if(NOT LOCAL_MEMCHECK_TEST)
   ##-----------------------------------------------
   ## Package the product
   ##-----------------------------------------------
-  execute_process(COMMAND cpack -C ${CTEST_BUILD_CONFIGURATION} -V
+  execute_process(COMMAND cpack -C ${CTEST_CONFIGURATION_TYPE} -V
     WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
     RESULT_VARIABLE cpackResult
     OUTPUT_VARIABLE cpackLog
     ERROR_VARIABLE cpackLog.err
   )
   file(WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
-endif(NOT LOCAL_MEMCHECK_TEST)
+endif()
 #-----------------------------------------------------------------------------
 
 message ("DONE")
diff --git a/bin/h4_release_check.sh b/bin/h4_release_check.sh
index 0bdd439..00823a1 100755
--- a/bin/h4_release_check.sh
+++ b/bin/h4_release_check.sh
@@ -160,7 +160,7 @@ else
   echo "Testing for bin files     ... $green PASSED $reset"
 fi
 
-# Check settings in libhdf5.settings match what is in RELEASE.txt
+# Check settings in libhdf4.settings match what is in RELEASE.txt
 
 # Check the OS type
 
@@ -198,7 +198,7 @@ if grep -i -q "$OStype" RELEASE.txt; then
  echo ""
                                               
 
-    echo "$yellow  (1) VERIFY: C Compiler in libhdf5.settings: $reset"
+    echo "$yellow  (1) VERIFY: C Compiler in libhdf4.settings: $reset"
     echo "  $libCC"
     echo "$yellow              should match a compiler listed in RELEASE.txt $reset"
     line_end=$line_start-2
@@ -224,7 +224,7 @@ echo ""
 
 
 echo ""
-echo "$yellow  (3) VERIFY: Binary executables match libhdf5.settings $reset"
+echo "$yellow  (3) VERIFY: Binary executables match libhdf4.settings $reset"
 
 echo `echo "    Result from ${magenta}file bin/hdp${reset}:  "; file bin/hdp`
 echo `echo "    Result from lib/libhdf4.settings:  "; echo ${UnameInfo}`
diff --git a/bin/h4vers b/bin/h4vers
index ef5f200..56d2fe1 100755
--- a/bin/h4vers
+++ b/bin/h4vers
@@ -10,18 +10,18 @@ use strict;
 # Copyright by the Board of Trustees of the University of Illinois.
 # All rights reserved.
 #
-# This file is part of HDF.  The full HDF 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      
-# http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have 
-# access to either file, you may request a copy from help at hdfgroup.org.     
+# This file is part of HDF.  The full HDF copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
 #
 #
 # Robb Matzke <matzke at llnl.gov>
 # 17 July 1998
 #
-# HDF4 alterations 
+# HDF4 alterations
 # Larry Knox <lrknox at hdfgroup.org>
 # 25 September 2009
 
@@ -73,7 +73,7 @@ use strict;
 #
 #Following paragraph from h5vers does not apply for HDF4?
 # Whenever the version changes, this script will increment the revision
-# field in HDF5's libtool shared library version in config/lt_vers.am,
+# field in HDF4's libtool shared library version in config/lt_vers.am,
 # which is included in src/Makefile.am.  Incrementing the revision field
 # indicates that the source code has changed since the last version
 # (which it probably has).
@@ -170,10 +170,11 @@ die "mutually exclusive options given\n" if $set && $inc;
 #print "File array is ", @files;
 
 # Determine file to use as hfile.h, README.txt,
-# release_notes/RELEASE.txt, configure.in, windows/hdf/src/hfile.h.
-# The README.txt, release_notes/RELEASE.txt, configure.ac, 
-# and windows/hdf/src/hfile.h files are always in the directory 
-# two levels above hfile.h.
+# release_notes/RELEASE.txt, configure.in,
+# and config/cmake/scripts/HDF4config.cmake.
+# The paths to README.txt, release_notes/RELEASE.txt, configure.ac, 
+# and config/cmake/scripts/HDF4config.cmake
+# files are always from the directory two levels above hfile.h.
 unless ($file) {
   for (@files) {
     ($file=$_,last) if -f $_;
@@ -187,6 +188,13 @@ die "unable to read file: $file\n" unless -r $file;
 #my $LT_VERS = $file;
 #$LT_VERS =~ s/[^\/]*$/..\/config\/lt_vers.am/;
 #die "unable to read file: $LT_VERS\n" unless -r $file;
+# config/cmake/scripts/HDF5config.cmake
+my $HDF4CONFIGCMAKE = $file;
+$HDF4CONFIGCMAKE =~ s/[^\/]*$/..\/..\/config\/cmake\/scripts\/HDF4config.cmake/;
+die "unable to read file: $HDF4CONFIGCMAKE\n" unless -r $file;
+my $H4_JAVA = $file;
+$H4_JAVA =~ s/[^\/]*$/..\/..\/java\/src\/hdf\/hdflib\/HDFLibrary.java/;
+die "unable to read file: $H4_JAVA\n" unless -r $file;
 # README.txt
 my $README = $file;
 $README =~ s/[^\/]*$/..\/..\/README.txt/;
@@ -257,6 +265,8 @@ if ($set) {
   $RELEASE = "";
   $CONFIGURE = "";
   $MANHDF1 = "";
+  $HDF4CONFIGCMAKE = "";
+  $H4_JAVA = "";
   @newver = @curver;
 }
 
@@ -303,6 +313,33 @@ if ($newver[0]!=$curver[0] ||
 #  close FILE;
 #}
 
+# Update the config/cmake/scripts/HDF4config.cmake file
+if ($HDF4CONFIGCMAKE) {
+  my $data = read_file($HDF4CONFIGCMAKE);
+#  my $sub_rel_ver_str = "";
+  my $sub_rel_ver_str = (
+     $newver[3] eq ""
+     ? sprintf("\"%s\"", "")
+     : sprintf("\"%s\"", "-".$newver[3].", currently under development")
+     );
+  my $version_string = sprintf("\"%d.%d.%d\"", @newver[0,1,2]);
+
+  $data =~ s/set \(CTEST_SOURCE_VERSION .*\)/set \(CTEST_SOURCE_VERSION $version_string\)/;
+  $data =~ s/set \(CTEST_SOURCE_VERSEXT .*\)/set \(CTEST_SOURCE_VERSEXT $sub_rel_ver_str\)/;
+
+  write_file($HDF4CONFIGCMAKE, $data);
+}
+
+# Update the java/src/hdf/hdf5lib/HDFLibrary.java file
+if ($H4_JAVA) {
+  my $data = read_file($H4_JAVA);
+  my $version_string = sprintf("%d.%d.%d", @newver[0,1,2]);
+
+  $data =~ s/    public final static String JHI_VERSION = "\d*.\d*.\d*";/    public final static String JHI_VERSION = "$version_string";/;
+
+  write_file($H4_JAVA, $data);
+}
+
 # Update the README file
 if ($README) {
   open FILE, $README or die "$README: $!\n";
@@ -347,6 +384,7 @@ if ($MANHDF1) {
   open FILE, $MANHDF1 or die "$MANHDF1: $!\n";
   my @contents = <FILE>;
   close FILE;
+
   my @months = ('January', 'February', 'March', 'April', 'May', 'June', 'July',
                 'August', 'September', 'October', 'November', 'December');
   my @date = (localtime(time));
@@ -385,6 +423,37 @@ if ($MANHDF1) {
   }
 }
 
+# helper function to read the file for updating
+# config/cmake/scripts/HDF4Config.cmake and 
+# java/src/hdf/hdf5lib/HDFLibrary.java files.
+# The version string in those files is not at the top, so the string replacement
+# is not for the first line, and reading/writing the entire file as one string
+# facilitates the substring replacement.
+sub read_file {
+   my ($filename) = @_;
+
+    open my $in, $filename or die "Could not open '$filename' for reading $!";
+    local $/ = undef;
+    my $all = <$in>;
+    close $in;
+
+    return $all;
+}
+
+# helper function to write the file for updating 
+# config/cmake/scripts/HDF4config.cmake and 
+# java/src/hdf/hdf5lib/HDFLibrary.java files.
+sub write_file {
+    my ($filename, $content) = @_;
+
+    open my $out, ">$filename" or die "Could not open '$filename' for writing $!";;
+    print $out $content;
+    close $out;
+
+    return;
+}
+
+
 sub gen_configure {
   my ($name, $conf) = @_;
 
diff --git a/bin/locate_sw b/bin/locate_sw
index bb291a6..900958f 100755
--- a/bin/locate_sw
+++ b/bin/locate_sw
@@ -14,7 +14,7 @@
 USAGE()
 {
     echo "Usage: locate_sw <SW-Name>"
-    echo "    where <SW-Name> can be hdf4, hdf5, zlib"
+    echo "    where <SW-Name> can be hdf4, hdf4, zlib"
     echo "    It prints the paths leading the header files (include),"
     echo "    library (lib), and tools (bin).   E.g.,"
     echo "    /usr/sdt/include:/usr/sdt/lib:/usr/sdt/bin"
@@ -107,10 +107,10 @@ for sw in $swpaths; do
 done
 }
 
-# locate hdf5 software
-locate_hdf5()
+# locate hdf4 software
+locate_hdf4()
 {
-# this default is the best guess of locating hdf5 software
+# this default is the best guess of locating hdf4 software
 swpaths_defaults="/usr/ncsa /usr/sdt /usr/local"
 swpaths=
 
@@ -118,7 +118,7 @@ case "$OSname" in
     SunOS)
         case "$OSrelease" in
             5.7)
-               swpaths="/afs/ncsa/packages/hdf5/SunOS_5.7"
+               swpaths="/afs/ncsa/packages/hdf4/SunOS_5.7"
                ;;
 	    *)
             # use default
@@ -128,7 +128,7 @@ case "$OSname" in
     HP-UX)
         case "$OSrelease" in
 	   B.11.00)
-	        swpaths="/afs/ncsa/packages/hdf5/HPUX_11.00"
+	        swpaths="/afs/ncsa/packages/hdf4/HPUX_11.00"
                ;;
            *)
            # use default
@@ -136,7 +136,7 @@ case "$OSname" in
         esac
 	;;
     IRIX)
-	swpaths="/afs/ncsa/packages/hdf5/IRIX_6.5"
+	swpaths="/afs/ncsa/packages/hdf4/IRIX_6.5"
 	;;
     IRIX64)
 	case "$CC" in
@@ -144,49 +144,49 @@ case "$OSname" in
 	    abi=`cc -show_defaults 2>&1 | grep 'default abi'`
 	    case $abi in
 	    *-n32)
-		swpaths="/afs/ncsa/packages/hdf5/IRIX64-n32_6.5"
+		swpaths="/afs/ncsa/packages/hdf4/IRIX64-n32_6.5"
 		;;
 	    *-64)
-		#swpaths="/afs/ncsa/packages/hdf5/IRIX64_6.5"
-                swpaths="/afs/ncsa/packages/hdf5/5-1.4.3-irix64"
+		#swpaths="/afs/ncsa/packages/hdf4/IRIX64_6.5"
+                swpaths="/afs/ncsa/packages/hdf4/5-1.4.3-irix64"
 		;;
 	    *)
-		#swpaths="/afs/ncsa/packages/hdf5/IRIX64_6.5"
-                swpaths="/afs/ncsa/packages/hdf5/5-1.4.3-irix64"  
+		#swpaths="/afs/ncsa/packages/hdf4/IRIX64_6.5"
+                swpaths="/afs/ncsa/packages/hdf4/5-1.4.3-irix64"  
 		;;
 	    esac	# $abi
 	    ;;
 	*-n32)
-	    swpaths="/afs/ncsa/packages/hdf5/IRIX64-n32_6.5"
+	    swpaths="/afs/ncsa/packages/hdf4/IRIX64-n32_6.5"
 	    ;;
 	*)
-	    #swpaths="/afs/ncsa/packages/hdf5/IRIX64_6.5"
-            swpaths="/afs/ncsa/packages/hdf5/5-1.4.3-irix64"
+	    #swpaths="/afs/ncsa/packages/hdf4/IRIX64_6.5"
+            swpaths="/afs/ncsa/packages/hdf4/5-1.4.3-irix64"
 	    ;;
 	esac
 	;;
     Linux)
-	swpaths="/afs/ncsa/packages/hdf5/Linux"
+	swpaths="/afs/ncsa/packages/hdf4/Linux"
 	;;
     FreeBSD)
-        swpaths="/afs/ncsa/packages/hdf5/FreeBSD"
+        swpaths="/afs/ncsa/packages/hdf4/FreeBSD"
         ;;
     OSF1)
-	swpaths="/afs/ncsa/packages/hdf5/OSF1_V4.0"
+	swpaths="/afs/ncsa/packages/hdf4/OSF1_V4.0"
 	;;
     *)
 	# just use the defaults
 	;;
 esac
 
-# Check if the hdf5 software is actually available.
+# Check if the hdf4 software is actually available.
 # Accept the directory only if needed .h, .a and tools are found
 # in the same place.  That way, they are more likely to be of the
 # same version.
 # 
 swpaths="$swpaths $swpaths_defaults"
 for sw in $swpaths; do
-    if [ -r $sw/include/hdf5.h -a -r $sw/lib/libhdf5.a -a -r $sw/bin/h5dump ]; then
+    if [ -r $sw/include/hdf4.h -a -r $sw/lib/libhdf4.a -a -r $sw/bin/h5dump ]; then
 	SW_inc=$sw/include
 	SW_lib=$sw/lib
 	SW_bin=$sw/bin
@@ -260,8 +260,8 @@ case $SW in
 hdf4|hdf)
     locate_hdf4
     ;;
-hdf5)
-    locate_hdf5
+hdf4)
+    locate_hdf4
     ;;
 zlib)
     locate_zlib
diff --git a/bin/newer b/bin/newer
index 8ed9f87..9d7a438 100755
--- a/bin/newer
+++ b/bin/newer
@@ -4,14 +4,12 @@
 # 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
+# This file is part of HDF.  The full HDF 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 at hdfgroup.org.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
 #
 # Compare the modification time of file argument 1 against other file arguments.
 # Return true (0) if argument 1 is newer than all others, otherwise return
diff --git a/bin/reconfigure b/bin/reconfigure
index 5276e74..580382a 100755
--- a/bin/reconfigure
+++ b/bin/reconfigure
@@ -6,7 +6,7 @@
 
 # A script to run the GNU autotools to regenerate files for HDF4.
 # If the paths of the autotools are not specified by the user, they
-# are hardcoded to point to their locations on HDF5 Linux machines.
+# are hardcoded to point to their locations on HDF4 Linux machines.
 # Users can specify the locations of the autotools with the following
 # variables:
 # AUTOCONF, AUTOMAKE, ACLOCAL, AUTOHEADER should be the path to the
diff --git a/bin/release b/bin/release
index 8e9516d..bab3f28 100755
--- a/bin/release
+++ b/bin/release
@@ -4,14 +4,12 @@
 # Copyright by the Board of Trustees of the University of Illinois.
 # All rights reserved.
 #
-# This file is part of HDF4.  The full HDF4 copyright notice, including
+# This file is part of HDF.  The full HDF 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 HDF4 document set and
-# is linked from the top-level documents page.  It can also be found at
-# http://hdfgroup.org/HDF4/doc/Copyright.html.  If you do not have
-# access to either file, you may request a copy from help at hdfgroup.org.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
 #
 
 # Make a release of hdf4.
@@ -33,6 +31,11 @@
 #
 #   James Laird, 2005-09-07
 #   Added the md5 method.
+#
+#   Larry Knox, 2017-06-16
+#   Added cmake-tgz and cmake-zip methods
+#   Replaced optional md5 method with automatic md5 checksum generation for
+#   all archives (from hdf5 release script)
 
 # Function definitions
 #
@@ -53,26 +56,35 @@ for compressing the resulting tar archive (if none are given then
 "tar md5" is assumed):
     tar		-- use tar and don't do any compressing.
     gzip	-- use gzip with "-9" and append ".gz" to the output name.
+    cmake-tgz   -- create a tar file using the gzip default level with a 
+                   build-unix.sh command file and all other CMake files needed 
+                   to build HDF4 source using CMake on unix machines.
     bzip2       -- use bzip2 with "-9" and append ".bz2" to the output name.
-    zip		-- convert all text files to DOS style and form a zip file for Windows use.
-    md5         -- produce a md5 checksum in addition to the archive.
+    zip		-- convert all text files to DOS style and form a zip file for 
+                   Windows use.
+    cmake-zip   -- convert all text files to DOS style and create a zip file 
+                   including cmake scripts and .bat files to build HDF4 source 
+                   using CMake on Windows.
+
+An md5 checksum is produced for each archive created and stored in the md5 file.
 
 Examples:
 
     $ bin/release -d /tmp
     /tmp/hdf-4.2.11-RELEASE.txt
+    /tmp/hdf-4.2.11.md5
     /tmp/hdf-4.2.11.tar
-    /tmp/hdf-4.2.11.tar.md5
 
     $ bin/release -d /tmp gzip
     /tmp/hdf-4.2.11-RELEASE.txt
+    /tmp/hdf-4.2.11.md5
     /tmp/hdf-4.2.11.tar.gz
 
-    $ bin/release -d /tmp tar gzip zip md5
+    $ bin/release -d /tmp tar gzip zip
     /tmp/hdf-4.2.11-RELEASE.txt
+    /tmp/hdf-4.2.11.md5
     /tmp/hdf-4.2.11.tar
     /tmp/hdf-4.2.11.tar.gz
-    /tmp/hdf-4.2.11.tar.md5
     /tmp/hdf-4.2.11.zip
 
 EOF
@@ -146,7 +158,177 @@ tar2zip()
     rm -rf $ztmpdir
 }
 
-# This command must be run at the top level of the hdf5 source directory.
+# Function name: tar2cmakezip
+# Convert the release tarball to a Windows zipball with files to run CMake build.
+#
+# Programmer: Larry Knox
+# Creation date: 2017-02-20
+#
+# Modifications
+#
+# Steps:
+# 1. untar the tarball in a temporary directory;
+#    Note: do this in a temporary directory to avoid changing
+#    the original source directory which may be around.
+# 2. add build-unix.sh script.
+# 3. add SZIP.tar.gz, ZLib.tar.gz and cmake files to top level directory.
+# 4. create gzipped tar file with these contents:
+#        build-unix.sh          script
+#        hdf4-<version>         source code directory extracted from tar file
+#        CTestScript.cmake      cmake file copied from <hdf4 source code>/config/cmake/scripts
+#        HDF4config.cmake       cmake file copied from <hdf4 source code>/config/cmake/scripts
+#        HDF4options.cmake      cmake file copied from <hdf4 source code>/config/cmake/scripts
+#        SZip.tar.gz            copied from /mnt/scr1/pre-release/hdf4/CMake
+#        ZLib.tar.gz            copied from /mnt/scr1/pre-release/hdf4/CMake
+#        JPEG8d.tar.gz            copied from /mnt/scr1/pre-release/hdf4/CMake
+
+
+# Parameters:
+# $1 version
+# $2 release tarball
+# $3 output zipball file name
+#
+# Returns 0 if successful; 1 otherwise
+#
+
+tar2cmakezip()
+{
+    if [ $# -ne 3 ]; then
+        echo "usage: tar2cmakezip <tarfilename> <zipfilename>"
+        return 1
+    fi
+    cmziptmpdir=/tmp/cmziptmpdir
+    cmziptmpsubdir=$cmziptmpdir/CMake-$HDF4_VERS
+    mkdir -p $cmziptmpsubdir
+    version=$1
+    tarfile=$2
+    zipfile=$3
+
+    # step 1: untar tarball in cmgztmpdir
+    (cd $cmziptmpsubdir; tar xf -) < $tarfile
+    # sanity check
+    if [ ! -d $cmziptmpsubdir/$version ]; then
+        echo "untar did not create $cmziptmpsubdir/$version source dir"
+        # cleanup
+        rm -rf $cmziptmpdir
+        return 1
+    fi
+
+    # step 2: add batch file for building CMake on window
+    (cd $cmziptmpsubdir; echo "ctest -S HDF4config.cmake,BUILD_GENERATOR=VS2012 -C Release -V -O hdf4.log" > build-VS2012-32.bat; chmod 755 build-VS2012-32.bat)
+    (cd $cmziptmpsubdir; echo "ctest -S HDF4config.cmake,BUILD_GENERATOR=VS201264 -C Release -V -O hdf4.log" > build-VS2012-64.bat; chmod 755 build-VS2012-64.bat)
+    (cd $cmziptmpsubdir; echo "ctest -S HDF4config.cmake,BUILD_GENERATOR=VS2013 -C Release -V -O hdf4.log" > build-VS2013-32.bat; chmod 755 build-VS2013-32.bat)
+    (cd $cmziptmpsubdir; echo "ctest -S HDF4config.cmake,BUILD_GENERATOR=VS201364 -C Release -V -O hdf4.log" > build-VS2013-64.bat; chmod 755 build-VS2013-64.bat)
+    (cd $cmziptmpsubdir; echo "ctest -S HDF4config.cmake,BUILD_GENERATOR=VS2015 -C Release -V -O hdf4.log" > build-VS2015-32.bat; chmod 755 build-VS2015-32.bat)
+    (cd $cmziptmpsubdir; echo "ctest -S HDF4config.cmake,BUILD_GENERATOR=VS201564 -C Release -V -O hdf4.log" > build-VS2015-64.bat; chmod 755 build-VS2015-32.bat)
+
+    # step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files
+    cp /mnt/scr1/pre-release/hdf4/CMake/SZip.tar.gz $cmziptmpsubdir
+    cp /mnt/scr1/pre-release/hdf4/CMake/ZLib.tar.gz $cmziptmpsubdir
+    cp /mnt/scr1/pre-release/hdf4/CMake/JPEG8d.tar.gz $cmziptmpsubdir
+    cp $cmziptmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmziptmpsubdir
+    cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF4config.cmake $cmziptmpsubdir
+    cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF4options.cmake $cmziptmpsubdir
+
+    # step 4: convert text files
+    # There maybe a simpler way to do this.
+    # options used in unix2dos:
+    # -k   Keep the date stamp
+    # -q   quiet mode
+    # grep redirect output to /dev/null because -q or -s are not portable.
+    find $cmziptmpsubdir/$version | \
+        while read inf; do \
+            if file $inf | grep "$inf\: .*text" > /dev/null 2>&1 ; then \
+                unix2dos -q -k $inf; \
+            fi\
+        done
+    # step 3: make zipball
+    # -9 maximum compression
+    # -y Store symbolic links as such in the zip archive
+    # -r recursive
+    # -q quiet
+    (cd $cmziptmpdir; zip -9 -y -r -q CMake-$version.zip *)
+    mv $cmziptmpdir/CMake-$version.zip $zipfile
+
+    # cleanup
+    rm -rf $cmziptmpdir
+}
+
+# Function name: tar2cmaketgz
+# Convert the release tarball to a Windows zipball with files to run CMake build.
+#
+# Programmer: Larry Knox
+# Creation date: 2017-02-20
+#
+# Modifications
+#
+# Steps:
+# 1. untar the tarball in a temporary directory;
+#    Note: do this in a temporary directory to avoid changing
+#    the original source directory which may be around.
+# 2. add build-unix.sh script.
+# 3. add SZIP.tar.gz, ZLib.tar.gz and cmake files to top level directory.
+# 4. create gzipped tar file with these contents:
+#        build-unix.sh          script
+#        hdf4-<version>         source code directory extracted from tar file
+#        CTestScript.cmake      cmake file copied from <hdf4 source code>/config/cmake/scripts
+#        HDF4config.cmake       cmake file copied from <hdf4 source code>/config/cmake/scripts
+#        HDF4options.cmake      cmake file copied from <hdf4 source code>/config/cmake/scripts
+#        SZip.tar.gz            copied from /mnt/scr1/pre-release/hdf4/CMake
+#        ZLib.tar.gz            copied from /mnt/scr1/pre-release/hdf4/CMake
+#        JPEG8d.tar.gz            copied from /mnt/scr1/pre-release/hdf4/CMake
+
+
+# Parameters:
+# $1 version
+# $2 release tarball
+# $3 output zipball file name
+#
+# Returns 0 if successful; 1 otherwise
+#
+
+tar2cmaketgz()
+{
+    if [ $# -ne 3 ]; then
+        echo "usage: tar2cmaketgz <tarfilename> <tgzfilename>"
+        return 1
+    fi
+    cmgztmpdir=/tmp/cmgztmpdir$$
+    cmgztmpsubdir=$cmgztmpdir/CMake-$HDF4_VERS
+    mkdir -p $cmgztmpsubdir
+    version=$1
+    tarfile=$2
+    tgzfile=$3
+
+    # step 1: untar tarball in cmgztmpdir
+    (cd $cmgztmpsubdir; tar xf -) < $tarfile
+    # sanity check
+    if [ ! -d $cmgztmpsubdir/$version ]; then
+        echo "untar did not create $cmgztmpdir/$version source dir"
+        # cleanup
+        rm -rf $cmgztmpdir
+        return 1
+    fi
+
+
+    # step 2: add build-unix.sh script
+    (cd $cmgztmpsubdir; echo "ctest -S HDF4config.cmake,BUILD_GENERATOR=Unix -C Release -V -O hdf4.log" > build-unix.sh; chmod 755 build-unix.sh)
+
+    # step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files
+    cp /mnt/scr1/pre-release/hdf4/CMake/SZip.tar.gz $cmgztmpsubdir
+    cp /mnt/scr1/pre-release/hdf4/CMake/ZLib.tar.gz $cmgztmpsubdir
+    cp /mnt/scr1/pre-release/hdf4/CMake/JPEG8d.tar.gz $cmgztmpsubdir
+    cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir
+    cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF4config.cmake $cmgztmpsubdir
+    cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF4options.cmake $cmgztmpsubdir
+    tar czf $DEST/CMake-$HDF4_VERS.tar.gz -C $cmgztmpdir . || exit 1
+
+    # cleanup
+    rm -rf $cmgztmpdir
+}
+
+
+# This command must be run at the top level of the hdf4 source directory.
 # Verify this requirement.
 if [ ! \( -f configure -a -f bin/release \) ]; then
     echo "$0 must be run at the top level of the hdf4 source directory"
@@ -280,27 +462,39 @@ test "$verbose" && echo "   Running tar..." 1>&2
 )
 
 # Compress
+MD5file=$HDF4_VERS.md5
+cp /dev/null $DEST/$MD5file
 for comp in $methods; do
     case $comp in
 	tar)
 	    cp -p $tmpdir/$HDF4_VERS.tar $DEST/$HDF4_VERS.tar
+            (cd $DEST; md5sum $HDF4_VERS.tar >> $MD5file)
 	    ;;
 	gzip)
 	    test "$verbose" && echo "   Running gzip..." 1>&2
 	    gzip -9 <$tmpdir/$HDF4_VERS.tar >$DEST/$HDF4_VERS.tar.gz
+            (cd $DEST; md5sum $HDF4_VERS.tar.gz >> $MD5file)
 	    ;;
+        cmake-tgz)
+            test "$verbose" && echo "   Creating CMake tar.gz file..." 1>&2
+            tar2cmaketgz $HDF4_VERS $tmpdir/$HDF4_VERS.tar $DEST/CMake-$HDF4_VERS.tar.gz 1>&2
+            (cd $DEST; md5sum CMake-$HDF4_VERS.tar.gz >> $MD5file)
+            ;;
 	bzip2)
 	    test "$verbose" && echo "   Running bzip2..." 1>&2
 	    bzip2 -9 <$tmpdir/$HDF4_VERS.tar >$DEST/$HDF4_VERS.tar.bz2
+            (cd $DEST; md5sum $HDF4_VERS.tar.bz2 >> $MD5file)
 	    ;;
 	zip)
 	    test "$verbose" && echo "   Creating zip ball..." 1>&2
 	    tar2zip $HDF4_VERS $tmpdir/$HDF4_VERS.tar $DEST/$HDF4_VERS.zip 1>&2
+            (cd $DEST; md5sum $HDF4_VERS.zip >> $MD5file)
 	    ;;
-	md5)
-	    test "$verbose" && echo "   Creating checksum..." 1>&2
-	    (cd $tmpdir; md5sum $HDF4_VERS.tar ) > $DEST/$HDF4_VERS.tar.md5
-	    ;;
+        cmake-zip)
+            test "$verbose" && echo "   Creating CMake-zip ball..." 1>&2
+            tar2cmakezip $HDF4_VERS $tmpdir/$HDF4_VERS.tar $DEST/CMake-$HDF4_VERS.zip 1>&2
+            (cd $DEST; md5sum CMake-$HDF4_VERS.zip >> $MD5file)
+            ;;
 	*)
 	    echo "***Error*** Unknown method $comp"
 	    exit 1
diff --git a/bin/yodconfigure b/bin/yodconfigure
index 039d01c..1fbe6e6 100755
--- a/bin/yodconfigure
+++ b/bin/yodconfigure
@@ -3,14 +3,12 @@
 # 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
+# This file is part of HDF.  The full HDF 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://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html.  If you do not have
-# access to either file, you may request a copy from hdfhelp at ncsa.uiuc.edu.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
 
 # Fix configure file so that it can launch configure testing executable
 # via the proper launching command, e.g., yod.  (Thus the name yodconfigure
diff --git a/config/cmake/CMakeFindJavaCommon.cmake b/config/cmake/CMakeFindJavaCommon.cmake
new file mode 100644
index 0000000..eabb622
--- /dev/null
+++ b/config/cmake/CMakeFindJavaCommon.cmake
@@ -0,0 +1,30 @@
+# Distributed under the OSI-approved BSD 3-Clause License.  See https://cmake.org/licensing for details.
+
+
+# Do not include this module directly from code outside CMake!
+set(_JAVA_HOME "")
+if(JAVA_HOME AND IS_DIRECTORY "${JAVA_HOME}")
+  set(_JAVA_HOME "${JAVA_HOME}")
+  set(_JAVA_HOME_EXPLICIT 1)
+else()
+  set(_ENV_JAVA_HOME "")
+  if(DEFINED ENV{JAVA_HOME})
+    file(TO_CMAKE_PATH "$ENV{JAVA_HOME}" _ENV_JAVA_HOME)
+  endif()
+  if(_ENV_JAVA_HOME AND IS_DIRECTORY "${_ENV_JAVA_HOME}")
+    set(_JAVA_HOME "${_ENV_JAVA_HOME}")
+    set(_JAVA_HOME_EXPLICIT 1)
+  else()
+    set(_CMD_JAVA_HOME "")
+    if(APPLE AND EXISTS /usr/libexec/java_home)
+      execute_process(COMMAND /usr/libexec/java_home
+        OUTPUT_VARIABLE _CMD_JAVA_HOME OUTPUT_STRIP_TRAILING_WHITESPACE)
+    endif()
+    if(_CMD_JAVA_HOME AND IS_DIRECTORY "${_CMD_JAVA_HOME}")
+      set(_JAVA_HOME "${_CMD_JAVA_HOME}")
+      set(_JAVA_HOME_EXPLICIT 0)
+    endif()
+    unset(_CMD_JAVA_HOME)
+  endif()
+  unset(_ENV_JAVA_HOME)
+endif()
diff --git a/config/cmake/CTestScript.cmake b/config/cmake/CTestScript.cmake
new file mode 100755
index 0000000..e5d8042
--- /dev/null
+++ b/config/cmake/CTestScript.cmake
@@ -0,0 +1,156 @@
+cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR)
+########################################################
+# For any comments please contact cdashhelp at hdfgroup.org
+#
+########################################################
+# -----------------------------------------------------------
+# -- Get environment
+# -----------------------------------------------------------
+if (NOT SITE_OS_NAME)
+  ## machine name not provided - attempt to discover with uname
+  ## -- set hostname
+  ## --------------------------
+  find_program (HOSTNAME_CMD NAMES hostname)
+  exec_program (${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
+  set (CTEST_SITE  "${HOSTNAME}${CTEST_SITE_EXT}")
+  find_program (UNAME NAMES uname)
+  macro (getuname name flag)
+    exec_program ("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
+  endmacro ()
+
+  getuname (osname -s)
+  getuname (osrel  -r)
+  getuname (cpu    -m)
+  message (STATUS "Dashboard script uname output: ${osname}-${osrel}-${cpu}\n")
+
+  set (CTEST_BUILD_NAME  "${osname}-${osrel}-${cpu}")
+  if (SITE_BUILDNAME_SUFFIX)
+    set (CTEST_BUILD_NAME  "${SITE_BUILDNAME_SUFFIX}-${CTEST_BUILD_NAME}")
+  endif ()
+  set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS}")
+else ()
+  ## machine name provided
+  ## --------------------------
+  if (CMAKE_HOST_UNIX)
+    set(CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_OS_BITS}-${SITE_COMPILER_NAME}-${SITE_COMPILER_VERSION}")
+  else ()
+    set(CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_COMPILER_NAME}")
+  endif ()
+  if (SITE_BUILDNAME_SUFFIX)
+    set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX}")
+  endif ()
+  set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
+endif ()
+
+#-----------------------------------------------------------------------------
+# MAC machines need special option
+#-----------------------------------------------------------------------------
+if (APPLE)
+  # Compiler choice
+  execute_process (COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
+  execute_process (COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
+  set (ENV{CC} "${XCODE_CC}")
+  set (ENV{CXX} "${XCODE_CXX}")
+
+  if (NOT NO_MAC_FORTRAN)
+    # Shared fortran is not supported, build static
+    set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
+  else ()
+    set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+  endif ()
+
+  set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
+endif ()
+
+#-----------------------------------------------------------------------------
+set (NEED_REPOSITORY_CHECKOUT 0)
+set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
+if (CTEST_USE_TAR_SOURCE)
+  ## Uncompress source if tar or zip file provided
+  ## --------------------------
+  if (WIN32)
+    message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip]")
+    execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
+  else ()
+    message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar]")
+    execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
+  endif ()
+
+  if (NOT rv EQUAL 0)
+    message (STATUS "extracting... [error-(${rv}) clean up]")
+    file (REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
+    message (FATAL_ERROR "error: extract of ${CTEST_USE_TAR_SOURCE} failed")
+  endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
+## Clear the build directory
+## --------------------------
+set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
+if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+  ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
+else ()
+  file (MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+endif ()
+
+# Use multiple CPU cores to build
+include (ProcessorCount)
+ProcessorCount (N)
+if (NOT N EQUAL 0)
+  if (NOT WIN32)
+    set (CTEST_BUILD_FLAGS -j${N})
+  endif ()
+  set (ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
+endif ()
+
+#-----------------------------------------------------------------------------
+# Initialize the CTEST commands
+#------------------------------
+set(CTEST_CONFIGURE_TOOLSET  "")
+if(CMAKE_GENERATOR_TOOLSET)
+  set(CTEST_CONFIGURE_TOOLSET  "-T${CMAKE_GENERATOR_TOOLSET}")
+endif()
+set (CTEST_CONFIGURE_COMMAND
+    "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
+)
+#-----------------------------------------------------------------------------
+
+#-----------------------------------------------------------------------------
+## -- set output to english
+set ($ENV{LC_MESSAGES}  "en_EN")
+
+#-----------------------------------------------------------------------------
+  configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
+  ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
+#-----------------------------------------------------------------------------
+  ## NORMAL process
+  ## -- LOCAL_SUBMIT reports to CDash server
+  ## --------------------------
+  ctest_start (Experimental)
+  ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+  if (LOCAL_SUBMIT)
+    ctest_submit (PARTS Configure Notes)
+  endif ()
+  if (${res} LESS 0 OR ${res} GREATER 0)
+    file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n")
+  endif ()
+
+  ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res NUMBER_ERRORS errval)
+  if (LOCAL_SUBMIT)
+    ctest_submit (PARTS Build)
+  endif ()
+  if (${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0)
+    file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed ${errval} Build: ${res}\n")
+  endif ()
+
+  ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
+  if (LOCAL_SUBMIT)
+    ctest_submit (PARTS Test)
+  endif()
+  if (${res} LESS 0 OR ${res} GREATER 0)
+    file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
+  endif ()
+  if (${res} LESS 0 OR ${res} GREATER 0)
+    message (FATAL_ERROR "tests FAILED")
+  endif ()
+#-----------------------------------------------------------------------------
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index aa0010c..cff9959 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -10,10 +10,4 @@ include (${HDF_RESOURCES_EXT_DIR}/ConfigureChecks.cmake)
 option (HDF4_ENABLE_NETCDF "Build HDF4 versions of NetCDF-3 APIS" ON)
 if (HDF4_ENABLE_NETCDF)
   set (${HDF_PREFIX}_HAVE_NETCDF 1)
-endif (HDF4_ENABLE_NETCDF)
-
-if (CYGWIN)
-  CHECK_LIBRARY_EXISTS_CONCAT ("tirpc" xdr_opaque     ${${HDF_PREFIX}}_HAVE_RPC)
-  CHECK_INCLUDE_FILE_CONCAT ("rpc/types.h"     ${HDF_PREFIX}_HAVE_RPC_TYPES_H)
-  CHECK_INCLUDE_FILE_CONCAT ("rpc/xdr.h"     ${HDF_PREFIX}_HAVE_RPC_XDR_H)
-endif (CYGWIN)
+endif ()
diff --git a/config/cmake/FindHDF4.cmake.in b/config/cmake/FindHDF4.cmake.in
deleted file mode 100644
index 0976b39..0000000
--- a/config/cmake/FindHDF4.cmake.in
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# To be used by projects that make use of CMakeified hdf- at HDF4_PACKAGE_VERSION@
-#
-
-#
-# Find the HDF4 includes and get all installed hdf4 library settings from
-# HDF4-config.cmake file : Requires a CMake compatible hdf- at HDF4_PACKAGE_VERSION@ or later 
-# for this feature to work. The following vars are set if hdf4 is found.
-#
-# HDF4_FOUND               - True if found, otherwise all other vars are undefined
-# HDF4_INCLUDE_DIR         - The include dir for main *.h files
-# HDF4_FORTRAN_INCLUDE_DIR - The include dir for fortran modules and headers
-# HDF4_VERSION_STRING      - full version (e.g. @HDF4_PACKAGE_VERSION@)
-# HDF4_VERSION_MAJOR       - major part of version (e.g. @HDF4_PACKAGE_VERSION_MAJOR@)
-# HDF4_VERSION_MINOR       - minor part (e.g. @HDF4_PACKAGE_VERSION_MINOR@)
-# 
-# The following boolean vars will be defined
-# HDF4_ENABLE_PARALLEL - 1 if HDF4 parallel supported
-# HDF4_BUILD_FORTRAN   - 1 if HDF4 was compiled with fortran on
-# HDF4_BUILD_CPP_LIB   - 1 if HDF4 was compiled with cpp on
-# HDF4_BUILD_TOOLS     - 1 if HDF4 was compiled with tools on
-# 
-# Target names that are valid (depending on enabled options)
-# will be the following
-#
-# hdf              : HDF4 C library
-# hdf_f90cstub     : used by Fortran to C interface
-# hdf_fortran      : Fortran HDF4 library
-# mfhdf            : HDF4 multi-file C interface library
-# xdr              : RPC library
-# mfhdf_f90cstub   : used by Fortran to C interface to multi-file library
-# mfhdf_fortran    : Fortran multi-file library
-# 
-# To aid in finding HDF4 as part of a subproject set
-# HDF4_ROOT_DIR_HINT to the location where @HDF4_PACKAGE@@HDF_PACKAGE_EXT at -config.cmake lies
-
-include (SelectLibraryConfigurations)
-include (FindPackageHandleStandardArgs)
-
-# The HINTS option should only be used for values computed from the system.
-set (_HDF4_HINTS
-    $ENV{HOME}/.local
-    $ENV{HDF4_ROOT}
-    $ENV{HDF4_ROOT_DIR_HINT}
-)
-# Hard-coded guesses should still go in PATHS. This ensures that the user
-# environment can always override hard guesses.
-set (_HDF4_PATHS
-    $ENV{HOME}/.local
-    $ENV{HDF4_ROOT}
-    $ENV{HDF4_ROOT_DIR_HINT}
-    /usr/lib/@HDF4_PACKAGE@
-    /usr/share/@HDF4_PACKAGE@
-    /usr/local/@HDF4_PACKAGE@
-    /usr/local/@HDF4_PACKAGE@/share
-)
-
-FIND_PATH (HDF4_ROOT_DIR "@HDF4_PACKAGE@@HDF_PACKAGE_EXT at -config.cmake"
-    HINTS ${_HDF4_HINTS}
-    PATHS ${_HDF4_PATHS}
-    PATH_SUFFIXES
-        cmake/@HDF4_PACKAGE@
-        lib/cmake/@HDF4_PACKAGE@
-        share/cmake/@HDF4_PACKAGE@
-)
-
-FIND_PATH (HDF4_INCLUDE_DIRS "hdf.h"
-    HINTS ${_HDF4_HINTS}
-    PATHS ${_HDF4_PATHS}
-    PATH_SUFFIXES
-        include
-        Include
-)
-
-# For backwards compatibility we set HDF4_INCLUDE_DIR to the value of
-# HDF4_INCLUDE_DIRS
-set ( HDF4_INCLUDE_DIR "${HDF4_INCLUDE_DIRS}" )
-
-if (HDF4_INCLUDE_DIR)
-  set (HDF4_FOUND "YES")
-  include (${HDF4_ROOT_DIR}/@HDF4_PACKAGE@@HDF_PACKAGE_EXT at -config.cmake)
-endif (HDF4_INCLUDE_DIR)
diff --git a/config/cmake/FindJNI.cmake b/config/cmake/FindJNI.cmake
index 440a988..1e6daf6 100644
--- a/config/cmake/FindJNI.cmake
+++ b/config/cmake/FindJNI.cmake
@@ -1,3 +1,5 @@
+# Distributed under the OSI-approved BSD 3-Clause License.  See https://cmake.org/licensing for details.
+
 #.rst:
 # FindJNI
 # -------
@@ -22,19 +24,6 @@
 #   JAVA_INCLUDE_PATH2    = the include path to jni_md.h
 #   JAVA_AWT_INCLUDE_PATH = the include path to jawt.h
 
-#=============================================================================
-# Copyright 2001-2009 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
 # Expand {libarch} occurences to java_libarch subdirectory(-ies) and set ${_var}
 macro(java_append_library_directories _var)
     # Determine java arch-specific library subdir
@@ -53,7 +42,7 @@ macro(java_append_library_directories _var)
         set(_java_libarch "alpha")
     elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
         # Subdir is "arm" for both big-endian (arm) and little-endian (armel).
-        set(_java_libarch "arm")
+        set(_java_libarch "arm" "aarch32")
     elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
         # mips* machines are bi-endian mostly so processor does not tell
         # endianess of the underlying system.
@@ -63,7 +52,7 @@ macro(java_append_library_directories _var)
     elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64")
         set(_java_libarch "ppc64" "ppc")
     elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)")
-        set(_java_libarch "ppc")
+        set(_java_libarch "ppc" "ppc64")
     elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^sparc")
         # Both flavours can run on the same processor
         set(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}" "sparc" "sparcv9")
@@ -92,10 +81,14 @@ macro(java_append_library_directories _var)
         if(_path MATCHES "{libarch}")
             foreach(_libarch ${_java_libarch})
                 string(REPLACE "{libarch}" "${_libarch}" _newpath "${_path}")
-                list(APPEND ${_var} "${_newpath}")
+                if(EXISTS ${_newpath})
+                    list(APPEND ${_var} "${_newpath}")
+                endif()
             endforeach()
         else()
-            list(APPEND ${_var} "${_path}")
+            if(EXISTS ${_path})
+                list(APPEND ${_var} "${_path}")
+            endif()
         endif()
     endforeach()
 endmacro()
@@ -144,7 +137,6 @@ JAVA_APPEND_LIBRARY_DIRECTORIES(JAVA_AWT_LIBRARY_DIRECTORIES
   /usr/lib/java/jre/lib/{libarch}
   /usr/lib64/java/jre/lib/{libarch}
   /usr/lib/jvm/jre/lib/{libarch}
-  /usr/lib64/jvm/jre/lib/{libarch}
   /usr/local/lib/java/jre/lib/{libarch}
   /usr/local/share/java/jre/lib/{libarch}
   /usr/lib/j2sdk1.4-sun/jre/lib/{libarch}
@@ -154,13 +146,18 @@ JAVA_APPEND_LIBRARY_DIRECTORIES(JAVA_AWT_LIBRARY_DIRECTORIES
   /usr/lib/jvm/java-1.5.0-sun/jre/lib/{libarch}
   /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/{libarch}       # can this one be removed according to #8821 ? Alex
   /usr/lib/jvm/java-6-openjdk/jre/lib/{libarch}
-  /usr/lib/jvm/java-7-openjdk/jre/lib/{libarch}
-  /usr/lib/jvm/java-7-openjdk-{libarch}/jre/lib/{libarch}
   /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/{libarch}        # fedora
   # Debian specific paths for default JVM
   /usr/lib/jvm/default-java/jre/lib/{libarch}
   /usr/lib/jvm/default-java/jre/lib
   /usr/lib/jvm/default-java/lib
+  # Arch Linux specific paths for default JVM
+  /usr/lib/jvm/default/jre/lib/{libarch}
+  /usr/lib/jvm/default/lib/{libarch}
+  # Ubuntu specific paths for default JVM
+  /usr/lib/jvm/java-8-openjdk-{libarch}/jre/lib/{libarch}     # Ubuntu 15.10
+  /usr/lib/jvm/java-7-openjdk-{libarch}/jre/lib/{libarch}     # Ubuntu 15.10
+  /usr/lib/jvm/java-6-openjdk-{libarch}/jre/lib/{libarch}     # Ubuntu 15.10
   # OpenBSD specific paths for default JVM
   /usr/local/jdk-1.7.0/jre/lib/{libarch}
   /usr/local/jre-1.7.0/lib/{libarch}
@@ -191,6 +188,9 @@ list(APPEND JAVA_AWT_INCLUDE_DIRECTORIES
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/include"
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/include"
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\${java_install_version};JavaHome]/include"
+)
+
+JAVA_APPEND_LIBRARY_DIRECTORIES(JAVA_AWT_INCLUDE_DIRECTORIES
   ${_JAVA_HOME}/include
   /usr/include
   /usr/java/include
@@ -199,22 +199,24 @@ list(APPEND JAVA_AWT_INCLUDE_DIRECTORIES
   /usr/lib64/java/include
   /usr/local/lib/java/include
   /usr/lib/jvm/java/include
-  /usr/lib64/jvm/java/include
   /usr/lib/jvm/java-6-sun/include
   /usr/lib/jvm/java-1.5.0-sun/include
   /usr/lib/jvm/java-6-sun-1.6.0.00/include       # can this one be removed according to #8821 ? Alex
   /usr/lib/jvm/java-6-openjdk/include
   /usr/lib/jvm/java-7-openjdk/include
-  /usr/lib/jvm/java-7-openjdk-i386/include
-  /usr/lib/jvm/java-7-openjdk-amd64/include
   /usr/lib64/jvm/java-7-openjdk/include
   /usr/lib64/jvm/java-7-openjdk-amd64/include
+  /usr/lib/jvm/java-8-openjdk-{libarch}/include  # ubuntu 15.10
+  /usr/lib/jvm/java-7-openjdk-{libarch}/include  # ubuntu 15.10
+  /usr/lib/jvm/java-6-openjdk-{libarch}/include  # ubuntu 15.10
   /usr/local/share/java/include
   /usr/lib/j2sdk1.4-sun/include
   /usr/lib/j2sdk1.5-sun/include
   /opt/sun-jdk-1.5.0.04/include
   # Debian specific path for default JVM
   /usr/lib/jvm/default-java/include
+  # Arch specific path for default JVM
+  /usr/lib/jvm/default/include
   # OpenBSD specific path for default JVM
   /usr/local/jdk-1.7.0/include
   /usr/local/jdk-1.6.0/include
@@ -290,7 +292,8 @@ find_path(JAVA_INCLUDE_PATH jni.h
   ${JAVA_AWT_INCLUDE_DIRECTORIES}
 )
 
-find_path(JAVA_INCLUDE_PATH2 jni_md.h
+find_path(JAVA_INCLUDE_PATH2 NAMES jni_md.h jniport.h
+  PATHS
   ${JAVA_INCLUDE_PATH}
   ${JAVA_INCLUDE_PATH}/darwin
   ${JAVA_INCLUDE_PATH}/win32
@@ -300,6 +303,7 @@ find_path(JAVA_INCLUDE_PATH2 jni_md.h
   ${JAVA_INCLUDE_PATH}/solaris
   ${JAVA_INCLUDE_PATH}/hp-ux
   ${JAVA_INCLUDE_PATH}/alpha
+  ${JAVA_INCLUDE_PATH}/aix
 )
 
 find_path(JAVA_AWT_INCLUDE_PATH jawt.h
@@ -316,8 +320,11 @@ endif()
 
 #include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
 INCLUDE (FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(JNI  DEFAULT_MSG  JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY
-                                                    JAVA_INCLUDE_PATH  JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(JNI  DEFAULT_MSG  JAVA_AWT_LIBRARY
+                                                    JAVA_JVM_LIBRARY
+                                                    JAVA_INCLUDE_PATH
+                                                    JAVA_INCLUDE_PATH2
+                                                    JAVA_AWT_INCLUDE_PATH)
 
 mark_as_advanced(
   JAVA_AWT_LIBRARY
@@ -338,5 +345,3 @@ set(JNI_INCLUDE_DIRS
   ${JAVA_AWT_INCLUDE_PATH}
 )
 
-message ("JNI_LIBRARIES=${JNI_LIBRARIES}")
-message ("JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}")
diff --git a/config/cmake/FindXDR.cmake b/config/cmake/FindXDR.cmake
new file mode 100644
index 0000000..127e573
--- /dev/null
+++ b/config/cmake/FindXDR.cmake
@@ -0,0 +1,45 @@
+# Try to find the XDR library and set some required variables
+#
+# Once run this will define:
+#
+# XDR_FOUND                    = system has XDR lib
+#
+# XDR_LIBRARIES            = full path to the libraries, if required
+#
+
+include(CheckIncludeFile)
+include(CheckCSourceCompiles)
+include(CheckFunctionExists)
+include(CheckTypeSize)
+include(CheckLibraryExists)
+
+## First try to find the required header files (rpc/types.h, rpc/xdr.h)
+find_path(XDR_INCLUDE_DIR NAMES rpc/types.h PATHS "/usr/include" "/usr/include/tirpc")
+
+#check for the XDR functions: their interface and the libraries they're hidden in.
+    ## Now let's see if we need an extra lib to compile it
+    set(XDR_INT_FOUND)
+    CHECK_FUNCTION_EXISTS(xdr_int XDR_INT_FOUND)
+    if (NOT XDR_INT_FOUND)
+        foreach(lib nsl rpc tirpc)
+            ## Try to find the corresponding lib
+            set(XDR_INT_LIBRARY)
+            find_library(XDR_INT_LIBRARY ${lib})
+
+            if (XDR_INT_LIBRARY)
+                CHECK_LIBRARY_EXISTS(${XDR_INT_LIBRARY} xdr_int "" XDR_INT_SYMBOL_FOUND)
+            endif()
+            if (XDR_INT_SYMBOL_FOUND)
+                set(XDR_LIBRARIES ${XDR_INT_LIBRARY})
+                set(XDR_INCLUDE_DIRS ${XDR_INCLUDE_DIR})
+                set(XDR_INT_FOUND TRUE)
+                break()
+            endif()
+        endforeach()
+    endif()
+
+    if(NOT XDR_INT_FOUND)
+        message(SEND_ERROR "Could not locate xdr symbols in libc or libnsl.")
+    else()
+        set(XDR_FOUND TRUE)
+    endif()
diff --git a/config/cmake/HDF4Macros.cmake b/config/cmake/HDF4Macros.cmake
index 2796aa4..bac46d1 100644
--- a/config/cmake/HDF4Macros.cmake
+++ b/config/cmake/HDF4Macros.cmake
@@ -1,15 +1,25 @@
 #-------------------------------------------------------------------------------
 macro (H4_SET_LIB_OPTIONS libtarget libname libtype)
   set (LIB_OUT_NAME "${libname}")
+  # SOVERSION passed in ARGN when shared
   if (${libtype} MATCHES "SHARED")
     if (WIN32)
       set (LIBHDF_VERSION ${HDF4_PACKAGE_VERSION_MAJOR})
-    else (WIN32)
+    else ()
       set (LIBHDF_VERSION ${HDF4_PACKAGE_VERSION})
-    endif (WIN32)
+    endif ()
+    if (ARGN)
+      set (PACKAGE_SOVERSION ${ARGN})
+    else ()
+      set (PACKAGE_SOVERSION ${LIBHDF_VERSION})
+    endif ()
     set_target_properties (${libtarget} PROPERTIES VERSION ${LIBHDF_VERSION})
-    set_target_properties (${libtarget} PROPERTIES SOVERSION ${LIBHDF_VERSION})
-  endif (${libtype} MATCHES "SHARED")
+    if (WIN32)
+        set (${LIB_OUT_NAME} "${LIB_OUT_NAME}-${PACKAGE_SOVERSION}")
+    else ()
+        set_target_properties (${libtarget} PROPERTIES SOVERSION ${PACKAGE_SOVERSION})
+    endif ()
+  endif ()
   HDF_SET_LIB_OPTIONS (${libtarget} ${LIB_OUT_NAME} ${libtype})
 
   #-- Apple Specific install_name for libraries
@@ -21,7 +31,7 @@ macro (H4_SET_LIB_OPTIONS libtarget libname libtype)
           INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
           BUILD_WITH_INSTALL_RPATH ${HDF4_BUILD_WITH_INSTALL_NAME}
       )
-    endif (HDF4_BUILD_WITH_INSTALL_NAME)
+    endif ()
     if (HDF4_BUILD_FRAMEWORKS)
       if (${libtype} MATCHES "SHARED")
         # adapt target to build frameworks instead of dylibs
@@ -32,8 +42,8 @@ macro (H4_SET_LIB_OPTIONS libtarget libname libtype)
             MACOSX_FRAMEWORK_IDENTIFIER org.hdfgroup.${libtarget}
             MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${HDF4_PACKAGE_VERSION_MAJOR}
             MACOSX_FRAMEWORK_BUNDLE_VERSION ${HDF4_PACKAGE_VERSION_MAJOR})
-      endif (${libtype} MATCHES "SHARED")
-    endif (HDF4_BUILD_FRAMEWORKS)
-  endif (APPLE)
+      endif ()
+    endif ()
+  endif ()
 
-endmacro (H4_SET_LIB_OPTIONS)
+endmacro ()
diff --git a/config/cmake/HDF4_Examples.cmake.in b/config/cmake/HDF4_Examples.cmake.in
index a8b86c3..fbae0f0 100644
--- a/config/cmake/HDF4_Examples.cmake.in
+++ b/config/cmake/HDF4_Examples.cmake.in
@@ -1,187 +1,95 @@
-cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR)
 ###############################################################################################################
 # This script will build and run the examples from a folder
 # Execute from a command line:
-#     ctest -S HDF4_Examples.cmake,OPTION=VALUE -C Release -V -O test.log
+#     ctest -S HDF4_Examples.cmake,OPTION=VALUE -C Release -VV -O test.log
 ###############################################################################################################
 
 set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
+if("@CMAKE_GENERATOR_TOOLSET@")
+  set(CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@")
+endif()
 set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
 
 # handle input parameters to script.
 #INSTALLDIR - HDF4 root folder
-#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo
+#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
 #CTEST_SOURCE_NAME - name of source folder; HDF4Examples
-#STATIC_LIBRARIES - Default is YES
-#FORTRAN_LIBRARIES - Default is NO
-#JAVA_LIBRARIES - Default is NO
-##NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac)
 if(DEFINED CTEST_SCRIPT_ARG)
-    # transform ctest script arguments of the form
-    # script.ctest,var1=value1,var2=value2
-    # to variables with the respective names set to the respective values
-    string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
-    foreach(current_var ${script_args})
-        if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
-            set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
-        endif()
-    endforeach()
+  # transform ctest script arguments of the form
+  # script.ctest,var1=value1,var2=value2
+  # to variables with the respective names set to the respective values
+  string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
+  foreach(current_var ${script_args})
+    if("${current_var}" MATCHES "^([^=]+)=(.+)$")
+      set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
+    endif()
+  endforeach()
 endif()
-if(NOT DEFINED INSTALLDIR)
-    set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
+
+###################################################################
+### Following Line is one of [Release, RelWithDebInfo, Debug] #####
+set(CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}")
+if(NOT DEFINED CTEST_CONFIGURATION_TYPE)
+  set(CTEST_CONFIGURATION_TYPE "Release")
 endif()
-if(NOT DEFINED CTEST_BUILD_CONFIGURATION)
-    set(CTEST_BUILD_CONFIGURATION "Release")
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=${CTEST_CONFIGURATION_TYPE}")
+##################################################################
+
+if(NOT DEFINED INSTALLDIR)
+  set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
 endif()
+
 if(NOT DEFINED CTEST_SOURCE_NAME)
-    set(CTEST_SOURCE_NAME "HDF4Examples")
+  set(CTEST_SOURCE_NAME "HDF4Examples")
 endif()
-if(NOT DEFINED STATIC_LIBRARIES)
-    set(STATICLIBRARIES "YES")
-else(NOT DEFINED STATIC_LIBRARIES)
-    set(STATICLIBRARIES "NO")
+
+if(NOT DEFINED HDF_LOCAL)
+  set(CDASH_LOCAL "NO")
+else()
+  set(CDASH_LOCAL "YES")
 endif()
-if(NOT DEFINED FORTRAN_LIBRARIES)
-    set(FORTRANLIBRARIES "NO")
-else(NOT DEFINED FORTRAN_LIBRARIES)
-    set(FORTRANLIBRARIES "YES")
+if(NOT DEFINED CTEST_SITE)
+  set(CTEST_SITE "local")
 endif()
-if(NOT DEFINED JAVA_LIBRARIES)
-    set(JAVALIBRARIES "NO")
-else(NOT DEFINED JAVA_LIBRARIES)
-    set(JAVALIBRARIES "YES")
+if(NOT DEFINED CTEST_BUILD_NAME)
+  set(CTEST_BUILD_NAME "examples")
 endif()
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
 
 #TAR_SOURCE - name of tarfile
 #if(NOT DEFINED TAR_SOURCE)
-#  set(CTEST_USE_TAR_SOURCE "HDF4Examples-0.3.1-Source")
+#  set(CTEST_USE_TAR_SOURCE "HDF4Examples-0.2.4-Source")
 #endif()
 
 ###############################################################################################################
-#     Adjust the following SET Commands as needed
-###############################################################################################################
 if(WIN32)
-  if(${STATICLIBRARIES})
-    set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
-  endif()
+  set(SITE_OS_NAME "Windows")
   set(ENV{HDF4_DIR} "${INSTALLDIR}/cmake")
   set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build)
   set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
   set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
-else(WIN32)
-  if(${STATICLIBRARIES})
-    set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
-  endif()
+else()
   set(ENV{HDF4_DIR} "${INSTALLDIR}/share/cmake")
   set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib")
   set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build)
   set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
   set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
-endif(WIN32)
-if(${FORTRANLIBRARIES})
-  set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON")
-else()
-  set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF")
 endif()
-if(${JAVALIBRARIES})
-  set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=ON")
-else()
-  set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=OFF")
+if(${CDASH_LOCAL})
+  set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON")
 endif()
-set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF4_PACKAGE_NAME:STRING=@HDF4_PACKAGE@@HDF_PACKAGE_EXT@")
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF4_PACKAGE@@HDF_PACKAGE_EXT@")
 
 ###############################################################################################################
 # For any comments please contact cdashhelp at hdfgroup.org
 #
 ###############################################################################################################
 
-#-----------------------------------------------------------------------------
-# MAC machines need special option
-#-----------------------------------------------------------------------------
-if(APPLE)
-  # Compiler choice
-  execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
-  execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
-  set(ENV{CC} "${XCODE_CC}")
-  set(ENV{CXX} "${XCODE_CXX}")
-  if(NOT NO_MAC_FORTRAN)
-    # Shared fortran is not supported, build static
-    set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
-  else()
-    set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF")
-  endif()
-  set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
-endif()
-
-#-----------------------------------------------------------------------------
-set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
-## --------------------------
-if(CTEST_USE_TAR_SOURCE)
-  ## Uncompress source if tar or zip file provided
-  ## --------------------------
-  if(WIN32)
-    message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip]")
-    execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
-  else()
-    message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]")
-    execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
-  endif()
-
-  if(NOT rv EQUAL 0)
-    message(STATUS "extracting... [error-(${rv}) clean up]")
-    file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
-    message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed")
-  endif()
-endif(CTEST_USE_TAR_SOURCE)
-
-#-----------------------------------------------------------------------------
-## Clear the build directory
-## --------------------------
-set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
-if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
-  ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
-else ()
-  file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
-endif ()
-
-# Use multiple CPU cores to build
-include(ProcessorCount)
-ProcessorCount(N)
-if(NOT N EQUAL 0)
-  if(NOT WIN32)
-    set(CTEST_BUILD_FLAGS -j${N})
-  endif()
-  set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
-endif()
-set (CTEST_CONFIGURE_COMMAND
-    "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
-)
-
-#-----------------------------------------------------------------------------
-## -- set output to english
-set($ENV{LC_MESSAGES}  "en_EN")
-
-#-----------------------------------------------------------------------------
-configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
-ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
-## NORMAL process
-## --------------------------
-ctest_start (Experimental)
-ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}")
-if(LOCAL_SUBMIT)
-  ctest_submit (PARTS Configure Notes)
-endif()
-ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
-if(LOCAL_SUBMIT)
-  ctest_submit (PARTS Build)
-endif()
-ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
-if(LOCAL_SUBMIT)
-  ctest_submit (PARTS Test)
-endif()
-if(res GREATER 0)
-  message (FATAL_ERROR "tests FAILED")
+if(WIN32)
+  include(${CTEST_SCRIPT_DIRECTORY}\\HDF4_Examples_options.cmake)
+  include(${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake)
+else()
+  include(${CTEST_SCRIPT_DIRECTORY}/HDF4_Examples_options.cmake)
+  include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
 endif()
-#-----------------------------------------------------------------------------
-##############################################################################################################
-message(STATUS "DONE")
\ No newline at end of file
diff --git a/config/cmake/HDF4_Examples_options.cmake b/config/cmake/HDF4_Examples_options.cmake
new file mode 100755
index 0000000..8936f4f
--- /dev/null
+++ b/config/cmake/HDF4_Examples_options.cmake
@@ -0,0 +1,33 @@
+#############################################################################################
+####  Change default configuration of options in config/cmake/cacheinit.cmake file        ###
+####  format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ")                 ###
+####  DEFAULT:                                                                            ###
+####         BUILD_SHARED_LIBS:BOOL=OFF                                                   ###
+####         HDF_BUILD_C:BOOL=ON                                                          ###
+####         HDF_BUILD_FORTRAN:BOOL=ON                                                   ###
+####         HDF_BUILD_JAVA:BOOL=ON                                                      ###
+####         BUILD_TESTING:BOOL=ON                                                       ###
+#############################################################################################
+
+### uncomment/comment and change the following lines for other configuration options
+### build with shared libraries
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=ON")
+
+#############################################################################################
+####      languages       ####
+### disable C builds
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_C:BOOL=OFF")
+
+### disable Fortran builds
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF")
+
+### disable JAVA builds
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=OFF")
+
+
+#############################################################################################
+### disable test program builds, requires reference files in testfiles subdirectory
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF")
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCOMPARE_TESTING:BOOL=OFF")
+
+#############################################################################################
diff --git a/config/cmake/README.txt.cmake.in b/config/cmake/README.txt.cmake.in
index bfb3f9e..aa8073f 100644
--- a/config/cmake/README.txt.cmake.in
+++ b/config/cmake/README.txt.cmake.in
@@ -36,16 +36,18 @@ To test the installation with the examples;
     Create a directory to run the examples.
     Copy HDF4Examples folder to this directory.
     Copy HDF4_Examples.cmake to this directory.
+    Copy HDF4_Examples_options.cmake to this directory.
+    Copy CTestScript.cmake to this directory.
     The default source folder is defined as "HDF4Examples". It can be changed
         with the CTEST_SOURCE_NAME script option.
     The default installation folder is defined as "@CMAKE_INSTALL_PREFIX@".
         It can be changed with the INSTALLDIR script option.
     The default ctest configuration is defined as "Release". It can be changed
-        with the CTEST_BUILD_CONFIGURATION script option. Note that this must
+        with the CTEST_CONFIGURATION_TYPE script option. Note that this must
         be the same as the value used with the -C command line option.
     The default build configuration is defined to build and use static libraries.
-        Shared libraries can be used with the STATICLIBRARIES script option set to "NO".
-    Other options can be changed by editing the HDF4_Examples.cmake file.
+        Shared libraries can be used with the STATICONLYLIBRARIES script option set to "NO".
+    Other options can be changed by editing the HDF4_Examples_options.cmake file.
 
     If the defaults are okay, execute from this directory:
         ctest -S HDF4_Examples.cmake -C Release -V -O test.log
diff --git a/config/cmake/UseJava.cmake b/config/cmake/UseJava.cmake
index 9b2b1e0..9b3bf02 100644
--- a/config/cmake/UseJava.cmake
+++ b/config/cmake/UseJava.cmake
@@ -1,3 +1,5 @@
+# Distributed under the OSI-approved BSD 3-Clause License.  See https://cmake.org/licensing for details.
+
 #.rst:
 # UseJava
 # -------
@@ -169,7 +171,7 @@
 #
 # ::
 #
-#    The add_jar() functions sets some target properties. You can get these
+#    The add_jar() function sets some target properties. You can get these
 #    properties with the
 #       get_property(TARGET <target_name> PROPERTY <propery_name>)
 #    command.
@@ -217,6 +219,19 @@
 # This command installs the TARGET_NAME files to the given DESTINATION.
 # It should be called in the same scope as add_jar() or it will fail.
 #
+# Target Properties:
+#
+# ::
+#
+#    The install_jar() function sets the INSTALL_DESTINATION target property
+#    on jars so installed. This property holds the DESTINATION as described
+#    above, and is used by install_jar_exports(). You can get this property
+#    with the
+#       get_property(TARGET <target_name> PROPERTY INSTALL_DESTINATION)
+#    command.
+#
+#
+#
 # ::
 #
 #  install_jni_symlink(target_name destination)
@@ -228,6 +243,26 @@
 #
 # ::
 #
+#  install_jar_exports(TARGETS jars...
+#                      [NAMESPACE <namespace>]
+#                      FILE <filename>
+#                      DESTINATION <dir> [COMPONENT <component>])
+#
+# This command installs a target export file ``<filename>`` for the named jar
+# targets to the given ``DESTINATION``. Its function is similar to that of
+# :command:`install(EXPORTS ...)`.
+#
+# ::
+#
+#  export_jars(TARGETS jars...
+#              [NAMESPACE <namespace>]
+#              FILE <filename>)
+#
+# This command writes a target export file ``<filename>`` for the named jar
+# targets. Its function is similar to that of :command:`export(...)`.
+#
+# ::
+#
 #  create_javadoc(<VAR>
 #                 PACKAGES pkg1 [pkg2 ...]
 #                 [SOURCEPATH <sourcepath>]
@@ -324,7 +359,7 @@
 # that allow your Java and C code to interact.
 #
 # There are two main signatures for create_javah.  The first signature
-# returns generated files throught variable specified by GENERATED_FILES option:
+# returns generated files through variable specified by GENERATED_FILES option:
 #
 # ::
 #
@@ -369,34 +404,43 @@
 #    Sets the directory where the header files will be generated. Same behavior as option
 #    '-d' of javah tool. If not specified, ${CMAKE_CURRENT_BINARY_DIR} is used as output directory.
 
-#=============================================================================
-# Copyright 2013 OpenGamma Ltd. <graham at opengamma.com>
-# Copyright 2010-2011 Andreas schneider <asn at redhat.com>
-# Copyright 2010-2013 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
 include(CMakeParseArguments)
 
 function (__java_copy_file src dest comment)
     add_custom_command(
         OUTPUT  ${dest}
-        COMMAND cmake -E copy_if_different
+        COMMAND ${CMAKE_COMMAND} -E copy_if_different
         ARGS    ${src}
                 ${dest}
         DEPENDS ${src}
         COMMENT ${comment})
 endfunction ()
 
+function(__java_lcat VAR)
+    foreach(_line ${ARGN})
+        set(${VAR} "${${VAR}}${_line}\n")
+    endforeach()
+
+    set(${VAR} "${${VAR}}" PARENT_SCOPE)
+endfunction()
+
+function(__java_export_jar VAR TARGET PATH)
+    get_target_property(_jarpath ${TARGET} JAR_FILE)
+    get_filename_component(_jarname ${_jarpath} NAME)
+    set(_target "${_jar_NAMESPACE}${TARGET}")
+    __java_lcat(${VAR}
+      "# Create imported target ${_target}"
+      "add_library(${_target} IMPORTED STATIC)"
+      "set_target_properties(${_target} PROPERTIES"
+      "  IMPORTED_LOCATION \"${PATH}/${_jarname}\""
+      "  JAR_FILE \"${PATH}/${_jarname}\")"
+      ""
+    )
+    set(${VAR} "${${VAR}}" PARENT_SCOPE)
+endfunction()
+
 # define helper scripts
+set(_JAVA_EXPORT_TARGETS_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/javaTargets.cmake.in)
 set(_JAVA_CLASS_FILELIST_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/UseJavaClassFilelist.cmake)
 set(_JAVA_SYMLINK_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/UseJavaSymlinks.cmake)
 
@@ -435,6 +479,8 @@ function(add_jar _TARGET_NAME)
 
     if (NOT DEFINED _add_jar_OUTPUT_DIR)
         set(_add_jar_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
+    else()
+        get_filename_component(_add_jar_OUTPUT_DIR ${_add_jar_OUTPUT_DIR} ABSOLUTE)
     endif()
 
     if (_add_jar_ENTRY_POINT)
@@ -554,11 +600,6 @@ function(add_jar _TARGET_NAME)
         endif ()
     endforeach()
 
-    # create an empty java_class_filelist
-    if (NOT EXISTS ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_class_filelist)
-        file(WRITE ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_class_filelist "")
-    endif()
-
     if (_JAVA_COMPILE_FILES OR _JAVA_COMPILE_FILELISTS)
         set (_JAVA_SOURCES_FILELISTS)
 
@@ -598,6 +639,11 @@ function(add_jar _TARGET_NAME)
             DEPENDS ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_compiled_${_TARGET_NAME}
             WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
         )
+    else ()
+        # create an empty java_class_filelist
+        if (NOT EXISTS ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_class_filelist)
+            file(WRITE ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_class_filelist "")
+        endif()
     endif ()
 
     # create the jar file
@@ -716,6 +762,13 @@ function(INSTALL_JAR _TARGET_NAME)
         PROPERTY
             INSTALL_FILES
     )
+    set_property(
+        TARGET
+            ${_TARGET_NAME}
+        PROPERTY
+            INSTALL_DESTINATION
+            ${_DESTINATION}
+    )
 
     if (__FILES)
         install(
@@ -1201,7 +1254,7 @@ function(create_javadoc _target)
             else ()
                 set(_overview ${_overview}:${_path})
             endif ()
-        endforeach()
+        endforeach ()
         set(_javadoc_options ${_javadoc_options} -overview ${_overview})
     endif ()
 
@@ -1348,3 +1401,96 @@ function (create_javah)
       set (${_create_javah_GENERATED_FILES} ${_output_files} PARENT_SCOPE)
     endif()
 endfunction()
+
+function(export_jars)
+    # Parse and validate arguments
+    cmake_parse_arguments(_export_jars
+      ""
+      "FILE;NAMESPACE"
+      "TARGETS"
+      ${ARGN}
+    )
+    if (NOT _export_jars_FILE)
+      message(SEND_ERROR "export_jars: FILE must be specified.")
+    endif()
+    if (NOT _export_jars_TARGETS)
+      message(SEND_ERROR "export_jars: TARGETS must be specified.")
+    endif()
+    set(_jar_NAMESPACE "${_export_jars_NAMESPACE}")
+
+    # Set content of generated exports file
+    string(REPLACE ";" " " __targets__ "${_export_jars_TARGETS}")
+    set(__targetdefs__ "")
+    foreach(_target ${_export_jars_TARGETS})
+        get_target_property(_jarpath ${_target} JAR_FILE)
+        get_filename_component(_jarpath ${_jarpath} PATH)
+        __java_export_jar(__targetdefs__ ${_target} "${_jarpath}")
+    endforeach()
+
+    # Generate exports file
+    configure_file(
+      ${_JAVA_EXPORT_TARGETS_SCRIPT}
+      ${_export_jars_FILE}
+      @ONLY
+    )
+endfunction()
+
+function(install_jar_exports)
+    # Parse and validate arguments
+    cmake_parse_arguments(_install_jar_exports
+      ""
+      "FILE;DESTINATION;COMPONENT;NAMESPACE"
+      "TARGETS"
+      ${ARGN}
+    )
+    if (NOT _install_jar_exports_FILE)
+      message(SEND_ERROR "install_jar_exports: FILE must be specified.")
+    endif()
+    if (NOT _install_jar_exports_DESTINATION)
+      message(SEND_ERROR "install_jar_exports: DESTINATION must be specified.")
+    endif()
+    if (NOT _install_jar_exports_TARGETS)
+      message(SEND_ERROR "install_jar_exports: TARGETS must be specified.")
+    endif()
+    set(_jar_NAMESPACE "${_install_jar_exports_NAMESPACE}")
+
+    if (_install_jar_exports_COMPONENT)
+      set (_COMPONENT COMPONENT ${_install_jar_exports_COMPONENT})
+    endif()
+
+    # Determine relative path from installed export file to install prefix
+    if(IS_ABSOLUTE ${_install_jar_exports_DESTINATION})
+      file(RELATIVE_PATH _relpath
+        ${_install_jar_exports_DESTINATION}
+        ${CMAKE_INSTALL_PREFIX}
+      )
+    else()
+      file(RELATIVE_PATH _relpath
+        ${CMAKE_INSTALL_PREFIX}/${_install_jar_exports_DESTINATION}
+        ${CMAKE_INSTALL_PREFIX}
+      )
+    endif()
+
+    # Set up unique location for generated exports file
+    string(SHA256 _hash "${_install_jar_exports_DESTINATION}")
+    set(_tmpdir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/JavaExports/${_hash})
+
+    # Set content of generated exports file
+    string(REPLACE ";" " " __targets__ "${_install_jar_exports_TARGETS}")
+    set(__targetdefs__ "set(_prefix \${CMAKE_CURRENT_LIST_DIR}/${_relpath})\n\n")
+    foreach(_target ${_install_jar_exports_TARGETS})
+        get_target_property(_dir ${_target} INSTALL_DESTINATION)
+        __java_export_jar(__targetdefs__ ${_target} "\${_prefix}/${_dir}")
+    endforeach()
+    __java_lcat(__targetdefs__ "\nunset(_prefix)")
+
+    # Generate and install exports file
+    configure_file(
+      ${_JAVA_EXPORT_TARGETS_SCRIPT}
+      ${_tmpdir}/${_install_jar_exports_FILE}
+      @ONLY
+    )
+    install(FILES ${_tmpdir}/${_install_jar_exports_FILE}
+            DESTINATION ${_install_jar_exports_DESTINATION}
+            ${_COMPONENT})
+endfunction()
diff --git a/config/cmake/UseJavaClassFilelist.cmake b/config/cmake/UseJavaClassFilelist.cmake
index e8e6f01..4420550 100644
--- a/config/cmake/UseJavaClassFilelist.cmake
+++ b/config/cmake/UseJavaClassFilelist.cmake
@@ -1,3 +1,5 @@
+# Distributed under the OSI-approved BSD 3-Clause License.  See https://cmake.org/licensing for details.
+
 #.rst:
 # UseJavaClassFilelist
 # --------------------
@@ -10,19 +12,6 @@
 # a jar file.  This avoids including cmake files which get created in
 # the binary directory.
 
-#=============================================================================
-# Copyright 2010-2011 Andreas schneider <asn at redhat.com>
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
 if (CMAKE_JAVA_CLASS_OUTPUT_PATH)
     if (EXISTS "${CMAKE_JAVA_CLASS_OUTPUT_PATH}")
 
diff --git a/config/cmake/UseJavaSymlinks.cmake b/config/cmake/UseJavaSymlinks.cmake
index 90ffdd5..cd73348 100644
--- a/config/cmake/UseJavaSymlinks.cmake
+++ b/config/cmake/UseJavaSymlinks.cmake
@@ -1,3 +1,5 @@
+# Distributed under the OSI-approved BSD 3-Clause License.  See https://cmake.org/licensing for details.
+
 #.rst:
 # UseJavaSymlinks
 # ---------------
@@ -8,19 +10,6 @@
 #
 # Helper script for UseJava.cmake
 
-#=============================================================================
-# Copyright 2010-2011 Andreas schneider <asn at redhat.com>
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
 if (UNIX AND _JAVA_TARGET_OUTPUT_LINK)
     if (_JAVA_TARGET_OUTPUT_NAME)
         find_program(LN_EXECUTABLE
diff --git a/config/cmake/UserMacros/Windows_MT.cmake b/config/cmake/UserMacros/Windows_MT.cmake
index a54f22c..216a014 100644
--- a/config/cmake/UserMacros/Windows_MT.cmake
+++ b/config/cmake/UserMacros/Windows_MT.cmake
@@ -3,14 +3,14 @@
 ########################################################
 
 # To use this option, copy both the macro and option code
-# into the root UserMacros.cmake file. 
+# into the root UserMacros.cmake file.
 # OR add an include to the root UserMacros.cmake file:
 # INCLUDE(path_to_file/WINDOWS_MT.cmake)
 
 #-----------------------------------------------------------------------------
 # Option to Build with Static CRT libraries on Windows
 #-------------------------------------------------------------------------------
-MACRO (TARGET_STATIC_CRT_FLAGS)
+macro (TARGET_STATIC_CRT_FLAGS)
   if (MSVC AND NOT BUILD_SHARED_LIBS)
     foreach (flag_var
         CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
@@ -19,23 +19,22 @@ MACRO (TARGET_STATIC_CRT_FLAGS)
         CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
       if (${flag_var} MATCHES "/MD")
         string (REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
-      endif (${flag_var} MATCHES "/MD")
-    endforeach (flag_var)
+      endif ()
+    endforeach ()
     foreach (flag_var
         CMAKE_Fortran_FLAGS CMAKE_Fortran_FLAGS_DEBUG CMAKE_Fortran_FLAGS_RELEASE
         CMAKE_Fortran_FLAGS_MINSIZEREL CMAKE_Fortran_FLAGS_RELWITHDEBINFO)
       if (${flag_var} MATCHES "/libs:dll")
         string (REGEX REPLACE "/libs:dll" "/libs:static" ${flag_var} "${${flag_var}}")
-      endif (${flag_var} MATCHES "/libs:dll")
-    endforeach (flag_var)
+      endif ()
+    endforeach ()
     set (WIN_COMPILE_FLAGS "")
     set (WIN_LINK_FLAGS "/NODEFAULTLIB:MSVCRT")
-  endif (MSVC AND NOT BUILD_SHARED_LIBS)
-ENDMACRO (TARGET_STATIC_CRT_FLAGS)
+  endif ()
+endmacro ()
 
 #-----------------------------------------------------------------------------
 option (BUILD_STATIC_CRT_LIBS "Build With Static CRT Libraries" OFF)
 if (BUILD_STATIC_CRT_LIBS)
   TARGET_STATIC_CRT_FLAGS ()
-endif (BUILD_STATIC_CRT_LIBS)
- 
\ No newline at end of file
+endif ()
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index 0cb96a8..6db131b 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -48,14 +48,14 @@ set (HDF4_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libr
 
 set (HDF4_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
 
-set (HDF4_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)" FORCE)
-set_property (CACHE HDF4_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ)
+set (HDF4_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT SVN TGZ)" FORCE)
+set_property (CACHE HDF4_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT SVN TGZ)
 
 set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
 
 set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
 
-set (JPEG_TGZ_NAME "JPEG8b.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE)
+set (JPEG_TGZ_NAME "JPEG8d.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE)
 
 set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
 
diff --git a/config/cmake/hdf4-config-version.cmake.in b/config/cmake/hdf4-config-version.cmake.in
index 6aa0691..feb3213 100644
--- a/config/cmake/hdf4-config-version.cmake.in
+++ b/config/cmake/hdf4-config-version.cmake.in
@@ -19,19 +19,19 @@ else()
     if ("${PACKAGE_FIND_VERSION_MINOR}" STREQUAL "@H4_VERS_MINOR@")
 
       # compatible with any version @H4_VERS_MAJOR at .@H4_VERS_MINOR at .x
-      set (PACKAGE_VERSION_COMPATIBLE TRUE) 
-    
+      set (PACKAGE_VERSION_COMPATIBLE TRUE)
+
       if ("${PACKAGE_FIND_VERSION_PATCH}" STREQUAL "@H4_VERS_RELEASE@")
         set (PACKAGE_VERSION_EXACT TRUE)
 
         if ("${PACKAGE_FIND_VERSION_TWEAK}" STREQUAL "@H4_VERS_SUBRELEASE@")
           # not using this yet
-        endif ("${PACKAGE_FIND_VERSION_TWEAK}" STREQUAL "@H4_VERS_SUBRELEASE@")
-      endif ("${PACKAGE_FIND_VERSION_PATCH}" STREQUAL "@H4_VERS_RELEASE@")
-    else ("${PACKAGE_FIND_VERSION_MINOR}" STREQUAL "@H4_VERS_MINOR@")
-      set (PACKAGE_VERSION_COMPATIBLE FALSE) 
-    endif ("${PACKAGE_FIND_VERSION_MINOR}" STREQUAL "@H4_VERS_MINOR@")
-  endif ("${PACKAGE_FIND_VERSION_MAJOR}" STREQUAL "@H4_VERS_MAJOR@")
+        endif ()
+      endif ()
+    else ()
+      set (PACKAGE_VERSION_COMPATIBLE FALSE)
+    endif ()
+  endif ()
 endif()
 
 # if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
diff --git a/config/cmake/hdf4-config.cmake.in b/config/cmake/hdf4-config.cmake.in
index df3ad23..51df877 100644
--- a/config/cmake/hdf4-config.cmake.in
+++ b/config/cmake/hdf4-config.cmake.in
@@ -29,6 +29,7 @@ set (${HDF4_PACKAGE_NAME}_ENABLE_SZIP_ENCODING @HDF4_ENABLE_SZIP_ENCODING@)
 set (${HDF4_PACKAGE_NAME}_BUILD_SHARED_LIBS    @BUILD_SHARED_LIBS@)
 set (${HDF4_PACKAGE_NAME}_PACKAGE_EXTLIBS      @HDF4_PACKAGE_EXTLIBS@)
 set (${HDF4_PACKAGE_NAME}_EXPORT_LIBRARIES @HDF4_LIBRARIES_TO_EXPORT@)
+set (${HDF4_PACKAGE_NAME}_TOOLSET "@CMAKE_GENERATOR_TOOLSET@")
 
 #-----------------------------------------------------------------------------
 # Dependencies
@@ -119,25 +120,25 @@ foreach (libtype IN LISTS ${HDF4_PACKAGE_NAME}_LIB_TYPE)
       set (hdf4_comp2 "hdf_fcstub")
       set (hdf4_comp "hdf_fortran")
     endif ()
-    list (FIND ${HDF4_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf4_comp}-${libtype}" HAVE_COMP) 
-    list (FIND ${HDF4_PACKAGE_NAME}_EXPORT_LIBRARIES "mf${hdf4_comp}-${libtype}" HAVE_MFCOMP) 
-    if (${HAVE_COMP} LESS 0 OR ${HAVE_MFCOMP} LESS 0) 
+    list (FIND ${HDF4_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf4_comp}-${libtype}" HAVE_COMP)
+    list (FIND ${HDF4_PACKAGE_NAME}_EXPORT_LIBRARIES "mf${hdf4_comp}-${libtype}" HAVE_MFCOMP)
+    if (${HAVE_COMP} LESS 0 OR ${HAVE_MFCOMP} LESS 0)
       set (${HDF4_PACKAGE_NAME}_${libtype}_${comp}_FOUND 0)
     else ()
       if (hdf4_comp2)
-        list (FIND ${HDF4_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf4_comp2}-${libtype}" HAVE_COMP2) 
-        list (FIND ${HDF4_PACKAGE_NAME}_EXPORT_LIBRARIES "mf${hdf4_comp2}-${libtype}" HAVE_MFCOMP2) 
+        list (FIND ${HDF4_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf4_comp2}-${libtype}" HAVE_COMP2)
+        list (FIND ${HDF4_PACKAGE_NAME}_EXPORT_LIBRARIES "mf${hdf4_comp2}-${libtype}" HAVE_MFCOMP2)
         if (${HAVE_COMP2} LESS 0 OR ${HAVE_MFCOMP2} LESS 0)
           set (${HDF4_PACKAGE_NAME}_${libtype}_${comp}_FOUND 0)
         else ()
           set (${HDF4_PACKAGE_NAME}_${libtype}_${comp}_FOUND 1)
           string(TOUPPER ${HDF4_PACKAGE_NAME}_${comp}_${libtype}_LIBRARY COMP_LIBRARY)
-          set (${COMP_LIBRARY} ${${COMP_LIBRARY}} ${hdf4_comp2}-${libtype} ${hdf4_comp}-${libtype} mf${hdf4_comp2}-${libtype} mf${hdf4_comp}-${libtype})
+          set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @HDF4_PACKAGE@::${hdf4_comp2}-${libtype} @HDF4_PACKAGE@::${hdf4_comp}-${libtype} @HDF4_PACKAGE@::mf${hdf4_comp2}-${libtype} @HDF4_PACKAGE@::mf${hdf4_comp}-${libtype})
         endif ()
       else ()
         set (${HDF4_PACKAGE_NAME}_${libtype}_${comp}_FOUND 1)
         string(TOUPPER ${HDF4_PACKAGE_NAME}_${comp}_${libtype}_LIBRARY COMP_LIBRARY)
-        set (${COMP_LIBRARY} ${${COMP_LIBRARY}} ${hdf4_comp}-${libtype} mf${hdf4_comp}-${libtype})
+        set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @HDF4_PACKAGE@::${hdf4_comp}-${libtype} @HDF4_PACKAGE@::mf${hdf4_comp}-${libtype})
       endif ()
     endif ()
   endforeach ()
diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake
index 7e7d1f1..6013db4 100644
--- a/config/cmake/jrunTest.cmake
+++ b/config/cmake/jrunTest.cmake
@@ -5,44 +5,53 @@ cmake_policy(SET CMP0007 NEW)
 # arguments checking
 if (NOT TEST_TESTER)
   message (FATAL_ERROR "Require TEST_TESTER to be defined")
-endif (NOT TEST_TESTER)
+endif ()
 if (NOT TEST_PROGRAM)
   message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
-endif (NOT TEST_PROGRAM)
+endif ()
 if (NOT TEST_LIBRARY_DIRECTORY)
   message (STATUS "Require TEST_LIBRARY_DIRECTORY to be defined")
-endif (NOT TEST_LIBRARY_DIRECTORY)
+endif ()
 if (NOT TEST_FOLDER)
   message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-endif (NOT TEST_FOLDER)
+endif ()
 if (NOT TEST_OUTPUT)
   message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
-endif (NOT TEST_OUTPUT)
+endif ()
 if (NOT TEST_CLASSPATH)
   message (STATUS "Require TEST_CLASSPATH to be defined")
-endif (NOT TEST_CLASSPATH)
+endif ()
 if (NOT TEST_REFERENCE)
   message (STATUS "Require TEST_REFERENCE to be defined")
-endif (NOT TEST_REFERENCE)
+endif ()
 
+if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
+  file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
+endif ()
+
+if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+  file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+endif ()
+
+# if there is not an error reference file add the error output to the stdout file
 if (NOT TEST_ERRREF)
   if (NOT SKIP_APPEND)
     # append error file since skip was not defined
     set (ERROR_APPEND 1)
-  endif(NOT SKIP_APPEND)
-endif (NOT TEST_ERRREF)
+  endif ()
+endif ()
 
 if (NOT TEST_LOG_LEVEL)
   set (LOG_LEVEL "info")
-else (NOT TEST_LOG_LEVEL)
+else ()
   set (LOG_LEVEL "${TEST_LOG_LEVEL}")
-endif (NOT TEST_LOG_LEVEL)
+endif ()
 
 message (STATUS "COMMAND: ${TEST_TESTER} -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=${LOG_LEVEL} -Djava.library.path=\"${TEST_LIBRARY_DIRECTORY}\" -cp \"${TEST_CLASSPATH}\" ${TEST_ARGS} ${TEST_PROGRAM} ${ARGN}")
 
 if (WIN32 AND NOT MINGW)
   set (ENV{PATH} "$ENV{PATH}\\;${TEST_LIBRARY_DIRECTORY}")
-endif (WIN32 AND NOT MINGW)
+endif ()
 
 # run the test program, capture the stdout/stderr and the result var
 execute_process (
@@ -60,50 +69,50 @@ execute_process (
 
 message (STATUS "COMMAND Result: ${TEST_RESULT}")
 
+# if the .err file exists and ERRROR_APPEND is enabled
 if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
   file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
   if (TEST_MASK_FILE)
     STRING(REGEX REPLACE "CurrentDir is [^\n]+\n" "CurrentDir is (dir name)\n" TEST_STREAM "${TEST_STREAM}")
-  endif (TEST_MASK_FILE)
+  endif ()
 
   if (NOT ERROR_APPEND)
     # append error output to the stdout output file
     file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}")
-  else (NOT ERROR_APPEND)
+  else ()
     # write back to original .err file
     file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-  endif (NOT ERROR_APPEND)
-endif (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+  endif ()
+endif ()
 
+# if the output file or the .err file needs to mask out error stack info
 if (TEST_MASK_ERROR)
   if (NOT TEST_ERRREF)
     # the error stack has been appended to the output file
     file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
-  else (NOT TEST_ERRREF)
+  else ()
     # the error stack remains in the .err file
     file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
-  endif (NOT TEST_ERRREF)
+  endif ()
   string (REGEX REPLACE "Time:[^\n]+\n" "Time:  XXXX\n" TEST_STREAM "${TEST_STREAM}")
   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}")
   #string (REGEX REPLACE "v[1-9]*[.][0-9]*[.]" "version (number)." TEST_STREAM "${TEST_STREAM}")
-  string (REGEX REPLACE "HDF5 .[1-9]*[.][0-9]*[.][0-9]*[^)]*" "HDF5 (version (number)" TEST_STREAM "${TEST_STREAM}")
-  string (REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
-  string (REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
+  string (REGEX REPLACE "HDF4 .[1-9]*[.][0-9]*[.][0-9]*[^)]*" "HDF4 (version (number)" TEST_STREAM "${TEST_STREAM}")
   # write back the changes to the original files
   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 (TEST_MASK_ERROR)
+  endif ()
+endif ()
 
 # if the return value is !=0 bail out
 if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
   message (STATUS "ERROR OUTPUT: ${TEST_STREAM}")
   message (FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != 0.\n${TEST_ERROR}")
-endif (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
+endif ()
 
 message (STATUS "COMMAND Error: ${TEST_ERROR}")
 
@@ -112,7 +121,7 @@ if (NOT TEST_SKIP_COMPARE)
   if (WIN32 AND NOT MINGW)
     file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
     file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
-  endif (WIN32 AND NOT MINGW)
+  endif ()
 
   # now compare the output with the reference
   execute_process (
@@ -120,42 +129,49 @@ if (NOT TEST_SKIP_COMPARE)
       RESULT_VARIABLE TEST_RESULT
   )
   if (NOT ${TEST_RESULT} STREQUAL 0)
-  set (TEST_RESULT 0)
-  file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
-  list (LENGTH test_act len_act)
-  file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
-  list (LENGTH test_ref len_ref)
-  if (NOT ${len_act} STREQUAL "0")
-    MATH (EXPR _FP_LEN "${len_ref} - 1")
-    foreach (line RANGE 0 ${_FP_LEN})
-      list (GET test_act ${line} str_act)
-      list (GET test_ref ${line} str_ref)
-      if (NOT "${str_act}" STREQUAL "${str_ref}")
-        if (NOT "${str_act}" STREQUAL "")
-          set (TEST_RESULT 1)
-          message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
-         endif (NOT "${str_act}" STREQUAL "")
-      endif (NOT "${str_act}" STREQUAL "${str_ref}")
-    endforeach (line RANGE 0 ${_FP_LEN})
-  endif (NOT ${len_act} STREQUAL "0")
-  if (NOT ${len_act} STREQUAL ${len_ref})
-    set (TEST_RESULT 1)
-  endif (NOT ${len_act} STREQUAL ${len_ref})
-  endif (NOT ${TEST_RESULT} STREQUAL 0)
+    set (TEST_RESULT 0)
+    file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
+    list (LENGTH test_act len_act)
+    file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
+    list (LENGTH test_ref len_ref)
+    if (NOT ${len_act} STREQUAL "0" AND NOT ${len_ref} STREQUAL "0")
+      math (EXPR _FP_LEN "${len_ref} - 1")
+      foreach (line RANGE 0 ${_FP_LEN})
+        list (GET test_act ${line} str_act)
+        list (GET test_ref ${line} str_ref)
+        if (NOT "${str_act}" STREQUAL "${str_ref}")
+          if (NOT "${str_act}" STREQUAL "")
+            set (TEST_RESULT 1)
+            message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+          endif ()
+        endif ()
+      endforeach ()
+    else ()
+      if (${len_act} STREQUAL "0")
+        message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty")
+      endif ()
+      if (${len_ref} STREQUAL "0")
+        message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty")
+      endif ()
+    endif ()
+    if (NOT ${len_act} STREQUAL ${len_ref})
+      set (TEST_RESULT 1)
+    endif ()
+  endif ()
 
   message (STATUS "COMPARE Result: ${TEST_RESULT}")
 
   # again, if return value is !=0 scream and shout
   if (NOT ${TEST_RESULT} STREQUAL 0)
     message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}")
-  endif (NOT ${TEST_RESULT} STREQUAL 0)
+  endif ()
 
   # now compare the .err file with the error reference, if supplied
   if (TEST_ERRREF)
     if (WIN32 AND NOT MINGW)
       file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
       file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}")
-    endif (WIN32 AND NOT MINGW)
+    endif ()
 
     # now compare the error output with the error reference
     execute_process (
@@ -163,38 +179,45 @@ if (NOT TEST_SKIP_COMPARE)
         RESULT_VARIABLE TEST_RESULT
     )
     if (NOT ${TEST_RESULT} STREQUAL 0)
-    set (TEST_RESULT 0)
-    file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act)
-    list (LENGTH test_act len_act)
-    file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref)
-    list (LENGTH test_ref len_ref)
-    MATH (EXPR _FP_LEN "${len_ref} - 1")
-    if (NOT ${len_act} STREQUAL "0")
-      MATH (EXPR _FP_LEN "${len_ref} - 1")
-      foreach (line RANGE 0 ${_FP_LEN})
-        list (GET test_act ${line} str_act)
-        list (GET test_ref ${line} str_ref)
-        if (NOT "${str_act}" STREQUAL "${str_ref}")
-          if (NOT "${str_act}" STREQUAL "")
-            set (TEST_RESULT 1)
-            message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
-           endif (NOT "${str_act}" STREQUAL "")
-        endif (NOT "${str_act}" STREQUAL "${str_ref}")
-      endforeach (line RANGE 0 ${_FP_LEN})
-    endif (NOT ${len_act} STREQUAL "0")
-    if (NOT ${len_act} STREQUAL ${len_ref})
-      set (TEST_RESULT 1)
-    endif (NOT ${len_act} STREQUAL ${len_ref})
-    endif (NOT ${TEST_RESULT} STREQUAL 0)
+      set (TEST_RESULT 0)
+      file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act)
+      list (LENGTH test_act len_act)
+      file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref)
+      list (LENGTH test_ref len_ref)
+      math (EXPR _FP_LEN "${len_ref} - 1")
+      if (NOT ${len_act} STREQUAL "0" AND NOT ${len_ref} STREQUAL "0")
+        math (EXPR _FP_LEN "${len_ref} - 1")
+        foreach (line RANGE 0 ${_FP_LEN})
+          list (GET test_act ${line} str_act)
+          list (GET test_ref ${line} str_ref)
+          if (NOT "${str_act}" STREQUAL "${str_ref}")
+            if (NOT "${str_act}" STREQUAL "")
+              set (TEST_RESULT 1)
+              message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+            endif ()
+          endif ()
+        endforeach ()
+      else ()
+        if (${len_act} STREQUAL "0")
+          message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT}.err is empty")
+        endif ()
+        if (${len_ref} STREQUAL "0")
+          message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_ERRREF} is empty")
+        endif ()
+      endif()
+      if (NOT ${len_act} STREQUAL ${len_ref})
+        set (TEST_RESULT 1)
+      endif ()
+    endif ()
 
     message (STATUS "COMPARE Result: ${TEST_RESULT}")
 
     # again, if return value is !=0 scream and shout
     if (NOT ${TEST_RESULT} STREQUAL 0)
       message (FATAL_ERROR "Failed: The error output of ${TEST_OUTPUT}.err did not match ${TEST_ERRREF}")
-    endif (NOT ${TEST_RESULT} STREQUAL 0)
-  endif (TEST_ERRREF)
-endif (NOT TEST_SKIP_COMPARE)
+    endif ()
+  endif ()
+endif ()
 
 if (TEST_GREP_COMPARE)
   # now grep the output with the reference
@@ -205,7 +228,7 @@ if (TEST_GREP_COMPARE)
   string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT)
   if (${TEST_RESULT} STREQUAL "0")
     message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}")
-  endif (${TEST_RESULT} STREQUAL "0")
+  endif ()
 
   string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM})
   if (${TEST_EXPECT} STREQUAL "1")
@@ -213,9 +236,9 @@ if (TEST_GREP_COMPARE)
     string (LENGTH "${TEST_MATCH}" TEST_RESULT)
     if (NOT ${TEST_RESULT} STREQUAL "0")
       message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}")
-    endif (NOT ${TEST_RESULT} STREQUAL "0")
-  endif (${TEST_EXPECT} STREQUAL "0")
-endif (TEST_GREP_COMPARE)
+    endif ()
+  endif ()
+endif ()
 
 # everything went fine...
 message ("${TEST_PROGRAM} Passed")
diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake
index 04b2c4c..5d9028c 100644
--- a/config/cmake/mccacheinit.cmake
+++ b/config/cmake/mccacheinit.cmake
@@ -48,22 +48,14 @@ set (HDF4_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libr
 
 set (HDF4_NO_PACKAGES ON CACHE BOOL "CPACK - Disable packaging" FORCE)
 
-set (HDF4_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)" FORCE)
-set_property (CACHE HDF4_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ)
-
-set (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk" CACHE STRING "Use ZLib from HDF repository" FORCE)
-
-set (SZIP_SVN_URL "http://svn.hdfgroup.uiuc.edu/szip/trunk" CACHE STRING "Use SZip from HDF repository" FORCE)
-
-set (JPEG_SVN_URL "http://svn.hdfgroup.uiuc.edu/jpeg/branches/jpeg8b" CACHE STRING "Use JPEG from HDF repository" FORCE)
+set (HDF4_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT SVN TGZ)" FORCE)
+set_property (CACHE HDF4_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT SVN TGZ)
 
 set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
 
 set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
 
-set (JPEG_TGZ_NAME "JPEG8b.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE)
-
-set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Debug" FORCE)
+set (JPEG_TGZ_NAME "JPEG8d.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE)
 
 set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
 
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake
new file mode 100755
index 0000000..d376e59
--- /dev/null
+++ b/config/cmake/scripts/CTestScript.cmake
@@ -0,0 +1,298 @@
+cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR)
+########################################################
+# This dashboard is maintained by The HDF Group
+# For any comments please contact cdashhelp at hdfgroup.org
+#
+########################################################
+# -----------------------------------------------------------
+# -- Get environment
+# -----------------------------------------------------------
+if (NOT SITE_OS_NAME)
+  ## machine name not provided - attempt to discover with uname
+  ## -- set hostname
+  ## --------------------------
+  find_program (HOSTNAME_CMD NAMES hostname)
+  exec_program (${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
+  set (CTEST_SITE  "${HOSTNAME}${CTEST_SITE_EXT}")
+  find_program (UNAME NAMES uname)
+  macro (getuname name flag)
+    exec_program ("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
+  endmacro ()
+
+  getuname (osname -s)
+  getuname (osrel  -r)
+  getuname (cpu    -m)
+  message (STATUS "Dashboard script uname output: ${osname}-${osrel}-${cpu}\n")
+
+  set (CTEST_BUILD_NAME  "${osname}-${osrel}-${cpu}")
+  if (SITE_BUILDNAME_SUFFIX)
+    set (CTEST_BUILD_NAME  "${SITE_BUILDNAME_SUFFIX}-${CTEST_BUILD_NAME}")
+  endif ()
+  set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS}")
+else ()
+  ## machine name provided
+  ## --------------------------
+  if (CMAKE_HOST_UNIX)
+    set (CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_OS_BITS}-${SITE_COMPILER_NAME}-${SITE_COMPILER_VERSION}")
+  else ()
+    set (CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_COMPILER_NAME}")
+  endif ()
+  if (SITE_BUILDNAME_SUFFIX)
+    set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX}")
+  endif ()
+  set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
+endif ()
+
+#-----------------------------------------------------------------------------
+# MAC machines need special option
+#-----------------------------------------------------------------------------
+if (APPLE)
+  # Compiler choice
+  execute_process (COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
+  execute_process (COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
+  set (ENV{CC} "${XCODE_CC}")
+  set (ENV{CXX} "${XCODE_CXX}")
+
+  if (NOT NO_MAC_FORTRAN)
+    # Shared fortran is not supported, build static
+    set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
+  else ()
+    set (BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+  endif ()
+
+  set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
+endif ()
+
+#-----------------------------------------------------------------------------
+set (NEED_REPOSITORY_CHECKOUT 0)
+set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
+if (CTEST_USE_TAR_SOURCE)
+  ## Uncompress source if tar file provided
+  ## --------------------------
+  if (WIN32)
+    message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} x ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip]")
+    execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
+  else ()
+    message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar]")
+    execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
+  endif ()
+
+  if (NOT rv EQUAL 0)
+    message (STATUS "extracting... [error-(${rv}) clean up]")
+    file (REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
+    message (FATAL_ERROR "error: extract of ${CTEST_USE_TAR_SOURCE} failed")
+  endif ()
+
+  file (RENAME ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE} ${CTEST_SOURCE_DIRECTORY})
+  set (LOCAL_SKIP_UPDATE "TRUE")
+else ()
+  if (LOCAL_UPDATE)
+    if (CTEST_USE_GIT_SOURCE)
+      find_program (CTEST_GIT_COMMAND NAMES git git.cmd)
+      set (CTEST_GIT_UPDATE_OPTIONS)
+
+      if (NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
+        set (NEED_REPOSITORY_CHECKOUT 1)
+      endif ()
+
+      if (${NEED_REPOSITORY_CHECKOUT})
+        if (REPOSITORY_BRANCH)
+          set (CTEST_GIT_options "clone \"${REPOSITORY_URL}\" --branch  \"${REPOSITORY_BRANCH}\" --single-branch \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
+        else ()
+          set (CTEST_GIT_options "clone \"${REPOSITORY_URL}\" \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
+        endif ()
+        set (CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} ${CTEST_GIT_options}")
+      else ()
+        set (CTEST_GIT_options "pull")
+      endif ()
+      set (CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
+    else ()
+      ## --------------------------
+      ## use subversion to get source
+      #-----------------------------------------------------------------------------
+      ## cygwin does not handle the find_package() call
+      ## --------------------------
+      set (CTEST_UPDATE_COMMAND "SVNCommand")
+      if (NOT SITE_CYGWIN})
+        find_package (Subversion)
+        set (CTEST_SVN_COMMAND "${Subversion_SVN_EXECUTABLE}")
+        set (CTEST_UPDATE_COMMAND "${Subversion_SVN_EXECUTABLE}")
+      else ()
+        set (CTEST_SVN_COMMAND "/usr/bin/svn")
+        set (CTEST_UPDATE_COMMAND "/usr/bin/svn")
+      endif ()
+
+      if (NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
+        set (NEED_REPOSITORY_CHECKOUT 1)
+      endif ()
+
+      if (NOT CTEST_REPO_VERSION)
+        set (CTEST_REPO_VERSION "HEAD")
+      endif ()
+      if (${NEED_REPOSITORY_CHECKOUT})
+        set (CTEST_CHECKOUT_COMMAND
+            "\"${CTEST_SVN_COMMAND}\" co ${REPOSITORY_URL} \"${CTEST_SOURCE_DIRECTORY}\" -r ${CTEST_REPO_VERSION}")
+      else ()
+        if (CTEST_REPO_VERSION)
+          set (CTEST_SVN_UPDATE_OPTIONS "-r ${CTEST_REPO_VERSION}")
+        endif ()
+      endif ()
+    endif ()
+  endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
+## Clear the build directory
+## --------------------------
+set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
+if (NOT EXISTS "${CTEST_BINARY_DIRECTORY}")
+  file (MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+else ()
+  ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
+endif ()
+
+# Use multiple CPU cores to build
+include (ProcessorCount)
+ProcessorCount (N)
+if (NOT N EQUAL 0)
+  if (NOT WIN32)
+    set (CTEST_BUILD_FLAGS -j${N})
+  endif ()
+  set (ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
+endif ()
+
+#-----------------------------------------------------------------------------
+# Send the main script as a note.
+list (APPEND CTEST_NOTES_FILES
+    "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
+    "${CMAKE_CURRENT_LIST_FILE}"
+    "${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
+)
+
+#-----------------------------------------------------------------------------
+# Check for required variables.
+# --------------------------
+foreach (req
+    CTEST_CMAKE_GENERATOR
+    CTEST_SITE
+    CTEST_BUILD_NAME
+  )
+  if (NOT DEFINED ${req})
+    message (FATAL_ERROR "The containing script must set ${req}")
+  endif ()
+endforeach ()
+
+#-----------------------------------------------------------------------------
+# Initialize the CTEST commands
+#------------------------------
+if(CMAKE_GENERATOR_TOOLSET)
+  set(CTEST_CONFIGURE_TOOLSET  "-T${CMAKE_GENERATOR_TOOLSET}")
+else ()
+  set(CTEST_CONFIGURE_TOOLSET  "")
+endif()
+if (LOCAL_MEMCHECK_TEST)
+  find_program (CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
+  set (CTEST_CONFIGURE_COMMAND
+      "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
+  )
+else ()
+  if (LOCAL_COVERAGE_TEST)
+    find_program (CTEST_COVERAGE_COMMAND NAMES gcov)
+  endif ()
+  set (CTEST_CONFIGURE_COMMAND
+      "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
+  )
+endif ()
+
+#-----------------------------------------------------------------------------
+## -- set output to english
+set ($ENV{LC_MESSAGES}  "en_EN")
+
+# Print summary information.
+foreach (v
+    CTEST_SITE
+    CTEST_BUILD_NAME
+    CTEST_SOURCE_DIRECTORY
+    CTEST_BINARY_DIRECTORY
+    CTEST_CMAKE_GENERATOR
+    CTEST_CONFIGURATION_TYPE
+    CTEST_GIT_COMMAND
+    CTEST_CHECKOUT_COMMAND
+    CTEST_CONFIGURE_COMMAND
+    CTEST_SCRIPT_DIRECTORY
+    CTEST_USE_LAUNCHERS
+  )
+  set (vars "${vars}  ${v}=[${${v}}]\n")
+endforeach ()
+message (STATUS "Dashboard script configuration:\n${vars}\n")
+
+#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+  ## NORMAL process
+  ## -- LOCAL_UPDATE updates the source folder from svn
+  ## -- LOCAL_SUBMIT reports to CDash server
+  ## -- LOCAL_SKIP_TEST skips the test process (only builds)
+  ## -- LOCAL_MEMCHECK_TEST executes the Valgrind testing
+  ## -- LOCAL_COVERAGE_TEST executes code coverage process
+  ## --------------------------
+  ctest_start (${MODEL} TRACK ${MODEL})
+  if (LOCAL_UPDATE)
+    ctest_update (SOURCE "${CTEST_SOURCE_DIRECTORY}")
+  endif ()
+  configure_file (${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
+  ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
+  ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+  if (LOCAL_SUBMIT)
+    ctest_submit (PARTS Update Configure Notes)
+  endif ()
+  if (${res} LESS 0 OR ${res} GREATER 0)
+    file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n")
+  endif ()
+
+  ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res NUMBER_ERRORS errval)
+  if (LOCAL_SUBMIT)
+    ctest_submit (PARTS Build)
+  endif ()
+  if (${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0)
+    file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed ${errval} Build: ${res}\n")
+  endif ()
+
+  if (NOT LOCAL_SKIP_TEST)
+    if (NOT LOCAL_MEMCHECK_TEST)
+      ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
+      if (LOCAL_SUBMIT)
+        ctest_submit (PARTS Test)
+      endif ()
+      if (${res} LESS 0 OR ${res} GREATER 0)
+        file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
+      endif ()
+    else ()
+      ctest_memcheck (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
+      if (LOCAL_SUBMIT)
+        ctest_submit (PARTS MemCheck)
+      endif ()
+    endif ()
+    if (LOCAL_COVERAGE_TEST)
+      ctest_coverage (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+      if (LOCAL_SUBMIT)
+        ctest_submit (PARTS Coverage)
+      endif ()
+    endif ()
+  endif ()
+
+  if (NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE AND NOT LOCAL_SKIP_BUILD)
+    ##-----------------------------------------------
+    ## Package the product
+    ##-----------------------------------------------
+    execute_process (COMMAND cpack -C ${CTEST_CONFIGURATION_TYPE} -V
+      WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
+      RESULT_VARIABLE cpackResult
+      OUTPUT_VARIABLE cpackLog
+      ERROR_VARIABLE cpackLog.err
+    )
+    file (WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
+    if (cpackResult GREATER 0)
+      file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed packaging: ${cpackResult}:${cpackLog.err} \n")
+    endif ()
+  endif ()
+#-----------------------------------------------------------------------------
diff --git a/config/cmake/scripts/HDF4config.cmake b/config/cmake/scripts/HDF4config.cmake
new file mode 100755
index 0000000..17e57e6
--- /dev/null
+++ b/config/cmake/scripts/HDF4config.cmake
@@ -0,0 +1,199 @@
+#############################################################################################
+### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE                                       ###
+### BUILD_GENERATOR required [Unix, VS2015, VS201564, VS2013, VS201364, VS2012, VS201264] ###
+### ctest -S HDFconfig.cmake,BUILD_GENERATOR=VS201264 -C Release -VV -O hdf.log           ###
+#############################################################################################
+
+cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR)
+############################################################################
+# Usage:
+#     ctest -S HDFconfig.cmake,OPTION=VALUE -C Release -VV -O test.log
+# where valid options for OPTION are:
+#     BUILD_GENERATOR - The cmake build generator:
+#            Unix    * Unix Makefiles
+#            VS2015    * Visual Studio 14 2015
+#            VS201564 * Visual Studio 14 2015 Win64
+#            VS2013    * Visual Studio 12 2013
+#            VS201364 * Visual Studio 12 2013 Win64
+#            VS2012    * Visual Studio 11 2012
+#            VS201264 * Visual Studio 11 2012 Win64
+#
+#     INSTALLDIR  -  root folder where hdf is installed
+#                 -  windowsdefault: C:/Program Files/HDF_Group/HDF/4.2.13
+#                 -  linux default:  ./HDF_Group/HDF/4.2.13
+#     CTEST_CONFIGURATION_TYPE  - Release, Debug, etc - default: Release
+#     CTEST_SOURCE_NAME  -  source folder - default: hdf4
+#     STATIC_ONLY  -  Build/use static libraries
+#     FORTRAN_LIBRARIES -  Build/use fortran libraries
+#     NO_MAC_FORTRAN  - Yes to be SHARED on a Mac
+##############################################################################
+
+set (CTEST_SOURCE_VERSION "4.2.13")
+set (CTEST_SOURCE_VERSEXT "")
+
+##############################################################################
+# handle input parameters to script.
+#BUILD_GENERATOR - which CMake generator to use, required
+#INSTALLDIR - HDF-4.2.13 root folder
+#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
+#CTEST_SOURCE_NAME - name of source folder; HDF-4.2.13
+#STATIC_ONLY - Default is YES
+#FORTRAN_LIBRARIES - Default is NO
+#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac
+if (DEFINED CTEST_SCRIPT_ARG)
+  # transform ctest script arguments of the form
+  # script.ctest,var1=value1,var2=value2
+  # to variables with the respective names set to the respective values
+  string (REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
+  foreach (current_var ${script_args})
+    if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
+      set ("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
+    endif ()
+  endforeach ()
+endif ()
+
+# build generator must be defined
+if (NOT DEFINED BUILD_GENERATOR)
+  message (FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
+else ()
+  if (${BUILD_GENERATOR} STREQUAL "Unix")
+    set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
+  elseif (${BUILD_GENERATOR} STREQUAL "VS2015")
+    set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015")
+  elseif (${BUILD_GENERATOR} STREQUAL "VS201564")
+    set (CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64")
+  elseif (${BUILD_GENERATOR} STREQUAL "VS2013")
+    set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013")
+  elseif (${BUILD_GENERATOR} STREQUAL "VS201364")
+    set (CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64")
+  elseif (${BUILD_GENERATOR} STREQUAL "VS2012")
+    set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012")
+  elseif (${BUILD_GENERATOR} STREQUAL "VS201264")
+    set (CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
+  else ()
+    message (FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
+  endif ()
+endif ()
+
+###################################################################
+### Following Line is one of [Release, RelWithDebInfo, Debug] #####
+set (CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}")
+if (NOT DEFINED CTEST_CONFIGURATION_TYPE)
+  set (CTEST_CONFIGURATION_TYPE "Release")
+endif ()
+set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=${CTEST_CONFIGURATION_TYPE}")
+##################################################################
+
+if (NOT DEFINED INSTALLDIR)
+  if (WIN32)
+    set (INSTALLDIR "C:/Program Files/HDF_Group/HDF/${CTEST_SOURCE_VERSION}")
+  else ()
+    set (INSTALLDIR "${CTEST_SCRIPT_DIRECTORY}/HDF_Group/HDF/${CTEST_SOURCE_VERSION}")
+  endif ()
+endif ()
+
+if (NOT DEFINED CTEST_SOURCE_NAME)
+  set (CTEST_SOURCE_NAME "hdf-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
+endif ()
+if (NOT DEFINED STATIC_ONLY)
+  set (STATICONLYLIBRARIES "YES")
+else ()
+  set (STATICONLYLIBRARIES "NO")
+endif ()
+if (NOT DEFINED FORTRAN_LIBRARIES)
+  set (FORTRANLIBRARIES "NO")
+else ()
+  set(FORTRANLIBRARIES "YES")
+endif ()
+
+set (CTEST_BINARY_NAME "build")
+set (CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}")
+if (WIN32)
+  set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
+  set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
+else ()
+  set (CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
+  set (CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
+endif ()
+
+###################################################################
+#########       Following describes compiler           ############
+if (WIN32)
+  set (SITE_OS_NAME "Windows")
+  set (SITE_OS_VERSION "WIN7")
+  if (${BUILD_GENERATOR} STREQUAL "VS201564")
+    set (SITE_OS_BITS "64")
+    set (SITE_COMPILER_NAME "vs2015")
+    set (SITE_COMPILER_VERSION "14")
+  elseif (${BUILD_GENERATOR} STREQUAL "VS2015")
+    set (SITE_OS_BITS "32")
+    set (SITE_COMPILER_NAME "vs2015")
+    set (SITE_COMPILER_VERSION "14")
+  elseif (${BUILD_GENERATOR} STREQUAL "VS201364")
+    set (SITE_OS_BITS "64")
+    set (SITE_COMPILER_NAME "vs2013")
+    set (SITE_COMPILER_VERSION "12")
+  elseif (${BUILD_GENERATOR} STREQUAL "VS2013")
+    set (SITE_OS_BITS "32")
+    set (SITE_COMPILER_NAME "vs2013")
+    set (SITE_COMPILER_VERSION "12")
+  elseif (${BUILD_GENERATOR} STREQUAL "VS201264")
+    set (SITE_OS_BITS "64")
+    set (SITE_COMPILER_NAME "vs2012")
+    set (SITE_COMPILER_VERSION "11")
+  elseif (${BUILD_GENERATOR} STREQUAL "VS2012")
+    set (SITE_OS_BITS "32")
+    set (SITE_COMPILER_NAME "vs2012")
+    set (SITE_COMPILER_VERSION "11")
+  endif ()
+##  Set the following to unique id your computer  ##
+  set (CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX")
+else ()
+  set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
+##  Set the following to unique id your computer  ##
+  if (APPLE)
+    set (CTEST_SITE "MAC.XXXX")
+  else ()
+    set (CTEST_SITE "LINUX.XXXX")
+  endif ()
+  if (APPLE)
+    execute_process (COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
+    execute_process (COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
+    set (ENV{CC} "${XCODE_CC}")
+    set (ENV{CXX} "${XCODE_CXX}")
+    set (CTEST_USE_LAUNCHERS        1)
+    set (RR_WARNINGS_COMMON "-Wno-format-nonliteral -Wno-cast-align -Wno-unused -Wno-unused-variable -Wno-unused-function -Wno-self-assign -Wno-unused-parameter -Wno-sign-compare")
+    set (RR_WARNINGS_C "${RR_WARNINGS_COMMON} -Wno-deprecated-declarations -Wno-uninitialized")
+    set (RR_WARNINGS_CXX "${RR_WARNINGS_COMMON} -Woverloaded-virtual -Wshadow -Wwrite-strings -Wc++11-compat")
+    set (RR_FLAGS_COMMON "-g -O0 -fstack-protector-all -D_FORTIFY_SOURCE=2")
+    set (RR_FLAGS_C "${RR_FLAGS_COMMON}")
+    set (RR_FLAGS_CXX "${RR_FLAGS_COMMON}")
+    set (ENV{CFLAGS} "${RR_WARNINGS_C} ${RR_FLAGS_C}")
+    set (ENV{CXXFLAGS} "${RR_WARNINGS_CXX} ${RR_FLAGS_CXX}")
+  endif ()
+endif ()
+###################################################################
+
+###################################################################
+if (${STATICONLYLIBRARIES})
+  set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
+  #########       Following describes computer           ############
+  ## following is optional to describe build                       ##
+  set (SITE_BUILDNAME_SUFFIX "STATIC")
+endif ()
+###################################################################
+####      fortran       ####
+if (${FORTRANLIBRARIES})
+  set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF4_BUILD_FORTRAN:BOOL=ON")
+else ()
+  set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF4_BUILD_FORTRAN:BOOL=OFF")
+endif ()
+###################################################################
+
+if (WIN32)
+  include (${CTEST_SCRIPT_DIRECTORY}\\HDF4options.cmake)
+  include (${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake)
+else ()
+  include (${CTEST_SCRIPT_DIRECTORY}/HDF4options.cmake)
+  include (${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
+endif ()
diff --git a/config/cmake/scripts/HDF4options.cmake b/config/cmake/scripts/HDF4options.cmake
new file mode 100755
index 0000000..d9d93ed
--- /dev/null
+++ b/config/cmake/scripts/HDF4options.cmake
@@ -0,0 +1,36 @@
+#############################################################################################
+####  Change default configuration of options in config/cmake/cacheinit.cmake file        ###
+####  format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ")                 ###
+#############################################################################################
+
+### uncomment/comment and change the following lines for other configuration options
+
+#############################################################################################
+####      alternate toolsets       ####
+#set(CMAKE_GENERATOR_TOOLSET "Intel C++ Compiler 17.0")
+
+#############################################################################################
+####      ext libraries       ####
+
+### ext libs from tgz
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF4_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=${CTEST_SCRIPT_DIRECTORY}")
+### ext libs from git
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF4_ALLOW_EXTERNAL_SUPPORT:STRING=GIT")
+### ext libs on system
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DJPEG_LIBRARY:FILEPATH=some_location/lib/jpeg.lib -DJPEG_INCLUDE_DIR:PATH=some_location/include")
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include")
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include")
+
+##############################################################################################
+### disable test program builds
+
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF")
+
+#############################################################################################
+### disable packaging
+
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF4_NO_PACKAGES:BOOL=ON")
+### Create install package with external libraries (szip, zlib, jpeg)
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF4_PACKAGE_EXTLIBS:BOOL=ON")
+
+#############################################################################################
diff --git a/config/cmake_ext_mod/CheckTypeSize.cmake b/config/cmake_ext_mod/CheckTypeSize.cmake
index 5095a27..d217ac5 100644
--- a/config/cmake_ext_mod/CheckTypeSize.cmake
+++ b/config/cmake_ext_mod/CheckTypeSize.cmake
@@ -7,24 +7,24 @@
 # HAVE_${VARIABLE} - does the variable exists or not
 #
 
-MACRO (HDF_CHECK_TYPE_SIZE TYPE VARIABLE)
+macro (HDF_CHECK_TYPE_SIZE TYPE VARIABLE)
   set (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
   if ("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
-    set (MACRO_CHECK_TYPE_SIZE_FLAGS 
+    set (MACRO_CHECK_TYPE_SIZE_FLAGS
         "-DCHECK_TYPE_SIZE_TYPE=\"${TYPE}\" ${CMAKE_REQUIRED_FLAGS}"
     )
     foreach (def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H HAVE_INTTYPES_H)
       if ("${def}")
         set (MACRO_CHECK_TYPE_SIZE_FLAGS "${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
-      endif ("${def}")
-    endforeach (def)
+      endif ()
+    endforeach ()
 
     message (STATUS "Check size of ${TYPE}")
     if (CMAKE_REQUIRED_LIBRARIES)
-      set (CHECK_TYPE_SIZE_ADD_LIBRARIES 
+      set (CHECK_TYPE_SIZE_ADD_LIBRARIES
           "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}"
       )
-    endif (CMAKE_REQUIRED_LIBRARIES)
+    endif ()
     try_run (${VARIABLE} HAVE_${VARIABLE}
         ${CMAKE_BINARY_DIR}
         ${HDF_RESOURCES_EXT_DIR}/CheckTypeSize.c
@@ -35,16 +35,16 @@ MACRO (HDF_CHECK_TYPE_SIZE TYPE VARIABLE)
     if (HAVE_${VARIABLE})
       message (STATUS "Check size of ${TYPE} - done")
       file (APPEND
-          ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log 
+          ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
           "Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n"
       )
-    else (HAVE_${VARIABLE})
+    else ()
       message (STATUS "Check size of ${TYPE} - failed")
       file (APPEND
-          ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log 
+          ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
           "Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\n\n"
       )
-    endif (HAVE_${VARIABLE})
-  endif ("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
+    endif ()
+  endif ()
   set (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS)
-ENDMACRO (HDF_CHECK_TYPE_SIZE)
+endmacro ()
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index c4fabf1..5d2bef8 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -11,9 +11,9 @@ include (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)
 include (${CMAKE_ROOT}/Modules/CheckVariableExists.cmake)
 include (${CMAKE_ROOT}/Modules/CheckFortranFunctionExists.cmake)
 include (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
-if(CMAKE_CXX_COMPILER)
+if (CMAKE_CXX_COMPILER AND CMAKE_CXX_COMPILER_LOADED)
   include (${CMAKE_ROOT}/Modules/TestForSTDNamespace.cmake)
-endif(CMAKE_CXX_COMPILER)
+endif ()
 
 #-----------------------------------------------------------------------------
 # APPLE/Darwin setup
@@ -28,29 +28,29 @@ if (APPLE)
     "variable has been set to a blank value which will build the default architecture for this system.")
   endif ()
   set (${HDF_PREFIX}_AC_APPLE_UNIVERSAL_BUILD 0)
-endif (APPLE)
+endif ()
 
 # Check for Darwin (not just Apple - we also want to catch OpenDarwin)
 if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
     set (${HDF_PREFIX}_HAVE_DARWIN 1)
-endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+endif ()
 
 # Check for Solaris
 if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
     set (${HDF_PREFIX}_HAVE_SOLARIS 1)
-endif (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+endif ()
 
 #-----------------------------------------------------------------------------
 # This MACRO checks IF the symbol exists in the library and IF it
 # does, it appends library to the list.
 #-----------------------------------------------------------------------------
 set (LINK_LIBS "")
-MACRO (CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
+macro (CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
   CHECK_LIBRARY_EXISTS ("${LIBRARY};${LINK_LIBS}" ${SYMBOL} "" ${VARIABLE})
   if (${VARIABLE})
     set (LINK_LIBS ${LINK_LIBS} ${LIBRARY})
-  endif (${VARIABLE})
-ENDMACRO (CHECK_LIBRARY_EXISTS_CONCAT)
+  endif ()
+endmacro ()
 
 # ----------------------------------------------------------------------
 # WINDOWS Hard code Values
@@ -62,7 +62,7 @@ if (WIN32)
     set (${HDF_PREFIX}_HAVE_MINGW 1)
     set (WINDOWS 1) # MinGW tries to imitate Windows
     set (CMAKE_REQUIRED_FLAGS "-DWIN32_LEAN_AND_MEAN=1 -DNOGDI=1")
-  endif (MINGW)
+  endif ()
   set (${HDF_PREFIX}_HAVE_WIN32_API 1)
   set (CMAKE_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib")
   if (NOT UNIX AND NOT MINGW)
@@ -70,9 +70,9 @@ if (WIN32)
     set (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1")
     if (MSVC)
       set (${HDF_PREFIX}_HAVE_VISUAL_STUDIO 1)
-    endif (MSVC)
-  endif (NOT UNIX AND NOT MINGW)
-endif (WIN32)
+    endif ()
+  endif ()
+endif ()
 
 if (WINDOWS)
   set (${HDF_PREFIX}_HAVE_STDDEF_H 1)
@@ -84,20 +84,16 @@ if (WINDOWS)
   set (${HDF_PREFIX}_HAVE_LONGJMP 1)
   if (NOT MINGW)
     set (${HDF_PREFIX}_HAVE_GETHOSTNAME 1)
-  endif (NOT MINGW)
+  endif ()
   if (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
     set (${HDF_PREFIX}_HAVE_GETCONSOLESCREENBUFFERINFO 1)
-  endif (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
-  set (${HDF_PREFIX}_HAVE_FUNCTION 1)
-  set (${HDF_PREFIX}_GETTIMEOFDAY_GIVES_TZ 1)
-  set (${HDF_PREFIX}_HAVE_TIMEZONE 1)
-  set (${HDF_PREFIX}_HAVE_GETTIMEOFDAY 1)
+  endif ()
   if (MINGW)
     set (${HDF_PREFIX}_HAVE_WINSOCK2_H 1)
-  endif (MINGW)
+  endif ()
   set (${HDF_PREFIX}_HAVE_LIBWS2_32 1)
   set (${HDF_PREFIX}_HAVE_LIBWSOCK32 1)
-endif (WINDOWS)
+endif ()
 
 # ----------------------------------------------------------------------
 # END of WINDOWS Hard code Values
@@ -105,7 +101,7 @@ endif (WINDOWS)
 
 if (CYGWIN)
   set (${HDF_PREFIX}_HAVE_LSEEK64 0)
-endif (CYGWIN)
+endif ()
 
 #-----------------------------------------------------------------------------
 #  Check for the math library "m"
@@ -115,7 +111,7 @@ if (NOT WINDOWS)
   CHECK_LIBRARY_EXISTS_CONCAT ("dl" dlopen     ${HDF_PREFIX}_HAVE_LIBDL)
   CHECK_LIBRARY_EXISTS_CONCAT ("ws2_32" WSAStartup  ${HDF_PREFIX}_HAVE_LIBWS2_32)
   CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" gethostbyname ${HDF_PREFIX}_HAVE_LIBWSOCK32)
-endif (NOT WINDOWS)
+endif ()
 
 # UCB (BSD) compatibility library
 CHECK_LIBRARY_EXISTS_CONCAT ("ucb"    gethostname  ${HDF_PREFIX}_HAVE_LIBUCB)
@@ -126,20 +122,20 @@ set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${LINK_LIBS})
 set (USE_INCLUDES "")
 if (WINDOWS)
   set (USE_INCLUDES ${USE_INCLUDES} "windows.h")
-endif (WINDOWS)
+endif ()
 
 if (NOT WINDOWS)
   TEST_BIG_ENDIAN (${HDF_PREFIX}_WORDS_BIGENDIAN)
-endif (NOT WINDOWS)
+endif ()
 
 # For other specific tests, use this MACRO.
-MACRO (HDF_FUNCTION_TEST OTHER_TEST)
+macro (HDF_FUNCTION_TEST OTHER_TEST)
   if ("${HDF_PREFIX}_${OTHER_TEST}" MATCHES "^${HDF_PREFIX}_${OTHER_TEST}$")
     set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}")
     set (OTHER_TEST_ADD_LIBRARIES)
     if (CMAKE_REQUIRED_LIBRARIES)
       set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
-    endif (CMAKE_REQUIRED_LIBRARIES)
+    endif ()
 
     foreach (def
         HAVE_SYS_TIME_H
@@ -149,14 +145,14 @@ MACRO (HDF_FUNCTION_TEST OTHER_TEST)
     )
       if ("${${HDF_PREFIX}_${def}}")
         set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}")
-      endif ("${${HDF_PREFIX}_${def}}")
-    endforeach (def)
+      endif ()
+    endforeach ()
 
     if (LARGEFILE)
       set (MACRO_CHECK_FUNCTION_DEFINITIONS
           "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
       )
-    endif (LARGEFILE)
+    endif ()
 
     #message (STATUS "Performing ${OTHER_TEST}")
     TRY_COMPILE (${OTHER_TEST}
@@ -169,16 +165,16 @@ MACRO (HDF_FUNCTION_TEST OTHER_TEST)
     if (${OTHER_TEST})
       set (${HDF_PREFIX}_${OTHER_TEST} 1 CACHE INTERNAL "Other test ${FUNCTION}")
       message (STATUS "Performing Other Test ${OTHER_TEST} - Success")
-    else (${OTHER_TEST})
+    else ()
       message (STATUS "Performing Other Test ${OTHER_TEST} - Failed")
       set (${HDF_PREFIX}_${OTHER_TEST} "" CACHE INTERNAL "Other test ${FUNCTION}")
       file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
           "Performing Other Test ${OTHER_TEST} failed with the following output:\n"
           "${OUTPUT}\n"
       )
-    endif (${OTHER_TEST})
-  endif ("${HDF_PREFIX}_${OTHER_TEST}" MATCHES "^${HDF_PREFIX}_${OTHER_TEST}$")
-ENDMACRO (HDF_FUNCTION_TEST)
+    endif ()
+  endif ()
+endmacro ()
 
 #-----------------------------------------------------------------------------
 # Check for these functions before the time headers are checked
@@ -188,28 +184,28 @@ HDF_FUNCTION_TEST (STDC_HEADERS)
 #-----------------------------------------------------------------------------
 # Check IF header file exists and add it to the list.
 #-----------------------------------------------------------------------------
-MACRO (CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
+macro (CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
   CHECK_INCLUDE_FILES ("${USE_INCLUDES};${FILE}" ${VARIABLE})
   if (${VARIABLE})
     set (USE_INCLUDES ${USE_INCLUDES} ${FILE})
-  endif (${VARIABLE})
-ENDMACRO (CHECK_INCLUDE_FILE_CONCAT)
+  endif ()
+endmacro ()
 
 #-----------------------------------------------------------------------------
 #  Check for the existence of certain header files
 #-----------------------------------------------------------------------------
-CHECK_INCLUDE_FILE_CONCAT ("sys/resource.h"  ${HDF_PREFIX}_HAVE_SYS_RESOURCE_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/time.h"      ${HDF_PREFIX}_HAVE_SYS_TIME_H)
-CHECK_INCLUDE_FILE_CONCAT ("unistd.h"        ${HDF_PREFIX}_HAVE_UNISTD_H)
 CHECK_INCLUDE_FILE_CONCAT ("sys/ioctl.h"     ${HDF_PREFIX}_HAVE_SYS_IOCTL_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/stat.h"      ${HDF_PREFIX}_HAVE_SYS_STAT_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/resource.h"  ${HDF_PREFIX}_HAVE_SYS_RESOURCE_H)
 CHECK_INCLUDE_FILE_CONCAT ("sys/socket.h"    ${HDF_PREFIX}_HAVE_SYS_SOCKET_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/stat.h"      ${HDF_PREFIX}_HAVE_SYS_STAT_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/time.h"      ${HDF_PREFIX}_HAVE_SYS_TIME_H)
 CHECK_INCLUDE_FILE_CONCAT ("sys/types.h"     ${HDF_PREFIX}_HAVE_SYS_TYPES_H)
-CHECK_INCLUDE_FILE_CONCAT ("stddef.h"        ${HDF_PREFIX}_HAVE_STDDEF_H)
-CHECK_INCLUDE_FILE_CONCAT ("setjmp.h"        ${HDF_PREFIX}_HAVE_SETJMP_H)
 CHECK_INCLUDE_FILE_CONCAT ("features.h"      ${HDF_PREFIX}_HAVE_FEATURES_H)
 CHECK_INCLUDE_FILE_CONCAT ("dirent.h"        ${HDF_PREFIX}_HAVE_DIRENT_H)
+CHECK_INCLUDE_FILE_CONCAT ("setjmp.h"        ${HDF_PREFIX}_HAVE_SETJMP_H)
+CHECK_INCLUDE_FILE_CONCAT ("stddef.h"        ${HDF_PREFIX}_HAVE_STDDEF_H)
 CHECK_INCLUDE_FILE_CONCAT ("stdint.h"        ${HDF_PREFIX}_HAVE_STDINT_H)
+CHECK_INCLUDE_FILE_CONCAT ("unistd.h"        ${HDF_PREFIX}_HAVE_UNISTD_H)
 
 # IF the c compiler found stdint, check the C++ as well. On some systems this
 # file will be found by C but not C++, only do this test IF the C++ compiler
@@ -219,8 +215,8 @@ if (${HDF_PREFIX}_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
   if (NOT ${HDF_PREFIX}_HAVE_STDINT_H_CXX)
     set (${HDF_PREFIX}_HAVE_STDINT_H "" CACHE INTERNAL "Have includes HAVE_STDINT_H")
     set (USE_INCLUDES ${USE_INCLUDES} "stdint.h")
-  endif (NOT ${HDF_PREFIX}_HAVE_STDINT_H_CXX)
-endif (${HDF_PREFIX}_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
+  endif ()
+endif ()
 
 # Darwin
 CHECK_INCLUDE_FILE_CONCAT ("mach/mach_time.h" ${HDF_PREFIX}_HAVE_MACH_MACH_TIME_H)
@@ -229,16 +225,16 @@ CHECK_INCLUDE_FILE_CONCAT ("mach/mach_time.h" ${HDF_PREFIX}_HAVE_MACH_MACH_TIME_
 CHECK_INCLUDE_FILE_CONCAT ("io.h"            ${HDF_PREFIX}_HAVE_IO_H)
 if (NOT CYGWIN)
   CHECK_INCLUDE_FILE_CONCAT ("winsock2.h"      ${HDF_PREFIX}_HAVE_WINSOCK2_H)
-endif (NOT CYGWIN)
+endif ()
 CHECK_INCLUDE_FILE_CONCAT ("sys/timeb.h"     ${HDF_PREFIX}_HAVE_SYS_TIMEB_H)
 
 if (CMAKE_SYSTEM_NAME MATCHES "OSF")
   CHECK_INCLUDE_FILE_CONCAT ("sys/sysinfo.h" ${HDF_PREFIX}_HAVE_SYS_SYSINFO_H)
   CHECK_INCLUDE_FILE_CONCAT ("sys/proc.h"    ${HDF_PREFIX}_HAVE_SYS_PROC_H)
-else (CMAKE_SYSTEM_NAME MATCHES "OSF")
+else ()
   set (${HDF_PREFIX}_HAVE_SYS_SYSINFO_H "" CACHE INTERNAL "" FORCE)
   set (${HDF_PREFIX}_HAVE_SYS_PROC_H    "" CACHE INTERNAL "" FORCE)
-endif (CMAKE_SYSTEM_NAME MATCHES "OSF")
+endif ()
 
 CHECK_INCLUDE_FILE_CONCAT ("globus/common.h" ${HDF_PREFIX}_HAVE_GLOBUS_COMMON_H)
 CHECK_INCLUDE_FILE_CONCAT ("pdb.h"           ${HDF_PREFIX}_HAVE_PDB_H)
@@ -295,58 +291,36 @@ if (NOT WINDOWS)
     # check should be generalized for all POSIX systems as it
     # is in the Autotools.
     if (TEST_LFS_WORKS_COMPILE)
-      if (TEST_LFS_WORKS_RUN  MATCHES 0)
+      if (TEST_LFS_WORKS_RUN MATCHES 0)
         set (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg})
         set (LARGEFILE 1)
         set (HDF_EXTRA_FLAGS ${HDF_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
         message (STATUS "${msg}... yes")
-      else (TEST_LFS_WORKS_RUN  MATCHES 0)
+      else ()
         set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
         message (STATUS "${msg}... no")
         file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
               "Test TEST_LFS_WORKS Run failed with the following output and exit code:\n ${OUTPUT}\n"
         )
-      endif (TEST_LFS_WORKS_RUN  MATCHES 0)
-    else (TEST_LFS_WORKS_COMPILE )
+      endif ()
+    else ()
       set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
       message (STATUS "${msg}... no")
       file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
           "Test TEST_LFS_WORKS Compile failed with the following output:\n ${OUTPUT}\n"
       )
-    endif (TEST_LFS_WORKS_COMPILE)
-  endif (HDF_ENABLE_LARGE_FILE)
+    endif ()
+  endif ()
   set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${HDF_EXTRA_FLAGS})
-  endif (NOT ${HDF_PREFIX}_HAVE_SOLARIS AND NOT ${HDF_PREFIX}_HAVE_DARWIN)
-endif (NOT WINDOWS)
+  endif ()
+endif ()
 
 add_definitions (${HDF_EXTRA_FLAGS})
 
 #-----------------------------------------------------------------------------
-# Check for HAVE_OFF64_T functionality
-#-----------------------------------------------------------------------------
-if (NOT WINDOWS OR MINGW)
-  HDF_FUNCTION_TEST (HAVE_OFF64_T)
-  if (${HDF_PREFIX}_HAVE_OFF64_T)
-    CHECK_FUNCTION_EXISTS (lseek64            ${HDF_PREFIX}_HAVE_LSEEK64)
-    CHECK_FUNCTION_EXISTS (fseeko64           ${HDF_PREFIX}_HAVE_FSEEKO64)
-    CHECK_FUNCTION_EXISTS (ftello64           ${HDF_PREFIX}_HAVE_FTELLO64)
-    CHECK_FUNCTION_EXISTS (ftruncate64        ${HDF_PREFIX}_HAVE_FTRUNCATE64)
-  endif (${HDF_PREFIX}_HAVE_OFF64_T)
-
-  CHECK_FUNCTION_EXISTS (fseeko               ${HDF_PREFIX}_HAVE_FSEEKO)
-  CHECK_FUNCTION_EXISTS (ftello               ${HDF_PREFIX}_HAVE_FTELLO)
-
-  HDF_FUNCTION_TEST (HAVE_STAT64_STRUCT)
-  if (HAVE_STAT64_STRUCT)
-    CHECK_FUNCTION_EXISTS (fstat64            ${HDF_PREFIX}_HAVE_FSTAT64)
-    CHECK_FUNCTION_EXISTS (stat64             ${HDF_PREFIX}_HAVE_STAT64)
-  endif (HAVE_STAT64_STRUCT)
-endif (NOT WINDOWS OR MINGW)
-
-#-----------------------------------------------------------------------------
 #  Check the size in bytes of all the int and float types
 #-----------------------------------------------------------------------------
-MACRO (HDF_CHECK_TYPE_SIZE type var)
+macro (HDF_CHECK_TYPE_SIZE type var)
   set (aType ${type})
   set (aVar  ${var})
 #  message (STATUS "Checking size of ${aType} and storing into ${aVar}")
@@ -354,8 +328,8 @@ MACRO (HDF_CHECK_TYPE_SIZE type var)
   if (NOT ${aVar})
     set (${aVar} 0 CACHE INTERNAL "SizeOf for ${aType}")
 #    message (STATUS "Size of ${aType} was NOT Found")
-  endif (NOT ${aVar})
-ENDMACRO (HDF_CHECK_TYPE_SIZE)
+  endif ()
+endmacro ()
 
 HDF_CHECK_TYPE_SIZE (char           ${HDF_PREFIX}_SIZEOF_CHAR)
 HDF_CHECK_TYPE_SIZE (short          ${HDF_PREFIX}_SIZEOF_SHORT)
@@ -363,12 +337,12 @@ HDF_CHECK_TYPE_SIZE (int            ${HDF_PREFIX}_SIZEOF_INT)
 HDF_CHECK_TYPE_SIZE (unsigned       ${HDF_PREFIX}_SIZEOF_UNSIGNED)
 if (NOT APPLE)
   HDF_CHECK_TYPE_SIZE (long         ${HDF_PREFIX}_SIZEOF_LONG)
-endif (NOT APPLE)
+endif ()
 HDF_CHECK_TYPE_SIZE ("long long"    ${HDF_PREFIX}_SIZEOF_LONG_LONG)
 HDF_CHECK_TYPE_SIZE (__int64        ${HDF_PREFIX}_SIZEOF___INT64)
 if (NOT ${HDF_PREFIX}_SIZEOF___INT64)
   set (${HDF_PREFIX}_SIZEOF___INT64 0)
-endif (NOT ${HDF_PREFIX}_SIZEOF___INT64)
+endif ()
 
 HDF_CHECK_TYPE_SIZE (float          ${HDF_PREFIX}_SIZEOF_FLOAT)
 HDF_CHECK_TYPE_SIZE (double         ${HDF_PREFIX}_SIZEOF_DOUBLE)
@@ -407,17 +381,17 @@ if (NOT APPLE)
   HDF_CHECK_TYPE_SIZE (ssize_t      ${HDF_PREFIX}_SIZEOF_SSIZE_T)
   if (NOT ${HDF_PREFIX}_SIZEOF_SSIZE_T)
     set (${HDF_PREFIX}_SIZEOF_SSIZE_T 0)
-  endif (NOT ${HDF_PREFIX}_SIZEOF_SSIZE_T)
+  endif ()
   if (NOT WINDOWS)
     HDF_CHECK_TYPE_SIZE (ptrdiff_t    ${HDF_PREFIX}_SIZEOF_PTRDIFF_T)
-  endif (NOT WINDOWS)
-endif (NOT APPLE)
+  endif ()
+endif ()
 
 HDF_CHECK_TYPE_SIZE (off_t          ${HDF_PREFIX}_SIZEOF_OFF_T)
 HDF_CHECK_TYPE_SIZE (off64_t        ${HDF_PREFIX}_SIZEOF_OFF64_T)
 if (NOT ${HDF_PREFIX}_SIZEOF_OFF64_T)
   set (${HDF_PREFIX}_SIZEOF_OFF64_T 0)
-endif (NOT ${HDF_PREFIX}_SIZEOF_OFF64_T)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Extra C99 types
@@ -428,86 +402,47 @@ CHECK_INCLUDE_FILE_CONCAT (stdbool.h    ${HDF_PREFIX}_HAVE_STDBOOL_H)
 if (HAVE_STDBOOL_H)
   set (CMAKE_EXTRA_INCLUDE_FILES stdbool.h)
   HDF_CHECK_TYPE_SIZE (bool         ${HDF_PREFIX}_SIZEOF_BOOL)
-else (HAVE_STDBOOL_H)
+else ()
   HDF_CHECK_TYPE_SIZE (_Bool        ${HDF_PREFIX}_SIZEOF_BOOL)
-endif (HAVE_STDBOOL_H)
+endif ()
 
 if (NOT WINDOWS)
-  #-----------------------------------------------------------------------------
-  # Check if the dev_t type is a scalar type
-  #-----------------------------------------------------------------------------
-  HDF_FUNCTION_TEST (DEV_T_IS_SCALAR)
-
   # ----------------------------------------------------------------------
-  # Check for MONOTONIC_TIMER support (used in clock_gettime).  This has
-  # to be done after any POSIX/BSD defines to ensure that the test gets
-  # the correct POSIX level on linux.
-  CHECK_VARIABLE_EXISTS (CLOCK_MONOTONIC HAVE_CLOCK_MONOTONIC)
-
-  #-----------------------------------------------------------------------------
-  # Check a bunch of time functions
-  #-----------------------------------------------------------------------------
-  CHECK_FUNCTION_EXISTS (gettimeofday      ${HDF_PREFIX}_HAVE_GETTIMEOFDAY)
-  foreach (test
-      HAVE_TM_GMTOFF
-      HAVE___TM_GMTOFF
-#      HAVE_TIMEZONE
-      HAVE_STRUCT_TIMEZONE
-      GETTIMEOFDAY_GIVES_TZ
-      TIME_WITH_SYS_TIME
-      HAVE_TM_ZONE
-      HAVE_STRUCT_TM_TM_ZONE
-  )
-    HDF_FUNCTION_TEST (${test})
-  endforeach (test)
-  if (NOT CYGWIN AND NOT MINGW)
-      HDF_FUNCTION_TEST (HAVE_TIMEZONE)
-#      HDF_FUNCTION_TEST (HAVE_STAT_ST_BLOCKS)
-  endif (NOT CYGWIN AND NOT MINGW)
-
-  # ----------------------------------------------------------------------
-  # Does the struct stat have the st_blocks field?  This field is not Posix.
-  #
-  HDF_FUNCTION_TEST (HAVE_STAT_ST_BLOCKS)
-
-  # ----------------------------------------------------------------------
-  # How do we figure out the width of a tty in characters?
+  # cygwin user credentials are different then on linux
   #
-  CHECK_FUNCTION_EXISTS (ioctl             ${HDF_PREFIX}_HAVE_IOCTL)
-  HDF_FUNCTION_TEST (HAVE_STRUCT_VIDEOCONFIG)
-  HDF_FUNCTION_TEST (HAVE_STRUCT_TEXT_INFO)
-  CHECK_FUNCTION_EXISTS (_getvideoconfig   ${HDF_PREFIX}_HAVE__GETVIDEOCONFIG)
-  CHECK_FUNCTION_EXISTS (gettextinfo       ${HDF_PREFIX}_HAVE_GETTEXTINFO)
-  CHECK_FUNCTION_EXISTS (_scrsize          ${HDF_PREFIX}_HAVE__SCRSIZE)
   if (NOT CYGWIN AND NOT MINGW)
-    CHECK_FUNCTION_EXISTS (GetConsoleScreenBufferInfo    ${HDF_PREFIX}_HAVE_GETCONSOLESCREENBUFFERINFO)
-  endif (NOT CYGWIN AND NOT MINGW)
-  CHECK_SYMBOL_EXISTS (TIOCGWINSZ "sys/ioctl.h" ${HDF_PREFIX}_HAVE_TIOCGWINSZ)
-  CHECK_SYMBOL_EXISTS (TIOCGETD   "sys/ioctl.h" ${HDF_PREFIX}_HAVE_TIOCGETD)
-endif (NOT WINDOWS)
+    CHECK_FUNCTION_EXISTS (getpwuid        ${HDF_PREFIX}_HAVE_GETPWUID)
+  endif ()
+endif ()
 
 #-----------------------------------------------------------------------------
 # Check for some functions that are used
 #
 CHECK_FUNCTION_EXISTS (alarm             ${HDF_PREFIX}_HAVE_ALARM)
+CHECK_FUNCTION_EXISTS (fcntl             ${HDF_PREFIX}_HAVE_FCNTL)
+CHECK_FUNCTION_EXISTS (flock             ${HDF_PREFIX}_HAVE_FLOCK)
 CHECK_FUNCTION_EXISTS (fork              ${HDF_PREFIX}_HAVE_FORK)
 CHECK_FUNCTION_EXISTS (frexpf            ${HDF_PREFIX}_HAVE_FREXPF)
 CHECK_FUNCTION_EXISTS (frexpl            ${HDF_PREFIX}_HAVE_FREXPL)
 
 CHECK_FUNCTION_EXISTS (gethostname       ${HDF_PREFIX}_HAVE_GETHOSTNAME)
-CHECK_FUNCTION_EXISTS (getpwuid          ${HDF_PREFIX}_HAVE_GETPWUID)
 CHECK_FUNCTION_EXISTS (getrusage         ${HDF_PREFIX}_HAVE_GETRUSAGE)
+CHECK_FUNCTION_EXISTS (llround           ${HDF_PREFIX}_HAVE_LLROUND)
+CHECK_FUNCTION_EXISTS (llroundf          ${HDF_PREFIX}_HAVE_LLROUNDF)
+CHECK_FUNCTION_EXISTS (lround            ${HDF_PREFIX}_HAVE_LROUND)
+CHECK_FUNCTION_EXISTS (lroundf           ${HDF_PREFIX}_HAVE_LROUNDF)
 CHECK_FUNCTION_EXISTS (lstat             ${HDF_PREFIX}_HAVE_LSTAT)
 
 CHECK_FUNCTION_EXISTS (rand_r            ${HDF_PREFIX}_HAVE_RAND_R)
 CHECK_FUNCTION_EXISTS (random            ${HDF_PREFIX}_HAVE_RANDOM)
+CHECK_FUNCTION_EXISTS (round             ${HDF_PREFIX}_HAVE_ROUND)
+CHECK_FUNCTION_EXISTS (roundf            ${HDF_PREFIX}_HAVE_ROUNDF)
 CHECK_FUNCTION_EXISTS (setsysinfo        ${HDF_PREFIX}_HAVE_SETSYSINFO)
 
 CHECK_FUNCTION_EXISTS (signal            ${HDF_PREFIX}_HAVE_SIGNAL)
 CHECK_FUNCTION_EXISTS (longjmp           ${HDF_PREFIX}_HAVE_LONGJMP)
 CHECK_FUNCTION_EXISTS (setjmp            ${HDF_PREFIX}_HAVE_SETJMP)
 CHECK_FUNCTION_EXISTS (siglongjmp        ${HDF_PREFIX}_HAVE_SIGLONGJMP)
-CHECK_FUNCTION_EXISTS (sigsetjmp         ${HDF_PREFIX}_HAVE_SIGSETJMP)
 CHECK_FUNCTION_EXISTS (sigprocmask       ${HDF_PREFIX}_HAVE_SIGPROCMASK)
 
 CHECK_FUNCTION_EXISTS (snprintf          ${HDF_PREFIX}_HAVE_SNPRINTF)
@@ -521,179 +456,6 @@ CHECK_FUNCTION_EXISTS (asprintf          ${HDF_PREFIX}_HAVE_ASPRINTF)
 CHECK_FUNCTION_EXISTS (vasprintf         ${HDF_PREFIX}_HAVE_VASPRINTF)
 CHECK_FUNCTION_EXISTS (waitpid           ${HDF_PREFIX}_HAVE_WAITPID)
 
-CHECK_FUNCTION_EXISTS (vsnprintf         ${HDF_PREFIX}_HAVE_VSNPRINTF)
-if (NOT WINDOWS)
-  if (${HDF_PREFIX}_HAVE_VSNPRINTF)
-    HDF_FUNCTION_TEST (VSNPRINTF_WORKS)
-  endif (${HDF_PREFIX}_HAVE_VSNPRINTF)
-endif (NOT WINDOWS)
-
-#-----------------------------------------------------------------------------
-# sigsetjmp is special; may actually be a macro
-#-----------------------------------------------------------------------------
-if (NOT ${HDF_PREFIX}_HAVE_SIGSETJMP)
-  if (${HDF_PREFIX}_HAVE_SETJMP_H)
-    CHECK_SYMBOL_EXISTS (sigsetjmp "setjmp.h" ${HDF_PREFIX}_HAVE_MACRO_SIGSETJMP)
-    if (${HDF_PREFIX}_HAVE_MACRO_SIGSETJMP)
-      set (${HDF_PREFIX}_HAVE_SIGSETJMP 1)
-    endif (${HDF_PREFIX}_HAVE_MACRO_SIGSETJMP)
-  endif (${HDF_PREFIX}_HAVE_SETJMP_H)
-endif (NOT ${HDF_PREFIX}_HAVE_SIGSETJMP)
-
-#-----------------------------------------------------------------------------
-# Check a bunch of other functions
-#-----------------------------------------------------------------------------
-if (NOT WINDOWS)
-  foreach (test
-      HAVE_ATTRIBUTE
-      HAVE_C99_FUNC
-#      STDC_HEADERS
-      HAVE_FUNCTION
-      HAVE_C99_DESIGNATED_INITIALIZER
-      SYSTEM_SCOPE_THREADS
-      HAVE_SOCKLEN_T
-      CXX_HAVE_OFFSETOF
-  )
-    HDF_FUNCTION_TEST (${test})
-  endforeach (test)
-endif (NOT WINDOWS)
-
-# For other CXX specific tests, use this MACRO.
-MACRO (HDF_CXX_FUNCTION_TEST OTHER_TEST)
-  if ("${OTHER_TEST}" MATCHES "^${OTHER_TEST}$")
-    set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}")
-    set (OTHER_TEST_ADD_LIBRARIES)
-    if (CMAKE_REQUIRED_LIBRARIES)
-      set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
-    endif (CMAKE_REQUIRED_LIBRARIES)
-
-    foreach (def
-        HAVE_SYS_TIME_H
-        HAVE_UNISTD_H
-        HAVE_SYS_TYPES_H
-        HAVE_SYS_SOCKET_H
-    )
-      if ("${${HDF_PREFIX}_${def}}")
-        set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}")
-      endif ("${${HDF_PREFIX}_${def}}")
-    endforeach (def)
-
-    if (LARGEFILE)
-      set (MACRO_CHECK_FUNCTION_DEFINITIONS
-          "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
-      )
-    endif (LARGEFILE)
-
-    #message (STATUS "Performing ${OTHER_TEST}")
-    TRY_COMPILE (${OTHER_TEST}
-        ${CMAKE_BINARY_DIR}
-        ${HDF_RESOURCES_EXT_DIR}/HDFCXXTests.cpp
-        CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
-        "${OTHER_TEST_ADD_LIBRARIES}"
-        OUTPUT_VARIABLE OUTPUT
-    )
-    if (${OTHER_TEST} EQUAL 0)
-      set (${OTHER_TEST} 1 CACHE INTERNAL "CXX test ${FUNCTION}")
-      message (STATUS "Performing CXX Test ${OTHER_TEST} - Success")
-    else (${OTHER_TEST} EQUAL 0)
-      message (STATUS "Performing CXX Test ${OTHER_TEST} - Failed")
-      set (${OTHER_TEST} "" CACHE INTERNAL "CXX test ${FUNCTION}")
-      file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
-          "Performing CXX Test ${OTHER_TEST} failed with the following output:\n"
-          "${OUTPUT}\n"
-      )
-    endif (${OTHER_TEST} EQUAL 0)
-  endif ("${OTHER_TEST}" MATCHES "^${OTHER_TEST}$")
-ENDMACRO (HDF_CXX_FUNCTION_TEST)
-
-#-----------------------------------------------------------------------------
-# Check a bunch of cxx functions
-#-----------------------------------------------------------------------------
-if (CMAKE_CXX_COMPILER_LOADED)
-  foreach (test
-      OLD_HEADER_FILENAME
-      ${HDF_PREFIX}_NO_NAMESPACE
-      ${HDF_PREFIX}_NO_STD
-      BOOL_NOTDEFINED
-      NO_STATIC_CAST
-  )
-    HDF_CXX_FUNCTION_TEST (${test})
-  endforeach (test)
-endif (CMAKE_CXX_COMPILER_LOADED)
-
-#-----------------------------------------------------------------------------
-# Check if InitOnceExecuteOnce is available
-#-----------------------------------------------------------------------------
-if (WINDOWS)
-  if (NOT HDF_NO_IOEO_TEST)
-  message (STATUS "Checking for InitOnceExecuteOnce:")
-  if ("${${HDF_PREFIX}_HAVE_IOEO}" MATCHES "^${${HDF_PREFIX}_HAVE_IOEO}$")
-    if (LARGEFILE)
-      set (CMAKE_REQUIRED_DEFINITIONS
-          "${CURRENT_TEST_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
-      )
-    endif (LARGEFILE)
-    set (MACRO_CHECK_FUNCTION_DEFINITIONS
-      "-DHAVE_IOEO ${CMAKE_REQUIRED_FLAGS}")
-    if (CMAKE_REQUIRED_LIBRARIES)
-      set (CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
-        "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
-    else (CMAKE_REQUIRED_LIBRARIES)
-      set (CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
-    endif (CMAKE_REQUIRED_LIBRARIES)
-    if (CMAKE_REQUIRED_INCLUDES)
-      set (CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
-        "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
-    else (CMAKE_REQUIRED_INCLUDES)
-      set (CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
-    endif (CMAKE_REQUIRED_INCLUDES)
-
-    TRY_RUN(HAVE_IOEO_EXITCODE HAVE_IOEO_COMPILED
-      ${CMAKE_BINARY_DIR}
-      ${HDF_RESOURCES_EXT_DIR}/HDFTests.c
-      COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
-      CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
-      -DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH}
-      "${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
-      "${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
-      COMPILE_OUTPUT_VARIABLE OUTPUT)
-    # if it did not compile make the return value fail code of 1
-    if (NOT HAVE_IOEO_COMPILED)
-      set (HAVE_IOEO_EXITCODE 1)
-    endif (NOT HAVE_IOEO_COMPILED)
-    # if the return value was 0 then it worked
-    if ("${HAVE_IOEO_EXITCODE}" EQUAL 0)
-      set (${HDF_PREFIX}_HAVE_IOEO 1 CACHE INTERNAL "Test InitOnceExecuteOnce")
-      message (STATUS "Performing Test InitOnceExecuteOnce - Success")
-      file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
-        "Performing C SOURCE FILE Test InitOnceExecuteOnce succeded with the following output:\n"
-        "${OUTPUT}\n"
-        "Return value: ${HAVE_IOEO}\n")
-    else ("${HAVE_IOEO_EXITCODE}" EQUAL 0)
-      if (CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES  "FAILED_TO_RUN")
-        set (${HDF_PREFIX}_HAVE_IOEO "${HAVE_IOEO_EXITCODE}")
-      else (CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES  "FAILED_TO_RUN")
-        set (${HDF_PREFIX}_HAVE_IOEO "" CACHE INTERNAL "Test InitOnceExecuteOnce")
-      endif (CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES  "FAILED_TO_RUN")
-
-      message (STATUS "Performing Test InitOnceExecuteOnce - Failed")
-      file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
-        "Performing InitOnceExecuteOnce Test  failed with the following output:\n"
-        "${OUTPUT}\n"
-        "Return value: ${HAVE_IOEO_EXITCODE}\n")
-    endif ("${HAVE_IOEO_EXITCODE}" EQUAL 0)
-  endif ("${${HDF_PREFIX}_HAVE_IOEO}" MATCHES "^${${HDF_PREFIX}_HAVE_IOEO}$")
-  endif (NOT HDF_NO_IOEO_TEST)
-endif (WINDOWS)
-
-#-----------------------------------------------------------------------------
-# Determine how 'inline' is used
-#-----------------------------------------------------------------------------
-foreach (inline_test inline __inline__ __inline)
-  string (TOUPPER ${inline_test} INLINE_TEST_MACRO)
-  HDF_FUNCTION_TEST (HAVE_${INLINE_TEST_MACRO})
-endforeach (inline_test)
-
 #-----------------------------------------------------------------------------
 # Check how to print a Long Long integer
 #-----------------------------------------------------------------------------
@@ -703,7 +465,7 @@ if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES "
   set (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH")
   if (${HDF_PREFIX}_SIZEOF_LONG_LONG)
     set (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG")
-  endif (${HDF_PREFIX}_SIZEOF_LONG_LONG)
+  endif ()
   TRY_RUN (${HDF_PREFIX}_PRINTF_LL_TEST_RUN   ${HDF_PREFIX}_PRINTF_LL_TEST_COMPILE
       ${CMAKE_BINARY_DIR}
       ${HDF_RESOURCES_EXT_DIR}/HDFTests.c
@@ -715,29 +477,21 @@ if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES "
       string(REGEX REPLACE ".*PRINTF_LL_WIDTH=\\[(.*)\\].*" "\\1" ${HDF_PREFIX}_PRINTF_LL "${OUTPUT}")
       set (${HDF_PREFIX}_PRINTF_LL_WIDTH "\"${${HDF_PREFIX}_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll")
       set (PRINT_LL_FOUND 1)
-    else (${HDF_PREFIX}_PRINTF_LL_TEST_RUN MATCHES 0)
+    else ()
       message ("Width test failed with result: ${${HDF_PREFIX}_PRINTF_LL_TEST_RUN}")
-    endif (${HDF_PREFIX}_PRINTF_LL_TEST_RUN MATCHES 0)
-  else (${HDF_PREFIX}_PRINTF_LL_TEST_COMPILE)
+    endif ()
+  else ()
     file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
         "Test ${HDF_PREFIX}_PRINTF_LL_WIDTH failed with the following output:\n ${OUTPUT}\n"
     )
-  endif (${HDF_PREFIX}_PRINTF_LL_TEST_COMPILE)
+  endif ()
 
   if (PRINT_LL_FOUND)
     message (STATUS "Checking for appropriate format for 64 bit long: found ${${HDF_PREFIX}_PRINTF_LL_WIDTH}")
-  else (PRINT_LL_FOUND)
+  else ()
     message (STATUS "Checking for appropriate format for 64 bit long: not found")
     set (${HDF_PREFIX}_PRINTF_LL_WIDTH "\"unknown\"" CACHE INTERNAL
         "Width for printf for type `long long' or `__int64', us. `ll"
     )
-  endif (PRINT_LL_FOUND)
-endif (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES "unknown")
-
-# ----------------------------------------------------------------------
-# Set the flag to indicate that the machine can handle converting
-# denormalized floating-point values.
-# (This flag should be set for all machines, except for the Crays, where
-# the cache value is set in it's config file)
-#
-set (${HDF_PREFIX}_CONVERT_DENORMAL_FLOAT 1)
+  endif ()
+endif ()
diff --git a/config/cmake_ext_mod/FindSZIP.cmake b/config/cmake_ext_mod/FindSZIP.cmake
index 5f0f031..bb5f8d6 100644
--- a/config/cmake_ext_mod/FindSZIP.cmake
+++ b/config/cmake_ext_mod/FindSZIP.cmake
@@ -24,7 +24,7 @@
 # made to remove references to Qt and make this file more generally applicable
 #########################################################################
 
-MACRO (SZIP_ADJUST_LIB_VARS basename)
+macro (SZIP_ADJUST_LIB_VARS basename)
   if (${basename}_INCLUDE_DIR)
 
     # if only the release version was found, set the debug variable also to the release version
@@ -32,38 +32,37 @@ MACRO (SZIP_ADJUST_LIB_VARS basename)
       set (${basename}_LIBRARY_DEBUG ${${basename}_LIBRARY_RELEASE})
       set (${basename}_LIBRARY       ${${basename}_LIBRARY_RELEASE})
       set (${basename}_LIBRARIES     ${${basename}_LIBRARY_RELEASE})
-    endif (${basename}_LIBRARY_RELEASE AND NOT ${basename}_LIBRARY_DEBUG)
+    endif ()
 
     # if only the debug version was found, set the release variable also to the debug version
     if (${basename}_LIBRARY_DEBUG AND NOT ${basename}_LIBRARY_RELEASE)
       set (${basename}_LIBRARY_RELEASE ${${basename}_LIBRARY_DEBUG})
       set (${basename}_LIBRARY         ${${basename}_LIBRARY_DEBUG})
       set (${basename}_LIBRARIES       ${${basename}_LIBRARY_DEBUG})
-    endif (${basename}_LIBRARY_DEBUG AND NOT ${basename}_LIBRARY_RELEASE)
+    endif ()
     if (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE)
       # if the generator supports configuration types then set
       # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
       if (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
         set (${basename}_LIBRARY       optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG})
-      else (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
+      else ()
         # if there are no configuration types and CMAKE_BUILD_TYPE has no value
         # then just use the release libraries
         set (${basename}_LIBRARY       ${${basename}_LIBRARY_RELEASE} )
-      endif (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
+      endif ()
       set (${basename}_LIBRARIES       optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG})
-    endif (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE)
+    endif ()
 
     set (${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH "The ${basename} library")
 
     if (${basename}_LIBRARY)
       set (${basename}_FOUND 1)
-    endif (${basename}_LIBRARY)
-
-  endif (${basename}_INCLUDE_DIR )
+    endif ()
+  endif ()
 
   # Make variables changeble to the advanced user
   MARK_AS_ADVANCED (${basename}_LIBRARY ${basename}_LIBRARY_RELEASE ${basename}_LIBRARY_DEBUG ${basename}_INCLUDE_DIR )
-ENDMACRO (SZIP_ADJUST_LIB_VARS)
+endmacro ()
 
 
 # Look for the header file.
@@ -93,10 +92,10 @@ FIND_PATH (SZIP_INCLUDE_DIR
 if (WIN32)
     set (SZIP_SEARCH_DEBUG_NAMES "sz_d;libsz_d")
     set (SZIP_SEARCH_RELEASE_NAMES "sz;libsz;libszip")
-else (WIN32)
+else ()
     set (SZIP_SEARCH_DEBUG_NAMES "sz_d")
     set (SZIP_SEARCH_RELEASE_NAMES "sz;szip")
-endif (WIN32)
+endif ()
 
 # Look for the library.
 FIND_LIBRARY (SZIP_LIBRARY_DEBUG
@@ -120,16 +119,15 @@ if (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
   if (SZIP_LIBRARY_DEBUG)
     get_filename_component (SZIP_LIBRARY_PATH ${SZIP_LIBRARY_DEBUG} PATH)
     set (SZIP_LIB_DIR  ${SZIP_LIBRARY_PATH})
-  elseif (SZIP_LIBRARY_RELEASE)
+  elseif ()
     get_filename_component (SZIP_LIBRARY_PATH ${SZIP_LIBRARY_RELEASE} PATH)
     set (SZIP_LIB_DIR  ${SZIP_LIBRARY_PATH})
-  endif (SZIP_LIBRARY_DEBUG)
-
-else (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
+  endif ()
+else ()
   set (SZIP_FOUND 0)
   set (SZIP_LIBRARIES)
   set (SZIP_INCLUDE_DIRS)
-endif (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
+endif ()
 
 # Report the results.
 if (NOT SZIP_FOUND)
@@ -138,12 +136,12 @@ if (NOT SZIP_FOUND)
   )
   if (NOT SZIP_FIND_QUIETLY)
     message (STATUS "${SZIP_DIR_MESSAGE}")
-  else (NOT SZIP_FIND_QUIETLY)
+  else ()
     if (SZIP_FIND_REQUIRED)
       message (FATAL_ERROR "SZip was NOT found and is Required by this project")
-    endif (SZIP_FIND_REQUIRED)
-  endif (NOT SZIP_FIND_QUIETLY)
-endif (NOT SZIP_FOUND)
+    endif ()
+  endif ()
+endif ()
 
 if (SZIP_FOUND)
   include (CheckSymbolExists)
@@ -161,7 +159,7 @@ if (SZIP_FOUND)
   set (CMAKE_REQUIRED_FLAGS    ${CMAKE_REQUIRED_FLAGS_SAVE})
   #
   #############################################
-endif (SZIP_FOUND)
+endif ()
 
 if (FIND_SZIP_DEBUG)
   message (STATUS "SZIP_INCLUDE_DIR: ${SZIP_INCLUDE_DIR}")
@@ -169,4 +167,4 @@ if (FIND_SZIP_DEBUG)
   message (STATUS "SZIP_LIBRARY_DEBUG: ${SZIP_LIBRARY_DEBUG}")
   message (STATUS "SZIP_LIBRARY_RELEASE: ${SZIP_LIBRARY_RELEASE}")
   message (STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
-endif (FIND_SZIP_DEBUG)
+endif ()
diff --git a/config/cmake_ext_mod/HDFCXXTests.cpp b/config/cmake_ext_mod/HDFCXXTests.cpp
index 6b47421..f5f6644 100644
--- a/config/cmake_ext_mod/HDFCXXTests.cpp
+++ b/config/cmake_ext_mod/HDFCXXTests.cpp
@@ -54,3 +54,38 @@ int main(void) {
 }
 
 #endif
+
+#ifdef CXX_HAVE_OFFSETOF
+
+#include <stdio.h>
+#include <stddef.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 index_st
+  {
+    unsigned char type;
+    unsigned char num;
+    unsigned int len;
+  };
+  typedef struct index_st index_t;
+  int x,y;
+  x = offsetof(struct index_st, len);
+  y = offsetof(index_t, num)
+
+  ;
+  return 0;
+}
+
+#endif
diff --git a/config/cmake_ext_mod/HDFLibMacros.cmake b/config/cmake_ext_mod/HDFLibMacros.cmake
index 3f91405..9d50f50 100644
--- a/config/cmake_ext_mod/HDFLibMacros.cmake
+++ b/config/cmake_ext_mod/HDFLibMacros.cmake
@@ -17,11 +17,13 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
             -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
             -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
             -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
+            -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
             -DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
     )
   elseif (${compress_type} MATCHES "GIT")
     EXTERNALPROJECT_ADD (JPEG
         GIT_REPOSITORY ${JPEG_URL}
+        GIT_TAG ${JPEG_BRANCH}
         INSTALL_COMMAND ""
         CMAKE_ARGS
             -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
@@ -32,6 +34,7 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
             -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
             -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
             -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
+            -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
             -DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
     )
   elseif (${compress_type} MATCHES "TGZ")
@@ -48,9 +51,10 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
             -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
             -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
             -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
+            -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
             -DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
     )
-  endif (${compress_type} MATCHES "SVN")
+  endif ()
   externalproject_get_property (JPEG BINARY_DIR SOURCE_DIR)
 
 ##include (${BINARY_DIR}/${JPEG_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
@@ -67,13 +71,13 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
     add_dependencies (JPEG jpeg-shared)
     set (JPEG_SHARED_LIBRARY "jpeg-shared")
     set (JPEG_LIBRARIES ${JPEG_LIBRARIES} ${JPEG_shared_LIBRARY})
-  endif (BUILD_SHARED_LIBS)
+  endif ()
 
   set (JPEG_INCLUDE_DIR_GEN "${BINARY_DIR}")
   set (JPEG_INCLUDE_DIR "${SOURCE_DIR}/src")
   set (JPEG_FOUND 1)
   set (JPEG_INCLUDE_DIRS ${JPEG_INCLUDE_DIR_GEN} ${JPEG_INCLUDE_DIR})
-endmacro (EXTERNAL_JPEG_LIBRARY)
+endmacro ()
 
 #-------------------------------------------------------------------------------
 macro (PACKAGE_JPEG_LIBRARY compress_type)
@@ -82,10 +86,10 @@ macro (PACKAGE_JPEG_LIBRARY compress_type)
       COMMENT "Copying ${JPEG_INCLUDE_DIR_GEN}/jconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
   )
   set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/jconfig.h)
-  if (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
+  if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
     add_dependencies (JPEG-GenHeader-Copy JPEG)
-  endif (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
-endmacro (PACKAGE_JPEG_LIBRARY)
+  endif ()
+endmacro ()
 
 #-------------------------------------------------------------------------------
 macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
@@ -103,13 +107,14 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
             -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
             -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
             -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
+            -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
             -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
             -DSZIP_ENABLE_ENCODING:BOOL=${encoding}
     )
   elseif (${compress_type} MATCHES "GIT")
     EXTERNALPROJECT_ADD (SZIP
         GIT_REPOSITORY ${SZIP_URL}
-        # [SVN_REVISION rev]
+        GIT_TAG ${SZIP_BRANCH}
         INSTALL_COMMAND ""
         CMAKE_ARGS
             -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
@@ -120,6 +125,7 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
             -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
             -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
             -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
+            -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
             -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
             -DSZIP_ENABLE_ENCODING:BOOL=${encoding}
     )
@@ -137,10 +143,11 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
             -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
             -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
             -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
+            -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
             -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
             -DSZIP_ENABLE_ENCODING:BOOL=${encoding}
     )
-  endif (${compress_type} MATCHES "SVN")
+  endif ()
   externalproject_get_property (SZIP BINARY_DIR SOURCE_DIR)
 
 ##include (${BINARY_DIR}/${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
@@ -157,13 +164,13 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
     add_dependencies (SZIP szip-shared)
     set (SZIP_SHARED_LIBRARY "szip-shared")
     set (SZIP_LIBRARIES ${SZIP_LIBRARIES} ${SZIP_shared_LIBRARY})
-  endif (BUILD_SHARED_LIBS)
+  endif ()
 
   set (SZIP_INCLUDE_DIR_GEN "${BINARY_DIR}")
   set (SZIP_INCLUDE_DIR "${SOURCE_DIR}/src")
   set (SZIP_FOUND 1)
   set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR_GEN} ${SZIP_INCLUDE_DIR})
-endmacro (EXTERNAL_SZIP_LIBRARY)
+endmacro ()
 
 #-------------------------------------------------------------------------------
 macro (PACKAGE_SZIP_LIBRARY compress_type)
@@ -172,10 +179,10 @@ macro (PACKAGE_SZIP_LIBRARY compress_type)
       COMMENT "Copying ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
   )
   set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/SZconfig.h)
-  if (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
+  if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
     add_dependencies (SZIP-GenHeader-Copy SZIP)
-  endif (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
-endmacro (PACKAGE_SZIP_LIBRARY)
+  endif ()
+endmacro ()
 
 #-------------------------------------------------------------------------------
 macro (EXTERNAL_ZLIB_LIBRARY compress_type)
@@ -193,12 +200,13 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
             -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
             -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
             -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
+            -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
             -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
     )
   elseif (${compress_type} MATCHES "GIT")
     EXTERNALPROJECT_ADD (ZLIB
         GIT_REPOSITORY ${ZLIB_URL}
-        # [SVN_REVISION rev]
+        GIT_TAG ${ZLIB_BRANCH}
         INSTALL_COMMAND ""
         CMAKE_ARGS
             -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
@@ -209,6 +217,7 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
             -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
             -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
             -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
+            -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
             -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
     )
   elseif (${compress_type} MATCHES "TGZ")
@@ -225,16 +234,17 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
             -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
             -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
             -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
+            -DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
             -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
     )
-  endif (${compress_type} MATCHES "SVN")
+  endif ()
   externalproject_get_property (ZLIB BINARY_DIR SOURCE_DIR)
 
   if (WIN32)
     set (ZLIB_LIB_NAME "zlib")
-  else (WIN32)
+  else ()
     set (ZLIB_LIB_NAME "z")
-  endif (WIN32)
+  endif ()
 ##include (${BINARY_DIR}/${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
 # Create imported target zlib-static
   add_library(zlib-static STATIC IMPORTED)
@@ -249,13 +259,13 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
     add_dependencies (ZLIB zlib-shared)
     set (ZLIB_SHARED_LIBRARY "zlib-shared")
     set (ZLIB_LIBRARIES ${ZLIB_LIBRARIES} ${ZLIB_SHARED_LIBRARY})
-  endif (BUILD_SHARED_LIBS)
+  endif ()
 
   set (ZLIB_INCLUDE_DIR_GEN "${BINARY_DIR}")
   set (ZLIB_INCLUDE_DIR "${SOURCE_DIR}")
   set (ZLIB_FOUND 1)
   set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR_GEN} ${ZLIB_INCLUDE_DIR})
-endmacro (EXTERNAL_ZLIB_LIBRARY)
+endmacro ()
 
 #-------------------------------------------------------------------------------
 macro (PACKAGE_ZLIB_LIBRARY compress_type)
@@ -264,7 +274,7 @@ macro (PACKAGE_ZLIB_LIBRARY compress_type)
       COMMENT "Copying ${ZLIB_INCLUDE_DIR_GEN}/zconf.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
   )
   set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/zconf.h)
-  if (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
+  if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
     add_dependencies (ZLIB-GenHeader-Copy ZLIB)
-  endif (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
-endmacro (PACKAGE_ZLIB_LIBRARY)
+  endif ()
+endmacro ()
diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake
index b2c4997..42eb1a4 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -1,7 +1,7 @@
 #-------------------------------------------------------------------------------
 macro (SET_GLOBAL_VARIABLE name value)
   set (${name} ${value} CACHE INTERNAL "Used to pass variables between directories" FORCE)
-endmacro (SET_GLOBAL_VARIABLE)
+endmacro ()
 
 #-------------------------------------------------------------------------------
 macro (IDE_GENERATED_PROPERTIES SOURCE_PATH HEADERS SOURCES)
@@ -14,7 +14,7 @@ macro (IDE_GENERATED_PROPERTIES SOURCE_PATH HEADERS SOURCES)
   #set_property (SOURCE ${HEADERS}
   #       PROPERTY MACOSX_PACKAGE_LOCATION Headers/${NAME}
   #)
-endmacro (IDE_GENERATED_PROPERTIES)
+endmacro ()
 
 #-------------------------------------------------------------------------------
 macro (IDE_SOURCE_PROPERTIES SOURCE_PATH HEADERS SOURCES)
@@ -31,45 +31,49 @@ macro (IDE_SOURCE_PROPERTIES SOURCE_PATH HEADERS SOURCES)
   #set_property (SOURCE ${HEADERS}
   #       PROPERTY MACOSX_PACKAGE_LOCATION Headers/${NAME}
   #)
-endmacro (IDE_SOURCE_PROPERTIES)
+endmacro ()
 
 #-------------------------------------------------------------------------------
 macro (TARGET_NAMING libtarget libtype)
   if (${libtype} MATCHES "SHARED")
     set_target_properties (${libtarget} PROPERTIES OUTPUT_NAME "${libtarget}${ARGN}")
-  endif (${libtype} MATCHES "SHARED")
-endmacro (TARGET_NAMING)
+  endif ()
+endmacro ()
 
 #-------------------------------------------------------------------------------
 macro (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent)
   if (WIN32 AND MSVC)
-    get_target_property (target_name ${libtarget} OUTPUT_NAME_RELWITHDEBINFO)
+    get_target_property (target_type ${libtarget} TYPE)
+    if (${libtype} MATCHES "SHARED")
+      set (targetfilename $<TARGET_PDB_FILE:${libtarget}>)
+    else ()
+      get_property (target_name TARGET ${libtarget} PROPERTY OUTPUT_NAME_RELWITHDEBINFO)
+      set (targetfilename $<TARGET_FILE_DIR:${libtarget}>/${target_name}.pdb)
+    endif ()
     install (
       FILES
-          ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${target_name}.pdb
+          ${targetfilename}
       DESTINATION
           ${targetdestination}
       CONFIGURATIONS RelWithDebInfo
       COMPONENT ${targetcomponent}
   )
-  endif (WIN32 AND MSVC)
-endmacro (INSTALL_TARGET_PDB)
+  endif ()
+endmacro ()
 
 #-------------------------------------------------------------------------------
 macro (INSTALL_PROGRAM_PDB progtarget targetdestination targetcomponent)
   if (WIN32 AND MSVC)
-    get_target_property (target_name ${progtarget} OUTPUT_NAME_RELWITHDEBINFO)
-    get_target_property (target_prefix ${progtarget} PREFIX)
     install (
       FILES
-          ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${target_prefix}${target_name}.pdb
+          $<TARGET_PDB_FILE:${progtarget}>
       DESTINATION
           ${targetdestination}
       CONFIGURATIONS RelWithDebInfo
       COMPONENT ${targetcomponent}
   )
-  endif (WIN32 AND MSVC)
-endmacro (INSTALL_PROGRAM_PDB)
+  endif ()
+endmacro ()
 
 #-------------------------------------------------------------------------------
 macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
@@ -77,19 +81,19 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
     if (WIN32)
       set (LIB_RELEASE_NAME "${libname}")
       set (LIB_DEBUG_NAME "${libname}_D")
-    else (WIN32)
+    else ()
       set (LIB_RELEASE_NAME "${libname}")
       set (LIB_DEBUG_NAME "${libname}_debug")
-    endif (WIN32)
-  else (${libtype} MATCHES "SHARED")
+    endif ()
+  else ()
     if (WIN32)
       set (LIB_RELEASE_NAME "lib${libname}")
       set (LIB_DEBUG_NAME "lib${libname}_D")
-    else (WIN32)
+    else ()
       set (LIB_RELEASE_NAME "${libname}")
       set (LIB_DEBUG_NAME "${libname}_debug")
-    endif (WIN32)
-  endif (${libtype} MATCHES "SHARED")
+    endif ()
+  endif ()
 
   set_target_properties (${libtarget}
       PROPERTIES
@@ -98,6 +102,18 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
       OUTPUT_NAME_MINSIZEREL     ${LIB_RELEASE_NAME}
       OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME}
   )
+  if (${libtype} MATCHES "STATIC")
+    if (WIN32)
+      set_target_properties (${libtarget}
+          PROPERTIES
+          COMPILE_PDB_NAME_DEBUG          ${LIB_DEBUG_NAME}
+          COMPILE_PDB_NAME_RELEASE        ${LIB_RELEASE_NAME}
+          COMPILE_PDB_NAME_MINSIZEREL     ${LIB_RELEASE_NAME}
+          COMPILE_PDB_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME}
+          COMPILE_PDB_OUTPUT_DIRECTORY    "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
+      )
+    endif ()
+  endif ()
 
   #----- Use MSVC Naming conventions for Shared Libraries
   if (MINGW AND ${libtype} MATCHES "SHARED")
@@ -107,9 +123,8 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
         IMPORT_PREFIX ""
         PREFIX ""
     )
-  endif (MINGW AND ${libtype} MATCHES "SHARED")
-
-endmacro (HDF_SET_LIB_OPTIONS)
+  endif ()
+endmacro ()
 
 #-------------------------------------------------------------------------------
 macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion)
@@ -117,12 +132,12 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion)
 
   if (${importtype} MATCHES "IMPORT")
     set (importprefix "${CMAKE_STATIC_LIBRARY_PREFIX}")
-  endif (${importtype} MATCHES "IMPORT")
+  endif ()
   if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
     set (IMPORT_LIB_NAME ${LIB_DEBUG_NAME})
-  else (${CMAKE_BUILD_TYPE} MATCHES "Debug")
+  else ()
     set (IMPORT_LIB_NAME ${LIB_RELEASE_NAME})
-  endif (${CMAKE_BUILD_TYPE} MATCHES "Debug")
+  endif ()
 
   if (${libtype} MATCHES "SHARED")
     if (WIN32)
@@ -131,91 +146,74 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion)
             IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${IMPORT_LIB_NAME}.lib"
             IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
         )
-      else (MINGW)
+      else ()
         set_target_properties (${libtarget} PROPERTIES
             IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
             IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
-         )
-      endif (MINGW)
-    else (WIN32)
+        )
+      endif ()
+    else ()
       if (CYGWIN)
         set_target_properties (${libtarget} PROPERTIES
             IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
             IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
         )
-      else (CYGWIN)
+      else ()
         set_target_properties (${libtarget} PROPERTIES
             IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
             IMPORTED_SONAME "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}.${libversion}"
             SOVERSION "${libversion}"
         )
-      endif (CYGWIN)
-    endif (WIN32)
-  else (${libtype} MATCHES "SHARED")
+      endif ()
+    endif ()
+  else ()
     if (WIN32 AND NOT MINGW)
       set_target_properties (${libtarget} PROPERTIES
           IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${IMPORT_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
           IMPORTED_LINK_INTERFACE_LANGUAGES "C"
       )
-    else (WIN32 AND NOT MINGW)
+    else ()
       set_target_properties (${libtarget} PROPERTIES
           IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_STATIC_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
           IMPORTED_LINK_INTERFACE_LANGUAGES "C"
       )
-    endif (WIN32 AND NOT MINGW)
-  endif (${libtype} MATCHES "SHARED")
-
-endmacro (HDF_IMPORT_SET_LIB_OPTIONS)
+    endif ()
+  endif ()
+endmacro ()
 
 #-------------------------------------------------------------------------------
 macro (TARGET_C_PROPERTIES wintarget libtype addcompileflags addlinkflags)
   if (MSVC)
     TARGET_MSVC_PROPERTIES (${wintarget} ${libtype} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}")
-  else (MSVC)
-    set_target_properties (${wintarget}
-        PROPERTIES
-            COMPILE_FLAGS "${addcompileflags}"
-            LINK_FLAGS "${addlinkflags}"
-    )
-  endif (MSVC)
-endmacro (TARGET_C_PROPERTIES)
+  else ()
+    set_target_properties (${wintarget} PROPERTIES COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "${addlinkflags}")
+  endif ()
+endmacro ()
 
 #-------------------------------------------------------------------------------
 macro (TARGET_MSVC_PROPERTIES wintarget libtype addcompileflags addlinkflags)
   if (MSVC)
-    set_target_properties (${wintarget}
-        PROPERTIES
-            COMPILE_FLAGS "${addcompileflags}"
-            LINK_FLAGS "${addlinkflags}"
-    )
-  endif (MSVC)
-endmacro (TARGET_MSVC_PROPERTIES)
+    set_target_properties (${wintarget} PROPERTIES COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "${addlinkflags}")
+  endif ()
+endmacro ()
 
 #-------------------------------------------------------------------------------
 macro (TARGET_FORTRAN_PROPERTIES forttarget libtype addcompileflags addlinkflags)
   if (WIN32)
     TARGET_FORTRAN_WIN_PROPERTIES (${forttarget} ${libtype} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}")
-  endif (WIN32)
-endmacro (TARGET_FORTRAN_PROPERTIES)
+  endif ()
+endmacro ()
 
 #-------------------------------------------------------------------------------
 macro (TARGET_FORTRAN_WIN_PROPERTIES forttarget libtype addcompileflags addlinkflags)
   if (MSVC)
     if (${libtype} MATCHES "SHARED")
-      set_target_properties (${forttarget}
-          PROPERTIES
-              COMPILE_FLAGS "/dll ${addcompileflags}"
-              LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}"
-      )
-    else (${libtype} MATCHES "SHARED")
-      set_target_properties (${forttarget}
-          PROPERTIES
-              COMPILE_FLAGS "${addcompileflags}"
-              LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}"
-      )
-    endif (${libtype} MATCHES "SHARED")
-  endif (MSVC)
-endmacro (TARGET_FORTRAN_WIN_PROPERTIES)
+      set_target_properties (${forttarget} PROPERTIES COMPILE_FLAGS "/dll ${addcompileflags}" LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}")
+    else ()
+      set_target_properties (${forttarget} PROPERTIES COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}")
+    endif ()
+  endif ()
+endmacro ()
 
 #-----------------------------------------------------------------------------
 # Configure the README.txt file for the binary package
@@ -228,54 +226,75 @@ macro (HDF_README_PROPERTIES target_fortran)
     set (BINARY_INSTALL_ENDING "msi")
     if (CMAKE_CL_64)
       set (BINARY_SYSTEM_NAME "win64")
-    else (CMAKE_CL_64)
+    else ()
       set (BINARY_SYSTEM_NAME "win32")
-    endif (CMAKE_CL_64)
+    endif ()
     if (${CMAKE_SYSTEM_VERSION} MATCHES "6.1")
       set (BINARY_PLATFORM "${BINARY_PLATFORM} 7")
     elseif (${CMAKE_SYSTEM_VERSION} MATCHES "6.2")
       set (BINARY_PLATFORM "${BINARY_PLATFORM} 8")
     elseif (${CMAKE_SYSTEM_VERSION} MATCHES "6.3")
       set (BINARY_PLATFORM "${BINARY_PLATFORM} 10")
-    endif (${CMAKE_SYSTEM_VERSION} MATCHES "6.1")
-    set (BINARY_PLATFORM "${BINARY_PLATFORM} ${MSVC_C_ARCHITECTURE_ID}")
-    if (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
-      set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2010")
-    elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "15.*")
-      set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2008")
-    elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "17.*")
-      set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2012")
-    elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "18.*")
-      set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2013")
-    elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "19.*")
-      set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2015")
-    else (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
-      set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}")
-    endif (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
+    endif ()
+    if (CMAKE_C_COMPILER_ID MATCHES "Intel")
+      set (BINARY_PLATFORM "${BINARY_PLATFORM} Intel")
+      if (${CMAKE_C_COMPILER_VERSION} MATCHES "^17.*")
+        set (BINARY_PLATFORM "${BINARY_PLATFORM}, using Intel 17")
+      else ()
+        set (BINARY_PLATFORM "${BINARY_PLATFORM}, using Intel ${CMAKE_C_COMPILER_VERSION}")
+      endif ()
+    elseif (CMAKE_C_COMPILER_ID MATCHES "MSVC")
+      set (BINARY_PLATFORM "${BINARY_PLATFORM} ${MSVC_C_ARCHITECTURE_ID}")
+      if (${CMAKE_C_COMPILER_VERSION} MATCHES "^16.*")
+        set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2010")
+      elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^15.*")
+        set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2008")
+      elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^17.*")
+        set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2012")
+      elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^18.*")
+        set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2013")
+      elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.*")
+        set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2015")
+      elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^20.*")
+        set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2017")
+      else ()
+        set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}")
+      endif ()
+    endif ()
   elseif (APPLE)
     set (BINARY_EXAMPLE_ENDING "tar.gz")
     set (BINARY_INSTALL_ENDING "dmg")
     set (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}")
     set (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}")
-  else (WIN32)
+  else ()
     set (BINARY_EXAMPLE_ENDING "tar.gz")
     set (BINARY_INSTALL_ENDING "sh")
     set (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}")
     set (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}")
-  endif (WIN32)
+  endif ()
 
   if (target_fortran)
     set (BINARY_PLATFORM "${BINARY_PLATFORM} / ${CMAKE_Fortran_COMPILER_ID} Fortran")
-  endif (target_fortran)
+  endif ()
 
   if (BUILD_SHARED_LIBS)
     set (LIB_TYPE "Static and Shared")
-  else (BUILD_SHARED_LIBS)
+  else ()
     set (LIB_TYPE "Static")
-  endif (BUILD_SHARED_LIBS)
+  endif ()
 
   configure_file (
       ${HDF_RESOURCES_DIR}/README.txt.cmake.in
       ${CMAKE_BINARY_DIR}/README.txt @ONLY
   )
-endmacro (HDF_README_PROPERTIES)
+endmacro ()
+
+macro (HDFTEST_COPY_FILE src dest target)
+    add_custom_command(
+        OUTPUT  "${dest}"
+        COMMAND "${CMAKE_COMMAND}"
+        ARGS     -E copy_if_different "${src}" "${dest}"
+        DEPENDS "${src}"
+    )
+    list (APPEND ${target}_list "${dest}")
+endmacro ()
diff --git a/config/cmake_ext_mod/HDFTests.c b/config/cmake_ext_mod/HDFTests.c
index 8478d1b..6b717f3 100644
--- a/config/cmake_ext_mod/HDFTests.c
+++ b/config/cmake_ext_mod/HDFTests.c
@@ -1,101 +1,5 @@
 #define SIMPLE_TEST(x) int main(){ x; return 0; }
 
-#ifdef HAVE_C99_DESIGNATED_INITIALIZER
-
-#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 ()
-{
-
-  typedef struct
-  {
-    int x;
-    union
-    {
-      int i;
-      double d;
-    }u;
-  }di_struct_t;
-  di_struct_t x =
-  { 0,
-    { .d = 0.0}};
-  ;
-  return 0;
-}
-
-#endif
-
-#ifdef HAVE_C99_FUNC
-
-#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 ()
-{
- const char *fname = __func__;
-  ;
-  return 0;
-}
-
-#endif
-
-#ifdef VSNPRINTF_WORKS
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-
-int test_vsnprintf(const char *fmt,...)
-{
-    va_list     ap;
-    char *s = malloc(16);
-    int ret;
-
-    va_start(ap, fmt);
-    ret=vsnprintf(s,16,"%s",ap);
-    va_end(ap);
-
-    return(ret!=42 ? 1 : 0);
-}
-
-int main(void)
-{
-    return(test_vsnprintf("%s","A string that is longer than 16 characters"));
-}
-#endif
-
-
-#ifdef TIME_WITH_SYS_TIME
-/* Time with sys/time test */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-
-int
-main ()
-{
-if ((struct tm *) 0)
-return 0;
-  ;
-  return 0;
-}
-
-#endif
-
 #ifdef STDC_HEADERS
 #include <stdlib.h>
 #include <stdarg.h>
@@ -104,101 +8,6 @@ return 0;
 int main() { return 0; }
 #endif /* STDC_HEADERS */
 
-
-#ifdef HAVE_ATTRIBUTE
-
-#if 0
-static void test int __attribute((unused)) var)
-{
-  int __attribute__((unused)) x = var;
-}
-
-int main(void)
-{
-  test(19);
-}
-
-#else
-int
-main ()
-{
-int __attribute__((unused)) x
-  ;
-  return 0;
-}
-#endif
-
-
-#endif /* HAVE_ATTRIBUTE */
-
-#ifdef HAVE_FUNCTION
-
-#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 ()
-{
-(void)__FUNCTION__
-  ;
-  return 0;
-}
-
-#endif /* HAVE_FUNCTION */
-
-#ifdef HAVE_TM_GMTOFF
-
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(struct tm tm; tm.tm_gmtoff=0);
-
-#endif /* HAVE_TM_GMTOFF */
-
-#ifdef HAVE___TM_GMTOFF
-
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(struct tm tm; tm.__tm_gmtoff=0);
-
-#endif /* HAVE_TM_GMTOFF */
-
-#ifdef HAVE_TIMEZONE
-
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(timezone=0);
-
-#endif /* HAVE_TIMEZONE */
-
-#ifdef HAVE_STRUCT_TIMEZONE
-
-#include <sys/types.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(struct timezone tz; tz.tz_minuteswest=0);
-
-#endif /* HAVE_STRUCT_TIMEZONE */
-
-#ifdef HAVE_STAT_ST_BLOCKS
-
-#include <sys/stat.h>
-SIMPLE_TEST(struct stat sb; sb.st_blocks=0);
-
-#endif /* HAVE_STAT_ST_BLOCKS */
-
 #ifdef PRINTF_LL_WIDTH
 
 #ifdef HAVE_LONG_LONG
@@ -233,111 +42,6 @@ int main(void)
 
 #endif /* PRINTF_LL_WIDTH */
 
-#ifdef SYSTEM_SCOPE_THREADS
-#include <stdlib.h>
-#include <pthread.h>
-
-int main(void)
-{
-    pthread_attr_t attribute;
-    int ret;
-
-    pthread_attr_init(&attribute);
-    ret=pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM);
-    if (ret==0)
-        return 0;
-    return 1;
-}
-
-#endif /* SYSTEM_SCOPE_THREADS */
-
-#ifdef HAVE_SOCKLEN_T
-
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-SIMPLE_TEST(socklen_t foo);
-
-#endif /* HAVE_SOCKLEN_T */
-
-#ifdef DEV_T_IS_SCALAR
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-int main ()
-{
-  dev_t d1, d2;
-  if(d1==d2)
-    return 0;
-  return 1;
-}
-
-#endif /* DEV_T_IS_SCALAR */
-
-#ifdef HAVE_OFF64_T
-#include <sys/types.h>
-int main()
-{
-  off64_t n = 0;
-  return (int)n;
-}
-#endif
-
-#ifdef HAVE_STAT64_STRUCT
-#include <sys/types.h>
-#include <sys/stat.h>],
-struct stat64 sb;
-int main()
-{
-  return 0;
-}
-#endif
-
-#ifdef TEST_DIRECT_VFD_WORKS
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-int main(void)
-{
-   int fid;
-   if((fid=open("tst_file", O_CREAT | O_TRUNC | O_DIRECT, 0755))<0)
-       return 1;
-   close(fid);
-   remove("tst_file");
-   return 0;
-}
-#endif
-
-#ifdef HAVE_DIRECT
-       SIMPLE_TEST(posix_memalign());
-#endif
-
-#ifdef HAVE_DEFAULT_SOURCE
-/* check default source */
-#include <features.h>
-
-int
-main(void)
-{
-#ifdef __GLIBC_PREREQ
-  return __GLIBC_PREREQ(2,19);
-#else
-  return 0;
-#endif /* defined(__GLIBC_PREREQ) */
-}
-#endif
-
 #ifdef TEST_LFS_WORKS
 /* Return 0 when LFS is available and 1 otherwise.  */
 #define _LARGEFILE_SOURCE
@@ -369,104 +73,3 @@ int main(int argc, char **argv)
   return 0;
 }
 #endif
-
-#ifdef GETTIMEOFDAY_GIVES_TZ
-#include <time.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-int main(void)
-{
- struct timeval tv;
- struct timezone tz;
- tz.tz_minuteswest = 7777;  /* Initialize to an unreasonable number */
- tz.tz_dsttime = 7;
- gettimeofday(&tv, &tz);
-    /* Check whether the function returned any value at all */
- if(tz.tz_minuteswest == 7777 && tz.tz_dsttime == 7)
-     return 1;
- else return 0;
-}
-#endif
-
-#ifdef CXX_HAVE_OFFSETOF
-
-#include <stdio.h>
-#include <stddef.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 index_st
-  {
-    unsigned char type;
-    unsigned char num;
-    unsigned int len;
-  };
-  typedef struct index_st index_t;
-  int x,y;
-  x = offsetof(struct index_st, len);
-  y = offsetof(index_t, num)
-
-  ;
-  return 0;
-}
-
-#endif
-
-#ifdef HAVE_IOEO
-
-#include <windows.h>
-typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
-int main ()
-{
-	PGNSI pGNSI;
-	pGNSI = (PGNSI) GetProcAddress(
-      GetModuleHandle(TEXT("kernel32.dll")), 
-      "InitOnceExecuteOnce");
-	if(NULL == pGNSI)
-		return 1;
-	else
-		return 0;
-}
-
-#endif /* HAVE_IOEO */
-
-#ifdef HAVE_STRUCT_VIDEOCONFIG
-
-SIMPLE_TEST(struct videoconfig w; w.numtextcols=0);
-
-#endif /* HAVE_TM_GMTOFF */
-
-#ifdef HAVE_STRUCT_TEXT_INFO
-
-SIMPLE_TEST(struct text_info w; w.screenwidth=0);
-
-#endif /* HAVE_TM_GMTOFF */
-
-#if defined( HAVE_INLINE ) || defined( HAVE___INLINE__ ) || defined( HAVE___INLINE )
-#ifndef __cplusplus
-#if defined( HAVE_INLINE )
-#  define INLINE_KW inline
-#elif defined ( HAVE___INLINE__ )
-#  define INLINE_KW __inline__
-#elif defined ( HAVE___INLINE )
-#  define INLINE_KW __inline
-#endif /* HAVE_INLINE */
-typedef int foo_t;
-static INLINE_KW foo_t static_foo () { return 0; }
-INLINE_KW foo_t foo () {return 0; }
-int main(void) { return 0; }
-#endif /* __cplusplus */
-#endif /* defined( HAVE_INLINE ) || defined( HAVE___INLINE__ ) || defined( HAVE___INLINE ) */
-
diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake
index 275f2ea..bf254a1 100644
--- a/config/cmake_ext_mod/HDFUseFortran.cmake
+++ b/config/cmake_ext_mod/HDFUseFortran.cmake
@@ -26,14 +26,14 @@ set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) ${CMAKE_MATCH_1}")
 # The provided CMake Fortran macros don't provide a general check function
 # so this one is used for a sizeof test.
 #-----------------------------------------------------------------------------
-MACRO (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
+macro (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
     message (STATUS "Testing Fortran ${FUNCTION}")
     if (CMAKE_REQUIRED_LIBRARIES)
       set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
           "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
-    else (CMAKE_REQUIRED_LIBRARIES)
+    else ()
       set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
-    endif (CMAKE_REQUIRED_LIBRARIES)
+    endif ()
     file (WRITE
         ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90
         "${CODE}"
@@ -63,8 +63,7 @@ MACRO (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
           "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n"
           "${OUTPUT}\n\n")
     endif ()
-
-ENDMACRO (CHECK_FORTRAN_FEATURE)
+endmacro ()
 
 #-----------------------------------------------------------------------------
 # Configure Checks which require Fortran compilation must go in here
@@ -75,7 +74,7 @@ ENDMACRO (CHECK_FORTRAN_FEATURE)
 #-----------------------------------------------------------------------------
 
 # Check for Non-standard extension intrinsic function SIZEOF
-set(FORTRAN_HAVE_SIZEOF FALSE)
+set (FORTRAN_HAVE_SIZEOF FALSE)
 CHECK_FORTRAN_FEATURE(sizeof
   "
        PROGRAM main
@@ -86,7 +85,7 @@ CHECK_FORTRAN_FEATURE(sizeof
 )
 
 # Check for F2008 standard intrinsic function C_SIZEOF
-set(FORTRAN_HAVE_C_SIZEOF FALSE)
+set (FORTRAN_HAVE_C_SIZEOF FALSE)
 CHECK_FORTRAN_FEATURE(c_sizeof
   "
        PROGRAM main
@@ -112,7 +111,7 @@ CHECK_FORTRAN_FEATURE(storage_size
 )
 
 # Check for F2008 standard intrinsic module "ISO_FORTRAN_ENV"
-set(HAVE_ISO_FORTRAN_ENV FALSE)
+set (HAVE_ISO_FORTRAN_ENV FALSE)
 CHECK_FORTRAN_FEATURE(ISO_FORTRAN_ENV
   "
        PROGRAM main
@@ -122,7 +121,7 @@ CHECK_FORTRAN_FEATURE(ISO_FORTRAN_ENV
   HAVE_ISO_FORTRAN_ENV
 )
 
-set(FORTRAN_DEFAULT_REAL_NOT_DOUBLE FALSE)
+set (FORTRAN_DEFAULT_REAL_NOT_DOUBLE FALSE)
 CHECK_FORTRAN_FEATURE(RealIsNotDouble
   "
        MODULE type_mod
@@ -152,7 +151,7 @@ CHECK_FORTRAN_FEATURE(RealIsNotDouble
 #-----------------------------------------------------------------------------
 # Checks if the ISO_C_BINDING module meets all the requirements
 #-----------------------------------------------------------------------------
-set(FORTRAN_HAVE_ISO_C_BINDING FALSE)
+set (FORTRAN_HAVE_ISO_C_BINDING FALSE)
 CHECK_FORTRAN_FEATURE(iso_c_binding
   "
        PROGRAM main
@@ -175,5 +174,5 @@ if (CMAKE_Fortran_COMPILER MATCHES ifort)
     if (WIN32)
         set (CMAKE_Fortran_FLAGS_DEBUG "/debug:full /dbglibs " CACHE "flags" STRING FORCE)
         set (CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG" CACHE "flags" STRING FORCE)
-    endif (WIN32)
-endif (CMAKE_Fortran_COMPILER MATCHES ifort)
+    endif ()
+endif ()
diff --git a/config/cmake_ext_mod/NSIS.InstallOptions.ini.in b/config/cmake_ext_mod/NSIS.InstallOptions.ini.in
index 9954f28..b4265f7 100644
--- a/config/cmake_ext_mod/NSIS.InstallOptions.ini.in
+++ b/config/cmake_ext_mod/NSIS.InstallOptions.ini.in
@@ -3,7 +3,7 @@ NumFields=5
 
 [Field 1]
 Type=label
-Text=By default the @CPACK_PACKAGE_NAME@ bin directory is added to the system PATH. This allows shared library (dll) discovery (if installed) and running HDF5 tools from the command line.
+Text=By default the @CPACK_PACKAGE_NAME@ bin directory is added to the system PATH. This allows shared library (dll) discovery (if installed) and running HDF4 tools from the command line.
 Left=0
 Right=-1
 Top=0
diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake
index a090057..31c8421 100644
--- a/config/cmake_ext_mod/grepTest.cmake
+++ b/config/cmake_ext_mod/grepTest.cmake
@@ -4,25 +4,25 @@
 # arguments checking
 if (NOT TEST_PROGRAM)
   message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
-endif (NOT TEST_PROGRAM)
+endif ()
 #if (NOT TEST_ARGS)
 #  message (STATUS "Require TEST_ARGS to be defined")
-#endif (NOT TEST_ARGS)
+#endif ()
 if (NOT TEST_FOLDER)
   message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-endif (NOT TEST_FOLDER)
+endif ()
 if (NOT TEST_OUTPUT)
   message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
-endif (NOT TEST_OUTPUT)
+endif ()
 #if (NOT TEST_EXPECT)
 #  message (STATUS "Require TEST_EXPECT to be defined")
-#endif (NOT TEST_EXPECT)
+#endif ()
 if (NOT TEST_FILTER)
   message (STATUS "Require TEST_FILTER to be defined")
-endif (NOT TEST_FILTER)
+endif ()
 if (NOT TEST_REFERENCE)
   message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
-endif (NOT TEST_REFERENCE)
+endif ()
 
 message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
 
@@ -48,7 +48,7 @@ string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
 string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT)
 if (${TEST_RESULT} STREQUAL "0")
   message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}")
-endif (${TEST_RESULT} STREQUAL "0")
+endif ()
 
 string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM})
 if (${TEST_EXPECT} STREQUAL "1")
@@ -56,8 +56,8 @@ if (${TEST_EXPECT} STREQUAL "1")
   string (LENGTH "${TEST_MATCH}" TEST_RESULT)
   if (NOT ${TEST_RESULT} STREQUAL "0")
     message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}")
-  endif (NOT ${TEST_RESULT} STREQUAL "0")
-endif (${TEST_EXPECT} STREQUAL "1")
+  endif ()
+endif ()
 
 # everything went fine...
 message ("Passed: The output of ${TEST_PROGRAM} matched")
diff --git a/config/cmake_ext_mod/prunTest.cmake b/config/cmake_ext_mod/prunTest.cmake
deleted file mode 100644
index 38ecb7e..0000000
--- a/config/cmake_ext_mod/prunTest.cmake
+++ /dev/null
@@ -1,145 +0,0 @@
-# runTest.cmake executes a command and captures the output in a file. File is then compared
-# against a reference file. Exit status of command can also be compared.
-cmake_policy(SET CMP0007 NEW)
-
-# arguments checking
-if (NOT TEST_PROGRAM)
-  message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
-endif (NOT TEST_PROGRAM)
-#if (NOT TEST_ARGS)
-#  message (STATUS "Require TEST_ARGS to be defined")
-#endif (NOT TEST_ARGS)
-if (NOT TEST_FOLDER)
-  message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-endif (NOT TEST_FOLDER)
-if (NOT TEST_OUTPUT)
-  message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
-endif (NOT TEST_OUTPUT)
-#if (NOT TEST_EXPECT)
-#  message (STATUS "Require TEST_EXPECT to be defined")
-#endif (NOT TEST_EXPECT)
-#if (NOT TEST_FILTER)
-#  message (STATUS "Require TEST_FILTER to be defined")
-#endif (NOT TEST_FILTER)
-if (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
-  message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
-endif (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
-
-set (ERROR_APPEND 1)
-
-message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
-
-if (TEST_ENV_VAR)
-  set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}")
-endif (TEST_ENV_VAR)
-
-# run the test program, capture the stdout/stderr and the result var
-EXECUTE_PROCESS (
-    COMMAND ${TEST_PROGRAM} ${TEST_ARGS}
-    WORKING_DIRECTORY ${TEST_FOLDER}
-    RESULT_VARIABLE TEST_RESULT
-    OUTPUT_FILE ${TEST_OUTPUT}
-    ERROR_FILE ${TEST_OUTPUT}.err
-    OUTPUT_VARIABLE TEST_OUT
-    ERROR_VARIABLE TEST_ERROR
-)
-
-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 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 AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
-
-if (TEST_APPEND)
-  file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_ERROR}\n")
-endif (TEST_APPEND)
-
-message (STATUS "COMMAND Error: ${TEST_ERROR}")
-
-if (TEST_MASK)
-  file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
-  STRING(REGEX REPLACE "Storage:[^\n]+\n" "Storage:   <details removed for portability>\n" TEST_STREAM "${TEST_STREAM}")
-  file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_MASK)
-
-if (TEST_MASK_MOD)
-  file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
-  STRING(REGEX REPLACE "Modified:[^\n]+\n" "Modified:  XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}")
-  file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_MASK_MOD)
-
-if (TEST_MASK_ERROR)
-  file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
-  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}")
-  STRING(REGEX REPLACE "v[1-9]*[.][0-9]*[.]" "version (number)." TEST_STREAM "${TEST_STREAM}")
-  STRING(REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}")
-  STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
-  STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
-  file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_MASK_ERROR)
-
-if (TEST_FILTER)
-  file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
-  STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}")
-  file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_FILTER)
-
-#if (TEST_REF_FILTER)
-#  message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER}")
-#  file (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM)
-#  STRING(REGEX REPLACE "${TEST_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}")
-#  file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}")
-#endif (TEST_REF_FILTER)
-
-if (NOT TEST_SKIP_COMPARE)
-  if (WIN32 AND NOT MINGW)
-    file (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM)
-    file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}")
-  endif (WIN32 AND NOT MINGW)
-
-  # now compare the output with the reference
-  EXECUTE_PROCESS (
-      COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/P_${TEST_REFERENCE}
-      RESULT_VARIABLE TEST_RESULT
-  )
-  if (NOT ${TEST_RESULT} STREQUAL 0)
-  set (TEST_RESULT 0)
-  file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
-  LIST (LENGTH test_act len_act)
-  file (STRINGS ${TEST_FOLDER}/P_${TEST_REFERENCE} test_ref)
-  LIST (LENGTH test_ref len_ref)
-  if (NOT ${len_act} STREQUAL "0")
-    MATH (EXPR _FP_LEN "${len_ref} - 1")
-    foreach (line RANGE 0 ${_FP_LEN})
-      LIST (GET test_act ${line} str_act)
-      LIST (GET test_ref ${line} str_ref)
-      if (NOT "${str_act}" STREQUAL "${str_ref}")
-        if (NOT "${str_act}" STREQUAL "")
-          set (TEST_RESULT 1)
-          message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
-         endif (NOT "${str_act}" STREQUAL "")
-      endif (NOT "${str_act}" STREQUAL "${str_ref}")
-    endforeach (line RANGE 0 ${_FP_LEN})
-  endif (NOT ${len_act} STREQUAL "0")
-  if (NOT ${len_act} STREQUAL ${len_ref})
-    set (TEST_RESULT 1)
-  endif (NOT ${len_act} STREQUAL ${len_ref})
-  endif (NOT ${TEST_RESULT} STREQUAL 0)
-
-  message (STATUS "COMPARE Result: ${TEST_RESULT}")
-
-  # again, if return value is !=0 scream and shout
-  if (NOT ${TEST_RESULT} STREQUAL 0)
-    message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match P_${TEST_REFERENCE}")
-  endif (NOT ${TEST_RESULT} STREQUAL 0)
-endif (NOT TEST_SKIP_COMPARE)
-
-# everything went fine...
-message ("Passed: The output of ${TEST_PROGRAM} matches P_${TEST_REFERENCE}")
-
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake
index 21a65e6..9a2236e 100644
--- a/config/cmake_ext_mod/runTest.cmake
+++ b/config/cmake_ext_mod/runTest.cmake
@@ -5,36 +5,46 @@ cmake_policy(SET CMP0007 NEW)
 # arguments checking
 if (NOT TEST_PROGRAM)
   message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
-endif (NOT TEST_PROGRAM)
-#if (NOT TEST_ARGS)
-#  message (STATUS "Require TEST_ARGS to be defined")
-#endif (NOT TEST_ARGS)
+endif ()
 if (NOT TEST_FOLDER)
   message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-endif (NOT TEST_FOLDER)
+endif ()
 if (NOT TEST_OUTPUT)
   message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
-endif (NOT TEST_OUTPUT)
+endif ()
 if (NOT TEST_EXPECT)
   message (STATUS "Require TEST_EXPECT to be defined")
-endif (NOT TEST_EXPECT)
-#if (NOT TEST_FILTER)
-#  message (STATUS "Require TEST_FILTER to be defined")
-#endif (NOT TEST_FILTER)
+endif ()
 if (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
   message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
-endif (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
+endif ()
+
+if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
+  file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
+endif ()
+
+if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+  file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+endif ()
 
 # if there is not an error reference file add the error output to the stdout file
 if (NOT TEST_ERRREF)
   set (ERROR_APPEND 1)
-endif (NOT TEST_ERRREF)
+endif ()
 
 message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
 
+if (TEST_LIBRARY_DIRECTORY)
+  if (WIN32 AND NOT MINGW)
+    set (ENV{PATH} "$ENV{PATH};${TEST_LIBRARY_DIRECTORY}")
+  else ()
+    set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}")
+  endif ()
+endif ()
+
 if (TEST_ENV_VAR)
   set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}")
-endif (TEST_ENV_VAR)
+endif ()
 
 if (NOT TEST_INPUT)
   # run the test program, capture the stdout/stderr and the result var
@@ -47,7 +57,7 @@ if (NOT TEST_INPUT)
       OUTPUT_VARIABLE TEST_OUT
       ERROR_VARIABLE TEST_ERROR
   )
-else (NOT TEST_INPUT)
+else ()
   # run the test program with stdin, capture the stdout/stderr and the result var
   execute_process (
       COMMAND ${TEST_PROGRAM} ${TEST_ARGS}
@@ -59,7 +69,17 @@ else (NOT TEST_INPUT)
       OUTPUT_VARIABLE TEST_OUT
       ERROR_VARIABLE TEST_ERROR
   )
-endif (NOT TEST_INPUT)
+endif ()
+
+if (TEST_REGEX)
+  # TEST_REGEX should always be matched
+  file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+  string (REGEX MATCH "${TEST_REGEX}" REGEX_MATCH ${TEST_STREAM})
+  string (COMPARE EQUAL "${REGEX_MATCH}" "${TEST_MATCH}" REGEX_RESULT)
+  if (${REGEX_RESULT} STREQUAL "0")
+    message (STATUS "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_MATCH}")
+  endif ()
+endif ()
 
 message (STATUS "COMMAND Result: ${TEST_RESULT}")
 
@@ -67,33 +87,39 @@ message (STATUS "COMMAND Result: ${TEST_RESULT}")
 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 AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+endif ()
 
 # append the test result status with a predefined text
 if (TEST_APPEND)
   file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n")
-endif (TEST_APPEND)
+endif ()
 
 # if the return value is !=${TEST_EXPECT} bail out
 if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
-  message ( FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}")
-endif (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
+  if (NOT TEST_NOERRDISPLAY)
+    if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
+      file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+      message (STATUS "Output :\n${TEST_STREAM}")
+    endif ()
+  endif ()
+  message (FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}")
+endif ()
 
 message (STATUS "COMMAND Error: ${TEST_ERROR}")
 
 # if the output file needs Storage text removed
 if (TEST_MASK)
   file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
-   string (REGEX REPLACE "Storage:[^\n]+\n" "Storage:   <details removed for portability>\n" TEST_STREAM "${TEST_STREAM}")
+  string (REGEX REPLACE "Storage:[^\n]+\n" "Storage:   <details removed for portability>\n" TEST_STREAM "${TEST_STREAM}")
   file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_MASK)
+endif ()
 
 # if the output file needs Modified text removed
 if (TEST_MASK_MOD)
   file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
    string (REGEX REPLACE "Modified:[^\n]+\n" "Modified:  XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}")
   file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_MASK_MOD)
+endif ()
 
 # if the output file or the .err file needs to mask out error stack info
 if (TEST_MASK_ERROR)
@@ -117,64 +143,89 @@ if (TEST_MASK_ERROR)
   else ()
     file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}")
   endif ()
-endif (TEST_MASK_ERROR)
+endif ()
 
 # remove text from the output file
 if (TEST_FILTER)
   file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
-  string (REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}")
+  string (REGEX REPLACE "${TEST_FILTER}" "${TEST_FILTER_REPLACE}" TEST_STREAM "${TEST_STREAM}")
   file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_FILTER)
+endif ()
+
+if (TEST_REF_FILTER)
+  #message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER}")
+  file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
+  STRING(REGEX REPLACE "${TEST_REF_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}")
+  file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
+endif ()
 
 # compare output files to references unless this must be skipped
 if (NOT TEST_SKIP_COMPARE)
   if (WIN32 AND NOT MINGW)
     file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
     file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
-  endif (WIN32 AND NOT MINGW)
+  endif ()
+
+  if (NOT TEST_SORT_COMPARE)
+    # now compare the output with the reference
+    execute_process (
+        COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
+        RESULT_VARIABLE TEST_RESULT
+    )
+  else ()
+    file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} v1)
+    file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} v2)
+    list (SORT v1)
+    list (SORT v2)
+    if (NOT v1 STREQUAL v2)
+      set(TEST_RESULT 1)
+    endif ()
+  endif ()
 
-  # now compare the output with the reference
-  execute_process (
-      COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
-      RESULT_VARIABLE TEST_RESULT
-  )
   if (NOT ${TEST_RESULT} STREQUAL 0)
-  set (TEST_RESULT 0)
-  file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
-  list (LENGTH test_act len_act)
-  file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
-  list (LENGTH test_ref len_ref)
-  if (NOT ${len_act} STREQUAL "0")
-    math (EXPR _FP_LEN "${len_ref} - 1")
-    foreach (line RANGE 0 ${_FP_LEN})
-      list (GET test_act ${line} str_act)
-      list (GET test_ref ${line} str_ref)
-      if (NOT "${str_act}" STREQUAL "${str_ref}")
-        if (NOT "${str_act}" STREQUAL "")
-          set (TEST_RESULT 1)
-          message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
-         endif (NOT "${str_act}" STREQUAL "")
-      endif (NOT "${str_act}" STREQUAL "${str_ref}")
-    endforeach (line RANGE 0 ${_FP_LEN})
-  endif (NOT ${len_act} STREQUAL "0")
-  if (NOT ${len_act} STREQUAL ${len_ref})
-    set (TEST_RESULT 1)
-  endif (NOT ${len_act} STREQUAL ${len_ref})
-  endif (NOT ${TEST_RESULT} STREQUAL 0)
+    set (TEST_RESULT 0)
+    file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
+    list (LENGTH test_act len_act)
+    file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
+    list (LENGTH test_ref len_ref)
+    if (NOT ${len_act} STREQUAL "0" AND NOT ${len_ref} STREQUAL "0")
+      math (EXPR _FP_LEN "${len_ref} - 1")
+      foreach (line RANGE 0 ${_FP_LEN})
+        list (GET test_act ${line} str_act)
+        list (GET test_ref ${line} str_ref)
+        if (NOT "${str_act}" STREQUAL "${str_ref}")
+          if (NOT "${str_act}" STREQUAL "")
+            set (TEST_RESULT 1)
+            message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+          endif ()
+        endif ()
+      endforeach ()
+    else ()
+      if (${len_act} STREQUAL "0")
+        message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty")
+      endif ()
+      if (${len_ref} STREQUAL "0")
+        message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty")
+      endif ()
+    endif ()
+    if (NOT ${len_act} STREQUAL ${len_ref})
+      set (TEST_RESULT 1)
+    endif ()
+  endif ()
 
   message (STATUS "COMPARE Result: ${TEST_RESULT}")
 
   # again, if return value is !=0 scream and shout
   if (NOT ${TEST_RESULT} STREQUAL 0)
     message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}")
-  endif (NOT ${TEST_RESULT} STREQUAL 0)
+  endif ()
 
   # now compare the .err file with the error reference, if supplied
   if (TEST_ERRREF)
     if (WIN32 AND NOT MINGW)
       file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
       file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}")
-    endif (WIN32 AND NOT MINGW)
+    endif ()
 
     # now compare the error output with the error reference
     execute_process (
@@ -182,38 +233,45 @@ if (NOT TEST_SKIP_COMPARE)
         RESULT_VARIABLE TEST_RESULT
     )
     if (NOT ${TEST_RESULT} STREQUAL 0)
-    set (TEST_RESULT 0)
-    file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act)
-    list (LENGTH test_act len_act)
-    file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref)
-    list (LENGTH test_ref len_ref)
-    math (EXPR _FP_LEN "${len_ref} - 1")
-    if (NOT ${len_act} STREQUAL "0")
+      set (TEST_RESULT 0)
+      file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act)
+      list (LENGTH test_act len_act)
+      file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref)
+      list (LENGTH test_ref len_ref)
       math (EXPR _FP_LEN "${len_ref} - 1")
-      foreach (line RANGE 0 ${_FP_LEN})
-        list (GET test_act ${line} str_act)
-        list (GET test_ref ${line} str_ref)
-        if (NOT "${str_act}" STREQUAL "${str_ref}")
-          if (NOT "${str_act}" STREQUAL "")
-            set (TEST_RESULT 1)
-            message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
-           endif (NOT "${str_act}" STREQUAL "")
-        endif (NOT "${str_act}" STREQUAL "${str_ref}")
-      endforeach (line RANGE 0 ${_FP_LEN})
-    endif (NOT ${len_act} STREQUAL "0")
-    if (NOT ${len_act} STREQUAL ${len_ref})
-      set (TEST_RESULT 1)
-    endif (NOT ${len_act} STREQUAL ${len_ref})
-    endif (NOT ${TEST_RESULT} STREQUAL 0)
+      if (NOT ${len_act} STREQUAL "0" AND NOT ${len_ref} STREQUAL "0")
+        math (EXPR _FP_LEN "${len_ref} - 1")
+        foreach (line RANGE 0 ${_FP_LEN})
+          list (GET test_act ${line} str_act)
+          list (GET test_ref ${line} str_ref)
+          if (NOT "${str_act}" STREQUAL "${str_ref}")
+            if (NOT "${str_act}" STREQUAL "")
+              set (TEST_RESULT 1)
+              message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+             endif ()
+          endif ()
+        endforeach ()
+      else ()
+        if (${len_act} STREQUAL "0")
+          message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT}.err is empty")
+        endif ()
+        if (${len_ref} STREQUAL "0")
+          message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_ERRREF} is empty")
+        endif ()
+      endif ()
+      if (NOT ${len_act} STREQUAL ${len_ref})
+        set (TEST_RESULT 1)
+      endif ()
+    endif ()
 
     message (STATUS "COMPARE Result: ${TEST_RESULT}")
 
     # again, if return value is !=0 scream and shout
     if (NOT ${TEST_RESULT} STREQUAL 0)
       message (FATAL_ERROR "Failed: The error output of ${TEST_OUTPUT}.err did not match ${TEST_ERRREF}")
-    endif (NOT ${TEST_RESULT} STREQUAL 0)
-  endif (TEST_ERRREF)
-endif (NOT TEST_SKIP_COMPARE)
+    endif ()
+  endif ()
+endif ()
 
 # everything went fine...
 message ("Passed: The output of ${TEST_PROGRAM} matches ${TEST_REFERENCE}")
diff --git a/config/commence.am b/config/commence.am
index b4bbdca..d946ebe 100644
--- a/config/commence.am
+++ b/config/commence.am
@@ -6,12 +6,12 @@
 ## Copyright by the Board of Trustees of the University of Illinois.
 ## All rights reserved.
 ##
-## This file is part of HDF. The full HDF copyright notice, including 
+## This file is part of HDF.  The full HDF 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 
-## http://hdfgroup.org/products/hdf4/doc/Copyright.html. If you do not have
-## access to either file, you may request a copy from help at hdfgroup.org.
+## the COPYING file, which can be found at the root of the source code
+## distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.
+## If you do not have access to either file, you may request a copy from
+## help at hdfgroup.org.
 
 ## Textually included in the beginning of every HDF4 Makefile.am.
 ## Contains definitions, etc. used across multiple Makefiles.
diff --git a/config/conclude.am b/config/conclude.am
index 699fc53..9696cfe 100644
--- a/config/conclude.am
+++ b/config/conclude.am
@@ -5,17 +5,15 @@
 ## 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
+## This file is part of HDF.  The full HDF 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 at hdfgroup.org.
+## the COPYING file, which can be found at the root of the source code
+## distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.
+## If you do not have access to either file, you may request a copy from
+## help at hdfgroup.org.
 
 
-## Textually included at the end of most HDF5 Makefiles.am.
+## Textually included at the end of most HDF4 Makefiles.am.
 ## Contains build rules.
 
 # Automake needs to be taught how to build lib, progs, and tests targets.
diff --git a/config/examples.am b/config/examples.am
index 55b47cc..cb273f5 100644
--- a/config/examples.am
+++ b/config/examples.am
@@ -6,12 +6,10 @@
 ##
 ## This file is part of HDF.  The full HDF 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 HDF document set and
-## is linked from the top-level documents page.  It can also be found at
-## http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have
-## access to either file, you may request a copy from help at hdfgroup.org.
+## the COPYING file, which can be found at the root of the source code
+## distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.
+## If you do not have access to either file, you may request a copy from
+## help at hdfgroup.org.
 
 # We can't tell automake about example programs, because they need to be
 # built using h4cc (or h4fc, etc.) instead of the standard compilers.
diff --git a/configure b/configure
index 8954ec4..a666d14 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
 #! /bin/sh
-# From configure.ac Id: configure.ac 6473 2016-06-24 21:38:14Z bmribler .
+# From configure.ac Id.
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for HDF 4.2.12.
+# Generated by GNU Autoconf 2.69 for HDF 4.2.13.
 #
 # Report bugs to <help at hdfgroup.org>.
 #
@@ -591,8 +591,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='HDF'
 PACKAGE_TARNAME='hdf'
-PACKAGE_VERSION='4.2.12'
-PACKAGE_STRING='HDF 4.2.12'
+PACKAGE_VERSION='4.2.13'
+PACKAGE_STRING='HDF 4.2.13'
 PACKAGE_BUGREPORT='help at hdfgroup.org'
 PACKAGE_URL=''
 
@@ -639,6 +639,9 @@ am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
 DEPRECATED_SYMBOLS
+BUILD_JAVA_CONDITIONAL_FALSE
+BUILD_JAVA_CONDITIONAL_TRUE
+JAVA_VERSION
 F77_VERSION
 CC_VERSION
 HDF_BUILD_SHARED_FALSE
@@ -690,8 +693,6 @@ LEX
 YACC
 AR
 LN_S
-BUILD_JAVA_CONDITIONAL_FALSE
-BUILD_JAVA_CONDITIONAL_TRUE
 JAVA_PATH_NAME
 TESTS_JUNIT
 JAVA_JUNIT
@@ -1404,7 +1405,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures HDF 4.2.12 to adapt to many kinds of systems.
+\`configure' configures HDF 4.2.13 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1474,7 +1475,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of HDF 4.2.12:";;
+     short | recursive ) echo "Configuration of HDF 4.2.13:";;
    esac
   cat <<\_ACEOF
 
@@ -1613,7 +1614,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-HDF configure 4.2.12
+HDF configure 4.2.13
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2426,7 +2427,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by HDF $as_me 4.2.12, which was
+It was created by HDF $as_me 4.2.13, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3296,7 +3297,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='hdf'
- VERSION='4.2.12'
+ VERSION='4.2.13'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -6317,7 +6318,7 @@ else
 JAVA_TEST=Test.java
 CLASS_TEST=Test.class
 cat << \EOF > $JAVA_TEST
-/* #line 6320 "configure" */
+/* #line 6321 "configure" */
 public class Test {
 }
 EOF
@@ -6492,7 +6493,7 @@ EOF
 if $UUDECODE Test.uue; then
         ac_cv_prog_uudecode_base64=yes
 else
-        echo "configure: 6495: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
+        echo "configure: 6496: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
         echo "configure: failed file was:" >&5
         cat Test.uue >&5
         ac_cv_prog_uudecode_base64=no
@@ -6609,7 +6610,7 @@ else
 JAVA_TEST=Test.java
 CLASS_TEST=Test.class
 cat << \EOF > $JAVA_TEST
-/* #line 6612 "configure" */
+/* #line 6613 "configure" */
 public class Test {
 }
 EOF
@@ -6644,7 +6645,7 @@ JAVA_TEST=Test.java
 CLASS_TEST=Test.class
 TEST=Test
 cat << \EOF > $JAVA_TEST
-/* [#]line 6647 "configure" */
+/* [#]line 6648 "configure" */
 public class Test {
 public static void main (String args[]) {
         System.exit (0);
@@ -7074,7 +7075,7 @@ EOF
                 if $UUDECODE Test.uue; then
                         :
                 else
-                        echo "configure: 7077: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
+                        echo "configure: 7078: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
                         echo "configure: failed file was:" >&5
                         cat Test.uue >&5
                         ac_cv_prog_uudecode_base64=no
@@ -7094,7 +7095,7 @@ EOF
 else
 
 cat << \EOF > Test.java
-/* #line 7097 "configure" */
+/* #line 7098 "configure" */
 import junit.textui.TestRunner;
 public class Test {
 
@@ -7237,14 +7238,6 @@ else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
- if test "X$HDF_JAVA" = "Xyes"; then
-  BUILD_JAVA_CONDITIONAL_TRUE=
-  BUILD_JAVA_CONDITIONAL_FALSE='#'
-else
-  BUILD_JAVA_CONDITIONAL_TRUE='#'
-  BUILD_JAVA_CONDITIONAL_FALSE=
-fi
-
 
 ## -------------------------------------------------------------------------
 ## Build static libraries by default. Furthermore, fortran shared libraries
@@ -21373,7 +21366,7 @@ Usage: $0 [OPTIONS]
 Report bugs to <bug-libtool at gnu.org>."
 
 lt_cl_version="\
-HDF config.lt 4.2.12
+HDF config.lt 4.2.13
 configured by $0, generated by GNU Autoconf 2.69.
 
 Copyright (C) 2011 Free Software Foundation, Inc.
@@ -22972,7 +22965,7 @@ fi
 
     fi
     if test -z "$HAVE_ZLIB"; then
-      if test -n "$HDF5_CONFIG_ABORT"; then
+      if test -n "$HDF4_CONFIG_ABORT"; then
         as_fn_error $? "couldn't find zlib library" "$LINENO" 5
       fi
     else
@@ -24797,7 +24790,7 @@ if test "X$STATIC_EXEC" = "Xyes"; then
 fi
 
 ## This part doesn't work yet since HDF4 config files do not contain
-## information for cc_vendor and cc_version as HDF5 similar files do.
+## information for cc_vendor and cc_version as HDF4 similar files do.
 ## Needs to be fixed EIP 2010-01-21
 ## if test -n "$cc_vendor" && test -n "$cc_version"; then
 ##  CC_VERSION="$CC_VERSION ($cc_vendor-$cc_version)"
@@ -24835,6 +24828,35 @@ fi
 ##   F77_VERSION="$F77_VERSION ($fortran_vendor-$fortran_version)"
 ## fi
 
+
+## Strip anything that looks like a flag off of $JAVA
+JAVA_NOFLAGS=`echo $JAVA | sed 's/ -.*//'`
+
+if `echo $JAVA_NOFLAGS | grep ^/ >/dev/null 2>&1`; then
+  JAVA_VERSION="$JAVA"
+else
+  JAVA_VERSION="$JAVA";
+  for x in `echo $PATH | sed -e 's/:/ /g'`; do
+    if test -x $x/$JAVA_NOFLAGS; then
+      JAVA_VERSION="$x/$JAVA"
+      break
+    fi
+  done
+fi
+java_version_info=`$JAVA -version 2>&1 |\
+  grep 'version' | sed -e 's/version "//' | sed -e 's/"//'`
+if test -n "$java_version_info"; then
+  JAVA_VERSION="$JAVA_VERSION ($java_version_info)"
+fi
+ if test "X$HDF_JAVA" = "Xyes"; then
+  BUILD_JAVA_CONDITIONAL_TRUE=
+  BUILD_JAVA_CONDITIONAL_FALSE='#'
+else
+  BUILD_JAVA_CONDITIONAL_TRUE='#'
+  BUILD_JAVA_CONDITIONAL_FALSE=
+fi
+
+
 ## ----------------------------------------------------------------------
 ## Enable deprecated public API symbols
 ##
@@ -25020,10 +25042,6 @@ if test -z "${HDF_BUILD_FORTRAN_TRUE}" && test -z "${HDF_BUILD_FORTRAN_FALSE}";
   as_fn_error $? "conditional \"HDF_BUILD_FORTRAN\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${BUILD_JAVA_CONDITIONAL_TRUE}" && test -z "${BUILD_JAVA_CONDITIONAL_FALSE}"; then
-  as_fn_error $? "conditional \"BUILD_JAVA_CONDITIONAL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${BUILD_SHARED_SZIP_CONDITIONAL_TRUE}" && test -z "${BUILD_SHARED_SZIP_CONDITIONAL_FALSE}"; then
   as_fn_error $? "conditional \"BUILD_SHARED_SZIP_CONDITIONAL\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -25037,6 +25055,10 @@ if test -z "${HDF_BUILD_SHARED_TRUE}" && test -z "${HDF_BUILD_SHARED_FALSE}"; th
   as_fn_error $? "conditional \"HDF_BUILD_SHARED\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${BUILD_JAVA_CONDITIONAL_TRUE}" && test -z "${BUILD_JAVA_CONDITIONAL_FALSE}"; then
+  as_fn_error $? "conditional \"BUILD_JAVA_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
 : "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
@@ -25434,7 +25456,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by HDF $as_me 4.2.12, which was
+This file was extended by HDF $as_me 4.2.13, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -25500,7 +25522,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-HDF config.status 4.2.12
+HDF config.status 4.2.13
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 9c7e60e..3030bad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,13 +7,13 @@
 ##
 ## This file is part of HDF.  The full HDF 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
-## http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have
-## access to either file, you may request a copy from help at hdfgroup.org.
+## the COPYING file, which can be found at the root of the source code
+## distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.
+## If you do not have access to either file, you may request a copy from
+## help at hdfgroup.org.
 ##
 ##
-AC_REVISION($Id: configure.ac 6473 2016-06-24 21:38:14Z bmribler $)
+AC_REVISION($Id$)
 
 ## ======================================================================
 ## Initialize configure.
@@ -25,7 +25,7 @@ AC_REVISION($Id: configure.ac 6473 2016-06-24 21:38:14Z bmribler $)
 ## NOTE: Do not forget to change the version number here when we do a
 ## release!!!
 ##
-AC_INIT([HDF], [4.2.12], [help at hdfgroup.org])
+AC_INIT([HDF], [4.2.13], [help at hdfgroup.org])
 AC_CONFIG_SRCDIR([hdf/src/atom.c])
 AC_CONFIG_AUX_DIR([bin])
 AC_CONFIG_HEADER([hdf/src/h4config.h])
@@ -278,7 +278,6 @@ if test "X$HDF_JAVA" = "Xyes"; then
 else
   AC_MSG_RESULT([no])
 fi
-AM_CONDITIONAL([BUILD_JAVA_CONDITIONAL], [test "X$HDF_JAVA" = "Xyes"])
 
 ## -------------------------------------------------------------------------
 ## Build static libraries by default. Furthermore, fortran shared libraries
@@ -396,7 +395,7 @@ case "$withval" in
       AC_CHECK_LIB([z], [compress2],, [unset HAVE_ZLIB])
     fi
     if test -z "$HAVE_ZLIB"; then
-      if test -n "$HDF5_CONFIG_ABORT"; then
+      if test -n "$HDF4_CONFIG_ABORT"; then
         AC_MSG_ERROR([couldn't find zlib library])
       fi
     else
@@ -967,7 +966,7 @@ if test "X$STATIC_EXEC" = "Xyes"; then
 fi
 
 ## This part doesn't work yet since HDF4 config files do not contain
-## information for cc_vendor and cc_version as HDF5 similar files do.
+## information for cc_vendor and cc_version as HDF4 similar files do.
 ## Needs to be fixed EIP 2010-01-21
 ## if test -n "$cc_vendor" && test -n "$cc_version"; then
 ##  CC_VERSION="$CC_VERSION ($cc_vendor-$cc_version)"
@@ -1005,6 +1004,28 @@ fi
 ##   F77_VERSION="$F77_VERSION ($fortran_vendor-$fortran_version)"
 ## fi
 
+AC_SUBST([JAVA_VERSION])
+## Strip anything that looks like a flag off of $JAVA
+JAVA_NOFLAGS=`echo $JAVA | sed 's/ -.*//'`
+
+if `echo $JAVA_NOFLAGS | grep ^/ >/dev/null 2>&1`; then
+  JAVA_VERSION="$JAVA"
+else
+  JAVA_VERSION="$JAVA";
+  for x in `echo $PATH | sed -e 's/:/ /g'`; do
+    if test -x $x/$JAVA_NOFLAGS; then
+      JAVA_VERSION="$x/$JAVA"
+      break
+    fi
+  done
+fi
+java_version_info=`$JAVA -version 2>&1 |\
+  grep 'version' | sed -e 's/version "//' | sed -e 's/"//'`
+if test -n "$java_version_info"; then
+  JAVA_VERSION="$JAVA_VERSION ($java_version_info)"
+fi
+AM_CONDITIONAL([BUILD_JAVA_CONDITIONAL], [test "X$HDF_JAVA" = "Xyes"])
+
 ## ----------------------------------------------------------------------
 ## Enable deprecated public API symbols
 ##
diff --git a/hdf/CMakeLists.txt b/hdf/CMakeLists.txt
index 1b4b5b7..8f79a85 100644
--- a/hdf/CMakeLists.txt
+++ b/hdf/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 PROJECT (HDF4_HDF)
 
 #-----------------------------------------------------------------------------
@@ -8,5 +8,5 @@ if (EXISTS "${HDF4_HDF_SOURCE_DIR}/util" AND IS_DIRECTORY "${HDF4_HDF_SOURCE_DIR
   option (HDF4_BUILD_UTILS  "Build HDF4 Utilities" OFF)
   if (HDF4_BUILD_UTILS OR HDF4_BUILD_TOOLS)
     add_subdirectory (${HDF4_HDF_SOURCE_DIR}/util   ${HDF4_HDF_BINARY_DIR}/util)
-  endif (HDF4_BUILD_UTILS OR HDF4_BUILD_TOOLS)
-endif (EXISTS "${HDF4_HDF_SOURCE_DIR}/util" AND IS_DIRECTORY "${HDF4_HDF_SOURCE_DIR}/util")
+  endif ()
+endif ()
diff --git a/hdf/Makefile.in b/hdf/Makefile.in
index fc6b9d4..09bc2f4 100644
--- a/hdf/Makefile.in
+++ b/hdf/Makefile.in
@@ -242,6 +242,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/hdf/examples/CMakeLists.txt b/hdf/examples/CMakeLists.txt
index defffb8..4803c2a 100644
--- a/hdf/examples/CMakeLists.txt
+++ b/hdf/examples/CMakeLists.txt
@@ -1,37 +1,37 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 PROJECT (HDF4_HDF_EXAMPLES C CXX)
 
 #-----------------------------------------------------------------------------
 # Define Sources
 #-----------------------------------------------------------------------------
 set (examples
-    VD_create_vdatas 
+    VD_create_vdatas
     VD_write_mixed_vdata
-    VD_write_mixed_vdata_struct 
+    VD_write_mixed_vdata_struct
     VD_write_to_vdata
-    VD_read_from_vdata 
+    VD_read_from_vdata
     VD_read_mixed_vdata
-    VD_set_get_vdata_attr 
+    VD_set_get_vdata_attr
     VD_create_onefield_vdatas
-    VD_get_vdata_info 
-    VD_locate_vdata 
+    VD_get_vdata_info
+    VD_locate_vdata
     VG_create_vgroup
-#    VG_add_sds_to_vgroup 
+#    VG_add_sds_to_vgroup
     VG_insert_vdatas_to_vgroup
-    VG_set_get_vgroup_attr 
+    VG_set_get_vgroup_attr
     VG_vgroup_contents
-    VG_get_vgroup_info 
+    VG_get_vgroup_info
     GR_create_and_write_image
-    GR_modify_image 
-    GR_set_attribute 
+    GR_modify_image
+    GR_set_attribute
     GR_get_attribute
-    GR_write_chunks 
-    GR_write_palette 
-    GR_image_info 
+    GR_write_chunks
+    GR_write_palette
+    GR_image_info
     GR_read_chunks
     GR_read_image
-    AN_create_annotation 
-    AN_get_annotation_info 
+    AN_create_annotation
+    AN_get_annotation_info
     AN_read_annotation
 )
 
@@ -40,7 +40,7 @@ foreach (example ${examples})
   TARGET_NAMING (hdf_${example} STATIC)
   TARGET_C_PROPERTIES (hdf_${example} STATIC " " " ")
   target_link_libraries (hdf_${example} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-endforeach (example ${examples})
+endforeach ()
 
 add_executable (hdf_VG_add_sds_to_vgroup ${HDF4_HDF_EXAMPLES_SOURCE_DIR}/VG_add_sds_to_vgroup.c)
 TARGET_NAMING (hdf_VG_add_sds_to_vgroup STATIC)
@@ -49,4 +49,4 @@ target_link_libraries (hdf_VG_add_sds_to_vgroup ${HDF4_MF_LIB_TARGET} ${HDF4_SRC
 
 if (BUILD_TESTING)
   include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
diff --git a/hdf/examples/CMakeTests.cmake b/hdf/examples/CMakeTests.cmake
index 49cad62..731334c 100644
--- a/hdf/examples/CMakeTests.cmake
+++ b/hdf/examples/CMakeTests.cmake
@@ -9,7 +9,7 @@
 add_test (
     NAME HDF_EXAMPLES-clearall-objects
     COMMAND    ${CMAKE_COMMAND}
-        -E remove 
+        -E remove
         General_HDFobjects.hdf
         General_Rimages.hdf
         General_Vdatas.hdf
@@ -21,25 +21,25 @@ add_test (
 )
 if (NOT "${last_test}" STREQUAL "")
   set_tests_properties (HDF_EXAMPLES-clearall-objects PROPERTIES DEPENDS ${last_test} LABELS EXAMPLES)
-else (NOT "${last_test}" STREQUAL "")
+else ()
   set_tests_properties (HDF_EXAMPLES-clearall-objects PROPERTIES LABELS EXAMPLES)
-endif (NOT "${last_test}" STREQUAL "")
+endif ()
 set (last_test "HDF_EXAMPLES-clearall-objects")
 
 foreach (example ${examples})
   add_test (NAME HDF_EXAMPLES-${example} COMMAND $<TARGET_FILE:hdf_${example}>)
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (HDF_EXAMPLES-${example} PROPERTIES DEPENDS ${last_test} LABELS EXAMPLES)
-  else (NOT "${last_test}" STREQUAL "")
+  else ()
     set_tests_properties (HDF_EXAMPLES-${example} PROPERTIES LABELS EXAMPLES)
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "HDF_EXAMPLES-${example}")
-endforeach (example ${examples})
+endforeach ()
 
 add_test (NAME HDF_EXAMPLES-VG_add_sds_to_vgroup COMMAND $<TARGET_FILE:hdf_VG_add_sds_to_vgroup>)
 if (NOT "${last_test}" STREQUAL "")
   set_tests_properties (HDF_EXAMPLES-VG_add_sds_to_vgroup PROPERTIES DEPENDS ${last_test} LABELS EXAMPLES)
-else (NOT "${last_test}" STREQUAL "")
+else ()
   set_tests_properties (HDF_EXAMPLES-VG_add_sds_to_vgroup PROPERTIES LABELS EXAMPLES)
-endif (NOT "${last_test}" STREQUAL "")
+endif ()
 set (last_test "HDF_EXAMPLES-VG_add_sds_to_vgroup")
diff --git a/hdf/examples/Makefile.am b/hdf/examples/Makefile.am
index 75b7a2c..595282a 100644
--- a/hdf/examples/Makefile.am
+++ b/hdf/examples/Makefile.am
@@ -46,8 +46,8 @@ INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh
 INSTALL_TOP_FILES = README
 
 # Where to install example files
-EXAMPLEDIR=${DESTDIR}$(prefix)/examples/c
-EXAMPLETOPDIR=${DESTDIR}$(prefix)/examples
+EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf4_examples/c
+EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf4_examples
 
 # How to build C programs using h4cc
 $(EXTRA_PROG): $(H4CC)
diff --git a/hdf/examples/Makefile.in b/hdf/examples/Makefile.in
index b37d819..1064a72 100644
--- a/hdf/examples/Makefile.in
+++ b/hdf/examples/Makefile.in
@@ -396,6 +396,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
@@ -561,8 +562,8 @@ INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh
 INSTALL_TOP_FILES = README
 
 # Where to install example files
-EXAMPLEDIR = ${DESTDIR}$(prefix)/examples/c
-EXAMPLETOPDIR = ${DESTDIR}$(prefix)/examples
+EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf4_examples/c
+EXAMPLETOPDIR = ${DESTDIR}$(exec_prefix)/share/hdf4_examples
 DISTCLEANFILES = *.chkexe *.chklog
 @BUILD_SHARED_SZIP_CONDITIONAL_TRUE at LD_LIBRARY_PATH = $(LL_PATH)
 
diff --git a/hdf/examples/run-all-ex.sh b/hdf/examples/run-all-ex.sh
index 8a5e6bf..f3553ff 100755
--- a/hdf/examples/run-all-ex.sh
+++ b/hdf/examples/run-all-ex.sh
@@ -5,12 +5,10 @@
 #
 # This file is part of HDF4.  The full HDF4 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 at hdfgroup.org.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
 
 #
 #  This file:  run-all-ex.sh
@@ -19,7 +17,7 @@
 #
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 #                                                                               #
-# This script will run the scripts to compile and run the installed hdf5        #
+# This script will run the scripts to compile and run the installed hdf4        #
 # examples.                                                                     #
 #                                                                               #
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
diff --git a/hdf/examples/run-c-ex.sh b/hdf/examples/run-c-ex.sh
index 631682b..cea16a6 100644
--- a/hdf/examples/run-c-ex.sh
+++ b/hdf/examples/run-c-ex.sh
@@ -5,12 +5,10 @@
 #
 # This file is part of HDF4.  The full HDF4 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 HDF4 document set and
-# is linked from the top-level documents page.  It can also be found at
-# http://hdfgroup.org/HDF4/doc/Copyright.html.  If you do not have
-# access to either file, you may request a copy from help at hdfgroup.org.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
 
 #
 #  This file:  run-hdf-c-ex.sh
@@ -33,7 +31,7 @@ EXIT_FAILURE=1
  
 # Where the tool is installed.
 # default is relative path to installed location of the tools 
-prefix="${prefix:-../../}"
+prefix="${prefix:-../../../}"
 AR="@AR@"
 RANLIB="@RANLIB@"
 H4TOOL="h4cc"               # The tool name
@@ -166,6 +164,7 @@ fi
 # Cleanup
 rm *.o
 rm *.hdf
+rm ExternalSDS
 echo
 
 exit $EXIT_VALUE 
diff --git a/hdf/fortran/CMakeLists.txt b/hdf/fortran/CMakeLists.txt
index 3a876ec..2946e6c 100644
--- a/hdf/fortran/CMakeLists.txt
+++ b/hdf/fortran/CMakeLists.txt
@@ -48,7 +48,7 @@ set_target_properties (${HDF4_SRC_FCSTUB_LIB_TARGET} PROPERTIES
 )
 if (WIN32)
   set_property (TARGET ${HDF4_SRC_FCSTUB_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "DOS_FS")
-endif (WIN32)
+endif ()
 set (install_targets ${HDF4_SRC_FCSTUB_LIB_TARGET})
 
 if (BUILD_SHARED_LIBS)
@@ -66,9 +66,9 @@ if (BUILD_SHARED_LIBS)
   )
   if (WIN32)
     set_property (TARGET ${HDF4_SRC_FCSTUB_LIBSH_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "DOS_FS")
-  endif (WIN32)
+  endif ()
   set (install_targets ${install_targets} ${HDF4_SRC_FCSTUB_LIBSH_TARGET})
-endif (BUILD_SHARED_LIBS)
+endif ()
 
 set (HDF4_F_FORTRAN_SRCS
     ${HDF4_HDFSOURCE_DIR}/df24ff.f
@@ -100,7 +100,7 @@ set_target_properties (${HDF4_SRC_FORTRAN_LIB_TARGET} PROPERTIES
 )
 if (WIN32)
   set_property (TARGET ${HDF4_SRC_FORTRAN_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "DOS_FS")
-endif (WIN32)
+endif ()
 set (install_targets ${install_targets} ${HDF4_SRC_FORTRAN_LIB_TARGET})
 
 if (BUILD_SHARED_LIBS)
@@ -108,7 +108,7 @@ if (BUILD_SHARED_LIBS)
   set (SHARED_LINK_FLAGS " ")
   if (WIN32 AND MSVC)
     set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF4_HDF_FORTRAN_SOURCE_DIR}/hdf_fortrandll.def")
-  endif (WIN32 AND MSVC)
+  endif ()
   TARGET_FORTRAN_PROPERTIES (${HDF4_SRC_FORTRAN_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS})
   target_link_libraries (${HDF4_SRC_FORTRAN_LIBSH_TARGET} ${HDF4_SRC_FCSTUB_LIBSH_TARGET} ${LINK_SHARED_LIBS})
   set_global_variable (HDF4_LIBRARIES_TO_EXPORT "${HDF4_LIBRARIES_TO_EXPORT};${HDF4_SRC_FORTRAN_LIBSH_TARGET}")
@@ -123,14 +123,14 @@ if (BUILD_SHARED_LIBS)
   )
   if (WIN32)
     set_property (TARGET ${HDF4_SRC_FORTRAN_LIBSH_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "DOS_FS")
-  endif (WIN32)
+  endif ()
   set (install_targets ${install_targets} ${HDF4_SRC_FORTRAN_LIBSH_TARGET})
-endif (BUILD_SHARED_LIBS)
+endif ()
 
 
 if (BUILD_TESTING)
   include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
 
 ##############################################################################
 ##############################################################################
@@ -157,7 +157,8 @@ if (HDF4_EXPORTED_TARGETS)
   if (BUILD_SHARED_LIBS)
     INSTALL_TARGET_PDB (${HDF4_SRC_FCSTUB_LIBSH_TARGET} ${HDF4_INSTALL_BIN_DIR} fortlibraries)
     #INSTALL_TARGET_PDB (${HDF4_SRC_FORTRAN_LIBSH_TARGET} ${HDF4_INSTALL_BIN_DIR} fortlibraries)
-  endif (BUILD_SHARED_LIBS)
+  endif ()
+  INSTALL_TARGET_PDB (${HDF4_SRC_FCSTUB_LIB_TARGET} ${HDF4_INSTALL_BIN_DIR} fortlibraries)
 
   INSTALL (
       TARGETS
@@ -168,5 +169,6 @@ if (HDF4_EXPORTED_TARGETS)
       ARCHIVE DESTINATION ${HDF4_INSTALL_LIB_DIR} COMPONENT fortlibraries
       RUNTIME DESTINATION ${HDF4_INSTALL_BIN_DIR} COMPONENT fortlibraries
       FRAMEWORK DESTINATION ${HDF4_INSTALL_FWRK_DIR} COMPONENT fortlibraries
+      INCLUDES DESTINATION include
   )
-endif (HDF4_EXPORTED_TARGETS)
+endif ()
diff --git a/hdf/fortran/CMakeTests.cmake b/hdf/fortran/CMakeTests.cmake
index 123835c..7d639ba 100644
--- a/hdf/fortran/CMakeTests.cmake
+++ b/hdf/fortran/CMakeTests.cmake
@@ -4,7 +4,7 @@
 ###           T E S T I N G                                                ###
 ##############################################################################
 ##############################################################################
-  
+
   set (FORTRAN_SRC_DIR ${HDF4_HDF_TEST_SOURCE_DIR})
 
   #-----------------------------------------------------------------------------
@@ -14,11 +14,11 @@
   set_target_properties (${HDF4_HDF_TEST_FCSTUB_LIB_TARGET} PROPERTIES LINKER_LANGUAGE C)
   if (WIN32)
     add_definitions (-DDOS_FS)
-  endif (WIN32)
+  endif ()
   TARGET_C_PROPERTIES (${HDF4_HDF_TEST_FCSTUB_LIB_TARGET} STATIC " " " ")
   target_link_libraries (${HDF4_HDF_TEST_FCSTUB_LIB_TARGET} ${HDF4_SRC_LIB_TARGET})
   H4_SET_LIB_OPTIONS (${HDF4_HDF_TEST_FCSTUB_LIB_TARGET} ${HDF4_HDF_TEST_FCSTUB_LIB_NAME} STATIC)
-  
+
   #-- Adding test for fortest
   add_executable (fortest ${HDF4_HDF_TESTSOURCE_DIR}/fortest.c)
   TARGET_NAMING (fortest STATIC)
@@ -26,12 +26,12 @@
   target_link_libraries (fortest ${HDF4_SRC_LIB_TARGET} ${HDF4_MF_LIB_TARGET})
   if (WIN32)
     target_link_libraries (fortest "ws2_32.lib")
-  endif (WIN32)
+  endif ()
   set_target_properties (fortest PROPERTIES LINKER_LANGUAGE C)
 
   #-----------------------------------------------------------------------------
   #-- Adding test for fortestF
-  set (FORTEST_FSRCS 
+  set (FORTEST_FSRCS
       ${HDF4_HDF_TESTSOURCE_DIR}/fortestF.f
       ${HDF4_HDF_TESTSOURCE_DIR}/forsupff.f
       ${HDF4_HDF_TESTSOURCE_DIR}/manf.f
@@ -73,13 +73,13 @@
   foreach (h4_file ${HDF4_REFERENCE_TEST_FILES})
     set (dest "${PROJECT_BINARY_DIR}/test_files/${h4_file}")
     #message (STATUS " Copying ${HDF4_HDF_TESTSOURCE_DIR}/test_files/${h4_file} to ${PROJECT_BINARY_DIR}/test_files/")
-    ADD_CUSTOM_COMMAND (
-        TARGET     fortestF 
+    add_custom_command (
+        TARGET     fortestF
         POST_BUILD
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_HDF_TESTSOURCE_DIR}/test_files/${h4_file} ${dest}
     )
-  endforeach (h4_file ${HDF4_REFERENCE_TEST_FILES})
+  endforeach ()
 
 ##############################################################################
 ##############################################################################
@@ -91,7 +91,7 @@
   add_test (
       NAME HDF_FORTRAN-clearall-objects
       COMMAND    ${CMAKE_COMMAND}
-          -E remove 
+          -E remove
           fortest.arg
           Fortran_err.dat
           GRcompressed.hdf
@@ -111,5 +111,5 @@
 
   add_test (NAME fortestF COMMAND $<TARGET_FILE:fortestF>)
   set (passRegex "All Fortran Interface Tests Passed")
-  SET_PROPERTY (TEST fortestF PROPERTY PASS_REGULAR_EXPRESSION "${passRegex}")
-    
\ No newline at end of file
+  set_tests_properties (fortestF PROPERTIES DEPENDS fortest PASS_REGULAR_EXPRESSION "${passRegex}")
+
diff --git a/hdf/fortran/Makefile.in b/hdf/fortran/Makefile.in
index 996ddf1..f7bc154 100644
--- a/hdf/fortran/Makefile.in
+++ b/hdf/fortran/Makefile.in
@@ -243,6 +243,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/hdf/fortran/examples/CMakeLists.txt b/hdf/fortran/examples/CMakeLists.txt
index 7148fea..6265afb 100644
--- a/hdf/fortran/examples/CMakeLists.txt
+++ b/hdf/fortran/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 PROJECT (HDF4_HDF_FORTRAN_EXAMPLES C CXX Fortran)
 # --------------------------------------------------------------------
 # Notes: When creating examples they should be prefixed
@@ -12,8 +12,8 @@ if (CMAKE_Fortran_COMPILER MATCHES ifort)
   if (WIN32)
     set (CMAKE_Fortran_FLAGS_DEBUG "/debug:full /dbglibs " CACHE "flags" STRING FORCE)
     set (CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG" CACHE "flags" STRING FORCE)
-  endif (WIN32)
-endif (CMAKE_Fortran_COMPILER MATCHES ifort)
+  endif ()
+endif ()
 
 #-----------------------------------------------------------------------------
 # Setup include Directories
@@ -32,29 +32,29 @@ LINK_DIRECTORIES (
 # Define Sources
 #-----------------------------------------------------------------------------
 set (examples
-    VD_create_vdatas 
+    VD_create_vdatas
     VD_write_mixed_vdata
-    VD_write_to_vdata 
+    VD_write_to_vdata
     VD_create_onefield_vdatas
-    VD_read_from_vdata 
+    VD_read_from_vdata
     VD_read_mixed_vdata
-    VD_get_vdata_info 
-    VD_locate_vdata 
+    VD_get_vdata_info
+    VD_locate_vdata
     VG_create_vgroup
     #VG_add_sds_to_vgroup
     VG_insert_vdatas_to_vgroup
-    VG_set_get_vgroup_attr 
+    VG_set_get_vgroup_attr
     VG_vgroup_contents
-    VG_get_vgroup_info 
+    VG_get_vgroup_info
     GR_create_and_write_image
-    GR_modify_image 
-    GR_set_attribute 
+    GR_modify_image
+    GR_set_attribute
     GR_get_attribute
-    GR_write_palette 
-    GR_image_info 
+    GR_write_palette
+    GR_image_info
     GR_read_image
-    AN_create_annotation 
-    AN_get_annotation_info 
+    AN_create_annotation
+    AN_get_annotation_info
     AN_read_annotation
     #VD_set_get_vdata_attr
 )
@@ -75,7 +75,7 @@ foreach (example ${examples})
       Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
   )
   target_link_libraries (f_ex_${example} ${HDF4_SRC_FORTRAN_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-endforeach (example ${examples})
+endforeach ()
 
 add_executable (f_ex_VG_add_sds_to_vgroup ${HDF4_HDF_FORTRAN_EXAMPLES_SOURCE_DIR}/VG_add_sds_to_vgroup.f)
 TARGET_NAMING (f_ex_VG_add_sds_to_vgroup STATIC)
@@ -97,8 +97,8 @@ foreach (example ${skip_examples})
       Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
   )
   target_link_libraries (f_ex_${example} ${HDF4_SRC_FORTRAN_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-endforeach (example ${skip_examples})
+endforeach ()
 
 if (BUILD_TESTING)
   include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
diff --git a/hdf/fortran/examples/CMakeTests.cmake b/hdf/fortran/examples/CMakeTests.cmake
index d6f8bc2..da2ee41 100644
--- a/hdf/fortran/examples/CMakeTests.cmake
+++ b/hdf/fortran/examples/CMakeTests.cmake
@@ -9,7 +9,7 @@
 add_test (
     NAME HDF_FORTRAN_EXAMPLES-clearall-objects
     COMMAND    ${CMAKE_COMMAND}
-        -E remove 
+        -E remove
         General_HDFobjects.hdf
         General_RImages.hdf
         General_Vdatas.hdf
@@ -21,29 +21,29 @@ add_test (
 )
 if (NOT "${last_test}" STREQUAL "")
   set_tests_properties (HDF_FORTRAN_EXAMPLES-clearall-objects PROPERTIES DEPENDS ${last_test} LABELS EXAMPLES)
-else (NOT "${last_test}" STREQUAL "")
+else ()
   set_tests_properties (HDF_FORTRAN_EXAMPLES-clearall-objects PROPERTIES LABELS EXAMPLES)
-endif (NOT "${last_test}" STREQUAL "")
+endif ()
 set (last_test "HDF_FORTRAN_EXAMPLES-clearall-objects")
 
 foreach (example ${examples})
   add_test (NAME f_extest_${example} COMMAND $<TARGET_FILE:f_ex_${example}>)
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (f_extest_${example} PROPERTIES DEPENDS ${last_test} LABELS EXAMPLES)
-  else (NOT "${last_test}" STREQUAL "")
+  else ()
     set_tests_properties (f_extest_${example} PROPERTIES LABELS EXAMPLES)
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "f_extest_${example}")
-endforeach (example ${examples})
+endforeach ()
 
 add_test (NAME f_extest_VG_add_sds_to_vgroup COMMAND $<TARGET_FILE:f_ex_VG_add_sds_to_vgroup>)
 if (NOT "${last_test}" STREQUAL "")
   set_tests_properties (f_extest_VG_add_sds_to_vgroup PROPERTIES DEPENDS ${last_test} LABELS EXAMPLES)
-else (NOT "${last_test}" STREQUAL "")
+else ()
   set_tests_properties (f_extest_VG_add_sds_to_vgroup PROPERTIES LABELS EXAMPLES)
-endif (NOT "${last_test}" STREQUAL "")
+endif ()
 set (last_test "f_extest_VG_add_sds_to_vgroup")
 
 foreach (example ${skip_examples})
   add_test (NAME f_extest_${example} COMMAND ${CMAKE_COMMAND} -E echo "SKIP f_extest_${example}")
-endforeach (example ${skip_examples})
+endforeach ()
diff --git a/hdf/fortran/examples/Makefile.am b/hdf/fortran/examples/Makefile.am
index b9a969f..ac29e8c 100644
--- a/hdf/fortran/examples/Makefile.am
+++ b/hdf/fortran/examples/Makefile.am
@@ -41,7 +41,7 @@ INSTALL_FILES= VD_read_from_vdata.f VD_read_mixed_vdata.f \
 INSTALL_SCRIPT_FILES = run-fortran-ex.sh
 
 # Where to install Fortran example files
-EXAMPLEDIR=${DESTDIR}$(prefix)/examples/fortran
+EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf4_examples/fortran
 
 # How to build Fortran programs using h4fc
 $(EXTRA_PROG): $(H4FC)
diff --git a/hdf/fortran/examples/Makefile.in b/hdf/fortran/examples/Makefile.in
index d8f0f92..1f475d9 100644
--- a/hdf/fortran/examples/Makefile.in
+++ b/hdf/fortran/examples/Makefile.in
@@ -396,6 +396,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
@@ -556,7 +557,7 @@ INSTALL_FILES = VD_read_from_vdata.f VD_read_mixed_vdata.f \
 INSTALL_SCRIPT_FILES = run-fortran-ex.sh
 
 # Where to install Fortran example files
-EXAMPLEDIR = ${DESTDIR}$(prefix)/examples/fortran
+EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf4_examples/fortran
 DISTCLEANFILES = *.chkexe *.chklog
 @BUILD_SHARED_SZIP_CONDITIONAL_TRUE at LD_LIBRARY_PATH = $(LL_PATH)
 
diff --git a/hdf/fortran/examples/run-fortran-ex.sh b/hdf/fortran/examples/run-fortran-ex.sh
index f0f1983..bfdddcf 100644
--- a/hdf/fortran/examples/run-fortran-ex.sh
+++ b/hdf/fortran/examples/run-fortran-ex.sh
@@ -5,12 +5,10 @@
 #
 # This file is part of HDF4.  The full HDF4 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 HDF4 document set and
-# is linked from the top-level documents page.  It can also be found at
-# http://hdfgroup.org/HDF4/doc/Copyright.html.  If you do not have
-# access to either file, you may request a copy from help at hdfgroup.org.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.
+# If you do not have access to either file, you may request a copy from
+# help at hdfgroup.org.
 
 #
 #  This file:  run-hdf-c-ex.sh
@@ -33,7 +31,7 @@ EXIT_FAILURE=1
  
 # Where the tool is installed.
 # default is relative path to installed location of the tools 
-prefix="${prefix:-../../}"
+prefix="${prefix:-../../../}"
 AR="@AR@"
 RANLIB="@RANLIB@"
 H4TOOL="h4fc"               # The tool name
diff --git a/hdf/src/CMakeLists.txt b/hdf/src/CMakeLists.txt
index 717b41d..c6573a5 100644
--- a/hdf/src/CMakeLists.txt
+++ b/hdf/src/CMakeLists.txt
@@ -171,6 +171,7 @@ if (HDF4_EXPORTED_TARGETS)
   if (BUILD_SHARED_LIBS)
     INSTALL_TARGET_PDB (${HDF4_SRC_LIBSH_TARGET} ${HDF4_INSTALL_BIN_DIR} libraries)
   endif (BUILD_SHARED_LIBS)
+  INSTALL_TARGET_PDB (${HDF4_SRC_LIB_TARGET} ${HDF4_INSTALL_BIN_DIR} libraries)
 
   INSTALL (
       TARGETS
@@ -181,6 +182,7 @@ if (HDF4_EXPORTED_TARGETS)
       ARCHIVE DESTINATION ${HDF4_INSTALL_LIB_DIR} COMPONENT libraries
       RUNTIME DESTINATION ${HDF4_INSTALL_BIN_DIR} COMPONENT libraries
       FRAMEWORK DESTINATION ${HDF4_INSTALL_FWRK_DIR} COMPONENT libraries
+      INCLUDES DESTINATION include
   )
 endif (HDF4_EXPORTED_TARGETS)
 
diff --git a/hdf/src/H4api_adpt.h b/hdf/src/H4api_adpt.h
index c80f9c6..5b5d0c3 100644
--- a/hdf/src/H4api_adpt.h
+++ b/hdf/src/H4api_adpt.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /* $Id: hdfi.h 5435 2010-08-11 17:31:24Z byrn $ */
diff --git a/hdf/src/Makefile.in b/hdf/src/Makefile.in
index 10e7dda..1141b93 100644
--- a/hdf/src/Makefile.in
+++ b/hdf/src/Makefile.in
@@ -321,6 +321,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/hdf/src/atom.c b/hdf/src/atom.c
index 72e17bc..a2fdae5 100644
--- a/hdf/src/atom.c
+++ b/hdf/src/atom.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: atom.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
 FILE
diff --git a/hdf/src/atom.h b/hdf/src/atom.h
index 8df642f..7617bd0 100644
--- a/hdf/src/atom.h
+++ b/hdf/src/atom.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: atom.h 5444 2010-08-25 16:40:05Z byrn $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    atom.h
diff --git a/hdf/src/bitvect.c b/hdf/src/bitvect.c
index 5efba61..62c84ee 100644
--- a/hdf/src/bitvect.c
+++ b/hdf/src/bitvect.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: bitvect.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
 FILE
diff --git a/hdf/src/bitvect.h b/hdf/src/bitvect.h
index 1ad6c64..76dc488 100644
--- a/hdf/src/bitvect.h
+++ b/hdf/src/bitvect.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: bitvect.h 5444 2010-08-25 16:40:05Z byrn $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    bitvect.h
diff --git a/hdf/src/cdeflate.c b/hdf/src/cdeflate.c
index 1a9648d..3ff21d6 100644
--- a/hdf/src/cdeflate.c
+++ b/hdf/src/cdeflate.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: cdeflate.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    FILE
diff --git a/hdf/src/cdeflate.h b/hdf/src/cdeflate.h
index 65b1d99..a2be8d5 100644
--- a/hdf/src/cdeflate.h
+++ b/hdf/src/cdeflate.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
- /* $Id: cdeflate.h 4932 2007-09-07 17:17:23Z bmribler $ */
+ /* $Id$ */
 
  /*-----------------------------------------------------------------------------
  * File:    cdeflate.h
diff --git a/hdf/src/cnbit.c b/hdf/src/cnbit.c
index ccf3b2e..f255a53 100644
--- a/hdf/src/cnbit.c
+++ b/hdf/src/cnbit.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: cnbit.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    FILE
diff --git a/hdf/src/cnbit.h b/hdf/src/cnbit.h
index 88c1f24..334da55 100644
--- a/hdf/src/cnbit.h
+++ b/hdf/src/cnbit.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
- /* $Id: cnbit.h 4932 2007-09-07 17:17:23Z bmribler $ */
+ /* $Id$ */
 
  /*-----------------------------------------------------------------------------
  * File:    cnbit.h
diff --git a/hdf/src/cnone.c b/hdf/src/cnone.c
index cb917b5..d9d0c46 100644
--- a/hdf/src/cnone.c
+++ b/hdf/src/cnone.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: cnone.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    FILE
diff --git a/hdf/src/cnone.h b/hdf/src/cnone.h
index 4ac7785..cd46714 100644
--- a/hdf/src/cnone.h
+++ b/hdf/src/cnone.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: cnone.h 4932 2007-09-07 17:17:23Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    cnone.h
diff --git a/hdf/src/crle.c b/hdf/src/crle.c
index d24f89d..0058daf 100644
--- a/hdf/src/crle.c
+++ b/hdf/src/crle.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: crle.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    FILE
diff --git a/hdf/src/crle.h b/hdf/src/crle.h
index 5347fde..378adba 100644
--- a/hdf/src/crle.h
+++ b/hdf/src/crle.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: crle.h 5705 2011-10-26 12:45:21Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    crle.h
diff --git a/hdf/src/cskphuff.c b/hdf/src/cskphuff.c
index 56897ef..765bc5b 100644
--- a/hdf/src/cskphuff.c
+++ b/hdf/src/cskphuff.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: cskphuff.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    FILE
diff --git a/hdf/src/cskphuff.h b/hdf/src/cskphuff.h
index 50be0f4..65b0c76 100644
--- a/hdf/src/cskphuff.h
+++ b/hdf/src/cskphuff.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
- /* $Id: cskphuff.h 4932 2007-09-07 17:17:23Z bmribler $ */
+ /* $Id$ */
 
  /*-----------------------------------------------------------------------------
  * File:    cskphuff.h
diff --git a/hdf/src/cszip.c b/hdf/src/cszip.c
index 5e54da1..d46ac88 100644
--- a/hdf/src/cszip.c
+++ b/hdf/src/cszip.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: cszip.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /* General HDF includes */
 
diff --git a/hdf/src/cszip.h b/hdf/src/cszip.h
index 2dc7d36..ea5699c 100644
--- a/hdf/src/cszip.h
+++ b/hdf/src/cszip.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: cszip.h 6066 2014-02-03 16:30:04Z derobins $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
   * File:    cszip.h
diff --git a/hdf/src/df.h b/hdf/src/df.h
index 396810a..2d8ad9a 100644
--- a/hdf/src/df.h
+++ b/hdf/src/df.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: df.h 5444 2010-08-25 16:40:05Z byrn $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    df.h
diff --git a/hdf/src/df24.c b/hdf/src/df24.c
index 4158fa2..6399e91 100644
--- a/hdf/src/df24.c
+++ b/hdf/src/df24.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: df24.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:     df24.c
diff --git a/hdf/src/df24f.c b/hdf/src/df24f.c
index 8884b81..079fff9 100644
--- a/hdf/src/df24f.c
+++ b/hdf/src/df24f.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: df24f.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:     df24F.c
diff --git a/hdf/src/df24ff.f b/hdf/src/df24ff.f
index 40db708..9e0ff52 100644
--- a/hdf/src/df24ff.f
+++ b/hdf/src/df24ff.f
@@ -5,13 +5,13 @@ C* All rights reserved.                                                      *
 C*                                                                           *
 C* This file is part of HDF.  The full HDF copyright notice, including       *
 C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
+C* the COPYING file, which can be found at the root of the source code       *
+C* distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C* If you do not have access to either file, you may request a copy from     *
+C* help at hdfgroup.org.                                                        *
 C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 C
-C $Id: df24ff.f 6034 2014-01-19 06:59:14Z epourmal $
+C $Id$
 C
 C------------------------------------------------------------------------------
 C File:     df24Ff.f
diff --git a/hdf/src/dfan.c b/hdf/src/dfan.c
index df69616..ee06b54 100644
--- a/hdf/src/dfan.c
+++ b/hdf/src/dfan.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfan.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:     dfan.c
diff --git a/hdf/src/dfan.h b/hdf/src/dfan.h
index df50a80..844977f 100644
--- a/hdf/src/dfan.h
+++ b/hdf/src/dfan.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfan.h 4932 2007-09-07 17:17:23Z bmribler $ */
+/* $Id$ */
 
 /*------------------------------------------------------------------------------
  * File:    dfan.h
diff --git a/hdf/src/dfanf.c b/hdf/src/dfanf.c
index a8b3b3a..ff57069 100644
--- a/hdf/src/dfanf.c
+++ b/hdf/src/dfanf.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfanf.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    dfanF.c
diff --git a/hdf/src/dfanff.f b/hdf/src/dfanff.f
index 2214cc4..c2458ee 100644
--- a/hdf/src/dfanff.f
+++ b/hdf/src/dfanff.f
@@ -5,13 +5,13 @@ C* All rights reserved.                                                      *
 C*                                                                           *
 C* This file is part of HDF.  The full HDF copyright notice, including       *
 C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
+C* the COPYING file, which can be found at the root of the source code       *
+C* distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C* If you do not have access to either file, you may request a copy from     *
+C* help at hdfgroup.org.                                                        *
 C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 C
-C $Id: dfanff.f 4932 2007-09-07 17:17:23Z bmribler $
+C $Id$
 C
 C------------------------------------------------------------------------------
 C File:     dfanFf.f
diff --git a/hdf/src/dfcomp.c b/hdf/src/dfcomp.c
index 34cc3da..10cfb9f 100644
--- a/hdf/src/dfcomp.c
+++ b/hdf/src/dfcomp.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfcomp.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    dfcomp.c
diff --git a/hdf/src/dfconv.c b/hdf/src/dfconv.c
index f6617f4..19e6a98 100644
--- a/hdf/src/dfconv.c
+++ b/hdf/src/dfconv.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfconv.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*------------------------------------------------------------------
  File:  dfconv.c
diff --git a/hdf/src/dfconvrt.h b/hdf/src/dfconvrt.h
index 87d1599..79077f3 100644
--- a/hdf/src/dfconvrt.h
+++ b/hdf/src/dfconvrt.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfconvrt.h 4932 2007-09-07 17:17:23Z bmribler $ */
+/* $Id$ */
 
 /* In order to speed the conversion process, eliminate a layer of function
  * calls by making DFconvert into a macro.
diff --git a/hdf/src/dff.c b/hdf/src/dff.c
index 3e1ca2e..7fbfd82 100644
--- a/hdf/src/dff.c
+++ b/hdf/src/dff.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dff.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    dfF.c
diff --git a/hdf/src/dfff.f b/hdf/src/dfff.f
index fc5f09c..a65d357 100644
--- a/hdf/src/dfff.f
+++ b/hdf/src/dfff.f
@@ -5,13 +5,13 @@ C* All rights reserved.                                                      *
 C*                                                                           *
 C* This file is part of HDF.  The full HDF copyright notice, including       *
 C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
+C* the COPYING file, which can be found at the root of the source code       *
+C* distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C* If you do not have access to either file, you may request a copy from     *
+C* help at hdfgroup.org.                                                        *
 C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 C
-C $Id: dfff.f 4932 2007-09-07 17:17:23Z bmribler $ 
+C $Id$ 
 C
 C------------------------------------------------------------------------------
 C File:     dfFf.f
diff --git a/hdf/src/dffunc.inc b/hdf/src/dffunc.inc
index 48232a2..15fc8f1 100644
--- a/hdf/src/dffunc.inc
+++ b/hdf/src/dffunc.inc
@@ -10,7 +10,7 @@ C* hdf/COPYING file.                                                        *
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: dffunc.inc 6034 2014-01-19 06:59:14Z epourmal $
+C $Id$
 C
 C     dffunc.inc
 C
@@ -202,6 +202,8 @@ C
       external DFclose
       integer  DFsfind
       external DFsfind
+      integer  DFdesc
+      external DFdesc
       integer  DFfind
       external DFfind
       integer  DFget
@@ -411,6 +413,8 @@ C
       integer  vsfgetblinfo
       integer  vsfgvdatas
       external vsfgvdatas
+      integer  vsgver
+      external vsgver
 C
 C     Declarations of return values for HDF Vdata Field Functions
 C
diff --git a/hdf/src/dfgr.c b/hdf/src/dfgr.c
index ca85bf0..a636152 100644
--- a/hdf/src/dfgr.c
+++ b/hdf/src/dfgr.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfgr.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:     dfgr.c
diff --git a/hdf/src/dfgr.h b/hdf/src/dfgr.h
index 626a57a..bafecdd 100644
--- a/hdf/src/dfgr.h
+++ b/hdf/src/dfgr.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfgr.h 4932 2007-09-07 17:17:23Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    dfgr.h
diff --git a/hdf/src/dfgroup.c b/hdf/src/dfgroup.c
index e75bae6..52b04cc 100644
--- a/hdf/src/dfgroup.c
+++ b/hdf/src/dfgroup.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfgroup.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    dfgroup.c
diff --git a/hdf/src/dfi.h b/hdf/src/dfi.h
index 5f3c64c..5957897 100644
--- a/hdf/src/dfi.h
+++ b/hdf/src/dfi.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfi.h 6043 2014-01-21 21:09:03Z acheng $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    dfi.h
diff --git a/hdf/src/dfimcomp.c b/hdf/src/dfimcomp.c
index 6b57f53..4cd0bfc 100644
--- a/hdf/src/dfimcomp.c
+++ b/hdf/src/dfimcomp.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfimcomp.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /************************************************************************/
 /*  Module Name : imcomp                                                */
diff --git a/hdf/src/dfjpeg.c b/hdf/src/dfjpeg.c
index 3b8e4f7..d5e2ab0 100644
--- a/hdf/src/dfjpeg.c
+++ b/hdf/src/dfjpeg.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfjpeg.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    dfjpeg.c
diff --git a/hdf/src/dfknat.c b/hdf/src/dfknat.c
index c1069f5..1aaf2e6 100644
--- a/hdf/src/dfknat.c
+++ b/hdf/src/dfknat.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfknat.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*------------------------------------------------------------------
  File:  dfknat.c
diff --git a/hdf/src/dfkswap.c b/hdf/src/dfkswap.c
index fc42de5..aa0ea74 100644
--- a/hdf/src/dfkswap.c
+++ b/hdf/src/dfkswap.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfkswap.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*------------------------------------------------------------------
  File:  dfkswap.c
diff --git a/hdf/src/dfp.c b/hdf/src/dfp.c
index 48cbae5..d5beceb 100644
--- a/hdf/src/dfp.c
+++ b/hdf/src/dfp.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfp.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:     dfp.c
diff --git a/hdf/src/dfpf.c b/hdf/src/dfpf.c
index be63a08..553a6f5 100644
--- a/hdf/src/dfpf.c
+++ b/hdf/src/dfpf.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfpf.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    dfpF.c
diff --git a/hdf/src/dfpff.f b/hdf/src/dfpff.f
index 349df1d..db30652 100644
--- a/hdf/src/dfpff.f
+++ b/hdf/src/dfpff.f
@@ -5,13 +5,13 @@ C* All rights reserved.                                                      *
 C*                                                                           *
 C* This file is part of HDF.  The full HDF copyright notice, including       *
 C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
+C* the COPYING file, which can be found at the root of the source code       *
+C* distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C* If you do not have access to either file, you may request a copy from     *
+C* help at hdfgroup.org.                                                        *
 C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 C
-C $Id: dfpff.f 4932 2007-09-07 17:17:23Z bmribler $
+C $Id$
 C
 C------------------------------------------------------------------------------
 C File:     dfpFf.f
diff --git a/hdf/src/dfr8.c b/hdf/src/dfr8.c
index 8320e71..0ae5ac6 100644
--- a/hdf/src/dfr8.c
+++ b/hdf/src/dfr8.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfr8.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:     dfr8.c
diff --git a/hdf/src/dfr8f.c b/hdf/src/dfr8f.c
index 522654b..0a4e699 100644
--- a/hdf/src/dfr8f.c
+++ b/hdf/src/dfr8f.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfr8f.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    dfr8F.c
diff --git a/hdf/src/dfr8ff.f b/hdf/src/dfr8ff.f
index 8d4a05c..cc1983b 100644
--- a/hdf/src/dfr8ff.f
+++ b/hdf/src/dfr8ff.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
-C $Id: dfr8ff.f 4932 2007-09-07 17:17:23Z bmribler $
+C $Id$
 C
 C------------------------------------------------------------------------------
 C File:     dfr8Ff.f
diff --git a/hdf/src/dfrig.h b/hdf/src/dfrig.h
index 88eebb7..5604586 100644
--- a/hdf/src/dfrig.h
+++ b/hdf/src/dfrig.h
@@ -1,4 +1,3 @@
-
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  * Copyright by The HDF Group.                                               *
  * Copyright by the Board of Trustees of the University of Illinois.         *
@@ -6,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfrig.h 4932 2007-09-07 17:17:23Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    dfrig.h
diff --git a/hdf/src/dfrle.c b/hdf/src/dfrle.c
index cb49b24..63a139e 100644
--- a/hdf/src/dfrle.c
+++ b/hdf/src/dfrle.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfrle.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    dfrle.c
diff --git a/hdf/src/dfsd.c b/hdf/src/dfsd.c
index 99ded28..4380122 100644
--- a/hdf/src/dfsd.c
+++ b/hdf/src/dfsd.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfsd.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  File:  dfsd.c
diff --git a/hdf/src/dfsd.h b/hdf/src/dfsd.h
index 9939ad7..4c84fb5 100644
--- a/hdf/src/dfsd.h
+++ b/hdf/src/dfsd.h
@@ -1,4 +1,3 @@
-
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  * Copyright by The HDF Group.                                               *
  * Copyright by the Board of Trustees of the University of Illinois.         *
@@ -6,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfsd.h 5444 2010-08-25 16:40:05Z byrn $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    dfsd.h
diff --git a/hdf/src/dfsdf.c b/hdf/src/dfsdf.c
index cd60f35..b9884c0 100644
--- a/hdf/src/dfsdf.c
+++ b/hdf/src/dfsdf.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfsdf.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    dfsdf.c
diff --git a/hdf/src/dfsdff.f b/hdf/src/dfsdff.f
index 8abdae9..f5b0772 100644
--- a/hdf/src/dfsdff.f
+++ b/hdf/src/dfsdff.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
-C $Id: dfsdff.f 4932 2007-09-07 17:17:23Z bmribler $ 
+C $Id$ 
 C
 C------------------------------------------------------------------------------
 C File:     dfsdFf.f
diff --git a/hdf/src/dfstubs.c b/hdf/src/dfstubs.c
index ee3103b..9efdb10 100644
--- a/hdf/src/dfstubs.c
+++ b/hdf/src/dfstubs.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfstubs.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    ** FILE
diff --git a/hdf/src/dfstubs.h b/hdf/src/dfstubs.h
index f288f65..40cfbed 100644
--- a/hdf/src/dfstubs.h
+++ b/hdf/src/dfstubs.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfstubs.h 6036 2014-01-20 17:28:01Z acheng $ */
+/* $Id$ */
 
 /*
    ** FILE
diff --git a/hdf/src/dfufp2i.c b/hdf/src/dfufp2i.c
index d4ba24c..c998c40 100644
--- a/hdf/src/dfufp2i.c
+++ b/hdf/src/dfufp2i.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfufp2i.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------c
  *    dfufp2i.c
diff --git a/hdf/src/dfufp2i.h b/hdf/src/dfufp2i.h
index f3c5289..e7cb2e2 100644
--- a/hdf/src/dfufp2i.h
+++ b/hdf/src/dfufp2i.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfufp2i.h 6220 2015-03-05 20:06:46Z byrn $ */
+/* $Id$ */
 
 #ifndef DFUFP2IM_H  /* avoid re-inclusion */
 #define DFUFP2IM_H
diff --git a/hdf/src/dfufp2if.c b/hdf/src/dfufp2if.c
index afc3a88..9cdf81f 100644
--- a/hdf/src/dfufp2if.c
+++ b/hdf/src/dfufp2if.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "hdf.h"
diff --git a/hdf/src/dfufp2iff.f b/hdf/src/dfufp2iff.f
index 9b096b1..b68b0ba 100644
--- a/hdf/src/dfufp2iff.f
+++ b/hdf/src/dfufp2iff.f
@@ -1,15 +1,15 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
 C $Id: dfufp2if.f 1014 1994-01-13 21:16:42Z georgev $
 C
diff --git a/hdf/src/dfunjpeg.c b/hdf/src/dfunjpeg.c
index a2a305f..a4d10b0 100644
--- a/hdf/src/dfunjpeg.c
+++ b/hdf/src/dfunjpeg.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfunjpeg.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    dfunjpeg.c
diff --git a/hdf/src/dfutil.c b/hdf/src/dfutil.c
index bd3b51b..98e7098 100644
--- a/hdf/src/dfutil.c
+++ b/hdf/src/dfutil.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfutil.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:  dfutil.c
diff --git a/hdf/src/dfutilf.c b/hdf/src/dfutilf.c
index 6745d21..a1ac084 100644
--- a/hdf/src/dfutilf.c
+++ b/hdf/src/dfutilf.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dfutilf.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    dfutilf.c
diff --git a/hdf/src/dynarray.c b/hdf/src/dynarray.c
index ee508a0..7285ee3 100644
--- a/hdf/src/dynarray.c
+++ b/hdf/src/dynarray.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dynarray.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
 FILE
diff --git a/hdf/src/dynarray.h b/hdf/src/dynarray.h
index a1f2311..28af783 100644
--- a/hdf/src/dynarray.h
+++ b/hdf/src/dynarray.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: dynarray.h 4932 2007-09-07 17:17:23Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    dynarray.h
diff --git a/hdf/src/glist.c b/hdf/src/glist.c
index cac7ad6..65f3304 100644
--- a/hdf/src/glist.c
+++ b/hdf/src/glist.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /************************************************************************
diff --git a/hdf/src/glist.h b/hdf/src/glist.h
index 19bd336..232a539 100644
--- a/hdf/src/glist.h
+++ b/hdf/src/glist.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /************************************************************************
@@ -20,7 +20,7 @@
   1996/05/29 - George V.
  ************************************************************************/
 
-/* $Id: glist.h 4932 2007-09-07 17:17:23Z bmribler $ */
+/* $Id$ */
 
 #ifndef GLIST_H
 #define GLIST_H
diff --git a/hdf/src/hbitio.c b/hdf/src/hbitio.c
index a32f5a8..a2b0f4f 100644
--- a/hdf/src/hbitio.c
+++ b/hdf/src/hbitio.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hbitio.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
 FILE
diff --git a/hdf/src/hbitio.h b/hdf/src/hbitio.h
index e0a3c64..bf1ba2f 100644
--- a/hdf/src/hbitio.h
+++ b/hdf/src/hbitio.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hbitio.h 4932 2007-09-07 17:17:23Z bmribler $ */
+/* $Id$ */
 
 /*
    **  hbitio.h
diff --git a/hdf/src/hblocks.c b/hdf/src/hblocks.c
index 987989f..37a0f04 100644
--- a/hdf/src/hblocks.c
+++ b/hdf/src/hblocks.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hblocks.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*LINTLIBRARY */
 /* ------------------------------ hblocks.c -------------------------------
diff --git a/hdf/src/hbuffer.c b/hdf/src/hbuffer.c
index 0270c8c..18438a2 100644
--- a/hdf/src/hbuffer.c
+++ b/hdf/src/hbuffer.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hbuffer.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 /*LINTLIBRARY */
 /* ------------------------------ hbuffer.c -------------------------------
 
diff --git a/hdf/src/hchunks.c b/hdf/src/hchunks.c
index f2fa1ab..a743a1b 100644
--- a/hdf/src/hchunks.c
+++ b/hdf/src/hchunks.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hchunks.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*LINTLIBRARY */
 /* ------------------------------ HMCxxx -------------------------------
diff --git a/hdf/src/hchunks.h b/hdf/src/hchunks.h
index a2e4eca..75de5a5 100644
--- a/hdf/src/hchunks.h
+++ b/hdf/src/hchunks.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hchunks.h 5494 2010-11-01 05:10:53Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:         hchunks.h
diff --git a/hdf/src/hcomp.c b/hdf/src/hcomp.c
index e60ae8a..66d0c62 100644
--- a/hdf/src/hcomp.c
+++ b/hdf/src/hcomp.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hcomp.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
 FILE
diff --git a/hdf/src/hcomp.h b/hdf/src/hcomp.h
index d8ebd5f..e7cd908 100644
--- a/hdf/src/hcomp.h
+++ b/hdf/src/hcomp.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hcomp.h 5830 2012-07-19 09:08:48Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    hcomp.h
diff --git a/hdf/src/hcompi.h b/hdf/src/hcompi.h
index fe1f75f..4b58a5f 100644
--- a/hdf/src/hcompi.h
+++ b/hdf/src/hcompi.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hcompi.h 4932 2007-09-07 17:17:23Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    hcompi.h
diff --git a/hdf/src/hcompri.c b/hdf/src/hcompri.c
index d0d8a27..14b99e7 100644
--- a/hdf/src/hcompri.c
+++ b/hdf/src/hcompri.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hcompri.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 /*LINTLIBRARY */
 /* ------------------------------ hcompri.c -------------------------------
 
diff --git a/hdf/src/hconv.h b/hdf/src/hconv.h
index 9f9f635..ab2317d 100644
--- a/hdf/src/hconv.h
+++ b/hdf/src/hconv.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hconv.h 6036 2014-01-20 17:28:01Z acheng $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    hconv.h
diff --git a/hdf/src/hdatainfo.c b/hdf/src/hdatainfo.c
index e1d703b..1f97aef 100644
--- a/hdf/src/hdatainfo.c
+++ b/hdf/src/hdatainfo.c
@@ -4,10 +4,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /* NOTE: this file and other "datainfo" related files will be configured so
diff --git a/hdf/src/hdatainfo.h b/hdf/src/hdatainfo.h
index e6744f2..642dd9a 100644
--- a/hdf/src/hdatainfo.h
+++ b/hdf/src/hdatainfo.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /* $Id: hproto.h 5400 2010-04-22 03:45:32Z bmribler $ */
diff --git a/hdf/src/hdf.h b/hdf/src/hdf.h
index f9fd7ba..08e210c 100644
--- a/hdf/src/hdf.h
+++ b/hdf/src/hdf.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdf.h 5584 2011-04-13 18:25:06Z bmribler $ */
+/* $Id$ */
 
 #ifndef HDF_H
 #define HDF_H
diff --git a/hdf/src/hdf.inc b/hdf/src/hdf.inc
index b281bbf..57c7f0f 100644
--- a/hdf/src/hdf.inc
+++ b/hdf/src/hdf.inc
@@ -10,7 +10,7 @@ C* hdf/COPYING file.                                                        *
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: hdf.inc 6034 2014-01-19 06:59:14Z epourmal $
+C $Id$
 C
 C *-----------------------------------------------------------------------------
 C * File: 	hdf.inc
diff --git a/hdf/src/hdfalloc.c b/hdf/src/hdfalloc.c
index 4e6cb4d..10ede54 100644
--- a/hdf/src/hdfalloc.c
+++ b/hdf/src/hdfalloc.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdfalloc.c 6427 2016-06-13 21:56:09Z byrn $ */
+/* $Id$ */
 
 #ifdef MALDEBUG
 #define __MALDEBUG__
diff --git a/hdf/src/hdfi.h b/hdf/src/hdfi.h
index bdab3e9..1ea8174 100644
--- a/hdf/src/hdfi.h
+++ b/hdf/src/hdfi.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdfi.h 6446 2016-06-15 16:54:36Z bmribler $ */
+/* $Id$ */
 
 #ifndef HDFI_H
 #define HDFI_H
diff --git a/hdf/src/herr.c b/hdf/src/herr.c
index 99f7f29..751aa6a 100644
--- a/hdf/src/herr.c
+++ b/hdf/src/herr.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: herr.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*LINTLIBRARY */
 /* -------------------------------- herr.c -------------------------------- */
@@ -311,6 +311,7 @@ intn HEshutdown(void)
       {
           HDfree(error_stack);
           error_stack=NULL;
+          error_top=0;
       } /* end if */
     return(SUCCEED);
 } /* end HEshutdown() */
diff --git a/hdf/src/herr.h b/hdf/src/herr.h
index 1df813e..9988819 100644
--- a/hdf/src/herr.h
+++ b/hdf/src/herr.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: herr.h 6443 2016-06-15 02:10:31Z bmribler $ */
+/* $Id$ */
 
 /*+ herr.h
    ***  header file for using error routines
diff --git a/hdf/src/herrf.c b/hdf/src/herrf.c
index a84d7ae..4d87f9f 100644
--- a/hdf/src/herrf.c
+++ b/hdf/src/herrf.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: herrf.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    herrf.c
diff --git a/hdf/src/hextelt.c b/hdf/src/hextelt.c
index 37b38e9..ecbb82e 100644
--- a/hdf/src/hextelt.c
+++ b/hdf/src/hextelt.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hextelt.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*LINTLIBRARY */
 /* ------------------------------ hextelt.c -------------------------------
@@ -293,6 +293,9 @@ HXcreate(int32 file_id, uint16 tag, uint16 ref, const char *extern_file_name, in
     if (!info)
         HGOTO_ERROR(DFE_NOSPACE, FAIL);
 
+    /* Initialize char pointer for use in resource cleanup */
+    info->extern_file_name = NULL;
+
     /* If there is data, either regular or special, read the data then write
        it to the external file, otherwise, do nothing */
     if (data_id!=FAIL && data_len>0)
@@ -366,7 +369,11 @@ done:
         if(access_rec!=NULL)
             HIrelease_accrec_node(access_rec);
         if(info!=NULL)
+        {
+            if(info->extern_file_name != NULL)
+                HDfree(info->extern_file_name);
             HDfree(info);
+        }
         if(fname!=NULL)
             HDfree(fname);
         if(data_id!=FAIL)
@@ -1101,6 +1108,8 @@ HXPreset(accrec_t * access_rec, sp_info_block_t * info_block)
 
     /* update our internal pointers */
     info->extern_offset = info_block->offset;
+    if (info->extern_file_name != NULL) /* could be a problem if garbage! */
+        HDfree(info->extern_file_name);
     info->extern_file_name = (char *) HDstrdup(info_block->path);
     if (!info->extern_file_name)
         HGOTO_ERROR(DFE_NOSPACE, FAIL);
@@ -1136,12 +1145,19 @@ HXPreset(accrec_t * access_rec, sp_info_block_t * info_block)
 done:
   if(ret_value == FAIL)   
     { /* Error condition cleanup */
+        if(info!=NULL)
+        {
+            if(info->extern_file_name != NULL)
+                HDfree(info->extern_file_name);
+            HDfree(info);
+        }
 
     } /* end if */
 
   /* Normal function cleanup */
 
   return ret_value; 
+
 }	/* HXPreset */
 
 static	char*	extcreatedir = NULL;
diff --git a/hdf/src/hfile.c b/hdf/src/hfile.c
index 688895a..4991494 100644
--- a/hdf/src/hfile.c
+++ b/hdf/src/hfile.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hfile.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*LINTLIBRARY */
 /*+
diff --git a/hdf/src/hfile.h b/hdf/src/hfile.h
index 476ca40..c8e5607 100644
--- a/hdf/src/hfile.h
+++ b/hdf/src/hfile.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hfile.h 6473 2016-06-24 21:38:14Z bmribler $ */
+/* $Id$ */
 
 /*+ hfile.h
    *** Header for hfile.c, routines for low level data element I/O
@@ -51,10 +51,10 @@
 
 #define LIBVER_MAJOR    4
 #define LIBVER_MINOR    2 
-#define LIBVER_RELEASE  12 
+#define LIBVER_RELEASE  13 
 #define LIBVER_SUBRELEASE ""   /* For pre-releases like snap0       */
                                 /* Empty string for real releases.           */
-#define LIBVER_STRING   "HDF Version 4.2 Release 12, June 24, 2016"
+#define LIBVER_STRING   "HDF Version 4.2 Release 13, June 24, 2017"
 #define LIBVSTR_LEN    80   /* length of version string  */
 #define LIBVER_LEN  92      /* 4+4+4+80 = 92 */
 /* end of version tags */
diff --git a/hdf/src/hfiledd.c b/hdf/src/hfiledd.c
index fbfc014..bb7316b 100644
--- a/hdf/src/hfiledd.c
+++ b/hdf/src/hfiledd.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hfiledd.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
 FILE
diff --git a/hdf/src/hfilef.c b/hdf/src/hfilef.c
index 9a58d19..c3ff9ef 100644
--- a/hdf/src/hfilef.c
+++ b/hdf/src/hfilef.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hfilef.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    hfilef.c
diff --git a/hdf/src/hfileff.f b/hdf/src/hfileff.f
index 5c59d03..0a74d73 100644
--- a/hdf/src/hfileff.f
+++ b/hdf/src/hfileff.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
-C $Id: hfileff.f 4964 2007-09-15 23:32:35Z epourmal $
+C $Id$
 C
 C------------------------------------------------------------------------------
 C File:     hfileFf.f
diff --git a/hdf/src/hkit.c b/hdf/src/hkit.c
index e62ad67..d5ee86e 100644
--- a/hdf/src/hkit.c
+++ b/hdf/src/hkit.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hkit.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #include <ctype.h>
 #include "hkit.h"
diff --git a/hdf/src/hkit.h b/hdf/src/hkit.h
index 1954c60..97666a9 100644
--- a/hdf/src/hkit.h
+++ b/hdf/src/hkit.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hkit.h 5467 2010-09-25 14:19:19Z bmribler $ */
+/* $Id$ */
 
 /*+ hkit.h
    ***  private header file for hkit routines
diff --git a/hdf/src/hlimits.h b/hdf/src/hlimits.h
index f4ce6ba..fe899ad 100644
--- a/hdf/src/hlimits.h
+++ b/hdf/src/hlimits.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hlimits.h 6043 2014-01-21 21:09:03Z acheng $ */
+/* $Id$ */
 
 /*+ hlimits.h
    *** This file contains all hard coded limits for the library
diff --git a/hdf/src/hntdefs.h b/hdf/src/hntdefs.h
index 6dd02d4..ccd9719 100644
--- a/hdf/src/hntdefs.h
+++ b/hdf/src/hntdefs.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hntdefs.h 6032 2014-01-17 18:13:52Z acheng $ */
+/* $Id$ */
 
 /*+ hnt.h
    *** This file contains all the number-type definitions for HDF
diff --git a/hdf/src/hproto.h b/hdf/src/hproto.h
index 4e96271..4cbda91 100644
--- a/hdf/src/hproto.h
+++ b/hdf/src/hproto.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hproto.h 6427 2016-06-13 21:56:09Z byrn $ */
+/* $Id$ */
 
 #ifndef _H_PROTO
 #define _H_PROTO
diff --git a/hdf/src/hproto_fortran.h b/hdf/src/hproto_fortran.h
index 0ab6f85..43be230 100644
--- a/hdf/src/hproto_fortran.h
+++ b/hdf/src/hproto_fortran.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /* $Id: hproto.h 4784 2006-11-21 04:49:51Z bmribler $ */
diff --git a/hdf/src/hqueue.h b/hdf/src/hqueue.h
index f71c7ab..4daad53 100644
--- a/hdf/src/hqueue.h
+++ b/hdf/src/hqueue.h
@@ -40,7 +40,7 @@
  *
  *****************************************************************************/ 
 
-/* $Id: hqueue.h 5146 2009-01-14 17:46:57Z fbaker $ */
+/* $Id$ */
 
 #ifndef	_HQUEUE_H_
 #define	_HQUEUE_H_
diff --git a/hdf/src/htags.h b/hdf/src/htags.h
index 8ce8874..110e131 100644
--- a/hdf/src/htags.h
+++ b/hdf/src/htags.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: htags.h 4932 2007-09-07 17:17:23Z bmribler $ */
+/* $Id$ */
 
 /*+ htags.h
    *** This file contains all the tag definitions for HDF
diff --git a/hdf/src/linklist.c b/hdf/src/linklist.c
index e4163b8..fe314a6 100644
--- a/hdf/src/linklist.c
+++ b/hdf/src/linklist.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: linklist.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
 FILE
diff --git a/hdf/src/linklist.h b/hdf/src/linklist.h
index 93a426b..36071d0 100644
--- a/hdf/src/linklist.h
+++ b/hdf/src/linklist.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: linklist.h 4932 2007-09-07 17:17:23Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    linklist.h
diff --git a/hdf/src/maldebug.c b/hdf/src/maldebug.c
index 24bafe3..43bb6b2 100644
--- a/hdf/src/maldebug.c
+++ b/hdf/src/maldebug.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: maldebug.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*----------------------------------------------------------------------
  *
diff --git a/hdf/src/maldebug.h b/hdf/src/maldebug.h
index ff12fff..bf611af 100644
--- a/hdf/src/maldebug.h
+++ b/hdf/src/maldebug.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: maldebug.h 4932 2007-09-07 17:17:23Z bmribler $ */
+/* $Id$ */
 
 /*----------------------------------------------------------------------
  *
diff --git a/hdf/src/mcache.c b/hdf/src/mcache.c
index 7212a94..0e788ae 100644
--- a/hdf/src/mcache.c
+++ b/hdf/src/mcache.c
@@ -39,7 +39,7 @@
  * AUTHOR - George V.- 1996/08/22
  *****************************************************************************/ 
 
-/* $Id: mcache.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
  *  NOTE:
diff --git a/hdf/src/mcache.h b/hdf/src/mcache.h
index 063608b..ab7131d 100644
--- a/hdf/src/mcache.h
+++ b/hdf/src/mcache.h
@@ -40,7 +40,7 @@
  * AUTHOR - George V.- 1996/08/22
  *****************************************************************************/ 
 
-/* $Id: mcache.h 5146 2009-01-14 17:46:57Z fbaker $ */
+/* $Id$ */
 
 /*
  *  NOTE:
diff --git a/hdf/src/mfan.c b/hdf/src/mfan.c
index e424d72..4de0a3d 100644
--- a/hdf/src/mfan.c
+++ b/hdf/src/mfan.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: mfan.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:     mfan.c
diff --git a/hdf/src/mfan.h b/hdf/src/mfan.h
index 5ccff98..19732ba 100644
--- a/hdf/src/mfan.h
+++ b/hdf/src/mfan.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: mfan.h 5454 2010-08-27 17:24:55Z bmribler $ */
+/* $Id$ */
 
 /*------------------------------------------------------------------------------
  * File:    mfan.h
diff --git a/hdf/src/mfanf.c b/hdf/src/mfanf.c
index 097fbee..bb1a159 100644
--- a/hdf/src/mfanf.c
+++ b/hdf/src/mfanf.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: mfanf.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:     mfanf.c
diff --git a/hdf/src/mfgr.c b/hdf/src/mfgr.c
index 5f506ca..3dab97c 100644
--- a/hdf/src/mfgr.c
+++ b/hdf/src/mfgr.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: mfgr.c 6369 2016-05-24 05:25:11Z bmribler $ */
+/* $Id$ */
 
 /*
 FILE
diff --git a/hdf/src/mfgr.h b/hdf/src/mfgr.h
index eb59657..01509ed 100644
--- a/hdf/src/mfgr.h
+++ b/hdf/src/mfgr.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: mfgr.h 5584 2011-04-13 18:25:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    mfgr.h
diff --git a/hdf/src/mfgrf.c b/hdf/src/mfgrf.c
index a03fdce..6865e5d 100644
--- a/hdf/src/mfgrf.c
+++ b/hdf/src/mfgrf.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: mfgrf.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    mfsdf.c
diff --git a/hdf/src/mfgrff.f b/hdf/src/mfgrff.f
index 40ba1a6..54d0da6 100644
--- a/hdf/src/mfgrff.f
+++ b/hdf/src/mfgrff.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
-C $Id: mfgrff.f 4932 2007-09-07 17:17:23Z bmribler $
+C $Id$
 C
 C------------------------------------------------------------------------------
 C File:     mfgrff.f
diff --git a/hdf/src/mstdio.c b/hdf/src/mstdio.c
index 5d8ae14..df373f3 100644
--- a/hdf/src/mstdio.c
+++ b/hdf/src/mstdio.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: mstdio.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
 FILE
diff --git a/hdf/src/mstdio.h b/hdf/src/mstdio.h
index 6ec6e26..8f38008 100644
--- a/hdf/src/mstdio.h
+++ b/hdf/src/mstdio.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: mstdio.h 4932 2007-09-07 17:17:23Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
  * File:    mstdio.h
diff --git a/hdf/src/src.inc b/hdf/src/src.inc
index 42d6704..06d1a7d 100644
--- a/hdf/src/src.inc
+++ b/hdf/src/src.inc
@@ -10,7 +10,7 @@
 # *                                                                          *
 # ***************************************************************************
 #
-# $Id: src.inc 4445 2003-12-10 21:15:54Z epourmal $
+# $Id$
 #
 # ##################################################################
 #
diff --git a/hdf/src/tbbt.c b/hdf/src/tbbt.c
index 2cc165f..f46501d 100644
--- a/hdf/src/tbbt.c
+++ b/hdf/src/tbbt.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: tbbt.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /* "tbbt.c" -- Routines for using threaded, balanced, binary trees. */
 /* Extended from (added threads to) Knuth 6.2.3, Algorithm A (AVL trees) */
diff --git a/hdf/src/tbbt.h b/hdf/src/tbbt.h
index bd88009..6929fce 100644
--- a/hdf/src/tbbt.h
+++ b/hdf/src/tbbt.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: tbbt.h 6043 2014-01-21 21:09:03Z acheng $ */
+/* $Id$ */
 
 /* "tbbt.h" -- Data types/routines for threaded, balanced, binary trees. */
 /* Extended from Knuth 6.2.3, Algorithm A */
diff --git a/hdf/src/vattr.c b/hdf/src/vattr.c
index 9c0d9b6..08d94d4 100644
--- a/hdf/src/vattr.c
+++ b/hdf/src/vattr.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: vattr.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /**************************************************************
 *
diff --git a/hdf/src/vattr.h b/hdf/src/vattr.h
index 7e77a11..1b02f8c 100644
--- a/hdf/src/vattr.h
+++ b/hdf/src/vattr.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /***********************************************************
@@ -16,7 +16,7 @@
  *
  ***********************************************************  */
 
-/* $Id: vattr.h 6358 2016-05-13 15:12:20Z bmribler $ */
+/* $Id$ */
 
 #ifndef _VATTR_H
 #define _VATTR_H
diff --git a/hdf/src/vattrf.c b/hdf/src/vattrf.c
index 02795cf..aa22c07 100644
--- a/hdf/src/vattrf.c
+++ b/hdf/src/vattrf.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: vattrf.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 /*
    *
    * vattrf.c
diff --git a/hdf/src/vattrff.f b/hdf/src/vattrff.f
index 5b3ef20..9b4fb92 100644
--- a/hdf/src/vattrff.f
+++ b/hdf/src/vattrff.f
@@ -1,19 +1,19 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
 C***************************************************
 C
-C $Id: vattrff.f 4932 2007-09-07 17:17:23Z bmribler $
+C $Id$
 C
 C **************************************************
 C *
diff --git a/hdf/src/vconv.c b/hdf/src/vconv.c
index 486f6d6..8d5a89e 100644
--- a/hdf/src/vconv.c
+++ b/hdf/src/vconv.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: vconv.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /* obsolete code for HDF 3.2. 26/march/92 jason ng */
 /* except for the following routines:
diff --git a/hdf/src/vg.c b/hdf/src/vg.c
index 6d96c6c..588b9a4 100644
--- a/hdf/src/vg.c
+++ b/hdf/src/vg.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/hdf/src/vg.h b/hdf/src/vg.h
index f59d795..c3d11bb 100644
--- a/hdf/src/vg.h
+++ b/hdf/src/vg.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: vg.h 4932 2007-09-07 17:17:23Z bmribler $ */
+/* $Id$ */
 
 /*****************************************************************************
 *
diff --git a/hdf/src/vgf.c b/hdf/src/vgf.c
index f961157..032b02a 100644
--- a/hdf/src/vgf.c
+++ b/hdf/src/vgf.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: vgf.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*-----------------------------------------------------------------------------
   FUNCTION NAMEING CONVENTION:(For the most part true)
diff --git a/hdf/src/vgff.f b/hdf/src/vgff.f
index c3e3949..57e3227 100644
--- a/hdf/src/vgff.f
+++ b/hdf/src/vgff.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
-C $Id: vgff.f 5737 2012-01-06 04:52:28Z brtnfld $ 
+C $Id$ 
 C     
 c **************************************************************************
 c *
diff --git a/hdf/src/vgint.h b/hdf/src/vgint.h
index 06ce972..9652de6 100644
--- a/hdf/src/vgint.h
+++ b/hdf/src/vgint.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: vgint.h 6111 2014-06-02 20:52:09Z bmribler $ */
+/* $Id$ */
 
 /*****************************************************************************
 *
diff --git a/hdf/src/vgp.c b/hdf/src/vgp.c
index f96ca42..f5ee046 100644
--- a/hdf/src/vgp.c
+++ b/hdf/src/vgp.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: vgp.c 5743 2012-01-11 16:27:15Z bmribler $ */
+/* $Id$ */
 /*****************************************************************************
 
  file - vgp.c
diff --git a/hdf/src/vhi.c b/hdf/src/vhi.c
index ddc9a45..228bec0 100644
--- a/hdf/src/vhi.c
+++ b/hdf/src/vhi.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: vhi.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 /*
    * File
    *       vhi.c
diff --git a/hdf/src/vio.c b/hdf/src/vio.c
index ad9df9c..78bece9 100644
--- a/hdf/src/vio.c
+++ b/hdf/src/vio.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: vio.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*****************************************************************************
  file - vio.c
diff --git a/hdf/src/vparse.c b/hdf/src/vparse.c
index bce374e..9db499c 100644
--- a/hdf/src/vparse.c
+++ b/hdf/src/vparse.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /*****************************************************************************
diff --git a/hdf/src/vrw.c b/hdf/src/vrw.c
index 34bdcaf..b413b44 100644
--- a/hdf/src/vrw.c
+++ b/hdf/src/vrw.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: vrw.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /***********************************************************************
 *
diff --git a/hdf/src/vsfld.c b/hdf/src/vsfld.c
index ef93ebc..d9c46f5 100644
--- a/hdf/src/vsfld.c
+++ b/hdf/src/vsfld.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: vsfld.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*****************************************************************************
 * vsetf.c
diff --git a/hdf/test/CMakeLists.txt b/hdf/test/CMakeLists.txt
index 1ea5570..04c99cf 100644
--- a/hdf/test/CMakeLists.txt
+++ b/hdf/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 project (HDF4_HDF_TEST C CXX)
 
 #-----------------------------------------------------------------------------
@@ -14,25 +14,25 @@ LINK_DIRECTORIES (
 )
 
 set (testhdf_SRCS
-    ${HDF4_HDF_TEST_SOURCE_DIR}/testhdf.c 
-    ${HDF4_HDF_TEST_SOURCE_DIR}/an.c 
+    ${HDF4_HDF_TEST_SOURCE_DIR}/testhdf.c
+    ${HDF4_HDF_TEST_SOURCE_DIR}/an.c
     ${HDF4_HDF_TEST_SOURCE_DIR}/anfile.c
-    ${HDF4_HDF_TEST_SOURCE_DIR}/bitio.c  
+    ${HDF4_HDF_TEST_SOURCE_DIR}/bitio.c
     ${HDF4_HDF_TEST_SOURCE_DIR}/blocks.c
-    ${HDF4_HDF_TEST_SOURCE_DIR}/chunks.c  
-    ${HDF4_HDF_TEST_SOURCE_DIR}/comp.c 
-    ${HDF4_HDF_TEST_SOURCE_DIR}/conv.c 
-    ${HDF4_HDF_TEST_SOURCE_DIR}/extelt.c 
-    ${HDF4_HDF_TEST_SOURCE_DIR}/file.c 
-    ${HDF4_HDF_TEST_SOURCE_DIR}/file1.c 
-    ${HDF4_HDF_TEST_SOURCE_DIR}/litend.c 
-    ${HDF4_HDF_TEST_SOURCE_DIR}/macros.c 
-    ${HDF4_HDF_TEST_SOURCE_DIR}/man.c 
-    ${HDF4_HDF_TEST_SOURCE_DIR}/mgr.c 
-    ${HDF4_HDF_TEST_SOURCE_DIR}/nbit.c 
+    ${HDF4_HDF_TEST_SOURCE_DIR}/chunks.c
+    ${HDF4_HDF_TEST_SOURCE_DIR}/comp.c
+    ${HDF4_HDF_TEST_SOURCE_DIR}/conv.c
+    ${HDF4_HDF_TEST_SOURCE_DIR}/extelt.c
+    ${HDF4_HDF_TEST_SOURCE_DIR}/file.c
+    ${HDF4_HDF_TEST_SOURCE_DIR}/file1.c
+    ${HDF4_HDF_TEST_SOURCE_DIR}/litend.c
+    ${HDF4_HDF_TEST_SOURCE_DIR}/macros.c
+    ${HDF4_HDF_TEST_SOURCE_DIR}/man.c
+    ${HDF4_HDF_TEST_SOURCE_DIR}/mgr.c
+    ${HDF4_HDF_TEST_SOURCE_DIR}/nbit.c
     ${HDF4_HDF_TEST_SOURCE_DIR}/rig.c
     ${HDF4_HDF_TEST_SOURCE_DIR}/sdmms.c
-    ${HDF4_HDF_TEST_SOURCE_DIR}/sdnmms.c 
+    ${HDF4_HDF_TEST_SOURCE_DIR}/sdnmms.c
     ${HDF4_HDF_TEST_SOURCE_DIR}/sdstr.c
     ${HDF4_HDF_TEST_SOURCE_DIR}/slab.c
     ${HDF4_HDF_TEST_SOURCE_DIR}/tattdatainfo.c
@@ -55,7 +55,7 @@ set (testhdf_SRCS
 
 if (WIN32)
   add_definitions (-DDOS_FS)
-endif (WIN32)
+endif ()
 
 #-- Adding test for testhdf
 add_executable (testhdf ${testhdf_SRCS})
@@ -69,7 +69,7 @@ if (BUILD_SHARED_LIBS)
   TARGET_C_PROPERTIES (testhdf-shared SHARED " " " ")
   target_link_libraries (testhdf-shared ${HDF4_SRC_LIBSH_TARGET} ${LINK_SHARED_LIBS})
   set_target_properties (testhdf-shared PROPERTIES FOLDER test)
-endif (BUILD_SHARED_LIBS)
+endif ()
 
 #-- Adding test for buffer
 if (NOT WIN32)
@@ -84,8 +84,8 @@ if (NOT WIN32)
     TARGET_C_PROPERTIES (buffer-shared SHARED " " " ")
     target_link_libraries (buffer-shared ${HDF4_SRC_LIBSH_TARGET} ${LINK_SHARED_LIBS})
     set_target_properties (buffer-shared PROPERTIES FOLDER test)
-  endif (BUILD_SHARED_LIBS)
-endif (NOT WIN32)
+  endif ()
+endif ()
 
 ##############################################################################
 ##############################################################################
diff --git a/hdf/test/CMakeTests.cmake b/hdf/test/CMakeTests.cmake
index e6c4110..2f5d9ec 100644
--- a/hdf/test/CMakeTests.cmake
+++ b/hdf/test/CMakeTests.cmake
@@ -4,7 +4,7 @@
 ###           T E S T I N G                                                ###
 ##############################################################################
 ##############################################################################
-  
+
 file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/TEST")
 file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/TEST/testdir")
 file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/TEST/testfiles")
@@ -12,7 +12,7 @@ if (BUILD_SHARED_LIBS)
   file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/TEST-shared")
   file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/TEST-shared/testdir")
   file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/TEST-shared/testfiles")
-endif (BUILD_SHARED_LIBS)
+endif ()
 
 #-- Copy all the dat files from the test directory into the source directory
 set (HDF4_REFERENCE_TEST_FILES
@@ -31,7 +31,7 @@ set (HDF4_REFERENCE_TEST_FILES
 foreach (h4_file ${HDF4_REFERENCE_TEST_FILES})
   set (dest "${PROJECT_BINARY_DIR}/TEST/test_files/${h4_file}")
   add_custom_command (
-      TARGET     testhdf 
+      TARGET     testhdf
       POST_BUILD
       COMMAND    ${CMAKE_COMMAND}
       ARGS       -E copy_if_different ${HDF4_HDF_TEST_SOURCE_DIR}/test_files/${h4_file} ${dest}
@@ -39,13 +39,13 @@ foreach (h4_file ${HDF4_REFERENCE_TEST_FILES})
   if (BUILD_SHARED_LIBS)
     set (dest "${PROJECT_BINARY_DIR}/TEST-shared/test_files/${h4_file}")
     add_custom_command (
-        TARGET     testhdf-shared 
+        TARGET     testhdf-shared
         POST_BUILD
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_HDF_TEST_SOURCE_DIR}/test_files/${h4_file} ${dest}
     )
-  endif (BUILD_SHARED_LIBS)
-endforeach (h4_file ${HDF4_REFERENCE_TEST_FILES})
+  endif ()
+endforeach ()
 
 # Remove any output file left over from previous test run
 set (HDF4_TESTHDF_FILES
@@ -123,7 +123,7 @@ set (HDF4_TESTHDF_FILES
 add_test (
     NAME HDF_TEST-testhdf-clearall-objects
     COMMAND    ${CMAKE_COMMAND}
-        -E remove 
+        -E remove
         ${HDF4_TESTHDF_FILES}
     WORKING_DIRECTORY
         ${PROJECT_BINARY_DIR}/TEST
@@ -131,7 +131,7 @@ add_test (
 set_tests_properties (HDF_TEST-testhdf-clearall-objects PROPERTIES LABELS ${PROJECT_NAME})
 if (NOT "${last_test}" STREQUAL "")
   set_tests_properties (HDF_TEST-testhdf-clearall-objects PROPERTIES DEPENDS ${last_test})
-endif (NOT "${last_test}" STREQUAL "")
+endif ()
 set (last_test "HDF_TEST-testhdf-clearall-objects")
 
 set (HDF4_TESTHDF_THF0_FILES
@@ -149,7 +149,7 @@ set (HDF4_TESTHDF_THF0_FILES
 add_test (
     NAME HDF_TEST-testhdf_thf0-clearall-objects
     COMMAND    ${CMAKE_COMMAND}
-        -E remove 
+        -E remove
         ${HDF4_TESTHDF_THF0_FILES}
     WORKING_DIRECTORY
         ${PROJECT_BINARY_DIR}/TEST
@@ -157,7 +157,7 @@ add_test (
 set_tests_properties (HDF_TEST-testhdf_thf0-clearall-objects PROPERTIES LABELS ${PROJECT_NAME})
 if (NOT "${last_test}" STREQUAL "")
   set_tests_properties (HDF_TEST-testhdf_thf0-clearall-objects PROPERTIES DEPENDS ${last_test})
-endif (NOT "${last_test}" STREQUAL "")
+endif ()
 set (last_test "HDF_TEST-testhdf_thf0-clearall-objects")
 
 set (thf_decade
@@ -168,11 +168,11 @@ set (thf_decade
     41 42 43 44 45 46 47 48 49 50
     51 52 53 54 55 56 57 58 59 60
 )
-foreach (decade ${thf_decade}) 
+foreach (decade ${thf_decade})
   add_test (
       NAME HDF_TEST-testhdf_thf${decade}-clearall-objects
       COMMAND    ${CMAKE_COMMAND}
-          -E remove 
+          -E remove
           thf${decade}0.hdf
           thf${decade}1.hdf
           thf${decade}2.hdf
@@ -189,20 +189,20 @@ foreach (decade ${thf_decade})
   set_tests_properties (HDF_TEST-testhdf_thf${decade}-clearall-objects PROPERTIES LABELS ${PROJECT_NAME})
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (HDF_TEST-testhdf_thf${decade}-clearall-objects PROPERTIES DEPENDS ${last_test})
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "HDF_TEST-testhdf_thf${decade}-clearall-objects")
-endforeach (decade ${thf_decade}) 
+endforeach (decade ${thf_decade})
 
 add_test (NAME HDF_TEST-testhdf COMMAND $<TARGET_FILE:testhdf>)
 set (passRegex "All tests were successful")
 set_tests_properties (HDF_TEST-testhdf PROPERTIES
-    PASS_REGULAR_EXPRESSION "${passRegex}" 
+    PASS_REGULAR_EXPRESSION "${passRegex}"
     WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/TEST
     LABELS ${PROJECT_NAME}
 )
 if (NOT "${last_test}" STREQUAL "")
   set_tests_properties (HDF_TEST-testhdf PROPERTIES DEPENDS ${last_test})
-endif (NOT "${last_test}" STREQUAL "")
+endif ()
 set (last_test "HDF_TEST-testhdf")
 
 #-- Adding test for buffer
@@ -214,16 +214,16 @@ if (NOT WIN32)
   )
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (HDF_TEST-buffer PROPERTIES DEPENDS ${last_test})
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "HDF_TEST-buffer")
-endif (NOT WIN32)
+endif ()
 
 if (BUILD_SHARED_LIBS)
   # Remove any output file left over from previous test run
   add_test (
       NAME HDF_TEST-testhdf-shared-clearall-objects
       COMMAND    ${CMAKE_COMMAND}
-          -E remove 
+          -E remove
           ${HDF4_TESTHDF_FILES}
       WORKING_DIRECTORY
           ${PROJECT_BINARY_DIR}/TEST-shared
@@ -231,13 +231,13 @@ if (BUILD_SHARED_LIBS)
   set_tests_properties (HDF_TEST-testhdf-shared-clearall-objects PROPERTIES LABELS ${PROJECT_NAME})
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (HDF_TEST-testhdf-shared-clearall-objects PROPERTIES DEPENDS ${last_test})
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "HDF_TEST-testhdf-shared-clearall-objects")
 
   add_test (
       NAME HDF_TEST-testhdf_thf0-shared-clearall-objects
       COMMAND    ${CMAKE_COMMAND}
-          -E remove 
+          -E remove
           ${HDF4_TESTHDF_THF0_FILES}
       WORKING_DIRECTORY
           ${PROJECT_BINARY_DIR}/TEST-shared
@@ -245,14 +245,14 @@ if (BUILD_SHARED_LIBS)
   set_tests_properties (HDF_TEST-testhdf_thf0-shared-clearall-objects PROPERTIES LABELS ${PROJECT_NAME})
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (HDF_TEST-testhdf_thf0-shared-clearall-objects PROPERTIES DEPENDS ${last_test})
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "HDF_TEST-testhdf_thf0-shared-clearall-objects")
 
-  foreach (decade ${thf_decade}) 
+  foreach (decade ${thf_decade})
     add_test (
         NAME HDF_TEST-testhdf_thf${decade}-shared-clearall-objects
         COMMAND    ${CMAKE_COMMAND}
-            -E remove 
+            -E remove
             thf${decade}0.hdf
             thf${decade}1.hdf
             thf${decade}2.hdf
@@ -269,20 +269,20 @@ if (BUILD_SHARED_LIBS)
     set_tests_properties (HDF_TEST-testhdf_thf${decade}-shared-clearall-objects PROPERTIES LABELS ${PROJECT_NAME})
     if (NOT "${last_test}" STREQUAL "")
       set_tests_properties (HDF_TEST-testhdf_thf${decade}-shared-clearall-objects PROPERTIES DEPENDS ${last_test})
-    endif (NOT "${last_test}" STREQUAL "")
+    endif ()
     set (last_test "HDF_TEST-testhdf_thf${decade}-shared-clearall-objects")
-  endforeach (decade ${thf_decade}) 
+  endforeach ()
 
   add_test (NAME HDF_TEST-testhdf-shared COMMAND $<TARGET_FILE:testhdf-shared>)
   set (passRegex "All tests were successful")
   set_tests_properties (HDF_TEST-testhdf-shared PROPERTIES
-      PASS_REGULAR_EXPRESSION "${passRegex}" 
+      PASS_REGULAR_EXPRESSION "${passRegex}"
       WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/TEST-shared
       LABELS ${PROJECT_NAME}
   )
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (HDF_TEST-testhdf-shared PROPERTIES DEPENDS ${last_test})
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "HDF_TEST-testhdf-shared")
 
   #-- Adding test for buffer
@@ -294,7 +294,7 @@ if (BUILD_SHARED_LIBS)
     )
     if (NOT "${last_test}" STREQUAL "")
       set_tests_properties (HDF_TEST-buffer-shared PROPERTIES DEPENDS ${last_test})
-    endif (NOT "${last_test}" STREQUAL "")
+    endif ()
     set (last_test "HDF_TEST-buffer-shared")
-  endif (NOT WIN32)
-endif (BUILD_SHARED_LIBS)
+  endif ()
+endif ()
diff --git a/hdf/test/Makefile.am b/hdf/test/Makefile.am
index b954370..69cbda0 100644
--- a/hdf/test/Makefile.am
+++ b/hdf/test/Makefile.am
@@ -39,6 +39,7 @@ fortestF_SOURCES = forsupff.f forsupf.c fortestF.f manf.f mgrf.f slabwf.f   \
                    t24f.f tanf.f tanfilef.f tpf.f tr8f.f tsdmmsf.f          \
                    tsdnmmsf.f tsdnntf.f tsdntf.f tsdstrf.f tstubsf.f        \
                    tvattrf.f tvsetf.f
+FFLAGS += $(AM_CPPFLAGS)
 fortestF_LDADD = $(LIBHDF)
 fortestF_DEPENDENCIES = testdir $(LIBHDF)
 endif
diff --git a/hdf/test/Makefile.in b/hdf/test/Makefile.in
index 897c9ce..31b5a45 100644
--- a/hdf/test/Makefile.in
+++ b/hdf/test/Makefile.in
@@ -89,6 +89,7 @@ DIST_COMMON = $(top_srcdir)/config/commence.am \
 @HDF_BUILD_FORTRAN_TRUE at check_PROGRAMS = testhdf$(EXEEXT) \
 @HDF_BUILD_FORTRAN_TRUE@	buffer$(EXEEXT) fortest$(EXEEXT) \
 @HDF_BUILD_FORTRAN_TRUE@	fortestF$(EXEEXT)
+ at HDF_BUILD_FORTRAN_TRUE@am__append_1 = $(AM_CPPFLAGS)
 TESTS = $(am__EXEEXT_1)
 subdir = hdf/test
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -471,7 +472,7 @@ EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 F77_VERSION = @F77_VERSION@
-FFLAGS = @FFLAGS@
+FFLAGS = @FFLAGS@ $(am__append_1)
 FGREP = @FGREP@
 FLIBS = @FLIBS@
 GREP = @GREP@
@@ -494,6 +495,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/hdf/test/an.c b/hdf/test/an.c
index 8c95afc..2880ec8 100644
--- a/hdf/test/an.c
+++ b/hdf/test/an.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: an.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /***********************************************************
 *
diff --git a/hdf/test/anfile.c b/hdf/test/anfile.c
index bea4b08..0c183ec 100644
--- a/hdf/test/anfile.c
+++ b/hdf/test/anfile.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: anfile.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #include "tproto.h"
 #define TESTFILE "tdfan.hdf"
diff --git a/hdf/test/bitio.c b/hdf/test/bitio.c
index 48fa26d..fdd5880 100644
--- a/hdf/test/bitio.c
+++ b/hdf/test/bitio.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /*
@@ -31,7 +31,7 @@
    10/19/93 - Started coding.
  */
 
-/* $Id: bitio.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #include "tproto.h"
 #include <time.h>
diff --git a/hdf/test/blocks.c b/hdf/test/blocks.c
index 8902b51..54314ab 100644
--- a/hdf/test/blocks.c
+++ b/hdf/test/blocks.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: blocks.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #include "tproto.h"
 #define TESTFILE_NAME "tblocks.hdf"
diff --git a/hdf/test/buffer.c b/hdf/test/buffer.c
index c2d95ab..93120ad 100644
--- a/hdf/test/buffer.c
+++ b/hdf/test/buffer.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /*
@@ -42,7 +42,7 @@
 
  */
 
-/* $Id: buffer.c 6427 2016-06-13 21:56:09Z byrn $ */
+/* $Id$ */
 
 #define TESTMASTER
 
diff --git a/hdf/test/chunks.c b/hdf/test/chunks.c
index 5ded443..07c415b 100644
--- a/hdf/test/chunks.c
+++ b/hdf/test/chunks.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: chunks.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
  * This file tests the Special Chunking Element(HMCxxx) layer of the HDF library.
diff --git a/hdf/test/comp.c b/hdf/test/comp.c
index a75b684..581a1b4 100644
--- a/hdf/test/comp.c
+++ b/hdf/test/comp.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /*
@@ -30,7 +30,7 @@
        10/19/93 - Through this header in.
  */
 
-/* $Id: comp.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #include <time.h>
 #include "tproto.h"
diff --git a/hdf/test/conv.c b/hdf/test/conv.c
index 8aa07dc..c855f37 100644
--- a/hdf/test/conv.c
+++ b/hdf/test/conv.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: conv.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    FILE
diff --git a/hdf/test/egfhi.f b/hdf/test/egfhi.f
index 9620f2a..40867e3 100644
--- a/hdf/test/egfhi.f
+++ b/hdf/test/egfhi.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
-C $Id: egfhi.f 4932 2007-09-07 17:17:23Z bmribler $
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C
+C $Id$
 C     
 C==========================================================   
 c
diff --git a/hdf/test/extelt.c b/hdf/test/extelt.c
index 8007d74..a280861 100644
--- a/hdf/test/extelt.c
+++ b/hdf/test/extelt.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: extelt.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
  * These is a first pass at rewriting how these tests for exteranl 
diff --git a/hdf/test/file.c b/hdf/test/file.c
index d0896ce..c7c77ec 100644
--- a/hdf/test/file.c
+++ b/hdf/test/file.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: file.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    * Hopen
diff --git a/hdf/test/file1.c b/hdf/test/file1.c
index 24f1b8c..c9fc686 100644
--- a/hdf/test/file1.c
+++ b/hdf/test/file1.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: file1.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    test opening files and access elements until limits are reached
diff --git a/hdf/test/forsupf.c b/hdf/test/forsupf.c
index f17d41e..762ec31 100644
--- a/hdf/test/forsupf.c
+++ b/hdf/test/forsupf.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: forsupf.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #include "hdf.h"
 #include "fortest.h"
diff --git a/hdf/test/forsupff.f b/hdf/test/forsupff.f
index f84fc05..2810cfe 100644
--- a/hdf/test/forsupff.f
+++ b/hdf/test/forsupff.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
-C $Id: forsupff.f 6036 2014-01-20 17:28:01Z acheng $
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C
+C $Id$
 C
 C------------------------------------------------------------------------------
 C File:     forsupff.f
@@ -35,7 +35,6 @@ C Invokes: none
 C------------------------------------------------------------------------------
       subroutine RESULT(errval, routine, num_failed)
       implicit none
-      include '../src/hdf.inc'
       include 'fortest.inc'
 
       integer errval
@@ -66,7 +65,6 @@ C Invokes: none
 C------------------------------------------------------------------------------
       subroutine VRFY(errval, routine, num_failed)
       implicit none
-      include '../src/hdf.inc'
       include 'fortest.inc'
 
       integer errval
@@ -178,7 +176,6 @@ C
 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
       subroutine errchkio(err1, err2, err3, num_err, msg)
       implicit none
-      include '../src/hdf.inc'
       include 'fortest.inc'
 
       integer err1, err2, err3, num_err
diff --git a/hdf/test/fortest.c b/hdf/test/fortest.c
index bf2f05c..e062b31 100644
--- a/hdf/test/fortest.c
+++ b/hdf/test/fortest.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: fortest.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #define TESTMASTER
 
@@ -87,7 +87,7 @@ main(int argc, char *argv[])
     num_tests=InitTest("vattrf", "tvattrf", "");
 /* The test is skipped when size of fortran integer is smaller than
    the size of C pointer; this happens on the 64-bit DEC Alpha, Solaris, Altix
-   AIX and Mac Intel. We need a better fix; see Bugzilla #1694.
+   AIX and Mac Intel. We need a better fix; see HDFFR-191.
 */ 
 #if defined DEC_ALPHA || defined _WIN32 || (defined SUN && defined _LP64) || defined __ia64  || defined __x86_64  || defined AIX5L64 || (__APPLE__ && __LP64__)
     printf("   Skipping stubs\n");
diff --git a/hdf/test/fortest.h b/hdf/test/fortest.h
index f4f1db3..7f7f722 100644
--- a/hdf/test/fortest.h
+++ b/hdf/test/fortest.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: fortest.h 5444 2010-08-25 16:40:05Z byrn $ */
+/* $Id$ */
 
 #ifndef __FORTEST_H
 #define __FORTEST_H
diff --git a/hdf/test/fortest.inc b/hdf/test/fortest.inc
index ac2bfa2..b3ae011 100644
--- a/hdf/test/fortest.inc
+++ b/hdf/test/fortest.inc
@@ -1,4 +1,6 @@
-C $Id: fortest.inc 6034 2014-01-19 06:59:14Z epourmal $
+C $Id$ 
+       include 'hdf.inc'
+       include 'dffunc.inc'
 C Common block definiton to be included by fortestF.f modules.  If your
 C fortran compile cannot do include, you need to replace each include
 C statement with this file.
diff --git a/hdf/test/fortestF.f b/hdf/test/fortestF.f
index 6935f83..3f5e924 100644
--- a/hdf/test/fortestF.f
+++ b/hdf/test/fortestF.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
-C $Id: fortestF.f 6036 2014-01-20 17:28:01Z acheng $
+C $Id$
 C Interface to invoke tests for HDF Fortran interfaces.
 
       Program main
@@ -22,8 +22,6 @@ C Interface to invoke tests for HDF Fortran interfaces.
       character cmd*15, test*30
       integer majorv, minorv, releaseno
       character*80 relstr
-      integer hglibver
-      external hglibver
 
 C Default to cleanup *.hdf files and set verbosity to default value
       CleanUp = .TRUE.
diff --git a/hdf/test/gentest.c b/hdf/test/gentest.c
index 1e5fb4c..9d6e729 100644
--- a/hdf/test/gentest.c
+++ b/hdf/test/gentest.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: gentest.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    FILE
diff --git a/hdf/test/litend.c b/hdf/test/litend.c
index ee0780d..8722a06 100644
--- a/hdf/test/litend.c
+++ b/hdf/test/litend.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: litend.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #include "tproto.h"
 
diff --git a/hdf/test/macros.c b/hdf/test/macros.c
index bd033a3..1241cf0 100644
--- a/hdf/test/macros.c
+++ b/hdf/test/macros.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "tproto.h"
diff --git a/hdf/test/man.c b/hdf/test/man.c
index 52bf38b..29926ce 100644
--- a/hdf/test/man.c
+++ b/hdf/test/man.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: man.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /***********************************************************
 *
diff --git a/hdf/test/manf.f b/hdf/test/manf.f
index 79796fe..3071ca3 100644
--- a/hdf/test/manf.f
+++ b/hdf/test/manf.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
-C $Id: manf.f 4932 2007-09-07 17:17:23Z bmribler $
+C $Id$
 C
       subroutine manf (number_failed)
 C
@@ -32,22 +32,13 @@ C
       character*20 myname
       parameter (myname = 'manf')
 
-      integer afstart, afend, afcreate, affcreate
-      integer afwriteann, afendaccess, hopen, hclose
-
-      integer dssdims, dsadata, dslref, dsgdims
-      integer d8aimg, DFR8lastref, d8gimg
-
       integer numberfailed, ISFIRST, NOTFIRST, MAXLENLAB
       integer MAXLEN_DESC, ROWS, COLS, REPS
-      integer DFTAG_SDG, DFTAG_RIG
 
       parameter ( ISFIRST =        1, 
      *            NOTFIRST =       0, 
      *            MAXLENLAB =    30,
-     *            MAXLEN_DESC =  500, 
-     *            DFTAG_SDG   =  700,
-     *            DFTAG_RIG   =  306,
+     *            MAXLEN_DESC =  500,
      *            ROWS =          10, 
      *            COLS =          10,
      *            REPS =           2 )
@@ -57,8 +48,6 @@ C
       integer rank
       integer j, dimsizes(2)
       integer fhandle, anhandle, ahandle
-      integer  DFACC_CREATE, DFACC_READ
-      integer AN_DATA_LABEL, AN_DATA_DESC, AN_FILE_LABEL, AN_FILE_DESC
 
       character*30 labsds, labsds2 
       character*30 labris, labris2
@@ -78,12 +67,6 @@ C
       number_failed = 0
       numberfailed =  0
       CR = char(10)
-      DFACC_CREATE = 4
-      DFACC_READ   = 1
-      AN_DATA_LABEL = 0
-      AN_DATA_DESC  = 1
-      AN_FILE_LABEL = 2
-      AN_FILE_DESC  = 3
       TESTFILE = 'manf.hdf'
 
 C *** set up file labels and descriptions ***
@@ -328,10 +311,6 @@ C**************************************************************
       parameter (ERR_FILE = 'Fortran_err.dat')
 
       integer  inlablen, indesclen, ret
-
-      integer affileinfo, afnumann, afannlist, afannlen
-      integer afreadann, afstart, afend, afendaccess, hopen, hclose
-      integer hishdff, hestringf, heprntf
       character*80 error_message
 
       integer fileh, anh
@@ -341,14 +320,7 @@ C**************************************************************
       integer dlabels(2), ddescs(2)
       character*30   inlabel, fannlabel
       character*500 indesc, fanndesc
-      integer AN_DATA_LABEL, AN_DATA_DESC, AN_FILE_LABEL, AN_FILE_DESC
-      integer DFACC_READ
       integer error_code
-      DFACC_READ = 1
-      AN_DATA_LABEL = 0
-      AN_DATA_DESC  = 1
-      AN_FILE_LABEL = 2
-      AN_FILE_DESC  = 3
       error_code = 0
 
 C ***** Test if the file fname is an HDF file
@@ -507,22 +479,12 @@ C************************************************************
       parameter ( MAXLENFLAB =    35,
      *            MAXLEN_FDESC =  100 )
 
-      integer affileinfo, afselect, afannlen, afreadann
-      integer afstart, afend, afendaccess, hopen, hclose
-
       integer ret
       integer fileh, annh, anh
       integer nflabs, nfdescs, nolabs, nodescs
       integer fannlen
       character*35 flabel
       character*100 fdesc
-      integer AN_DATA_LABEL, AN_DATA_DESC, AN_FILE_LABEL, AN_FILE_DESC
-      integer DFACC_READ
-      DFACC_READ = 1
-      AN_DATA_LABEL = 0
-      AN_DATA_DESC  = 1
-      AN_FILE_LABEL = 2
-      AN_FILE_DESC  = 3
 
 C **** We check both file label/description
       fileh = hopen(fname, DFACC_READ,0)
diff --git a/hdf/test/mgr.c b/hdf/test/mgr.c
index df680d9..f746362 100644
--- a/hdf/test/mgr.c
+++ b/hdf/test/mgr.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: mgr.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /***********************************************************
 *
diff --git a/hdf/test/mgrf.f b/hdf/test/mgrf.f
index 2903d79..1d66b33 100644
--- a/hdf/test/mgrf.f
+++ b/hdf/test/mgrf.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C
-C $Id: mgrf.f 6034 2014-01-19 06:59:14Z epourmal $
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C
+C $Id$
 C
        subroutine mgrf (num_err)
 C
@@ -33,55 +33,11 @@ C
       character*20 myname
       parameter (myname = 'mgrf')
 
-      integer hopen, hclose
-      integer mgstart, mgfinfo, mgend, mgcreat, mgselct 
-      integer mgn2ndx, mggiinf, mgwrimg, mgrdimg, mgendac
-      integer mgid2rf, mgr2idx, mgrltil, mgrimil, mggltid
 c     integer mgwrlut, mgrdlut
-      integer mgglinf, mgwclut, mgrclut
 c      integer mgsattr
-      integer mgatinf, mggattr, mgfndat
+      integer mgrclut, mgwclut
       integer mgscatt, mgsnatt, mggcatt, mggnatt
       integer mgwcimg, mgrcimg
-      integer mggnluts
-      
-      integer MFGR_INTERLACE_PIXEL, MFGR_INTERLACE_LINE,
-     *      MFGR_INTERLACE_COMPONENT
-
-      parameter(MFGR_INTERLACE_PIXEL = 0,
-     *          MFGR_INTERLACE_LINE = 1,
-     *          MFGR_INTERLACE_COMPONENT = 2)
-
-      integer DFACC_READ, DFACC_WRITE, DFACC_CREATE, DFACC_ALL  
-      integer DFACC_RDONLY, DFACC_RDWR, DFACC_CLOBBER
-
-      parameter(DFACC_READ        = 1,
-     *          DFACC_WRITE       = 2,
-     *          DFACC_CREATE      = 4,
-     *          DFACC_ALL         = 7,
-     *          DFACC_RDONLY      = 1,
-     *          DFACC_RDWR = 3,
-     *          DFACC_CLOBBER = 4)
-
-      integer DFNT_INT8,  DFNT_UINT8, 
-     *        DFNT_INT16, DFNT_UINT16,
-     *        DFNT_INT32, DFNT_UINT32, 
-     *        DFNT_INT64, DFNT_UINT64,
-     *        DFNT_INT128,DFNT_UINT128,
-     *        DFNT_CHAR8, DFNT_UCHAR8
- 
-      parameter(DFNT_INT8       = 20,
-     *          DFNT_UINT8      = 21,
-     *          DFNT_INT16      = 22,
-     *          DFNT_UINT16     = 23,
-     *          DFNT_INT32      = 24,
-     *          DFNT_UINT32     = 25,
-     *          DFNT_INT64      = 26,
-     *          DFNT_UINT64     = 27,
-     *          DFNT_INT128     = 28,
-     *          DFNT_UINT128    = 29,
-     *          DFNT_CHAR8      = 4,
-     *          DFNT_UCHAR8     = 3)
       integer il
       character*80 TESTFILE
       character*80 IMAGE1, IMAGE2, IMAGEC, IMAGEC_2
diff --git a/hdf/test/mgrf_sunOS.f b/hdf/test/mgrf_sunOS.f
index 7da7eb3..6bcf060 100644
--- a/hdf/test/mgrf_sunOS.f
+++ b/hdf/test/mgrf_sunOS.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C
-C $Id: mgrf_sunOS.f 4932 2007-09-07 17:17:23Z bmribler $
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C
+C $Id$
 C
        subroutine mgrf (num_err)
 C
diff --git a/hdf/test/nbit.c b/hdf/test/nbit.c
index b05bdff..0347a83 100644
--- a/hdf/test/nbit.c
+++ b/hdf/test/nbit.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /*
@@ -33,7 +33,7 @@
    1/19/94 - Started coding
  */
 
-/* $Id: nbit.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #include "tproto.h"
 #define TESTFILE_NAME "tnbit.hdf"
diff --git a/hdf/test/rig.c b/hdf/test/rig.c
index 2340414..f77da64 100644
--- a/hdf/test/rig.c
+++ b/hdf/test/rig.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: rig.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #include "tproto.h"
 
diff --git a/hdf/test/sdmms.c b/hdf/test/sdmms.c
index de74725..1578727 100644
--- a/hdf/test/sdmms.c
+++ b/hdf/test/sdmms.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: sdmms.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #include "tproto.h"
 
diff --git a/hdf/test/sdnmms.c b/hdf/test/sdnmms.c
index 2394333..dd5bc8b 100644
--- a/hdf/test/sdnmms.c
+++ b/hdf/test/sdnmms.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: sdnmms.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #include "tproto.h"
 
diff --git a/hdf/test/sdstr.c b/hdf/test/sdstr.c
index a2a09c2..8ac7bd0 100644
--- a/hdf/test/sdstr.c
+++ b/hdf/test/sdstr.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: sdstr.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /***************************************************************
 **
diff --git a/hdf/test/slab.c b/hdf/test/slab.c
index 4b88d98..19ead6d 100644
--- a/hdf/test/slab.c
+++ b/hdf/test/slab.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /* $Id */
diff --git a/hdf/test/slabwf.f b/hdf/test/slabwf.f
index 8bac9af..a34241e 100644
--- a/hdf/test/slabwf.f
+++ b/hdf/test/slabwf.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
-C $Id: slabwf.f 6034 2014-01-19 06:59:14Z epourmal $
+C $Id$
 C
       subroutine slabwf (num_err)
 C
@@ -21,8 +21,6 @@ C Output files: slabwf.hdf, slab1wf, slab4wf
 
       implicit none
       include 'fortest.inc'
-      include '../src/hdf.inc'
-      include '../src/dffunc.inc'
 
       integer num_err
       character*20 myname
diff --git a/hdf/test/t24f.f b/hdf/test/t24f.f
index fd3677b..ad8408e 100644
--- a/hdf/test/t24f.f
+++ b/hdf/test/t24f.f
@@ -1,23 +1,21 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
-C $Id: t24f.f 6034 2014-01-19 06:59:14Z epourmal $
+C $Id$
 C
       subroutine t24f (number_failed)
       implicit none
       include 'fortest.inc'
-      include '../src/dffunc.inc'
-C
 C Test Program: 
 C     		Writes 24-bit raster images with specified interlace 
 C		   code to a file.
diff --git a/hdf/test/tanf.f b/hdf/test/tanf.f
index 75e453e..b8e75cb 100644
--- a/hdf/test/tanf.f
+++ b/hdf/test/tanf.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
-C $Id: tanf.f 5322 2010-01-19 06:26:11Z brtnfld $
+C $Id$
 C
       subroutine tanf (number_failed)
 C
@@ -42,20 +42,13 @@ C
       character*20 myname
       parameter (myname = 'an')
 
-      integer daplab, dapdesc  
-      integer dssdims, dsadata, dslref, dsgdims
-      integer d8aimg, DFR8lastref, d8gimg
-
       integer ISFIRST, NOTFIRST, MAXLEN_LAB
       integer MAXLEN_DESC, ROWS, COLS, REPS
-      integer DFTAG_SDG, DFTAG_RIG
 
       parameter ( ISFIRST =        1, 
      *            NOTFIRST =       0, 
      *            MAXLEN_LAB =    30,
-     *            MAXLEN_DESC =  500, 
-     *            DFTAG_SDG   =  700,
-     *            DFTAG_RIG   =  306,
+     *            MAXLEN_DESC =  500,
      *            ROWS =          10, 
      *            COLS =          10,
      *            REPS =           2 )
@@ -187,7 +180,6 @@ C**************************************************************
       parameter ( MAXLEN_LAB =    30,
      *            MAXLEN_DESC =  500 )
 
-      integer daglab, dagllen, dagdlen, dagdesc
       integer  inlablen, indesclen, ret
       character*30   inlabel
       character*500 indesc
diff --git a/hdf/test/tanfilef.f b/hdf/test/tanfilef.f
index 3cc2bb9..f67099b 100644
--- a/hdf/test/tanfilef.f
+++ b/hdf/test/tanfilef.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
-C $Id: tanfilef.f 4932 2007-09-07 17:17:23Z bmribler $
+C $Id$
 C
       subroutine tanfilef (number_failed)
 C
@@ -35,11 +35,9 @@ C
       character*20 myname
       parameter (myname = 'anfile')
 
-      integer daafid, daafds,dagfidl,dagfid
-      integer dagfdsl, dagfds, hopen, hclose
       integer ret
       integer ISFIRST, NOFIRST, MAXLEN_LAB, MAXLEN_DESC
-      integer fid, DFACC_CREATE, DFACC_READ
+      integer fid
 
       character*35 lab1, lab2
       character*35 templab
@@ -55,8 +53,6 @@ C
       CR = char(10)
       MAXLEN_LAB = 35
       MAXLEN_DESC = 100
-      DFACC_CREATE = 4
-      DFACC_READ = 1
 
       lab1 = 'File label #1: aaa'
       lab2 = 'File label #2: bbbbbb'
diff --git a/hdf/test/tattdatainfo.c b/hdf/test/tattdatainfo.c
index 2e6b9b0..b529561 100644
--- a/hdf/test/tattdatainfo.c
+++ b/hdf/test/tattdatainfo.c
@@ -4,10 +4,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /****************************************************************************
diff --git a/hdf/test/tbv.c b/hdf/test/tbv.c
index ebb52e9..f7cacfc 100644
--- a/hdf/test/tbv.c
+++ b/hdf/test/tbv.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: tbv.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    FILE
diff --git a/hdf/test/tdatainfo.c b/hdf/test/tdatainfo.c
index 0a078df..585d139 100644
--- a/hdf/test/tdatainfo.c
+++ b/hdf/test/tdatainfo.c
@@ -4,10 +4,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /****************************************************************************
diff --git a/hdf/test/tdatainfo.h b/hdf/test/tdatainfo.h
index 3bbbb78..a6cdc19 100644
--- a/hdf/test/tdatainfo.h
+++ b/hdf/test/tdatainfo.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /* $Id: tutils.h 5335 2010-01-28 06:28:23Z bmribler $ */
diff --git a/hdf/test/tdfr8.c b/hdf/test/tdfr8.c
index dbb9ddc..96e735c 100644
--- a/hdf/test/tdfr8.c
+++ b/hdf/test/tdfr8.c
@@ -4,10 +4,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /************************************************************************
diff --git a/hdf/test/tdupimgs.c b/hdf/test/tdupimgs.c
index b1cdffb..e251f55 100644
--- a/hdf/test/tdupimgs.c
+++ b/hdf/test/tdupimgs.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "hdf.h"
diff --git a/hdf/test/testhdf.c b/hdf/test/testhdf.c
index 95dafbc..6e17602 100644
--- a/hdf/test/testhdf.c
+++ b/hdf/test/testhdf.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: testhdf.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    FILE
diff --git a/hdf/test/tmgrattr.c b/hdf/test/tmgrattr.c
index 095956e..d00a40a 100644
--- a/hdf/test/tmgrattr.c
+++ b/hdf/test/tmgrattr.c
@@ -4,10 +4,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /****************************************************************************
diff --git a/hdf/test/tmgrcomp.c b/hdf/test/tmgrcomp.c
index 97afa8b..17e9142 100644
--- a/hdf/test/tmgrcomp.c
+++ b/hdf/test/tmgrcomp.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "hdf.h"
diff --git a/hdf/test/tpf.f b/hdf/test/tpf.f
index 446de39..9440f70 100644
--- a/hdf/test/tpf.f
+++ b/hdf/test/tpf.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C
-C $Id: tpf.f 6034 2014-01-19 06:59:14Z epourmal $
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C
+C $Id$
 C
       subroutine tpf (number_failed)
 C      program tpff 
@@ -34,10 +34,6 @@ C
       character*20 myname
       parameter (myname = 'p')
 
-      integer dpppal, dpapal, dprest, dpgpal, dpnpals
-      integer dprref, dpwref
-      integer dplref
-
       character*64 TESTFILE
       character*1 CR
       character pal1(768), pal2(768), ipal(768)
diff --git a/hdf/test/tproto.h b/hdf/test/tproto.h
index f711c04..50ee6f8 100644
--- a/hdf/test/tproto.h
+++ b/hdf/test/tproto.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: tproto.h 5692 2011-09-19 16:05:25Z bmribler $ */
+/* $Id$ */
 
 #ifndef _TPROTO_H
 #define _TPROTO_H
diff --git a/hdf/test/tr8f.f b/hdf/test/tr8f.f
index 3af565d..62e5ac9 100644
--- a/hdf/test/tr8f.f
+++ b/hdf/test/tr8f.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
-C $Id: tr8f.f 6034 2014-01-19 06:59:14Z epourmal $
+C $Id$
 C
       subroutine tr8f (number_failed)
       implicit none
@@ -28,10 +28,6 @@ C
       character*20 myname
       parameter (myname = 'r8')
 
-      integer d8spal, d8pimg, d8aimg, d8gdims, d8nims
-      integer d8gimg, d8rref, d8wref, d8first, d8lref
-      integer DFTAG_RLE, DFTAG_IMCOMP
-
       character im1(100,100), im2(321, 111)
       character ii1(100, 100), ii2(321, 111)
       character pal1(768), pal2(768), ipal(768)
@@ -43,8 +39,6 @@ C
       integer ref1, ref2, ref3
 
       call ptestban('Testing', myname)
-      DFTAG_RLE = 11
-      DFTAG_IMCOMP = 12
       TESTFILE = 'tdfr8f.hdf' 
       number_failed = 0
       num_images = 0
diff --git a/hdf/test/tree.c b/hdf/test/tree.c
index 03d707f..d9c0028 100644
--- a/hdf/test/tree.c
+++ b/hdf/test/tree.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: tree.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    FILE
diff --git a/hdf/test/tsdmmsf.f b/hdf/test/tsdmmsf.f
index 1cb85fb..8228710 100644
--- a/hdf/test/tsdmmsf.f
+++ b/hdf/test/tsdmmsf.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
-C $Id: tsdmmsf.f 6036 2014-01-20 17:28:01Z acheng $
+C $Id$
 C
       subroutine tsdmmsf (number_failed)
 C
@@ -28,9 +28,6 @@ C
       integer number_failed
       character*20 myname
       parameter (myname = 'sdmms')
-      
-      integer dsgdata, dsadata, dssdims, dssrang, dsgrang, dssnt
-      integer dssdisc, dsgdisc, dsscal, dsgcal
 
       real*8 f64(10,10), tf64(10,10)
       real*8 f64scale(10), tf64scale(10)
@@ -76,8 +73,6 @@ C that of a numerial argument.
 
       integer i, j, err, err1, err2, err3, err4
       integer rank, dims(2)
-      integer DFNT_FLOAT64, DFNT_FLOAT32, DFNT_INT8, DFNT_INT16
-      integer DFNT_INT32
 
       call ptestban('Testing', myname)
       f64max = 40.0
@@ -98,11 +93,6 @@ C      i8min = char(-128)
       dims(1) = 10
       dims(2) = 10
       number_failed = 0
-      DFNT_FLOAT64 = 6
-      DFNT_FLOAT32 = 5
-      DFNT_INT8 = 20
-      DFNT_INT16 = 22
-      DFNT_INT32 = 24
       
 C
 C Set up some calibration info
diff --git a/hdf/test/tsdnmmsf.f b/hdf/test/tsdnmmsf.f
index a5016e1..366b321 100644
--- a/hdf/test/tsdnmmsf.f
+++ b/hdf/test/tsdnmmsf.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
-C $Id: tsdnmmsf.f 6036 2014-01-20 17:28:01Z acheng $
+C $Id$
 C
       subroutine tsdnmmsf (number_failed)
       implicit none
diff --git a/hdf/test/tsdnntf.f b/hdf/test/tsdnntf.f
index a2cc077..1c84a45 100644
--- a/hdf/test/tsdnntf.f
+++ b/hdf/test/tsdnntf.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
-C $Id: tsdnntf.f 6036 2014-01-20 17:28:01Z acheng $
+C $Id$
 C
       subroutine tsdnntf (number_failed)
 C
@@ -28,8 +28,6 @@ C
       integer number_failed
       character*20  myname
       parameter (myname = 'sdnnt')
-
-      integer dspdata, dsgdata, dsadata, dssdims, dssnt
       
       real*8 f64(10,10), tf64(10,10)
       real*4 f32(10,10), tf32(10,10)
@@ -41,28 +39,9 @@ C
       integer i, j, err
       integer rank
       integer dims(2)
-      integer DFNT_FLOAT64, DFNT_FLOAT32, DFNT_INT8, DFNT_INT16
-      integer DFNT_INT32
-      integer DFNT_NFLOAT64, DFNT_NFLOAT32, DFNT_NINT8
-      integer DFNT_NINT16, DFNT_NINT32, DFNT_NATIVE
       
       call ptestban('Testing', myname)
-      DFNT_FLOAT64 = 6
-      DFNT_FLOAT32 = 5
-      DFNT_INT8 = 20
-      DFNT_INT16 = 22
-      DFNT_INT32 = 24
-      DFNT_NATIVE = 4096
       
-C These should really use a logical OR to compute these values
-C However, OR() is not really that portable
-
-      DFNT_NFLOAT64 = DFNT_NATIVE + DFNT_FLOAT64
-      DFNT_NFLOAT32 = DFNT_NATIVE + DFNT_FLOAT32
-      DFNT_NINT8 =    DFNT_NATIVE + DFNT_INT8
-      DFNT_NINT16 =   DFNT_NATIVE + DFNT_INT16
-      DFNT_NINT32 =   DFNT_NATIVE + DFNT_INT32
-
       rank = 2
       dims(1) = 10
       dims(2) = 10
diff --git a/hdf/test/tsdntf.f b/hdf/test/tsdntf.f
index f1d7a1b..599492d 100644
--- a/hdf/test/tsdntf.f
+++ b/hdf/test/tsdntf.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
-C $Id: tsdntf.f 6036 2014-01-20 17:28:01Z acheng $
+C $Id$
 C
       subroutine tsdntf (number_failed)
 C
@@ -28,8 +28,6 @@ C
       character*20 myname
       parameter (myname = 'sdnt')
 
-      integer dspdata, dsgdata, dsadata, dssdims, dssnt
-
       real*8 f64(10,10), tf64(10,10)
       real*4 f32(10,10), tf32(10,10)
       integer*2 i16(10,10), ti16(10,10)
@@ -37,20 +35,12 @@ C
 
       character i8(10,10), ti8(10,10)
 
-      
       integer i, j, err
       integer rank
       integer dims(2)
-      integer DFNT_FLOAT64, DFNT_FLOAT32, DFNT_INT8
-      integer DFNT_INT16, DFNT_INT32
   
       call ptestban('Testing', myname)
       number_failed = 0
-      DFNT_FLOAT64 = 6
-      DFNT_FLOAT32 = 5
-      DFNT_INT8 = 20
-      DFNT_INT16 = 22
-      DFNT_INT32 = 24
       rank = 2
       dims(1) = 10
       dims(2) = 10
diff --git a/hdf/test/tsdstrf.f b/hdf/test/tsdstrf.f
index d40eb44..28243bc 100644
--- a/hdf/test/tsdstrf.f
+++ b/hdf/test/tsdstrf.f
@@ -1,17 +1,17 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
-C $Id: tsdstrf.f 6034 2014-01-19 06:59:14Z epourmal $
+C $Id$
 C
       subroutine tsdstrf (num_failed)
       implicit none
diff --git a/hdf/test/tstubsf.f b/hdf/test/tstubsf.f
index 73b4cb7..fe2a855 100644
--- a/hdf/test/tstubsf.f
+++ b/hdf/test/tstubsf.f
@@ -1,17 +1,18 @@
 C****************************************************************************
-C* $Id: tstubsf.f 6034 2014-01-19 06:59:14Z epourmal $                       *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
+C* $Id$                       *
 C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
       subroutine tstubsf (nerrors)
       implicit none
@@ -40,10 +41,6 @@ C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
       integer r3
       integer r7
 
-      integer dfaccess, dfopen, dfclose, dfdesc, dfdup, dfdel, dfread,
-     +     dfwrite, dfupdate, dfget, dfput, dfsfind, dffind,
-     +     dferrno, dfishdf, dfnewref, dfnumber, dfstat
-
       data t255 /255/
       data t127 /127/
       data r1   /1/
diff --git a/hdf/test/tszip.c b/hdf/test/tszip.c
index 233b399..a7ef7ea 100644
--- a/hdf/test/tszip.c
+++ b/hdf/test/tszip.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /*
diff --git a/hdf/test/tutils.c b/hdf/test/tutils.c
index cc82658..9367467 100644
--- a/hdf/test/tutils.c
+++ b/hdf/test/tutils.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "hdf.h"
diff --git a/hdf/test/tutils.h b/hdf/test/tutils.h
index 478659c..67927f0 100644
--- a/hdf/test/tutils.h
+++ b/hdf/test/tutils.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: tutils.h 6036 2014-01-20 17:28:01Z acheng $ */
+/* $Id$ */
 
 #ifndef _TUTILS_H
 #define _TUTILS_H
diff --git a/hdf/test/tvattr.c b/hdf/test/tvattr.c
index 657c158..beedbb5 100644
--- a/hdf/test/tvattr.c
+++ b/hdf/test/tvattr.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: tvattr.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /**************************************************************
 *
diff --git a/hdf/test/tvattrf.f b/hdf/test/tvattrf.f
index b83e849..ba9d796 100644
--- a/hdf/test/tvattrf.f
+++ b/hdf/test/tvattrf.f
@@ -1,18 +1,18 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C***************************************************
 C
-C $Id: tvattrf.f 5212 2009-08-21 20:49:45Z brtnfld $
+C $Id$
 C
 C **************************************************
 C *
@@ -38,16 +38,7 @@ C Output file: tvattrf.hdf
       parameter (myname = 'vattrf',
      +           ifn = 'test_files/tvattr.dat' ,
      +           ofn = 'tvattrf.hdf'
-     +          )  
-      integer vsffidx, vsfsnat, vsfscat, vsfnats
-      integer vsffnas, vsffdat, vsfainf, vsfgnat
-      integer vsfgcat, vsfisat, vfnflds
-      integer vfsnatt, vfscatt, vfnatts
-      integer vffdatt, vfainfo, vfgnatt, vfgcatt
-      integer vfgver
-      integer hopen, hclose, vfatch, vfdtch, vfstart
-      integer vfend, vsfatch, vsfdtch, vfgid, vsgver
-      integer vsffnd, vhfsd
+     +          )
 
       integer nattrs, itype, icount, imsize, vsver
       integer fid1, vsid, vgid, vsref, vgref
@@ -66,20 +57,10 @@ C iattrg, GATTR1 are for float64 values
       character*10  iattrc
       character*20 iattrnm
      
-      integer DFACC_CREATE, DFACC_RDWR, DFACC_READ, DFNT_CHAR
-      integer DFNT_INT32, DFNT_FLOAT32 
       integer VSET_VERSION, VSET_NEW_VERSION
-      integer HDF_VDATA
 
-      parameter (DFACC_CREATE = 4,
-     +           DFACC_RDWR = 3,
-     +           DFACC_READ = 1,
-     +           DFNT_CHAR = 4,
-     +           DFNT_INT32 = 24,
-     +           DFNT_FLOAT32 = 5,
-     +           VSET_VERSION = 3,
+      parameter (VSET_VERSION = 3,
      +           VSET_NEW_VERSION = 4,
-     +           HDF_VDATA = -1,
      +           GATTR1 = -64.123450D0,
      +           RATTR1 = 32.0099,
      +           feps = 1.0E-5,
diff --git a/hdf/test/tvnameclass.c b/hdf/test/tvnameclass.c
index e2543f8..e2fedf5 100644
--- a/hdf/test/tvnameclass.c
+++ b/hdf/test/tvnameclass.c
@@ -1,14 +1,14 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  * Copyright by The HDF Group.                                               *
  * Copyright by the Board of Trustees of the University of Illinois.         *
  * All rights reserved.                                                      *
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /*
diff --git a/hdf/test/tvset.c b/hdf/test/tvset.c
index 642a028..5cba9f9 100644
--- a/hdf/test/tvset.c
+++ b/hdf/test/tvset.c
@@ -1,17 +1,17 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  * Copyright by The HDF Group.                                               *
  * Copyright by the Board of Trustees of the University of Illinois.         *
  * All rights reserved.                                                      *
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: tvset.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
  *
diff --git a/hdf/test/tvsetf.f b/hdf/test/tvsetf.f
index 64b377c..c3a39ac 100644
--- a/hdf/test/tvsetf.f
+++ b/hdf/test/tvsetf.f
@@ -1,18 +1,18 @@
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-C* Copyright by The HDF Group.                                               *
-C* Copyright by the Board of Trustees of the University of Illinois.         *
-C* All rights reserved.                                                      *
-C*                                                                           *
-C* This file is part of HDF.  The full HDF copyright notice, including       *
-C* terms governing use, modification, and redistribution, is contained in    *
-C* the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C* of the source code distribution tree; Copyright.html can be found at      *
-C* http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C* access to either file, you may request a copy from help at hdfgroup.org.     *
-C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+C  Copyright by The HDF Group.                                               *
+C  Copyright by the Board of Trustees of the University of Illinois.         *
+C  All rights reserved.                                                      *
+C                                                                            *
+C  This file is part of HDF.  The full HDF copyright notice, including       *
+C  terms governing use, modification, and redistribution, is contained in    *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
+C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C*
 C*********************************************************************
-C $Id: tvsetf.f 6083 2014-02-11 20:31:37Z epourmal $
+C $Id$
 C*********************************************************************
 C      test vset Fortran data types
 C
@@ -24,8 +24,6 @@ C Output file: tvsetf1.hdf
 
       implicit none
       include 'fortest.inc'
-      include '../src/hdf.inc'
-      include '../src/dffunc.inc'
 
       integer number_failed
       character*20 myname
diff --git a/hdf/test/tvsfpack.c b/hdf/test/tvsfpack.c
index acd7108..b2e28ac 100644
--- a/hdf/test/tvsfpack.c
+++ b/hdf/test/tvsfpack.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include <stdio.h>
diff --git a/hdf/test/vers.c b/hdf/test/vers.c
index c036178..354d259 100644
--- a/hdf/test/vers.c
+++ b/hdf/test/vers.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: vers.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    ***********************************************************************
diff --git a/hdf/util/CMakeLists.txt b/hdf/util/CMakeLists.txt
index 20578d0..a429a13 100644
--- a/hdf/util/CMakeLists.txt
+++ b/hdf/util/CMakeLists.txt
@@ -1,11 +1,11 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 project (HDF4_HDF_UTIL C CXX)
 
 INCLUDE_DIRECTORIES (${HDF4_HDFSOURCE_DIR})
 
 if (WIN32)
   add_definitions (-DDOS_FS)
-endif (WIN32)
+endif ()
 
 if (HDF4_BUILD_TOOLS)
   #-- Adding tool hdfls
@@ -26,7 +26,7 @@ if (HDF4_BUILD_TOOLS)
   TARGET_NAMING (hdfed STATIC)
   TARGET_C_PROPERTIES (hdfed STATIC " " " ")
   target_link_libraries (hdfed ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-endif (HDF4_BUILD_TOOLS)
+endif ()
 
 if (HDF4_BUILD_UTILS)
   #-- Adding utility hdf2gif
@@ -137,11 +137,11 @@ if (HDF4_BUILD_UTILS)
   TARGET_NAMING (vshow STATIC)
   TARGET_C_PROPERTIES (vshow STATIC " " " ")
   target_link_libraries (vshow ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-endif (HDF4_BUILD_UTILS)
+endif ()
 
 if (BUILD_TESTING AND HDF4_BUILD_UTILS)
   include (CMakeTests.cmake)
-endif (BUILD_TESTING AND HDF4_BUILD_UTILS)
+endif ()
 
 ##############################################################################
 ##############################################################################
@@ -162,7 +162,7 @@ if (HDF4_BUILD_TOOLS)
           hdfed
       RUNTIME DESTINATION ${HDF4_INSTALL_TOOLS_BIN_DIR} COMPONENT toolsapplications
   )
-endif (HDF4_BUILD_TOOLS)
+endif ()
 
 if (HDF4_BUILD_UTILS)
   INSTALL_PROGRAM_PDB (gif2hdf ${HDF4_INSTALL_UTILS_BIN_DIR} utilsapplications)
@@ -202,4 +202,4 @@ if (HDF4_BUILD_UTILS)
           vshow
       RUNTIME DESTINATION ${HDF4_INSTALL_UTILS_BIN_DIR} COMPONENT utilsapplications
   )
-endif (HDF4_BUILD_UTILS)
+endif ()
diff --git a/hdf/util/CMakeTests.cmake b/hdf/util/CMakeTests.cmake
index 6546a68..bf34898 100644
--- a/hdf/util/CMakeTests.cmake
+++ b/hdf/util/CMakeTests.cmake
@@ -35,7 +35,7 @@ if (HDF4_BUILD_TOOLS)
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_HDF_UTIL_SOURCE_DIR}/${h4_file} ${dest}
     )
-  endforeach (h4_file ${HDF4_LS_TEST_FILES})
+  endforeach ()
 
   if (WIN32 AND MSVC_VERSION LESS 1900)
     ADD_CUSTOM_COMMAND (
@@ -44,14 +44,14 @@ if (HDF4_BUILD_TOOLS)
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_HDF_UTIL_SOURCE_DIR}/hdfed-w.out1 ${PROJECT_BINARY_DIR}/hdfed.out1
     )
-  else (WIN32 AND MSVC_VERSION LESS 1900)
+  else ()
     ADD_CUSTOM_COMMAND (
         TARGET     hdfls
         POST_BUILD
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_HDF_UTIL_SOURCE_DIR}/hdfed.out1 ${PROJECT_BINARY_DIR}/hdfed.out1
     )
-  endif (WIN32 AND MSVC_VERSION LESS 1900)
+  endif ()
 
   #-- Copy all the hdfed data files from the source directory into the test directory
   set (HDF4_HDFED_TEST_FILES
@@ -67,8 +67,8 @@ if (HDF4_BUILD_TOOLS)
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_HDF_UTIL_SOURCE_DIR}/testfiles/${h4_file} ${dest}
     )
-  endforeach (h4_file ${HDF4_HDFED_TEST_FILES})
-endif (HDF4_BUILD_TOOLS)
+  endforeach ()
+endif ()
 
   #-- Copy all the hdf2gif data files from the source directory into the test directory
   set (HDF4_HDF2GIF_TEST_FILES
@@ -83,7 +83,7 @@ endif (HDF4_BUILD_TOOLS)
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_HDF_UTIL_SOURCE_DIR}/testfiles/${h4_file} ${dest}
     )
-  endforeach (h4_file ${HDF4_HDF2GIF_TEST_FILES})
+  endforeach ()
 
   #-- Copy all the gif2hdf data files from the source directory into the test directory
   set (HDF4_GIF2HDF_TEST_FILES
@@ -99,7 +99,7 @@ endif (HDF4_BUILD_TOOLS)
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_HDF_UTIL_SOURCE_DIR}/testfiles/${h4_file} ${dest}
     )
-  endforeach (h4_file ${HDF4_GIF2HDF_TEST_FILES})
+  endforeach ()
 
   #-- Copy all the hdftor8 data files from the source directory into the test directory
   set (HDF4_HDFTOR8_TEST_FILES
@@ -115,7 +115,7 @@ endif (HDF4_BUILD_TOOLS)
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_HDF_UTIL_SOURCE_DIR}/testfiles/${h4_file} ${dest}
     )
-  endforeach (h4_file ${HDF4_HDFTOR8_TEST_FILES})
+  endforeach ()
 
   #-- Copy all the ristosds data files from the source directory into the test directory
   set (HDF4_RISTOSDS_TEST_FILES
@@ -132,7 +132,7 @@ endif (HDF4_BUILD_TOOLS)
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_HDF_UTIL_SOURCE_DIR}/testfiles/${h4_file} ${dest}
     )
-  endforeach (h4_file ${HDF4_RISTOSDS_TEST_FILES})
+  endforeach ()
 
   #-- Copy all the hdfpack data files from the source directory into the test directory
   set (HDF4_HDFPACK_TEST_FILES
@@ -147,7 +147,7 @@ endif (HDF4_BUILD_TOOLS)
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_HDF_UTIL_SOURCE_DIR}/testfiles/${h4_file} ${dest}
     )
-  endforeach (h4_file ${HDF4_HDFPACK_TEST_FILES})
+  endforeach ()
 
   #-- Copy all the paltohdf data files from the source directory into the test directory
   set (HDF4_PALTOHDF_TEST_FILES
@@ -162,7 +162,7 @@ endif (HDF4_BUILD_TOOLS)
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_HDF_UTIL_SOURCE_DIR}/testfiles/${h4_file} ${dest}
     )
-  endforeach (h4_file ${HDF4_PALTOHDF_TEST_FILES})
+  endforeach ()
 
   #-- Copy all the r8tohdf data files from the source directory into the test directory
   set (HDF4_R8TOHDF_TEST_FILES
@@ -180,7 +180,7 @@ endif (HDF4_BUILD_TOOLS)
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_HDF_UTIL_SOURCE_DIR}/testfiles/${h4_file} ${dest}
     )
-  endforeach (h4_file ${HDF4_R8TOHDF_TEST_FILES})
+  endforeach ()
 
   #-- Copy all the hdfcomp data files from the source directory into the test directory
   set (HDF4_HDFCOMP_TEST_FILES
@@ -197,7 +197,7 @@ endif (HDF4_BUILD_TOOLS)
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_HDF_UTIL_SOURCE_DIR}/testfiles/${h4_file} ${dest}
     )
-  endforeach (h4_file ${HDF4_HDFCOMP_TEST_FILES})
+  endforeach ()
 
   #-- Copy all the jpeg2hdf data files from the source directory into the test directory
   set (HDF4_JPEG2HDF_TEST_FILES
@@ -212,7 +212,7 @@ endif (HDF4_BUILD_TOOLS)
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_HDF_UTIL_SOURCE_DIR}/testfiles/${h4_file} ${dest}
     )
-  endforeach (h4_file ${HDF4_JPEG2HDF_TEST_FILES})
+  endforeach ()
 
 ##############################################################################
 ##############################################################################
@@ -224,7 +224,7 @@ if (HDF4_BUILD_TOOLS)
   MACRO (ADD_LS_TEST_NOL testfile resultfile resultcode)
     if (HDF4_ENABLE_USING_MEMCHECKER)
       add_test (NAME HDFLS_NOL-${testfile} COMMAND $<TARGET_FILE:hdfls> ${testfile})
-    else (HDF4_ENABLE_USING_MEMCHECKER)
+    else ()
       add_test (
           NAME HDFLS_NOL-${testfile}
           COMMAND "${CMAKE_COMMAND}"
@@ -237,19 +237,19 @@ if (HDF4_BUILD_TOOLS)
               -D "TEST_REFERENCE=${resultfile}"
               -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
       )
-    endif (HDF4_ENABLE_USING_MEMCHECKER)
+    endif ()
     if (NOT "${last_test}" STREQUAL "")
       set_tests_properties (HDFLS_NOL-${testfile} PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-    else (NOT "${last_test}" STREQUAL "")
+    else ()
       set_tests_properties (HDFLS_NOL-${testfile} PROPERTIES LABELS ${PROJECT_NAME})
-    endif (NOT "${last_test}" STREQUAL "")
+    endif ()
     set (last_test "HDFLS_NOL-${testfile}")
-  ENDMACRO (ADD_LS_TEST_NOL)
+  ENDMACRO ()
 
   MACRO (ADD_LS_TEST testfile resultfile resultcode)
     if (HDF4_ENABLE_USING_MEMCHECKER)
       add_test (NAME HDFLS-${testfile} COMMAND $<TARGET_FILE:hdfls> -l ${testfile})
-    else (HDF4_ENABLE_USING_MEMCHECKER)
+    else ()
       add_test (
           NAME HDFLS-${testfile}
           COMMAND "${CMAKE_COMMAND}"
@@ -262,19 +262,19 @@ if (HDF4_BUILD_TOOLS)
               -D "TEST_REFERENCE=${resultfile}"
               -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
       )
-    endif (HDF4_ENABLE_USING_MEMCHECKER)
+    endif ()
     if (NOT "${last_test}" STREQUAL "")
       set_tests_properties (HDFLS-${testfile} PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-    else (NOT "${last_test}" STREQUAL "")
+    else ()
       set_tests_properties (HDFLS-${testfile} PROPERTIES LABELS ${PROJECT_NAME})
-    endif (NOT "${last_test}" STREQUAL "")
+    endif ()
     set (last_test "HDFLS-${testfile}")
-  ENDMACRO (ADD_LS_TEST)
+  ENDMACRO ()
 
   MACRO (ADD_H4_TEST_ED testfile resultfile resultcode)
     if (HDF4_ENABLE_USING_MEMCHECKER)
       add_test (NAME HEDIT-${testfile} COMMAND $<TARGET_FILE:hdfed> -batch)
-    else (HDF4_ENABLE_USING_MEMCHECKER)
+    else ()
       add_test (
           NAME HEDIT-${testfile}
           COMMAND "${CMAKE_COMMAND}"
@@ -287,45 +287,45 @@ if (HDF4_BUILD_TOOLS)
               -D "TEST_REFERENCE=${resultfile}"
               -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
       )
-    endif (HDF4_ENABLE_USING_MEMCHECKER)
+    endif ()
     if (NOT "${last_test}" STREQUAL "")
       set_tests_properties (HEDIT-${testfile} PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-    else (NOT "${last_test}" STREQUAL "")
+    else ()
       set_tests_properties (HEDIT-${testfile} PROPERTIES LABELS ${PROJECT_NAME})
-    endif (NOT "${last_test}" STREQUAL "")
+    endif ()
     set (last_test "HEDIT-${testfile}")
-  ENDMACRO (ADD_H4_TEST_ED)
-endif (HDF4_BUILD_TOOLS)
+  ENDMACRO ()
+endif ()
 
   MACRO (ADD_H4_TEST testname testfile)
     add_test (NAME ${testname} COMMAND $<TARGET_FILE:${testfile}> ${ARGN})
     if (NOT "${last_test}" STREQUAL "")
       set_tests_properties (${testname} PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-    else (NOT "${last_test}" STREQUAL "")
+    else ()
       set_tests_properties (${testname} PROPERTIES LABELS ${PROJECT_NAME})
-    endif (NOT "${last_test}" STREQUAL "")
+    endif ()
     set (last_test "${testname}")
-  ENDMACRO (ADD_H4_TEST)
+  ENDMACRO ()
 
   MACRO (ADD_CMP_TEST testname reffile testfile)
     add_test (NAME ${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${reffile} ${testfile})
     if (NOT "${last_test}" STREQUAL "")
       set_tests_properties (${testname} PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-    else (NOT "${last_test}" STREQUAL "")
+    else ()
       set_tests_properties (${testname} PROPERTIES LABELS ${PROJECT_NAME})
-    endif (NOT "${last_test}" STREQUAL "")
+    endif ()
     set (last_test "${testname}")
-  ENDMACRO (ADD_CMP_TEST)
+  ENDMACRO ()
 
   MACRO (ADD_H4Q_TEST testname testfile)
     add_test (NAME ${testname} COMMAND $<TARGET_FILE:${testfile}> ${ARGN} > /dev/null 2>&1)
     if (NOT "${last_test}" STREQUAL "")
       set_tests_properties (${testname} PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-    else (NOT "${last_test}" STREQUAL "")
+    else ()
       set_tests_properties (${testname} PROPERTIES LABELS ${PROJECT_NAME})
-    endif (NOT "${last_test}" STREQUAL "")
+    endif ()
     set (last_test "${testname}")
-  ENDMACRO (ADD_H4Q_TEST)
+  ENDMACRO ()
 
 ##############################################################################
 ##############################################################################
@@ -351,9 +351,9 @@ endif (HDF4_BUILD_TOOLS)
   )
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (hdfgif-clear-refs PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-  else (NOT "${last_test}" STREQUAL "")
+  else ()
     set_tests_properties (hdfgif-clear-refs PROPERTIES LABELS ${PROJECT_NAME})
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "hdfgif-clear-refs")
 
   ADD_H4_TEST (testhdf2gif hdf2gif skull.hdf skull.gif)
@@ -366,12 +366,12 @@ endif (HDF4_BUILD_TOOLS)
 
   if (HDF4_BUILD_TOOLS)
     ADD_H4_TEST_ED (hdfed.input1 hdfed.out1 0)
-  endif (HDF4_BUILD_TOOLS)
+  endif ()
 
   ADD_H4Q_TEST (testristosds ristosds storm110.hdf storm120.hdf storm130.hdf -o storm.hdf)
   if (HDF4_BUILD_TOOLS)
     ADD_H4_TEST_ED (ristosds.input1 ristosds.out1 0)
-  endif (HDF4_BUILD_TOOLS)
+  endif ()
 
   # Remove any output file left over from previous test run
   add_test (
@@ -387,9 +387,9 @@ endif (HDF4_BUILD_TOOLS)
   )
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (hdfpack-clear-refs PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-  else (NOT "${last_test}" STREQUAL "")
+  else ()
     set_tests_properties (hdfpack-clear-refs PROPERTIES LABELS ${PROJECT_NAME})
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "hdfpack-clear-refs")
 
   ADD_H4_TEST (testhdfpack hdfpack test.hdf test.pck)
@@ -397,7 +397,7 @@ endif (HDF4_BUILD_TOOLS)
   if (HDF4_BUILD_TOOLS)
     ADD_LS_TEST_NOL (test.hdf hdfpack.out1.1 0)
     ADD_LS_TEST_NOL (test.pck hdfpack.out1.2 0)
-  endif (HDF4_BUILD_TOOLS)
+  endif ()
 
   # Remove any output file left over from previous test run
   add_test (
@@ -425,9 +425,9 @@ endif (HDF4_BUILD_TOOLS)
   )
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (hdfpalette-clear-refs PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-  else (NOT "${last_test}" STREQUAL "")
+  else ()
     set_tests_properties (hdfpalette-clear-refs PROPERTIES LABELS ${PROJECT_NAME})
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "hdfpalette-clear-refs")
 
   ADD_H4_TEST (testpaltohdf paltohdf palette.raw palette.hdf)
@@ -439,7 +439,7 @@ endif (HDF4_BUILD_TOOLS)
   ADD_H4_TEST (testhdftor8-storm hdftor8 storm.hdf)
   if (HDF4_BUILD_TOOLS)
     ADD_LS_TEST (storm.hdf hdftor8.out1 0)
-  endif (HDF4_BUILD_TOOLS)
+  endif ()
 
   ADD_CMP_TEST (storm110comp img001-057.057  storm110.raw)
   ADD_CMP_TEST (storm120comp img002-057.057  storm120.raw)
@@ -451,7 +451,7 @@ endif (HDF4_BUILD_TOOLS)
   if (HDF4_BUILD_TOOLS)
     ADD_LS_TEST (allstorms.hdf hdfcomp.out1.1 0)
     ADD_LS_TEST (allcomp.hdf hdfcomp.out1.2 0)
-  endif (HDF4_BUILD_TOOLS)
+  endif ()
 
   # Remove any output file left over from previous test run
   add_test (
@@ -465,16 +465,16 @@ endif (HDF4_BUILD_TOOLS)
   )
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (hdfjpeg-clear-refs PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-  else (NOT "${last_test}" STREQUAL "")
+  else ()
     set_tests_properties (hdfjpeg-clear-refs PROPERTIES LABELS ${PROJECT_NAME})
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "hdfjpeg-clear-refs")
 
   ADD_H4_TEST (testjpeg2hdf jpeg2hdf jpeg_img.jpg jpeg.hdf)
   ADD_H4_TEST (testhdf2jpeg hdf2jpeg jpeg.hdf jpeg2.jpg)
   if (HDF4_BUILD_TOOLS)
     ADD_LS_TEST (jpeg.hdf jpeg2hdf.out1 0)
-  endif (HDF4_BUILD_TOOLS)
+  endif ()
   ADD_CMP_TEST (jpeg2comp jpeg_img.jpg jpeg2.jpg)
 
 #  ADD_H4_TEST (hdf8to24 hdf8to24)
diff --git a/hdf/util/Makefile.in b/hdf/util/Makefile.in
index ce45357..5612cec 100644
--- a/hdf/util/Makefile.in
+++ b/hdf/util/Makefile.in
@@ -549,6 +549,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/hdf/util/decompress.c b/hdf/util/decompress.c
index dc1ee37..960e432 100644
--- a/hdf/util/decompress.c
+++ b/hdf/util/decompress.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/hdf/util/fp2hdf.c b/hdf/util/fp2hdf.c
index 4e1866d..5bc72d1 100644
--- a/hdf/util/fp2hdf.c
+++ b/hdf/util/fp2hdf.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /*
diff --git a/hdf/util/fptest.c b/hdf/util/fptest.c
index 0d1d8b5..d6d69a1 100644
--- a/hdf/util/fptest.c
+++ b/hdf/util/fptest.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include <stdio.h>
diff --git a/hdf/util/gif2hdf.c b/hdf/util/gif2hdf.c
index 54fbfa3..84d7da3 100644
--- a/hdf/util/gif2hdf.c
+++ b/hdf/util/gif2hdf.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include <hdf.h>
diff --git a/hdf/util/gif2mem.c b/hdf/util/gif2mem.c
index 610bd2d..ef28f43 100644
--- a/hdf/util/gif2mem.c
+++ b/hdf/util/gif2mem.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
  
diff --git a/hdf/util/gifread.c b/hdf/util/gifread.c
index 559eb80..d1447aa 100644
--- a/hdf/util/gifread.c
+++ b/hdf/util/gifread.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
  
diff --git a/hdf/util/hdf24to8.c b/hdf/util/hdf24to8.c
index 179222b..32277d2 100644
--- a/hdf/util/hdf24to8.c
+++ b/hdf/util/hdf24to8.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdf24to8.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /**************************************************************************
 * hdf24hdf8 Quantizes a HDF RGB 24 bit "pixel" image into a 8 bit image
diff --git a/hdf/util/hdf2gif.c b/hdf/util/hdf2gif.c
index 4006d4e..019095a 100644
--- a/hdf/util/hdf2gif.c
+++ b/hdf/util/hdf2gif.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "gif.h"
diff --git a/hdf/util/hdf2jpeg.c b/hdf/util/hdf2jpeg.c
index 97e6ac5..dc61623 100644
--- a/hdf/util/hdf2jpeg.c
+++ b/hdf/util/hdf2jpeg.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdf2jpeg.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 #include "hdf.h"
 #include "hfile.h"
 
diff --git a/hdf/util/hdf8to24.c b/hdf/util/hdf8to24.c
index 7c154a5..171873e 100644
--- a/hdf/util/hdf8to24.c
+++ b/hdf/util/hdf8to24.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdf8to24.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 #include "hdf.h"
 #ifndef I860
 #include <stdlib.h>
diff --git a/hdf/util/hdfcomp.c b/hdf/util/hdfcomp.c
index 3827710..01c5ebc 100644
--- a/hdf/util/hdfcomp.c
+++ b/hdf/util/hdfcomp.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdfcomp.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
 *  hdfcomp.c
diff --git a/hdf/util/hdfgifwr.c b/hdf/util/hdfgifwr.c
index 6eea17c..5421f15 100644
--- a/hdf/util/hdfgifwr.c
+++ b/hdf/util/hdfgifwr.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
  
diff --git a/hdf/util/hdfls.c b/hdf/util/hdfls.c
index 673abbf..ffb28d6 100644
--- a/hdf/util/hdfls.c
+++ b/hdf/util/hdfls.c
@@ -5,14 +5,14 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
-/* $Id: hdfls.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 #include "hdf.h"
 #include "hfile.h"
 
diff --git a/hdf/util/hdfpack.c b/hdf/util/hdfpack.c
index c9571c5..deda114 100644
--- a/hdf/util/hdfpack.c
+++ b/hdf/util/hdfpack.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdfpack.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    ** FILE
diff --git a/hdf/util/hdftopal.c b/hdf/util/hdftopal.c
index 6b695d4..c66399f 100644
--- a/hdf/util/hdftopal.c
+++ b/hdf/util/hdftopal.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdftopal.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    *  hdftopal.c
diff --git a/hdf/util/hdftor8.c b/hdf/util/hdftor8.c
index 45ff6bf..93ae984 100644
--- a/hdf/util/hdftor8.c
+++ b/hdf/util/hdftor8.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdftor8.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
  * hdftor8.c
diff --git a/hdf/util/hdfunpac.c b/hdf/util/hdfunpac.c
index bca26fb..a077fc0 100644
--- a/hdf/util/hdfunpac.c
+++ b/hdf/util/hdfunpac.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdfunpac.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    ** FILE
diff --git a/hdf/util/he.h b/hdf/util/he.h
index a24f012..bd7f4e9 100644
--- a/hdf/util/he.h
+++ b/hdf/util/he.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: he.h 6036 2014-01-20 17:28:01Z acheng $ */
+/* $Id$ */
 
 /* he.h -- header file for HDFedit */
 #include "hdf.h"
diff --git a/hdf/util/he_cntrl.c b/hdf/util/he_cntrl.c
index ae0524c..7136695 100644
--- a/hdf/util/he_cntrl.c
+++ b/hdf/util/he_cntrl.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: he_cntrl.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /* ------ he-cntrl.c ------
    This file contains much of the contol mechanisms for HDFed
diff --git a/hdf/util/he_disp.c b/hdf/util/he_disp.c
index 132f438..25ca248 100644
--- a/hdf/util/he_disp.c
+++ b/hdf/util/he_disp.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: he_disp.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /* display.c -- contains code for displaying an image using ICR
  * this code is plucked from hdfrseq.c
diff --git a/hdf/util/he_file.c b/hdf/util/he_file.c
index 49ca896..996a06e 100644
--- a/hdf/util/he_file.c
+++ b/hdf/util/he_file.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: he_file.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /* --- he-file.c  --- file and annotation manipulation routines */
 #include "he.h"
diff --git a/hdf/util/he_main.c b/hdf/util/he_main.c
index 237cda2..7c79f2b 100644
--- a/hdf/util/he_main.c
+++ b/hdf/util/he_main.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: he_main.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /******************************************************************************
  * he - HDF editor
diff --git a/hdf/util/he_proto.h b/hdf/util/he_proto.h
index 946c143..0428b53 100644
--- a/hdf/util/he_proto.h
+++ b/hdf/util/he_proto.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: he_proto.h 4937 2007-09-10 16:36:16Z pvn $ */
+/* $Id$ */
 
 /* Prototypes for hdfed functions */
 int         HEalias
diff --git a/hdf/util/jpeg2hdf.c b/hdf/util/jpeg2hdf.c
index 051b5f6..d51bce3 100644
--- a/hdf/util/jpeg2hdf.c
+++ b/hdf/util/jpeg2hdf.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: jpeg2hdf.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 #include "hdf.h"
 #ifndef I860
 #include <stdlib.h>
diff --git a/hdf/util/paltohdf.c b/hdf/util/paltohdf.c
index da7102b..0ea2d88 100644
--- a/hdf/util/paltohdf.c
+++ b/hdf/util/paltohdf.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: paltohdf.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    *  paltohdf.c
diff --git a/hdf/util/r8tohdf.c b/hdf/util/r8tohdf.c
index eefd3d4..50102e4 100644
--- a/hdf/util/r8tohdf.c
+++ b/hdf/util/r8tohdf.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: r8tohdf.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*
    *  r8tohdf.c
diff --git a/hdf/util/ristosds.c b/hdf/util/ristosds.c
index be2d47b..70ab8eb 100644
--- a/hdf/util/ristosds.c
+++ b/hdf/util/ristosds.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: ristosds.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /* This program converts a series raster image hdf files into   */
 /* a single 3D sds hdf file. Each ris hdf file contains one     */
diff --git a/hdf/util/vmake.c b/hdf/util/vmake.c
index 69cbe07..9d066f9 100644
--- a/hdf/util/vmake.c
+++ b/hdf/util/vmake.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: vmake.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*****************************************************************************
 *
diff --git a/hdf/util/vshow.c b/hdf/util/vshow.c
index 74a28b3..ce554da 100644
--- a/hdf/util/vshow.c
+++ b/hdf/util/vshow.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: vshow.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 /*****************************************************************************
 *
diff --git a/hdf/util/writehdf.c b/hdf/util/writehdf.c
index 39fecef..05a2ef0 100644
--- a/hdf/util/writehdf.c
+++ b/hdf/util/writehdf.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include <hdf.h>
diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt
index fb0ab1c..4aea237 100644
--- a/java/CMakeLists.txt
+++ b/java/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1.0)
+cmake_minimum_required(VERSION 3.2.2)
 PROJECT ( HDF4_JAVA C Java )
 
 set (CMAKE_MODULE_PATH "${HDF_RESOURCES_DIR};${HDF_RESOURCES_EXT_DIR}")
@@ -15,9 +15,9 @@ INCLUDE_DIRECTORIES ( ${JNI_INCLUDE_DIRS} )
 
 if (WIN32)
   set (HDF_JRE_DIRECTORY "C:/Program Files/Java/jre8")
-else (WIN32)
+else ()
   set (HDF_JRE_DIRECTORY "/usr/lib/jvm/jre")
-endif (WIN32)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Include the main src and config directories
@@ -41,14 +41,14 @@ add_subdirectory (${HDF4_JAVA_SOURCE_DIR}/src ${HDF4_JAVA_BINARY_DIR}/src)
 #-----------------------------------------------------------------------------
 if (HDF4_BUILD_EXAMPLES)
   add_subdirectory (${HDF4_JAVA_SOURCE_DIR}/examples ${HDF4_JAVA_BINARY_DIR}/examples)
-endif (HDF4_BUILD_EXAMPLES)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Testing
 #-----------------------------------------------------------------------------
 if (BUILD_TESTING)
   add_subdirectory (${HDF4_JAVA_SOURCE_DIR}/test ${HDF4_JAVA_BINARY_DIR}/test)
-endif (BUILD_TESTING)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Add Required Jar(s)
@@ -72,4 +72,4 @@ if (HDF4_JAVA_PACK_JRE)
       DESTINATION ${HDF4_INSTALL_BIN_DIR}
       USE_SOURCE_PERMISSIONS
   )
-endif (HDF4_JAVA_PACK_JRE)
+endif ()
diff --git a/java/Makefile.in b/java/Makefile.in
index 842dd98..6356b31 100644
--- a/java/Makefile.in
+++ b/java/Makefile.in
@@ -448,6 +448,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/java/examples/CMakeLists.txt b/java/examples/CMakeLists.txt
index e6e4afc..ee25461 100644
--- a/java/examples/CMakeLists.txt
+++ b/java/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 project (HDF4_JAVA_Examples Java)
 
 set (CMAKE_VERBOSE_MAKEFILE 1)
@@ -18,19 +18,19 @@ set (CMAKE_JAVA_INCLUDE_PATH "${HDF4_JAVA_JARS};${HDF4_JAVA_LOGGING_JAR};${HDF4_
 
 if (WIN32 AND NOT CYGWIN)
   set (CMAKE_JAVA_INCLUDE_FLAG_SEP ";")
-else (WIN32 AND NOT CYGWIN)
+else ()
   set (CMAKE_JAVA_INCLUDE_FLAG_SEP ":")
-endif (WIN32 AND NOT CYGWIN)
+endif ()
 
 set (CMAKE_JAVA_CLASSPATH ".")
 foreach (CMAKE_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH})
   set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${CMAKE_INCLUDE_PATH}")
-endforeach (CMAKE_INCLUDE_PATH)
+endforeach ()
 
 foreach (HCP_JAR ${CMAKE_JAVA_INCLUDE_PATH})
   get_filename_component (_HCP_FILE ${HCP_JAR} NAME)
   set (HDFJNI_CLASSJARS "${_HCP_FILE} ${HDFJNI_CLASSJARS}")
-endforeach (HCP_JAR ${CMAKE_JAVA_INCLUDE_PATH})
+endforeach ()
 
 foreach (example ${HDFJNI_EXAMPLES})
   file (WRITE ${HDF4_JAVA_Examples_BINARY_DIR}/Manifest.txt
@@ -42,14 +42,17 @@ Class-Path: ${HDFJNI_CLASSJARS}
   get_target_property (${example}_JAR_FILE ${example} JAR_FILE)
   add_dependencies (${example} ${HDF4_JAVA_HDF_LIB_TARGET})
   set_target_properties (${example} PROPERTIES FOLDER examples/java)
-endforeach (example ${HDFJNI_EXAMPLES})
-
-if (CMAKE_BUILD_TYPE MATCHES Debug)
-  set (CMD_ARGS "-Dhdf.hdflib.HDFLibrary.loadLibraryName=hdf_java_debug;")
-endif(CMAKE_BUILD_TYPE MATCHES Debug)
+endforeach ()
 
 if (BUILD_TESTING)
   macro (ADD_H4_TEST resultfile resultcode)
+    if (CMAKE_BUILD_TYPE MATCHES Debug)
+      if (WIN32)
+        set (CMD_ARGS "-Dhdf.hdflib.HDFLibrary.loadLibraryName=hdf_java_D;")
+      else()
+        set (CMD_ARGS "-Dhdf.hdflib.HDFLibrary.loadLibraryName=hdf_java_debug;")
+      endif()
+    endif()
     add_test (
         NAME JAVAEX-${resultfile}
         COMMAND "${CMAKE_COMMAND}"
@@ -66,9 +69,9 @@ if (BUILD_TESTING)
     )
     if (NOT "${last_test}" STREQUAL "")
       set_tests_properties (JAVAEX-${resultfile} PROPERTIES DEPENDS ${last_test})
-    endif (NOT "${last_test}" STREQUAL "")
+    endif ()
     set (last_test "JAVAEX-${resultfile}")
-  endmacro (ADD_H4_TEST file)
+  endmacro ()
 
   foreach (example ${HDFJNI_EXAMPLES})
     add_test (
@@ -81,9 +84,9 @@ if (BUILD_TESTING)
     )
     if (NOT "${last_test}" STREQUAL "")
       set_tests_properties (JAVAEX-${example}-clearall-objects PROPERTIES DEPENDS ${last_test})
-    endif (NOT "${last_test}" STREQUAL "")
+    endif ()
     set (last_test "JAVAEX-${example}-clearall-objects")
     ADD_H4_TEST (${example} 0)
-  endforeach (example ${HDFJNI_EXAMPLES})
+  endforeach ()
 
-endif (BUILD_TESTING)
+endif ()
diff --git a/java/examples/Makefile.in b/java/examples/Makefile.in
index 2c5094e..aaa0616 100644
--- a/java/examples/Makefile.in
+++ b/java/examples/Makefile.in
@@ -394,6 +394,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/java/src/CMakeLists.txt b/java/src/CMakeLists.txt
index e79f6e5..160b32f 100644
--- a/java/src/CMakeLists.txt
+++ b/java/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1.0)
+cmake_minimum_required(VERSION 3.2.2)
 PROJECT ( HDF4_JAVA_SRC C Java )
 
 #-----------------------------------------------------------------------------
diff --git a/java/src/Makefile.in b/java/src/Makefile.in
index 685d1ba..24c1216 100644
--- a/java/src/Makefile.in
+++ b/java/src/Makefile.in
@@ -278,6 +278,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/java/src/hdf/CMakeLists.txt b/java/src/hdf/CMakeLists.txt
index 1bfc617..b9c6c65 100644
--- a/java/src/hdf/CMakeLists.txt
+++ b/java/src/hdf/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 PROJECT (HDF4_JAVA_HDF)
 
 add_subdirectory (${HDF4_JAVA_HDF_SOURCE_DIR}/hdflib      hdflib)
diff --git a/java/src/hdf/hdflib/CMakeLists.txt b/java/src/hdf/hdflib/CMakeLists.txt
index 3ddeffa..1cf2406 100644
--- a/java/src/hdf/hdflib/CMakeLists.txt
+++ b/java/src/hdf/hdflib/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 PROJECT (HDF4_JAVA_HDF_HDF4 Java)
 
 set (CMAKE_VERBOSE_MAKEFILE 1)
@@ -51,7 +51,7 @@ add_jar (${HDF4_JAVA_HDF_LIB_TARGET} OUTPUT_NAME "${HDF4_JAVA_HDF_LIB_TARGET}-${
 install_jar (${HDF4_JAVA_HDF_LIB_TARGET} LIBRARY DESTINATION ${HDF4_INSTALL_JAR_DIR} COMPONENT libraries)
 #if (NOT WIN32)
 #  install_jni_symlink (${HDF4_JAVA_HDF_LIB_TARGET} ${HDF4_INSTALL_JAR_DIR} libraries)
-#endif (NOT WIN32)
+#endif ()
 
 get_target_property (${HDF4_JAVA_HDF_LIB_TARGET}_JAR_FILE ${HDF4_JAVA_HDF_LIB_TARGET} JAR_FILE)
 SET_GLOBAL_VARIABLE (HDF4_JAVA_JARS_TO_EXPORT "${HDF4_JAVA_JARS_TO_EXPORT};${${HDF4_JAVA_HDF_LIB_TARGET}_JAR_FILE}")
diff --git a/java/src/hdf/hdflib/HDFLibrary.java b/java/src/hdf/hdflib/HDFLibrary.java
index 5396455..7e9dd87 100644
--- a/java/src/hdf/hdflib/HDFLibrary.java
+++ b/java/src/hdf/hdflib/HDFLibrary.java
@@ -213,11 +213,16 @@ public class HDFLibrary implements java.io.Serializable
      */
     private static final long serialVersionUID = -1695429510319126910L;
 
-    public final static String HDFPATH_PROPERTY_KEY = "hdf.hdflib.HDFLibrary.hdflib";
-
     private final static Logger log = LoggerFactory.getLogger(HDFLibrary.class);
 
-    private final static String JHI_VERSION= "3.99";
+    private final static String JHI_VERSION = "4.2.13";
+
+    public final static String HDFPATH_PROPERTY_KEY = "hdf.hdflib.HDFLibrary.hdflib";
+
+    // add system property to load library by name from library path, via
+    // System.loadLibrary()
+    public final static String H4_LIBRARY_NAME_PROPERTY_KEY = "hdf.hdflib.HDFLibrary.loadLibraryName";
+    private static String s_libraryName;
     private static boolean isLibraryLoaded = false;
 
     static { loadH4Lib(); }
@@ -227,35 +232,57 @@ public class HDFLibrary implements java.io.Serializable
         if (isLibraryLoaded) // load only once
             return;
 
-        // first try loading library via full path
-        String filename = System.getProperty(HDFPATH_PROPERTY_KEY, null);
-        if ((filename != null) && (filename.length() > 0)) {
-            File h4dll = new File(filename);
-            if (h4dll.exists() && h4dll.canRead() && h4dll.isFile()) {
-                try {
-                    System.load(filename);
-                    isLibraryLoaded = true;
+
+        // first try loading library by name from user supplied library path
+        s_libraryName = System.getProperty(H4_LIBRARY_NAME_PROPERTY_KEY, null);
+        String mappedName = null;
+        if ((s_libraryName != null) && (s_libraryName.length() > 0)) {
+            try {
+                mappedName = System.mapLibraryName(s_libraryName);
+                System.loadLibrary(s_libraryName);
+                isLibraryLoaded = true;
+            }
+            catch (Throwable err) {
+                err.printStackTrace();
+                isLibraryLoaded = false;
+            }
+            finally {
+                log.info("HDF4 library: " + s_libraryName);
+                log.debug(" resolved to: " + mappedName + "; ");
+                log.info((isLibraryLoaded ? "" : " NOT") + " successfully loaded from system property");
+            }
+        }
+
+        if (!isLibraryLoaded) {
+            // else try loading library via full path
+            String filename = System.getProperty(HDFPATH_PROPERTY_KEY, null);
+            if ((filename != null) && (filename.length() > 0)) {
+                File h4dll = new File(filename);
+                if (h4dll.exists() && h4dll.canRead() && h4dll.isFile()) {
+                    try {
+                        System.load(filename);
+                        isLibraryLoaded = true;
+                        }
+                    catch (Throwable err) {
+                        isLibraryLoaded = false;
+                    }
+                    finally {
+                        log.info("HDF4 library: ");
+                        log.debug(filename);
+                        log.info((isLibraryLoaded ? "" : " NOT") + " successfully loaded.");
                     }
-                catch (Throwable err) {
-                    isLibraryLoaded = false;
                 }
-                finally {
-                    log.info("HDF4 library: ");
-                    log.debug(filename);
-                    log.info((isLibraryLoaded ? "" : " NOT")
-                            + " successfully loaded.");
+                else {
+                    isLibraryLoaded = false;
+                    throw (new UnsatisfiedLinkError("Invalid HDF4 library, "+filename));
                 }
             }
-            else {
-                isLibraryLoaded = false;
-                throw (new UnsatisfiedLinkError("Invalid HDF4 library, "+filename));
-            }
         }
 
         // else load standard library
         if (!isLibraryLoaded) {
-            String mappedName = null;
-            String s_libraryName = "hdf_java";
+            mappedName = null;
+            s_libraryName = "hdf_java";
             try {
                 mappedName = System.mapLibraryName(s_libraryName);
                 System.loadLibrary("hdf_java");
@@ -267,8 +294,7 @@ public class HDFLibrary implements java.io.Serializable
             finally {
                 log.info("HDF4 library: " + s_libraryName);
                 log.debug(" resolved to: " + mappedName + "; ");
-                log.info((isLibraryLoaded ? "" : " NOT")
-                        + " successfully loaded from java.library.path");
+                log.info((isLibraryLoaded ? "" : " NOT") + " successfully loaded from java.library.path");
             }
         }
 
diff --git a/java/src/hdf/overview.html b/java/src/hdf/overview.html
index 641227a..b703ee2 100644
--- a/java/src/hdf/overview.html
+++ b/java/src/hdf/overview.html
@@ -31,7 +31,7 @@ same library on most platforms.
 <p>The central part of the JHI4 is the Java class <i>
 <a href="../../hdf-java-html/javadocs/hdf/hdflib/HDFLibrary.html">hdf.hdflib.HDFLibrary</a></i>.
 The <i>HDFLibrary</i> class calls the standard (<i>i.e.</i>, `native' code) HDF
-library, with native methods for most of the HDF5functions.
+library, with native methods for most of the HDF4functions.
 
 <h3>
 <u>How to use it</u></h3>
diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt
index aa6dc60..8f2188c 100644
--- a/java/src/jni/CMakeLists.txt
+++ b/java/src/jni/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 PROJECT (HDF4_JAVA_JNI C)
 
 set (HDF4_JAVA_JNI_CSRCS
@@ -32,14 +32,17 @@ add_library (${HDF4_JAVA_JNI_LIB_TARGET} SHARED ${HDF4_JAVA_JNI_CSRCS})
 TARGET_C_PROPERTIES (${HDF4_JAVA_JNI_LIB_TARGET} SHARED " " " ")
 if (WIN32)
   TARGET_LINK_LIBRARIES (${HDF4_JAVA_JNI_LIB_TARGET} ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} "ws2_32.lib")
-else (WIN32)
+else ()
   TARGET_LINK_LIBRARIES (${HDF4_JAVA_JNI_LIB_TARGET} ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET})
-endif (WIN32)
+endif ()
 set_target_properties (${HDF4_JAVA_JNI_LIB_TARGET} PROPERTIES FOLDER libraries/jni)
 SET_GLOBAL_VARIABLE (HDF4_JAVA_LIBRARIES_TO_EXPORT "${HDF4_JAVA_LIBRARIES_TO_EXPORT};${HDF4_JAVA_JNI_LIB_TARGET}")
 H4_SET_LIB_OPTIONS (${HDF4_JAVA_JNI_LIB_TARGET} ${HDF4_JAVA_JNI_LIB_NAME} SHARED)
 if (WIN32)
   get_filename_component (HDF4_JAVA_JNI_DLL_NAME ${HDF4_JAVA_JNI_LIB_TARGET} NAME_WE)
+  if (CMAKE_BUILD_TYPE MATCHES Debug)
+    set (HDF4_JAVA_JNI_DLL_NAME "${HDF4_JAVA_JNI_DLL_NAME}_D")
+  endif ()
   # message (STATUS "HDF4_JAVA_JNI_DLL_NAME: ${HDF4_JAVA_JNI_DLL_NAME}")
   if (BUILD_TESTING)
     add_custom_target (HDF4_JAVA_JNI-Test-Copy ALL
@@ -47,8 +50,8 @@ if (WIN32)
         COMMENT "Copying ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${HDF4_JAVA_JNI_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
     )
     add_dependencies (HDF4_JAVA_JNI-Test-Copy ${HDF4_JAVA_JNI_LIB_TARGET})
-  endif (BUILD_TESTING)
-endif (WIN32)
+  endif ()
+endif ()
 
 #-----------------------------------------------------------------------------
 # Add Target(s) to CMake Install for import into other projects
@@ -59,10 +62,11 @@ if (HDF4_EXPORTED_TARGETS)
       TARGETS
           ${HDF4_JAVA_JNI_LIB_TARGET}
       EXPORT
-          ${HDF4_JAVA_EXPORTED_TARGETS}
+          ${HDF4_EXPORTED_TARGETS}
       LIBRARY DESTINATION ${HDF4_INSTALL_LIB_DIR} COMPONENT libraries
       ARCHIVE DESTINATION ${HDF4_INSTALL_LIB_DIR} COMPONENT libraries
       RUNTIME DESTINATION ${HDF4_INSTALL_LIB_DIR} COMPONENT libraries
       FRAMEWORK DESTINATION ${HDF4_INSTALL_FWRK_DIR} COMPONENT libraries
+      INCLUDES DESTINATION include
   )
-endif (HDF4_EXPORTED_TARGETS)
+endif ()
diff --git a/java/src/jni/Makefile.in b/java/src/jni/Makefile.in
index a406428..9c1a5b7 100644
--- a/java/src/jni/Makefile.in
+++ b/java/src/jni/Makefile.in
@@ -443,6 +443,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/java/src/jni/h4jni.h b/java/src/jni/h4jni.h
index 51ede40..e1979ff 100644
--- a/java/src/jni/h4jni.h
+++ b/java/src/jni/h4jni.h
@@ -1,22 +1,16 @@
-/****************************************************************************
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  * Copyright by The HDF Group.                                               *
  * Copyright by the Board of Trustees of the University of Illinois.         *
  * All rights reserved.                                                      *
  *                                                                           *
- * This file is part of HDF Java Products. The full HDF Java copyright       *
- * notice, including terms governing use, modification, and redistribution,  *
- * is contained in the file, COPYING.  COPYING can be found at the root of   *
- * the source code distribution tree. You can also access it online  at      *
- * http://www.hdfgroup.org/products/licenses.html.  If you do not have       *
- * access to the file, you may request a copy from help at hdfgroup.org.        *
+ * This file is part of HDF.  The full HDF copyright notice, including       *
+ * terms governing use, modification, and redistribution, is contained in    *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  ****************************************************************************/
 
-/*
- *  For details of the HDF libraries, see the HDF Documentation at:
- *    http://hdfdfgroup.org/HDF/doc/
- *
- */
-
 #include <jni.h>
 
 #ifndef _Included_h4jni
@@ -68,8 +62,8 @@
 /* Macros for string access */
 #define PIN_JAVA_STRING(javastr,localstr) {                                      \
     jboolean isCopy;                                                             \
+    (localstr) = NULL;                                                           \
     if ((javastr) == NULL) {                                                     \
-        (localstr) = NULL;                                                      \
         h4nullArgument(env, "java string is NULL");                              \
     }                                                                            \
     else {                                                                       \
@@ -86,12 +80,12 @@
 
 #define PIN_JAVA_STRING_TWO(javastr,localstr,java2str,local2str) {               \
     jboolean isCopy;                                                             \
+    (localstr) = NULL;                                                           \
+    (local2str) = NULL;                                                          \
     if ((javastr) == NULL) {                                                     \
-        (localstr) = NULL;                                                      \
         h4nullArgument(env, "java string is NULL");                              \
     }                                                                            \
     else if ((java2str) == NULL) {                                               \
-        (local2str) = NULL;                                                      \
         h4nullArgument(env, "second java string is NULL");                       \
     }                                                                            \
     else {                                                                       \
@@ -116,16 +110,16 @@
 
 #define PIN_JAVA_STRING_THREE(javastr,localstr,java2str,local2str,java3str,local3str) {       \
     jboolean isCopy;                                                             \
+    (localstr) = NULL;                                                           \
+    (local2str) = NULL;                                                          \
+    (local3str) = NULL;                                                          \
     if ((javastr) == NULL) {                                                     \
-        (localstr) = NULL;                                                      \
         h4nullArgument(env, "java string is NULL");                              \
     }                                                                            \
     else if ((java2str) == NULL) {                                               \
-        (local2str) = NULL;                                                      \
         h4nullArgument(env, "second java string is NULL");                       \
     }                                                                            \
     else if ((java3str) == NULL) {                                               \
-        (local3str) = NULL;                                                      \
         h4nullArgument(env, "third java string is NULL");                        \
     }                                                                            \
     else {                                                                       \
diff --git a/java/src/jni/hdfanImp.c b/java/src/jni/hdfanImp.c
index 968b720..69149cf 100644
--- a/java/src/jni/hdfanImp.c
+++ b/java/src/jni/hdfanImp.c
@@ -164,7 +164,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_ANannlist
 (JNIEnv *env, jclass clss, jlong an_id, jint anntype, jshort tag, jshort ref, jintArray annlist)
 {
-    intn retVal;
+    intn retVal = -1;
     jint *iarr;
     jboolean isCopy;
 
@@ -285,7 +285,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_ANget_1tagref
 (JNIEnv *env, jclass clss, jlong an_id, jint index, jint type, jshortArray tagref)
 {
-    int32 rval;
+    int32 rval = -1;
     short *theArgs;
     jboolean isCopy;
 
diff --git a/java/src/jni/hdfdfpalImp.c b/java/src/jni/hdfdfpalImp.c
index a4b6895..93951e3 100644
--- a/java/src/jni/hdfdfpalImp.c
+++ b/java/src/jni/hdfdfpalImp.c
@@ -113,7 +113,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_DFPnpals
 (JNIEnv *env, jclass clss, jstring filename)
 {
-    intn         rval;
+    intn         rval = -1;
     const char  *f;
 
     PIN_JAVA_STRING(filename, f);
diff --git a/java/src/jni/hdfexceptionImp.c b/java/src/jni/hdfexceptionImp.c
index 9491a47..905a618 100644
--- a/java/src/jni/hdfexceptionImp.c
+++ b/java/src/jni/hdfexceptionImp.c
@@ -1,14 +1,14 @@
-/****************************************************************************
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  * Copyright by The HDF Group.                                               *
  * Copyright by the Board of Trustees of the University of Illinois.         *
  * All rights reserved.                                                      *
  *                                                                           *
- * This file is part of HDF Java Products. The full HDF Java copyright       *
- * notice, including terms governing use, modification, and redistribution,  *
- * is contained in the file, COPYING.  COPYING can be found at the root of   *
- * the source code distribution tree. You can also access it online  at      *
- * http://www.hdfgroup.org/products/licenses.html.  If you do not have       *
- * access to the file, you may request a copy from help at hdfgroup.org.        *
+ * This file is part of HDF.  The full HDF copyright notice, including       *
+ * terms governing use, modification, and redistribution, is contained in    *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  ****************************************************************************/
 /*
  *  This is a utility program used by the HDF Java-C wrapper layer to
diff --git a/java/src/jni/hdfgrImp.c b/java/src/jni/hdfgrImp.c
index 0c8ae3f..a502f4a 100644
--- a/java/src/jni/hdfgrImp.c
+++ b/java/src/jni/hdfgrImp.c
@@ -130,7 +130,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_GRnametoindex
 (JNIEnv *env, jclass cls, jlong gr_id, jstring gr_name)
 {
-    int32 rval;
+    int32 rval = -1;
     const char *str;
 
     PIN_JAVA_STRING(gr_name, str);
@@ -152,7 +152,7 @@ Java_hdf_hdflib_HDFLibrary_GRgetchunkinfo
 {
     int32 rval;
     HDF_CHUNK_DEF cdef;
-    jboolean stat;
+    jboolean stat = JNI_FALSE;
     jint *flgs;
     jboolean isCopy;
 
@@ -599,7 +599,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_GRfindattr
 (JNIEnv *env, jclass cls, jlong gr_id, jstring attr_name)
 {
-    int32 rval;
+    int32 rval = -1;
     const char *str;
 
     PIN_JAVA_STRING(attr_name, str);
@@ -619,7 +619,7 @@ JNIEXPORT jlong JNICALL
 Java_hdf_hdflib_HDFLibrary_GRcreate
 (JNIEnv *env, jclass cls, jlong gr_id, jstring name, jint ncomp, jlong data_type, jint interlace_mode, jintArray dim_sizes)
 {
-    int32 rval;
+    int32 rval = -1;
     jint *dims;
     const char *str;
     jboolean bb;
diff --git a/java/src/jni/hdfr24Imp.c b/java/src/jni/hdfr24Imp.c
index 8443c3e..460fee2 100644
--- a/java/src/jni/hdfr24Imp.c
+++ b/java/src/jni/hdfr24Imp.c
@@ -175,7 +175,7 @@ Java_hdf_hdflib_HDFLibrary_DF24nimages
 (JNIEnv *env, jclass clss, jstring hdfFile)
 {
     const char  *hdf_file;
-    intn retVal;
+    intn retVal = -1;
 
     PIN_JAVA_STRING(hdfFile, hdf_file);
 
diff --git a/java/src/jni/hdfr8Imp.c b/java/src/jni/hdfr8Imp.c
index 68d7c4d..efe7ee5 100644
--- a/java/src/jni/hdfr8Imp.c
+++ b/java/src/jni/hdfr8Imp.c
@@ -213,7 +213,7 @@ Java_hdf_hdflib_HDFLibrary_DFR8nimages
 (JNIEnv *env, jclass clss, jstring hdfFile)
 {
     const char  *hdf_file;
-    int retVal;
+    int retVal = -1;
 
     PIN_JAVA_STRING(hdfFile, hdf_file);
 
diff --git a/java/src/jni/hdfsdsImp.c b/java/src/jni/hdfsdsImp.c
index e3a8e25..4537da4 100644
--- a/java/src/jni/hdfsdsImp.c
+++ b/java/src/jni/hdfsdsImp.c
@@ -37,7 +37,7 @@ JNIEXPORT jlong JNICALL
 Java_hdf_hdflib_HDFLibrary_SDstart
 (JNIEnv *env, jclass clss, jstring filename, jint access)
 {
-    int32 sdid;
+    int32 sdid = -1;
     const char  *fname;
 
     PIN_JAVA_STRING(filename, fname);
@@ -121,7 +121,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_SDnametoindex
 (JNIEnv *env, jclass clss, jlong sdid, jstring name)
 {
-    intn rval;
+    intn rval = -1;
     const char *str;
     int32 id = (int32)sdid;
 
@@ -823,7 +823,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_SDfindattr
 (JNIEnv *env, jclass clss, jlong sdsid, jstring name)
 {
-    int32 rval;
+    int32 rval = -1;
     const char *str;
     int32 id = (int32)sdsid;
 
@@ -1221,7 +1221,7 @@ JNIEXPORT jlong JNICALL
 Java_hdf_hdflib_HDFLibrary_SDcreate
 (JNIEnv *env, jclass clss, jlong sd_id, jstring name, jlong number_type, jint rank, jintArray dimsizes)
 {
-    int32 rval;
+    int32 rval = -1;
     const char *str;
     jint *dims;
     jboolean isCopy;
diff --git a/java/src/jni/hdfstructsutil.c b/java/src/jni/hdfstructsutil.c
index ad44d74..4782d11 100644
--- a/java/src/jni/hdfstructsutil.c
+++ b/java/src/jni/hdfstructsutil.c
@@ -1,14 +1,14 @@
-/****************************************************************************
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  * Copyright by The HDF Group.                                               *
  * Copyright by the Board of Trustees of the University of Illinois.         *
  * All rights reserved.                                                      *
  *                                                                           *
- * This file is part of HDF Java Products. The full HDF Java copyright       *
- * notice, including terms governing use, modification, and redistribution,  *
- * is contained in the file, COPYING.  COPYING can be found at the root of   *
- * the source code distribution tree. You can also access it online  at      *
- * http://www.hdfgroup.org/products/licenses.html.  If you do not have       *
- * access to the file, you may request a copy from help at hdfgroup.org.        *
+ * This file is part of HDF.  The full HDF copyright notice, including       *
+ * terms governing use, modification, and redistribution, is contained in    *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  ****************************************************************************/
 /*
  *  This module contains code to translate between the HDF C union 'comp_info'
diff --git a/java/src/jni/hdfvdataImp.c b/java/src/jni/hdfvdataImp.c
index 1ee10a2..7cd39f8 100644
--- a/java/src/jni/hdfvdataImp.c
+++ b/java/src/jni/hdfvdataImp.c
@@ -32,7 +32,7 @@ JNIEXPORT jlong JNICALL
 Java_hdf_hdflib_HDFLibrary_VSattach
 (JNIEnv *env, jclass clss, jlong fid, jint vdata_ref, jstring accessmode)
 {
-    int32          retVal;
+    int32          retVal = -1;
     const char    *access;
     HFILEID        id = (HFILEID)fid;
 
@@ -234,7 +234,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_VSfind
 (JNIEnv *env, jclass clss, jlong vdata_id, jstring fieldname)
 {
-    int32 retVal;
+    int32 retVal = -1;
     const char  *fldName;
 
     PIN_JAVA_STRING(fieldname, fldName);
@@ -286,7 +286,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_VSgetfields
 (JNIEnv *env, jclass clss, jlong vdata_id, jobjectArray fields)
 {
-    int retVal;
+    int retVal = -1;
     jclass jc;
     char *flds;
     jstring rstring;
@@ -500,7 +500,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_VSlone
 (JNIEnv *env, jclass clss, jlong fid, jintArray ref_array, jint arraysize)
 {
-    int retVal;
+    int retVal = -1;
     jint * arr;
     jboolean bb;
 
@@ -534,7 +534,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_VSread
 (JNIEnv *env, jclass clss, jlong vdata_id, jbyteArray databuf, jint nrecords, jint interlace)
 {
-    int32   retVal;
+    int32   retVal = -1;
     jbyte  * data;
     jboolean bb;
 
@@ -617,7 +617,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_VSsizeof
 (JNIEnv *env, jclass clss, jlong vdata_id, jstring fields)
 {
-    int32 retVal;
+    int32 retVal = -1;
     const char *fldPtr;
 
     PIN_JAVA_STRING(fields, fldPtr);
@@ -659,7 +659,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_VSfindclass
 (JNIEnv *env, jclass clss, jlong vdata_id, jstring hdfclassname)
 {
-    int32 rval;
+    int32 rval = -1;
     const char *string;
 
     PIN_JAVA_STRING(hdfclassname, string);
@@ -776,7 +776,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_VSwrite
 (JNIEnv *env, jclass clss, jlong vdata_id, jbyteArray databuf, jint n_records, jint interlace)
 {
-    int32 rval;
+    int32 rval = -1;
     jbyte *b;
     jboolean bb;
 
@@ -920,7 +920,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_VSfindattr
 (JNIEnv *env, jclass clss, jlong id, jint index, jstring name)
 {
-    int32 retVal;
+    int32 retVal = -1;
     const char  *cname;
 
     PIN_JAVA_STRING(name, cname);
diff --git a/java/src/jni/hdfvgroupImp.c b/java/src/jni/hdfvgroupImp.c
index 884f446..4fe69d8 100644
--- a/java/src/jni/hdfvgroupImp.c
+++ b/java/src/jni/hdfvgroupImp.c
@@ -46,7 +46,7 @@ JNIEXPORT jlong JNICALL
 Java_hdf_hdflib_HDFLibrary_Vattach
 (JNIEnv *env, jclass clss, jlong fid, jint vgroup_ref, jstring accessmode)
 {
-    int   retVal;
+    int   retVal = -1;
     const char  *access;
     HFILEID        id = (HFILEID)fid;
 
@@ -250,7 +250,7 @@ Java_hdf_hdflib_HDFLibrary_Vgettagrefs
 {
     jint *tagVal;
     jint *refVal;
-    int32 retVal;
+    int32 retVal = -1;
     int copyMode = JNI_ABORT;
 
     jboolean iscopy;
@@ -368,7 +368,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_Vlone
 (JNIEnv *env, jclass clss, jlong fid, jintArray ref_array, jint arraysize)
 {
-    int retVal;
+    int retVal = -1;
     jint * arr;
     jboolean bb;
 
@@ -441,7 +441,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_Vfind
 (JNIEnv *env, jclass clss, jlong file_id, jstring vgname)
 {
-    int32 rval;
+    int32 rval = -1;
     const char * vgn;
 
     PIN_JAVA_STRING(vgname, vgn);
@@ -463,7 +463,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_Vfindclass
 (JNIEnv *env, jclass clss, jlong file_id, jstring vgclassname)
 {
-    int32 rval;
+    int32 rval = -1;
     const char * vgcn;
 
     PIN_JAVA_STRING(vgclassname, vgcn);
@@ -484,7 +484,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_Vflocate
 (JNIEnv *env, jclass clss, jint key, jstring field)
 {
-    int32 rval;
+    int32 rval = -1;
     const char * fld;
 
     PIN_JAVA_STRING(field, fld);
@@ -621,7 +621,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_Vopen
 (JNIEnv *env, jclass clss, jstring filename, jint access, jshort ndds)
 {
-    intn rval;
+    intn rval = -1;
     const char * str;
 
     PIN_JAVA_STRING(filename, str);
@@ -751,7 +751,7 @@ JNIEXPORT jint JNICALL
 Java_hdf_hdflib_HDFLibrary_Vfindattr
 (JNIEnv *env, jclass clss, jlong id, jstring name)
 {
-    int32 retVal;
+    int32 retVal = -1;
     const char  *cname;
 
     PIN_JAVA_STRING(name, cname);
diff --git a/java/src/jni/hdfvhImp.c b/java/src/jni/hdfvhImp.c
index 45915d9..d8438b5 100644
--- a/java/src/jni/hdfvhImp.c
+++ b/java/src/jni/hdfvhImp.c
@@ -59,7 +59,7 @@ Java_hdf_hdflib_HDFLibrary_VHmakegroup
                 } /* end if */
                 else {
                     rval = VHmakegroup((int32)file_id, (int32 *)tags, (int32 *)refs,
-                        (int32)n_objects, (char *)vname, (char *)vcls);
+                        (int32)n_objects, vname, vcls);
                     if (rval < 0)
                         CALL_ERROR_CHECK();
 
@@ -96,9 +96,9 @@ Java_hdf_hdflib_HDFLibrary_VHstoredata
                 h4JNIFatalError(env, "VHstoredatam:  buf not pinned");
             } /* end if */
             else {
-                rval = VHstoredata((int32) file_id, (char *)fldname,
+                rval = VHstoredata((int32) file_id, fldname,
                     (uint8 *)buffer, (int32)n_records, (int32)data_type,
-                    (char *)vname, (char *)vcls);
+                    vname, vcls);
                 if (rval < 0)
                     CALL_ERROR_CHECK();
             }
@@ -114,12 +114,14 @@ Java_hdf_hdflib_HDFLibrary_VHstoredatam
 (JNIEnv *env, jclass oclass, jlong file_id, jstring fieldname, jbyteArray buf, jint n_records,
         jint data_type, jstring vdata_name, jstring vdata_class, jint order)
 {
+    int len;
     int32 rval;
     jbyte *buffer;
     const char *fldname;
     const char *vname;
     const char *vcls;
     jboolean bb;
+    HFILEID fid = (int32)file_id;
 
     PIN_JAVA_STRING_THREE(fieldname, fldname, vdata_name, vname, vdata_class, vcls);
     if (fldname != NULL && vname != NULL && vcls != NULL) {
@@ -132,9 +134,9 @@ Java_hdf_hdflib_HDFLibrary_VHstoredatam
                 h4JNIFatalError(env, "VHstoredatam:  buf not pinned");
             } /* end if */
             else {
-                rval = VHstoredatam((int32)file_id, (char *)fldname,
-                    (uint8 *)buffer, (int32)n_records, (int32)data_type,
-                    (char *)vname, (char *)vcls, (int32)order);
+                rval = VHstoredatam(fid, fldname,
+                    (const uint8 *)buffer, (int32)n_records, (int32)data_type,
+                    vname, vcls, (int32)order);
                 if (rval < 0)
                     CALL_ERROR_CHECK();
 
diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt
index 2123427..0393e16 100644
--- a/java/test/CMakeLists.txt
+++ b/java/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 PROJECT (HDF4_JAVA_TEST Java)
 
 set (CMAKE_VERBOSE_MAKEFILE 1)
@@ -52,24 +52,28 @@ foreach (h4_file ${HDF_JAVA_TEST_FILES})
       COMMAND    ${CMAKE_COMMAND}
       ARGS       -E copy_if_different ${PROJECT_SOURCE_DIR}/${h4_file} ${dest}
   )
-endforeach (h4_file ${HDF_JAVA_TEST_FILES})
+endforeach ()
 
 if (WIN32)
   set (CMAKE_JAVA_INCLUDE_FLAG_SEP ";")
-else (WIN32)
+else ()
   set (CMAKE_JAVA_INCLUDE_FLAG_SEP ":")
-endif (WIN32)
+endif ()
 
 set (CMAKE_JAVA_CLASSPATH ".")
 foreach (CMAKE_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH})
   set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${CMAKE_INCLUDE_PATH}")
-endforeach (CMAKE_INCLUDE_PATH)
+endforeach ()
 set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${HDF4_JAVA_TEST_LIB_TARGET}_JAR_FILE}")
 set (testfilter "OK (598 tests)")
 
 if (CMAKE_BUILD_TYPE MATCHES Debug)
-  set (CMD_ARGS "-Dhdf.hdflib.HDFLibrary.loadLibraryName=hdf_java_debug;")
-endif(CMAKE_BUILD_TYPE MATCHES Debug)
+  if (WIN32)
+    set (CMD_ARGS "-Dhdf.hdflib.HDFLibrary.loadLibraryName=hdf_java_D;")
+  else()
+    set (CMD_ARGS "-Dhdf.hdflib.HDFLibrary.loadLibraryName=hdf_java_debug;")
+  endif()
+endif()
 
 add_test (
   NAME JUnit-interface-clearall-objects
diff --git a/java/test/Makefile.in b/java/test/Makefile.in
index eefa718..fdcae10 100644
--- a/java/test/Makefile.in
+++ b/java/test/Makefile.in
@@ -392,6 +392,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/libhdf4.settings.in b/libhdf4.settings.in
index a932410..6ce1bef 100644
--- a/libhdf4.settings.in
+++ b/libhdf4.settings.in
@@ -33,7 +33,7 @@ Languages:
 @HDF_BUILD_FORTRAN_TRUE@                         FFLAGS: @FFLAGS@
 
                            Java: @HDF_JAVA@
- at BUILD_JAVA_CONDITIONAL_TRUE@             Java Compiler: @JAVA_VERSION@
+ at BUILD_JAVA_CONDITIONAL_TRUE@                  Java Compiler: @JAVA_VERSION@
 
 Features:
 ---------
diff --git a/man/Makefile.in b/man/Makefile.in
index dbafc3a..8e3585f 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -214,6 +214,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/man/hdf.1 b/man/hdf.1
index 3c1b7d9..be59c30 100644
--- a/man/hdf.1
+++ b/man/hdf.1
@@ -1,5 +1,5 @@
-.\" $Id: hdf.1 6473 2016-06-24 21:38:14Z bmribler $
-.TH HDF 1 "June 2016" "THG HDF 4.2.12"
+.\" $Id$
+.TH HDF 1 "June 2017" "THG HDF 4.2.13"
 .SH NAME
 hdf \- Hierarchical Data Format library
 .SH SYNOPSIS
@@ -135,7 +135,7 @@ USA
 www.hdfgroup.org
 
 .SH VERSION
-4.2.12 
+4.2.13 
 .SH LICENSE & SOURCE AVAILABILITY
 Copyright by The HDF Group.
 .sp 0
@@ -145,12 +145,10 @@ All rights reserved.
 
 This file is part of HDF.  The full HDF 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
-.sp 0
-http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have
-access to either file, you may request a copy from 
+the COPYING file, which can be found at the root of the source code
+distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.
 .sp 0
+If you do not have access to either file, you may request a copy from
 help at hdfgroup.org.
 
 .SH CONTACT & HELP
diff --git a/man/hdfunpac.1 b/man/hdfunpac.1
index 81b1012..6f5d83e 100644
--- a/man/hdfunpac.1
+++ b/man/hdfunpac.1
@@ -1,4 +1,4 @@
-.\" $Id: hdfunpac.1 1802 1995-07-25 01:53:23Z sxu $
+.\" $Id$
 .TH HDFUNPAC 1 "July 1995" "NCSA HDF 4.0"
 .SH NAME
 hdfunpac \- Unpack an HDF file
diff --git a/mfhdf/CMakeLists.txt b/mfhdf/CMakeLists.txt
index 16e5164..ba6a719 100644
--- a/mfhdf/CMakeLists.txt
+++ b/mfhdf/CMakeLists.txt
@@ -1,12 +1,6 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 PROJECT (HDF4_MFHDF)
 
-if (CYGWIN)
-  INCLUDE_DIRECTORIES (/usr/include/tirpc)
-else (CYGWIN)
-  INCLUDE_DIRECTORIES (/usr/include/rpc)
-endif (CYGWIN)
-
 #-----------------------------------------------------------------------------
 # Option to build HDF4 Tools
 #-----------------------------------------------------------------------------
@@ -22,6 +16,6 @@ if (EXISTS "${HDF4_MFHDF_SOURCE_DIR}/dumper" AND IS_DIRECTORY "${HDF4_MFHDF_SOUR
     add_subdirectory (${HDF4_MFHDF_SOURCE_DIR}/ncdump      ${HDF4_MFHDF_BINARY_DIR}/ncdump)
     if (BUILD_TESTING)
       add_subdirectory (${HDF4_MFHDF_SOURCE_DIR}/nctest    ${HDF4_MFHDF_BINARY_DIR}/nctest)
-    endif (BUILD_TESTING )
-  endif (HDF4_BUILD_TOOLS)
-endif (EXISTS "${HDF4_MFHDF_SOURCE_DIR}/dumper" AND IS_DIRECTORY "${HDF4_MFHDF_SOURCE_DIR}/dumper")
+    endif ( )
+  endif ()
+endif ()
diff --git a/mfhdf/Makefile.in b/mfhdf/Makefile.in
index d53ecac..6d759f5 100644
--- a/mfhdf/Makefile.in
+++ b/mfhdf/Makefile.in
@@ -243,6 +243,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/mfhdf/dumper/CMakeLists.txt b/mfhdf/dumper/CMakeLists.txt
index cf7dcf4..401bda0 100644
--- a/mfhdf/dumper/CMakeLists.txt
+++ b/mfhdf/dumper/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 project (HDF4_MFHDF_DUMPER)
 
 INCLUDE_DIRECTORIES (${HDF4_HDFSOURCE_DIR})
@@ -22,24 +22,25 @@ set (hdp_SRCS
 add_executable (hdp ${hdp_SRCS})
 if (WIN32)
   add_definitions (-DDOS_FS)
-endif (WIN32)
+endif ()
 if (HDF4_BUILD_XDR_LIB)
   if (WIN32)
     add_definitions (-DNO_SYS_XDR_INC)
-  endif (WIN32)
+  endif ()
   INCLUDE_DIRECTORIES (${HDF4_MFHDF_XDR_DIR})
   target_link_libraries (hdp ${HDF4_MF_XDR_LIB_TARGET})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 TARGET_C_PROPERTIES (hdp STATIC " " " ")
 target_link_libraries (hdp ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
 TARGET_NAMING (hdp STATIC)
 if (WIN32)
   set_target_properties (hdp PROPERTIES LINK_FLAGS "/STACK:10000000")
-endif (WIN32)
+endif ()
+set_global_variable (HDF4_UTILS_TO_EXPORT "${HDF4_UTILS_TO_EXPORT};hdp")
 
 if (BUILD_TESTING)
   include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
 
 ##############################################################################
 ##############################################################################
@@ -53,8 +54,10 @@ endif (BUILD_TESTING)
 
 INSTALL_PROGRAM_PDB (hdp ${HDF4_INSTALL_TOOLS_BIN_DIR} toolsapplications)
 
-INSTALL (
+install (
     TARGETS
         hdp
+    EXPORT
+        ${HDF4_EXPORTED_TARGETS}
     RUNTIME DESTINATION ${HDF4_INSTALL_TOOLS_BIN_DIR} COMPONENT toolsapplications
 )
diff --git a/mfhdf/dumper/CMakeTests.cmake b/mfhdf/dumper/CMakeTests.cmake
index c4bb661..5528036 100644
--- a/mfhdf/dumper/CMakeTests.cmake
+++ b/mfhdf/dumper/CMakeTests.cmake
@@ -4,7 +4,7 @@
 ###           T E S T I N G                                                ###
 ##############################################################################
 ##############################################################################
-  
+
   #-- Copy all the data files from the test directory into the source directory
   set (HDF4_REFERENCE_TEST_FILES
       ctxtr2r.hdf
@@ -39,7 +39,7 @@
       vslongname.hdf
       Roy.nc
   )
-  
+
   set (HDF4_REFERENCE_FILES
       dumpgr-1.out
       dumpgr-10.out
@@ -128,17 +128,17 @@
       list-8.out
       list-9.out
   )
- 
+
   foreach (h4_file ${HDF4_REFERENCE_TEST_FILES})
     set (dest "${PROJECT_BINARY_DIR}/${h4_file}")
     #message (STATUS " Copying ${HDF4_MFHDF_DUMPER_SOURCE_DIR}/testfiles/${h4_file} to ${PROJECT_BINARY_DIR}/")
     ADD_CUSTOM_COMMAND (
-        TARGET     hdp 
+        TARGET     hdp
         POST_BUILD
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_MFHDF_DUMPER_SOURCE_DIR}/testfiles/${h4_file} ${dest}
     )
-  endforeach (h4_file ${HDF4_REFERENCE_TEST_FILES})
+  endforeach ()
 
   foreach (out_file ${HDF4_REFERENCE_FILES})
     set (outdest "${PROJECT_BINARY_DIR}/${out_file}")
@@ -149,8 +149,8 @@
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_MFHDF_DUMPER_SOURCE_DIR}/testfiles/${out_file} ${outdest}
     )
-  endforeach (out_file ${HDF4_REFERENCE_FILES})
-  
+  endforeach ()
+
 ##############################################################################
 ##############################################################################
 ###           T H E   T E S T S  M A C R O S                               ###
@@ -166,13 +166,13 @@
     )
     if (NOT "${last_test}" STREQUAL "")
       set_tests_properties (HDP-${resultfile}-clearall-objects PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-    else (NOT "${last_test}" STREQUAL "")
+    else ()
       set_tests_properties (HDP-${resultfile}-clearall-objects PROPERTIES LABELS ${PROJECT_NAME})
-    endif (NOT "${last_test}" STREQUAL "")
+    endif ()
 
     if (HDF4_ENABLE_USING_MEMCHECKER)
       add_test (NAME HDP-${resultfile} COMMAND $<TARGET_FILE:hdp> ${ARGN})
-    else (HDF4_ENABLE_USING_MEMCHECKER)
+    else ()
       add_test (
           NAME HDP-${resultfile}
           COMMAND "${CMAKE_COMMAND}"
@@ -184,17 +184,17 @@
               -D "TEST_REFERENCE=${resultfile}.out"
               -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
       )
-    endif (HDF4_ENABLE_USING_MEMCHECKER)
+    endif ()
     set_tests_properties (HDP-${resultfile} PROPERTIES DEPENDS HDP-${resultfile}-clearall-objects LABELS ${PROJECT_NAME})
     set (last_test "HDP-${resultfile}")
-  ENDMACRO (ADD_H4_TEST file)
+  ENDMACRO ()
 
 ##############################################################################
 ##############################################################################
 ###           T H E   T E S T S                                            ###
 ##############################################################################
 ##############################################################################
-  
+
   ADD_H4_TEST (list-1 0 list tdata.hdf)
   ADD_H4_TEST (list-2 0 list -l tdata.hdf)
   ADD_H4_TEST (list-3 0 list -d tdata.hdf)
@@ -216,7 +216,7 @@
   # Test 4 should fail with error message: "SD with name Time: not found"
   ADD_H4_TEST (dumpsds-4 0 dumpsds -n Time swf32.hdf)
 
-  # Test 5 prints datasets given their names 
+  # Test 5 prints datasets given their names
   ADD_H4_TEST (dumpsds-5 0 dumpsds -n fakeDim0,Data-Set-2 swf32.hdf)
 
   # Test 6 prints datasets given their ref numbers
@@ -243,7 +243,7 @@
   # Test 13 prints contents of file when a dimension has the same name as its SDS
   ADD_H4_TEST (dumpsds-13 0 dumpsds sds1_dim1_samename.hdf)
 
-  # Test 14 prints contents of file when a dimension has the same name as 
+  # Test 14 prints contents of file when a dimension has the same name as
   # that of another SDS
   ADD_H4_TEST (dumpsds-14 0 dumpsds sds2_dim1_samename.hdf)
 
@@ -252,9 +252,9 @@
 
   if (HDF4_ENABLE_SZIP_SUPPORT)
     ADD_H4_TEST (dumpsds-15szip 0 dumpsds sds_compressed.hdf)
-  else (HDF4_ENABLE_SZIP_SUPPORT)
+  else ()
     ADD_H4_TEST (dumpsds-15 0 dumpsds sds_compressed.hdf)
-  endif (HDF4_ENABLE_SZIP_SUPPORT)
+  endif ()
 
   # Test 16 prints SDSs in index order, by default
   ADD_H4_TEST (dumpsds-16 0 dumpsds -h -i 39,36 -n data34,data27 -r 36,37 -i 0,1 -n data6,data9,data4,data3 -r 16,17,15 -i 23,22,21 sds_empty_many.hdf)
@@ -311,7 +311,7 @@
   ADD_H4_TEST (dumpvg-8 0 dumpvg -n nsamp,tdata.hdf tdata.hdf)
   ADD_H4_TEST (dumpvg-9 0 dumpvg -c CDF0.0 tdata.hdf)
 
-  # Added option -h to the following test; this option has always 
+  # Added option -h to the following test; this option has always
   # failed; just fixed it - BMR 8/1/00
   ADD_H4_TEST (dumpvg-10 0 dumpvg -h -c Dim0.0,Var0.0 tdata.hdf)
 
@@ -321,23 +321,23 @@
   # moved test #12 up to #11, consequently - BMR 7/25/00
   ADD_H4_TEST (dumpvg-11 0 dumpvg tvattr.hdf)
 
-  # Added these two tests for the new feature: vgroup has variable length 
+  # Added these two tests for the new feature: vgroup has variable length
   # name - BMR 10/27/06
   # Note that the dumpvg-13 test searches for an SDS also
   ADD_H4_TEST (dumpvg-12 0 dumpvg VGlongname.hdf)
   ADD_H4_TEST (dumpvg-13 0 dumpvg -n "SD Vgroup - this vgroup has an sds as a member and it is actually meant to test long vgroup name" VGlongname.hdf)
 
-  # Prints contents of file when a dimension has the same name as its SDS 
+  # Prints contents of file when a dimension has the same name as its SDS
   ADD_H4_TEST (dumpvg-14 0 dumpvg sds1_dim1_samename.hdf)
 
-  # Prints contents of file when a dimension has the same name as that 
+  # Prints contents of file when a dimension has the same name as that
   # of another SDS
   ADD_H4_TEST (dumpvg-15 0 dumpvg sds2_dim1_samename.hdf)
 
 # Verify the fix for bug HDFFR-197 and a vgroup with ref=0 (some old RI stuff)
   ADD_H4_TEST (dumpvg-16 0 dumpvg -h grtdfi322.hdf)
   ADD_H4_TEST (dumpvg-17 0 dumpvg grtdfi322.hdf)
-  
+
   # Test command dumpgr
   ADD_H4_TEST (dumpgr-1 0 dumpgr grtdfui82.hdf)
   ADD_H4_TEST (dumpgr-2 0 dumpgr -i 0,1,3 grtdfui82.hdf)
@@ -349,27 +349,27 @@
   add_test (
       NAME HDP-clear-my.dat
       COMMAND    ${CMAKE_COMMAND}
-      -E remove 
+      -E remove
       my.dat
   )
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (HDP-clear-my.dat PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-  else (NOT "${last_test}" STREQUAL "")
+  else ()
     set_tests_properties (HDP-clear-my.dat PROPERTIES LABELS ${PROJECT_NAME})
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "HDP-clear-my.dat")
   ADD_H4_TEST (dumpgr-8 0 dumpgr -o mybin.dat  -b grtdfui82.hdf)
   add_test (
       NAME HDP-clear-mybin.dat
       COMMAND    ${CMAKE_COMMAND}
-      -E remove 
+      -E remove
       mybin.dat
   )
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (HDP-clear-mybin.dat PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-  else (NOT "${last_test}" STREQUAL "")
+  else ()
     set_tests_properties (HDP-clear-mybin.dat PROPERTIES LABELS ${PROJECT_NAME})
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "HDP-clear-mybin.dat")
   ADD_H4_TEST (dumpgr-9 0 dumpgr grtdfui83.hdf)
   ADD_H4_TEST (dumpgr-10 0 dumpgr grtdfui84.hdf)
@@ -380,7 +380,7 @@
 
   # Tests 13, 14, and 15 test option -h, which was not included in any
   # of the previous tests, and the new options -p and -pd, printing palette
-  # with or without palette information 
+  # with or without palette information
   ADD_H4_TEST (dumpgr-13 0 dumpgr -p Image_with_Palette.hdf)
   ADD_H4_TEST (dumpgr-14 0 dumpgr -h Image_with_Palette.hdf)
   ADD_H4_TEST (dumpgr-15 0 dumpgr -r 2,4 -pd Image_with_Palette.hdf)
diff --git a/mfhdf/dumper/Makefile.in b/mfhdf/dumper/Makefile.in
index eec9184..f9baaba 100644
--- a/mfhdf/dumper/Makefile.in
+++ b/mfhdf/dumper/Makefile.in
@@ -446,6 +446,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/mfhdf/dumper/hdp.c b/mfhdf/dumper/hdp.c
index 40e23e0..d1fd32d 100644
--- a/mfhdf/dumper/hdp.c
+++ b/mfhdf/dumper/hdp.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdp.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 #define HDP_MASTER
 #define VSET_INTERFACE
 #include "hdp.h"
diff --git a/mfhdf/dumper/hdp.h b/mfhdf/dumper/hdp.h
index 0b24d1f..0794054 100644
--- a/mfhdf/dumper/hdp.h
+++ b/mfhdf/dumper/hdp.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdp.h 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #ifndef __HDP_H
 #define __HDP_H
diff --git a/mfhdf/dumper/hdp_dump.c b/mfhdf/dumper/hdp_dump.c
index 792d332..9bba00d 100644
--- a/mfhdf/dumper/hdp_dump.c
+++ b/mfhdf/dumper/hdp_dump.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdp_dump.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #include <stdio.h>
 #include "mfhdf.h"
diff --git a/mfhdf/dumper/hdp_gr.c b/mfhdf/dumper/hdp_gr.c
index c118284..b1754a4 100644
--- a/mfhdf/dumper/hdp_gr.c
+++ b/mfhdf/dumper/hdp_gr.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdp_gr.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #include <stdio.h>
 #include "mfhdf.h"
diff --git a/mfhdf/dumper/hdp_list.c b/mfhdf/dumper/hdp_list.c
index 3e106ec..2e4ed2e 100644
--- a/mfhdf/dumper/hdp_list.c
+++ b/mfhdf/dumper/hdp_list.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdp_list.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #include "mfhdf.h"
 #include "hdp.h"
diff --git a/mfhdf/dumper/hdp_rig.c b/mfhdf/dumper/hdp_rig.c
index c20765e..e049483 100644
--- a/mfhdf/dumper/hdp_rig.c
+++ b/mfhdf/dumper/hdp_rig.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdp_rig.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #include <stdio.h>
 #include "mfhdf.h"
diff --git a/mfhdf/dumper/hdp_sds.c b/mfhdf/dumper/hdp_sds.c
index 9889c36..117475f 100644
--- a/mfhdf/dumper/hdp_sds.c
+++ b/mfhdf/dumper/hdp_sds.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdp_sds.c 6441 2016-06-14 21:31:36Z bmribler $ */
+/* $Id$ */
 
 #include <stdio.h>
 #include "mfhdf.h"
@@ -387,14 +387,10 @@ done:
       { /* Failure cleanup */
       }
     /* Normal cleanup */
-    if (edge != NULL)
-        HDfree((VOIDP) edge);
-    if (start != NULL)
-        HDfree((VOIDP) start);
-    if (left != NULL)
-        HDfree((VOIDP) left);
-    if (buf != NULL)
-        HDfree((VOIDP) buf);    
+      SAFE_FREE(edge)
+      SAFE_FREE(start)
+      SAFE_FREE(left)
+      SAFE_FREE(buf)
 
     return ret_value;
 }	/* sdsdumpfull */
@@ -647,37 +643,47 @@ intn print_SDSattrs( int32 sds_id,
             have to break the current loop and continue to the next item */
          resetBuff( &attr_buf );
 
-	 /* allocate space for attribute's values */
-	 attr_buf = (VOIDP) HDmalloc(attr_buf_size);
-	 CHECK_ALLOC( attr_buf, "attr_buf", "print_SDSattrs" );
+        /* allocate space for attribute's values */
+        attr_buf = (VOIDP) HDmalloc(attr_buf_size);
+        CHECK_ALLOC( attr_buf, "attr_buf", "print_SDSattrs" );
 
-	 /* read the values of the attribute into buffer attr_buf */
-	 status = SDreadattr(sds_id, attr_index, attr_buf);
-	 if (status == FAIL)
+        /* read the values of the attribute into buffer attr_buf */
+        status = SDreadattr(sds_id, attr_index, attr_buf);
+        if (status == FAIL)
+        {
+            HDfree(attr_buf);
             ERROR_CONT_2( "in %s: SDreadattr failed for %d'th attribute", 
-			"print_SDSattrs", (int)attr_index );
+			              "print_SDSattrs", (int)attr_index );
+        }
 
-	 fprintf(fp, "\t\t Value = ");
+        fprintf(fp, "\t\t Value = ");
 
-	 /* if the user wishes to have clean output, i.e. option -c is 
-	    selected - Note that this option is only applicable to DFNT_CHAR 
-	    type, the option will be ignored for other types */
-	 if( dumpsds_opts->clean_output && attr_nt == DFNT_CHAR )
-	 {
+        /* if the user wishes to have clean output, i.e. option -c is 
+        selected - Note that this option is only applicable to DFNT_CHAR 
+        type, the option will be ignored for other types */
+        if( dumpsds_opts->clean_output && attr_nt == DFNT_CHAR )
+        {
             status = dumpclean(attr_nt, dumpsds_opts, attr_count, attr_buf, fp);
             if( status == FAIL )
+            {
+                HDfree(attr_buf);
                 ERROR_CONT_2( "in %s: dumpclean failed for %d'th attribute", 
-			"print_SDSattrs", (int)attr_index );
-	 }
-	 else  /* show tab, lf, null char... in octal as \011, \012, \000... */
-	 {
+			                  "print_SDSattrs", (int)attr_index );
+            }
+        }
+        else  /* show tab, lf, null char... in octal as \011, \012, \000... */
+        {
             status = dumpfull(attr_nt, dumpsds_opts, attr_count, attr_buf, fp,
 				ATTR_INDENT, ATTR_CONT_INDENT );
             if( status == FAIL )
+            {
+                HDfree(attr_buf);
                 ERROR_CONT_2( "in %s: dumpfull failed for %d'th attribute", 
-			"print_SDSattrs", (int)attr_index );
-	 }
+			                  "print_SDSattrs", (int)attr_index );
+            }
+        }
       }  /* end of if no local attributes */
+      SAFE_FREE(attr_buf);
    } /* for each attribute */
 
    return( ret_value );
@@ -1231,11 +1237,7 @@ intn dsd(dump_info_t *dumpsds_opts,
          next file */
       if (index_error && num_sds_chosen == 0)
       {
-         if(sds_chosen!=NULL)
-         {
-            HDfree(sds_chosen);
-            sds_chosen=NULL;
-         } /* end if */
+         SAFE_FREE(sds_chosen)
          if( FAIL == SDend(sd_id))
             fprintf( stderr, "in dsd: SDend failed in closing file %s\n",
 			file_name );
@@ -1390,11 +1392,7 @@ intn dsd(dump_info_t *dumpsds_opts,
             printf("Output file type must be either ascii or binary only\n");
       } /* switch for output file */
 
-      if (sds_chosen != NULL)
-      {
-         HDfree(sds_chosen);
-         sds_chosen = NULL;
-      } /* end if */
+      SAFE_FREE(sds_chosen)
 
       if (FAIL == SDend(sd_id))
          ERROR_CONT_1( "in dsd: SDend failed for file %s", file_name );
diff --git a/mfhdf/dumper/hdp_util.c b/mfhdf/dumper/hdp_util.c
index 46a1328..b669f34 100644
--- a/mfhdf/dumper/hdp_util.c
+++ b/mfhdf/dumper/hdp_util.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /* hdp_util.c,v 1.1 1994/04/18 15:49:18 georgev Exp */
diff --git a/mfhdf/dumper/hdp_vd.c b/mfhdf/dumper/hdp_vd.c
index a236289..192e6ee 100644
--- a/mfhdf/dumper/hdp_vd.c
+++ b/mfhdf/dumper/hdp_vd.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdp_vd.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #include "hdp.h"
 #ifndef MIPSEL
diff --git a/mfhdf/dumper/hdp_vg.c b/mfhdf/dumper/hdp_vg.c
index 0df7e74..ab87300 100644
--- a/mfhdf/dumper/hdp_vg.c
+++ b/mfhdf/dumper/hdp_vg.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdp_vg.c 6357 2016-05-13 05:00:06Z bmribler $ */
+/* $Id$ */
 
 #include "hdp.h"
 #ifndef MIPSEL
diff --git a/mfhdf/dumper/show.c b/mfhdf/dumper/show.c
index 8fecd0c..e5fd827 100644
--- a/mfhdf/dumper/show.c
+++ b/mfhdf/dumper/show.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /* Modified from vshow.c by Eric Tsui, 12/25/1994. */
diff --git a/mfhdf/dumper/testfiles/vslongname.c b/mfhdf/dumper/testfiles/vslongname.c
index 0cb0858..752044a 100644
--- a/mfhdf/dumper/testfiles/vslongname.c
+++ b/mfhdf/dumper/testfiles/vslongname.c
@@ -4,10 +4,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /* Creating vdatas with names and classes that are longer than 64 characters
diff --git a/mfhdf/dumper/testhdp.sh.in b/mfhdf/dumper/testhdp.sh.in
index 3b1b439..585bbfc 100644
--- a/mfhdf/dumper/testhdp.sh.in
+++ b/mfhdf/dumper/testhdp.sh.in
@@ -1,5 +1,5 @@
 #! /bin/sh
-# $Id: testhdp.sh.in 6441 2016-06-14 21:31:36Z bmribler $
+# $Id$
 # Test scripts for hdp (dumper).
 # See the USAGE function for command usage.
 
diff --git a/mfhdf/examples/CMakeLists.txt b/mfhdf/examples/CMakeLists.txt
index 617d46d..0cdff6b 100644
--- a/mfhdf/examples/CMakeLists.txt
+++ b/mfhdf/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 project (HDF4_MFHDF_EXAMPLES)
 
 #-----------------------------------------------------------------------------
@@ -29,11 +29,11 @@ foreach (example ${examples})
   TARGET_C_PROPERTIES (mf_${example} STATIC " " " ")
   if (HDF4_BUILD_XDR_LIB)
     target_link_libraries (mf_${example} ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS} ${HDF4_MF_XDR_LIB_TARGET})
-  else (HDF4_BUILD_XDR_LIB)
+  else ()
     target_link_libraries (mf_${example} ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-  endif (HDF4_BUILD_XDR_LIB)
+  endif ()
 endforeach (example ${examples})
 
 if (BUILD_TESTING)
   include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
diff --git a/mfhdf/examples/CMakeTests.cmake b/mfhdf/examples/CMakeTests.cmake
index c959a36..278de33 100644
--- a/mfhdf/examples/CMakeTests.cmake
+++ b/mfhdf/examples/CMakeTests.cmake
@@ -9,7 +9,7 @@
 add_test (
     NAME MFHDF_EXAMPLES-clearall-objects
     COMMAND    ${CMAKE_COMMAND}
-        -E remove 
+        -E remove
         SDS.hdf
         SDSchunked.hdf
         SDScompressed.hdf
@@ -24,8 +24,8 @@ foreach (example ${examples})
   add_test (NAME MFHDF_EXAMPLES-${example} COMMAND $<TARGET_FILE:mf_${example}>)
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (MFHDF_EXAMPLES-${example} PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-  else (NOT "${last_test}" STREQUAL "")
+  else ()
     set_tests_properties (MFHDF_EXAMPLES-${example} PROPERTIES LABELS ${PROJECT_NAME})
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "MFHDF_EXAMPLES-${example}")
-endforeach (example ${examples})
+endforeach ()
diff --git a/mfhdf/examples/Makefile.am b/mfhdf/examples/Makefile.am
index affa165..70f61a7 100644
--- a/mfhdf/examples/Makefile.am
+++ b/mfhdf/examples/Makefile.am
@@ -23,7 +23,7 @@ INSTALL_FILES = SD_create_sds.c SD_write_to_sds.c SD_write_slab.c        \
 	SD_get_info.c SD_find_sds_by_name.c SD_set_get_dim_info.c        \
 	SD_dimscale_vs_sds.c SD_set_attr.c SD_get_attr.c SD_chunking_example.c
 
-EXAMPLEDIR=${DESTDIR}$(prefix)/examples/c
+EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf4_examples/c
 
 # How to build programs using h4cc
 $(EXTRA_PROG): $(H4CC)
diff --git a/mfhdf/examples/Makefile.in b/mfhdf/examples/Makefile.in
index b8767bb..835c24b 100644
--- a/mfhdf/examples/Makefile.in
+++ b/mfhdf/examples/Makefile.in
@@ -396,6 +396,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
@@ -538,7 +539,7 @@ INSTALL_FILES = SD_create_sds.c SD_write_to_sds.c SD_write_slab.c        \
 	SD_get_info.c SD_find_sds_by_name.c SD_set_get_dim_info.c        \
 	SD_dimscale_vs_sds.c SD_set_attr.c SD_get_attr.c SD_chunking_example.c
 
-EXAMPLEDIR = ${DESTDIR}$(prefix)/examples/c
+EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf4_examples/c
 DISTCLEANFILES = *.chklog *.chkexe .deps
 @BUILD_SHARED_SZIP_CONDITIONAL_TRUE at LD_LIBRARY_PATH = $(LL_PATH)
 
diff --git a/mfhdf/fortran/CMakeLists.txt b/mfhdf/fortran/CMakeLists.txt
index 401a46b..49a9a25 100644
--- a/mfhdf/fortran/CMakeLists.txt
+++ b/mfhdf/fortran/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 PROJECT (HDF4_MFHDF_FORTRAN C CXX Fortran)
 
 INCLUDE_DIRECTORIES (
@@ -9,24 +9,18 @@ INCLUDE_DIRECTORIES (
     ${HDF4_HDF_TESTSOURCE_DIR}
 )
 
-if (CYGWIN)
-  INCLUDE_DIRECTORIES (/usr/include/tirpc)
-else (CYGWIN)
-  INCLUDE_DIRECTORIES (/usr/include/rpc)
-endif (CYGWIN)
-
 if (HDF4_ENABLE_NETCDF)
   configure_file (${HDF4_MFHDF_FORTRAN_SOURCE_DIR}/ftest.f.in ${HDF4_BINARY_DIR}/ftest.f)
   configure_file (${HDF4_MFHDF_FORTRAN_SOURCE_DIR}/jackets.c.in ${HDF4_BINARY_DIR}/jackets.c)
-endif (HDF4_ENABLE_NETCDF)
+endif ()
 configure_file (${HDF4_MFHDF_FORTRAN_SOURCE_DIR}/netcdf.inc.in ${HDF4_BINARY_DIR}/netcdf.inc)
 set (HDF4_MFHDF_FORTRAN_XFHDRS ${HDF4_BINARY_DIR}/netcdf.inc ${HDF4_MFHDF_FORTRAN_SOURCE_DIR}/mffunc.inc)
 
 if (HDF4_ENABLE_NETCDF)
   set (HDF4_MFHDF_LIBSRC_CSTUB_FSRCS ${HDF4_BINARY_DIR}/jackets.c ${HDF4_MFHDF_FORTRAN_SOURCE_DIR}/mfsdf.c)
-else (HDF4_ENABLE_NETCDF)
+else ()
   set (HDF4_MFHDF_LIBSRC_CSTUB_FSRCS ${HDF4_MFHDF_FORTRAN_SOURCE_DIR}/mfsdf.c)
-endif (HDF4_ENABLE_NETCDF)
+endif ()
 
 set (HDF4_MFHDF_LIBSRC_CSTUB_FHDRS
     ${HDF4_MFHDFSOURCE_DIR}/hdf2netcdf.h
@@ -36,9 +30,9 @@ set (HDF4_MFHDF_LIBSRC_CSTUB_FHDRS
 if (HDF4_ENABLE_NETCDF)
 #  set (HDF4_MFHDF_LIBSRC_CSTUB_FSRCS ${HDF4_MFHDF_LIBSRC_CSTUB_FSRCS} ${HDF4_BINARY_DIR}/jackets.c)
   set (HDF4_MFHDF_LIBSRC_CSTUB_FHDRS ${HDF4_MFHDF_LIBSRC_CSTUB_FHDRS} ${HDF4_BINARY_DIR}/netcdf.h)
-else (HDF4_ENABLE_NETCDF)
+else ()
   set (HDF4_MFHDF_LIBSRC_CSTUB_FHDRS ${HDF4_MFHDF_LIBSRC_CSTUB_FHDRS} ${HDF4_BINARY_DIR}/hdf4_netcdf.h)
-endif (HDF4_ENABLE_NETCDF)
+endif ()
 set_source_files_properties (${HDF4_MFHDF_LIBSRC_CSTUB_FSRCS} PROPERTIES LANGUAGE C)
 
 set (FORTRAN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
@@ -50,7 +44,7 @@ add_library (${HDF4_MF_FCSTUB_LIB_TARGET} STATIC ${HDF4_MFHDF_LIBSRC_CSTUB_FSRCS
 if (HDF4_BUILD_XDR_LIB)
   INCLUDE_DIRECTORIES (${HDF4_MFHDF_XDR_DIR})
   target_link_libraries (${HDF4_MF_FCSTUB_LIB_TARGET} ${HDF4_MF_XDR_LIB_TARGET})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 TARGET_C_PROPERTIES (${HDF4_MF_FCSTUB_LIB_TARGET} STATIC " " " ")
 target_link_libraries (${HDF4_MF_FCSTUB_LIB_TARGET} ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET})
 set_global_variable (HDF4_LIBRARIES_TO_EXPORT "${HDF4_LIBRARIES_TO_EXPORT};${HDF4_MF_FCSTUB_LIB_TARGET}")
@@ -65,8 +59,8 @@ if (WIN32)
   set_property (TARGET ${HDF4_MF_FCSTUB_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "DOS_FS")
   if (HDF4_BUILD_XDR_LIB)
     set_property (TARGET ${HDF4_MF_FCSTUB_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "NO_SYS_XDR_INC")
-  endif (HDF4_BUILD_XDR_LIB)
-endif (WIN32)
+  endif ()
+endif ()
 set (install_targets ${HDF4_MF_FCSTUB_LIB_TARGET})
 
 if (BUILD_SHARED_LIBS)
@@ -74,7 +68,7 @@ if (BUILD_SHARED_LIBS)
   if (HDF4_BUILD_XDR_LIB)
     INCLUDE_DIRECTORIES (${HDF4_MFHDF_XDR_DIR})
     target_link_libraries (${HDF4_MF_FCSTUB_LIBSH_TARGET} ${HDF4_MF_XDR_LIBSH_TARGET})
-  endif (HDF4_BUILD_XDR_LIB)
+  endif ()
   TARGET_C_PROPERTIES (${HDF4_MF_FCSTUB_LIBSH_TARGET} SHARED " " " ")
   target_link_libraries (${HDF4_MF_FCSTUB_LIBSH_TARGET} ${HDF4_MF_LIBSH_TARGET} ${HDF4_SRC_LIBSH_TARGET})
   set_global_variable (HDF4_LIBRARIES_TO_EXPORT "${HDF4_LIBRARIES_TO_EXPORT};${HDF4_MF_FCSTUB_LIBSH_TARGET}")
@@ -90,10 +84,10 @@ if (BUILD_SHARED_LIBS)
     set_property (TARGET ${HDF4_MF_FCSTUB_LIBSH_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "DOS_FS")
     if (HDF4_BUILD_XDR_LIB)
       set_property (TARGET ${HDF4_MF_FCSTUB_LIBSH_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "NO_SYS_XDR_INC")
-    endif (HDF4_BUILD_XDR_LIB)
-  endif (WIN32)
+    endif ()
+  endif ()
   set (install_targets ${install_targets} ${HDF4_MF_FCSTUB_LIBSH_TARGET})
-endif (BUILD_SHARED_LIBS)
+endif ()
 
 set (HDF4_MF_FORTRAN_SRCS
     ${HDF4_MFHDF_FORTRAN_DIR}/mfsdff.f
@@ -114,7 +108,7 @@ set_target_properties (${HDF4_MF_FORTRAN_LIB_TARGET} PROPERTIES
 )
 if (WIN32)
   set_property (TARGET ${HDF4_MF_FORTRAN_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "DOS_FS")
-endif (WIN32)
+endif ()
 set (install_targets ${install_targets} ${HDF4_MF_FORTRAN_LIB_TARGET})
 
 if (BUILD_SHARED_LIBS)
@@ -122,7 +116,7 @@ if (BUILD_SHARED_LIBS)
   set (SHARED_LINK_FLAGS " ")
   if (WIN32 AND MSVC)
     set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF4_MFHDF_FORTRAN_SOURCE_DIR}/mfhdf_fortrandll.def")
-  endif (WIN32 AND MSVC)
+  endif ()
   TARGET_FORTRAN_PROPERTIES (${HDF4_MF_FORTRAN_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS})
   target_link_libraries (${HDF4_MF_FORTRAN_LIBSH_TARGET} ${HDF4_MF_FCSTUB_LIBSH_TARGET} ${LINK_SHARED_LIBS})
   set_global_variable (HDF4_LIBRARIES_TO_EXPORT "${HDF4_LIBRARIES_TO_EXPORT};${HDF4_MF_FORTRAN_LIBSH_TARGET}")
@@ -137,13 +131,13 @@ if (BUILD_SHARED_LIBS)
   )
   if (WIN32)
     set_property (TARGET ${HDF4_MF_FORTRAN_LIBSH_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "DOS_FS")
-  endif (WIN32)
+  endif ()
   set (install_targets ${install_targets} ${HDF4_MF_FORTRAN_LIBSH_TARGET})
-endif (BUILD_SHARED_LIBS)
+endif ()
 
 if (BUILD_TESTING)
   include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Add file(s) to CMake Install
@@ -164,6 +158,7 @@ if (BUILD_SHARED_LIBS)
   INSTALL_TARGET_PDB (${HDF4_MF_FCSTUB_LIBSH_TARGET} ${HDF4_INSTALL_BIN_DIR} fortlibraries)
   #INSTALL_TARGET_PDB (${HDF4_MF_FORTRAN_LIBSH_TARGET} ${HDF4_INSTALL_BIN_DIR} fortlibraries)
 endif (BUILD_SHARED_LIBS)
+INSTALL_TARGET_PDB (${HDF4_MF_FCSTUB_LIB_TARGET} ${HDF4_INSTALL_BIN_DIR} fortlibraries)
 
 install (
     TARGETS
@@ -174,4 +169,5 @@ install (
     ARCHIVE DESTINATION ${HDF4_INSTALL_LIB_DIR} COMPONENT fortlibraries
     RUNTIME DESTINATION ${HDF4_INSTALL_BIN_DIR} COMPONENT fortlibraries
     FRAMEWORK DESTINATION ${HDF4_INSTALL_FWRK_DIR} COMPONENT fortlibraries
+    INCLUDES DESTINATION include
 )
diff --git a/mfhdf/fortran/CMakeTests.cmake b/mfhdf/fortran/CMakeTests.cmake
index be7f0ca..a23b69f 100644
--- a/mfhdf/fortran/CMakeTests.cmake
+++ b/mfhdf/fortran/CMakeTests.cmake
@@ -18,9 +18,9 @@
     set_target_properties (ftest PROPERTIES LINKER_LANGUAGE Fortran)
     if (HDF4_BUILD_XDR_LIB)
       target_link_libraries (ftest ${HDF4_MF_FORTRAN_LIB_TARGET} ${HDF4_HDF_TEST_FCSTUB_LIB_TARGET} ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${HDF4_MF_XDR_LIB_TARGET} ${LINK_LIBS})
-    else (HDF4_BUILD_XDR_LIB)
+    else ()
       target_link_libraries (ftest ${HDF4_MF_FORTRAN_LIB_TARGET} ${HDF4_HDF_TEST_FCSTUB_LIB_TARGET} ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-    endif (HDF4_BUILD_XDR_LIB)
+    endif ()
 
     #-- Copy all the dat files from the test directory into the source directory
     set (HDF4_REFERENCE_TEST_FILES
@@ -31,15 +31,15 @@
       set (dest "${PROJECT_BINARY_DIR}/${h4_file}")
       #message (STATUS " Copying ${HDF4_MFHDF_FORTRAN_SOURCE_DIR}/${h4_file} to ${PROJECT_BINARY_DIR}/")
       ADD_CUSTOM_COMMAND (
-          TARGET     ftest 
+          TARGET     ftest
           POST_BUILD
           COMMAND    ${CMAKE_COMMAND}
           ARGS       -E copy_if_different ${HDF4_MFHDF_FORTRAN_SOURCE_DIR}/${h4_file} ${dest}
       )
-    endforeach (h4_file ${HDF4_REFERENCE_TEST_FILES})
+    endforeach ()
 
     add_test (NAME ftest COMMAND $<TARGET_FILE:ftest>)
-  endif (HDF4_ENABLE_NETCDF)
+  endif ()
 
   #-- Adding test for f_hdftest
   add_executable (f_hdftest hdftest.f)
@@ -48,9 +48,9 @@
   set_target_properties (f_hdftest PROPERTIES LINKER_LANGUAGE Fortran)
   if (HDF4_BUILD_XDR_LIB)
     target_link_libraries (f_hdftest ${HDF4_MF_FORTRAN_LIB_TARGET} ${HDF4_SRC_FORTRAN_LIB_TARGET} ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${HDF4_MF_XDR_LIB_TARGET} ${LINK_LIBS})
-  else (HDF4_BUILD_XDR_LIB)
+  else ()
     target_link_libraries (f_hdftest ${HDF4_MF_FORTRAN_LIB_TARGET} ${HDF4_SRC_FORTRAN_LIB_TARGET} ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-  endif (HDF4_BUILD_XDR_LIB)
+  endif ()
 
   #-- Adding test for f_hdftest1
   add_executable (f_hdftest1 hdftest1.f)
@@ -59,9 +59,9 @@
   set_target_properties (f_hdftest1 PROPERTIES LINKER_LANGUAGE Fortran)
   if (HDF4_BUILD_XDR_LIB)
     target_link_libraries (f_hdftest1 ${HDF4_MF_FORTRAN_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${HDF4_MF_LIB_TARGET} ${HDF4_MF_XDR_LIB_TARGET} ${LINK_LIBS})
-  else (HDF4_BUILD_XDR_LIB)
+  else ()
     target_link_libraries (f_hdftest1 ${HDF4_MF_FORTRAN_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${HDF4_MF_LIB_TARGET} ${LINK_LIBS})
-  endif (HDF4_BUILD_XDR_LIB)
+  endif ()
 
   #-- Adding test for f_tszip
   add_executable (f_tszip tszip.f)
@@ -70,9 +70,9 @@
   set_target_properties (f_tszip PROPERTIES LINKER_LANGUAGE Fortran)
   if (HDF4_BUILD_XDR_LIB)
     target_link_libraries (f_tszip ${HDF4_MF_FORTRAN_LIB_TARGET} ${HDF4_SRC_FORTRAN_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${HDF4_MF_LIB_TARGET} ${HDF4_MF_XDR_LIB_TARGET} ${LINK_LIBS})
-  else (HDF4_BUILD_XDR_LIB)
+  else ()
     target_link_libraries (f_tszip ${HDF4_MF_FORTRAN_LIB_TARGET} ${HDF4_SRC_FORTRAN_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${HDF4_MF_LIB_TARGET} ${LINK_LIBS})
-  endif (HDF4_BUILD_XDR_LIB)
+  endif ()
 
 ##############################################################################
 ##############################################################################
@@ -83,7 +83,7 @@
   add_test (
       NAME MFHDF_FORTRAN-clearall-objects
       COMMAND    ${CMAKE_COMMAND}
-          -E remove 
+          -E remove
           cchunk_gz.hdf
           cchunk_nb.hdf
           cchunk_no.hdf
@@ -144,7 +144,7 @@
   )
   if (HDF4_ENABLE_NETCDF)
     set_tests_properties (MFHDF_FORTRAN-clearall-objects PROPERTIES DEPENDS ftest LABELS ${PROJECT_NAME})
-  endif (HDF4_ENABLE_NETCDF)
+  endif ()
 
   add_test (NAME f_hdftest COMMAND $<TARGET_FILE:f_hdftest>)
   set (passRegex "Total errors : [ ]+0")
diff --git a/mfhdf/fortran/Makefile.in b/mfhdf/fortran/Makefile.in
index aab7160..8c8f204 100644
--- a/mfhdf/fortran/Makefile.in
+++ b/mfhdf/fortran/Makefile.in
@@ -490,6 +490,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/mfhdf/fortran/examples/CMakeLists.txt b/mfhdf/fortran/examples/CMakeLists.txt
index dda3651..bc3dfe9 100644
--- a/mfhdf/fortran/examples/CMakeLists.txt
+++ b/mfhdf/fortran/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 # --------------------------------------------------------------------
 # Notes: When creating examples they should be prefixed
 # with "f_ex_". This allows for easier filtering of the examples.
@@ -22,27 +22,27 @@ LINK_DIRECTORIES (
 # Define Sources
 #-----------------------------------------------------------------------------
 set (examples
-    SD_create_sds 
-    SD_write_to_sds 
-    SD_write_slab 
-    SD_alter_sds_values 
+    SD_create_sds
+    SD_write_to_sds
+    SD_write_slab
+    SD_alter_sds_values
     SD_unlimited_sds
-    SD_mv_sds_to_external 
-    SD_read_from_sds 
-    SD_read_subsets 
+    SD_mv_sds_to_external
+    SD_read_from_sds
+    SD_read_subsets
     #SD_get_info
-    SD_find_sds_by_name 
-    SD_set_get_dim_info 
-    #SD_dimscale_vs_sds 
+    SD_find_sds_by_name
+    SD_set_get_dim_info
+    #SD_dimscale_vs_sds
     SD_set_attr
-    #SD_get_attr 
-    SD_compress_sds 
+    #SD_get_attr
+    SD_compress_sds
     SD_chunking_example
 )
 set (skip_examples
     SD_get_info
-    SD_dimscale_vs_sds 
-    SD_get_attr 
+    SD_dimscale_vs_sds
+    SD_get_attr
 )
 
 foreach (example ${examples})
@@ -56,10 +56,10 @@ foreach (example ${examples})
   )
   if (HDF4_BUILD_XDR_LIB)
     target_link_libraries (f_exmf_${example} ${HDF4_MF_FORTRAN_LIB_TARGET}  ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS} ${HDF4_MF_XDR_LIB_TARGET})
-  else (HDF4_BUILD_XDR_LIB)
+  else ()
     target_link_libraries (f_exmf_${example} ${HDF4_MF_FORTRAN_LIB_TARGET}  ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-  endif (HDF4_BUILD_XDR_LIB)
-endforeach (example ${examples})
+  endif ()
+endforeach ()
 
 foreach (example ${skip_examples})
   add_executable (f_exmf_${example} ${HDF4_MFHDF_FORTRAN_EXAMPLES_SOURCE_DIR}/${example}.f)
@@ -72,11 +72,11 @@ foreach (example ${skip_examples})
   )
   if (HDF4_BUILD_XDR_LIB)
     target_link_libraries (f_exmf_${example} ${HDF4_MF_FORTRAN_LIB_TARGET}  ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS} ${HDF4_MF_XDR_LIB_TARGET})
-  else (HDF4_BUILD_XDR_LIB)
+  else ()
     target_link_libraries (f_exmf_${example} ${HDF4_MF_FORTRAN_LIB_TARGET}  ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-  endif (HDF4_BUILD_XDR_LIB)
-endforeach (example ${skip_examples})
+  endif ()
+endforeach ()
 
 if (BUILD_TESTING)
   include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
diff --git a/mfhdf/fortran/examples/CMakeTests.cmake b/mfhdf/fortran/examples/CMakeTests.cmake
index 75e2c33..3d84786 100644
--- a/mfhdf/fortran/examples/CMakeTests.cmake
+++ b/mfhdf/fortran/examples/CMakeTests.cmake
@@ -9,7 +9,7 @@
 add_test (
     NAME MFHDF_FORTRAN_EXAMPLES-clearall-objects
     COMMAND    ${CMAKE_COMMAND}
-        -E remove 
+        -E remove
         SDS.hdf
         SDSchunked.hdf
         SDScompressed.hdf
@@ -23,12 +23,12 @@ foreach (example ${examples})
   add_test (NAME f_exmftest_${example} COMMAND $<TARGET_FILE:f_exmf_${example}>)
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (f_exmftest_${example} PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-  else (NOT "${last_test}" STREQUAL "")
+  else ()
     set_tests_properties (f_exmftest_${example} PROPERTIES LABELS ${PROJECT_NAME})
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "f_exmftest_${example}")
-endforeach (example ${examples})
+endforeach ()
 
 foreach (example ${skip_examples})
   add_test (NAME f_exmftest_${example} COMMAND ${CMAKE_COMMAND} -E echo "SKIP f_exmftest_${example}")
-endforeach (example ${skip_examples})
+endforeach ()
diff --git a/mfhdf/fortran/examples/Makefile.am b/mfhdf/fortran/examples/Makefile.am
index 715ff15..79fc2da 100644
--- a/mfhdf/fortran/examples/Makefile.am
+++ b/mfhdf/fortran/examples/Makefile.am
@@ -24,7 +24,7 @@ INSTALL_FILES=SD_create_sds.f SD_write_to_sds.f SD_write_slab.f SD_alter_sds_val
 	SD_set_attr.f SD_get_attr.f SD_compress_sds.f SD_chunking_example.f
 
 # Where to install example files
-EXAMPLEDIR=${DESTDIR}$(prefix)/examples/fortran
+EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf4_examples/fortran
 
 # How to build Fortran programs using h4fc
 $(EXTRA_PROG): $(H4FC)
diff --git a/mfhdf/fortran/examples/Makefile.in b/mfhdf/fortran/examples/Makefile.in
index 5d9b185..1792465 100644
--- a/mfhdf/fortran/examples/Makefile.in
+++ b/mfhdf/fortran/examples/Makefile.in
@@ -396,6 +396,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
@@ -542,7 +543,7 @@ INSTALL_FILES = SD_create_sds.f SD_write_to_sds.f SD_write_slab.f SD_alter_sds_v
 
 
 # Where to install example files
-EXAMPLEDIR = ${DESTDIR}$(prefix)/examples/fortran
+EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf4_examples/fortran
 DISTCLEANFILES = *.chkexe *.chklog
 @BUILD_SHARED_SZIP_CONDITIONAL_TRUE at LD_LIBRARY_PATH = $(LL_PATH)
 
diff --git a/mfhdf/fortran/hdftest.f b/mfhdf/fortran/hdftest.f
index 7fbc943..079ef4a 100644
--- a/mfhdf/fortran/hdftest.f
+++ b/mfhdf/fortran/hdftest.f
@@ -5,10 +5,10 @@ C  All rights reserved.                                                      *
 C                                                                            *
 C  This file is part of HDF.  The full HDF copyright notice, including       *
 C  terms governing use, modification, and redistribution, is contained in    *
-C  the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C  of the source code distribution tree; Copyright.html can be found at      *
-C  http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C  access to either file, you may request a copy from help at hdfgroup.org.     *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
 C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C     Testing the Fortran interface for the multiple SD routines
 C
diff --git a/mfhdf/fortran/hdftest1.f b/mfhdf/fortran/hdftest1.f
index 5574beb..77025a3 100644
--- a/mfhdf/fortran/hdftest1.f
+++ b/mfhdf/fortran/hdftest1.f
@@ -5,10 +5,10 @@ C  All rights reserved.                                                      *
 C                                                                            *
 C  This file is part of HDF.  The full HDF copyright notice, including       *
 C  terms governing use, modification, and redistribution, is contained in    *
-C  the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C  of the source code distribution tree; Copyright.html can be found at      *
-C  http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C  access to either file, you may request a copy from help at hdfgroup.org.     *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
 C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
 C This is a test driver for new SD Fortran functions
diff --git a/mfhdf/fortran/mfsdf.c b/mfhdf/fortran/mfsdf.c
index f9e11fe..313bbc4 100644
--- a/mfhdf/fortran/mfsdf.c
+++ b/mfhdf/fortran/mfsdf.c
@@ -1,17 +1,17 @@
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-*  Copyright by The HDF Group.                                               *
-*  Copyright by the Board of Trustees of the University of Illinois.         *
-*  All rights reserved.                                                      *
-*                                                                            *
-*  This file is part of HDF.  The full HDF 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      *
-*  http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-*  access to either file, you may request a copy from help at hdfgroup.org.     *
-* * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* $Id: mfsdf.c 6357 2016-05-13 05:00:06Z bmribler $ */
+ * Copyright by The HDF Group.                                               *
+ * Copyright by the Board of Trustees of the University of Illinois.         *
+ * All rights reserved.                                                      *
+ *                                                                           *
+ * This file is part of HDF.  The full HDF copyright notice, including       *
+ * terms governing use, modification, and redistribution, is contained in    *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/* $Id$ */
 
 /*
 
diff --git a/mfhdf/fortran/mfsdf.h b/mfhdf/fortran/mfsdf.h
index e2eb922..e5b337d 100644
--- a/mfhdf/fortran/mfsdf.h
+++ b/mfhdf/fortran/mfsdf.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #ifndef _MFSDF_H_
diff --git a/mfhdf/fortran/mfsdff.f b/mfhdf/fortran/mfsdff.f
index cca064f..7a5c496 100644
--- a/mfhdf/fortran/mfsdff.f
+++ b/mfhdf/fortran/mfsdff.f
@@ -5,13 +5,13 @@ C  All rights reserved.                                                      *
 C                                                                            *
 C  This file is part of HDF.  The full HDF copyright notice, including       *
 C  terms governing use, modification, and redistribution, is contained in    *
-C  the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C  of the source code distribution tree; Copyright.html can be found at      *
-C  http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C  access to either file, you may request a copy from help at hdfgroup.org.     *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
 C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 C
-C $Id: mfsdff.f 5167 2009-01-26 01:55:18Z epourmal $
+C $Id$
 C
 
 C----------------------------------------------------------------------
diff --git a/mfhdf/fortran/tszip.f b/mfhdf/fortran/tszip.f
index d9d1e17..0148ecf 100644
--- a/mfhdf/fortran/tszip.f
+++ b/mfhdf/fortran/tszip.f
@@ -5,10 +5,10 @@ C  All rights reserved.                                                      *
 C                                                                            *
 C  This file is part of HDF.  The full HDF copyright notice, including       *
 C  terms governing use, modification, and redistribution, is contained in    *
-C  the files COPYING and Copyright.html.  COPYING can be found at the root   *
-C  of the source code distribution tree; Copyright.html can be found at      *
-C  http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
-C  access to either file, you may request a copy from help at hdfgroup.org.     *
+C  the COPYING file, which can be found at the root of the source code       *
+C  distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+C  If you do not have access to either file, you may request a copy from     *
+C  help at hdfgroup.org.                                                        *
 C * * * * * * * * *  * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
          program test_szip
          implicit none
diff --git a/mfhdf/hdfimport/CMakeLists.txt b/mfhdf/hdfimport/CMakeLists.txt
index e787e34..264d990 100644
--- a/mfhdf/hdfimport/CMakeLists.txt
+++ b/mfhdf/hdfimport/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 project (HDF4_MFHDF_HDFIMPORT)
 
 INCLUDE_DIRECTORIES (${HDF4_HDFSOURCE_DIR})
@@ -6,20 +6,20 @@ INCLUDE_DIRECTORIES (${HDF4_MFHDFSOURCE_DIR})
 
 if (WIN32)
   set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:LIBCMT")
-endif (WIN32)
+endif ()
 
 add_definitions (-DHDF)
 
 if (WIN32)
   add_definitions (-DDOS_FS)
-endif (WIN32)
+endif ()
 
 if (HDF4_BUILD_XDR_LIB)
   if (WIN32)
     add_definitions (-DNO_SYS_XDR_INC)
-  endif (WIN32)
+  endif ()
   INCLUDE_DIRECTORIES (${HDF4_MFHDF_XDR_DIR})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 
 set (hdfimport_SRCS
     ${HDF4_MFHDF_HDFIMPORT_SOURCE_DIR}/hdfimport.c
@@ -29,14 +29,15 @@ add_executable (hdfimport ${hdfimport_SRCS})
 TARGET_C_PROPERTIES (hdfimport STATIC " " " ")
 if (HDF4_BUILD_XDR_LIB)
   target_link_libraries (hdfimport ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS} ${HDF4_MF_XDR_LIB_TARGET})
-else (HDF4_BUILD_XDR_LIB)
+else ()
   target_link_libraries (hdfimport ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 TARGET_NAMING (hdfimport STATIC)
+set_global_variable (HDF4_UTILS_TO_EXPORT "${HDF4_UTILS_TO_EXPORT};hdfimport")
 
 if (BUILD_TESTING)
   include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
 
 ##############################################################################
 ##############################################################################
@@ -50,8 +51,10 @@ endif (BUILD_TESTING)
 
 INSTALL_PROGRAM_PDB (hdfimport ${HDF4_INSTALL_TOOLS_BIN_DIR} toolsapplications)
 
-INSTALL (
+install (
     TARGETS
         hdfimport
+    EXPORT
+        ${HDF4_EXPORTED_TARGETS}
     RUNTIME DESTINATION ${HDF4_INSTALL_TOOLS_BIN_DIR} COMPONENT toolsapplications
 )
diff --git a/mfhdf/hdfimport/CMakeTests.cmake b/mfhdf/hdfimport/CMakeTests.cmake
index bef4494..2784939 100644
--- a/mfhdf/hdfimport/CMakeTests.cmake
+++ b/mfhdf/hdfimport/CMakeTests.cmake
@@ -24,7 +24,7 @@
           COMMAND    ${CMAKE_COMMAND}
           ARGS       -E copy_if_different ${HDF4_MFHDF_HDFIMPORT_SOURCE_DIR}/${h4_file} ${dest}
      )
-  endforeach (h4_file ${HDF4_REFERENCE_TEST_FILES})
+  endforeach ()
 
   if (WIN32 AND MSVC_VERSION LESS 1900)
     add_custom_command (
@@ -33,14 +33,14 @@
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_MFHDF_HDFIMPORT_SOURCE_DIR}/hdfimport-w.out2 ${PROJECT_BINARY_DIR}/hdfimport.out2
     )
-  else (WIN32 AND MSVC_VERSION LESS 1900)
+  else ()
     add_custom_command (
         TARGET     hdfimport
         POST_BUILD
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_MFHDF_HDFIMPORT_SOURCE_DIR}/hdfimport.out2 ${PROJECT_BINARY_DIR}/hdfimport.out2
     )
-  endif (WIN32 AND MSVC_VERSION LESS 1900)
+  endif ()
 
   #-- Copy all the hdfls tst files from the test directory into the source directory
   set (HDF4_LS_TEST_FILES
@@ -71,7 +71,7 @@
           COMMAND    ${CMAKE_COMMAND}
           ARGS       -E copy_if_different ${HDF4_MFHDF_HDFIMPORT_SOURCE_DIR}/testfiles/${ls_file} ${dest}
      )
-  endforeach (ls_file ${HDF4_LS_TEST_FILES})
+  endforeach ()
 
   #-- hdfimporttest
   set (hdfimporttest_SRCS
@@ -82,9 +82,9 @@
   TARGET_C_PROPERTIES (hdfimporttest STATIC " " " ")
   if (HDF4_BUILD_XDR_LIB)
     target_link_libraries (hdfimporttest ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS} ${HDF4_MF_XDR_LIB_TARGET})
-  else (HDF4_BUILD_XDR_LIB)
+  else ()
     target_link_libraries (hdfimporttest ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-  endif (HDF4_BUILD_XDR_LIB)
+  endif ()
   TARGET_NAMING (hdfimporttest STATIC)
 
   #-- gen_sds_floats
@@ -96,9 +96,9 @@
   TARGET_C_PROPERTIES (gen_sds_floats STATIC " " " ")
   if (HDF4_BUILD_XDR_LIB)
     target_link_libraries (gen_sds_floats ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS} ${HDF4_MF_XDR_LIB_TARGET})
-  else (HDF4_BUILD_XDR_LIB)
+  else ()
     target_link_libraries (gen_sds_floats ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-  endif (HDF4_BUILD_XDR_LIB)
+  endif ()
   TARGET_NAMING (gen_sds_floats STATIC)
 
 ##############################################################################
@@ -108,25 +108,25 @@
 ##############################################################################
 
   macro (ADD_H4_TEST resultfile resultcode testtfile testtype)
-    if ( NOT ${testtype} STREQUAL "")
+    if (NOT ${testtype} STREQUAL "")
       if (${testtype} STREQUAL "N")
         add_test (NAME HIMPORT-${testtfile} COMMAND $<TARGET_FILE:hdfimport> ${resultfile} -n -o ${testtfile}.hdf)
-      endif (${testtype} STREQUAL "N")
+      endif ()
       if (${testtype} STREQUAL "R")
         add_test (NAME HIMPORT-${testtfile} COMMAND $<TARGET_FILE:hdfimport> ${resultfile} -o ${testtfile}.hdf -raster ${ARGN})
-      endif (${testtype} STREQUAL "R")
-    else ( NOT ${testtype} STREQUAL "")
+      endif ()
+    else ()
       add_test (NAME HIMPORT-${testtfile} COMMAND $<TARGET_FILE:hdfimport> ${resultfile} -o ${testtfile}.hdf)
-    endif ( NOT ${testtype} STREQUAL "")
+    endif ()
     if (NOT "${last_test}" STREQUAL "")
       set_tests_properties (HIMPORT-${testtfile} PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-    else (NOT "${last_test}" STREQUAL "")
+    else ()
       set_tests_properties (HIMPORT-${testtfile} PROPERTIES LABELS ${PROJECT_NAME})
-    endif (NOT "${last_test}" STREQUAL "")
+    endif ()
 
     if (HDF4_ENABLE_USING_MEMCHECKER)
       add_test (NAME HIMPORTLS-${testtfile} COMMAND $<TARGET_FILE:hdfls> -l ${testtfile}.hdf)
-    else (HDF4_ENABLE_USING_MEMCHECKER)
+    else ()
       add_test (
           NAME HIMPORTLS-${testtfile}
           COMMAND "${CMAKE_COMMAND}"
@@ -139,22 +139,22 @@
               -D "TEST_REFERENCE=${testtfile}.tst"
               -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
       )
-    endif (HDF4_ENABLE_USING_MEMCHECKER)
+    endif ()
     set_tests_properties (HIMPORTLS-${testtfile} PROPERTIES DEPENDS HIMPORT-${testtfile} LABELS ${PROJECT_NAME})
     set (last_test "HIMPORTLS-${testtfile}")
-  endmacro (ADD_H4_TEST)
+  endmacro ()
 
   macro (ADD_H4_TEST_OUT resultfile resultcode)
     add_test (NAME HIMPORT-OUT-${resultfile} COMMAND $<TARGET_FILE:hdfimport> ${resultfile}.hdf -o ${resultfile}.out)
     if (NOT "${last_test}" STREQUAL "")
       set_tests_properties (HIMPORT-OUT-${resultfile} PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-    else (NOT "${last_test}" STREQUAL "")
+    else ()
       set_tests_properties (HIMPORT-OUT-${resultfile} PROPERTIES LABELS ${PROJECT_NAME})
-    endif (NOT "${last_test}" STREQUAL "")
+    endif ()
 
     if (HDF4_ENABLE_USING_MEMCHECKER)
       add_test (NAME HIMPORTLS-OUT-${resultfile} COMMAND $<TARGET_FILE:hdfls> ${resultfile}.out)
-    else (HDF4_ENABLE_USING_MEMCHECKER)
+    else ()
       add_test (
           NAME HIMPORTLS-OUT-${resultfile}
           COMMAND "${CMAKE_COMMAND}"
@@ -167,15 +167,15 @@
               -D "TEST_REFERENCE=${resultfile}.tst"
               -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
       )
-    endif (HDF4_ENABLE_USING_MEMCHECKER)
+    endif ()
     set_tests_properties (HIMPORTLS-OUT-${resultfile} PROPERTIES DEPENDS HIMPORT-OUT-${resultfile} LABELS ${PROJECT_NAME})
     set (last_test "HIMPORTLS-OUT-${resultfile}")
-  endmacro (ADD_H4_TEST_OUT)
+  endmacro ()
 
   macro (ADD_H4_TEST_ED testfile resultfile resultcode)
     if (HDF4_ENABLE_USING_MEMCHECKER)
       add_test (NAME HIMPORT-EDIT COMMAND $<TARGET_FILE:hdfed> -batch)
-    else (HDF4_ENABLE_USING_MEMCHECKER)
+    else ()
       add_test (
           NAME HIMPORT-EDIT
           COMMAND "${CMAKE_COMMAND}"
@@ -188,14 +188,14 @@
               -D "TEST_REFERENCE=${resultfile}"
               -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
       )
-    endif (HDF4_ENABLE_USING_MEMCHECKER)
+    endif ()
     if (NOT "${last_test}" STREQUAL "")
       set_tests_properties (HIMPORT-EDIT PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-    else (NOT "${last_test}" STREQUAL "")
+    else ()
       set_tests_properties (HIMPORT-EDIT PROPERTIES LABELS ${PROJECT_NAME})
-    endif (NOT "${last_test}" STREQUAL "")
+    endif ()
     set (last_test "HIMPORT-EDIT")
-  endmacro (ADD_H4_TEST_ED)
+  endmacro ()
 
 ##############################################################################
 ##############################################################################
@@ -271,17 +271,17 @@
   )
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (hdfimport-clear-refs PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-  else (NOT "${last_test}" STREQUAL "")
+  else ()
     set_tests_properties (hdfimport-clear-refs PROPERTIES LABELS ${PROJECT_NAME})
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "hdfimport-clear-refs")
 
   add_test (NAME HIMPORTtest COMMAND $<TARGET_FILE:hdfimporttest>)
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (HIMPORTtest PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-  else (NOT "${last_test}" STREQUAL "")
+  else ()
     set_tests_properties (HIMPORTtest PROPERTIES LABELS ${PROJECT_NAME})
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "HIMPORTtest")
 
   # "Testing for 32-bit floating point ASCII (2D data)"
diff --git a/mfhdf/hdfimport/Makefile.in b/mfhdf/hdfimport/Makefile.in
index b2fdd9b..3b7dc2d 100644
--- a/mfhdf/hdfimport/Makefile.in
+++ b/mfhdf/hdfimport/Makefile.in
@@ -457,6 +457,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/mfhdf/hdfimport/crtSDSfloats.c b/mfhdf/hdfimport/crtSDSfloats.c
index 64fae07..81f62c5 100644
--- a/mfhdf/hdfimport/crtSDSfloats.c
+++ b/mfhdf/hdfimport/crtSDSfloats.c
@@ -1,14 +1,14 @@
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group (THG).                                         *
+ * Copyright by The HDF Group.                                               *
+ * Copyright by the Board of Trustees of the University of Illinois.         *
  * All rights reserved.                                                      *
  *                                                                           *
  * This file is part of HDF.  The full HDF copyright notice, including       *
  * terms governing use, modification, and redistribution, is contained in    *
- * the COPYING file and in the print documentation copyright notice.         *
- * COPYING can be found at the root of the source code distribution tree;    *
- * the copyright notice in printed HDF documentation can be found on the     *
- * back of the title page.  If you do not have access to either version,     *
- * you may request a copy from help at hdfgroup.org.                            *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "mfhdf.h"
diff --git a/mfhdf/hdfimport/gen_sds_floats.c b/mfhdf/hdfimport/gen_sds_floats.c
index 64fae07..81f62c5 100644
--- a/mfhdf/hdfimport/gen_sds_floats.c
+++ b/mfhdf/hdfimport/gen_sds_floats.c
@@ -1,14 +1,14 @@
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group (THG).                                         *
+ * Copyright by The HDF Group.                                               *
+ * Copyright by the Board of Trustees of the University of Illinois.         *
  * All rights reserved.                                                      *
  *                                                                           *
  * This file is part of HDF.  The full HDF copyright notice, including       *
  * terms governing use, modification, and redistribution, is contained in    *
- * the COPYING file and in the print documentation copyright notice.         *
- * COPYING can be found at the root of the source code distribution tree;    *
- * the copyright notice in printed HDF documentation can be found on the     *
- * back of the title page.  If you do not have access to either version,     *
- * you may request a copy from help at hdfgroup.org.                            *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "mfhdf.h"
diff --git a/mfhdf/hdfimport/hdfimport.c b/mfhdf/hdfimport/hdfimport.c
index 755db56..4051d91 100644
--- a/mfhdf/hdfimport/hdfimport.c
+++ b/mfhdf/hdfimport/hdfimport.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /* 
diff --git a/mfhdf/hdfimport/hdfimporttest.c b/mfhdf/hdfimport/hdfimporttest.c
index 8e76d64..b78282b 100644
--- a/mfhdf/hdfimport/hdfimporttest.c
+++ b/mfhdf/hdfimport/hdfimporttest.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include <stdio.h>
diff --git a/mfhdf/hdiff/CMakeLists.txt b/mfhdf/hdiff/CMakeLists.txt
index c50f79c..790041b 100644
--- a/mfhdf/hdiff/CMakeLists.txt
+++ b/mfhdf/hdiff/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 project (HDF4_MFHDF_HDIFF)
 
 INCLUDE_DIRECTORIES (${HDF4_HDFSOURCE_DIR})
@@ -6,14 +6,14 @@ INCLUDE_DIRECTORIES (${HDF4_MFHDFSOURCE_DIR})
 
 if (WIN32)
   set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:LIBCMT")
-endif (WIN32)
+endif ()
 
 if (HDF4_BUILD_XDR_LIB)
   if (WIN32)
     add_definitions (-DNO_SYS_XDR_INC)
-  endif (WIN32)
+  endif ()
   INCLUDE_DIRECTORIES (${HDF4_MFHDF_XDR_DIR})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 
 set (hdiff_SRCS
     ${HDF4_MFHDF_HDIFF_SOURCE_DIR}/hdiff.c
@@ -35,14 +35,15 @@ add_executable(hdiff ${hdiff_SRCS})
 TARGET_C_PROPERTIES (hdiff STATIC " " " ")
 if (HDF4_BUILD_XDR_LIB)
   TARGET_LINK_LIBRARIES(hdiff ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS} ${HDF4_MF_XDR_LIB_TARGET})
-else (HDF4_BUILD_XDR_LIB)
+else ()
   TARGET_LINK_LIBRARIES(hdiff ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 TARGET_NAMING (hdiff STATIC)
+set_global_variable (HDF4_UTILS_TO_EXPORT "${HDF4_UTILS_TO_EXPORT};hdiff")
 
 if (BUILD_TESTING)
   include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
 
 ##############################################################################
 ##############################################################################
@@ -56,8 +57,10 @@ endif (BUILD_TESTING)
 
 INSTALL_PROGRAM_PDB (hdiff ${HDF4_INSTALL_TOOLS_BIN_DIR} toolsapplications)
 
-INSTALL (
+install (
     TARGETS
         hdiff
+    EXPORT
+        ${HDF4_EXPORTED_TARGETS}
     RUNTIME DESTINATION ${HDF4_INSTALL_TOOLS_BIN_DIR} COMPONENT toolsapplications
 )
diff --git a/mfhdf/hdiff/CMakeTests.cmake b/mfhdf/hdiff/CMakeTests.cmake
index cd9246c..8361ca7 100644
--- a/mfhdf/hdiff/CMakeTests.cmake
+++ b/mfhdf/hdiff/CMakeTests.cmake
@@ -18,9 +18,9 @@
     TARGET_C_PROPERTIES (hdifftst STATIC " " " ")
     if (HDF4_BUILD_XDR_LIB)
       target_link_libraries (hdifftst ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS} ${HDF4_MF_XDR_LIB_TARGET})
-    else (HDF4_BUILD_XDR_LIB)
+    else ()
       target_link_libraries (hdifftst ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-    endif (HDF4_BUILD_XDR_LIB)
+    endif ()
     TARGET_NAMING (hdifftst ${LIB_TYPE})
 
     # Remove any output file left over from previous test run
@@ -41,17 +41,17 @@
     add_test (NAME hdifftst COMMAND $<TARGET_FILE:hdifftst>)
     set_tests_properties (hdifftst PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
     set (last_test "hdifftst")
-  endif (HDF4_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+  endif ()
 
   MACRO (ADD_H4_TEST resultfile resultcode)
     if (HDF4_ENABLE_USING_MEMCHECKER)
       add_test (NAME HDIFF-${resultfile} COMMAND $<TARGET_FILE:hdiff> ${ARGN})
       if (NOT ${resultcode} STREQUAL "0")
         set_tests_properties (HDIFF-${resultfile} PROPERTIES LABELS ${PROJECT_NAME} WILL_FAIL "true")
-      else (NOT ${resultcode} STREQUAL "0")
+      else ()
         set_tests_properties (HDIFF-${resultfile} PROPERTIES LABELS ${PROJECT_NAME})
-      endif (NOT ${resultcode} STREQUAL "0")
-    else (HDF4_ENABLE_USING_MEMCHECKER)
+      endif ()
+    else ()
       add_test (
           NAME HDIFF-${resultfile}
           COMMAND "${CMAKE_COMMAND}"
@@ -63,14 +63,14 @@
               -D "TEST_REFERENCE=${resultfile}.txt"
               -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
       )
-    endif (HDF4_ENABLE_USING_MEMCHECKER)
+    endif ()
     if (NOT "${last_test}" STREQUAL "")
       set_tests_properties (HDIFF-${resultfile} PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-    else (NOT "${last_test}" STREQUAL "")
+    else ()
       set_tests_properties (HDIFF-${resultfile} PROPERTIES LABELS ${PROJECT_NAME})
-    endif (NOT "${last_test}" STREQUAL "")
+    endif ()
     set (last_test "HDIFF-${resultfile}")
-  ENDMACRO (ADD_H4_TEST file)
+  ENDMACRO ()
 
   #-- Copy all the data files from the test directory into the source directory
   set (HDF4_REFERENCE_TEST_FILES
@@ -109,7 +109,7 @@
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_MFHDF_HDIFF_SOURCE_DIR}/testfiles/${h4_file} ${dest}
     )
-  endforeach (h4_file ${HDF4_REFERENCE_TEST_FILES})
+  endforeach ()
 
   foreach (out_file ${HDF4_REFERENCE_FILES})
     set (outdest "${PROJECT_BINARY_DIR}/testfiles/${out_file}")
@@ -120,7 +120,7 @@
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_MFHDF_HDIFF_SOURCE_DIR}/testfiles/${out_file} ${outdest}
     )
-  endforeach (out_file ${HDF4_REFERENCE_FILES})
+  endforeach ()
 
   if (WIN32 AND MSVC_VERSION LESS 1900)
     ADD_CUSTOM_COMMAND (
@@ -129,14 +129,14 @@
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_MFHDF_HDIFF_SOURCE_DIR}/testfiles/hdiff_06w.txt ${PROJECT_BINARY_DIR}/testfiles/hdiff_06.txt
     )
-  else (WIN32)
+  else ()
     ADD_CUSTOM_COMMAND (
         TARGET     hdiff
         POST_BUILD
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_MFHDF_HDIFF_SOURCE_DIR}/testfiles/hdiff_06.txt ${PROJECT_BINARY_DIR}/testfiles/hdiff_06.txt
     )
-  endif (WIN32 AND MSVC_VERSION LESS 1900)
+  endif ()
 
 ##############################################################################
 ##############################################################################
@@ -181,9 +181,9 @@
   )
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (HDIFF-clearall-objects PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-  else (NOT "${last_test}" STREQUAL "")
+  else ()
     set_tests_properties (HDIFF-clearall-objects PROPERTIES LABELS ${PROJECT_NAME})
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "HDIFF-clearall-objects")
 
   # help message
diff --git a/mfhdf/hdiff/Makefile.in b/mfhdf/hdiff/Makefile.in
index b28f1f9..392fb97 100644
--- a/mfhdf/hdiff/Makefile.in
+++ b/mfhdf/hdiff/Makefile.in
@@ -453,6 +453,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/mfhdf/hdiff/hdiff.c b/mfhdf/hdiff/hdiff.c
index 36c8d40..01b5caa 100644
--- a/mfhdf/hdiff/hdiff.c
+++ b/mfhdf/hdiff/hdiff.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hdiff/hdiff_array.c b/mfhdf/hdiff/hdiff_array.c
index 78c630d..3d0b207 100644
--- a/mfhdf/hdiff/hdiff_array.c
+++ b/mfhdf/hdiff/hdiff_array.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hdiff/hdiff_dim.c b/mfhdf/hdiff/hdiff_dim.c
index a593aaa..bd84401 100644
--- a/mfhdf/hdiff/hdiff_dim.c
+++ b/mfhdf/hdiff/hdiff_dim.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hdiff/hdiff_gattr.c b/mfhdf/hdiff/hdiff_gattr.c
index 9c2f5c1..1c07c83 100644
--- a/mfhdf/hdiff/hdiff_gattr.c
+++ b/mfhdf/hdiff/hdiff_gattr.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hdiff/hdiff_gr.c b/mfhdf/hdiff/hdiff_gr.c
index f7f38a2..854d796 100644
--- a/mfhdf/hdiff/hdiff_gr.c
+++ b/mfhdf/hdiff/hdiff_gr.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hdiff/hdiff_list.c b/mfhdf/hdiff/hdiff_list.c
index 21f223c..94f78a0 100644
--- a/mfhdf/hdiff/hdiff_list.c
+++ b/mfhdf/hdiff/hdiff_list.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hdiff/hdiff_main.c b/mfhdf/hdiff/hdiff_main.c
index 871eed0..2fb2342 100644
--- a/mfhdf/hdiff/hdiff_main.c
+++ b/mfhdf/hdiff/hdiff_main.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hdiff/hdiff_mattbl.c b/mfhdf/hdiff/hdiff_mattbl.c
index 23d8e13..5df1aee 100644
--- a/mfhdf/hdiff/hdiff_mattbl.c
+++ b/mfhdf/hdiff/hdiff_mattbl.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hdiff/hdiff_misc.c b/mfhdf/hdiff/hdiff_misc.c
index dbb5967..76f1615 100644
--- a/mfhdf/hdiff/hdiff_misc.c
+++ b/mfhdf/hdiff/hdiff_misc.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hdiff/hdiff_sds.c b/mfhdf/hdiff/hdiff_sds.c
index ecf1b06..9e1e89d 100644
--- a/mfhdf/hdiff/hdiff_sds.c
+++ b/mfhdf/hdiff/hdiff_sds.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include <assert.h>
diff --git a/mfhdf/hdiff/hdiff_table.c b/mfhdf/hdiff/hdiff_table.c
index 6423311..7b6de2c 100644
--- a/mfhdf/hdiff/hdiff_table.c
+++ b/mfhdf/hdiff/hdiff_table.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include <stdio.h>
diff --git a/mfhdf/hdiff/hdiff_vs.c b/mfhdf/hdiff/hdiff_vs.c
index 37d3cfd..aecf601 100644
--- a/mfhdf/hdiff/hdiff_vs.c
+++ b/mfhdf/hdiff/hdiff_vs.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "hdiff.h"
diff --git a/mfhdf/hdiff/testhdiff.sh.in b/mfhdf/hdiff/testhdiff.sh.in
index de3523b..6d48324 100644
--- a/mfhdf/hdiff/testhdiff.sh.in
+++ b/mfhdf/hdiff/testhdiff.sh.in
@@ -65,7 +65,7 @@ TESTING() {
 # difference between the actual output and the expected output. The
 # expected output is given as the first argument to this function and
 # the actual output file is calculated by replacing the `.ddl' with
-# `.out'.  The actual output is not removed if $HDF5_NOCLEANUP has a
+# `.out'.  The actual output is not removed if $HDF4_NOCLEANUP has a
 # non-zero value.
 #
 TOOLTEST() {
diff --git a/mfhdf/hrepack/CMakeLists.txt b/mfhdf/hrepack/CMakeLists.txt
index 7e7a95d..db01a3e 100644
--- a/mfhdf/hrepack/CMakeLists.txt
+++ b/mfhdf/hrepack/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 project (HDF4_MFHDF_HREPACK)
 
 INCLUDE_DIRECTORIES (${HDF4_HDFSOURCE_DIR})
@@ -9,14 +9,14 @@ add_definitions (-DHDF)
 
 if (WIN32)
   add_definitions (-DDOS_FS)
-endif (WIN32)
+endif ()
 
 if (HDF4_BUILD_XDR_LIB)
   if (WIN32)
     add_definitions (-DNO_SYS_XDR_INC)
-  endif (WIN32)
+  endif ()
   INCLUDE_DIRECTORIES (${HDF4_MFHDF_XDR_DIR})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 
 set (hrepack_SRCS
     ${HDF4_MFHDF_HREPACK_SOURCE_DIR}/hrepack.c
@@ -38,23 +38,24 @@ add_executable (hrepack ${hrepack_SRCS})
 TARGET_C_PROPERTIES (hrepack STATIC " " " ")
 if (HDF4_BUILD_XDR_LIB)
   target_link_libraries (hrepack ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS} ${HDF4_MF_XDR_LIB_TARGET})
-else (HDF4_BUILD_XDR_LIB)
+else ()
   target_link_libraries (hrepack ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 TARGET_NAMING (hrepack STATIC)
-  
+
 add_executable (hrepack_check ${HDF4_MFHDF_HREPACK_SOURCE_DIR}/hrepack_check.c)
 TARGET_C_PROPERTIES (hrepack_check STATIC " " " ")
 if (HDF4_BUILD_XDR_LIB)
   target_link_libraries (hrepack_check ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS} ${HDF4_MF_XDR_LIB_TARGET})
-else (HDF4_BUILD_XDR_LIB)
+else ()
   target_link_libraries (hrepack_check ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 TARGET_NAMING (hrepack_check STATIC)
+set_global_variable (HDF4_UTILS_TO_EXPORT "${HDF4_UTILS_TO_EXPORT};hrepack")
 
 if (BUILD_TESTING)
   include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
 
 ##############################################################################
 ##############################################################################
@@ -68,8 +69,10 @@ endif (BUILD_TESTING)
 
 INSTALL_PROGRAM_PDB (hrepack ${HDF4_INSTALL_TOOLS_BIN_DIR} toolsapplications)
 
-INSTALL (
+install (
     TARGETS
         hrepack hrepack_check
+    EXPORT
+        ${HDF4_EXPORTED_TARGETS}
     RUNTIME DESTINATION ${HDF4_INSTALL_TOOLS_BIN_DIR} COMPONENT toolsapplications
 )
diff --git a/mfhdf/hrepack/CMakeTests.cmake b/mfhdf/hrepack/CMakeTests.cmake
index 2784424..5642209 100644
--- a/mfhdf/hrepack/CMakeTests.cmake
+++ b/mfhdf/hrepack/CMakeTests.cmake
@@ -24,16 +24,16 @@
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_MFHDF_HREPACK_SOURCE_DIR}/${h4_file} ${dest}
     )
-  endforeach (h4_file ${HDF4_REPACK_TEST_FILES})
+  endforeach ()
 
 #-- Adding test for test_hrepack for generating testfiles
   add_executable (test_hrepack ${HDF4_MFHDF_HREPACK_SOURCE_DIR}/hrepacktst.c)
   TARGET_C_PROPERTIES (test_hrepack STATIC " " " ")
   if (HDF4_BUILD_XDR_LIB)
     target_link_libraries (test_hrepack ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS} ${HDF4_MF_XDR_LIB_TARGET})
-  else (HDF4_BUILD_XDR_LIB)
+  else ()
     target_link_libraries (test_hrepack ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-  endif (HDF4_BUILD_XDR_LIB)
+  endif ()
   TARGET_NAMING (test_hrepack STATIC)
 
   macro (ADD_H4_TEST testname testtype testfile)
@@ -44,7 +44,7 @@
             COMMAND ${CMAKE_COMMAND} -E echo "SKIP  -v -i ${PROJECT_BINARY_DIR}/${testfile} -o ${PROJECT_BINARY_DIR}/out-${testname}.${testfile} ${ARGN}"
         )
       endif (NOT HDF4_ENABLE_USING_MEMCHECKER)
-    else ("${testtype}" STREQUAL "SKIP")
+    else ()
       add_test (
           NAME HREPACK-${testname}-clearall-objects
           COMMAND    ${CMAKE_COMMAND}
@@ -62,8 +62,8 @@
           COMMAND $<TARGET_FILE:hdiff> ${PROJECT_BINARY_DIR}/${testfile} ${PROJECT_BINARY_DIR}/out-${testname}.${testfile}
       )
       set_tests_properties (HREPACK-${testname}_DFF PROPERTIES DEPENDS HREPACK-${testname} LABELS ${PROJECT_NAME})
-    endif ("${testtype}" STREQUAL "SKIP")
-  endmacro (ADD_H4_TEST)
+    endif ()
+  endmacro ()
 
 ##############################################################################
 ##############################################################################
@@ -95,7 +95,7 @@
             -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
     )
     set_tests_properties (HREPACK-hrepack_check PROPERTIES DEPENDS HREPACK-hrepack-clearall-objects LABELS ${PROJECT_NAME})
-  endif (NOT HDF4_ENABLE_USING_MEMCHECKER)
+  endif ()
 
   if (NOT HDF4_ENABLE_USING_MEMCHECKER)
     add_test (
@@ -110,7 +110,7 @@
             -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
     )
     set_tests_properties (HREPACK-hrepack_help PROPERTIES DEPENDS HREPACK-hrepack-clearall-objects LABELS ${PROJECT_NAME})
-  endif (NOT HDF4_ENABLE_USING_MEMCHECKER)
+  endif ()
 
   add_test (NAME HREPACK-test_hrepack COMMAND $<TARGET_FILE:test_hrepack>)
   set_tests_properties (HREPACK-test_hrepack PROPERTIES DEPENDS HREPACK-hrepack-clearall-objects LABELS ${PROJECT_NAME})
@@ -163,9 +163,9 @@
    #
    if (H4_HAVE_SZIP_ENCODER)
      ADD_H4_TEST(SDSSZIP_CHUNK "TEST" ${HREPACK_FILE1} -t "dset4:SZIP 8,EC" -c dset4:10x8)
-   else (H4_HAVE_SZIP_ENCODER)
+   else ()
      ADD_H4_TEST(SDSSZIP_CHUNK "SKIP" ${HREPACK_FILE1} -c dset4:10x8)
-   endif (H4_HAVE_SZIP_ENCODER)
+   endif ()
 #if defined (H4_HAVE_LIBSZ)
 #    if (SZ_encoder_enabled())
 #    {
@@ -199,9 +199,9 @@
    #
    if (H4_HAVE_SZIP_ENCODER)
      ADD_H4_TEST(SDS_CHUNK "TEST" ${HREPACK_FILE1} -t "dset4:GZIP 9" -t dset5:RLE -t "dset6:HUFF 2" -t "dset7:SZIP 8,EC" -c dset4:10x8 -c dset5:10x8 -c dset6:10x8)
-   else (H4_HAVE_SZIP_ENCODER)
+   else ()
      ADD_H4_TEST(SDS_CHUNK "TEST" ${HREPACK_FILE1} -t "dset4:GZIP 9" -t dset5:RLE -t "dset6:HUFF 2" -c dset4:10x8 -c dset5:10x8 -c dset6:10x8)
-   endif (H4_HAVE_SZIP_ENCODER)
+   endif ()
 
 #    if ( sds_verifiy_comp("dset4",COMP_CODE_DEFLATE, 9) == -1)
 #        goto out;
@@ -230,9 +230,9 @@
    #
    if (H4_HAVE_SZIP_ENCODER)
      ADD_H4_TEST(SEL_NOCHUNK "TEST" ${HREPACK_FILE1} -t "dset4:GZIP 9" -t dset5:RLE -t "dset6:HUFF 2" -t "dset7:SZIP 4,EC")
-   else (H4_HAVE_SZIP_ENCODER)
+   else ()
      ADD_H4_TEST(SEL_NOCHUNK "TEST" ${HREPACK_FILE1} -t "dset4:GZIP 9" -t dset5:RLE -t "dset6:HUFF 2")
-   endif (H4_HAVE_SZIP_ENCODER)
+   endif ()
 
 #    if ( sds_verifiy_comp("dset4",COMP_CODE_DEFLATE, 9) == -1)
 #        goto out;
diff --git a/mfhdf/hrepack/Makefile.in b/mfhdf/hrepack/Makefile.in
index a7c117b..254fd15 100644
--- a/mfhdf/hrepack/Makefile.in
+++ b/mfhdf/hrepack/Makefile.in
@@ -459,6 +459,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/mfhdf/hrepack/hrepack.c b/mfhdf/hrepack/hrepack.c
index 7295210..4191d28 100644
--- a/mfhdf/hrepack/hrepack.c
+++ b/mfhdf/hrepack/hrepack.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack.h b/mfhdf/hrepack/hrepack.h
index d05726c..94ab887 100644
--- a/mfhdf/hrepack/hrepack.h
+++ b/mfhdf/hrepack/hrepack.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack_an.c b/mfhdf/hrepack/hrepack_an.c
index 767932f..0e6c7f0 100644
--- a/mfhdf/hrepack/hrepack_an.c
+++ b/mfhdf/hrepack/hrepack_an.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack_an.h b/mfhdf/hrepack/hrepack_an.h
index 0c09ed8..9c25032 100644
--- a/mfhdf/hrepack/hrepack_an.h
+++ b/mfhdf/hrepack/hrepack_an.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack_dim.c b/mfhdf/hrepack/hrepack_dim.c
index aca83d0..63ac447 100644
--- a/mfhdf/hrepack/hrepack_dim.c
+++ b/mfhdf/hrepack/hrepack_dim.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack_gr.c b/mfhdf/hrepack/hrepack_gr.c
index 148102d..990d106 100644
--- a/mfhdf/hrepack/hrepack_gr.c
+++ b/mfhdf/hrepack/hrepack_gr.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack_gr.h b/mfhdf/hrepack/hrepack_gr.h
index 8a937b4..a4a6ef1 100644
--- a/mfhdf/hrepack/hrepack_gr.h
+++ b/mfhdf/hrepack/hrepack_gr.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack_list.c b/mfhdf/hrepack/hrepack_list.c
index c807cae..1f5a7c6 100644
--- a/mfhdf/hrepack/hrepack_list.c
+++ b/mfhdf/hrepack/hrepack_list.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack_lsttable.c b/mfhdf/hrepack/hrepack_lsttable.c
index 4391b1e..8db2cd3 100644
--- a/mfhdf/hrepack/hrepack_lsttable.c
+++ b/mfhdf/hrepack/hrepack_lsttable.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include <stdio.h>
diff --git a/mfhdf/hrepack/hrepack_lsttable.h b/mfhdf/hrepack/hrepack_lsttable.h
index c831d6d..a8599fb 100644
--- a/mfhdf/hrepack/hrepack_lsttable.h
+++ b/mfhdf/hrepack/hrepack_lsttable.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack_main.c b/mfhdf/hrepack/hrepack_main.c
index 6828449..baa037f 100644
--- a/mfhdf/hrepack/hrepack_main.c
+++ b/mfhdf/hrepack/hrepack_main.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "hdf.h"
diff --git a/mfhdf/hrepack/hrepack_opttable.c b/mfhdf/hrepack/hrepack_opttable.c
index 946ad32..c659554 100644
--- a/mfhdf/hrepack/hrepack_opttable.c
+++ b/mfhdf/hrepack/hrepack_opttable.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack_opttable.h b/mfhdf/hrepack/hrepack_opttable.h
index 166f1e4..b2ebf32 100644
--- a/mfhdf/hrepack/hrepack_opttable.h
+++ b/mfhdf/hrepack/hrepack_opttable.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack_parse.c b/mfhdf/hrepack/hrepack_parse.c
index ed6a0e5..512df15 100644
--- a/mfhdf/hrepack/hrepack_parse.c
+++ b/mfhdf/hrepack/hrepack_parse.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack_parse.h b/mfhdf/hrepack/hrepack_parse.h
index a17f149..b84ca7d 100644
--- a/mfhdf/hrepack/hrepack_parse.h
+++ b/mfhdf/hrepack/hrepack_parse.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack_sds.c b/mfhdf/hrepack/hrepack_sds.c
index 00a6c15..ac62f6d 100644
--- a/mfhdf/hrepack/hrepack_sds.c
+++ b/mfhdf/hrepack/hrepack_sds.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack_sds.h b/mfhdf/hrepack/hrepack_sds.h
index 179af78..442a1df 100644
--- a/mfhdf/hrepack/hrepack_sds.h
+++ b/mfhdf/hrepack/hrepack_sds.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack_utils.c b/mfhdf/hrepack/hrepack_utils.c
index 5312942..19f13f1 100644
--- a/mfhdf/hrepack/hrepack_utils.c
+++ b/mfhdf/hrepack/hrepack_utils.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack_utils.h b/mfhdf/hrepack/hrepack_utils.h
index 2473cdd..30aa81d 100644
--- a/mfhdf/hrepack/hrepack_utils.h
+++ b/mfhdf/hrepack/hrepack_utils.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack_vg.c b/mfhdf/hrepack/hrepack_vg.c
index 588451e..6fad770 100644
--- a/mfhdf/hrepack/hrepack_vg.c
+++ b/mfhdf/hrepack/hrepack_vg.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack_vs.c b/mfhdf/hrepack/hrepack_vs.c
index 6ce3dd3..167ed26 100644
--- a/mfhdf/hrepack/hrepack_vs.c
+++ b/mfhdf/hrepack/hrepack_vs.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepack_vs.h b/mfhdf/hrepack/hrepack_vs.h
index 6945ee5..9b3d305 100644
--- a/mfhdf/hrepack/hrepack_vs.h
+++ b/mfhdf/hrepack/hrepack_vs.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/hrepack/hrepacktst.c b/mfhdf/hrepack/hrepacktst.c
index 33db075..069c58e 100644
--- a/mfhdf/hrepack/hrepacktst.c
+++ b/mfhdf/hrepack/hrepacktst.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "hdf.h"
diff --git a/mfhdf/hrepack/pal_rgb.h b/mfhdf/hrepack/pal_rgb.h
index 8c445bf..81f02d8 100644
--- a/mfhdf/hrepack/pal_rgb.h
+++ b/mfhdf/hrepack/pal_rgb.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
diff --git a/mfhdf/libsrc/CMakeLists.txt b/mfhdf/libsrc/CMakeLists.txt
index 3b9128a..45952db 100644
--- a/mfhdf/libsrc/CMakeLists.txt
+++ b/mfhdf/libsrc/CMakeLists.txt
@@ -7,9 +7,9 @@ PROJECT (HDF4_MFHDF_LIBSRC C CXX)
 if (WIN32)
   set (H4_WINDOWS_INCLUDE_FILE "#include <hdfi.h>")
   set (NETCDF_EXTERN HDFLIBAPI)
-else (WIN32)
+else ()
   set (NETCDF_EXTERN extern)
-endif (WIN32)
+endif ()
 
 set (NC_OLD_FILLVALUES 0)
 
@@ -47,16 +47,10 @@ set (HDF4_MFHDF_LIBSRC_CHDRS
 if (HDF4_ENABLE_NETCDF)
   configure_file (${HDF4_MFHDF_LIBSRC_SOURCE_DIR}/netcdf.h.in ${HDF4_BINARY_DIR}/netcdf.h)
   set (HDF4_MFHDF_LIBSRC_XCHDRS ${HDF4_BINARY_DIR}/netcdf.h)
-else (HDF4_ENABLE_NETCDF)
+else ()
   configure_file (${HDF4_MFHDF_LIBSRC_SOURCE_DIR}/netcdf.h.in ${HDF4_BINARY_DIR}/hdf4_netcdf.h)
   set (HDF4_MFHDF_LIBSRC_XCHDRS ${HDF4_BINARY_DIR}/hdf4_netcdf.h)
-endif (HDF4_ENABLE_NETCDF)
-
-if (CYGWIN)
-  INCLUDE_DIRECTORIES (/usr/include/tirpc)
-else (CYGWIN)
-  INCLUDE_DIRECTORIES (/usr/include/rpc)
-endif (CYGWIN)
+endif ()
 
 INCLUDE_DIRECTORIES (${HDF4_HDFSOURCE_DIR})
 INCLUDE_DIRECTORIES (${HDF4_MFHDFSOURCE_DIR})
@@ -65,7 +59,7 @@ add_library (${HDF4_MF_LIB_TARGET} STATIC ${HDF4_MFHDF_LIBSRC_CSRCS} ${HDF4_MFHD
 if (HDF4_BUILD_XDR_LIB)
   INCLUDE_DIRECTORIES (${HDF4_MFHDF_XDR_DIR})
   target_link_libraries (${HDF4_MF_LIB_TARGET} ${HDF4_MF_XDR_LIB_TARGET})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 TARGET_C_PROPERTIES (${HDF4_MF_LIB_TARGET} STATIC " " " ")
 target_link_libraries (${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET})
 set_global_variable (HDF4_LIBRARIES_TO_EXPORT "${HDF4_LIBRARIES_TO_EXPORT};${HDF4_MF_LIB_TARGET}")
@@ -79,8 +73,8 @@ if (WIN32)
   set_property (TARGET ${HDF4_MF_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "DOS_FS;SWAP")
   if (HDF4_BUILD_XDR_LIB)
     set_property (TARGET ${HDF4_MF_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "NO_SYS_XDR_INC")
-  endif (HDF4_BUILD_XDR_LIB)
-endif (WIN32)
+  endif ()
+endif ()
 set (install_targets ${HDF4_MF_LIB_TARGET})
 
 if (BUILD_SHARED_LIBS)
@@ -88,7 +82,7 @@ if (BUILD_SHARED_LIBS)
   if (HDF4_BUILD_XDR_LIB)
     INCLUDE_DIRECTORIES (${HDF4_MFHDF_XDR_DIR})
     target_link_libraries (${HDF4_MF_LIBSH_TARGET} ${HDF4_MF_XDR_LIBSH_TARGET})
-  endif (HDF4_BUILD_XDR_LIB)
+  endif ()
   TARGET_C_PROPERTIES (${HDF4_MF_LIBSH_TARGET} SHARED " " " ")
   target_link_libraries (${HDF4_MF_LIBSH_TARGET} ${HDF4_SRC_LIBSH_TARGET})
   set_global_variable (HDF4_LIBRARIES_TO_EXPORT "${HDF4_LIBRARIES_TO_EXPORT};${HDF4_MF_LIBSH_TARGET}")
@@ -103,10 +97,10 @@ if (BUILD_SHARED_LIBS)
     set_property (TARGET ${HDF4_MF_LIBSH_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "DOS_FS;SWAP")
     if (HDF4_BUILD_XDR_LIB)
       set_property (TARGET ${HDF4_MF_LIBSH_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "NO_SYS_XDR_INC")
-    endif (HDF4_BUILD_XDR_LIB)
-  endif (WIN32)
+    endif ()
+  endif ()
   set (install_targets ${install_targets} ${HDF4_MF_LIBSH_TARGET})
-endif (BUILD_SHARED_LIBS)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Add file(s) to CMake Install
@@ -125,7 +119,8 @@ install (
 #-----------------------------------------------------------------------------
 if (BUILD_SHARED_LIBS)
   INSTALL_TARGET_PDB (${HDF4_MF_LIBSH_TARGET} ${HDF4_INSTALL_BIN_DIR} libraries)
-endif (BUILD_SHARED_LIBS)
+endif ()
+INSTALL_TARGET_PDB (${HDF4_MF_LIB_TARGET} ${HDF4_INSTALL_BIN_DIR} libraries)
 
 install (
     TARGETS
@@ -136,4 +131,5 @@ install (
     ARCHIVE DESTINATION ${HDF4_INSTALL_LIB_DIR} COMPONENT libraries
     RUNTIME DESTINATION ${HDF4_INSTALL_BIN_DIR} COMPONENT libraries
     FRAMEWORK DESTINATION ${HDF4_INSTALL_FWRK_DIR} COMPONENT libraries
+    INCLUDES DESTINATION include
 )
diff --git a/mfhdf/libsrc/Makefile.in b/mfhdf/libsrc/Makefile.in
index 799c817..e862c1e 100644
--- a/mfhdf/libsrc/Makefile.in
+++ b/mfhdf/libsrc/Makefile.in
@@ -297,6 +297,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/mfhdf/libsrc/alloc.h b/mfhdf/libsrc/alloc.h
index 1058765..af64e48 100644
--- a/mfhdf/libsrc/alloc.h
+++ b/mfhdf/libsrc/alloc.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: alloc.h 4933 2007-09-08 03:33:59Z bmribler $ */
+/* $Id$ */
 #ifndef _ALLOC_H_
 #define _ALLOC_H_
 
diff --git a/mfhdf/libsrc/array.c b/mfhdf/libsrc/array.c
index 3416497..98d9a11 100644
--- a/mfhdf/libsrc/array.c
+++ b/mfhdf/libsrc/array.c
@@ -1,20 +1,20 @@
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright 1993, University Corporation for Atmospheric Research	     *
+ * Copyright 1993, University Corporation for Atmospheric Research	         *
  * See netcdf/COPYRIGHT file for copying and redistribution conditions.      *
- *									     *
+ *                                                                           *
  * Copyright by The HDF Group.                                               *
  * Copyright by the Board of Trustees of the University of Illinois.         *
  * All rights reserved.                                                      *
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/*	$Id: array.c 6431 2016-06-14 13:48:03Z bmribler $ */
+/*	$Id$ */
 
 #include	<string.h>
 #include	"local_nc.h"
diff --git a/mfhdf/libsrc/attr.c b/mfhdf/libsrc/attr.c
index 6139fcd..eef0f5c 100644
--- a/mfhdf/libsrc/attr.c
+++ b/mfhdf/libsrc/attr.c
@@ -8,13 +8,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/*	$Id: attr.c 4963 2007-09-15 17:20:52Z bmribler $ */
+/*	$Id$ */
 
 #include	<string.h> 
 #include	"local_nc.h"
diff --git a/mfhdf/libsrc/cdf.c b/mfhdf/libsrc/cdf.c
index 579fada..753e893 100644
--- a/mfhdf/libsrc/cdf.c
+++ b/mfhdf/libsrc/cdf.c
@@ -8,13 +8,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/*	$Id: cdf.c 6450 2016-06-16 06:38:24Z bmribler $ */
+/*	$Id$ */
 
 #include	"local_nc.h"
 #include	"alloc.h"
diff --git a/mfhdf/libsrc/dim.c b/mfhdf/libsrc/dim.c
index 75279a8..07252dc 100644
--- a/mfhdf/libsrc/dim.c
+++ b/mfhdf/libsrc/dim.c
@@ -8,13 +8,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/*	$Id: dim.c 5584 2011-04-13 18:25:06Z bmribler $ */
+/*	$Id$ */
 
 #include	<string.h>
 #include	"local_nc.h"
diff --git a/mfhdf/libsrc/error.c b/mfhdf/libsrc/error.c
index 8a3e78c..8cf2df6 100644
--- a/mfhdf/libsrc/error.c
+++ b/mfhdf/libsrc/error.c
@@ -8,10 +8,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /* $Id: error.c,v 1.14 90/02/23 16:08:55 davis Exp */
diff --git a/mfhdf/libsrc/error.h b/mfhdf/libsrc/error.h
index 8812dc2..ee3e412 100644
--- a/mfhdf/libsrc/error.h
+++ b/mfhdf/libsrc/error.h
@@ -8,13 +8,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: error.h 5444 2010-08-25 16:40:05Z byrn $ */
+/* $Id$ */
 #ifndef _NC_ERROR_
 #define _NC_ERROR_
 
diff --git a/mfhdf/libsrc/file.c b/mfhdf/libsrc/file.c
index b7aa3f3..db4d24b 100644
--- a/mfhdf/libsrc/file.c
+++ b/mfhdf/libsrc/file.c
@@ -8,13 +8,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/*	$Id: file.c 6036 2014-01-20 17:28:01Z acheng $ */
+/*	$Id$ */
 
 #ifdef DEBUG
 #include <assert.h>
diff --git a/mfhdf/libsrc/globdef.c b/mfhdf/libsrc/globdef.c
index 807590b..5170b4c 100644
--- a/mfhdf/libsrc/globdef.c
+++ b/mfhdf/libsrc/globdef.c
@@ -8,15 +8,15 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /*
  *
- * $Id: globdef.c 5457 2010-09-07 17:21:51Z byrn $
+ * $Id$
  *
  * This file initializes all global variables.  It's a separate file in order
  * to allow the creation of SunOS sharable-libraries.
diff --git a/mfhdf/libsrc/hdf2netcdf.h b/mfhdf/libsrc/hdf2netcdf.h
index e39dde1..d787785 100644
--- a/mfhdf/libsrc/hdf2netcdf.h
+++ b/mfhdf/libsrc/hdf2netcdf.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdf2netcdf.h 5443 2010-08-24 20:52:13Z byrn $ */
+/* $Id$ */
 
 #include "h4config.h"
 #include "H4api_adpt.h"
diff --git a/mfhdf/libsrc/hdfnctest.c b/mfhdf/libsrc/hdfnctest.c
index 02af1f5..d4f16d7 100644
--- a/mfhdf/libsrc/hdfnctest.c
+++ b/mfhdf/libsrc/hdfnctest.c
@@ -4,10 +4,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "mfhdf.h"
diff --git a/mfhdf/libsrc/hdfsds.c b/mfhdf/libsrc/hdfsds.c
index 3e8d172..dd3e048 100644
--- a/mfhdf/libsrc/hdfsds.c
+++ b/mfhdf/libsrc/hdfsds.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: hdfsds.c 6441 2016-06-14 21:31:36Z bmribler $ */
+/* $Id$ */
 
 /***************************************************************************
  *
@@ -48,6 +48,21 @@
  hdf_query_seen_sdg
  hdf_register_seen_sdg
  hdf_read_ndgs
+ hdf_check_nt
+
+ These functions were added in 2.13, Jun, 2017 as a result of refactoring
+ hdf_read_ndgs.
+ hdf_read_rank
+ hdf_read_dimsizes
+ hdf_read_NT
+ hdf_get_sdc
+ hdf_get_pred_str_attr
+ hdf_get_desc_annot
+ hdf_get_label_annot
+ hdf_luf_to_attrs
+ hdf_get_rangeinfo
+ hdf_get_cal
+
 
  PUBLIC ROUTINES
  ===============
@@ -64,12 +79,6 @@
 
 #define SDG_MAX_INITIAL 100
 
-/* local macros */
-/* A variation of HGOTO_ERROR macro, but instead of label "done:",
-   it is for label "done_adesc:", which is only in this file. */
-#define HGOTO_ADESC_ERROR(err, ret_val) {HERROR(err); ret_value = ret_val; \
-                                   goto done_adesc;}
-
 /* local variables */
 PRIVATE intn       sdgCurrent;
 PRIVATE intn       sdgMax;
@@ -166,7 +175,6 @@ hdf_register_seen_sdg(uint16 sdgRef)
 done:
     if (ret_value == FAIL)
       { /* Failure cleanup */
-
       }
     /* Normal cleanup */
 
@@ -175,7 +183,7 @@ done:
 
 /******************************************************************************
  NAME
-   hdf_check_nt - internal utility function
+   hdf_check_nt - Checks format of number type
 
  DESCRIPTION
    Test if data was stored in native format of different machine or in the
@@ -187,7 +195,8 @@ done:
    SUCCEED / FAIL
 
 ******************************************************************************/
-intn hdf_check_nt(uint8 *ntstring, int32 *type)
+PRIVATE intn
+hdf_check_nt(uint8 *ntstring, int32 *type)
 {
     intn ret_value = SUCCEED;
     if ((ntstring[0] != DFNT_VERSION)
@@ -205,11 +214,809 @@ intn hdf_check_nt(uint8 *ntstring, int32 *type)
             }
         }  /* machine type */
     }   /* Little Endian */
+
     return(ret_value);
 } /* hdf_check_nt */
 
 /******************************************************************************
  NAME
+   hdf_read_rank - Reads the rank from file
+
+ DESCRIPTION
+   (Refactored from hdf_read_ndgs - Jun, 2017)
+
+ RETURNS
+   rank / FAIL
+   DFE_NONE / <error code>
+
+******************************************************************************/
+PRIVATE hdf_err_code_t
+hdf_read_rank(int32 acc_id, int16 *rank)
+{
+    CONSTR(FUNC, "hdf_read_rank");        /* for HERROR */
+    uint8 *p, *local_buf = NULL;
+    hdf_err_code_t  ret_value = DFE_NONE;
+
+    local_buf = (uint8 *)HDmalloc(2 * sizeof(uint8));
+    if (local_buf == NULL)
+    {
+        HGOTO_ERROR(DFE_NOSPACE, DFE_NOSPACE);
+    }
+
+    /* read and extract the rank */
+    if (Hread(acc_id, (int32) 2, local_buf) == FAIL) 
+    {
+        HGOTO_ERROR(DFE_READERROR, DFE_READERROR);
+    }
+    else
+    {
+        int16 temp_rank = 0;
+        p = local_buf;
+        INT16DECODE(p, temp_rank);
+        if (temp_rank > 0)  /* what about the case of rank=0? -BMR */
+        {
+            *rank = temp_rank;
+            HDfree(local_buf);
+        }
+        else
+            HGOTO_ERROR(DFE_RANGE, DFE_RANGE);
+    }
+
+done:
+    if (ret_value != DFE_NONE)
+      { /* Failure cleanup */
+        if (local_buf != NULL)
+            HDfree(local_buf);
+      }
+
+    /* return DFE_NONE or error code */
+    return(ret_value);
+} /* hdf_read_rank */
+
+/******************************************************************************
+ NAME
+   hdf_read_dimsizes - Reads the dimensions' size from file
+
+ DESCRIPTION
+   (Refactored from hdf_read_ndgs - Jun, 2017)
+
+ RETURNS
+   DFE_NONE / <error code>
+
+******************************************************************************/
+PRIVATE hdf_err_code_t
+hdf_read_dimsizes(int32 acc_id, int16 rank, int32* dimsizes)
+{
+    CONSTR(FUNC, "hdf_read_dimsizes");        /* for HERROR */
+    uint8 *p, *local_buf = NULL;
+    intn i;
+    hdf_err_code_t ret_value = DFE_NONE;
+
+    local_buf = (uint8 *)HDmalloc(4 * (size_t)rank * sizeof(uint8));
+    if (local_buf == NULL)
+    {
+        HGOTO_ERROR(DFE_NOSPACE, DFE_NOSPACE);
+    }
+
+    /* read dimension record */
+    if (Hread(acc_id, (int32) 4 * rank, local_buf) == FAIL) 
+    {
+        HGOTO_ERROR(DFE_READERROR, DFE_READERROR);
+    }
+
+    p = local_buf;
+    for (i = 0; i < rank; i++)
+    {
+        int32 dim_size = 0;
+        INT32DECODE(p, dim_size);
+        if (dim_size < 0)
+        {
+            HGOTO_ERROR(DFE_RANGE, DFE_RANGE);
+        }
+        else
+            dimsizes[i] = dim_size;
+    }
+    HDfree(local_buf);
+
+done:
+    if (ret_value != DFE_NONE)
+      { /* Failure cleanup */
+        if (local_buf != NULL)
+            HDfree(local_buf);
+      }
+
+    /* return DFE_NONE or error code */
+    return(ret_value);
+} /* hdf_read_dimsizes */
+
+/******************************************************************************
+ NAME
+   hdf_read_NT - Reads NT from file and stores in provided buffer
+
+ DESCRIPTION
+   (Refactored from hdf_read_ndgs - Jun, 2017)
+
+ RETURNS
+   DFE_NONE / <error code>
+
+******************************************************************************/
+PRIVATE hdf_err_code_t
+hdf_read_NT(int32 acc_id, NC *handle, uint8 *ntstring_buf)
+{
+    CONSTR(FUNC, "hdf_read_NT");        /* for HERROR */
+    uint16 ntTag;
+    uint16 ntRef;
+    uint8 *p, *local_buf = NULL;
+    hdf_err_code_t ret_value = DFE_NONE;
+
+    local_buf = (uint8 *)HDmalloc(4 * sizeof(uint8));
+    if (local_buf == NULL)
+    {
+        HGOTO_ERROR(DFE_NOSPACE, DFE_NOSPACE);
+    }
+
+    if (Hread(acc_id,(int32) 4, local_buf) == FAIL) 
+    {
+        HGOTO_ERROR(DFE_READERROR, DFE_READERROR);
+    }
+
+    p = local_buf;
+    UINT16DECODE(p, ntTag);
+    UINT16DECODE(p, ntRef);
+
+    /* read NT of this scale (dimension) */
+    if (Hgetelement(handle->hdf_file, ntTag, ntRef, ntstring_buf) == FAIL)
+    {
+        HGOTO_ERROR(DFE_GETELEM, DFE_GETELEM);
+    }
+    HDfree(local_buf);
+
+done:
+    if (ret_value != DFE_NONE)
+      { /* Failure cleanup */
+        if (local_buf != NULL)
+            HDfree(local_buf);
+      }
+
+    /* return DFE_NONE or error code */
+    return(ret_value);
+} /* hdf_read_NT */
+
+/******************************************************************************
+ NAME
+   hdf_get_sdc - Reads coordsys and stores in an attribute.
+
+ DESCRIPTION
+   (Refactored from hdf_read_ndgs - Jun, 2017)
+
+ RETURNS
+   DFE_NONE / <error code>
+
+******************************************************************************/
+PRIVATE hdf_err_code_t
+hdf_get_sdc(NC *handle, uint16 tmpRef, NC_attr **tmp_attr, intn *curr_attr)
+{
+    CONSTR(FUNC, "hdf_get_sdc");        /* for HERROR */
+    uint8 *coordbuf = NULL; /* buffer to store coord system info */
+    int len;
+    hdf_err_code_t ret_value = DFE_NONE;
+
+    len = Hlength(handle->hdf_file, DFTAG_SDC, tmpRef);
+    if (len == FAIL)
+    {
+        HGOTO_ERROR(DFE_INTERNAL, DFE_INTERNAL);
+    }
+
+    coordbuf = (uint8 *) HDmalloc((uint32) len + 1);
+    if (NULL == coordbuf)
+    {
+        HGOTO_ERROR(DFE_NOSPACE, DFE_NOSPACE);
+    }
+
+    if (Hgetelement(handle->hdf_file, DFTAG_SDC, tmpRef, coordbuf) == FAIL)
+    {
+        HDfreespace((VOIDP)coordbuf);
+        HGOTO_ERROR(DFE_GETELEM, DFE_GETELEM);
+    }
+
+    coordbuf[len] = '\0';
+    if (coordbuf[0] != '\0')
+    {
+        *tmp_attr = (NC_attr *) NC_new_attr(_HDF_CoordSys, NC_CHAR, HDstrlen(coordbuf), coordbuf);
+        if (*tmp_attr == NULL)
+        {
+            HGOTO_ERROR(DFE_INTERNAL, DFE_INTERNAL);
+        }
+        else
+        {
+            (*tmp_attr)->HDFtype = DFNT_CHAR;
+            tmp_attr++;
+            (*curr_attr)++;
+        }
+    }
+    HDfreespace((VOIDP)coordbuf);
+done:
+    if (ret_value != DFE_NONE)
+      { /* Failure cleanup */
+        if (coordbuf != NULL)
+            HDfreespace((VOIDP)coordbuf);
+      }
+    /* Normal cleanup */
+
+    return ret_value;
+} /* hdf_get_sdc */
+
+/******************************************************************************
+ NAME
+   hdf_get_pred_str_attr - Reads predefined string.
+
+ DESCRIPTION
+   Reads predefined strings and returns the buffer containing the values.
+   (Refactored from hdf_read_ndgs - Jun, 2017)
+
+ RETURNS
+   Buffer of predefined string or NULL
+
+******************************************************************************/
+uint8 *hdf_get_pred_str_attr(NC *handle, uint16 stratt_tag, uint16 satt_ref, int null_count)
+{
+    CONSTR(FUNC, "hdf_get_pred_str_attr");        /* for HERROR */
+    uint8 *tmpbuf = NULL; /* buffer to store predefined string attribute info */
+    intn i;
+    uint8 *ret_value = NULL;
+
+    if(satt_ref) 
+    {
+        int len;
+
+        /*
+         *  Add three NULLS to the end to account for a bug in HDF 3.2r1-3
+         */
+
+        len = Hlength(handle->hdf_file, stratt_tag, satt_ref);
+        if(len == FAIL) 
+        {
+            HGOTO_ERROR(DFE_INTERNAL, NULL);
+        }
+                
+        tmpbuf = (uint8 *) HDmalloc((uint32) len + 3);
+        if(NULL == tmpbuf) 
+        {
+            HGOTO_ERROR(DFE_NOSPACE, NULL);
+        }
+
+        if(Hgetelement(handle->hdf_file, stratt_tag, satt_ref, tmpbuf) == FAIL)
+        {
+            HGOTO_ERROR(DFE_GETELEM, NULL);
+        }
+                
+        for (i = null_count-1; i >= 0; i--)
+            tmpbuf[len + i] = '\0';
+    }
+    ret_value = tmpbuf;
+
+done:
+    if (ret_value == NULL)
+      { /* Failure cleanup */
+        if (tmpbuf != NULL)
+            HDfree(tmpbuf);
+      }
+
+    /* return the string attribute */
+    return(ret_value);
+
+} /* hdf_get_pred_str_attr */
+            
+/******************************************************************************
+ NAME
+   hdf_get_desc_annot - Reads description annotation and stores in an attribute
+
+ DESCRIPTION
+   (Refactored from hdf_read_ndgs - Jun, 2017)
+
+ RETURNS
+   DFE_NONE / <error code>
+
+******************************************************************************/
+PRIVATE hdf_err_code_t
+hdf_get_desc_annot(NC* handle, uint16 ndgTag, uint16 ndgRef, NC_attr **tmp_attr, intn *curr_attr)
+{
+    CONSTR(FUNC, "hdf_get_desc_annot");        /* for HERROR */
+    intn i;
+    hdf_err_code_t ret_value = DFE_NONE;
+
+    /* Re-vamped desc annotation handling to use new ANxxx interface 
+     *  -georgev 6/11/97 */
+    int32  an_handle   = FAIL;
+    int32  *ddescs    = NULL;
+    char   *ann_desc  = NULL;
+    int32  ann_len;
+    intn   num_ddescs;
+    char   hremark[30] = ""; /* should be big enough for new attribute */
+
+    /* start Annotation inteface */
+    if ((an_handle = ANstart(handle->hdf_file)) == FAIL)
+    {
+        HGOTO_ERROR(DFE_ANAPIERROR, DFE_ANAPIERROR);
+    }
+
+    /* Get number of data descs with this tag/ref */
+    num_ddescs = ANnumann(an_handle, AN_DATA_DESC, ndgTag, ndgRef);
+    if (num_ddescs != 0)
+    {
+        /* allocate space for list of desc annotation id's with this tag/ref */
+        if ((ddescs = (int32 *)HDmalloc(num_ddescs * sizeof(int32))) == NULL)
+        {
+            HGOTO_ERROR(DFE_NOSPACE, DFE_ANAPIERROR);
+        }
+
+        /* get list of desc annotations id's with this tag/ref */
+        if (ANannlist(an_handle, AN_DATA_DESC, ndgTag, ndgRef, ddescs) != num_ddescs)
+        {
+            HGOTO_ERROR(DFE_ANAPIERROR, DFE_ANAPIERROR);
+        }
+
+        /* loop through desc list. */
+        for (i = 0; i < num_ddescs; i++)
+        {
+            if ((ann_len = ANannlen(ddescs[i])) == FAIL)
+            {
+                HGOTO_ERROR(DFE_ANAPIERROR, DFE_ANAPIERROR);
+            }
+        
+            /* allocate space for desc */
+            if (ann_desc == NULL)
+            {
+                if ((ann_desc = (char *)HDmalloc((ann_len+1)*sizeof(char))) == NULL)
+                {
+                    HGOTO_ERROR(DFE_NOSPACE, DFE_NOSPACE);
+                }
+                HDmemset(ann_desc,'\0', ann_len+1);
+            }
+      
+            /* read desc */
+            if (ANreadann(ddescs[i], ann_desc, ann_len+1) == FAIL)
+            {
+                HGOTO_ERROR(DFE_ANAPIERROR, DFE_ANAPIERROR);
+            }
+
+            /* make unique attribute */
+            sprintf(hremark,"%s-%d",_HDF_Remarks,i+1);
+                            
+            /* add it as an attribute */
+            *tmp_attr = (NC_attr *) NC_new_attr(hremark, NC_CHAR, 
+                                               HDstrlen(ann_desc), ann_desc);
+
+            if (NULL == *tmp_attr)
+            {
+                HGOTO_ERROR(DFE_INTERNAL, DFE_INTERNAL);
+            }
+            else
+            {
+                (*tmp_attr)->HDFtype = DFNT_CHAR;
+                tmp_attr++;
+                (*curr_attr)++;
+            }
+
+            /* end access */
+            ANendaccess(ddescs[i]);
+
+            /* free buffer */
+            if(ann_desc != NULL)
+            {
+                HDfree(ann_desc);
+                ann_desc = NULL;
+            }
+        }
+
+    } /* end if descs */
+
+done:
+    if (ret_value == DFE_NONE)
+      { /* Failure cleanup */
+        if(ddescs != NULL)
+            HDfree(ddescs);
+        if(an_handle != FAIL)
+            ANend(an_handle);
+      }
+    /* cleanup */
+
+    /* return the status */
+    return(ret_value);
+/* end annotation description conversion */
+} /* hdf_get_desc_annot */
+
+/******************************************************************************
+ NAME
+   hdf_get_pred_str_attr - Reads label annotation and stores in an attribute
+
+ DESCRIPTION
+   (Refactored from hdf_read_ndgs - Jun, 2017)
+
+ RETURNS
+   DFE_NONE / <error code>
+
+******************************************************************************/
+PRIVATE hdf_err_code_t
+hdf_get_label_annot(NC *handle, uint16 ndgTag, uint16 ndgRef, NC_attr **tmp_attr, intn *curr_attr)
+{
+    CONSTR(FUNC, "hdf_get_label_annot");        /* for HERROR */
+    intn i;
+    hdf_err_code_t ret_value = DFE_NONE;
+
+    /* Re-vamped label annotation handling to use new ANxxx interface 
+     *  -georgev 6/11/97 */
+    int32  an_handle   = FAIL;
+    int32  *dlabels    = NULL;
+    char   *ann_label  = NULL;
+    int32  ann_len;
+    intn   num_dlabels;
+    char   hlabel[30] = ""; /* should be big enough for new attribute */
+
+    /* start Annotation inteface */
+    if ((an_handle = ANstart(handle->hdf_file)) == FAIL)
+    {
+        HGOTO_ERROR(DFE_ANAPIERROR, DFE_ANAPIERROR);
+    }
+
+    /* Get number of data labels with this tag/ref */
+    num_dlabels = ANnumann(an_handle, AN_DATA_LABEL, ndgTag, ndgRef);
+
+    if (num_dlabels != 0)
+    {
+        /* allocate space for list of label annotation id's with this tag/ref */
+        if ((dlabels = (int32 *)HDmalloc(num_dlabels * sizeof(int32))) == NULL)
+        {
+            HGOTO_ERROR(DFE_ANAPIERROR, DFE_ANAPIERROR);
+        }
+
+        /* get list of label annotations id's with this tag/ref */
+        if (ANannlist(an_handle, AN_DATA_LABEL, ndgTag, ndgRef, dlabels) != num_dlabels)
+        {
+            HGOTO_ERROR(DFE_ANAPIERROR, DFE_ANAPIERROR);
+        }
+
+        /* loop through label list */
+        for (i = 0; i < num_dlabels; i++)
+        {
+            if ((ann_len = ANannlen(dlabels[i])) == FAIL)
+            {
+                HGOTO_ERROR(DFE_ANAPIERROR, DFE_ANAPIERROR);
+            }
+        
+            /* allocate space for label */
+            if (ann_label == NULL)
+            {
+                if ((ann_label = (char *)HDmalloc((ann_len+1)*sizeof(char))) == NULL)
+                {
+                    HGOTO_ERROR(DFE_ANAPIERROR, DFE_ANAPIERROR);
+                }
+                HDmemset(ann_label,'\0', ann_len+1);
+            }
+      
+            /* read label */
+            if (ANreadann(dlabels[i], ann_label, ann_len+1) == FAIL)
+            {
+                HGOTO_ERROR(DFE_ANAPIERROR, DFE_ANAPIERROR);
+            }
+
+            /* make unique attribute */
+            sprintf(hlabel,"%s-%d",_HDF_AnnoLabel,i+1);
+
+            /* add as attribute */
+            *tmp_attr = (NC_attr *) NC_new_attr(hlabel, NC_CHAR,
+                                               HDstrlen(ann_label), ann_label);
+
+            if (NULL == tmp_attr)
+            {
+                HGOTO_ERROR(DFE_ANAPIERROR, DFE_ANAPIERROR);
+            }
+            else
+            {
+                (*tmp_attr)->HDFtype = DFNT_CHAR;
+                tmp_attr++;
+                (*curr_attr)++;
+            }
+
+            /* end access */
+            ANendaccess(dlabels[i]);
+
+            /* free buffer */
+            if(ann_label != NULL)
+            {
+                HDfree(ann_label);
+                ann_label = NULL;
+            }
+        }
+    } /* end if labels */
+
+done:
+    if (ret_value == DFE_NONE)
+      { /* Failure cleanup */
+        if(dlabels != NULL)
+            HDfree(dlabels);
+        if(an_handle != FAIL)
+            ANend(an_handle);
+      }
+    /* cleanup */
+    /* return the status */
+    return(ret_value);
+
+/* end annotation label processing */
+} /* hdf_get_label_annot */
+
+/******************************************************************************
+ NAME
+   hdf_luf_to_attrs - Reads label, unit, and format strings and converts them
+                      into attributes.
+
+ DESCRIPTION
+   (Refactored from hdf_read_ndgs - Jun, 2017)
+
+ RETURNS
+   DFE_NONE / <error code>
+
+******************************************************************************/
+PRIVATE hdf_err_code_t
+hdf_luf_to_attrs(char *labelstr, char *unitstr, char *formatstr, NC_attr **tmp_attr, intn *curr_attr)
+{
+    CONSTR(FUNC, "hdf_luf_to_attrs");        /* for HERROR */
+    hdf_err_code_t ret_value = DFE_NONE;
+
+    /* label => "long_name"  */
+    if (labelstr && (labelstr[0] != '\0') > 0) 
+    {
+        *tmp_attr = (NC_attr *) NC_new_attr(_HDF_LongName, NC_CHAR,
+                           HDstrlen((char *)labelstr), (Void *) labelstr);
+
+        if (NULL == *tmp_attr)
+        {
+            HGOTO_ERROR(DFE_INTERNAL, DFE_INTERNAL);
+        }
+        else
+        {
+            (*tmp_attr)->HDFtype = DFNT_CHAR;
+            tmp_attr++;
+            (*curr_attr)++;
+        }
+    }
+
+    /* Units => 'units' */
+    if(unitstr && (unitstr[0] != '\0') > 0) 
+    {
+        *tmp_attr = (NC_attr *) NC_new_attr(_HDF_Units, NC_CHAR,
+                           HDstrlen((char *)unitstr), (Void *) unitstr);
+
+        if (NULL == *tmp_attr)
+        {
+            HGOTO_ERROR(DFE_INTERNAL, DFE_INTERNAL);
+        }
+        else
+        {
+            (*tmp_attr)->HDFtype = DFNT_CHAR;
+            tmp_attr++;
+            (*curr_attr)++;
+        }
+    }
+
+    /* Fomrat => 'format' */
+    if (formatstr && (formatstr[0] != '\0') > 0) 
+    {
+        *tmp_attr = (NC_attr *) NC_new_attr(_HDF_Format, NC_CHAR,
+                           HDstrlen((char *)formatstr), (Void *) formatstr);
+
+        if (NULL == *tmp_attr)
+        {
+            HGOTO_ERROR(DFE_INTERNAL, DFE_INTERNAL);
+        }
+        else
+        {
+            (*tmp_attr)->HDFtype = DFNT_CHAR;
+            tmp_attr++;
+            (*curr_attr)++;
+        }
+    }
+
+done:
+    if (ret_value == DFE_NONE)
+      { /* Failure cleanup */
+      }
+    /* cleanup */
+    /* return the status */
+    return(ret_value);
+
+} /* hdf_luf_to_attrs */
+
+/******************************************************************************
+ NAME
+   hdf_get_rangeinfo - Reads range information and converts them into attributes
+
+ DESCRIPTION
+   (Refactored from hdf_read_ndgs - Jun, 2017)
+
+ RETURNS
+   DFE_NONE / <error code>
+
+******************************************************************************/
+PRIVATE hdf_err_code_t
+hdf_get_rangeinfo(nc_type nctype, int32 hdftype, NC_attr **tmp_attr, intn *curr_attr)
+{
+    CONSTR(FUNC, "hdf_get_rangeinfo");        /* for HERROR */
+    uint8     tBuf[128] = "";
+    intn idx = 0; /* index for tBuf */
+    hdf_err_code_t ret_value = DFE_NONE;
+
+    if (FAIL == DFKconvert((VOIDP)ptbuf, (VOIDP) tBuf, hdftype, 2, DFACC_READ, 0, 0))
+    {
+        HGOTO_ERROR(DFE_BADCONV, FAIL);
+    }
+
+    /* _HDF_ValidMax */
+    *tmp_attr = (NC_attr *) NC_new_attr(_HDF_ValidMax, nctype, 1, (Void *) tBuf);
+
+    if (NULL == *tmp_attr)
+    {
+        HGOTO_ERROR(DFE_INTERNAL, FAIL);
+    }
+    else
+    {
+        (*tmp_attr)->HDFtype = hdftype;
+        tmp_attr++;
+        (*curr_attr)++;
+    }
+
+    /* _HDF_ValidMin */
+    idx = DFKNTsize(hdftype|DFNT_NATIVE);
+    *tmp_attr = (NC_attr *) NC_new_attr(_HDF_ValidMin, nctype, 1, (Void *) &(tBuf[idx]));
+
+    if (NULL == *tmp_attr)
+    {
+        HGOTO_ERROR(DFE_INTERNAL, FAIL);
+    }
+    else
+    {
+        (*tmp_attr)->HDFtype = hdftype;
+        tmp_attr++;
+        (*curr_attr)++;
+    }
+
+done:
+    if (ret_value == DFE_NONE)
+      { /* Failure cleanup */
+      }
+    /* cleanup */
+    /* return the status */
+    return(ret_value);
+
+} /* hdf_get_rangeinfo */
+
+/******************************************************************************
+ NAME
+   hdf_get_cal - Reads calibration and stores them attributes
+
+ DESCRIPTION
+   (Refactored from hdf_read_ndgs - Jun, 2017)
+
+ RETURNS
+   DFE_NONE / <error code>
+
+******************************************************************************/
+PRIVATE hdf_err_code_t
+hdf_get_cal(nc_type nctype, int32 hdftype, NC_attr **tmp_attr, intn *curr_attr)
+{
+    CONSTR(FUNC, "hdf_get_cal");        /* for HERROR */
+    uint8 tBuf[128] = "";
+    intn idx = 0; /* index for tBuf */
+    hdf_err_code_t ret_value = DFE_NONE;
+
+    /* for DFNT_FLOAT32 based calibration */
+    intn incr = 4;  /* increment 4 bytes */
+    int32 nt_hdftype = DFNT_INT16;
+    nc_type nt_nctype = NC_SHORT;
+
+    /* for DFNT_FLOAT64 based calibration */
+    if (hdftype == DFNT_FLOAT64)
+    {
+        incr = 8;   /* increment 8 bytes */
+        nt_hdftype = DFNT_INT32;
+        nt_nctype = NC_LONG;
+    }
+
+    if (FAIL == DFKconvert((VOIDP)ptbuf, (VOIDP) tBuf, hdftype, 4, DFACC_READ, 0, 0))
+    {
+        HGOTO_ERROR(DFE_BADCONV, FAIL);
+    }
+
+    /* _HDF_ScaleFactor */
+    *tmp_attr = (NC_attr *) NC_new_attr(_HDF_ScaleFactor, nctype, 1, (Void *) &(tBuf[idx]));
+
+    if (NULL == *tmp_attr)
+    {
+        HGOTO_ERROR(DFE_INTERNAL, FAIL);
+    }
+    else
+    {
+        (*tmp_attr)->HDFtype = hdftype;
+        tmp_attr++;
+        (*curr_attr)++;
+    }
+
+    /* _HDF_ScaleFactorErr */
+    idx = idx + incr;
+    *tmp_attr = (NC_attr *) NC_new_attr(_HDF_ScaleFactorErr, nctype, 1, (Void *) &(tBuf[idx]));
+
+    if (NULL == *tmp_attr)
+    {
+        HGOTO_ERROR(DFE_INTERNAL, FAIL);
+    }
+    else
+    {
+        (*tmp_attr)->HDFtype = hdftype;
+        tmp_attr++;
+        (*curr_attr)++;
+    }
+
+    /* _HDF_AddOffset */
+    idx = idx + incr;
+    *tmp_attr = (NC_attr *) NC_new_attr(_HDF_AddOffset, nctype, 1, (Void *) &(tBuf[idx]));
+
+    if (NULL == *tmp_attr)
+    {
+        HGOTO_ERROR(DFE_INTERNAL, FAIL);
+    }
+    else
+    {
+        (*tmp_attr)->HDFtype = hdftype;
+        tmp_attr++;
+        (*curr_attr)++;
+    }
+
+    /* _HDF_AddOffsetErr */
+    idx = idx + incr;
+    *tmp_attr = (NC_attr *) NC_new_attr(_HDF_AddOffsetErr, nctype, 1, (Void *) &(tBuf[idx]));
+
+    if (NULL == *tmp_attr)
+    {
+        HGOTO_ERROR(DFE_INTERNAL, FAIL);
+    }
+    else
+    {
+        (*tmp_attr)->HDFtype = hdftype;
+        tmp_attr++;
+        (*curr_attr)++;
+    }
+
+    /* don't forget number_type  */
+    if (FAIL == DFKconvert((VOIDP)(ptbuf + idx + incr), (VOIDP) tBuf, nt_hdftype, 1, DFACC_READ, 0,0))
+    {
+        HGOTO_ERROR(DFE_BADCONV, FAIL);
+    }
+
+    *tmp_attr = (NC_attr *) NC_new_attr(_HDF_CalibratedNt, nt_nctype, 1, (Void *) &(tBuf[0]));
+
+    if (NULL == *tmp_attr)
+    {
+        HGOTO_ERROR(DFE_INTERNAL, FAIL);
+    }
+    else
+    {
+        (*tmp_attr)->HDFtype = nt_hdftype;
+        tmp_attr++;
+        (*curr_attr)++;
+    }
+done:
+    if (ret_value == DFE_NONE)
+      { /* Failure cleanup */
+      }
+    /* cleanup */
+    /* return the status */
+    return(ret_value);
+
+} /* hdf_get_cal */
+
+
+/******************************************************************************
+ NAME
    hdf_read_ndgs
  
  DESCRIPTION
@@ -247,7 +1054,8 @@ hdf_read_ndgs(NC *handle)
     int32   *dimsizes = NULL;
     int32   *scaletypes = NULL;
     int32    HDFtype;
-int32    temptype;
+    int32    temptype;
+    hdf_err_code_t err_code;
     intn     dim;
     intn     max_thangs;
     intn     current_dim;
@@ -278,7 +1086,7 @@ int32    temptype;
     /*
      *  Allocate the array to store the dimensions
      */
-    max_thangs  = 100; /* what is this limit ? */
+    max_thangs  = 1; /* what is this limit ? */
 
     dims = (NC_dim **) HDmalloc(sizeof(NC_dim *) * max_thangs);
     if(NULL == dims) 
@@ -292,7 +1100,7 @@ int32    temptype;
           HGOTO_ERROR(DFE_NOSPACE, FAIL);
       }
 
-    attrs = (NC_attr **) HDmalloc(sizeof(NC_attr *) * max_thangs);
+    attrs = (NC_attr **) HDmalloc(sizeof(NC_attr *) * 100);
     if(NULL == attrs) 
       {
           HGOTO_ERROR(DFE_NOSPACE, FAIL);
@@ -326,7 +1134,7 @@ int32    temptype;
             {
                 uint16 ntTag;
                 uint16 ntRef;
-            
+
                 if(HQuerytagref(aid, &ndgTag, &ndgRef) == FAIL) 
                   {
                       HGOTO_ERROR(DFE_INTERNAL, FAIL);
@@ -368,28 +1176,28 @@ int32    temptype;
                  * NOTE:  Only generate attributes for meta-data which does
                  *        not depend on the rank of the data since we can not
                  *        be sure that we get the rank first.  
-                 *        If the meta-data depends on the rank, just remember the
-                 *        ref number and read the element once this while loop
-                 *        is finished.
+                 *        If the meta-data depends on the rank, just remember
+                 *        the ref number and read the element once this while
+                 *        loop is finished.
                  */
 
-		/* Check if temproray buffer has been allocated */
-		if (ptbuf == NULL)
-		{
-		    ptbuf = (uint8 *)HDmalloc(TBUF_SZ * sizeof(uint8));
-		    if (ptbuf == NULL)
-		    {
-			HERROR(DFE_NOSPACE);
-			ret_value = FAIL;
-			goto done;
-		    }
-		}
+                /* Check if temporary buffer has been allocated */
+                if (ptbuf == NULL)
+                {
+                    ptbuf = (uint8 *)HDmalloc(TBUF_SZ * sizeof(uint8));
+                    if (ptbuf == NULL)
+                    {
+                        HGOTO_ERROR(DFE_NOSPACE, FAIL);
+                    }
+                }
 
                 while (!DFdiget(GroupID, &tmpTag, &tmpRef)) 
                   {
                       switch(tmpTag) 
                         {
                         case DFTAG_SDD:
+ /* hdf_get_sdd(handle, tmpTag, tmpRef);
+ */ 
                             aid1 = Hstartread(handle->hdf_file, tmpTag, tmpRef);
                             if (aid1 == FAIL)
                               {
@@ -397,14 +1205,10 @@ int32    temptype;
                               }
 
                             /* read rank */
-                            if (Hread(aid1, (int32) 2, ptbuf) == FAIL) 
-                              {
-                                  HGOTO_ERROR(DFE_READERROR, FAIL);
-                              }
+                            err_code = hdf_read_rank(aid1, &rank);
+                            if (err_code != DFE_NONE)
+                                HGOTO_ERROR(err_code, FAIL);
 
-                            p = ptbuf;
-                            INT16DECODE(p, rank);
-                    
                             /* get space for dimensions */
                             dimsizes = (int32 *) HDmalloc((uint32) rank * sizeof(int32));
                             if (dimsizes == NULL) 
@@ -423,39 +1227,20 @@ int32    temptype;
                               {
                                   HGOTO_ERROR(DFE_NOSPACE, FAIL);
                               }
-                    
+
                             /* read dimension record */
-                            if (Hread(aid1, (int32) 4 * rank, ptbuf) == FAIL) 
-                              {
-                                  HGOTO_ERROR(DFE_READERROR, FAIL);
-                              }
+                            err_code = hdf_read_dimsizes(aid1, rank, dimsizes);
+                            if (err_code != DFE_NONE)
+                                HGOTO_ERROR(err_code, FAIL);
+
+                            /* read in number type string */
+                            err_code = hdf_read_NT(aid1, handle, ntstring);
+                            if (err_code == FAIL)
+                                  HGOTO_ERROR(err_code, FAIL);
 
-                            p = ptbuf;
-                            for (i = 0; i < rank; i++)
-                                INT32DECODE(p, dimsizes[i]);
-                    
-                          /* read tag/ref of NT */
-                            if (Hread(aid1,(int32) 4,  ptbuf) == FAIL) 
-                              {
-                                  HGOTO_ERROR(DFE_READERROR, FAIL);
-                              }
-                            p = ptbuf;
-                            UINT16DECODE(p, ntTag);
-                            UINT16DECODE(p, ntRef);
-                    
-                            /* read actual NT */
-                            if (Hgetelement(handle->hdf_file, ntTag, ntRef, ntstring) == FAIL)
-                              {
-                                  HGOTO_ERROR(DFE_GETELEM, FAIL);
-                              }
-                    
                             HDFtype = ntstring[1];
                             if ((type = hdf_unmap_type(HDFtype)) == FAIL)
                               {
-#ifdef DEBUG
-                                  /* replace it with NCAdvice or HERROR? */
-                                  fprintf(stderr, "hdf_read_ndgs: hdf_unmap_type failed for %d\n", HDFtype);
-#endif
                                   HGOTO_ERROR(DFE_INTERNAL, FAIL);
                               }
 
@@ -466,330 +1251,112 @@ int32    temptype;
                             /* read in scale NTs */
                             for(i = 0; i < rank; i++) 
                               {
-                                  if (Hread(aid1,(int32) 4,  ptbuf) == FAIL) 
-                                    {
-                                        HGOTO_ERROR(DFE_READERROR, FAIL);
-                                    }
-
-                                  p = ptbuf;
-                                  UINT16DECODE(p, ntTag);
-                                  UINT16DECODE(p, ntRef);
-                        
-                                  /* read NT of this scale (dimension) */
-                                  if (Hgetelement(handle->hdf_file, ntTag, ntRef, ntstring) == FAIL)
-                                    {
-                                        HGOTO_ERROR(DFE_GETELEM, FAIL);
-                                    }
+                                err_code = hdf_read_NT(aid1, handle, ntstring);
+                                if (err_code != DFE_NONE)
+                                    HGOTO_ERROR(err_code, FAIL);
 
-                                  scaletypes[i] = ntstring[1];
+                                scaletypes[i] = ntstring[1];
 
-				  /* temp preserve scaletype in case of error */
-				  temptype = scaletypes[i];
+                                /* temp preserve scaletype in case of error */
+                                temptype = scaletypes[i];
 
                                   /* check native format and LITEND */
                                   if (hdf_check_nt(ntstring, &temptype) == FAIL)
                                        HGOTO_ERROR(DFE_INTERNAL, FAIL);
-
-                                  /* restore scaletype */
-                                  scaletypes[i] = temptype;
-                              }
-                    
-                            sddRef = tmpRef;    /* prepare for a new dim var */
-                            if (Hendaccess(aid1) == FAIL)
-                              {
-                                  HGOTO_ERROR(DFE_CANTENDACCESS, FAIL);
-                              }
-                    
-                            break;
-                    
-                        case DFTAG_SDL:       /* label */
-                            lRef = tmpRef;
-                            break;
-                    
-                        case DFTAG_SDU:       /* unit */
-                            uRef = tmpRef;
-                            break;
-                    
-                        case DFTAG_SDF:       /* format */
-                            fRef = tmpRef;
-                            break;
-
-                        case DFTAG_SDC:       /* coord  */
-                            /*
-                             * DFTAG_SDC => 'cordsys'
-                             */
-                        { 
-                            int len;
-
-                            len = Hlength(handle->hdf_file, DFTAG_SDC, tmpRef);
-                            if (len == FAIL) 
-                              {
-                                  HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                              }
-
-                            coordbuf = (uint8 *) HDmalloc((uint32) len + 1);
-                            if (NULL == coordbuf) 
-                              {
-                                  HGOTO_ERROR(DFE_NOSPACE, FAIL);
-                              }
-
-                            if (Hgetelement(handle->hdf_file, DFTAG_SDC, tmpRef, coordbuf) == FAIL)
-                              {
-                                  HDfreespace((VOIDP)coordbuf);
-                                  HGOTO_ERROR(DFE_GETELEM, FAIL);
-                              }
-
-                            coordbuf[len] = '\0';
-                            if (coordbuf[0] != '\0')  
-                              {
-                                  attrs[current_attr] =
-                                      (NC_attr *) NC_new_attr(_HDF_CoordSys,
-                                                              NC_CHAR, HDstrlen(coordbuf), coordbuf);
-                                  if (NULL == attrs[current_attr])
-                                    {
-                                        HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                                    }
-                                  else
-                                      attrs[current_attr++]->HDFtype = DFNT_CHAR;
-                              }
-
-                            HDfreespace((VOIDP)coordbuf);
-                        }
-                        break;
-
-                        case DFTAG_SDS:       /* scales */
-                            sRef = tmpRef;
-                            break;
-                    
-                        case DFTAG_SD:        /* actual data */
-                            sdRef = tmpRef;
-                            break;
-                    
-                        case DFTAG_CAL:        /* calibration info */
-                            /* 
-                           * DFTAG_CAL => 'scale_factor', 'add_offset', 'scale_factor_err', 
-                           *              'add_offset_err'
-                           */
-                            if (Hgetelement(handle->hdf_file, tmpTag, tmpRef, ptbuf) == FAIL)
-                              {
-                                  HGOTO_ERROR(DFE_GETELEM, FAIL);
-                              }
-                    
-                            if (Hlength(handle->hdf_file, tmpTag, tmpRef) == 36) 
-                              {
-                                  /* DFNT_FLOAT64 based calibration */
-                        
-                                  if (FAIL == DFKconvert((VOIDP)ptbuf, 
-                                             (VOIDP) tBuf, 
-                                             DFNT_FLOAT64, 4, DFACC_READ, 0, 0))
-                                    {
-                                        HGOTO_ERROR(DFE_BADCONV, FAIL);
-                                    }
-                        
-                                  attrs[current_attr] = 
-                                      (NC_attr *) NC_new_attr(_HDF_ScaleFactor, 
-                                                              NC_DOUBLE, 
-                                                              1, 
-                                                              (Void *) &(tBuf[0]));
-
-                                  if (NULL == attrs[current_attr])
-                                    {
-                                        HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                                    }
-                                  else
-                                      attrs[current_attr++]->HDFtype = DFNT_FLOAT64; 
-
-                                  attrs[current_attr] = 
-                                      (NC_attr *) NC_new_attr(_HDF_ScaleFactorErr, 
-                                                              NC_DOUBLE, 
-                                                              1, 
-                                                              (Void *) &(tBuf[8]));    
-
-                                  if (NULL == attrs[current_attr])
-                                    {
-                                        HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                                    }
-                                  else
-                                      attrs[current_attr++]->HDFtype = DFNT_FLOAT64;
- 
-                                  attrs[current_attr] = 
-                                      (NC_attr *) NC_new_attr(_HDF_AddOffset, 
-                                                              NC_DOUBLE, 
-                                                              1, 
-                                                              (Void *) &(tBuf[16]));
-
-                                  if (NULL == attrs[current_attr])
-                                    {
-                                        HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                                    }
-                                  else
-                                      attrs[current_attr++]->HDFtype = DFNT_FLOAT64;
-
-                                  attrs[current_attr] = 
-                                      (NC_attr *) NC_new_attr(_HDF_AddOffsetErr, 
-                                                              NC_DOUBLE, 
-                                                              1, 
-                                                              (Void *) &(tBuf[24]));
-
-                                  if (NULL == attrs[current_attr])
-                                    {
-                                        HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                                    }
-                                  else
-                                      attrs[current_attr++]->HDFtype = DFNT_FLOAT64;
-
-                                /* don't forget number_type  */
-                                  if (FAIL == DFKconvert((VOIDP)(ptbuf + 32),
-                                             (VOIDP) tBuf,
-                                             DFNT_INT32, 1, DFACC_READ, 0,0))
-                                    {
-                                        HGOTO_ERROR(DFE_BADCONV, FAIL);
-                                    }
-
-
-                                  attrs[current_attr] =
-                                      (NC_attr *) NC_new_attr(_HDF_CalibratedNt,
-                                                              NC_LONG,
-                                                              1,
-                                                              (Void *) &(tBuf[0]));
-
-                                  if (NULL == attrs[current_attr])
-                                    {
-                                        HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                                    }
-                                  else
-                                      attrs[current_attr++]->HDFtype = DFNT_INT32;
-
-                              } 
-                            else 
-                              {
-                                  /* DFNT_FLOAT32 based calibration */
-
-                                  if (FAIL == DFKconvert((VOIDP)ptbuf, 
-                                             (VOIDP)tBuf, 
-                                             DFNT_FLOAT32, 4, DFACC_READ, 0, 0))
-                                    {
-                                        HGOTO_ERROR(DFE_BADCONV, FAIL);
-                                    }
-
-                        
-                                  attrs[current_attr] = 
-                                      (NC_attr *) NC_new_attr(_HDF_ScaleFactor, 
-                                                              NC_FLOAT, 
-                                                              1, 
-                                                              (Void *) &(tBuf[0]));
-
-                                  if (NULL == attrs[current_attr])
-                                    {
-                                        HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                                    }
-                                  else
-                                      attrs[current_attr++]->HDFtype = DFNT_FLOAT32;
- 
-                                  attrs[current_attr] = 
-                                      (NC_attr *) NC_new_attr(_HDF_ScaleFactorErr, 
-                                                              NC_FLOAT, 
-                                                              1, 
-                                                              (Void *) &(tBuf[4]));    
-
-                                  if (NULL == attrs[current_attr])
-                                    {
-                                        HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                                    }
-                                  else
-                                      attrs[current_attr++]->HDFtype = DFNT_FLOAT32;
-
-                                  attrs[current_attr] = 
-                                      (NC_attr *) NC_new_attr(_HDF_AddOffset, 
-                                                              NC_FLOAT, 
-                                                              1, 
-                                                              (Void *) &(tBuf[8]));
-
-                                  if (NULL == attrs[current_attr])
-                                    {
-                                        HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                                    }
-                                  else
-                                      attrs[current_attr++]->HDFtype = DFNT_FLOAT32;
-
-                                  attrs[current_attr] = 
-                                      (NC_attr *) NC_new_attr(_HDF_AddOffsetErr, 
-                                                              NC_FLOAT, 
-                                                              1, 
-                                                              (Void *) &(tBuf[12]));
-
-                                  if (NULL == attrs[current_attr])
-                                    {
-                                        HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                                    }
-                                  else
-                                      attrs[current_attr++]->HDFtype = DFNT_FLOAT32;
-
-                                  /* don't forget number_type  */
-                                  if (FAIL == DFKconvert((VOIDP)(ptbuf + 16),
-                                             (VOIDP) tBuf,
-                                             DFNT_INT16, 1, DFACC_READ, 0,0))
-                                    {
-                                        HGOTO_ERROR(DFE_BADCONV, FAIL);
-                                    }
-
-
-                                  attrs[current_attr] =
-                                      (NC_attr *) NC_new_attr(_HDF_CalibratedNt,
-                                                              NC_SHORT,
-                                                              1,
-                                                              (Void *) &(tBuf[0]));
-
-                                  if (NULL == attrs[current_attr])
-                                    {
-                                        HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                                    }
-                                  else
-                                      attrs[current_attr++]->HDFtype = DFNT_INT16;
+
+                                  /* restore scaletype */
+                                  scaletypes[i] = temptype;
+                              }
+                    
+                            sddRef = tmpRef;    /* prepare for a new dim var */
+                            if (Hendaccess(aid1) == FAIL)
+                              {
+                                  HGOTO_ERROR(DFE_CANTENDACCESS, FAIL);
                               }
                     
                             break;
                     
-                        case DFTAG_SDM:        /* valid range info */
+                        case DFTAG_SDL:       /* label */
+                            lRef = tmpRef;
+                            break;
+                    
+                        case DFTAG_SDU:       /* unit */
+                            uRef = tmpRef;
+                            break;
+                    
+                        case DFTAG_SDF:       /* format */
+                            fRef = tmpRef;
+                            break;
+
+                        case DFTAG_SDC:       /* coord  */
+                            /*
+                             * DFTAG_SDC => 'cordsys'
+                             */
+                        { 
+                            err_code = hdf_get_sdc(handle, tmpRef, &attrs[current_attr], &current_attr);
+                            if (err_code != DFE_NONE)
+                            {
+                                HGOTO_ERROR(err_code, FAIL);
+                            }
+                        }
+                        break;
+
+                        case DFTAG_SDS:       /* scales */
+                            sRef = tmpRef;
+                            break;
+                    
+                        case DFTAG_SD:        /* actual data */
+                            sdRef = tmpRef;
+                            break;
                     
+                        case DFTAG_CAL:        /* calibration info */
+                            /* 
+                           * DFTAG_CAL => 'scale_factor', 'add_offset', 'scale_factor_err', 
+                           *              'add_offset_err'
+                           */
+                        {
                             if (Hgetelement(handle->hdf_file, tmpTag, tmpRef, ptbuf) == FAIL)
                               {
                                   HGOTO_ERROR(DFE_GETELEM, FAIL);
                               }
-                    
-                            if (FAIL == DFKconvert((VOIDP)ptbuf, 
-                                       (VOIDP)tBuf, 
-                                       HDFtype, 2, DFACC_READ, 0, 0))
-                              {
-                                  HGOTO_ERROR(DFE_BADCONV, FAIL);
-                              }
 
-                    
-                            attrs[current_attr] = 
-                                (NC_attr *) NC_new_attr(_HDF_ValidMax, 
-                                                        type, 
-                                                        1, 
-                                                        (Void *) tBuf);
+                            if (Hlength(handle->hdf_file, tmpTag, tmpRef) == 36)
+                            {
+                                  /* DFNT_FLOAT64 based calibration */
+                                err_code = hdf_get_cal(NC_DOUBLE, DFNT_FLOAT64,
+                                        &attrs[current_attr], &current_attr);
+                                if (err_code != DFE_NONE)
+                                {
+                                    HGOTO_ERROR(err_code, FAIL);
+                                }
+                            } 
+                            else 
+                            {
+                                  /* DFNT_FLOAT32 based calibration */
+                                err_code = hdf_get_cal(NC_FLOAT, DFNT_FLOAT32,
+                                        &attrs[current_attr], &current_attr);
+
+                                if (err_code != DFE_NONE)
+                                {
+                                    HGOTO_ERROR(err_code, FAIL);
+                                }
+                            } 
+                            break;
+                        }
 
-                            if (NULL == attrs[current_attr])
+                        case DFTAG_SDM:        /* valid range info */
+                    
+                            if (Hgetelement(handle->hdf_file, tmpTag, tmpRef, ptbuf) == FAIL)
                               {
-                                  HGOTO_ERROR(DFE_INTERNAL, FAIL);
+                                  HGOTO_ERROR(DFE_GETELEM, FAIL);
                               }
-                            else
-                                attrs[current_attr++]->HDFtype = HDFtype;
                     
-                            attrs[current_attr] = 
-                                (NC_attr *) NC_new_attr(_HDF_ValidMin, 
-                                                        type, 
-                                                        1, 
-                                                        (Void *) &(tBuf[DFKNTsize(HDFtype|DFNT_NATIVE)]));
+                            err_code = hdf_get_rangeinfo(type, HDFtype, &attrs[current_attr], &current_attr);
+                                if (err_code != DFE_NONE)
+                                {
+                                    HGOTO_ERROR(err_code, FAIL);
+                                }
 
-                            if (NULL == attrs[current_attr])
-                              {
-                                  HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                              }
-                            else
-                                attrs[current_attr++]->HDFtype = HDFtype;
                             break;
 
                         case DFTAG_SDLNK:
@@ -827,127 +1394,25 @@ int32    temptype;
                         } /* end switch 'tmpTag */
                   }     /* end while 'DFdiget()'*/
 
-		/* Free local buffer */
-		if (ptbuf != NULL)
-		{
-		    HDfree(ptbuf);
-		    ptbuf = NULL;
-		}
-            
-                if(lRef) 
-                  {
-                      int len;
-                
-                      /*
-                       *  Add three NULLS to the end to account for a bug in HDF 3.2r1-3
-                       */
-
-                      len = Hlength(handle->hdf_file, DFTAG_SDL, lRef);
-                      if(len == FAIL) 
-                        {
-                            HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                        }
-                
-                      labelbuf = (uint8 *) HDmalloc((uint32) len + 3);
-                      if(NULL == labelbuf) 
-                        {
-                            HGOTO_ERROR(DFE_NOSPACE, FAIL);
-                        }
-
-                      if(Hgetelement(handle->hdf_file, DFTAG_SDL, lRef, labelbuf) == FAIL)
-                        {
-                            HGOTO_ERROR(DFE_GETELEM, FAIL);
-                        }
-                
-                      labelbuf[len + 2] = '\0';
-                      labelbuf[len + 1] = '\0';
-                      labelbuf[len + 0] = '\0';
-                
-                  } 
-                else 
-                    labelbuf = NULL;
+                /* Free local buffer */
+                if (ptbuf != NULL)
+                {
+                    HDfree(ptbuf);
+                    ptbuf = NULL;
+                }
             
-                if(uRef) 
-                  {
-                      int len;
-                
-                      len = Hlength(handle->hdf_file, DFTAG_SDU, uRef);
-                      if(len == FAIL) 
-                        {
-                            HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                        }
-
-                      unitbuf = (uint8 *) HDmalloc((uint32) len+3);
-                      if(NULL == unitbuf) 
-                        {
-                            HGOTO_ERROR(DFE_NOSPACE, FAIL);
-                        }
-                
-                      if(Hgetelement(handle->hdf_file, DFTAG_SDU, uRef, unitbuf) == FAIL)
-                        {
-                            HGOTO_ERROR(DFE_GETELEM, FAIL);
-                        }
-
-                      unitbuf[len + 2] = '\0';
-                      unitbuf[len + 1] = '\0';
-                      unitbuf[len + 0] = '\0';
-                  } 
-                else 
-                    unitbuf = NULL;
+                /*
+                 * Get the predefined string attributes of the dataset.  Note
+                 * that, in the first three attributes, we need to add three
+                 * NULLs to the end of the buffer to account for a bug in
+                 * HDF 3.2r1-3, hence, the last argument is 3.  The last
+                 * attribute doesn't need the NULL characters.
+                 */
+                labelbuf = hdf_get_pred_str_attr(handle, DFTAG_SDL, lRef, 3);
+                unitbuf = hdf_get_pred_str_attr(handle, DFTAG_SDU, uRef, 3);
+                formatbuf = hdf_get_pred_str_attr(handle, DFTAG_SDF, fRef, 3);
+                scalebuf = hdf_get_pred_str_attr(handle, DFTAG_SDS, sRef, 0);
            
-                if(fRef) 
-                  {
-                      int len;
-
-                      len = Hlength(handle->hdf_file, DFTAG_SDF, fRef);
-                      if(len == FAIL) 
-                        {
-                            HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                        }
-
-                      formatbuf = (uint8 *) HDmalloc((uint32) len+3);
-                      if(NULL == formatbuf) 
-                        {
-                            HGOTO_ERROR(DFE_NOSPACE, FAIL);
-                        }
-
-                      if(Hgetelement(handle->hdf_file, DFTAG_SDF, fRef, formatbuf) == FAIL)
-                        {
-                            HGOTO_ERROR(DFE_GETELEM, FAIL);
-                        }
-
-                      formatbuf[len + 2] = '\0';
-                      formatbuf[len + 1] = '\0';
-                      formatbuf[len + 0] = '\0';
-                  } 
-                else
-                    formatbuf = NULL;
- 
-                if(sRef) 
-                  {
-                      int len;
-                
-                      len = Hlength(handle->hdf_file, DFTAG_SDS, sRef);
-                      if(len == FAIL) 
-                        {
-                            HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                        }
-                
-                      scalebuf = (uint8 *) HDmalloc((uint32) len);
-                      if(NULL == scalebuf) 
-                        {
-                            HGOTO_ERROR(DFE_NOSPACE, FAIL);
-                        }
-                
-                      if(Hgetelement(handle->hdf_file, DFTAG_SDS, sRef, scalebuf) == FAIL)
-                        {
-                            HGOTO_ERROR(DFE_GETELEM, FAIL);
-                        }
-                
-                  } 
-                else 
-                    scalebuf = NULL;
-            
                 /* skip over the garbage at the beginning */
                 scale_offset = rank * sizeof(uint8);
             
@@ -1004,18 +1469,18 @@ int32    temptype;
                       sprintf(tmpname, "fakeDim%d", dimcount++);
                 
                       this_dim = current_dim++;
-                      if(current_dim == max_thangs) 
+                      if(current_dim == max_thangs)
                         {
-                            /* need to allocate more space */    
+                            /* need to allocate more space */
                             max_thangs *= 2;
                             dims = (NC_dim **) HDrealloc((VOIDP) dims, sizeof(NC_dim *) * max_thangs);
-                            if(NULL == dims) 
+                            if(NULL == dims)
                               {
                                   HGOTO_ERROR(DFE_NOSPACE, FAIL);
                               }
 
                             vars = (NC_var **) HDrealloc((VOIDP) vars, sizeof(NC_var *) * max_thangs);
-                            if(NULL == vars) 
+                            if(NULL == vars)
                               {
                                   HGOTO_ERROR(DFE_NOSPACE, FAIL);
                               }
@@ -1033,18 +1498,17 @@ int32    temptype;
                 
                       /* 
                        * It looks like were gonna have to do the variable define
-                       *    here too cuz we need to remember the indicies of where
-                       *    we put the dimensions
+                       * here too cuz we need to remember the indices of where
+                       * we put the dimensions
                        */
-                
                       vardims[dim] = (intn) this_dim;
                 
                 
                       /*
-                       * Look at the scale NTs since the scales may have different number 
-                       *   types
-                       * Promote the dimension to a variable, but only if it has meta-data
-                       *   stored with it.  
+                       * Look at the scale NTs since the scales may have
+                       * different number types.
+                       * Promote the dimension to a variable, but only if it
+                       * has meta-data stored with it.  
                        */
                       if(new_dim || (scalebuf && scalebuf[dim])) 
                         {
@@ -1052,16 +1516,10 @@ int32    temptype;
 
                             if ((stype = hdf_unmap_type(scaletypes[dim])) == FAIL)
                               {
-#ifdef DEBUG
-                                  /* replace it with NCAdvice or HERROR? */
-                                  fprintf(stderr, "hdf_read_ndgs: hdf_unmap_type failed for %d\n", scaletypes[dim]);
-#endif
                                   HGOTO_ERROR(DFE_INTERNAL, FAIL);
                               }
 
-                            vars[current_var] = NC_new_var(tmpname, 
-                                                           stype,
-                                                           1, 
+                            vars[current_var] = NC_new_var(tmpname, stype, 1, 
                                                            &this_dim);
                             if (NULL == vars[current_var])
                               {
@@ -1076,12 +1534,13 @@ int32    temptype;
 #else /* NOT_YET */
                             vars[current_var]->ndg_ref  = Hnewref(handle->hdf_file);
 #endif /* NOT_YET */
-			    /* Indicate that it is unknown whether the current
-			       variable is an SDS or a coordinate variable.
-			       bugzilla 624 - BMR - 05/16/2007 */
-			    /* vars[current_var]->var_type  = UNKNOWN; */ 
-			    /* It looks like this is a dimension variable for sure! -BMR 10/26/2010 */
-			    vars[current_var]->var_type  = IS_CRDVAR;
+			                /* Indicate that it is unknown whether the current
+			                   variable is an SDS or a coordinate variable.
+			                   bugzilla 624 - BMR - 05/16/2007 */
+			                /* vars[current_var]->var_type  = UNKNOWN; */ 
+			                /* It looks like this is a dimension variable for
+                               sure! -BMR 10/26/2010 */
+			                vars[current_var]->var_type  = IS_CRDVAR;
 
                             /*
                              * See if a scales record has been stored and if there have
@@ -1099,68 +1558,24 @@ int32    temptype;
                               }
                             /*
                              * Convert dimstrs into attributes  
-                             * label -- "long_name" (cuz SDsetdimstrs() assigns "long_name" to label)
+                             * label -- "long_name" (cuz SDsetdimstrs() assigns
+                             * "long_name" to label)
                              * unit  -- "units"
                              * format -- "format"
                              */
-
-                            /* label => "long_name"  */
                             dimattrcnt = 0;
-                            if (labelvalue && HDstrlen((char *)labelvalue) > 0) 
-                              {
-                                  dimattrs[dimattrcnt] =
-                                      (NC_attr *) NC_new_attr(_HDF_LongName, NC_CHAR,
-                                                              HDstrlen((char *)labelvalue),
-                                                              (Void *) labelvalue);
-
-                                  if (NULL == dimattrs[dimattrcnt])
-                                    {
-                                        HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                                    }
-                                  else
-                                      dimattrs[dimattrcnt++]->HDFtype = DFNT_CHAR;
-                              }
-
-                            /* Units => 'units' */
-                            if(unitvalue && HDstrlen((char *)unitvalue) > 0) 
-                              {
-                                  dimattrs[dimattrcnt] =
-                                      (NC_attr *) NC_new_attr(_HDF_Units, NC_CHAR,
-                                                              HDstrlen((char *)unitvalue),
-                                                              (Void *) unitvalue);
-
-                                  if (NULL == dimattrs[dimattrcnt])
-                                    {
-                                        HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                                    }
-                                  else
-                                      dimattrs[dimattrcnt++]->HDFtype = DFNT_CHAR;
-                              }
-
-                            /* Fomrat => 'format' */
-                            if(formatvalue && HDstrlen((char *)formatvalue) > 0) 
-                              {
-                                  dimattrs[dimattrcnt] =
-                                      (NC_attr *) NC_new_attr(_HDF_Format, NC_CHAR,
-                                                              HDstrlen((char *)formatvalue),
-                                                              (Void *) formatvalue);
-
-                                  if (NULL == dimattrs[dimattrcnt])
-                                    {
-                                        HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                                    }
-                                  else
-                                      dimattrs[dimattrcnt++]->HDFtype = DFNT_CHAR;
-                              }
+                            err_code = hdf_luf_to_attrs(
+                                            labelvalue, unitvalue, formatvalue,
+                                            &dimattrs[dimattrcnt], &dimattrcnt);
 
                             /*
                              * Add the attributes to the variable
                              */
                             if(dimattrcnt)
                               {
-                                vars[current_var]->attrs = NC_new_array(NC_ATTRIBUTE,
-                                                                        dimattrcnt,
-                                                                        (Void *) dimattrs);
+                                vars[current_var]->attrs = NC_new_array(
+                                                    NC_ATTRIBUTE, dimattrcnt,
+                                                    (Void *) dimattrs);
                                   if (NULL == vars[current_var]->attrs)
                                     {
                                         HGOTO_ERROR(DFE_INTERNAL, FAIL);
@@ -1171,31 +1586,32 @@ int32    temptype;
 
                             current_var++;  
 
-                            if(current_var == max_thangs) 
+                            if(current_var == max_thangs)
                               {
-                                  /* need to allocate more space */    
+                                  /* need to allocate more space */
                                   max_thangs *= 2;
 
                                   dims = (NC_dim **) HDrealloc((VOIDP)dims, sizeof(NC_dim *) * max_thangs);
-                                  if(NULL == dims) 
+                                  if(NULL == dims)
                                         HGOTO_ERROR(DFE_NOSPACE, FAIL);
-                        
+
                                   vars = (NC_var **) HDrealloc((VOIDP)vars, sizeof(NC_var *) * max_thangs);
-                                  if(NULL == vars) 
+                                  if(NULL == vars)
                                         HGOTO_ERROR(DFE_NOSPACE, FAIL);
                               }
                         } /* end if 'new_dim' */
                   } /* end for 'dim' */
             
                 /*
-                 * Should the LUF-label be mapped as attr of "longname", to be consistent
-                 *   with the dim vars? 8/18/94
-                 * Should the annotation-label mapped to attr "anno-label", if "longname"
-                 *   has been taken by LUF-label?  8/18/94.
+                 * Should the LUF-label be mapped as attr of "longname", to be
+                 * consistent with the dim vars? 8/18/94
+                 * Should the annotation-label mapped to attr "anno-label",
+                 * if "longname" has been taken by LUF-label?  8/18/94.
                  *   
-                 * (If there is a data label use that as the variable name else) 
+                 * (If there is a data label, use that as the variable name
+                 *  else) 
                  * Use the reference number of the NDG as part of
-                 *    a made up name (Label is mapped as attr "longname" 9/2/94).
+                 * a made up name (Label is mapped as attr "longname" 9/2/94).
                  *
                  * Convert spaces in the name to underscores (yuck) otherwise
                  *    ncgen will barf on ncdumped files)
@@ -1231,13 +1647,12 @@ int32    temptype;
                 vars[current_var]->data_ref = sdRef;
                 vars[current_var]->HDFtype  = HDFtype;
 
-		/* Indicate that it is unknown whether the current variable 
-		   is an SDS or a coordinate variable.  bugzilla 624 - BMR - 
-		   05/16/2007.  This looks like a IS_CRDVAR because it's from
-		   vardim! -BMR - 6/1/16 */
+		        /* Indicate that it is unknown whether the current variable 
+		           is an SDS or a coordinate variable.  bugzilla 624 - BMR - 
+		           05/16/2007.  This looks like a IS_CRDVAR because it's from
+		           vardim! -BMR - 6/1/16 */
                 vars[current_var]->var_type  = UNKNOWN;
 
-
                 /*
                  * NOTE:  If the user changes the file and saves setting this
                  *   to ndgRef will blow away the old ndgs (but they will get
@@ -1255,314 +1670,45 @@ int32    temptype;
                 /*
                  * If there is an annotation put in 'remarks'
                  */
-            
                 {
-                    /* Re-vamped desc annotation handling to use new ANxxx interface 
-                     *  -georgev 6/11/97 */
-                    int32  an_handle   = FAIL;
-                    int32  *ddescs    = NULL;
-                    char   *ann_desc  = NULL;
-                    int32  ann_len;
-                    intn   num_ddescs;
-                    char   hremark[30] = ""; /* should be big enough for new attribute */
-
-                    /* start Annotation inteface */
-                    if ((an_handle = ANstart(handle->hdf_file)) == FAIL)
-                      {
-                          HGOTO_ADESC_ERROR(DFE_ANAPIERROR, FAIL);
-                      }
-
-                    /* Get number of data descs with this tag/ref */
-                    num_ddescs = ANnumann(an_handle, AN_DATA_DESC, ndgTag, ndgRef);
-#ifdef AN_DEBUG
-                    fprintf(stderr,"SDS has %d descs \n", num_ddescs);
-#endif
-                    if (num_ddescs != 0)
-                      {
-                          /* allocate space for list of desc annotation id's with this tag/ref */
-                          if ((ddescs = (int32 *)HDmalloc(num_ddescs * sizeof(int32))) == NULL)
-                            {
-#ifdef AN_DEBUG
-                                fprintf(stderr,"failed to allocate space for %d descs \n", num_ddescs);
-#endif
-                                HGOTO_ADESC_ERROR(DFE_NOSPACE, FAIL);
-                            }
-
-                          /* get list of desc annotations id's with this tag/ref */
-                          if (ANannlist(an_handle, AN_DATA_DESC, ndgTag, ndgRef, ddescs) != num_ddescs)
-                            {
-#ifdef AN_DEBUG
-                                fprintf(stderr,"failed to get %d descs list \n", num_ddescs);
-#endif
-                                HGOTO_ADESC_ERROR(DFE_ANAPIERROR, FAIL);
-                            }
-
-                          /* loop through desc list. */
-                          for (i = 0; i < num_ddescs; i++)
-                            {
-                                if ((ann_len = ANannlen(ddescs[i])) == FAIL)
-                                  {
-#ifdef AN_DEBUG
-                                      fprintf(stderr,"failed to get %d desc  length \n", i);
-#endif
-                                      HGOTO_ADESC_ERROR(DFE_ANAPIERROR, FAIL);
-                                  }
-        
-                                /* allocate space for desc */
-                                if (ann_desc == NULL)
-                                  {
-                                      if ((ann_desc = (char *)HDmalloc((ann_len+1)*sizeof(char))) == NULL)
-                                        {
-#ifdef AN_DEBUG
-                                            fprintf(stderr,"failed to allocate space for desc %d \n", i);
-#endif
-                                            HGOTO_ADESC_ERROR(DFE_NOSPACE, FAIL);
-                                        }
-                                      HDmemset(ann_desc,'\0', ann_len+1);
-                                  }
-      
-                                /* read desc */
-                                if (ANreadann(ddescs[i], ann_desc, ann_len+1) == FAIL)
-                                  {
-#ifdef AN_DEBUG
-                                      fprintf(stderr,"failed to read %d desc \n", i);
-#endif
-                                      HGOTO_ADESC_ERROR(DFE_ANAPIERROR, FAIL);
-                                  }
-
-                                /* make unique attribute */
-                                sprintf(hremark,"%s-%d",_HDF_Remarks,i+1);
-                            
-                                /* add it as a attribute */
-                                attrs[current_attr] = 
-                                    (NC_attr *) NC_new_attr(hremark, 
-                                                            NC_CHAR, 
-                                                            HDstrlen(ann_desc), 
-                                                            ann_desc);
-
-                                if (NULL == attrs[current_attr])
-                                  {
-                                      HGOTO_ADESC_ERROR(DFE_INTERNAL, FAIL);
-                                  }
-                                else
-                                    attrs[current_attr++]->HDFtype = DFNT_CHAR;
-
-                                /* end access */
-                                ANendaccess(ddescs[i]);
-
-                                /* free buffer */
-                                if(ann_desc != NULL)
-                                  {
-                                      HDfree(ann_desc);
-                                      ann_desc = NULL;
-                                  }
-                            }
+                    NC_attr *tmp_attr = NULL;
+                    err_code = DFE_NONE;
 
-                      } /* end if descs */
-
-                  done_adesc: /* GOTO Label */
-                    /* cleanup */
-                    if(ddescs != NULL)
-                        HDfree(ddescs);
-
-                    if(an_handle != FAIL)
-                        ANend(an_handle);
-
-                    /* check for error during ANxxx processing */
-                    if (ret_value == FAIL)
-                        goto done; /* error so return */
+                    err_code = hdf_get_desc_annot(handle, ndgTag, ndgRef,
+                                    &attrs[current_attr], &current_attr);
+                    if (err_code != DFE_NONE)
+                    {
+                        HGOTO_ERROR(err_code, FAIL);
+                    }
 
                 } /* end annotation description conversion */
             
                 /*
-                 * If there is a label put in attr 'anno_label' (note: NOT 'long_name' 9/2/94)
+                 * If there is a label, put it in attr 'anno_label' (note:
+                 * NOT 'long_name' 9/2/94)
                  */
                 {
-                    /* Re-vamped label annotation handling to use new ANxxx interface 
-                     *  -georgev 6/11/97 */
-                    int32  an_handle   = FAIL;
-                    int32  *dlabels    = NULL;
-                    char   *ann_label  = NULL;
-                    int32  ann_len;
-                    intn   num_dlabels;
-                    char   hlabel[30] = ""; /* should be big enough for new attribute */
-
-                    /* start Annotation inteface */
-                    if ((an_handle = ANstart(handle->hdf_file)) == FAIL)
-                      {
-                          ret_value = FAIL;
-                          goto done_alabel;
-                      }
-
-                    /* Get number of data labels with this tag/ref */
-                    num_dlabels = ANnumann(an_handle, AN_DATA_LABEL, ndgTag, ndgRef);
-#ifdef AN_DEBUG
-                    fprintf(stderr,"SDS has %d labels \n", num_dlabels);
-#endif
-
-                    if (num_dlabels != 0)
-                      {
-                          /* allocate space for list of label annotation id's with this tag/ref */
-                          if ((dlabels = (int32 *)HDmalloc(num_dlabels * sizeof(int32))) == NULL)
-                            {
-#ifdef AN_DEBUG
-                                fprintf(stderr,"failed to allocate space for %d labels \n", num_dlabels);
-#endif
-                                ret_value = FAIL;
-                                goto done_alabel;
-                            }
-
-                          /* get list of label annotations id's with this tag/ref */
-                          if (ANannlist(an_handle, AN_DATA_LABEL, ndgTag, ndgRef, dlabels) != num_dlabels)
-                            {
-#ifdef AN_DEBUG
-                                fprintf(stderr,"failed to get %d label list \n", num_dlabels);
-#endif
-                                ret_value = FAIL;
-                                goto done_alabel;
-                            }
-
-                          /* loop through label list */
-                          for (i = 0; i < num_dlabels; i++)
-                            {
-                                if ((ann_len = ANannlen(dlabels[i])) == FAIL)
-                                  {
-#ifdef AN_DEBUG
-                                      fprintf(stderr,"failed to get %d label  length \n", i);
-#endif
-                                      ret_value = FAIL;
-                                      goto done_alabel;
-                                  }
-        
-                                /* allocate space for label */
-                                if (ann_label == NULL)
-                                  {
-                                      if ((ann_label = (char *)HDmalloc((ann_len+1)*sizeof(char))) == NULL)
-                                        {
-#ifdef AN_DEBUG
-                                            fprintf(stderr,"failed to allocate space for label %d \n", i);
-#endif
-                                            ret_value = FAIL;
-                                            goto done_alabel;
-                                        }
-                                      HDmemset(ann_label,'\0', ann_len+1);
-                                  }
-      
-                                /* read label */
-                                if (ANreadann(dlabels[i], ann_label, ann_len+1) == FAIL)
-                                  {
-#ifdef AN_DEBUG
-                                      fprintf(stderr,"failed to read %d label \n", i);
-#endif
-                                      ret_value = FAIL;
-                                      goto done_alabel;
-                                  }
-
-                                /* make unique attribute */
-                                sprintf(hlabel,"%s-%d",_HDF_AnnoLabel,i+1);
-
-                                /* add as atriburte */
-                                attrs[current_attr] = 
-                                    (NC_attr *) NC_new_attr(hlabel, 
-                                                            NC_CHAR, 
-                                                            HDstrlen(ann_label), 
-                                                            ann_label);
-
-                                if (NULL == attrs[current_attr])
-                                  {
-                                      ret_value = FAIL;
-                                      goto done_alabel;
-                                  }
-                                else
-                                    attrs[current_attr++]->HDFtype = DFNT_CHAR;
-
-                                /* end access */
-                                ANendaccess(dlabels[i]);
-
-                                /* free buffer */
-                                if(ann_label != NULL)
-                                  {
-                                      HDfree(ann_label);
-                                      ann_label = NULL;
-                                  }
-                            }
+                    NC_attr *tmp_attr = NULL;
+                    err_code = DFE_NONE;
 
-                      } /* end if labels */
+                    err_code = hdf_get_label_annot(handle, ndgTag, ndgRef,
+                                    &attrs[current_attr], &current_attr);
+                    if (err_code != DFE_NONE)
+                    {
+                        HGOTO_ERROR(err_code, FAIL);
+                    }
 
-                  done_alabel: /* GOTO Label */
-                    /* cleanup */
-                    if(dlabels != NULL)
-                        HDfree(dlabels);
-
-                    if(an_handle != FAIL)
-                        ANend(an_handle);
-
-                    /* check for error during ANxxx processing */
-                    if (ret_value == FAIL)
-                        goto done; /* error so return */
                 } /* end annotation label processing */
-            
-                /* 
-                 * Label => 'long_name'
-                 */
-                if(labelbuf && (labelbuf[0] != '\0')) 
-                  {
-                      attrs[current_attr] =
-                          (NC_attr *) NC_new_attr(_HDF_LongName,
-                                                  NC_CHAR,
-                                                  HDstrlen((char *)labelbuf),
-                                                  (Void *) labelbuf);
-
-                      if (NULL == attrs[current_attr])
-                        {
-                            HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                        }
-                      else
-                          attrs[current_attr++]->HDFtype = DFNT_CHAR;
-                  }
- 
-                /*
-                 * Units => 'units'
-                 */
-                if(unitbuf && (unitbuf[0] != '\0')) 
-                  {
-                      attrs[current_attr] = 
-                          (NC_attr *) NC_new_attr(_HDF_Units, 
-                                                  NC_CHAR, 
-                                                  HDstrlen((char *)unitbuf), 
-                                                  (Void *) unitbuf);
-
-                      if (NULL == attrs[current_attr])
-                        {
-                            HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                        }
-                      else
-                          attrs[current_attr++]->HDFtype = DFNT_CHAR;
-                  }
-            
-                /*
-                 * (Don't do format cuz HDF doesn't distinguish between C and Fortran
-                 * Actually, it seems HDF Format == netCDF Fortran Format)
-                 * Don't use 'C_format' or 'FORTRAN_format'
-                 * Format => 'format'
-                 */
-                if(formatbuf && (formatbuf[0] != '\0')) 
-                  {
-                      attrs[current_attr] =
-                          (NC_attr *) NC_new_attr(_HDF_Format,
-                                                  NC_CHAR,
-                                                  HDstrlen((char *)formatbuf),
-                                                  (Void *) formatbuf);
 
-                      if (NULL == attrs[current_attr])
-                        {
-                            HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                        }
-                      else
-                          attrs[current_attr++]->HDFtype = DFNT_CHAR;
-                  }
+                /* Convert label, units, format strings to attributes */
+                err_code = hdf_luf_to_attrs(
+                             (char*)labelbuf, (char*)unitbuf, (char *)formatbuf,
+                             &attrs[current_attr], &current_attr);
+                if (err_code != DFE_NONE)
+                {
+                    HGOTO_ERROR(err_code, FAIL);
+                }
 
-            
                 /*
                  * Add the attributes to the variable
                  */ 
@@ -1580,29 +1726,27 @@ int32    temptype;
                 else
                     vars[current_var]->attrs = NULL;
             
-
-            
                 current_var++;
 
-                if(current_var == max_thangs) 
+                if(current_var == max_thangs)
                   {
-                      /* need to allocate more space */    
+                      /* need to allocate more space */
                       max_thangs *= 2;
-                
+
                       dims = (NC_dim **) HDrealloc((VOIDP) dims, sizeof(NC_dim *) * max_thangs);
-                      if(NULL == dims) 
+                      if(NULL == dims)
                         {
                             HGOTO_ERROR(DFE_NOSPACE, FAIL);
                         }
-                
+
                       vars = (NC_var **) HDrealloc((VOIDP) vars, sizeof(NC_var *) * max_thangs);
-                      if(NULL == vars) 
+                      if(NULL == vars)
                         {
                             HGOTO_ERROR(DFE_NOSPACE, FAIL);
                         }
-                
+
                   }
-            
+
                 /*
                  * De-allocate temporary storage
                  */
@@ -1633,33 +1777,33 @@ int32    temptype;
                 HGOTO_ERROR(DFE_CANTENDACCESS, FAIL);
             }
         
-          /*
-           * Set up the structures in the proper form
-           */
-          if(current_dim)
-            {
-              handle->dims = NC_new_array(NC_DIMENSION, current_dim, (Void *) dims);
-              if (NULL == handle->dims)
-                {
-                    HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                }
-            }
-          else
-              handle->dims = NULL;
-        
-          if(current_var)
-            {
-              handle->vars = NC_new_array(NC_VARIABLE, current_var, (Void *) vars);
-              if (NULL == handle->vars)
-                {
-                    HGOTO_ERROR(DFE_INTERNAL, FAIL);
-                }
-            }
-          else
-              handle->vars = NULL;
-        
       } /* outermost for loop to loop between NDGs and SDGs */
 
+      /*
+       * Set up the structures in the proper form
+       */
+      if(current_dim)
+      {
+          handle->dims = NC_new_array(NC_DIMENSION, current_dim, (Void *) dims);
+          if (NULL == handle->dims)
+          {
+              HGOTO_ERROR(DFE_INTERNAL, FAIL);
+          }
+      }
+      else
+          handle->dims = NULL;
+        
+      if(current_var)
+      {
+          handle->vars = NC_new_array(NC_VARIABLE, current_var, (Void *) vars);
+          if (NULL == handle->vars)
+          {
+              HGOTO_ERROR(DFE_INTERNAL, FAIL);
+          }
+      }
+      else
+          handle->vars = NULL;
+        
 done:
     if (ret_value == FAIL)
       { /* FAIL cleanup? */
@@ -1705,17 +1849,16 @@ done:
    SUCCEED / FAIL
  
 ******************************************************************************/
-int
-hdf_read_sds_cdf(XDR *xdrs, 
-                 NC **handlep)
+intn
+hdf_read_sds_cdf(XDR *xdrs, NC **handlep)
 {
     CONSTR(FUNC, "hdf_read_sds_cdf");        /* for HERROR */
-    int32  status;
-    NC     *handle = NULL;
+    intn  status;
+    NC    *handle = NULL;
     intn  ret_value = SUCCEED;
     
     /* 
-     * go through and treat each SDS as a separate varibiable 
+     * go through and treat each SDS as a separate variable 
      */
 
     /* 
diff --git a/mfhdf/libsrc/iarray.c b/mfhdf/libsrc/iarray.c
index b41b3b7..2ba59d9 100644
--- a/mfhdf/libsrc/iarray.c
+++ b/mfhdf/libsrc/iarray.c
@@ -8,13 +8,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/*	$Id: iarray.c 4963 2007-09-15 17:20:52Z bmribler $ */
+/*	$Id$ */
 
 #include	"local_nc.h"
 #include	"alloc.h"
diff --git a/mfhdf/libsrc/local_nc.h b/mfhdf/libsrc/local_nc.h
index c98df38..8c216b8 100644
--- a/mfhdf/libsrc/local_nc.h
+++ b/mfhdf/libsrc/local_nc.h
@@ -8,13 +8,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: local_nc.h 6450 2016-06-16 06:38:24Z bmribler $ */
+/* $Id$ */
 #ifndef _LOCAL_NC_
 #define _LOCAL_NC_
 
@@ -32,6 +32,26 @@
 
 /* Do we have system XDR files */
 #ifndef  NO_SYS_XDR_INC
+
+#ifdef __CYGWIN__
+#ifndef __u_char_defined
+typedef    unsigned char    u_char;
+#define __u_char_defined
+#endif
+#ifndef __u_short_defined
+typedef    unsigned short    u_short;
+#define __u_short_defined
+#endif
+#ifndef __u_int_defined
+typedef    unsigned int    u_int;
+#define __u_int_defined
+#endif
+#ifndef __u_long_defined
+typedef    unsigned long    u_long;
+#define __u_long_defined
+#endif
+#endif /* __CYGWIN__ */
+
 #include    <rpc/types.h>
 #include    <rpc/xdr.h>
 #else    /* NO_SYS_XDR_INC */
diff --git a/mfhdf/libsrc/mfdatainfo.c b/mfhdf/libsrc/mfdatainfo.c
index 3e3ab51..96c1423 100644
--- a/mfhdf/libsrc/mfdatainfo.c
+++ b/mfhdf/libsrc/mfdatainfo.c
@@ -4,10 +4,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /* NOTE: this file and other "datainfo" related files will be configured so
diff --git a/mfhdf/libsrc/mfdatainfo.h b/mfhdf/libsrc/mfdatainfo.h
index dbbb70d..55d0b39 100644
--- a/mfhdf/libsrc/mfdatainfo.h
+++ b/mfhdf/libsrc/mfdatainfo.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #ifndef MFDATAINFO_H
diff --git a/mfhdf/libsrc/mfhdf.h b/mfhdf/libsrc/mfhdf.h
index 5451519..75492ae 100644
--- a/mfhdf/libsrc/mfhdf.h
+++ b/mfhdf/libsrc/mfhdf.h
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: mfhdf.h 6031 2014-01-17 05:54:32Z bmribler $ */
+/* $Id$ */
 
 #ifndef _MFSD_H_
 #define _MFSD_H_
diff --git a/mfhdf/libsrc/mfhdfi.h b/mfhdf/libsrc/mfhdfi.h
index 7363e2f..9fb8583 100644
--- a/mfhdf/libsrc/mfhdfi.h
+++ b/mfhdf/libsrc/mfhdfi.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /* $Id: mfhdfi.h 5009 2007-12-27 16:49:20Z bmribler $ */
diff --git a/mfhdf/libsrc/mfprivate.h b/mfhdf/libsrc/mfprivate.h
index 170db89..b221eb3 100644
--- a/mfhdf/libsrc/mfprivate.h
+++ b/mfhdf/libsrc/mfprivate.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /******************************************************************************
 file - mfprivate.h
diff --git a/mfhdf/libsrc/mfsd.c b/mfhdf/libsrc/mfsd.c
index 94dc803..ee168bb 100644
--- a/mfhdf/libsrc/mfsd.c
+++ b/mfhdf/libsrc/mfsd.c
@@ -5,13 +5,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/* $Id: mfsd.c 6441 2016-06-14 21:31:36Z bmribler $ */
+/* $Id$ */
 
 /******************************************************************************
 file - mfsd.c
diff --git a/mfhdf/libsrc/netcdf.h.in b/mfhdf/libsrc/netcdf.h.in
index 13f1af3..43d0ea8 100644
--- a/mfhdf/libsrc/netcdf.h.in
+++ b/mfhdf/libsrc/netcdf.h.in
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf.h.in 6036 2014-01-20 17:28:01Z acheng $" */
+/* "$Id$" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
diff --git a/mfhdf/libsrc/nssdc.c b/mfhdf/libsrc/nssdc.c
index 213aded..93bfee5 100644
--- a/mfhdf/libsrc/nssdc.c
+++ b/mfhdf/libsrc/nssdc.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "local_nc.h"
diff --git a/mfhdf/libsrc/putget.c b/mfhdf/libsrc/putget.c
index 527a882..e8cb9ff 100644
--- a/mfhdf/libsrc/putget.c
+++ b/mfhdf/libsrc/putget.c
@@ -8,13 +8,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/*	$Id: putget.c 6032 2014-01-17 18:13:52Z acheng $ */
+/*	$Id$ */
 
 #include	<string.h>
 #include	"local_nc.h"
diff --git a/mfhdf/libsrc/putgetg.c b/mfhdf/libsrc/putgetg.c
index 8e7bc80..4673d2d 100644
--- a/mfhdf/libsrc/putgetg.c
+++ b/mfhdf/libsrc/putgetg.c
@@ -8,10 +8,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /*
  *
@@ -21,7 +21,7 @@
  *	constrained to have a regular structure.  In addition, the values 
  *	of the netCDF variable may be accessed using non-unity strides.
  *
- *	$Id: putgetg.c 4963 2007-09-15 17:20:52Z bmribler $
+ *	$Id$
  */
 
 #include	"local_nc.h"
diff --git a/mfhdf/libsrc/sharray.c b/mfhdf/libsrc/sharray.c
index e24093d..1afbc7c 100644
--- a/mfhdf/libsrc/sharray.c
+++ b/mfhdf/libsrc/sharray.c
@@ -8,13 +8,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/*	$Id: sharray.c 4963 2007-09-15 17:20:52Z bmribler $ */
+/*	$Id$ */
 
 #include	"local_nc.h"
 #include	"alloc.h"
diff --git a/mfhdf/libsrc/string.c b/mfhdf/libsrc/string.c
index 28030fb..5c972fb 100644
--- a/mfhdf/libsrc/string.c
+++ b/mfhdf/libsrc/string.c
@@ -8,13 +8,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/*	$Id: string.c 6431 2016-06-14 13:48:03Z bmribler $ */
+/*	$Id$ */
 
 #include	<string.h>
 #include	"local_nc.h"
diff --git a/mfhdf/libsrc/var.c b/mfhdf/libsrc/var.c
index e0cd7aa..62c3cd6 100644
--- a/mfhdf/libsrc/var.c
+++ b/mfhdf/libsrc/var.c
@@ -8,13 +8,13 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-/*	$Id: var.c 6431 2016-06-14 13:48:03Z bmribler $ */
+/*	$Id$ */
 
 #include	<string.h>
 #include	"local_nc.h"
diff --git a/mfhdf/libsrc/xdrposix.c b/mfhdf/libsrc/xdrposix.c
index 0eacaab..fa57025 100644
--- a/mfhdf/libsrc/xdrposix.c
+++ b/mfhdf/libsrc/xdrposix.c
@@ -12,7 +12,7 @@
  *
  * -glenn
  */
-/* $Id: xdrposix.c 6112 2014-06-04 21:05:09Z byrn $ */
+/* $Id$ */
 
 /*
  * 32-bit integer on the host architecture (on the CRAY, this is actually 64
diff --git a/mfhdf/libsrc/xdrstdio.c b/mfhdf/libsrc/xdrstdio.c
index 5c68b00..70eb6f6 100644
--- a/mfhdf/libsrc/xdrstdio.c
+++ b/mfhdf/libsrc/xdrstdio.c
@@ -1,5 +1,5 @@
 #if !defined(lint)
-static char rcsid[] = "$Id: xdrstdio.c 510 1993-05-03 21:27:09Z chouck $";
+static char rcsid[] = "$Id$";
 #endif
 
 /*
diff --git a/mfhdf/ncdump/CMakeLists.txt b/mfhdf/ncdump/CMakeLists.txt
index fa395ae..5426e7e 100644
--- a/mfhdf/ncdump/CMakeLists.txt
+++ b/mfhdf/ncdump/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 project (HDF4_MFHDF_NCDUMP)
 
 INCLUDE_DIRECTORIES (${HDF4_HDFSOURCE_DIR})
@@ -8,14 +8,14 @@ add_definitions (-DHDF)
 
 if (WIN32)
   add_definitions (-DDOS_FS)
-endif (WIN32)
+endif ()
 
 if (HDF4_BUILD_XDR_LIB)
   if (WIN32)
     add_definitions (-DNO_SYS_XDR_INC)
-  endif (WIN32)
+  endif ()
   INCLUDE_DIRECTORIES (${HDF4_MFHDF_XDR_DIR})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 
 set (ncdump_SRCS
     ${HDF4_MFHDF_NCDUMP_SOURCE_DIR}/dumplib.c
@@ -28,14 +28,14 @@ add_executable (ncdump ${ncdump_SRCS})
 TARGET_C_PROPERTIES (ncdump STATIC " " " ")
 if (HDF4_BUILD_XDR_LIB)
   target_link_libraries (ncdump ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS} ${HDF4_MF_XDR_LIB_TARGET} )
-else (HDF4_BUILD_XDR_LIB)
+else ()
   target_link_libraries (ncdump ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 TARGET_NAMING (ncdump STATIC)
 
 if (BUILD_TESTING)
   include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
 
 ##############################################################################
 ##############################################################################
diff --git a/mfhdf/ncdump/CMakeTests.cmake b/mfhdf/ncdump/CMakeTests.cmake
index 6baf00d..826e3be 100644
--- a/mfhdf/ncdump/CMakeTests.cmake
+++ b/mfhdf/ncdump/CMakeTests.cmake
@@ -9,7 +9,7 @@
 add_test (
     NAME NCDUMP-clearall-objects
     COMMAND    ${CMAKE_COMMAND}
-        -E remove 
+        -E remove
         test0.nc
         test1.nc
         test1.cdl
@@ -17,9 +17,9 @@ add_test (
 )
 if (NOT "${last_test}" STREQUAL "")
   set_tests_properties (NCDUMP-clearall-objects PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-else (NOT "${last_test}" STREQUAL "")
+else ()
   set_tests_properties (NCDUMP-clearall-objects PROPERTIES LABELS ${PROJECT_NAME})
-endif (NOT "${last_test}" STREQUAL "")
+endif ()
 set (last_test "NCDUMP-clearall-objects")
 
 #message (STATUS " Copying ${HDF4_MFHDF_NCDUMP_SOURCE_DIR}/test0.cdl to ${PROJECT_BINARY_DIR}/")
@@ -72,4 +72,4 @@ if (NCGEN_UTILITY)
   )
   set_tests_properties (NCDUMP-test2.cdl PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
   set (last_test "NCDUMP-test2.cdl")
-endif (NCGEN_UTILITY)
+endif ()
diff --git a/mfhdf/ncdump/Makefile.in b/mfhdf/ncdump/Makefile.in
index 7f15fe8..328a86c 100644
--- a/mfhdf/ncdump/Makefile.in
+++ b/mfhdf/ncdump/Makefile.in
@@ -447,6 +447,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/mfhdf/ncdump/dumplib.c b/mfhdf/ncdump/dumplib.c
index f18c7e8..799454a 100644
--- a/mfhdf/ncdump/dumplib.c
+++ b/mfhdf/ncdump/dumplib.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, University Corporation for Atmospheric Research
  *   See netcdf/README file for copying and redistribution conditions.
- *   $Id: dumplib.c 4998 2007-11-16 03:14:03Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/ncdump/dumplib.h b/mfhdf/ncdump/dumplib.h
index 9de6b32..935ff19 100644
--- a/mfhdf/ncdump/dumplib.h
+++ b/mfhdf/ncdump/dumplib.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, University Corporation for Atmospheric Research
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: dumplib.h 6036 2014-01-20 17:28:01Z acheng $
+ *   $Id$
  *********************************************************************/
 
 extern char *progname;		/* for error messages */
diff --git a/mfhdf/ncdump/ncdump.1 b/mfhdf/ncdump/ncdump.1
index 3b53597..5674545 100644
--- a/mfhdf/ncdump/ncdump.1
+++ b/mfhdf/ncdump/ncdump.1
@@ -1,5 +1,5 @@
-.\" $Id: ncdump.1 2364 1996-03-26 22:34:11Z georgev $
-.TH NCDUMP 1 "$Date: 1996-03-26 16:34:11 -0600 (Tue, 26 Mar 1996) $" "Printed: \n(yr-\n(mo-\n(dy" "UNIDATA UTILITIES"
+.\" $Id$
+.TH NCDUMP 1 "$Date$" "Printed: \n(yr-\n(mo-\n(dy" "UNIDATA UTILITIES"
 .SH NAME
 ncdump \- Convert netCDF files to ASCII form (CDL)
 .SH SYNOPSIS
diff --git a/mfhdf/ncdump/ncdump.c b/mfhdf/ncdump/ncdump.c
index f6a69a7..bdaa120 100644
--- a/mfhdf/ncdump/ncdump.c
+++ b/mfhdf/ncdump/ncdump.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, University Corporation for Atmospheric Research
  *   See netcdf/README file for copying and redistribution conditions.
- *   $Id: ncdump.c 6178 2015-01-21 23:32:52Z bmribler $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/ncdump/ncdump.h b/mfhdf/ncdump/ncdump.h
index 95ec6a8..c412d60 100644
--- a/mfhdf/ncdump/ncdump.h
+++ b/mfhdf/ncdump/ncdump.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: ncdump.h 6178 2015-01-21 23:32:52Z bmribler $
+ *   $Id$
  *********************************************************************/
 
 #define  Printf  (void) printf
diff --git a/mfhdf/ncdump/vardata.c b/mfhdf/ncdump/vardata.c
index a639c9a..1defff2 100644
--- a/mfhdf/ncdump/vardata.c
+++ b/mfhdf/ncdump/vardata.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: vardata.c 6178 2015-01-21 23:32:52Z bmribler $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/ncdump/vardata.h b/mfhdf/ncdump/vardata.h
index 7b9c53c..6a4dcc1 100644
--- a/mfhdf/ncdump/vardata.h
+++ b/mfhdf/ncdump/vardata.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, University Corporation for Atmospheric Research
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: vardata.h 2364 1996-03-26 22:34:11Z georgev $
+ *   $Id$
  *********************************************************************/
 
 extern char *progname;		/* for error messages */
diff --git a/mfhdf/ncgen/CMakeLists.txt b/mfhdf/ncgen/CMakeLists.txt
index a24d0b0..0d12a5a 100644
--- a/mfhdf/ncgen/CMakeLists.txt
+++ b/mfhdf/ncgen/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 project (HDF4_MFHDF_NCGEN)
 
 INCLUDE_DIRECTORIES (
@@ -13,14 +13,14 @@ add_definitions (-DHDF)
 
 if (WIN32)
   ADD_DEFINITIONS(-DDOS_FS)
-endif (WIN32)
+endif ()
 
 if (HDF4_BUILD_XDR_LIB)
   if (WIN32)
     add_definitions (-DNO_SYS_XDR_INC)
-  endif (WIN32)
+  endif ()
   INCLUDE_DIRECTORIES (${HDF4_MFHDF_XDR_DIR})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 
 set (ncgen_SRCS
     ${HDF4_MFHDF_NCGEN_SOURCE_DIR}/close.c
@@ -35,20 +35,20 @@ set (ncgen_SRCS
 )
 if (WIN32)
   set (ncgen_SRCS ${ncgen_SRCS} ${HDF4_SOURCE_DIR}/mfhdf/util/getopt.c)
-endif (WIN32)
+endif ()
 
 add_executable (ncgen ${ncgen_SRCS})
 TARGET_C_PROPERTIES (ncgen STATIC " " " ")
 if (HDF4_BUILD_XDR_LIB)
   target_link_libraries (ncgen ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS} ${HDF4_MF_XDR_LIB_TARGET} )
-else (HDF4_BUILD_XDR_LIB)
+else ()
   target_link_libraries (ncgen ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 TARGET_NAMING (ncgen STATIC)
 
 if (BUILD_TESTING)
   include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
 
 ##############################################################################
 ##############################################################################
diff --git a/mfhdf/ncgen/CMakeTests.cmake b/mfhdf/ncgen/CMakeTests.cmake
index 6acd309..e057bc0 100644
--- a/mfhdf/ncgen/CMakeTests.cmake
+++ b/mfhdf/ncgen/CMakeTests.cmake
@@ -9,7 +9,7 @@
   add_test (
       NAME NCGEN-clearall-objects
       COMMAND    ${CMAKE_COMMAND}
-          -E remove 
+          -E remove
           ctest0.nc
           ctest1.cdl
           ftest0.nc
@@ -27,9 +27,9 @@
   )
   if (NOT "${last_test}" STREQUAL "")
     set_tests_properties (NCGEN-clearall-objects PROPERTIES DEPENDS ${last_test} LABELS ${PROJECT_NAME})
-  else (NOT "${last_test}" STREQUAL "")
+  else ()
     set_tests_properties (NCGEN-clearall-objects PROPERTIES LABELS ${PROJECT_NAME})
-  endif (NOT "${last_test}" STREQUAL "")
+  endif ()
   set (last_test "NCGEN-clearall-objects")
 
   #message (STATUS " Copying ${HDF4_MFHDF_NCGEN_SOURCE_DIR}/test0.cdl to ${PROJECT_BINARY_DIR}/")
@@ -140,4 +140,4 @@ if (HDF4_BUILD_FORTRAN)
 #    else                                                                \
 #      echo "*** ncgen -f test failed (but roundoff differences are OK) ***"; \
 #    fi
-endif (HDF4_BUILD_FORTRAN)
+endif ()
diff --git a/mfhdf/ncgen/Makefile.in b/mfhdf/ncgen/Makefile.in
index fd8e350..6a95bcd 100644
--- a/mfhdf/ncgen/Makefile.in
+++ b/mfhdf/ncgen/Makefile.in
@@ -462,6 +462,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/mfhdf/ncgen/close.c b/mfhdf/ncgen/close.c
index a6fc926..036d8f0 100644
--- a/mfhdf/ncgen/close.c
+++ b/mfhdf/ncgen/close.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: close.c 6036 2014-01-20 17:28:01Z acheng $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/ncgen/escapes.c b/mfhdf/ncgen/escapes.c
index 50ee748..4ecfd17 100644
--- a/mfhdf/ncgen/escapes.c
+++ b/mfhdf/ncgen/escapes.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: escapes.c 3226 1997-11-05 19:41:13Z koziol $
+ *   $Id$
  *********************************************************************/
 
 #include <stdlib.h>
diff --git a/mfhdf/ncgen/generate.c b/mfhdf/ncgen/generate.c
index 42a2cc1..ed038ef 100644
--- a/mfhdf/ncgen/generate.c
+++ b/mfhdf/ncgen/generate.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: generate.c 6032 2014-01-17 18:13:52Z acheng $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/ncgen/generic.h b/mfhdf/ncgen/generic.h
index 3b3e46d..f019d09 100644
--- a/mfhdf/ncgen/generic.h
+++ b/mfhdf/ncgen/generic.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: generic.h 2365 1996-03-26 22:43:35Z georgev $
+ *   $Id$
  *********************************************************************/
 
 union generic {			/* used to hold any kind of fill_value */
diff --git a/mfhdf/ncgen/genlib.c b/mfhdf/ncgen/genlib.c
index 455a5a7..298609c 100644
--- a/mfhdf/ncgen/genlib.c
+++ b/mfhdf/ncgen/genlib.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: genlib.c 3226 1997-11-05 19:41:13Z koziol $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/ncgen/genlib.h b/mfhdf/ncgen/genlib.h
index cae96d9..cd53b5f 100644
--- a/mfhdf/ncgen/genlib.h
+++ b/mfhdf/ncgen/genlib.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: genlib.h 3226 1997-11-05 19:41:13Z koziol $
+ *   $Id$
  *********************************************************************/
 
 extern char	*progname;	/* for error messages */
diff --git a/mfhdf/ncgen/getfill.c b/mfhdf/ncgen/getfill.c
index d58ff57..84b58ae 100644
--- a/mfhdf/ncgen/getfill.c
+++ b/mfhdf/ncgen/getfill.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: getfill.c 3862 2000-08-29 13:57:05Z koziol $
+ *   $Id$
  *********************************************************************/
 
 #include "mfhdf.h"
diff --git a/mfhdf/ncgen/init.c b/mfhdf/ncgen/init.c
index 71cf094..2ec3c4e 100644
--- a/mfhdf/ncgen/init.c
+++ b/mfhdf/ncgen/init.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: init.c 4928 2007-09-06 21:48:49Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/ncgen/load.c b/mfhdf/ncgen/load.c
index d5d47c8..02c43c8 100644
--- a/mfhdf/ncgen/load.c
+++ b/mfhdf/ncgen/load.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: load.c 4928 2007-09-06 21:48:49Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/ncgen/main.c b/mfhdf/ncgen/main.c
index 15ece31..16c0204 100644
--- a/mfhdf/ncgen/main.c
+++ b/mfhdf/ncgen/main.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: main.c 6173 2015-01-20 07:39:51Z bmribler $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/ncgen/ncgen.1 b/mfhdf/ncgen/ncgen.1
index 0b7f5f9..3c9f6ae 100644
--- a/mfhdf/ncgen/ncgen.1
+++ b/mfhdf/ncgen/ncgen.1
@@ -1,5 +1,5 @@
-.\" $Id: ncgen.1 2365 1996-03-26 22:43:35Z georgev $
-.TH NCGEN 1 "$Date: 1996-03-26 16:43:35 -0600 (Tue, 26 Mar 1996) $" "Printed: \n(yr-\n(mo-\n(dy" "UNIDATA UTILITIES"
+.\" $Id$
+.TH NCGEN 1 "$Date$" "Printed: \n(yr-\n(mo-\n(dy" "UNIDATA UTILITIES"
 .SH NAME
 ncgen \- From a CDL file generate a netCDF file, a C program, or a Fortran
 program
diff --git a/mfhdf/ncgen/ncgen.h b/mfhdf/ncgen/ncgen.h
index dff78cb..cef9cf6 100644
--- a/mfhdf/ncgen/ncgen.h
+++ b/mfhdf/ncgen/ncgen.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: ncgen.h 6036 2014-01-20 17:28:01Z acheng $
+ *   $Id$
  *********************************************************************/
 
 #include "local_nc.h"
diff --git a/mfhdf/ncgen/ncgen.l b/mfhdf/ncgen/ncgen.l
index 917a72b..2bf52aa 100644
--- a/mfhdf/ncgen/ncgen.l
+++ b/mfhdf/ncgen/ncgen.l
@@ -2,7 +2,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: ncgen.l 6036 2014-01-20 17:28:01Z acheng $
+ *   $Id$
  *********************************************************************/
 
 #define	STREQ(a, b)	(*(a) == *(b) && strcmp((a), (b)) == 0)
diff --git a/mfhdf/ncgen/ncgen.y b/mfhdf/ncgen/ncgen.y
index 372d0e4..5ef41d7 100644
--- a/mfhdf/ncgen/ncgen.y
+++ b/mfhdf/ncgen/ncgen.y
@@ -1,14 +1,14 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: ncgen.y 4928 2007-09-06 21:48:49Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 /* yacc source for "ncgen", a netCDL parser and netCDF generator */
 
 %{
 #ifndef lint
-static char SccsId[] = "$Id: ncgen.y 4928 2007-09-06 21:48:49Z epourmal $";
+static char SccsId[] = "$Id$";
 #endif
 #include        <string.h>
 #include	<stdlib.h>
diff --git a/mfhdf/nctest/CMakeLists.txt b/mfhdf/nctest/CMakeLists.txt
index bfbc3da..c1e6f3d 100644
--- a/mfhdf/nctest/CMakeLists.txt
+++ b/mfhdf/nctest/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 project (HDF4_MFHDF_NCTEST)
 
 INCLUDE_DIRECTORIES (${HDF4_HDFSOURCE_DIR})
@@ -8,14 +8,14 @@ add_definitions (-DHDF)
 
 if (WIN32)
   add_definitions (-DDOS_FS)
-endif (WIN32)
+endif ()
 
 if (HDF4_BUILD_XDR_LIB)
   if (WIN32)
     add_definitions (-DNO_SYS_XDR_INC)
-  endif (WIN32)
+  endif ()
   INCLUDE_DIRECTORIES (${HDF4_MFHDF_XDR_DIR})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 
 set (nctest_SRCS
     ${HDF4_MFHDF_NCTEST_SOURCE_DIR}/add.c
@@ -39,31 +39,31 @@ set (nctest_SRCS
     ${HDF4_MFHDF_NCTEST_SOURCE_DIR}/vputget.c
     ${HDF4_MFHDF_NCTEST_SOURCE_DIR}/vputgetg.c
 )
-  
+
 add_executable (nctest ${nctest_SRCS})
 TARGET_C_PROPERTIES (nctest STATIC " " " ")
 if (HDF4_BUILD_XDR_LIB)
   target_link_libraries (nctest ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS} ${HDF4_MF_XDR_LIB_TARGET} )
-else (HDF4_BUILD_XDR_LIB)
+else ()
   target_link_libraries (nctest ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 TARGET_NAMING (nctest STATIC)
- 
+
 set (HDF4_NC_TEST_FILES
     test_unlim.cdl
     test_unlim.nc
 )
- 
+
 foreach (h4_file ${HDF4_NC_TEST_FILES})
   set (dest "${PROJECT_BINARY_DIR}/${h4_file}")
   #message (STATUS " Copying ${HDF4_MFHDF_NCTEST_SOURCE_DIR}/${h4_file} to ${PROJECT_BINARY_DIR}/")
   add_custom_command (
-      TARGET     nctest 
+      TARGET     nctest
       POST_BUILD
       COMMAND    ${CMAKE_COMMAND}
       ARGS       -E copy_if_different ${HDF4_MFHDF_NCTEST_SOURCE_DIR}/${h4_file} ${dest}
   )
-      
-endforeach (h4_file ${HDF4_NC_TEST_FILES})
+
+endforeach ()
 
 include (CMakeTests.cmake)
diff --git a/mfhdf/nctest/Makefile.in b/mfhdf/nctest/Makefile.in
index f5573b6..1f3792f 100644
--- a/mfhdf/nctest/Makefile.in
+++ b/mfhdf/nctest/Makefile.in
@@ -445,6 +445,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/mfhdf/nctest/add.c b/mfhdf/nctest/add.c
index d6b7807..5074e72 100644
--- a/mfhdf/nctest/add.c
+++ b/mfhdf/nctest/add.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: add.c 4998 2007-11-16 03:14:03Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 /* 
diff --git a/mfhdf/nctest/add.h b/mfhdf/nctest/add.h
index 81a080f..10ab30e 100644
--- a/mfhdf/nctest/add.h
+++ b/mfhdf/nctest/add.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: add.h 2365 1996-03-26 22:43:35Z georgev $
+ *   $Id$
  *********************************************************************/
 
 #undef PROTO
diff --git a/mfhdf/nctest/atttests.c b/mfhdf/nctest/atttests.c
index 46e2587..e773f8e 100644
--- a/mfhdf/nctest/atttests.c
+++ b/mfhdf/nctest/atttests.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: atttests.c 6043 2014-01-21 21:09:03Z acheng $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/nctest/cdftests.c b/mfhdf/nctest/cdftests.c
index 1053393..c1434a2 100644
--- a/mfhdf/nctest/cdftests.c
+++ b/mfhdf/nctest/cdftests.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: cdftests.c 6036 2014-01-20 17:28:01Z acheng $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/nctest/dimtests.c b/mfhdf/nctest/dimtests.c
index 5b7109a..eae1958 100644
--- a/mfhdf/nctest/dimtests.c
+++ b/mfhdf/nctest/dimtests.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: dimtests.c 4998 2007-11-16 03:14:03Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/nctest/driver.c b/mfhdf/nctest/driver.c
index 9199af2..cd35022 100644
--- a/mfhdf/nctest/driver.c
+++ b/mfhdf/nctest/driver.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: driver.c 6180 2015-01-22 06:00:33Z bmribler $
+ *   $Id$
  *********************************************************************/
 
 #include "h4config.h"
diff --git a/mfhdf/nctest/emalloc.c b/mfhdf/nctest/emalloc.c
index f6c4709..87a66ce 100644
--- a/mfhdf/nctest/emalloc.c
+++ b/mfhdf/nctest/emalloc.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: emalloc.c 2365 1996-03-26 22:43:35Z georgev $
+ *   $Id$
  *********************************************************************/
 
 /*LINTLIBRARY*/
diff --git a/mfhdf/nctest/emalloc.h b/mfhdf/nctest/emalloc.h
index e714e6b..1b24bd1 100644
--- a/mfhdf/nctest/emalloc.h
+++ b/mfhdf/nctest/emalloc.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, University Corporation for Atmospheric Research
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: emalloc.h 2365 1996-03-26 22:43:35Z georgev $
+ *   $Id$
  *********************************************************************/
 
 #undef PROTO
diff --git a/mfhdf/nctest/error.c b/mfhdf/nctest/error.c
index a06e2b6..4200406 100644
--- a/mfhdf/nctest/error.c
+++ b/mfhdf/nctest/error.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: error.c 4998 2007-11-16 03:14:03Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/nctest/error.h b/mfhdf/nctest/error.h
index eb98c5b..f9e88fa 100644
--- a/mfhdf/nctest/error.h
+++ b/mfhdf/nctest/error.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, University Corporation for Atmospheric Research
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: error.h 3226 1997-11-05 19:41:13Z koziol $
+ *   $Id$
  *********************************************************************/
 
 #undef PROTO
diff --git a/mfhdf/nctest/misctest.c b/mfhdf/nctest/misctest.c
index 93c6639..b0b965a 100644
--- a/mfhdf/nctest/misctest.c
+++ b/mfhdf/nctest/misctest.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: misctest.c 4998 2007-11-16 03:14:03Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/nctest/rec.c b/mfhdf/nctest/rec.c
index 4f0c367..5a79c0d 100644
--- a/mfhdf/nctest/rec.c
+++ b/mfhdf/nctest/rec.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, University Corporation for Atmospheric Research
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: rec.c 5207 2009-08-05 04:18:22Z bmribler $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/nctest/slabs.c b/mfhdf/nctest/slabs.c
index f8c1f75..c624a0d 100644
--- a/mfhdf/nctest/slabs.c
+++ b/mfhdf/nctest/slabs.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: slabs.c 4998 2007-11-16 03:14:03Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 #include "h4config.h"
diff --git a/mfhdf/nctest/testcdf.h b/mfhdf/nctest/testcdf.h
index 8809132..5e988d8 100644
--- a/mfhdf/nctest/testcdf.h
+++ b/mfhdf/nctest/testcdf.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: testcdf.h 4997 2007-11-15 18:12:15Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 /*
diff --git a/mfhdf/nctest/tests.h b/mfhdf/nctest/tests.h
index bb64af3..7f489a9 100644
--- a/mfhdf/nctest/tests.h
+++ b/mfhdf/nctest/tests.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: tests.h 4445 2003-12-10 21:15:54Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 #undef PROTO
diff --git a/mfhdf/nctest/val.c b/mfhdf/nctest/val.c
index 0a90fca..3ad667e 100644
--- a/mfhdf/nctest/val.c
+++ b/mfhdf/nctest/val.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: val.c 6141 2014-10-21 19:56:48Z bmribler $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/nctest/val.h b/mfhdf/nctest/val.h
index 6360759..b19322d 100644
--- a/mfhdf/nctest/val.h
+++ b/mfhdf/nctest/val.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: val.h 2365 1996-03-26 22:43:35Z georgev $
+ *   $Id$
  *********************************************************************/
 
 #undef PROTO
diff --git a/mfhdf/nctest/vardef.c b/mfhdf/nctest/vardef.c
index 772ada6..4d1af52 100644
--- a/mfhdf/nctest/vardef.c
+++ b/mfhdf/nctest/vardef.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: vardef.c 4998 2007-11-16 03:14:03Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/nctest/varget.c b/mfhdf/nctest/varget.c
index 955e515..36333f2 100644
--- a/mfhdf/nctest/varget.c
+++ b/mfhdf/nctest/varget.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: varget.c 4998 2007-11-16 03:14:03Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/nctest/vargetg.c b/mfhdf/nctest/vargetg.c
index c9fc11e..07dc2d0 100644
--- a/mfhdf/nctest/vargetg.c
+++ b/mfhdf/nctest/vargetg.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: vargetg.c 4998 2007-11-16 03:14:03Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/nctest/varput.c b/mfhdf/nctest/varput.c
index d856311..c158e96 100644
--- a/mfhdf/nctest/varput.c
+++ b/mfhdf/nctest/varput.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: varput.c 4998 2007-11-16 03:14:03Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/nctest/varputg.c b/mfhdf/nctest/varputg.c
index a6b081f..49319a4 100644
--- a/mfhdf/nctest/varputg.c
+++ b/mfhdf/nctest/varputg.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: varputg.c 4998 2007-11-16 03:14:03Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/nctest/vartests.c b/mfhdf/nctest/vartests.c
index cb8caf0..e91a9ab 100644
--- a/mfhdf/nctest/vartests.c
+++ b/mfhdf/nctest/vartests.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: vartests.c 4998 2007-11-16 03:14:03Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/nctest/vputget.c b/mfhdf/nctest/vputget.c
index 3ffd451..6e3fc98 100644
--- a/mfhdf/nctest/vputget.c
+++ b/mfhdf/nctest/vputget.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: vputget.c 4998 2007-11-16 03:14:03Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/nctest/vputgetg.c b/mfhdf/nctest/vputgetg.c
index 74ea7c1..e9da409 100644
--- a/mfhdf/nctest/vputgetg.c
+++ b/mfhdf/nctest/vputgetg.c
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: vputgetg.c 4998 2007-11-16 03:14:03Z epourmal $
+ *   $Id$
  *********************************************************************/
 
 #include <stdio.h>
diff --git a/mfhdf/test/CMakeLists.txt b/mfhdf/test/CMakeLists.txt
index f715a1f..d719e4e 100644
--- a/mfhdf/test/CMakeLists.txt
+++ b/mfhdf/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1.0)
+cmake_minimum_required (VERSION 3.2.2)
 project (HDF4_MFHDF_TEST)
 
 INCLUDE_DIRECTORIES (${HDF4_HDFSOURCE_DIR})
@@ -8,14 +8,14 @@ add_definitions (-DHDF)
 
 if (WIN32)
   add_definitions (-DDOS_FS)
-endif (WIN32)
+endif ()
 
 if (HDF4_BUILD_XDR_LIB)
   if (WIN32)
     add_definitions (-DNO_SYS_XDR_INC)
-  endif (WIN32)
+  endif ()
   INCLUDE_DIRECTORIES (${HDF4_MFHDF_XDR_DIR})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 
 set (hdftest_SRCS
     ${HDF4_MFHDF_TEST_SOURCE_DIR}/hdftest.c
@@ -45,9 +45,9 @@ TARGET_NAMING (hdftest STATIC)
 TARGET_C_PROPERTIES (hdftest STATIC " " " ")
 if (HDF4_BUILD_XDR_LIB)
   target_link_libraries (hdftest ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${HDF4_MF_XDR_LIB_TARGET} ${LINK_LIBS})
-else (HDF4_BUILD_XDR_LIB)
+else ()
   target_link_libraries (hdftest ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 set_target_properties (hdftest PROPERTIES FOLDER test)
 if (BUILD_SHARED_LIBS)
   add_executable (hdftest-shared ${hdftest_SRCS})
@@ -55,11 +55,11 @@ if (BUILD_SHARED_LIBS)
   TARGET_C_PROPERTIES (hdftest-shared SHARED " " " ")
   if (HDF4_BUILD_XDR_LIB)
     target_link_libraries (hdftest-shared ${HDF4_MF_LIBSH_TARGET} ${HDF4_SRC_LIBSH_TARGET} ${HDF4_MF_XDR_LIBSH_TARGET} ${LINK_SHARED_LIBS})
-  else (HDF4_BUILD_XDR_LIB)
+  else ()
     target_link_libraries (hdftest-shared ${HDF4_MF_LIBSH_TARGET} ${HDF4_SRC_LIBSH_TARGET} ${LINK_SHARED_LIBS})
-  endif (HDF4_BUILD_XDR_LIB)
+  endif ()
   set_target_properties (hdftest-shared PROPERTIES FOLDER test)
-endif (BUILD_SHARED_LIBS)
+endif ()
 
 #-- Adding test for cdftest
 add_executable (cdftest ${HDF4_MFHDF_TEST_SOURCE_DIR}/cdftest.c)
@@ -67,9 +67,9 @@ TARGET_NAMING (cdftest STATIC)
 TARGET_C_PROPERTIES (cdftest STATIC " " " ")
 if (HDF4_BUILD_XDR_LIB)
   target_link_libraries (cdftest ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${HDF4_MF_XDR_LIB_TARGET} ${LINK_LIBS})
-else (HDF4_BUILD_XDR_LIB)
+else ()
   target_link_libraries (cdftest ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 set_target_properties (cdftest PROPERTIES FOLDER test)
 if (BUILD_SHARED_LIBS)
   add_executable (cdftest-shared ${HDF4_MFHDF_TEST_SOURCE_DIR}/cdftest.c)
@@ -77,11 +77,11 @@ if (BUILD_SHARED_LIBS)
   TARGET_C_PROPERTIES (cdftest-shared SHARED " " " ")
   if (HDF4_BUILD_XDR_LIB)
     target_link_libraries (cdftest-shared ${HDF4_MF_LIBSH_TARGET} ${HDF4_SRC_LIBSH_TARGET} ${HDF4_MF_XDR_LIBSH_TARGET} ${LINK_SHARED_LIBS})
-  else (HDF4_BUILD_XDR_LIB)
+  else ()
     target_link_libraries (cdftest-shared ${HDF4_MF_LIBSH_TARGET} ${HDF4_SRC_LIBSH_TARGET} ${LINK_SHARED_LIBS})
-  endif (HDF4_BUILD_XDR_LIB)
+  endif ()
   set_target_properties (cdftest-shared PROPERTIES FOLDER test)
-endif (BUILD_SHARED_LIBS)
+endif ()
 
 #-- Adding test for hdfnctest
 set (hdfnctest_SRCS
@@ -96,9 +96,9 @@ TARGET_NAMING (hdfnctest STATIC)
 TARGET_C_PROPERTIES (hdfnctest STATIC " " " ")
 if (HDF4_BUILD_XDR_LIB)
   target_link_libraries (hdfnctest ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${HDF4_MF_XDR_LIB_TARGET} ${LINK_LIBS})
-else (HDF4_BUILD_XDR_LIB)
+else ()
   target_link_libraries (hdfnctest ${HDF4_MF_LIB_TARGET} ${HDF4_SRC_LIB_TARGET} ${LINK_LIBS})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
 set_target_properties (hdfnctest PROPERTIES FOLDER test)
 if (BUILD_SHARED_LIBS)
   add_executable (hdfnctest-shared ${hdfnctest_SRCS})
@@ -106,10 +106,10 @@ if (BUILD_SHARED_LIBS)
   TARGET_C_PROPERTIES (hdfnctest-shared SHARED " " " ")
   if (HDF4_BUILD_XDR_LIB)
     target_link_libraries (hdfnctest-shared ${HDF4_MF_LIBSH_TARGET} ${HDF4_SRC_LIBSH_TARGET} ${HDF4_MF_XDR_LIBSH_TARGET} ${LINK_SHARED_LIBS})
-  else (HDF4_BUILD_XDR_LIB)
+  else ()
     target_link_libraries (hdfnctest-shared ${HDF4_MF_LIBSH_TARGET} ${HDF4_SRC_LIBSH_TARGET} ${LINK_SHARED_LIBS})
-  endif (HDF4_BUILD_XDR_LIB)
+  endif ()
   set_target_properties (hdfnctest-shared PROPERTIES FOLDER test)
-endif (BUILD_SHARED_LIBS)
+endif ()
 
 include (CMakeTests.cmake)
diff --git a/mfhdf/test/CMakeTests.cmake b/mfhdf/test/CMakeTests.cmake
index 0bd9ccd..97b09b6 100644
--- a/mfhdf/test/CMakeTests.cmake
+++ b/mfhdf/test/CMakeTests.cmake
@@ -7,7 +7,7 @@
 file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/TEST")
 if (BUILD_SHARED_LIBS)
   file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/TEST-shared")
-endif (BUILD_SHARED_LIBS)
+endif ()
 
 #-- Copy all the dat files from the test directory into the source directory
 set (HDF4_REFERENCE_TEST_FILES
@@ -34,8 +34,8 @@ foreach (h4_file ${HDF4_REFERENCE_TEST_FILES})
          COMMAND    ${CMAKE_COMMAND}
          ARGS       -E copy_if_different ${HDF4_MFHDF_TEST_DIR}/${h4_file} ${dest}
    )
-   endif (BUILD_SHARED_LIBS)
-endforeach (h4_file ${HDF4_REFERENCE_TEST_FILES})
+   endif ()
+endforeach ()
 
 #-- Copy all the dat files from the test directory into the source directory
 set (HDF4_REFERENCE2_TEST_FILES
@@ -58,8 +58,8 @@ foreach (h4_file ${HDF4_REFERENCE2_TEST_FILES})
          COMMAND    ${CMAKE_COMMAND}
          ARGS       -E copy_if_different ${HDF4_MFHDF_TEST_DIR}/${h4_file} ${dest}
      )
-   endif (BUILD_SHARED_LIBS)
-endforeach (h4_file ${HDF4_REFERENCE2_TEST_FILES})
+   endif ()
+endforeach ()
 
 ##############################################################################
 ##############################################################################
@@ -205,7 +205,7 @@ if (BUILD_SHARED_LIBS)
       WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/TEST-shared
       LABELS ${PROJECT_NAME}
   )
-endif (BUILD_SHARED_LIBS)
+endif ()
 
 #-- Adding test for xdrtest
 if (HDF4_BUILD_XDR_LIB)
@@ -221,18 +221,18 @@ if (HDF4_BUILD_XDR_LIB)
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_MFHDF_XDR_DIR}/xdrtest.out ${PROJECT_BINARY_DIR}/TEST/xdrtest.out
     )
-  else (MSVC_VERSION LESS 1900)
+  else ()
     add_custom_command (
         TARGET     xdrtest
         POST_BUILD
         COMMAND    ${CMAKE_COMMAND}
         ARGS       -E copy_if_different ${HDF4_MFHDF_XDR_DIR}/xdrtest.cyg ${PROJECT_BINARY_DIR}/TEST/xdrtest.out
     )
-  endif (MSVC_VERSION LESS 1900)
+  endif ()
 
   if (HDF4_ENABLE_USING_MEMCHECKER)
     add_test (NAME MFHDF_TEST-xdrtest COMMAND $<TARGET_FILE:xdrtest>)
-  else (HDF4_ENABLE_USING_MEMCHECKER)
+  else ()
     add_test (
         NAME MFHDF_TEST-xdrtest
         COMMAND "${CMAKE_COMMAND}"
@@ -244,6 +244,6 @@ if (HDF4_BUILD_XDR_LIB)
             -D "TEST_REFERENCE=xdrtest.out"
             -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
     )
-  endif (HDF4_ENABLE_USING_MEMCHECKER)
+  endif ()
   set_tests_properties (MFHDF_TEST-xdrtest PROPERTIES DEPENDS hdfnctest LABELS ${PROJECT_NAME})
-endif (HDF4_BUILD_XDR_LIB)
+endif ()
diff --git a/mfhdf/test/Makefile.in b/mfhdf/test/Makefile.in
index 94d19f2..32d27b4 100644
--- a/mfhdf/test/Makefile.in
+++ b/mfhdf/test/Makefile.in
@@ -455,6 +455,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/mfhdf/test/cdftest.c b/mfhdf/test/cdftest.c
index 591ad81..3ca93ec 100644
--- a/mfhdf/test/cdftest.c
+++ b/mfhdf/test/cdftest.c
@@ -8,10 +8,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 static char mrcsid[] = "Id: cdftest.c,v 1.11 1994/01/10 23:07:27 chouck Exp ";
diff --git a/mfhdf/test/gen_sds_szipped.c b/mfhdf/test/gen_sds_szipped.c
index f00f377..21feeec 100644
--- a/mfhdf/test/gen_sds_szipped.c
+++ b/mfhdf/test/gen_sds_szipped.c
@@ -4,10 +4,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /****************************************************************************
diff --git a/mfhdf/test/hdfnctest.c b/mfhdf/test/hdfnctest.c
index e2e64fb..3c240db 100644
--- a/mfhdf/test/hdfnctest.c
+++ b/mfhdf/test/hdfnctest.c
@@ -4,10 +4,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "mfhdf.h"
diff --git a/mfhdf/test/hdftest.c b/mfhdf/test/hdftest.c
index be7a794..f6b46d7 100644
--- a/mfhdf/test/hdftest.c
+++ b/mfhdf/test/hdftest.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /* $Id: hdftest.c 5218 2009-08-29 04:21:49Z bmribler $ */
diff --git a/mfhdf/test/hdftest.h b/mfhdf/test/hdftest.h
index 6a04a86..a211c49 100644
--- a/mfhdf/test/hdftest.h
+++ b/mfhdf/test/hdftest.h
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /*
diff --git a/mfhdf/test/tattdatainfo.c b/mfhdf/test/tattdatainfo.c
index 4200c47..89decd6 100644
--- a/mfhdf/test/tattdatainfo.c
+++ b/mfhdf/test/tattdatainfo.c
@@ -4,10 +4,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /****************************************************************************
diff --git a/mfhdf/test/tattributes.c b/mfhdf/test/tattributes.c
index e228263..f18ca58 100644
--- a/mfhdf/test/tattributes.c
+++ b/mfhdf/test/tattributes.c
@@ -4,10 +4,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /****************************************************************************
diff --git a/mfhdf/test/tchunk.c b/mfhdf/test/tchunk.c
index 29dba52..6f9d989 100644
--- a/mfhdf/test/tchunk.c
+++ b/mfhdf/test/tchunk.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "mfhdf.h"
diff --git a/mfhdf/test/tcomp.c b/mfhdf/test/tcomp.c
index 2f7c078..e2e914e 100644
--- a/mfhdf/test/tcomp.c
+++ b/mfhdf/test/tcomp.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /****************************************************************************
diff --git a/mfhdf/test/tcoordvar.c b/mfhdf/test/tcoordvar.c
index 8c76691..ab34a9a 100644
--- a/mfhdf/test/tcoordvar.c
+++ b/mfhdf/test/tcoordvar.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /****************************************************************************
diff --git a/mfhdf/test/tdatainfo.c b/mfhdf/test/tdatainfo.c
index c49c184..21d78d2 100644
--- a/mfhdf/test/tdatainfo.c
+++ b/mfhdf/test/tdatainfo.c
@@ -4,10 +4,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /****************************************************************************
diff --git a/mfhdf/test/tdatasizes.c b/mfhdf/test/tdatasizes.c
index 0d2d6b9..3e6e629 100644
--- a/mfhdf/test/tdatasizes.c
+++ b/mfhdf/test/tdatasizes.c
@@ -4,10 +4,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /****************************************************************************
diff --git a/mfhdf/test/tdim.c b/mfhdf/test/tdim.c
index cd71389..8e83921 100644
--- a/mfhdf/test/tdim.c
+++ b/mfhdf/test/tdim.c
@@ -1,14 +1,13 @@
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  * Copyright by The HDF Group.                                               *
- * Copyright by the Board of Trustees of the University of Illinois.         *
  * All rights reserved.                                                      *
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "mfhdf.h"
diff --git a/mfhdf/test/temptySDSs.c b/mfhdf/test/temptySDSs.c
index 1303767..49a4399 100644
--- a/mfhdf/test/temptySDSs.c
+++ b/mfhdf/test/temptySDSs.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /****************************************************************************
diff --git a/mfhdf/test/texternal.c b/mfhdf/test/texternal.c
index 25303b6..3bdcddf 100644
--- a/mfhdf/test/texternal.c
+++ b/mfhdf/test/texternal.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "mfhdf.h"
@@ -17,17 +17,17 @@
 
 #include "hdftest.h"
 
-#define EXTTST    "exttst.hdf"		/* main file for external file test */
-#define EXTFILE   "SD_external_file"	/* file to contain external data */
-#define EXTFILE1  "SD_external_file 2"	/* file to contain external data */
-#define EXTSDS    "ExternalDataSet"	/* data set written with external data
-					   right after creation */
-#define EXTSDS2   "ExternalDataSet 2"	/* data set first empty then written
-					   with external data */
-#define WRAPSDS   "WrapperDataSet"	/* data set pointing to external data */
-#define NOEXTSDS  "NoExternalDataSet"	/* data set with data in main file */
-#define EXTFILE2  "ExternalSDSexisting"	/* data set having data */
-#define EXTFILE3  "ShouldNotHappen"	/* data set already is external */
+#define EXTTST    "exttst.hdf"        /* main file for external file test */
+#define EXTFILE   "SD_external_file"    /* file to contain external data */
+#define EXTFILE1  "SD_external_file 2"    /* file to contain external data */
+#define EXTSDS    "ExternalDataSet"    /* data set written with external data
+                    right after creation */
+#define EXTSDS2   "ExternalDataSet 2"    /* data set first empty then written
+                    with external data */
+#define WRAPSDS   "WrapperDataSet"    /* data set pointing to external data */
+#define NOEXTSDS  "NoExternalDataSet"    /* data set with data in main file */
+#define EXTFILE2  "ExternalSDSexisting"    /* data set having data */
+#define EXTFILE3  "ShouldNotHappen"    /* data set already is external */
 #define OFFSET    24
 #define NUM_SDS   4
 #define SDS1      "Dataset 1"
@@ -39,8 +39,8 @@
 #define Y_LENGTH  5
 #define Z_LENGTH  6
 #define RANK2     2
-#define DIM1	  5
-#define DIM2	  5
+#define DIM1      5
+#define DIM2      5
 
 void verify_data(int32 sd_id, int32 sds_ind);
 
@@ -52,32 +52,32 @@ int32 ap_data[1][Y_LENGTH][X_LENGTH];
 
 /********************************************************************
    Name: test_setexternal() - tests basic funtionalities in storing
-			data in an external file
-
-   Description: 
-	This function tests three scenarios:
-	- Data written in main file then moved to external file and modified
-	- Data in external file is pointed to by a "wrapper" data set
-	- Empty data set is written with data in the external file
-
-	The main contents include:
-	- Data written in main file then moved and modified
-	  + create and write the entire data set in the main file
-	  + move the data to the external file with SDsetexternalfile
-	  + modify this external data
-	- Data in external file pointed to by a "wrapper" data set
-	  + create a data set in the main file, i.e., the wrapper data set
-	  + have the wrapper pointed to part of the external data that
-	    belongs to the external data set above
-	  + read the wrapper's data and verify
-	- Empty data set is written with data in the external file
-	  + create a data set in the main file and close it
-	  + re-open the data set
-	  + promote it to external data set, i.e., SDsetexternalfile
-	  + write data to the data set
+            data in an external file
+
+   Description:
+    This function tests three scenarios:
+    - Data written in main file then moved to external file and modified
+    - Data in external file is pointed to by a "wrapper" data set
+    - Empty data set is written with data in the external file
+
+    The main contents include:
+    - Data written in main file then moved and modified
+    + create and write the entire data set in the main file
+    + move the data to the external file with SDsetexternalfile
+    + modify this external data
+    - Data in external file pointed to by a "wrapper" data set
+    + create a data set in the main file, i.e., the wrapper data set
+    + have the wrapper pointed to part of the external data that
+        belongs to the external data set above
+    + read the wrapper's data and verify
+    - Empty data set is written with data in the external file
+    + create a data set in the main file and close it
+    + re-open the data set
+    + promote it to external data set, i.e., SDsetexternalfile
+    + write data to the data set
 
    Return value:
-	The number of errors occurred in this routine.
+    The number of errors occurred in this routine.
 
    BMR - Jan 16, 2009
 *********************************************************************/
@@ -172,25 +172,25 @@ static int test_setexternal()
 
     /* Read and verify data via the "wrapper" data set */
     {
-	int32 odata[9];
-
-	/* Read data back from this "wrapper" data set */
-	start[0] = start[1] = 0;
-	edges[0]  = 3;
-	edges[1]  = 3;
-	status = SDreaddata(sds_id, start, NULL, edges, (VOIDP) odata);
-	CHECK(status, FAIL, "SDreaddata");
-
-	/* Verify data read back in */
-	for(ii = 0; ii < edges[0]*edges[1]; ii++)
-	{
-	    if(odata[ii] != (ii + 2) * 10) 
-	    {
-		fprintf(stderr, "Bogus val in loc %d in wrapper dset want %d  got %ld\n",
-		ii, (ii + 2) * 10, (long)odata[ii]);
-		num_errs++;
-	    }
-	}
+    int32 odata[9];
+
+    /* Read data back from this "wrapper" data set */
+    start[0] = start[1] = 0;
+    edges[0]  = 3;
+    edges[1]  = 3;
+    status = SDreaddata(sds_id, start, NULL, edges, (VOIDP) odata);
+    CHECK(status, FAIL, "SDreaddata");
+
+    /* Verify data read back in */
+    for(ii = 0; ii < edges[0]*edges[1]; ii++)
+    {
+        if(odata[ii] != (ii + 2) * 10)
+        {
+        fprintf(stderr, "Bogus val in loc %d in wrapper dset want %d  got %ld\n",
+        ii, (ii + 2) * 10, (long)odata[ii]);
+        num_errs++;
+        }
+    }
     }
 
     /* End access to the wrapper data set */
@@ -198,7 +198,7 @@ static int test_setexternal()
     CHECK(status, FAIL, "SDendaccess");
 
     /* Create an empty data set then write external data to it */
- 
+
     /* Create data set EXTSDS2 */
     nt = DFNT_INT32 | DFNT_NATIVE;
     dimsizes[0] = X_LENGTH;
@@ -240,19 +240,19 @@ static int test_setexternal()
 
 /********************************************************************
    Name: test_getexternal() - tests getting external file info on
-	various data sets
+    various data sets
 
-   Description: 
-	The main contents include:
-	- Create and write a data set in the main file only, i.e., non-external
-	  data set
-	- Get and verify external file info for external data set and
-	  wrapper data set
-	- Verifying that there is no external file info from the non-external
-	  data set
+   Description:
+    The main contents include:
+    - Create and write a data set in the main file only, i.e., non-external
+    data set
+    - Get and verify external file info for external data set and
+    wrapper data set
+    - Verifying that there is no external file info from the non-external
+    data set
 
    Return value:
-	The number of errors occurred in this routine.
+    The number of errors occurred in this routine.
 
    BMR - Jan 16, 2009
 *********************************************************************/
@@ -273,7 +273,7 @@ static int test_getexternal()
     CHECK(sd_id, FAIL, "SDstart (again)");
 
     /* Create and write a data set in the main file */
- 
+
     /* Create data set NOEXTSDS */
     nt = DFNT_INT32 | DFNT_NATIVE;
     dimsizes[0] = DIM1;
@@ -329,10 +329,10 @@ static int test_getexternal()
     /* Test passing in NULL pointer for external file name buffer, should
     fail gracefully */
     {
-	char *null_buffer=NULL;
-	intn ret_code=0;
-	ret_code = SDgetexternalinfo(sds_id, name_len+1, null_buffer, &offset, &length);
-	VERIFY(ret_code, FAIL, "SDgetexternalinfo");
+    char *null_buffer=NULL;
+    intn ret_code=0;
+    ret_code = SDgetexternalinfo(sds_id, name_len+1, null_buffer, &offset, &length);
+    VERIFY(ret_code, FAIL, "SDgetexternalinfo");
     }
 
     /* Prepare buffer for external file name */
@@ -382,10 +382,10 @@ static int test_getexternal()
     /* Test passing in NULL pointer for external file name buffer, should
     fail gracefully */
     {
-	char *null_buffer=NULL;
-	intn ret_code=0;
-	ret_code = SDgetexternalinfo(sds_id, name_len+1, null_buffer, &offset, &length);
-	VERIFY(ret_code, FAIL, "SDgetexternalinfo");
+    char *null_buffer=NULL;
+    intn ret_code=0;
+    ret_code = SDgetexternalinfo(sds_id, name_len+1, null_buffer, &offset, &length);
+    VERIFY(ret_code, FAIL, "SDgetexternalinfo");
     }
 
     extfile_name = (char *) HDmalloc(sizeof(char *) * (name_len+1));
@@ -424,17 +424,17 @@ static int test_getexternal()
 /********************************************************************
    Name: test_mult_setexternal() - tests setting external multiple times
 
-   Description: 
-	The main contents include:
-	- Create and write an external data set to FILE_NAME, then close
-	  it and the file.
-	- Re-open the file
-	- Call SDsetexternal on the data set, which is already an external SDS.
-	  This is to make sure HDFFR-1516 is fixed.
-	- Re-open the file and verify data of each data set.
+   Description:
+    The main contents include:
+    - Create and write an external data set to FILE_NAME, then close
+    it and the file.
+    - Re-open the file
+    - Call SDsetexternal on the data set, which is already an external SDS.
+    This is to make sure HDFFR-1516 is fixed.
+    - Re-open the file and verify data of each data set.
 
    Return value:
-	The number of errors occurred in this routine.
+    The number of errors occurred in this routine.
 
    BMR - Jan 16, 2009
 *********************************************************************/
@@ -447,7 +447,7 @@ int test_mult_setexternal()
     intn  name_len = 0;
     intn  status = SUCCEED;
     intn  num_errs = 0;    /* number of errors in compression test so far */
- 
+
     /* Create the file and initialize the SD interface */
     sd_id = SDstart (EXTTST, DFACC_CREATE);
     CHECK(status, FAIL, "SDstart");
@@ -523,25 +523,25 @@ int test_mult_setexternal()
 
 /********************************************************************
    Name: test_special_combos() - tests combining other specialness with
-				 external data feature.
-   Description: 
-	The main contents include:
-	- Open the file from test_mult_setexternal
-	- Create and write two unlimited-dimension data sets, SDS2 and SDS3
-	- Append data to the first unlimited-dimension data set, SDS2, to
-	  create linked-block element.
-	- Move data of the first unlimited-dim data set, SDS2, to the external
-	  file to test the combination of SPECIAL_LINKED and SPECIAL_EXT.
-	- Move data of SDS3 to the external file to test unlimited and
-	  SPECIAL_EXT without linked-block element.
-	- Make a compressed data set, SDS4, in the main file.
-	- Attempt to move data of SDS4 to the external file should fail, because
-	  SPECIAL_COMP and SPECIAL_EXT combo is not supported.
-	- Close everything.
-	- Re-open the file and verify data of each data set in the file.
+                external data feature.
+   Description:
+    The main contents include:
+    - Open the file from test_mult_setexternal
+    - Create and write two unlimited-dimension data sets, SDS2 and SDS3
+    - Append data to the first unlimited-dimension data set, SDS2, to
+    create linked-block element.
+    - Move data of the first unlimited-dim data set, SDS2, to the external
+    file to test the combination of SPECIAL_LINKED and SPECIAL_EXT.
+    - Move data of SDS3 to the external file to test unlimited and
+    SPECIAL_EXT without linked-block element.
+    - Make a compressed data set, SDS4, in the main file.
+    - Attempt to move data of SDS4 to the external file should fail, because
+    SPECIAL_COMP and SPECIAL_EXT combo is not supported.
+    - Close everything.
+    - Re-open the file and verify data of each data set in the file.
 
    Return value:
-	The number of errors occurred in this routine.
+    The number of errors occurred in this routine.
 
    BMR - Jan 16, 2009
 *********************************************************************/
@@ -555,7 +555,7 @@ int test_special_combos()
     intn  status = 0;
     int   ii, jj, kk;
     intn  num_errs = 0;    /* number of errors in compression test so far */
- 
+
     /* Create the file and initialize the SD interface */
     sd_id = SDstart (EXTTST, DFACC_CREATE);
     CHECK(status, FAIL, "SDstart");
@@ -662,7 +662,7 @@ int test_special_combos()
     /* Read data of each data sets and verify against the original */
     for (ii = 0; ii < num_sds; ii++)
     {
-	verify_data(sd_id, ii);
+    verify_data(sd_id, ii);
     }
 
     /* Close the file */
@@ -675,7 +675,7 @@ int test_special_combos()
 
 /* Test driver for testing external file functions */
  /* extern int test_external()
- */ 
+ */
 int test_external()
 {
     int ii, jj, kk;
@@ -712,8 +712,8 @@ int test_external()
 /********************************************************************
    Name: verify_data() - Verifies the written data, given the SDS' index.
    Description:
-	Calls SDselect, SDgetinfo, and SDreaddata to verify the sds_ind'th
-	data against the original buffer.
+    Calls SDselect, SDgetinfo, and SDreaddata to verify the sds_ind'th
+    data against the original buffer.
    Return value:
         None.
    BMR - Dec 1, 2015
@@ -732,7 +732,7 @@ void verify_data(int32 sd_id, int32 sds_ind)
 
     /* Select the data set. */
     sds_id = SDselect (sd_id, sds_ind);
-    CHECK(status, FAIL, "SDselect");
+    CHECK(sds_id, FAIL, "SDselect");
 
     /* Set the parameters start and edges to read */
     edges[1] = Y_LENGTH;
@@ -747,42 +747,42 @@ void verify_data(int32 sd_id, int32 sds_ind)
     from the rest of the data sets in the file */
     if (!HDstrncmp(name, SDS2, HDstrlen(SDS2)))
     {
-	/* Buffer for first written data + appended data */
-	int32 data_wappended[Z_LENGTH+1][Y_LENGTH][X_LENGTH];
+    /* Buffer for first written data + appended data */
+    int32 data_wappended[Z_LENGTH+1][Y_LENGTH][X_LENGTH];
 
-	/* Number of elements in first written data + appended data */
-	num_elems = Z_LENGTH*Y_LENGTH*X_LENGTH + 1*Y_LENGTH*X_LENGTH;
+    /* Number of elements in first written data + appended data */
+    num_elems = Z_LENGTH*Y_LENGTH*X_LENGTH + 1*Y_LENGTH*X_LENGTH;
 
-	/* Copy buffer of first written data to data_wappended */
-	HDmemcpy(data_wappended, written_data, (Z_LENGTH*Y_LENGTH*X_LENGTH)*sizeof(int));
+    /* Copy buffer of first written data to data_wappended */
+    HDmemcpy(data_wappended, written_data, (Z_LENGTH*Y_LENGTH*X_LENGTH)*sizeof(int));
 
-	/* Forward to the end of first written data */
-	ptr = &data_wappended[Z_LENGTH][0][0];
+    /* Forward to the end of first written data */
+    ptr = &data_wappended[Z_LENGTH][0][0];
 
-	/* Copy appended data to data_wappended */
-	HDmemcpy(ptr, ap_data, (1*Y_LENGTH*X_LENGTH)*sizeof(int));
+    /* Copy appended data to data_wappended */
+    HDmemcpy(ptr, ap_data, (1*Y_LENGTH*X_LENGTH)*sizeof(int));
 
-	/* Back to the beginning of data_wappended */
-	ptr = &data_wappended[0][0][0];
+    /* Back to the beginning of data_wappended */
+    ptr = &data_wappended[0][0][0];
 
-	/* Size of data written including appended data */
-	data_size = ((Z_LENGTH+1) * Y_LENGTH*X_LENGTH)*sizeof(int);
-	edges[0] = Z_LENGTH + 1;
+    /* Size of data written including appended data */
+    data_size = ((Z_LENGTH+1) * Y_LENGTH*X_LENGTH)*sizeof(int);
+    edges[0] = Z_LENGTH + 1;
 
     } /* with appended data */
 
     /* Everyone else */
     else
     {
-	/* Point to written data buffer */
+    /* Point to written data buffer */
         ptr = &written_data[0][0][0];
 
-	/* Number of elements */
-	num_elems = Z_LENGTH*Y_LENGTH*X_LENGTH;
+    /* Number of elements */
+    num_elems = Z_LENGTH*Y_LENGTH*X_LENGTH;
 
-	/* Size of data written */
-	data_size = num_elems * sizeof(int);
-	edges[0] = Z_LENGTH;
+    /* Size of data written */
+    data_size = num_elems * sizeof(int);
+    edges[0] = Z_LENGTH;
     }
 
     /* Allocate buffer for reading, after establishing the data size */
@@ -794,15 +794,15 @@ void verify_data(int32 sd_id, int32 sds_ind)
 
     /* Verify that data is correct comparing against the written data */
     {
-	int ii;
-	int32* out;
-	out = &outdata[0];
-
-	for (ii = 0; ii < num_elems; ii++, ptr++, out++)
-	if (*ptr != *out)
-	{
-	     fprintf(stderr, "Data read (%d) is different than written (%d) for SDS #%d, name = %s\n", *out, *ptr, sds_ind, name);
-	}
+    int ii;
+    int32* out;
+    out = &outdata[0];
+
+    for (ii = 0; ii < num_elems; ii++, ptr++, out++)
+    if (*ptr != *out)
+    {
+        fprintf(stderr, "Data read (%d) is different than written (%d) for SDS #%d, name = %s\n", *out, *ptr, sds_ind, name);
+    }
     }
 
     /* Terminate access to the data set, SD interface, and file. */
diff --git a/mfhdf/test/tfile.c b/mfhdf/test/tfile.c
index eb0425e..ed60478 100644
--- a/mfhdf/test/tfile.c
+++ b/mfhdf/test/tfile.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /* $Id: tfile.c 5218 2009-08-29 04:21:49Z bmribler $ */
diff --git a/mfhdf/test/tmixed_apis.c b/mfhdf/test/tmixed_apis.c
index 1c0bc4c..779423d 100644
--- a/mfhdf/test/tmixed_apis.c
+++ b/mfhdf/test/tmixed_apis.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /****************************************************************************
diff --git a/mfhdf/test/tncunlim.c b/mfhdf/test/tncunlim.c
index 4ce6854..9fb1a55 100644
--- a/mfhdf/test/tncunlim.c
+++ b/mfhdf/test/tncunlim.c
@@ -1,13 +1,14 @@
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  * Copyright by The HDF Group.                                               *
+ * Copyright by the Board of Trustees of the University of Illinois.         *
  * All rights reserved.                                                      *
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /****************************************************************************
diff --git a/mfhdf/test/tncvargetfill.c b/mfhdf/test/tncvargetfill.c
index 8f924a0..a130a69 100644
--- a/mfhdf/test/tncvargetfill.c
+++ b/mfhdf/test/tncvargetfill.c
@@ -1,13 +1,14 @@
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  * Copyright by The HDF Group.                                               *
+ * Copyright by the Board of Trustees of the University of Illinois.         *
  * All rights reserved.                                                      *
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /****************************************************************************
diff --git a/mfhdf/test/tnetcdf.c b/mfhdf/test/tnetcdf.c
index 0a5a795..d7cd1d6 100644
--- a/mfhdf/test/tnetcdf.c
+++ b/mfhdf/test/tnetcdf.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "mfhdf.h"
diff --git a/mfhdf/test/trank0.c b/mfhdf/test/trank0.c
index facf3e3..f77c70f 100644
--- a/mfhdf/test/trank0.c
+++ b/mfhdf/test/trank0.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /****************************************************************************
diff --git a/mfhdf/test/tsd.c b/mfhdf/test/tsd.c
index a51543b..12cdb4a 100644
--- a/mfhdf/test/tsd.c
+++ b/mfhdf/test/tsd.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /****************************************************************************
diff --git a/mfhdf/test/tsdsprops.c b/mfhdf/test/tsdsprops.c
index 19f1e2d..2fc682e 100644
--- a/mfhdf/test/tsdsprops.c
+++ b/mfhdf/test/tsdsprops.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /****************************************************************************
diff --git a/mfhdf/test/tszip.c b/mfhdf/test/tszip.c
index 8b7e3ff..a4ec0d9 100644
--- a/mfhdf/test/tszip.c
+++ b/mfhdf/test/tszip.c
@@ -5,10 +5,10 @@
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "mfhdf.h"
diff --git a/mfhdf/test/tunlim.c b/mfhdf/test/tunlim.c
index 1643dcc..4a55094 100644
--- a/mfhdf/test/tunlim.c
+++ b/mfhdf/test/tunlim.c
@@ -1,13 +1,14 @@
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  * Copyright by The HDF Group.                                               *
+ * Copyright by the Board of Trustees of the University of Illinois.         *
  * All rights reserved.                                                      *
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /****************************************************************************
diff --git a/mfhdf/test/tutils.c b/mfhdf/test/tutils.c
index 4e50474..b7378b1 100644
--- a/mfhdf/test/tutils.c
+++ b/mfhdf/test/tutils.c
@@ -1,13 +1,14 @@
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  * Copyright by The HDF Group.                                               *
+ * Copyright by the Board of Trustees of the University of Illinois.         *
  * All rights reserved.                                                      *
  *                                                                           *
  * This file is part of HDF.  The full HDF 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      *
- * http://hdfgroup.org/products/hdf4/doc/Copyright.html.  If you do not have *
- * access to either file, you may request a copy from help at hdfgroup.org.     *
+ * the COPYING file, which can be found at the root of the source code       *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/.  *
+ * If you do not have access to either file, you may request a copy from     *
+ * help at hdfgroup.org.                                                        *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include "mfhdf.h"
@@ -19,11 +20,11 @@
 /********************************************************************
    Name: make_datafilename() - Generates the correct name for the test file.
    Description:
-	Generate the correct name for the test file by prepending the source
-	path if it exists, otherwise, assume it is the local directory.
+    Generate the correct name for the test file by prepending the source
+    path if it exists, otherwise, assume it is the local directory.
    Return value:
         Returns SUCCEED if the file name is generated successfully, or
-	FAIL, otherwise.
+    FAIL, otherwise.
 *********************************************************************/
 intn make_datafilename(char* basename, char* testfile, unsigned int size)
 {
@@ -68,15 +69,15 @@ intn make_datafilename(char* basename, char* testfile, unsigned int size)
 /********************************************************************
    Name: make_SDS() - Creates and writes a 3-D unlimited SDS.
    Description:
-	Calls SDcreate, SDwritedata, and SDendaccess to create a 3-D
-	unlimited SDS, then close it.
-	(Note: should be modified for more different ranks.)
+    Calls SDcreate, SDwritedata, and SDendaccess to create a 3-D
+    unlimited SDS, then close it.
+    (Note: should be modified for more different ranks.)
    Return value:
         Returns the size of the data that had been written successfully.
    BMR - Dec 1, 2015
 *********************************************************************/
 int32 make_SDS(int32 sd_id, char* sds_name, int32 type, int32 rank,
-			  int32* dim_sizes, int32 unlim_dim, VOIDP written_data)
+            int32* dim_sizes, int32 unlim_dim, VOIDP written_data)
 {
     int32 sds_id;
     int32 *start, *edges;
@@ -94,29 +95,29 @@ int32 make_SDS(int32 sd_id, char* sds_name, int32 type, int32 rank,
     /* Set the parameters start and edges to write */
     for (ii = 0; ii < rank; ii++)
     {
-	start[ii] = 0;
-	edges[ii] = dim_sizes[ii];
+    start[ii] = 0;
+    edges[ii] = dim_sizes[ii];
     }
 
     /* Give real size to the unlimited dimension */
     if (dim_sizes[0] == SD_UNLIMITED)
-	edges[0] = unlim_dim;
+    edges[0] = unlim_dim;
 
     /* Write the data */
-    status = SDwritedata (sds_id, start, NULL, edges, written_data); 
+    status = SDwritedata (sds_id, start, NULL, edges, written_data);
     CHECK(status, FAIL, "SDwritedata");
 
     /* Calculate data set's size to verify later */
     for (ii = 0; ii < rank; ii++)
     {
-	if (ii == 0)
-	    count = edges[0];
-	else
-	    count = count * edges[ii];
+    if (ii == 0)
+        count = edges[0];
+    else
+        count = count * edges[ii];
     }
     sds_size = count * DFKNTsize(type);
 
-    /* Terminate access to the data set */ 
+    /* Terminate access to the data set */
     status = SDendaccess (sds_id);
     CHECK(status, FAIL, "SDendaccess");
 
@@ -130,15 +131,15 @@ int32 make_SDS(int32 sd_id, char* sds_name, int32 type, int32 rank,
 /********************************************************************
    Name: make_CompSDS() - Creates and writes 3D compressed SDS.
    Description:
-	Calls SDcreate, SDsetcompress, SDwritedata, and SDendaccess to
-	create an SDS with SKPHUFF compression, then close it.
-	(Note: should be modified for different ranks.)
+    Calls SDcreate, SDsetcompress, SDwritedata, and SDendaccess to
+    create an SDS with SKPHUFF compression, then close it.
+    (Note: should be modified for different ranks.)
    Return value:
         Returns the size of the data that had been written successfully.
    BMR - Dec 1, 2015
 *********************************************************************/
 int32 make_CompSDS(int32 sd_id, char* sds_name, int32 type, int32 rank,
-			  int32* dim_sizes, VOIDP written_data)
+            int32* dim_sizes, VOIDP written_data)
 {
     int32 sds_id;
     int32 *start, *edges;
@@ -155,7 +156,7 @@ int32 make_CompSDS(int32 sd_id, char* sds_name, int32 type, int32 rank,
      /* dim_sizes[0] = Z_LENGTH;
     dim_sizes[1] = Y_LENGTH;
     dim_sizes[2] = X_LENGTH;
- */ 
+ */
 
     /* Create the array with the name defined in SDS_NAME */
     sds_id = SDcreate (sd_id, sds_name, type, rank, dim_sizes);
@@ -170,12 +171,12 @@ int32 make_CompSDS(int32 sd_id, char* sds_name, int32 type, int32 rank,
     /* Set the parameters start and edges to write */
     for (ii = 0; ii < rank; ii++)
     {
-	start[ii] = 0;
-	edges[ii] = dim_sizes[ii];
+    start[ii] = 0;
+    edges[ii] = dim_sizes[ii];
     }
 
     /* Write the data */
-    status = SDwritedata (sds_id, start, NULL, edges, written_data); 
+    status = SDwritedata (sds_id, start, NULL, edges, written_data);
     CHECK(status, FAIL, "SDwritedata");
 
     /* Compute the uncompressed data size, just to have makeCompSDS similar
@@ -183,11 +184,11 @@ int32 make_CompSDS(int32 sd_id, char* sds_name, int32 type, int32 rank,
        size because we don't move compressed data to external file */
     for (ii = 0; ii < rank; ii++)
     {
-	count = count + dim_sizes[ii];
+    count = count + dim_sizes[ii];
     }
     sds_size = count * DFKNTsize(type);
 
-    /* Terminate access to the data set */ 
+    /* Terminate access to the data set */
     status = SDendaccess (sds_id);
     CHECK(status, FAIL, "SDendaccess");
 
@@ -200,9 +201,9 @@ int32 make_CompSDS(int32 sd_id, char* sds_name, int32 type, int32 rank,
 /********************************************************************
    Name: make_Ext3D_SDS() - Creates and writes a 3D SDS with external data.
    Description:
-	Calls SDcreate, SDsetexternalfile, SDwritedata, and SDendaccess
-	to create a 3-D SDS with external data storage, then close it.
-	(Note: should be modified for different ranks.)
+    Calls SDcreate, SDsetexternalfile, SDwritedata, and SDendaccess
+    to create a 3-D SDS with external data storage, then close it.
+    (Note: should be modified for different ranks.)
    Return value:
         Returns the size of the data that had been written successfully.
    Return value:
@@ -210,8 +211,8 @@ int32 make_CompSDS(int32 sd_id, char* sds_name, int32 type, int32 rank,
    BMR - Dec 1, 2015
 *********************************************************************/
 int32 make_Ext3D_SDS(int32 sd_id, char* sds_name, int32 type, int32 rank,
-		     int32* dim_sizes, VOIDP written_data,
-		     int32 offset, char* ext_file_name)
+            int32* dim_sizes, VOIDP written_data,
+            int32 offset, char* ext_file_name)
 {
     int32 sds_id;
     int32 *start, *edges;
@@ -225,37 +226,37 @@ int32 make_Ext3D_SDS(int32 sd_id, char* sds_name, int32 type, int32 rank,
     /* Set the parameters start and edges to write */
     for (ii = 0; ii < rank; ii++)
     {
-	start[ii] = 0;
-	edges[ii] = dim_sizes[ii];
+    start[ii] = 0;
+    edges[ii] = dim_sizes[ii];
     }
 
     /* Define dimensions of the array to be created. */
      /* dim_sizes[0] = Z_LENGTH;
     dim_sizes[1] = Y_LENGTH;
     dim_sizes[2] = X_LENGTH;
- */ 
+ */
 
     /* Create the array with the name defined in SDS_NAME. */
     sds_id = SDcreate (sd_id, sds_name, type, rank, dim_sizes);
-    CHECK(status, FAIL, "SDcreate");
+    CHECK(sds_id, FAIL, "SDcreate");
 
     status = SDsetexternalfile (sds_id, ext_file_name, offset);
     CHECK(status, FAIL, "SDsetexternalfile");
 
     /* Write the data */
-    status = SDwritedata (sds_id, start, NULL, edges, written_data); 
+    status = SDwritedata (sds_id, start, NULL, edges, written_data);
     CHECK(status, FAIL, "SDwritedata");
 
     /* Calculate data set's size to verify later */
     count = 1;
     for (ii = 0; ii < rank; ii++)
     {
-	count = count * dim_sizes[ii];
+    count = count * dim_sizes[ii];
     }
     sds_size = count * DFKNTsize(type);
 
 
-    /* Terminate access to the data set */ 
+    /* Terminate access to the data set */
     status = SDendaccess (sds_id);
     CHECK(status, FAIL, "SDendaccess");
 
@@ -268,7 +269,7 @@ int32 make_Ext3D_SDS(int32 sd_id, char* sds_name, int32 type, int32 rank,
 /********************************************************************
    Name: get_SDSbyName() - Find and open an SDS by name.
    Description:
-	Calls SDnametoindex and SDselect to open a data set by its name.
+    Calls SDnametoindex and SDselect to open a data set by its name.
    Return value:
         Returns the SDS' identifier.
    BMR - Dec 1, 2015
@@ -294,9 +295,9 @@ int32 get_SDSbyName(int32 sd_id, char* sds_name)
 /********************************************************************
    Name: append_Data2SDS() - Selects a data set by name then write data to it.
    Description:
-	Uses the helper function get_SDSbyName to find and open the
-	data set, then calls SDwritedata to append data, and SDendaccess
-	to close it.
+    Uses the helper function get_SDSbyName to find and open the
+    data set, then calls SDwritedata to append data, and SDendaccess
+    to close it.
    Return value:
         Returns the size of the data that had been written successfully.
    BMR - Dec 1, 2015
@@ -323,7 +324,7 @@ char name[80];
     CHECK(status, FAIL, "SDgetdatasize");
 
     /* Append data to it */
-    status = SDwritedata (sds_id, start, NULL, edges, (VOIDP)ap_data); 
+    status = SDwritedata (sds_id, start, NULL, edges, (VOIDP)ap_data);
     CHECK(status, FAIL, "SDwritedata");
 
     /* Calculate data set's size to verify later */
@@ -341,8 +342,8 @@ char name[80];
 /********************************************************************
    Name: verify_datasize() - Checks data size
    Description:
-	Calls SDgetdatasize then verifies the data size against the
-	given data_size and reports if they are different.
+    Calls SDgetdatasize then verifies the data size against the
+    given data_size and reports if they are different.
    Return value:
         None.
    BMR - Dec 1, 2015
diff --git a/mfhdf/xdr/CMakeLists.txt b/mfhdf/xdr/CMakeLists.txt
index b6ccf9e..f332a81 100644
--- a/mfhdf/xdr/CMakeLists.txt
+++ b/mfhdf/xdr/CMakeLists.txt
@@ -19,7 +19,7 @@ INCLUDE_DIRECTORIES (${HDF4_MFHDF_XDR_DIR})
 add_library (${HDF4_MF_XDR_LIB_TARGET} STATIC ${HDF4_MFHDF_XDR_SRCS} ${HDF4_MFHDF_XDR_HDRS})
 if (MSVC OR MINGW)
   target_link_libraries (${HDF4_MF_XDR_LIB_TARGET} "ws2_32.lib")
-endif (MSVC OR MINGW)
+endif ()
 TARGET_C_PROPERTIES (${HDF4_MF_XDR_LIB_TARGET} STATIC " " " ")
 set_global_variable (HDF4_LIBRARIES_TO_EXPORT "${HDF4_LIBRARIES_TO_EXPORT};${HDF4_MF_XDR_LIB_TARGET}")
 H4_SET_LIB_OPTIONS (${HDF4_MF_XDR_LIB_TARGET} ${HDF4_MF_XDR_LIB_NAME} STATIC)
@@ -30,14 +30,14 @@ set_target_properties (${HDF4_MF_XDR_LIB_TARGET} PROPERTIES
 )
 if (WIN32)
   set_property (TARGET ${HDF4_MF_XDR_LIB_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "DOS_FS;NO_SYS_XDR_INC")
-endif (WIN32)
+endif ()
 set (install_targets ${HDF4_MF_XDR_LIB_TARGET})
 
 if (BUILD_SHARED_LIBS)
   add_library (${HDF4_MF_XDR_LIBSH_TARGET} SHARED ${HDF4_MFHDF_XDR_SRCS} ${HDF4_MFHDF_XDR_HDRS})
   if (MSVC OR MINGW)
     target_link_libraries (${HDF4_MF_XDR_LIBSH_TARGET} "ws2_32.lib")
-  endif (MSVC OR MINGW)
+  endif ()
   TARGET_C_PROPERTIES (${HDF4_MF_XDR_LIBSH_TARGET} SHARED " " " ")
   set_global_variable (HDF4_LIBRARIES_TO_EXPORT "${HDF4_LIBRARIES_TO_EXPORT};${HDF4_MF_XDR_LIBSH_TARGET}")
   H4_SET_LIB_OPTIONS (${HDF4_MF_XDR_LIBSH_TARGET} ${HDF4_MF_XDR_LIB_NAME} SHARED)
@@ -49,18 +49,19 @@ if (BUILD_SHARED_LIBS)
   )
   if (WIN32)
     set_property (TARGET ${HDF4_MF_XDR_LIBSH_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS "DOS_FS;NO_SYS_XDR_INC")
-  endif (WIN32)
+  endif ()
   set (install_targets ${install_targets} ${HDF4_MF_XDR_LIBSH_TARGET})
-endif (BUILD_SHARED_LIBS)
+endif ()
 
 #-----------------------------------------------------------------------------
 # Add library to CMake Install : Installs lib and cmake config info
 #-----------------------------------------------------------------------------
 if (BUILD_SHARED_LIBS)
   INSTALL_TARGET_PDB (${HDF4_MF_XDR_LIBSH_TARGET} ${HDF4_INSTALL_BIN_DIR} libraries)
-endif (BUILD_SHARED_LIBS)
+endif ()
+INSTALL_TARGET_PDB (${HDF4_MF_XDR_LIB_TARGET} ${HDF4_INSTALL_BIN_DIR} libraries)
 
-INSTALL (
+install (
     TARGETS
         ${install_targets}
     EXPORT
@@ -69,4 +70,5 @@ INSTALL (
     ARCHIVE DESTINATION ${HDF4_INSTALL_LIB_DIR} COMPONENT libraries
     RUNTIME DESTINATION ${HDF4_INSTALL_BIN_DIR} COMPONENT libraries
     FRAMEWORK DESTINATION ${HDF4_INSTALL_FWRK_DIR} COMPONENT libraries
+    INCLUDES DESTINATION include
 )
diff --git a/mfhdf/xdr/Makefile.in b/mfhdf/xdr/Makefile.in
index eaa8e8f..0ad4158 100644
--- a/mfhdf/xdr/Makefile.in
+++ b/mfhdf/xdr/Makefile.in
@@ -450,6 +450,7 @@ JAVAFLAGS = @JAVAFLAGS@
 JAVAPREFIX = @JAVAPREFIX@
 JAVA_JUNIT = @JAVA_JUNIT@
 JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
 JNIFLAGS = @JNIFLAGS@
 JUNIT = @JUNIT@
 LD = @LD@
diff --git a/mfhdf/xdr/README b/mfhdf/xdr/README
index 664f24f..94ed760 100644
--- a/mfhdf/xdr/README
+++ b/mfhdf/xdr/README
@@ -1,4 +1,4 @@
-$Id: README 468 1993-04-21 21:54:36Z chouck $
+$Id$
 
 Mon Apr 17 18:40:07 MDT 1989
 
diff --git a/release_notes/HISTORY.txt b/release_notes/HISTORY.txt
index 293ef59..4b9c9bf 100644
--- a/release_notes/HISTORY.txt
+++ b/release_notes/HISTORY.txt
@@ -16,6 +16,7 @@
 
 List of the HDF4 releases
 
+4.2.12         June	 2016  /* delayed dues to 1.10 and 1.8.17 releases */
 4.2.11         February	 2015
 4.2.10         February	 2014
 4.2.9          February	 2013
@@ -44,6 +45,293 @@ List of the HDF4 releases
 
 ==========================================================================    
 
+%%%4.2.12%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+HDF version 4.2.12 released on 2016-06-29
+====================================================
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.2.11 and HDF 4.2.12.
+It is written for people who are familiar with previous releases of HDF
+and wish to migrate to HDF 4.2.12.
+
+The HDF 4.2.11 documentation can be found on the The HDF Group's website
+at:
+    https://www.hdfgroup.org/release4/doc/
+
+First-time HDF users are encouraged to read the HDF FAQ, which can be
+reached from the HDF product home page:
+
+    https://hdfgroup.org/products/hdf4/
+
+If you have any questions or comments, please see the HDF Support page:
+
+    https://hdfgroup.org/services/support.html
+
+CONTENTS
+
+- New features and changes
+  -- Configuration
+- Support for new platforms and compilers
+- Bugs fixed since HDF 4.2.11
+  -- Configuration
+  -- Library
+  -- Utilities
+- Documentation
+- Platforms tested
+- Known problems
+
+
+New features and changes
+========================
+   Configuration
+   =============
+    - None
+
+   Library
+   =========
+    - Behavior of HDstrdup changed
+      HDstrdup now checks the input string for NULL.  (BMR, 2016/05/12)
+
+    - Behavior of SDsetexternalfile changed
+      Previously, when SDsetexternalfile was called more than once on a data
+      set, the library would repeatedly store the external file information in
+      the main file, at different offsets.  SDsetexternalfile is now fixed to
+      cause no effect when the data set is already external.  (BMR, 2016/05/30)
+
+    - Added new utility function HDisnetcdf64 for use in tools
+      HDisnetcdf64 returns TRUE(1) or FALSE(0) if a file is a netCDF 64-bit
+      file or not.
+	intn HDisnetcdf64(const char *filename)
+      (BMR, 2016/06/14)
+
+
+   Utilities
+   =========
+    - hdp: detection of netCDF 64-bit file
+      The utility hdp simply failed when the input file was a netCDF 64-bit
+      file.  It now reports that it cannot read a netCDF 64-bit file then
+      exits or continue to the next input file.
+      (BMR, 2016/06/14)
+
+
+Support for new platforms and compilers
+=======================================
+    - Support for Mac OS X Yosemeti 10.10 added (AKC - 2015/03/04, HDFFR-1500)
+
+    - Support for Mac OS X El Capitan 10.11 added (AKC - 2015/11/18, HDFFR-1425)
+      (BMR, added for AKC, 2016/06/24)
+
+    Java Wrapper Library
+    --------------------
+
+    The Java HDF JNI library has been integrated into the HDF repository.
+    The configure option is "--enable-java", and the CMake option is
+    HDF4_BUILD_JAVA:BOOL=ON. The package hierarchy has changed from the
+    HDF 4 JNI, which was "ncsa.hdf.hdflib", to HDF 4.2.12,
+    "hdf.hdflib".
+
+
+Bugs fixed since HDF 4.2.11
+=========================
+   Configuration
+   =============
+    - Examples from mfhdf and hdf will now be installed according to $DESTDIR when
+      it is supplied.  (LRK, 2016/06/29, HDFFR-1491)
+
+   Library
+   =========
+    - SDsetexternalfile on special elements
+      When the data element is already special, incorrect data length was used
+      for the element in subsequent calls to SDsetexternalfile, causing
+      failures sometimes.  This is now fixed.  (BMR, 2016/01/04, HDFFR-1516)
+
+
+   Utilities
+   =========
+    - None
+
+
+Documentation
+=============
+    - In addition to minor improvements in the contents, user documentation
+      have a new format to improve usability.
+      (BMR, 2016/06/24)
+
+
+Platforms tested
+================
+This version has been tested in the following platforms:
+
+(Format:
+   uname -s, uname -r
+   uname -v, uname -p, uname -m)
+
+
+
+   Linux 2.6.32-573.22.1.el6.x86_64  gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
+   #1 SMP, x86_64                    GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
+   (mayll/platypus)                  icc (ICC) 15.0.3.187 Build 20150407
+                                     ifort (IFORT) 15.0.3.187 Build 20150407
+                                     pgcc and pgf90 15.7-0 64-bit target on x86-64 Linux -tp nehalem
+
+   Linux, 3.10.0-327.10.1.el7.x86_64 gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
+   #1 SMP x86_64, GNU/Linux          GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
+   (kituo/moohan)                    icc (ICC) 15.0.3.187 Build 20150407
+                                     ifort (IFORT) 15.0.3.187 Build 20150407
+
+   Linux, 2.6.32-573.18.1.el6.ppc64  (1) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
+   #1 SMP, ppc64 (ostrich)           (2) IBM XL Fortran for Linux, V15.1 (64-bit mode)
+
+   SunOS 5.11 (32- and 64-bit)       Sun C 5.12 SunOS_sparc 2011/11/16
+   11.1, sparc, sun4v (emu)          Sun Fortran 95 8.6 SunOS_sparc 2011/11/16
+
+   Windows 7                      Visual Studio 2012 w/ Intel Fortran 15 (cmake)
+                                  Visual Studio 2013 w/ Intel Fortran 15 (cmake)
+                                  Visual Studio 2015 w/ Intel Fortran 16 (cmake)
+                                  Cygwin(CYGWIN_NT-6.1 2.2.1(0.289/5/3) 
+                                  gcc(4.9.3) compiler and gfortran)
+                                  (cmake and autotools)
+
+   Windows 7 x64                  Visual Studio 2012 w/ Intel Fortran 15 (cmake)
+                                  Visual Studio 2013 w/ Intel Fortran 15 (cmake)
+                                  Visual Studio 2015 w/ Intel Fortran 16 (cmake)
+
+   Windows 8.1                    Visual Studio 2012 w/ Intel Fortran 15 (cmake)
+                                  Visual Studio 2013 w/ Intel Fortran 15 (cmake)
+
+   Windows 8.1 x64                Visual Studio 2012 w/ Intel Fortran 15 (cmake)
+                                  Visual Studio 2013 w/ Intel Fortran 15 (cmake)
+
+   Mac OS X 10.8.5, Darwin, 12.6.0   Apple clang version 5.1 from Xcode 5.1
+   12.6.0, x86_64                    gfortran GNU Fortran (GCC) 4.8.2
+   (swallow,kite)                    Intel icc and ifort Version 15.0.3 
+
+   Mac OS X 10.9.5, Darwin, 13.4.0   Apple clang version 6.0 from Xcode 6.2
+   13.4.0, x86_64                    gfortran GNU Fortran (GCC) 4.9.2
+   (wren,quail)                      Intel icc and ifort Version 15.0.3 
+
+   Mac OS X 10.10.5, Darwin, 14.5.0  Apple clang version 6.0 from Xcode 7.0
+   14.5.0, x86_64 666666             gfortran GNU Fortran (GCC) 4.9.2
+   (osx1010dev)                      Intel icc and ifort version 15.0.3
+
+   Mac OS X 10.11.5, Darwin, 15.4.0  Apple clang version 7.3 from Xcode 7.3
+   15.5.0, x86_64 666666             gfortran GNU Fortran (GCC) 5.2.0
+   (osx1010dev)                      Intel icc and ifort version 15.0.3
+
+   Debian7.5.0 3.2.0-4-amd64
+   #1 SMP Debian 3.2.51-1, x86_64 GNU/Linux
+                                     gcc (Debian 4.7.2-5) 4.7.2
+                                     GNU Fortran (Debian 4.7.2-5) 4.7.2
+                                     (cmake and autotools)
+
+   Fedora20 3.15.3-200.fc20.x86_64
+   #1 SMP x86_64  GNU/Linux          gcc (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1)
+                                     GNU Fortran (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1)
+                                     (cmake and autotools)
+
+   SUSE 13.1 3.11.10-17-desktop
+   #1 SMP PREEMPT x86_64 GNU/Linux   gcc (SUSE Linux) 4.8.1
+                                     GNU Fortran (SUSE Linux) 4.8.1
+                                     (cmake and autotools)
+
+   Ubuntu 14.04 3.13.0-35-generic
+   #62-Ubuntu SMP x86_64 GNU/Linux   gcc (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1
+                                     GNU Fortran (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1
+                                     (cmake and autotools)
+
+
+Known problems
+==============
+o  Several Fortran examples print "^@" when displaying strings (for example,
+   names of the attributes). This happens because Fortran application
+   doesn't know the length of the strings passed from the C library.
+   EIP - 2015-01-11, HDFFR-1477
+
+o  CMake builds in Windows uses the same pre-generated ncgen*.[ch] files from
+   the yacc/lex input files. The generated file, ncgenyy.c, uses the <unistd.h>
+   header file that Windows does not support.  This must be blocked out in
+   order for Windows to use it.
+   AKC 2014-02-03, HDFFR-1424
+
+o  CMake "make install" fails installing the tools:
+    Use CPack to create an install package.
+   ADB - 2014/02/03
+
+o  CMake does not install these man pages:
+    hdf.1, ncdump.1, ncgen.1
+   AKC/BMR - 2014/02/02
+
+o  For Mac OS X 10.7 Lion, 10.8 Mountain Lion, 10.9 Mavericks, 10.10 Yosemite,
+   and 10.11 El Capitan, when compiling with -O2, some xdr functions might cause
+   memory corruption.  This happened for GCC, Intel and Clang compilers.
+   Currently, -O0 level optimization is used to avoid this problem.
+   (HDFFR-1318,1327,1358,1425) EIP - 2013/02/05, BMR - 2016/06/24
+
+o  On IBM PowerPC 64, hdftest fails when gcc 4.4.6 is used with -O3 optimization
+   level.
+
+o  When building in AIX systems, if CC is xlc with -qlanglvl=ansi, configure
+   will fail when checking for the jpeglib.h header due to the duplicated
+   macro definition of HAVE_STDLIB_H.  This is because some newer builds
+   of the jpeg library have HAVE_STDLIB_H defined in the jconfig.h header file.
+   Without the -qlanglvl=ansi, some older xlc versions (e.g., V7.0) still
+   fail, but newer xlc versions (e.g., V9.0) pass.  AKC - 2010/02/17
+
+o  When building on Linux/UNIX platforms, the szip shared library files must
+   be in the system library path.  This can be done by adding a link to
+   the libsz.* files in the /usr/lib folder or by adding the library
+   location to the LD_LIBRARY_PATH environment variable.
+      Ex. export LD_LIBRARY_PATH=path_to_szip_lib:$LD_LIBRARY_PATH
+   Optionally, one can use the static szip library files by adding '-static'
+   to the CFLAGS environment variable.
+
+o  Existing data written by an HDF4 Library prior to HDF 4.2r2:
+   When a one-dimensional SDS and a dimension scale have
+   the same name, subsequent accesses to the dimension scale or to the
+   SDS might produce undesired results because the libraries could not
+   distinguish between the two objects.  In the case of writing, data
+   might even be corrupted.  For example, SDS data might be written to a
+   dimension variable or vice versa. (bugzilla #624)
+
+   HDF4 Library Releases 4.2r2 and later make a distinction between an SDS
+   and a dimension variable.  However, as with older versions, these recent
+   versions are unable to detect such conflicts in files created by earlier
+   releases.  It is therefore STRONGLY recommended to check for such name
+   duplication before working with data created with a pre-4.2r2 library.
+
+   The functions SDgetnumvars_byname and SDnametoindices are provided
+   to help detect such name conflicts and select the correct object to
+   access, respectively; see the HDF Reference Manual entries for
+   further details.
+   FB - 2009/01/26
+   BMR - revised 2011/06/24
+
+o  N-bit compression is not supported with Fortran APIs.
+
+o  Using both fill-value and compression on SD datasets does not work.
+
+o  When using PGI compilers, make sure that the JPEG library is also compiled
+   with a PGI C compiler; linking with a JPEG library built with gcc causes
+   JPEG library tests to fail.  To bypass the problem:
+
+       x Set LIBS flag to $PGI_JPEG_INSTALL_DIR/lib/libjpeg.a
+         where $PGI_JPEG_INSTALL_DIR points to the installation directory
+         for the PGI-compiled JPEG library:
+
+         setenv LIBS $PGI_JPEG_INSTALL_DIR/lib/libjpeg.a
+
+       x Use the --with-jpeg=$PGI_JPEG_INSTALL_DIR configure flag to
+         configure with the PGI-compiled JPEG library:
+
+         ./configure --with-jpeg=$PGI_JPEG_INSTALL_DIR --with-zlib....
+
+o  In order for the API SDgetdatasize to get the correct compressed size
+   of the data, the dataset needs to be closed (SDendaccess) or read
+   (SDreaddata) after being written and before SDgetdatasize is called.
+   BMR - 2008/11/22
+
+
 %%%4.2.11%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 HDF version 4.2.11 released on 2015-02-09
 ==============================================
@@ -3691,7 +3979,7 @@ o HDF4 has an optional SZIP compression; please refer to the INSTALL-4.2r0-Beta
   for information regarding commercial use. 
 
   For more information about SZIP compression
-  see http://hdf.ncsa.uiuc.edu/HDF5/doc_resource/SZIP/ and the "HDF4 Reference Manual"
+  see http://hdf.ncsa.uiuc.edu/HDF4/doc_resource/SZIP/ and the "HDF4 Reference Manual"
   entries for the GRsetcompress and SDsetcompress functions. 
 
 o The following new tools have been added
diff --git a/release_notes/INSTALL b/release_notes/INSTALL
index b5045db..00a0d50 100644
--- a/release_notes/INSTALL
+++ b/release_notes/INSTALL
@@ -17,7 +17,7 @@ CONTENTS
 
 C and Fortran compilers. If a Fortran compiler is not available, use 
 the --disable-fortran configure flag to build the HDF4 C library and 
-utilties. For the list of the supported compilers see RELEASE.txt in the 
+utilities. For the list of the supported compilers see RELEASE.txt in the 
 release_notes directory.
 
 JPEG Distribution Release 6b or Later (libjpeg.a(so)). The source code can 
@@ -56,11 +56,9 @@ JPEG, and Szip libraries used to build the binaries.
 HDF4 prebuilt utilties come with Szip compression. To use these binaries, 
 you must install the Szip Library on your system. 
 
-Precompiled Szip binaries can be downloaded from:
+To build the Szip library, follow the instructions in the Szip source code
+distribution, which can be obtain from:
 
-    ftp://ftp.hdfgroup.org/lib-external/szip/2.0/bin/
-
-Source code for the Szip library can be found on the same server:
     ftp://ftp.hdfgroup.org/lib-external/szip/2.1/src
 
 To build the Szip library, follow the instructions in the Szip source code 
@@ -71,7 +69,7 @@ distribution.
 4. Unix and Mac OSX Configuration and Build
    =======================================
 
-See RELEASE.txt in the release_docs/ subdirectory for the list of platforms 
+See RELEASE.txt in the release_docs/ directory for the list of platforms 
 tested for this release.
 
 Before You Start:
@@ -164,7 +162,7 @@ To Install:
 6. Windows Configuration and Build
    =======================================
 
-See RELEASE.txt in the release_docs/ subdirectory for the list of platforms 
+See RELEASE.txt in the release_docs/ directory for the list of platforms 
 tested for this release.
 
 We now recommend that users build, test, and install HDF4 using CMake.
diff --git a/release_notes/INSTALL_CMake.txt b/release_notes/INSTALL_CMake.txt
index 9b12853..a9a88fe 100644
--- a/release_notes/INSTALL_CMake.txt
+++ b/release_notes/INSTALL_CMake.txt
@@ -1,5 +1,5 @@
 *************************************************************************
-* Build and Install HDF5 C, C++, Fortran Libraries and tools with CMake *
+* Build and Install HDF4 C, C++, Fortran Libraries and tools with CMake *
 *************************************************************************
 
                      Table of Contents
@@ -88,12 +88,12 @@ To build HDF4 with the SZIP, ZLIB and JPEG external libraries you will need to:
       The -S option uses the script version of ctest.
 
       The value for the -C option (as shown above, "-C Release") must
-      match the setting for CTEST_BUILD_CONFIGURATION in the platform
+      match the setting for CTEST_CONFIGURATION_TYPE in the platform
       configuration file.
 
       The -VV option is for verbose; use -V for less verbose.
 
-      The "-O hdf4.log" option saves the output to a log file hdf5.log.
+      The "-O hdf4.log" option saves the output to a log file hdf4.log.
 
    6. To install, "X" is the current release version
 
@@ -116,7 +116,7 @@ To build HDF4 with the SZIP, ZLIB and JPEG external libraries you will need to:
       After accepting the license, the script will prompt:
         By default the HDF4 will be installed in:
         "<current directory>/HDF-4.2."X"-Linux"
-        Do you want to include the subdirectory HDF5-1.8."X"-Linux?
+        Do you want to include the subdirectory HDF-4.2."X"-Linux?
         Saying no will install in: "<current directory>" [Yn]:
       Note that the script will create the following directory structure
       relative to the install point:
@@ -248,7 +248,6 @@ IV. Further considerations
 
       B. Use source packages from an SVN server by adding the following CMake
          options:
-
             HDF4_ALLOW_EXTERNAL_SUPPORT:STRING="SVN"
             JPEG_SVN_URL:STRING="https://some_location/jpeg/trunk"
             ZLIB_SVN_URL:STRING="https://some_location/zlib/trunk"
@@ -267,6 +266,15 @@ IV. Further considerations
          file and ext is the type of compression file. Also set CMAKE_BUILD_TYPE
          to the configuration type during configuration
 
+      D. Use source packages from a compressed file by adding the following
+         CMake options:
+            HDF4_ALLOW_EXTERNAL_SUPPORT:STRING="GIT"
+            JPEG_GIT_URL:STRING="https://some_location/jpeg/master"
+            ZLIB_GIT_URL:STRING="https://some_location/zlib/master"
+            SZIP_GIT_URL:STRING="https://some_location/szip/master"
+         where "some_location" is the URL to the GIT repository. Also set
+         CMAKE_BUILD_TYPE to the configuration type.
+
    3. If you are building on Apple Darwin platforms, you should add the
       following options:
           Compiler choice - use xcode by setting the ENV variables of CC and CXX
@@ -278,7 +286,7 @@ IV. Further considerations
             CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
 
    4. Windows developers should install NSIS to create an install image with CPack.
-      Visual Studio Express users will not be able to package HDF5 into
+      Visual Studio Express users will not be able to package HDF4 into
       an install image executable.
 
    5. Developers can copy the config/cmake/cacheinit.cmake file and alter the
@@ -404,11 +412,8 @@ These five steps are described in detail below.
             set (HDF4_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE)
             set (HDF4_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE)
             set (HDF4_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
-            set (HDF4_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)" FORCE)
-            set_property (CACHE HDF4_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ)
-            set (ZLIB_SVN_URL "https://svn.hdfgroup.org/zlib/trunk" CACHE STRING "Use ZLib from HDF repository" FORCE)
-            set (SZIP_SVN_URL "https://svn.hdfgroup.org/szip/trunk" CACHE STRING "Use SZip from HDF repository" FORCE)
-            set (JPEG_SVN_URL "https://svn.hdfgroup.org/jpeg/branches/jpeg8b" CACHE STRING "Use JPEG from HDF repository" FORCE)
+            set (HDF4_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT SVN TGZ)" FORCE)
+            set_property (CACHE HDF4_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT SVN TGZ)
             set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
             set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
             set (JPEG_TGZ_NAME "JPEG8b.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE)
@@ -493,6 +498,19 @@ These five steps are described in detail below.
             file such as .bz2, .tar, .tar.gz, .tgz, or .zip. Also define
             CMAKE_BUILD_TYPE to be the configuration type.
 
+      3.2.3  The external libraries (zlib, Szip, and jpeg) can be configured
+           to allow building the libraries by downloading from an GIT repository.
+           The option is 'HDF4_ALLOW_EXTERNAL_SUPPORT'; by adding the following
+           configuration option:
+               -DHDF4_ALLOW_EXTERNAL_SUPPORT:STRING="GIT"
+
+           The options to control the GIT URL are:
+               JPEG_GIT_URL:STRING="https://git.hdfgroup.org/jpeg8b/master"
+               ZLIB_GIT_URL:STRING="https://git.hdfgroup.org/zlib/master"
+               SZIP_GIT_URL:STRING="https://git.hdfgroup.org/szip/master"
+           These should be changed to your location. Also define CMAKE_BUILD_TYPE
+           to be the configuration type.
+
    4. Test HDF4
 
       To test the build, navigate to your build directory and execute:
@@ -613,7 +631,7 @@ platform configuration script.
 # CTestScript.cmake file. Usage:
 # "ctest -S HDF4LinuxCmake.cmake -C Release -O hdf4shared.log"
 ############################################################################
-cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR)
 
 # this is the location of the source hardcoded to hdf-4.2.11
 set(CTEST_SOURCE_NAME hdf-4.2.11)
@@ -636,7 +654,7 @@ set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
 
 ###################################################################
 ### Following Line is one of [Release, RelWithDebInfo, Debug] #####
-set(CTEST_BUILD_CONFIGURATION "Release")
+set(CTEST_CONFIGURATION_TYPE "Release")
 ###################################################################
 
 ###################################################################
@@ -673,7 +691,7 @@ set(SITE_BUILDNAME_SUFFIX "SHARED")
 #########   Following controls source repository         ##########
 #set(REPOSITORY_URL "https://svn.hdfgroup.org/hdf4/trunk")
 #comment to use a uncompressed source folder
-set(CTEST_USE_TAR_SOURCE "hdf-4.2.11")
+set(CTEST_USE_TAR_SOURCE "hdf-4.2.13")
 ###################################################################
 
 ###################################################################
@@ -690,6 +708,8 @@ set(CTEST_USE_TAR_SOURCE "hdf-4.2.11")
 set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF4_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=${CTEST_SCRIPT_DIRECTORY}")
 ### ext libs from svn
 #set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF4_ALLOW_EXTERNAL_SUPPORT:STRING=SVN")
+### ext libs from git
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF4_ALLOW_EXTERNAL_SUPPORT:STRING=GIT")
 ### ext libs on system
 #set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DJPEG_LIBRARY:FILEPATH=some_location/lib/jpeg.lib -DJPEG_INCLUDE_DIR:PATH=some_location/include")
 #set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include")
diff --git a/release_notes/INSTALL_CYGWIN.txt b/release_notes/INSTALL_CYGWIN.txt
index eec2cb8..bde1399 100644
--- a/release_notes/INSTALL_CYGWIN.txt
+++ b/release_notes/INSTALL_CYGWIN.txt
@@ -101,14 +101,14 @@ Build, Test and Install HDF4 on Cygwin
 
 Notes: Use the configure command in the top level HDF4 directory.
 
-1. HDF4 Source code and precompiled binaries
+1. HDF4 Source code
      
-   HDF provides "tar source ball" and precompiled binaries from 
-   the HDF ftp server (ftp.hdfgroup.org) in the directories:
+   HDF provides "tar source ball" from the HDF ftp server in the directory:
 
          ftp://ftp.hdfgroup.org/HDF/HDF_Current/src
-         ftp://ftp.hdfgroup.org/HDF/HDF_Current/bin 
-  
+
+   Please note that HDF no longer provides precompiled binaries for Cygwin.
+
 2. Unpacking the distribution
 
    gzip -cd <HDF-X.Y.Z.tar.gz>| tar xvf -
diff --git a/release_notes/RELEASE.txt b/release_notes/RELEASE.txt
index 77bfa02..1d7d601 100644
--- a/release_notes/RELEASE.txt
+++ b/release_notes/RELEASE.txt
@@ -1,31 +1,27 @@
-HDF version 4.2.12 released on 2016-06-29
+HDF version 4.2.13 released on 2017-06-24
 ====================================================
 
 INTRODUCTION
 
-This document describes the differences between HDF 4.2.11 and HDF 4.2.12.
+This document describes the differences between HDF 4.2.12 and HDF 4.2.13.
 It is written for people who are familiar with previous releases of HDF
-and wish to migrate to HDF 4.2.12.
+and wish to migrate to HDF 4.2.13.
 
-The HDF 4.2.11 documentation can be found on the The HDF Group's website
+The HDF 4.2.13 documentation can be found on the The HDF Group's website
 at:
     https://www.hdfgroup.org/release4/doc/
 
 First-time HDF users are encouraged to read the HDF FAQ, which can be
 reached from the HDF product home page:
 
-    https://hdfgroup.org/products/hdf4/
-
-If you have any questions or comments, please see the HDF Support page:
-
-    https://hdfgroup.org/services/support.html
+    https://support.hdfgroup.org/products/hdf4/
 
 CONTENTS
 
 - New features and changes
   -- Configuration
 - Support for new platforms and compilers
-- Bugs fixed since HDF 4.2.11
+- Bugs fixed since HDF 4.2.12
   -- Configuration
   -- Library
   -- Utilities
@@ -38,77 +34,33 @@ New features and changes
 ========================
    Configuration
    =============
-    - None
-
-   Library
-   =========
-    - Behavior of HDstrdup changed
-      HDstrdup now checks the input string for NULL.  (BMR, 2016/05/12)
-
-    - Behavior of SDsetexternalfile changed
-      Previously, when SDsetexternalfile was called more than once on a data
-      set, the library would repeatedly store the external file information in
-      the main file, at different offsets.  SDsetexternalfile is now fixed to
-      cause no effect when the data set is already external.  (BMR, 2016/05/30)
-
-    - Added new utility function HDisnetcdf64 for use in tools
-      HDisnetcdf64 returns TRUE(1) or FALSE(0) if a file is a netCDF 64-bit
-      file or not.
-	intn HDisnetcdf64(const char *filename)
-      (BMR, 2016/06/14)
-
-
-   Utilities
-   =========
-    - hdp: detection of netCDF 64-bit file
-      The utility hdp simply failed when the input file was a netCDF 64-bit
-      file.  It now reports that it cannot read a netCDF 64-bit file then
-      exits or continue to the next input file.
-      (BMR, 2016/06/14)
+    - CMake
+      CMake minimum version is 3.2.2
 
 
 Support for new platforms and compilers
 =======================================
-    - Support for Mac OS X Yosemeti 10.10 added (AKC - 2015/03/04, HDFFR-1500)
-
-    - Support for Mac OS X El Capitan 10.11 added (AKC - 2015/11/18, HDFFR-1425)
-      (BMR, added for AKC, 2016/06/24)
+    - Support for macOS Sierra 10.12.5 was added (LK - 2017/06/23, HDFFR-1558)
 
-    Java Wrapper Library
-    --------------------
 
-    The Java HDF JNI library has been integrated into the HDF repository.
-    The configure option is "--enable-java", and the CMake option is
-    HDF4_BUILD_JAVA:BOOL=ON. The package hierarchy has changed from the
-    HDF 4 JNI, which was "ncsa.hdf.hdflib", to HDF 4.2.12,
-    "hdf.hdflib".
-
-
-Bugs fixed since HDF 4.2.11
+Bugs fixed since HDF 4.2.12
 =========================
-   Configuration
-   =============
-    - Examples from mfhdf and hdf will now be installed according to $DESTDIR when
-      it is supplied.  (LRK, 2016/06/29, HDFFR-1491)
-
    Library
    =========
-    - SDsetexternalfile on special elements
-      When the data element is already special, incorrect data length was used
-      for the element in subsequent calls to SDsetexternalfile, causing
-      failures sometimes.  This is now fixed.  (BMR, 2016/01/04, HDFFR-1516)
+    - Several memory leaks occurred in an SD API internal function.  These leaks
+      are now removed.
+      (BMR - 2017/06/23, HDFFR-1534)
+    - Memory leaks occurred because memory returned by HDstrdup were not freed.
+      This is now fixed.
+      (BMR - 2017/06/23, HDFFR-1536)
 
 
-   Utilities
-   =========
-    - None
-
 
 Documentation
 =============
-    - In addition to minor improvements in the contents, user documentation
-      have a new format to improve usability.
-      (BMR, 2016/06/24)
+    - Minor improvements were made to the User's Guide, Reference Manual, and
+      Specification and Developer’s Guide.
+      (BMR - 2017/06/23)
 
 
 Platforms tested
@@ -138,58 +90,58 @@ This version has been tested in the following platforms:
    SunOS 5.11 (32- and 64-bit)       Sun C 5.12 SunOS_sparc 2011/11/16
    11.1, sparc, sun4v (emu)          Sun Fortran 95 8.6 SunOS_sparc 2011/11/16
 
-   Windows 7                      Visual Studio 2012 w/ Intel Fortran 15 (cmake)
+    Windows 7                     Visual Studio 2012 w/ Intel Fortran 15 (cmake)
                                   Visual Studio 2013 w/ Intel Fortran 15 (cmake)
                                   Visual Studio 2015 w/ Intel Fortran 16 (cmake)
-                                  Cygwin(CYGWIN_NT-6.1 2.2.1(0.289/5/3) 
-                                  gcc(4.9.3) compiler and gfortran)
-                                  (cmake and autotools)
 
-   Windows 7 x64                  Visual Studio 2012 w/ Intel Fortran 15 (cmake)
+    Windows 7 x64                 Visual Studio 2012 w/ Intel Fortran 15 (cmake)
                                   Visual Studio 2013 w/ Intel Fortran 15 (cmake)
                                   Visual Studio 2015 w/ Intel Fortran 16 (cmake)
+                                  Visual Studio 2015 w/ Intel C, Fortran 2017 (cmake)
 
-   Windows 8.1                    Visual Studio 2012 w/ Intel Fortran 15 (cmake)
-                                  Visual Studio 2013 w/ Intel Fortran 15 (cmake)
+    Windows 10                    Visual Studio 2015 w/ Intel Fortran 16 (cmake)
+                                  Cygwin(CYGWIN_NT-6.1 2.8.0(0.309/5/3)
+                                      gcc and gfortran compilers (GCC 5.4.0)
+                                      (cmake and autotools)
 
-   Windows 8.1 x64                Visual Studio 2012 w/ Intel Fortran 15 (cmake)
-                                  Visual Studio 2013 w/ Intel Fortran 15 (cmake)
+    Windows 10 x64                Visual Studio 2015 w/ Intel Fortran 16 (cmake)
 
-   Mac OS X 10.8.5, Darwin, 12.6.0   Apple clang version 5.1 from Xcode 5.1
-   12.6.0, x86_64                    gfortran GNU Fortran (GCC) 4.8.2
-   (swallow,kite)                    Intel icc and ifort Version 15.0.3 
 
    Mac OS X 10.9.5, Darwin, 13.4.0   Apple clang version 6.0 from Xcode 6.2
-   13.4.0, x86_64                    gfortran GNU Fortran (GCC) 4.9.2
-   (wren,quail)                      Intel icc and ifort Version 15.0.3 
+   x86_64                            gfortran GNU Fortran (GCC) 4.9.2
+   (wren,quail)                      Intel icc and ifort Version 15.0.3
 
-   Mac OS X 10.10.5, Darwin, 14.5.0  Apple clang version 6.0 from Xcode 7.0
-   14.5.0, x86_64 666666             gfortran GNU Fortran (GCC) 4.9.2
+   Mac OS X 10.10.5, Darwin, 14.5.0  Apple clang version 6.1 from Xcode 7.0
+   x86_64                            gfortran GNU Fortran (GCC) 4.9.2
    (osx1010dev)                      Intel icc and ifort version 15.0.3
 
-   Mac OS X 10.11.5, Darwin, 15.4.0  Apple clang version 7.3 from Xcode 7.3
-   15.5.0, x86_64 666666             gfortran GNU Fortran (GCC) 5.2.0
+   Mac OS X 10.11.5, Darwin, 15.6.0  Apple clang version 7.3 from Xcode 7.3
+   x86_64                            gfortran GNU Fortran (GCC) 5.2.0
    (osx1010dev)                      Intel icc and ifort version 15.0.3
 
-   Debian7.5.0 3.2.0-4-amd64
-   #1 SMP Debian 3.2.51-1, x86_64 GNU/Linux
-                                     gcc (Debian 4.7.2-5) 4.7.2
-                                     GNU Fortran (Debian 4.7.2-5) 4.7.2
+   macOS Sierra 10.12.5, Darwin,     Apple clang version 8.1.0 from Xcode 8.3
+   16.6.0, x86_64                    gfortran GNU Fortran (GCC) 7.1.0
+   (kite)                            Intel icc and ifort version 17.0.2
+                                  
+   Debian 8.6.0 3.16.0-4-amd64
+   #1 SMP Debian 3.16.43-2, x86_64 GNU/Linux
+                                     gcc (Debian 4.9.2-10) 4.9.2
+                                     GNU Fortran (Debian 4.9.2-10) 4.9.2
                                      (cmake and autotools)
 
-   Fedora20 3.15.3-200.fc20.x86_64
-   #1 SMP x86_64  GNU/Linux          gcc (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1)
-                                     GNU Fortran (GCC) 4.8.3 20140624 (Red Hat 4.8.3-1)
+   Fedora24 4.7.2-201.fc24.x86_64
+   #1 SMP x86_64  GNU/Linux          gcc (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3)
+                                     GNU Fortran (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3)
                                      (cmake and autotools)
 
-   SUSE 13.1 3.11.10-17-desktop
-   #1 SMP PREEMPT x86_64 GNU/Linux   gcc (SUSE Linux) 4.8.1
-                                     GNU Fortran (SUSE Linux) 4.8.1
+   SUSE Server 12 SP1 3.12.49-1
+   #1 SMP x86_64 GNU/Linux           gcc (SUSE Linux) 4.8.5
+                                     GNU Fortran (SUSE Linux) 4.8.5
                                      (cmake and autotools)
 
-   Ubuntu 14.04 3.13.0-35-generic
-   #62-Ubuntu SMP x86_64 GNU/Linux   gcc (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1
-                                     GNU Fortran (Ubuntu/Linaro 4.9.1-0ubuntu1) 4.9.1
+   Ubuntu 14.04 4.4.0-81-generic
+   #104-Ubuntu SMP x86_64 GNU/Linux  gcc (Ubuntu 5.4.0-6ubuntu16.04.4) 5.4.0
+                                     GNU Fortran (Ubuntu 5.4.0-6ubuntu16.04.4) 5.4.0
                                      (cmake and autotools)
 
 
@@ -200,11 +152,10 @@ o  Several Fortran examples print "^@" when displaying strings (for example,
    doesn't know the length of the strings passed from the C library.
    EIP - 2015-01-11, HDFFR-1477
 
-o  CMake builds in Windows uses the same pre-generated ncgen*.[ch] files from
-   the yacc/lex input files. The generated file, ncgenyy.c, uses the <unistd.h>
-   header file that Windows does not support.  This must be blocked out in
-   order for Windows to use it.
-   AKC 2014-02-03, HDFFR-1424
+o  CMake fails to set the full path to the install location on Windows:
+    The configuration file for examples, HDF4_Examples.cmake, must be updated
+    with the correct value by editing the file or using the INSTALLDIR option..
+   ADB - 2014/02/03
 
 o  CMake "make install" fails installing the tools:
     Use CPack to create an install package.
diff --git a/release_notes/USING_CMake_Examples.txt b/release_notes/USING_CMake_Examples.txt
index 1bbb3a2..2a38cd0 100644
--- a/release_notes/USING_CMake_Examples.txt
+++ b/release_notes/USING_CMake_Examples.txt
@@ -22,7 +22,7 @@ I. Preconditions
 
    1. We suggest you obtain the latest CMake for windows from the Kitware
       web site. The HDF 4.2.x product requires a minimum CMake version
-      of 3.1.0.
+      of 3.2.2.
 
    2. You have installed the HDF4 library built with CMake by executing
       the HDF Install Utility (the *.exe or *.msi file in the binary package for
@@ -39,21 +39,27 @@ II. Building HDF4 Examples with CMake
 Files in the HDF4 install directory:
        HDF4Examples folder
        HDF4_Examples.cmake
+       HDF4_Examples_options.cmake
+       CTestScript.cmake
 
 Default installation process:
        Create a directory to run the examples, i.e. \test_hdf4.
        Copy HDF4Examples folder to this directory.
        Copy HDF4_Examples.cmake to this directory.
+       Copy HDF4_Examples_options.cmake to this directory.
+       Copy CTestScript.cmake to this directory.
        The default source folder is defined as "HDF4Examples". It can be changed
            with the CTEST_SOURCE_NAME script option.
        The default installation folder is defined for the platform.
            It can be changed with the INSTALLDIR script option.
+           (Note: Windows has issues with spaces and paths -The path will need to
+            be set correctly.)
        The default ctest configuration is defined as "Release". It can be changed
-           with the CTEST_BUILD_CONFIGURATION script option. Note that this must
+           with the CTEST_CONFIGURATION_TYPE script option. Note that this must
            be the same as the value used with the -C command line option.
        The default build configuration is defined to build and use static libraries.
            Shared libraries can be used with the STATICLIBRARIES script option set to "NO".
-       Other options can be changed by editing the HDF4_Examples.cmake file.
+       Other options can be changed by editing the HDF4_Examples_options.cmake file.
 
        If the defaults are okay, execute from this directory:
            ctest -S HDF4_Examples.cmake -C Release -V -O test.log
diff --git a/release_notes/USING_HDF4_CMake.txt b/release_notes/USING_HDF4_CMake.txt
index bc41113..ac5d200 100644
--- a/release_notes/USING_HDF4_CMake.txt
+++ b/release_notes/USING_HDF4_CMake.txt
@@ -37,7 +37,7 @@ I. Preconditions
 
    1. We suggest you obtain the latest CMake for windows from the Kitware
       web site. The HDF 4.2.x product requires a minimum CMake version
-      of 3.1.0.
+      of 3.2.2.
 
    2. You have installed the HDF4 library built with CMake, by executing
       the HDF Install Utility (the *.exe file in the binary package for
@@ -182,18 +182,19 @@ following text in the file:
 cmake_minimum_required (VERSION 3.1)
 PROJECT (HDF4MyApp C CXX)
 
-find_package (HDF4 NAMES hdf4)
+set (LIB_TYPE STATIC) # or SHARED
+string(TOLOWER ${LIB_TYPE} SEARCH_TYPE)
+
+find_package (HDF4 NAMES hdf4 COMPONENTS C ${SEARCH_TYPE})
 # find_package (HDF4) # Find non-cmake built HDF4
 INCLUDE_DIRECTORIES (${HDF4_INCLUDE_DIR})
-set (LINK_LIBS ${LINK_LIBS} ${HDF4_LIBRARIES})
-set (LIB_TYPE STATIC) # or SHARED
 
 set (example hdf_example)
 
 add_executable (${example} ${PROJECT_SOURCE_DIR}/${example}.c)
 TARGET_NAMING (${example} ${LIB_TYPE})
 TARGET_C_PROPERTIES (${example} ${LIB_TYPE} " " " ")
-target_link_libraries (${example} ${LINK_LIBS})
+target_link_libraries (${example} ${HDF4_C_${LIB_TYPE}_LIBRARY})
 
 ENABLE_TESTING ()
 include (CTest)
@@ -241,7 +242,7 @@ set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG})
 set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build)
 set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
 set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
-set(CTEST_BUILD_CONFIGURATION "Release")
+set(CTEST_CONFIGURATION_TYPE "Release")
 set(MODEL "Experimental")
 
 # build generator name, see cmake generator list

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/hdf4.git



More information about the Pkg-grass-devel mailing list