mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-18 17:40:55 +08:00
[svn-r19847] Bug 1917: Big test failure
Removed all the unused code bracketed by #ifdef FSEEKO incorrectly. Tested: h5committest.
This commit is contained in:
parent
8c1b4bc3c7
commit
0e77cc6fa0
@ -130,14 +130,8 @@ typedef struct H5FD_stdio_t {
|
||||
|
||||
/* Use file_xxx to indicate these are local macros, avoiding confusing
|
||||
* with the global HD_xxx macros.
|
||||
* Need fseeko, off_t, ftell and ftruncate are all of the same 32 or 64
|
||||
* versions.
|
||||
* Assume fseeko, which is POSIX standard, is always supported;
|
||||
* but prefer to use fseeko64 if supported.
|
||||
* [Note: the ifndef H5_HAVE_FSEEKO condition to determine BIG FILE not
|
||||
* supported was old code. This condition is not supposed to be true in Unix
|
||||
* like systems but may happen in non-Unix systems like Windows. They are left
|
||||
* in for now and will be cleaned later. -AKC-]
|
||||
*/
|
||||
#ifndef file_fseek
|
||||
#ifdef H5_HAVE_FSEEKO64
|
||||
@ -175,11 +169,6 @@ typedef struct H5FD_stdio_t {
|
||||
#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
|
||||
HADDR_UNDEF==(A)+(Z) || (file_offset_t)((A)+(Z))<(file_offset_t)(A))
|
||||
|
||||
#ifndef H5_HAVE_FSEEKO
|
||||
/* Define big file as 2GB */
|
||||
#define BIG_FILE 0x80000000UL
|
||||
#endif
|
||||
|
||||
/* Prototypes */
|
||||
static H5FD_t *H5FD_stdio_open(const char *name, unsigned flags,
|
||||
hid_t fapl_id, haddr_t maxaddr);
|
||||
@ -587,9 +576,6 @@ H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxp
|
||||
{
|
||||
H5FD_stdio_t *file = (H5FD_stdio_t*)_file;
|
||||
haddr_t addr;
|
||||
#ifndef H5_HAVE_FSEEKO
|
||||
static const char *func = "H5FD_stdio_alloc"; /* Function Name for error reporting */
|
||||
#endif
|
||||
haddr_t ret_value; /* Return value */
|
||||
|
||||
/* Shut compiler up */
|
||||
@ -609,14 +595,6 @@ H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxp
|
||||
addr = ((addr / file->pub.alignment) + 1) * file->pub.alignment;
|
||||
} /* end if */
|
||||
|
||||
#if 0
|
||||
#ifndef H5_HAVE_FSEEKO
|
||||
/* If fseeko isn't available, big files (>2GB) won't be supported. */
|
||||
if((addr + size) > BIG_FILE)
|
||||
H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "can't write file bigger than 2GB because fseeko isn't available", HADDR_UNDEF)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
file->eoa = addr + size;
|
||||
|
||||
/* Set return value */
|
||||
|
Loading…
x
Reference in New Issue
Block a user