diff options
author | MuQun Yang <ymuqun@hdfgroup.org> | 2004-10-27 22:41:57 (GMT) |
---|---|---|
committer | MuQun Yang <ymuqun@hdfgroup.org> | 2004-10-27 22:41:57 (GMT) |
commit | babfbc2f9df2233f61e12cc3c153627e319f0e8f (patch) | |
tree | e155c153e3e073fa13b46706f1078d5ba90875af /src | |
parent | 84745471a2f89660d8b0d48572a31982d12e05fa (diff) | |
download | hdf5-babfbc2f9df2233f61e12cc3c153627e319f0e8f.zip hdf5-babfbc2f9df2233f61e12cc3c153627e319f0e8f.tar.gz hdf5-babfbc2f9df2233f61e12cc3c153627e319f0e8f.tar.bz2 |
[svn-r9474] Purpose:
Updating H5api_adpt.h to help the implementation of Fortran DLL on windows.
Description:
1. More functions need to be added prefix macro for exporting and importing
fortran DLL on Windows.
2. unlink was _unlink on windows and use HDunlink to specify this.
Solution:
Platforms tested:
linux 2.4(h5committest not finished yet, but should work since the change is minor and it is passed with pgi compiler)
Misc. update:
Diffstat (limited to 'src')
-rw-r--r-- | src/H5api_adpt.h | 22 | ||||
-rw-r--r-- | src/H5private.h | 4 |
2 files changed, 23 insertions, 3 deletions
diff --git a/src/H5api_adpt.h b/src/H5api_adpt.h index 401dddf..b02dd45 100644 --- a/src/H5api_adpt.h +++ b/src/H5api_adpt.h @@ -25,7 +25,7 @@ #if defined(_HDF5DLL_) #pragma warning(disable: 4273) /* Disable the dll linkage warnings */ #define H5_DLL __declspec(dllexport) -#define H5_DLLVAR __declspec(dllexport) +#define H5_DLLVAR extern __declspec(dllexport) #elif defined(_HDF5USEDLL_) #define H5_DLL __declspec(dllimport) #define H5_DLLVAR __declspec(dllimport) @@ -37,7 +37,7 @@ #if defined(_HDF5TESTDLL_) #pragma warning(disable: 4273) /* Disable the dll linkage warnings */ #define H5TEST_DLL __declspec(dllexport) -#define H5TEST_DLLVAR __declspec(dllexport) +#define H5TEST_DLLVAR extern __declspec(dllexport) #elif defined(_HDF5TESTUSEDLL_) #define H5TEST_DLL __declspec(dllimport) #define H5TEST_DLLVAR __declspec(dllimport) @@ -49,7 +49,7 @@ #if defined(HDF5FORT_CSTUB_DLL_EXPORTS) #pragma warning(disable: 4273) /* Disable the dll linkage warnings */ #define H5_FCDLL __declspec(dllexport) -#define H5_FCDLLVAR __declspec(dllexport) +#define H5_FCDLLVAR extern __declspec(dllexport) #elif defined(HDF5FORT_CSTUB_USEDLL) #define H5_FCDLL __declspec(dllimport) #define H5_FCDLLVAR __declspec(dllimport) @@ -58,6 +58,20 @@ #define H5_FCDLLVAR extern #endif /* _HDF5_FORTRANDLL_EXPORTS_ */ +#if defined(HDF5FORTTEST_CSTUB_DLL_EXPORTS) +#pragma warning(disable: 4273) /* Disable the dll linkage warnings */ +#define H5_FCTESTDLL __declspec(dllexport) +#define H5_FCTESTDLLVAR extern __declspec(dllexport) +#elif defined(HDF5FORTTEST_CSTUB_USEDLL) +#define H5_FCTESTDLL __declspec(dllimport) +#define H5_FCTESTDLLVAR __declspec(dllimport) +#else +#define H5_FCTESTDLL +#define H5_FCTESTDLLVAR extern +#endif /* _HDF5_FORTRANDLL_EXPORTS_ */ + + + /* Added to export or to import C++ APIs - BMR (02-15-2002) */ #if defined(HDF5_CPPDLL_EXPORTS) /* this name is generated at creation */ #define H5_DLLCPP __declspec(dllexport) @@ -75,6 +89,8 @@ #define H5TEST_DLLVAR extern #define H5_FCDLL #define H5_FCDLLVAR extern +#define H5_FCTESTDLL +#define H5_FCTESTDLLVAR extern #endif #endif /* H5API_ADPT_H */ diff --git a/src/H5private.h b/src/H5private.h index f09ae7d..86b975c 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -840,7 +840,11 @@ H5_DLL int64_t HDstrtoll (const char *s, const char **rest, int base); #define HDumask(N) umask(N) #define HDuname(S) uname(S) #define HDungetc(C,F) ungetc(C,F) +#ifdef WIN32 +#define HDunlink(S) _unlink(S) +#else #define HDunlink(S) unlink(S) +#endif #define HDutime(S,T) utime(S,T) #define HDva_arg(A,T) va_arg(A,T) #define HDva_end(A) va_end(A) |