mirror of
https://github.com/curl/curl.git
synced 2025-04-12 16:20:35 +08:00
config: remove CURL_SIZEOF_CURL_OFF_T use only SIZEOF_CURL_OFF_T
Make the code consistently use a single name for the size of the "curl_off_t" type. Closes #6702
This commit is contained in:
parent
6043dfa4f9
commit
78f642ffab
@ -1360,7 +1360,7 @@ _add_if("brotli" HAVE_BROTLI)
|
||||
_add_if("zstd" HAVE_ZSTD)
|
||||
_add_if("AsynchDNS" USE_ARES OR USE_THREADS_POSIX OR USE_THREADS_WIN32)
|
||||
_add_if("IDN" HAVE_LIBIDN2)
|
||||
_add_if("Largefile" (CURL_SIZEOF_CURL_OFF_T GREATER 4) AND
|
||||
_add_if("Largefile" (SIZEOF_CURL_OFF_T GREATER 4) AND
|
||||
((SIZEOF_OFF_T GREATER 4) OR USE_WIN32_LARGE_FILES))
|
||||
# TODO SSP1 (Schannel) check is missing
|
||||
_add_if("SSPI" USE_WINDOWS_SSPI)
|
||||
|
@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@ -81,7 +81,7 @@ unsigned short Curl_read16_be(const unsigned char *buf)
|
||||
((unsigned short)buf[1]));
|
||||
}
|
||||
|
||||
#if (CURL_SIZEOF_CURL_OFF_T > 4)
|
||||
#if (SIZEOF_CURL_OFF_T > 4)
|
||||
/*
|
||||
* write32_le()
|
||||
*
|
||||
@ -121,4 +121,4 @@ void Curl_write64_le(const __int64 value, unsigned char *buffer)
|
||||
write32_le((int)value, buffer);
|
||||
write32_le((int)(value >> 32), buffer + 4);
|
||||
}
|
||||
#endif /* CURL_SIZEOF_CURL_OFF_T > 4 */
|
||||
#endif /* SIZEOF_CURL_OFF_T > 4 */
|
||||
|
@ -7,7 +7,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@ -31,7 +31,7 @@ unsigned int Curl_read32_le(const unsigned char *buf);
|
||||
/* Converts a 16-bit integer from big endian */
|
||||
unsigned short Curl_read16_be(const unsigned char *buf);
|
||||
|
||||
#if (CURL_SIZEOF_CURL_OFF_T > 4)
|
||||
#if (SIZEOF_CURL_OFF_T > 4)
|
||||
/* Converts a 64-bit integer to little endian */
|
||||
#if defined(HAVE_LONGLONG)
|
||||
void Curl_write64_le(const long long value, unsigned char *buffer);
|
||||
|
@ -590,7 +590,7 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash,
|
||||
|
||||
CURLcode result = CURLE_OK;
|
||||
|
||||
#if CURL_SIZEOF_CURL_OFF_T < 8
|
||||
#if SIZEOF_CURL_OFF_T < 8
|
||||
#error "this section needs 64bit support to work"
|
||||
#endif
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@ -56,7 +56,7 @@
|
||||
/* Define USE_NTLM_V2 in order to allow the type-3 message to include the
|
||||
LMv2 and NTLMv2 response messages, requires USE_NTRESPONSES defined to 1
|
||||
and support for 64-bit integers. */
|
||||
#if defined(USE_NTRESPONSES) && (CURL_SIZEOF_CURL_OFF_T > 4)
|
||||
#if defined(USE_NTRESPONSES) && (SIZEOF_CURL_OFF_T > 4)
|
||||
#define USE_NTLM_V2
|
||||
#endif
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@ -151,8 +151,6 @@
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#define CURL_SIZEOF_CURL_OFF_T SIZEOF_CURL_OFF_T
|
||||
|
||||
/*
|
||||
* Disable other protocols when http is the only one desired.
|
||||
*/
|
||||
@ -412,7 +410,7 @@
|
||||
#if (SIZEOF_CURL_OFF_T == 4)
|
||||
# define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFF)
|
||||
#else
|
||||
/* assume CURL_SIZEOF_CURL_OFF_T == 8 */
|
||||
/* assume SIZEOF_CURL_OFF_T == 8 */
|
||||
# define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFFFFFFFFFF)
|
||||
#endif
|
||||
#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - CURL_OFF_T_C(1))
|
||||
|
@ -85,7 +85,7 @@ static char *max5data(curl_off_t bytes, char *max5)
|
||||
CURL_FORMAT_CURL_OFF_T "M", bytes/ONE_MEGABYTE,
|
||||
(bytes%ONE_MEGABYTE) / (ONE_MEGABYTE/CURL_OFF_T_C(10)) );
|
||||
|
||||
#if (CURL_SIZEOF_CURL_OFF_T > 4)
|
||||
#if (SIZEOF_CURL_OFF_T > 4)
|
||||
|
||||
else if(bytes < CURL_OFF_T_C(10000) * ONE_MEGABYTE)
|
||||
/* 'XXXXM' is good until we're at 10000MB or above */
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "curl_setup.h"
|
||||
|
||||
#if !defined(CURL_DISABLE_SMB) && defined(USE_CURL_NTLM_CORE) && \
|
||||
(CURL_SIZEOF_CURL_OFF_T > 4)
|
||||
(SIZEOF_CURL_OFF_T > 4)
|
||||
|
||||
#define BUILDING_CURL_SMB_C
|
||||
|
||||
@ -1022,4 +1022,4 @@ static CURLcode smb_parse_url_path(struct Curl_easy *data,
|
||||
}
|
||||
|
||||
#endif /* CURL_DISABLE_SMB && USE_CURL_NTLM_CORE &&
|
||||
CURL_SIZEOF_CURL_OFF_T > 4 */
|
||||
SIZEOF_CURL_OFF_T > 4 */
|
||||
|
@ -8,7 +8,7 @@
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2014, Bill Nagel <wnagel@tycoint.com>, Exacq Technologies
|
||||
* Copyright (C) 2018 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 2018 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@ -244,12 +244,12 @@ struct smb_tree_disconnect {
|
||||
#endif /* BUILDING_CURL_SMB_C */
|
||||
|
||||
#if !defined(CURL_DISABLE_SMB) && defined(USE_CURL_NTLM_CORE) && \
|
||||
(CURL_SIZEOF_CURL_OFF_T > 4)
|
||||
(SIZEOF_CURL_OFF_T > 4)
|
||||
|
||||
extern const struct Curl_handler Curl_handler_smb;
|
||||
extern const struct Curl_handler Curl_handler_smbs;
|
||||
|
||||
#endif /* CURL_DISABLE_SMB && USE_CURL_NTLM_CORE &&
|
||||
CURL_SIZEOF_CURL_OFF_T > 4 */
|
||||
SIZEOF_CURL_OFF_T > 4 */
|
||||
|
||||
#endif /* HEADER_CURL_SMB_H */
|
||||
|
@ -234,7 +234,7 @@ static const struct Curl_handler * const protocols[] = {
|
||||
#endif
|
||||
|
||||
#if !defined(CURL_DISABLE_SMB) && defined(USE_CURL_NTLM_CORE) && \
|
||||
(CURL_SIZEOF_CURL_OFF_T > 4)
|
||||
(SIZEOF_CURL_OFF_T > 4)
|
||||
&Curl_handler_smb,
|
||||
#ifdef USE_SSL
|
||||
&Curl_handler_smbs,
|
||||
|
@ -334,7 +334,7 @@ static const char * const protocols[] = {
|
||||
"sftp",
|
||||
#endif
|
||||
#if !defined(CURL_DISABLE_SMB) && defined(USE_CURL_NTLM_CORE) && \
|
||||
(CURL_SIZEOF_CURL_OFF_T > 4)
|
||||
(SIZEOF_CURL_OFF_T > 4)
|
||||
"smb",
|
||||
# ifdef USE_SSL
|
||||
"smbs",
|
||||
@ -399,7 +399,7 @@ static curl_version_info_data version_info = {
|
||||
#ifdef CURLRES_ASYNCH
|
||||
| CURL_VERSION_ASYNCHDNS
|
||||
#endif
|
||||
#if (CURL_SIZEOF_CURL_OFF_T > 4) && \
|
||||
#if (SIZEOF_CURL_OFF_T > 4) && \
|
||||
( (SIZEOF_OFF_T > 4) || defined(USE_WIN32_LARGE_FILES) )
|
||||
| CURL_VERSION_LARGEFILE
|
||||
#endif
|
||||
|
@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@ -117,7 +117,7 @@ static void fly(struct ProgressData *bar, bool moved)
|
||||
#if (SIZEOF_CURL_OFF_T == 4)
|
||||
# define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFF)
|
||||
#else
|
||||
/* assume CURL_SIZEOF_CURL_OFF_T == 8 */
|
||||
/* assume SIZEOF_CURL_OFF_T == 8 */
|
||||
# define CURL_OFF_T_MAX CURL_OFF_T_C(0x7FFFFFFFFFFFFFFF)
|
||||
#endif
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@ -48,7 +48,7 @@ int tool_seek_cb(void *userdata, curl_off_t offset, int whence)
|
||||
{
|
||||
struct InStruct *in = userdata;
|
||||
|
||||
#if(CURL_SIZEOF_CURL_OFF_T > SIZEOF_OFF_T) && !defined(USE_WIN32_LARGE_FILES)
|
||||
#if(SIZEOF_CURL_OFF_T > SIZEOF_OFF_T) && !defined(USE_WIN32_LARGE_FILES)
|
||||
|
||||
/* The offset check following here is only interesting if curl_off_t is
|
||||
larger than off_t and we are not using the WIN32 large file support
|
||||
|
@ -5,7 +5,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@ -51,7 +51,7 @@ static char *max5data(curl_off_t bytes, char *max5)
|
||||
CURL_FORMAT_CURL_OFF_T "M", bytes/ONE_MEGABYTE,
|
||||
(bytes%ONE_MEGABYTE) / (ONE_MEGABYTE/CURL_OFF_T_C(10)) );
|
||||
|
||||
#if (CURL_SIZEOF_CURL_OFF_T > 4)
|
||||
#if (SIZEOF_CURL_OFF_T > 4)
|
||||
|
||||
else if(bytes < CURL_OFF_T_C(10000) * ONE_MEGABYTE)
|
||||
/* 'XXXXM' is good until we're at 10000MB or above */
|
||||
|
Loading…
x
Reference in New Issue
Block a user