From 3234df6fb19d5481a3cde34e0d01b64aaf5931c8 Mon Sep 17 00:00:00 2001 From: Patrick Lu Date: Tue, 2 Feb 1999 10:55:10 -0500 Subject: [svn-r1052] changed the HDF5GLOBAL and HDF5DLL to __DLLVAR and __DLL__ also exported all the non static functions and globals variables to the dll --- src/H5Aprivate.h | 6 +++--- src/H5Apublic.h | 24 ++++++++++++------------ src/H5MMprivate.h | 8 ++++---- src/H5api_adpt.h | 15 +++++++++------ src/H5private.h | 46 +++++++++++++++++++++++----------------------- 5 files changed, 51 insertions(+), 48 deletions(-) diff --git a/src/H5Aprivate.h b/src/H5Aprivate.h index a1daf99..49ca7d7 100644 --- a/src/H5Aprivate.h +++ b/src/H5Aprivate.h @@ -25,8 +25,8 @@ typedef struct H5A_t H5A_t; /* Private headers needed by this file */ /* Functions defined in H5A.c */ -H5A_t * H5A_copy(const H5A_t *old_attr); -herr_t H5A_close(H5A_t *attr); -H5G_entry_t *H5A_entof(H5A_t *attr); +__DLL__ H5A_t * H5A_copy(const H5A_t *old_attr); +__DLL__ herr_t H5A_close(H5A_t *attr); +__DLL__ H5G_entry_t *H5A_entof(H5A_t *attr); #endif diff --git a/src/H5Apublic.h b/src/H5Apublic.h index 4b14943..3fc1d6e 100644 --- a/src/H5Apublic.h +++ b/src/H5Apublic.h @@ -27,20 +27,20 @@ typedef int (*H5A_operator_t)(hid_t location_id/*in*/, const char *attr_name/*in*/, void *operator_data/*in,out*/); /* Public function prototypes */ -HDF5API hid_t H5Acreate(hid_t loc_id, const char *name, hid_t type_id, +__DLL__ hid_t H5Acreate(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t plist_id); -HDF5API hid_t H5Aopen_name(hid_t loc_id, const char *name); -HDF5API hid_t H5Aopen_idx(hid_t loc_id, unsigned idx); -HDF5API herr_t H5Awrite(hid_t attr_id, hid_t type_id, void *buf); -HDF5API herr_t H5Aread(hid_t attr_id, hid_t type_id, void *buf); -HDF5API herr_t H5Aclose(hid_t attr_id); -HDF5API hid_t H5Aget_space(hid_t attr_id); -HDF5API hid_t H5Aget_type(hid_t attr_id); -HDF5API hssize_t H5Aget_name(hid_t attr_id, size_t buf_size, char *buf); -HDF5API int H5Aget_num_attrs(hid_t loc_id); -HDF5API int H5Aiterate(hid_t loc_id, unsigned *attr_num, H5A_operator_t op, +__DLL__ hid_t H5Aopen_name(hid_t loc_id, const char *name); +__DLL__ hid_t H5Aopen_idx(hid_t loc_id, unsigned idx); +__DLL__ herr_t H5Awrite(hid_t attr_id, hid_t type_id, void *buf); +__DLL__ herr_t H5Aread(hid_t attr_id, hid_t type_id, void *buf); +__DLL__ herr_t H5Aclose(hid_t attr_id); +__DLL__ hid_t H5Aget_space(hid_t attr_id); +__DLL__ hid_t H5Aget_type(hid_t attr_id); +__DLL__ hssize_t H5Aget_name(hid_t attr_id, size_t buf_size, char *buf); +__DLL__ int H5Aget_num_attrs(hid_t loc_id); +__DLL__ int H5Aiterate(hid_t loc_id, unsigned *attr_num, H5A_operator_t op, void *op_data); -HDF5API herr_t H5Adelete(hid_t loc_id, const char *name); +__DLL__ herr_t H5Adelete(hid_t loc_id, const char *name); #ifdef __cplusplus } diff --git a/src/H5MMprivate.h b/src/H5MMprivate.h index 68c93f7..13a4951 100644 --- a/src/H5MMprivate.h +++ b/src/H5MMprivate.h @@ -28,9 +28,9 @@ /* * Library prototypes... */ -void *H5MM_realloc (void *mem, size_t size); -char *H5MM_xstrdup (const char *s); -char *H5MM_strdup (const char *s); -HDF5API void *H5MM_xfree (void *mem); +__DLL__ void *H5MM_realloc (void *mem, size_t size); +__DLL__ char *H5MM_xstrdup (const char *s); +__DLL__ char *H5MM_strdup (const char *s); +__DLL__ void *H5MM_xfree (void *mem); #endif diff --git a/src/H5api_adpt.h b/src/H5api_adpt.h index 603b9b5..5b09c76 100644 --- a/src/H5api_adpt.h +++ b/src/H5api_adpt.h @@ -10,16 +10,19 @@ #if defined(_HDF5DLL_) #pragma warning(disable: 4273) /* Disable the dll linkage warnings */ -#define HDF5API __declspec(dllexport) -#define HDF5GLOBAL __declspec(dllexport) +#define __DLL__ __declspec(dllexport) +#define __DLLVAR__ __declspec(dllexport) +#elif defined(_HDF5USEDLL_) +#define __DLL__ __declspec(dllimport) +#define __DLLVAR__ __declspec(dllimport) #else -#define HDF5API -#define HDF5GLOBAL extern +#define __DLL__ +#define __DLLVAR__ extern #endif /* _HDF5DLL_ */ #else /*WIN32*/ -#define HDF5API -#define HDF5GLOBAL extern +#define __DLL__ +#define __DLLVAR__ extern #endif #endif /* H5API_ADPT_H */ diff --git a/src/H5private.h b/src/H5private.h index 61d6bbb..ceb47f0 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -402,11 +402,11 @@ typedef struct { double etime; /*elapsed wall-clock time */ } H5_timer_t; -HDF5API void H5_timer_reset (H5_timer_t *timer); -HDF5API void H5_timer_begin (H5_timer_t *timer); -HDF5API void H5_timer_end (H5_timer_t *sum/*in,out*/, +__DLL__ void H5_timer_reset (H5_timer_t *timer); +__DLL__ void H5_timer_begin (H5_timer_t *timer); +__DLL__ void H5_timer_end (H5_timer_t *sum/*in,out*/, H5_timer_t *timer/*in,out*/); -HDF5API void H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds); +__DLL__ void H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds); /* * Redefine all the POSIX functions. We should never see a POSIX @@ -479,7 +479,7 @@ HDF5API void H5_bandwidth(char *buf/*out*/, double nbytes, double nseconds); #define HDfopen(S,M) fopen(S,M) #define HDfork() fork() #define HDfpathconf(F,N) fpathconf(F,N) -HDF5API int HDfprintf (FILE *stream, const char *fmt, ...); +__DLL__ int HDfprintf (FILE *stream, const char *fmt, ...); #define HDfputc(C,F) fputc(C,F) #define HDfputs(S,F) fputs(S,F) #define HDfread(M,Z,N,F) fread(M,Z,N,F) @@ -624,7 +624,7 @@ HDF5API int HDfprintf (FILE *stream, const char *fmt, ...); #define HDstrtod(S,R) strtod(S,R) #define HDstrtok(X,Y) strtok(X,Y) #define HDstrtol(S,R,N) strtol(S,R,N) -HDF5API int64_t HDstrtoll (const char *s, const char **rest, int base); +__DLL__ int64_t HDstrtoll (const char *s, const char **rest, int base); #define HDstrtoul(S,R,N) strtoul(S,R,N) #define HDstrxfrm(X,Y,Z) strxfrm(X,Y,Z) #define HDsysconf(N) sysconf(N) @@ -671,7 +671,7 @@ char *strdup(const char *s); #define HDstrdup(S) strdup(S) #ifndef HAVE_SNPRINTF -HDF5API int HDsnprintf(char *buf, size_t size, const char *fmt, ...); +__DLL__ int HDsnprintf(char *buf, size_t size, const char *fmt, ...); #endif /* @@ -775,7 +775,7 @@ extern H5_debug_t H5_debug_g; #define H5TRACE_RETURN(V) /*void*/ #endif -void H5_trace (hbool_t returning, const char *func, const char *type, ...); +__DLL__ void H5_trace (hbool_t returning, const char *func, const char *type, ...); /*------------------------------------------------------------------------- @@ -902,23 +902,23 @@ extern hbool_t H5_libinit_g; /*good thing C's lazy about extern! */ #endif /* Private functions, not part of the publicly documented API */ -herr_t H5_init_library(void); -void H5_term_library(void); +__DLL__ herr_t H5_init_library(void); +__DLL__ void H5_term_library(void); /* Functions to terminate interfaces */ -void H5A_term_interface(intn status); -void H5D_term_interface(intn status); -void H5F_term_interface(intn status); -void H5G_term_interface(intn status); -void H5I_term_interface(intn status); -void H5P_term_interface(intn status); -void H5RA_term_interface(intn status); -void H5R_term_interface(intn status); -void H5S_term_interface(intn status); -void H5TB_term_interface(intn status); -void H5T_native_close(intn status); -void H5T_term_interface(intn status); -void H5Z_term_interface(intn status); +__DLL__ void H5A_term_interface(intn status); +__DLL__ void H5D_term_interface(intn status); +__DLL__ void H5F_term_interface(intn status); +__DLL__ void H5G_term_interface(intn status); +__DLL__ void H5I_term_interface(intn status); +__DLL__ void H5P_term_interface(intn status); +__DLL__ void H5RA_term_interface(intn status); +__DLL__ void H5R_term_interface(intn status); +__DLL__ void H5S_term_interface(intn status); +__DLL__ void H5TB_term_interface(intn status); +__DLL__ void H5T_native_close(intn status); +__DLL__ void H5T_term_interface(intn status); +__DLL__ void H5Z_term_interface(intn status); #endif -- cgit v0.12