summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MANIFEST1
-rw-r--r--src/H5PL.c11
-rw-r--r--src/H5PLpublic.h13
-rw-r--r--test/plugin_lib/CMakeLists.txt8
-rw-r--r--test/plugin_lib/dynlib1.c8
-rw-r--r--test/plugin_lib/dynlib1.h55
6 files changed, 29 insertions, 67 deletions
diff --git a/MANIFEST b/MANIFEST
index 3b6e913..17de021 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1096,7 +1096,6 @@
./test/chunk_info.c
./test/plugin_lib/dynlib1.c
-./test/plugin_lib/dynlib1.h
./test/plugin_lib/Makefile.in
./test/testfiles/err_compat_1
diff --git a/src/H5PL.c b/src/H5PL.c
index bc0b90e..5fb8147 100644
--- a/src/H5PL.c
+++ b/src/H5PL.c
@@ -35,8 +35,6 @@
/* Local Macros */
/****************/
-#define H5PL_DEFAULT_PATH "/usr:/usr/lib:/usr/local"
-#define H5PL_PATH_SEPARATOR ":"
#define H5PL_MAX_PATH_NUM 16
/****************************/
@@ -45,6 +43,8 @@
/****************************/
/* Windows support */
#ifdef H5_HAVE_WIN32_API
+#define H5PL_DEFAULT_PATH ".;/ProgramData;/Users/Public"
+#define H5PL_PATH_SEPARATOR ";"
/* Handle for dynamic library */
#define H5PL_HANDLE HINSTANCE
@@ -77,6 +77,8 @@ ret_val = get_filter_info(); \
typedef const H5Z_class2_t *(__cdecl *get_filter_info_t)();
#else /* H5_HAVE_WIN32_API */
+#define H5PL_DEFAULT_PATH "/usr:/usr/lib:/usr/local"
+#define H5PL_PATH_SEPARATOR ":"
/* Handle for dynamic library */
#define H5PL_HANDLE void *
@@ -425,10 +427,13 @@ H5PL__find(H5PL_type_t plugin_type, int type_id, char *dir, void **info)
HANDLE hFind;
char *pathname = NULL;
htri_t ret_value = FALSE;
+ char service[2048];
FUNC_ENTER_STATIC
- if((hFind = FindFirstFile(dir, &fdFile)) == INVALID_HANDLE_VALUE)
+ /* Specify a file mask. *.* = We want everything! */
+ sprintf(service, "%s*.*", dir);
+ if((hFind = FindFirstFile(service, &fdFile)) == INVALID_HANDLE_VALUE)
HGOTO_ERROR(H5E_PLUGIN, H5E_OPENERROR, FAIL, "can't open directory")
do {
diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h
index 65a94cc..6b17197 100644
--- a/src/H5PLpublic.h
+++ b/src/H5PLpublic.h
@@ -21,7 +21,7 @@
#define _H5PLpublic_H
/* Public headers needed by this file */
-#include "H5public.h"
+#include "H5Zpublic.h"
/****************************/
/* Library Public Typedefs */
@@ -36,12 +36,23 @@ typedef enum H5PL_type_t {
} H5PL_type_t;
+/* plugins always export */
+#if defined (_MSC_VER) /* MSVC Compiler Case */
+ #define H5PLUGIN_DLL __declspec(dllexport)
+#elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
+ #define H5PLUGIN_DLL __attribute__ ((visibility("default")))
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
+ H5PLUGIN_DLL const H5PL_type_t H5PL_get_plugin_type(void);
+ H5PLUGIN_DLL const H5Z_class2_t* H5PL_get_plugin_info(void);
+
#ifdef __cplusplus
}
#endif
+
#endif /* _H5PLpublic_H */
diff --git a/test/plugin_lib/CMakeLists.txt b/test/plugin_lib/CMakeLists.txt
index e45e848..6435688 100644
--- a/test/plugin_lib/CMakeLists.txt
+++ b/test/plugin_lib/CMakeLists.txt
@@ -34,10 +34,6 @@ SET (H5_TEST_PLUGIN_LIB_SRCS
${HDF5_TEST_PLUGIN_LIB_SOURCE_DIR}/dynlib1.c
)
-SET (H5_TEST_PLUGIN_LIB_HDRS
- ${HDF5_TEST_PLUGIN_LIB_SOURCE_DIR}/dynlib1.h
-)
-
#-----------------------------------------------------------------------------
# Generate the H5srcdir_str.h file containing user settings needed by compilation
#-----------------------------------------------------------------------------
@@ -45,7 +41,7 @@ SET (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
CONFIGURE_FILE (${HDF5_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${H5_TEST_PLUGIN_LIB_SRCS} ${H5_TEST_PLUGIN_LIB_HDRS})
+ADD_LIBRARY (${HDF5_TEST_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${H5_TEST_PLUGIN_LIB_SRCS})
TARGET_LINK_LIBRARIES (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
#SET_GLOBAL_VARIABLE( HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TEST_PLUGIN_LIB_TARGET}")
H5_SET_LIB_OPTIONS (
@@ -84,4 +80,4 @@ TARGET_LINK_LIBRARIES (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET})
SET_TARGET_PROPERTIES (plugin PROPERTIES FOLDER test)
ADD_TEST (NAME H5PLUGIN-plugin COMMAND $<TARGET_FILE:plugin>)
-SET_TESTS_PROPERTIES (H5PLUGIN-plugin PROPERTIES ENVIRONMENT HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/plugins)
+SET_TESTS_PROPERTIES (H5PLUGIN-plugin PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/plugins/
diff --git a/test/plugin_lib/dynlib1.c b/test/plugin_lib/dynlib1.c
index 1f4fff8..d663bd7 100644
--- a/test/plugin_lib/dynlib1.c
+++ b/test/plugin_lib/dynlib1.c
@@ -19,7 +19,13 @@
*
* Purpose: Tests the plugin module (H5PL)
*/
-#include "dynlib1.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <hdf5.h>
+
+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);
/* This message derives from H5Z */
const H5Z_class2_t H5Z_DYNLIB1[1] = {{
diff --git a/test/plugin_lib/dynlib1.h b/test/plugin_lib/dynlib1.h
deleted file mode 100644
index fba626f..0000000
--- a/test/plugin_lib/dynlib1.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/*
- * Programmer: Raymond Lu
- * 13 February 2013
- *
- * Purpose: Tests the plugin module (H5PL)
- */
-#ifndef DYNLIB1_H__
-#define DYNLIB1_H__
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <hdf5.h>
-
-/* plugins always export */
- #if defined (_MSC_VER) /* MSVC Compiler Case */
- #define H5PLUGIN_DLL __declspec(dllexport)
- #define H5PLUGIN_DLLVAR extern __declspec(dllexport)
- #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */
- #define H5PLUGIN_DLL __attribute__ ((visibility("default")))
- #define H5PLUGIN_DLLVAR extern __attribute__ ((visibility("default")))
- #endif
-
-#define FILTER_DYNLIB1_VERS 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- H5PLUGIN_DLL const H5PL_type_t H5PL_get_plugin_type(void);
- H5PLUGIN_DLL const H5Z_class2_t* H5PL_get_plugin_info(void);
-
-/* Local prototypes for filter functions */
- 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);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* DYNLIB1_H__ */