From 282692288961cc76fadafb94a067a8a28b982e9e Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Tue, 5 Jan 2016 05:39:26 -0500 Subject: [svn-r28806] Merge from trunk: 28792 - H5Epubgen.h extern C fix 28788 - cleanup of new files in tfile.c Merge from hdf5_1_10_alpha: 28706 - only test (release-1) when release # > 0 in major/minor/release checks Tested on: 64-bit Ubuntu 15.10 (Linux 4.2.0 x86_64) gcc 5.2.1 serial only --- bin/make_err | 12 ++++++++++++ test/tfile.c | 8 ++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/bin/make_err b/bin/make_err index 4b1f474..1b39d53fb 100755 --- a/bin/make_err +++ b/bin/make_err @@ -175,6 +175,12 @@ sub create_public ($) { print_warning(*HEADER); print_startprotect(*HEADER, $file); + # Begin extern C block + print HEADER "\n"; + print HEADER "#ifdef __cplusplus\n"; + print HEADER "extern \"C\" {\n"; + print HEADER "#endif\n"; + # Iterate over all the major errors print HEADER "\n/*********************/\n"; print HEADER "/* Major error codes */\n"; @@ -202,6 +208,12 @@ sub create_public ($) { } } + # End extern C block + print HEADER "\n"; + print HEADER "#ifdef __cplusplus\n"; + print HEADER "}\n"; + print HEADER "#endif\n"; + print_endprotect(*HEADER, $file); # Close header file diff --git a/test/tfile.c b/test/tfile.c index 8180396..3fbfce3 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -3435,7 +3435,8 @@ test_libver_macros(void) VERIFY(H5_VERSION_GE(major-1,minor,release+1), TRUE, "H5_VERSION_GE"); VERIFY(H5_VERSION_GE(major,minor-1,release), TRUE, "H5_VERSION_GE"); VERIFY(H5_VERSION_GE(major,minor-1,release+1), TRUE, "H5_VERSION_GE"); - VERIFY(H5_VERSION_GE(major,minor,release-1), TRUE, "H5_VERSION_GE"); + if(H5_VERS_RELEASE > 0) + VERIFY(H5_VERSION_GE(major,minor,release-1), TRUE, "H5_VERSION_GE"); VERIFY(H5_VERSION_GE(major+1,minor,release), FALSE, "H5_VERSION_GE"); VERIFY(H5_VERSION_GE(major+1,minor-1,release), FALSE, "H5_VERSION_GE"); @@ -3457,7 +3458,8 @@ test_libver_macros(void) VERIFY(H5_VERSION_LE(major-1,minor+1,release+1), FALSE, "H5_VERSION_LE"); VERIFY(H5_VERSION_LE(major,minor-1,release), FALSE, "H5_VERSION_LE"); VERIFY(H5_VERSION_LE(major,minor-1,release+1), FALSE, "H5_VERSION_LE"); - VERIFY(H5_VERSION_LE(major,minor,release-1), FALSE, "H5_VERSION_LE"); + if(H5_VERS_RELEASE > 0) + VERIFY(H5_VERSION_LE(major,minor,release-1), FALSE, "H5_VERSION_LE"); } /* test_libver_macros() */ /**************************************************************** @@ -3739,5 +3741,7 @@ cleanup_file(void) HDremove(FILE3); HDremove(FILE4); HDremove(FILE5); + HDremove(FILE6); + HDremove(FILE7); } -- cgit v0.12