summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c++/test/h5cpputil.h8
-rw-r--r--c++/test/tattr.cpp6
-rw-r--r--c++/test/tcompound.cpp5
-rw-r--r--c++/test/tfile.cpp6
-rw-r--r--c++/test/tfilter.cpp3
-rw-r--r--c++/test/th5s.cpp6
-rw-r--r--c++/test/trefer.cpp6
-rw-r--r--c++/test/ttypes.cpp3
-rw-r--r--c++/test/tvlstr.cpp3
9 files changed, 37 insertions, 9 deletions
diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h
index 3c7efe1..bb08f45 100644
--- a/c++/test/h5cpputil.h
+++ b/c++/test/h5cpputil.h
@@ -95,6 +95,9 @@ class InvalidActionException : public Exception {
};
/* Prototypes for the test routines */
+#ifdef __cplusplus
+extern "C" {
+#endif
void test_attr(void);
void test_compound(void);
void test_file(void);
@@ -113,6 +116,11 @@ void cleanup_h5s(void);
void cleanup_reference(void);
void cleanup_types(void);
void cleanup_vlstrings(void);
+
+#ifdef __cplusplus
+}
+#endif
+
/* not yet
void cleanup_select(void);
void cleanup_time(void);
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp
index a6fd8de..ede7e31 100644
--- a/c++/test/tattr.cpp
+++ b/c++/test/tattr.cpp
@@ -1200,8 +1200,10 @@ test_string_attr(void)
** test_attr(): Main attribute testing routine.
**
****************************************************************/
-void
-test_attr(void)
+#ifdef __cplusplus
+extern "C"
+#endif
+void test_attr(void)
{
// Output message about test being performed
MESSAGE(5, ("Testing Attributes\n"));
diff --git a/c++/test/tcompound.cpp b/c++/test/tcompound.cpp
index 54344a8..f6571b1 100644
--- a/c++/test/tcompound.cpp
+++ b/c++/test/tcompound.cpp
@@ -596,7 +596,7 @@ static void test_compound_6(void)
buf = (unsigned char*)malloc(nelmts * MAX(sizeof(src_typ_t), sizeof(dst_typ_t)));
bkg = (unsigned char*)malloc(nelmts * sizeof(dst_typ_t));
orig = (unsigned char*)malloc(nelmts * sizeof(src_typ_t));
- for (int i=0; i<nelmts; i++) {
+ for (i=0; i<nelmts; i++) {
s_ptr = ((src_typ_t*)orig) + i;
s_ptr->b = (i*8+1) & 0x7fff;
s_ptr->d = (i*8+6) & 0x7fff;
@@ -731,6 +731,9 @@ static void test_compound_7(void)
*
*-------------------------------------------------------------------------
*/
+#ifdef __cplusplus
+extern "C"
+#endif
void test_compound(void)
{
// Output message about test being performed
diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp
index 13ed377..f3d9574 100644
--- a/c++/test/tfile.cpp
+++ b/c++/test/tfile.cpp
@@ -492,8 +492,10 @@ test_file_name()
*
*-------------------------------------------------------------------------
*/
-void
-test_file(void)
+#ifdef __cplusplus
+extern "C"
+#endif
+void test_file(void)
{
// Output message about test being performed
MESSAGE(5, ("Testing File I/O operations\n"));
diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp
index dd17d74..2a9503a 100644
--- a/c++/test/tfilter.cpp
+++ b/c++/test/tfilter.cpp
@@ -248,6 +248,9 @@ void test_szip_filter(H5File& file1)
**
****************************************************************/
const H5std_string FILE1("tfilters.h5");
+#ifdef __cplusplus
+extern "C"
+#endif
void test_filters(void)
{
// Output message about test being performed
diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp
index 8ae34a6..9c49105 100644
--- a/c++/test/th5s.cpp
+++ b/c++/test/th5s.cpp
@@ -591,8 +591,10 @@ test_h5s_compound_scalar_read(void)
* Modifications:
*-------------------------------------------------------------------------
*/
-void
-test_h5s(void)
+#ifdef __cplusplus
+extern "C"
+#endif
+void test_h5s(void)
{
// Output message about test being performed
MESSAGE(5, ("Testing Dataspaces\n"));
diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp
index 155f122..edcd968 100644
--- a/c++/test/trefer.cpp
+++ b/c++/test/trefer.cpp
@@ -277,8 +277,10 @@ test_reference_obj(void)
** test_reference(): Main reference testing routine.
**
****************************************************************/
-void
-test_reference(void)
+#ifdef __cplusplus
+extern "C"
+#endif
+void test_reference(void)
{
// Output message about test being performed
MESSAGE(5, ("Testing References\n"));
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp
index 299c4e4..4e9faae 100644
--- a/c++/test/ttypes.cpp
+++ b/c++/test/ttypes.cpp
@@ -774,6 +774,9 @@ cerr << "all the way here?" << endl;
** test_types(): Main data types testing routine.
**
****************************************************************/
+#ifdef __cplusplus
+extern "C"
+#endif
void test_types(void)
{
// Output message about test being performed
diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp
index c8a05c5..b1815a3 100644
--- a/c++/test/tvlstr.cpp
+++ b/c++/test/tvlstr.cpp
@@ -758,6 +758,9 @@ static void test_vl_rewrite(void)
** test_vlstrings(): Main VL string testing routine.
**
****************************************************************/
+#ifdef __cplusplus
+extern "C"
+#endif
void test_vlstrings(void)
{
// Output message about test being performed