build: use _fseeki64() on Windows, drop detections
A recent update caused CMake builds to mis-detect this symbol on iOS. Auto-detection also seems redundant given that it's a Windows-only function and most Windows builds were already opted-in. Drop detections and use it in all Windows builds with large file support enabled. Feature history: - pririotizing for Windows:aaacd02466#14678 - Windows opt-in cmake:8e74c0729d#11950 - Windows opt-in:aa6c94c5bf#11944 - use in libcurl:9c7165e96a#11918 - use in example:817d1c0106Regression from8e34505776#15164 Reported-by: Maarten Billemont Fixes #15525 Closes #15526
This commit is contained in:
parent
b723f6a445
commit
8b76a8aeb2
@ -148,7 +148,6 @@ set(HAVE_TERMIO_H 0)
|
||||
set(HAVE_LINUX_TCP_H 0)
|
||||
|
||||
set(HAVE_FSEEKO 0) # mingw-w64 2.0.0 and newer has it
|
||||
set(HAVE__FSEEKI64 1)
|
||||
set(HAVE_SOCKET 1)
|
||||
set(HAVE_SELECT 1)
|
||||
set(HAVE_STRDUP 1)
|
||||
|
||||
@ -1570,7 +1570,6 @@ check_symbol_exists("freeaddrinfo" "${CURL_INCLUDES}" HAVE_FREEADDRINFO) # w
|
||||
check_function_exists("pipe" HAVE_PIPE)
|
||||
check_function_exists("eventfd" HAVE_EVENTFD)
|
||||
check_symbol_exists("ftruncate" "unistd.h" HAVE_FTRUNCATE)
|
||||
check_function_exists("_fseeki64" HAVE__FSEEKI64)
|
||||
check_symbol_exists("getpeername" "${CURL_INCLUDES}" HAVE_GETPEERNAME) # winsock2.h unistd.h proto/bsdsocket.h
|
||||
check_symbol_exists("getsockname" "${CURL_INCLUDES}" HAVE_GETSOCKNAME) # winsock2.h unistd.h proto/bsdsocket.h
|
||||
check_function_exists("if_nametoindex" HAVE_IF_NAMETOINDEX) # winsock2.h net/if.h
|
||||
|
||||
@ -4100,7 +4100,6 @@ AC_CHECK_DECLS([getpwuid_r], [], [AC_DEFINE(HAVE_DECL_GETPWUID_R_MISSING, 1, "Se
|
||||
#include <sys/types.h>]])
|
||||
|
||||
AC_CHECK_FUNCS([\
|
||||
_fseeki64 \
|
||||
eventfd \
|
||||
fnmatch \
|
||||
geteuid \
|
||||
|
||||
@ -427,10 +427,6 @@ Vista
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_WIN32_LARGE_FILES
|
||||
#define HAVE__FSEEKI64
|
||||
#endif
|
||||
|
||||
/* Define to the size of `off_t', as computed by sizeof. */
|
||||
#if defined(__MINGW32__) && \
|
||||
defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
|
||||
|
||||
@ -246,9 +246,6 @@
|
||||
/* Define to 1 if you have the fseeko declaration. */
|
||||
#cmakedefine HAVE_DECL_FSEEKO 1
|
||||
|
||||
/* Define to 1 if you have the _fseeki64 function. */
|
||||
#cmakedefine HAVE__FSEEKI64 1
|
||||
|
||||
/* Define to 1 if you have the ftruncate function. */
|
||||
#cmakedefine HAVE_FTRUNCATE 1
|
||||
|
||||
|
||||
@ -793,7 +793,7 @@ static CURLcode setname(curl_mimepart *part, const char *name, size_t len)
|
||||
/* wrap call to fseeko so it matches the calling convention of callback */
|
||||
static int fseeko_wrapper(void *stream, curl_off_t offset, int whence)
|
||||
{
|
||||
#if defined(HAVE__FSEEKI64)
|
||||
#if defined(_WIN32) && defined(USE_WIN32_LARGE_FILES)
|
||||
return _fseeki64(stream, (__int64)offset, whence);
|
||||
#elif defined(HAVE_FSEEKO) && defined(HAVE_DECL_FSEEKO)
|
||||
return fseeko(stream, (off_t)offset, whence);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user