diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2001-07-03 16:00:17 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2001-07-03 16:00:17 (GMT) |
commit | d66d9f9218fa582aa2e373bf4fed1715b6a2b4ee (patch) | |
tree | b6b878ce3cbe1f045bb808da400425b98194ca8a | |
parent | d096777503bf2ff5162b649c109f976bb82edc26 (diff) | |
download | hdf5-d66d9f9218fa582aa2e373bf4fed1715b6a2b4ee.zip hdf5-d66d9f9218fa582aa2e373bf4fed1715b6a2b4ee.tar.gz hdf5-d66d9f9218fa582aa2e373bf4fed1715b6a2b4ee.tar.bz2 |
[svn-r4100]
Purpose
code warrior changes
:
Description:
moved some ifdefs
the type off_t was removed from H5private.h and put on H5Public.h
Metrowerks does not define this type, it was defined
Solution:
Platforms tested:
solaris (arabica), linux (eirene)+
-rw-r--r-- | src/H5FDstdio.c | 11 | ||||
-rw-r--r-- | src/H5Ppublic.h | 9 | ||||
-rw-r--r-- | src/H5Vprivate.h | 12 | ||||
-rw-r--r-- | src/H5private.h | 20 |
4 files changed, 38 insertions, 14 deletions
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 3ed0181..bbe7970 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -21,6 +21,17 @@ #include "hdf5.h" + + +#ifdef WIN32 +#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_MIPS_) && !defined(_X86_) && defined(_M_IX86) +#define _X86_ +#endif +#include <windef.h> +#include <winbase.h> +#include <io.h> +#endif + #ifdef MAX #undef MAX #endif /* MAX */ diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index 5b3731c..144e68d 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -28,6 +28,15 @@ #include "H5MMpublic.h" #include "H5Zpublic.h" + +/* Metroworks <sys/types.h> doesn't define off_t. */ +#ifdef __MWERKS__ +typedef long off_t; +/* Metroworks does not define EINTR in <errno.h> */ +# define EINTR 4 +#endif +/*__MWERKS__*/ + /* Property list classes */ typedef enum H5P_class_t { H5P_NO_CLASS = -1, /*error return value */ diff --git a/src/H5Vprivate.h b/src/H5Vprivate.h index 3f94536..73ecc34 100644 --- a/src/H5Vprivate.h +++ b/src/H5Vprivate.h @@ -95,7 +95,7 @@ __DLL__ hsize_t H5V_array_offset(uintn n, const hsize_t *total_size, * *------------------------------------------------------------------------- */ -static inline hsize_t UNUSED +static H5_inline hsize_t UNUSED H5V_vector_reduce_product(uintn n, const hsize_t *v) { size_t ans = 1; @@ -122,7 +122,7 @@ H5V_vector_reduce_product(uintn n, const hsize_t *v) * *------------------------------------------------------------------------- */ -static inline htri_t UNUSED +static H5_inline htri_t UNUSED H5V_vector_zerop_u(intn n, const hsize_t *v) { if (!v) return TRUE; @@ -149,7 +149,7 @@ H5V_vector_zerop_u(intn n, const hsize_t *v) * *------------------------------------------------------------------------- */ -static inline htri_t UNUSED +static H5_inline htri_t UNUSED H5V_vector_zerop_s(intn n, const hssize_t *v) { if (!v) return TRUE; @@ -178,7 +178,7 @@ H5V_vector_zerop_s(intn n, const hssize_t *v) * *------------------------------------------------------------------------- */ -static inline intn UNUSED +static H5_inline intn UNUSED H5V_vector_cmp_u (intn n, const hsize_t *v1, const hsize_t *v2) { if (v1 == v2) return 0; @@ -211,7 +211,7 @@ H5V_vector_cmp_u (intn n, const hsize_t *v1, const hsize_t *v2) * *------------------------------------------------------------------------- */ -static inline intn UNUSED +static H5_inline intn UNUSED H5V_vector_cmp_s (uintn n, const hssize_t *v1, const hssize_t *v2) { if (v1 == v2) return 0; @@ -239,7 +239,7 @@ H5V_vector_cmp_s (uintn n, const hssize_t *v1, const hssize_t *v2) * *------------------------------------------------------------------------- */ -static inline void UNUSED +static H5_inline void UNUSED H5V_vector_inc(intn n, hsize_t *v1, const hsize_t *v2) { while (n--) *v1++ += *v2++; diff --git a/src/H5private.h b/src/H5private.h index 0b1e3ff..72755a6 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -153,6 +153,7 @@ #include <windef.h> #include <winbase.h> +#include <io.h> /* H5_inline */ @@ -173,15 +174,8 @@ MS doesn't recognize it yet (as of April 2001) # define H5_inline #endif -/* Metroworks <sys/types.h> doesn't define off_t. */ -#ifdef __MWERKS__ -typedef long off_t; -/* Metroworks does not define EINTR in <errno.h> */ -# define EINTR 4 -#endif -/*__MWERKS__*/ -#endif +#endif /*WIN32*/ #ifndef F_OK @@ -757,7 +751,17 @@ __DLL__ int64_t HDstrtoll (const char *s, const char **rest, int base); #define HDwaitpid(P,W,O) waitpid(P,W,O) #define HDwcstombs(S,P,Z) wcstombs(S,P,Z) #define HDwctomb(S,C) wctomb(S,C) + + +#if defined (__MWERKS__) +/* workaround for a bug in the Metrowerks header file for write + which is not defined as const void* + pvn + */ +#define HDwrite(F,M,Z) write(F,(void*)M,Z) +#else #define HDwrite(F,M,Z) write(F,M,Z) +#endif /* * And now for a couple non-Posix functions... Watch out for systems that |