summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/dynlib_rpk.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2015-12-14 15:22:29 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2015-12-14 15:22:29 (GMT)
commit7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a (patch)
tree6bd24199653eff3e99f312d748ba4909686bef61 /tools/h5repack/dynlib_rpk.c
parent8e9b142d9cd347432d400b4f9b3b88a3f047c06d (diff)
parent2cb441c507dfbd4437ccf29e232a9b730e6e1003 (diff)
downloadhdf5-7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a.zip
hdf5-7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a.tar.gz
hdf5-7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a.tar.bz2
[svn-r28636] merge from trunk.
Diffstat (limited to 'tools/h5repack/dynlib_rpk.c')
-rw-r--r--tools/h5repack/dynlib_rpk.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/h5repack/dynlib_rpk.c b/tools/h5repack/dynlib_rpk.c
index 1ccc33a..6e8a7b6 100644
--- a/tools/h5repack/dynlib_rpk.c
+++ b/tools/h5repack/dynlib_rpk.c
@@ -24,6 +24,18 @@
#define H5Z_FILTER_DYNLIB1 257
+/* gcc attribute support from H5private.h */
+#ifdef __cplusplus
+# define H5_ATTR_CONST /*void*/
+#else /* __cplusplus */
+#if defined(H5_HAVE_ATTRIBUTE) && !defined(__SUNPRO_C)
+# define H5_ATTR_CONST __attribute__((const))
+#else
+# define H5_ATTR_CONST /*void*/
+#endif
+#endif /* __cplusplus */
+
+
static size_t H5Z_filter_dynlib1(unsigned int flags, size_t cd_nelmts,
const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
@@ -38,8 +50,8 @@ const H5Z_class2_t H5Z_DYNLIB1[1] = {{
(H5Z_func_t)H5Z_filter_dynlib1, /* The actual filter function */
}};
-H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
-const void *H5PLget_plugin_info(void) {return H5Z_DYNLIB1;}
+H5_ATTR_CONST H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
+H5_ATTR_CONST const void *H5PLget_plugin_info(void) {return H5Z_DYNLIB1;}
/*-------------------------------------------------------------------------
* Function: H5Z_filter_dynlib1