diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-06-16 04:27:11 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-06-16 04:27:11 (GMT) |
commit | 7a50d822778f339e14b355aedd4aeafac03704b9 (patch) | |
tree | 95c9182290e377c81b15e25f5634d43c38958a7a /src | |
parent | 437d2abde96017df00abc7ee74d58ad033055b13 (diff) | |
download | hdf5-7a50d822778f339e14b355aedd4aeafac03704b9.zip hdf5-7a50d822778f339e14b355aedd4aeafac03704b9.tar.gz hdf5-7a50d822778f339e14b355aedd4aeafac03704b9.tar.bz2 |
[svn-r4010] Purpose:
Bug Fix
Description:
uint64_t type was accidentally taken out and was causing tests on DEC
UNIX to fail.
Solution:
Brought back uint64_t type.
Also cleaned up some comments and moved the sec2 specific macros back
into the sec2 (and log) driver.
Platforms tested:
DEC UNIX (gondolin)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FDlog.c | 30 | ||||
-rw-r--r-- | src/H5FDsec2.c | 30 | ||||
-rw-r--r-- | src/H5private.h | 68 |
3 files changed, 80 insertions, 48 deletions
diff --git a/src/H5FDlog.c b/src/H5FDlog.c index 4f64f09..ba16810 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -105,6 +105,36 @@ typedef struct H5FD_log_t { } H5FD_log_t; +/* + * This driver supports systems that have the lseek64() function by defining + * some macros here so we don't have to have conditional compilations later + * throughout the code. + * + * file_offset_t: The datatype for file offsets, the second argument of + * the lseek() or lseek64() call. + * + * file_seek: The function which adjusts the current file position, + * either lseek() or lseek64(). + */ +/* adding for windows NT file system support. */ +/* pvn: added __MWERKS__ support. */ + +#ifdef H5_HAVE_LSEEK64 +# define file_offset_t off64_t +# define file_seek lseek64 +#elif defined (WIN32) +# ifdef __MWERKS__ +# define file_offset_t off_t +# define file_seek lseek +# else /*MSVC*/ +# define file_offset_t __int64 +# define file_seek _lseeki64 +# endif +#else +# define file_offset_t off_t +# define file_seek lseek +#endif + /* * These macros check for overflow of various quantities. These macros diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index edd198c..2cfa24e 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -75,7 +75,35 @@ typedef struct H5FD_sec2_t { #endif } H5FD_sec2_t; - +/* + * This driver supports systems that have the lseek64() function by defining + * some macros here so we don't have to have conditional compilations later + * throughout the code. + * + * file_offset_t: The datatype for file offsets, the second argument of + * the lseek() or lseek64() call. + * + * file_seek: The function which adjusts the current file position, + * either lseek() or lseek64(). + */ +/* adding for windows NT file system support. */ +/* pvn: added __MWERKS__ support. */ + +#ifdef H5_HAVE_LSEEK64 +# define file_offset_t off64_t +# define file_seek lseek64 +#elif defined (WIN32) +# ifdef __MWERKS__ +# define file_offset_t off_t +# define file_seek lseek +# else /*MSVC*/ +# define file_offset_t __int64 +# define file_seek _lseeki64 +# endif +#else +# define file_offset_t off_t +# define file_seek lseek +#endif /* diff --git a/src/H5private.h b/src/H5private.h index 912ef5c..b9f1156 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -10,9 +10,6 @@ * The configuration constants like H5_HAVE_UNISTD_H etc. are * defined in H5config.h which is included by H5public.h. * - * Modifications: - * Pedro Vicente <pvn@ncsa.uiuc.edu>, June 2001 - * WIN32 modifications */ #ifndef _H5private_H #define _H5private_H @@ -160,7 +157,7 @@ #endif /* -sintax: +syntax: inline function_declarator; // C++ Specific __inline function_declarator; // Microsoft Specific @@ -174,56 +171,16 @@ MS doesn't recognize it yet (as of April 2001) # define H5_inline inline # else # define H5_inline -#endif -/*__MWERKS__*/ - - +#endif /*__MWERKS__*/ /* 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 -/*WIN32*/ - - - -/* - * This driver supports systems that have the lseek64() function by defining - * some macros here so we don't have to have conditional compilations later - * throughout the code. - * - * file_offset_t: The datatype for file offsets, the second argument of - * the lseek() or lseek64() call. - * - * file_seek: The function which adjusts the current file position, - * either lseek() or lseek64(). - */ -/* adding for windows NT file system support. */ -/* pvn: added __MWERKS__ support. */ - -#ifdef H5_HAVE_LSEEK64 -# define file_offset_t off64_t -# define file_seek lseek64 -#elif defined (WIN32) -# ifdef __MWERKS__ -# define file_offset_t off_t -# define file_seek lseek -# else /*MSVC*/ -# define file_offset_t __int64 -# define file_seek _lseeki64 -# endif -#else -# define file_offset_t off_t -# define file_seek lseek -#endif - +#endif /*__MWERKS__*/ +#endif /*WIN32*/ #ifndef F_OK # define F_OK 00 @@ -454,6 +411,23 @@ typedef long off_t; # error "nothing appropriate for int64_t" #endif +#if SIZEOF_UINT64_T>=8 +#elif SIZEOF_INT>=8 + typedef unsigned uint64_t; +# undef SIZEOF_UINT64_T +# define SIZEOF_UINT64_T SIZEOF_INT +#elif SIZEOF_LONG>=8 + typedef unsigned long uint64_t; +# undef SIZEOF_UINT64_T +# define SIZEOF_UINT64_T SIZEOF_LONG +#elif SIZEOF_LONG_LONG>=8 + typedef unsigned long_long uint64_t; +# undef SIZEOF_UINT64_T +# define SIZEOF_UINT64_T SIZEOF_LONG_LONG +#else +# error "nothing appropriate for uint64_t" +#endif + /* * Define a type for generic integers. Use this instead of `int' to * show that some thought went into the algorithm. |