mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
Added a check for _filelengthi64 in configuration. When found, this will be used instead of fstat when computing file length.
This commit is contained in:
parent
bda59030cb
commit
5566cbb772
@ -865,7 +865,7 @@ CHECK_FUNCTION_EXISTS(getpagesize HAVE_GETPAGESIZE)
|
||||
CHECK_FUNCTION_EXISTS(sysconf HAVE_SYSCONF)
|
||||
CHECK_FUNCTION_EXISTS(mremap HAVE_MREMAP)
|
||||
CHECK_FUNCTION_EXISTS(getrlimit HAVE_GETRLIMIT)
|
||||
|
||||
CHECK_FUNCTION_EXISTS(_filelengthi64 HAVE_FILE_LENGTH_I64)
|
||||
|
||||
#####
|
||||
# End system inspection checks.
|
||||
|
@ -197,6 +197,9 @@ are set when opening a binary file on Windows. */
|
||||
/* Define to 1 if you have the BaseTsd.h header file. */
|
||||
#cmakedefine HAVE_BASETSD_H @HAVE_BASETSD_H@
|
||||
|
||||
/* Define if we have filelengthi64. */
|
||||
#cmakedefine HAVE_FILE_LENGTH_I64 @HAVE_FILE_LENGTH_I64@
|
||||
|
||||
/* The size of `double` as computed by sizeof. */
|
||||
#cmakedefine SIZEOF_DOUBLE @SIZEOF_DOUBLE@
|
||||
/* The size of `float` as computed by sizeof. */
|
||||
|
@ -1732,7 +1732,7 @@ ncio_px_filesize(ncio *nciop, off_t *filesizep)
|
||||
/* There is a problem with fstat on Windows based systems
|
||||
which manifests (so far) when Config RELEASE is built.
|
||||
Use _filelengthi64 isntead. */
|
||||
#ifdef _MSC_VER
|
||||
#ifdef HAVE_FILE_LENGTH_I64
|
||||
|
||||
__int64 file_len = 0;
|
||||
if( (file_len = _filelengthi64(nciop->fd)) < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user