diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-03-20 18:21:28 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-03-20 18:21:28 (GMT) |
commit | 59a9d9a0c67ea2a848a6aaad544db651a9fa4192 (patch) | |
tree | 7932a45a650c459c98013f0b61cfc3c72362a6b0 /src | |
parent | 6563fc39b17543f01fd8e888774c43a75628737f (diff) | |
download | hdf5-59a9d9a0c67ea2a848a6aaad544db651a9fa4192.zip hdf5-59a9d9a0c67ea2a848a6aaad544db651a9fa4192.tar.gz hdf5-59a9d9a0c67ea2a848a6aaad544db651a9fa4192.tar.bz2 |
[svn-r23403] Refactor windows code:
windows uses ';' as path separator
windows default path is different
windows find files needs '*.*'
Diffstat (limited to 'src')
-rw-r--r-- | src/H5PL.c | 11 | ||||
-rw-r--r-- | src/H5PLpublic.h | 13 |
2 files changed, 20 insertions, 4 deletions
@@ -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 */ |