mirror of
https://github.com/curl/curl.git
synced 2025-01-12 13:55:11 +08:00
curl_setup.h: add curl_uint64_t internal type
The unsigned version of curl_off_t basically
This commit is contained in:
parent
ab027d9cbc
commit
30a3880f6b
@ -266,6 +266,13 @@
|
||||
|
||||
#include <curl/system.h>
|
||||
|
||||
/* Helper macro to expand and concatenate two macros.
|
||||
* Direct macros concatenation does not work because macros
|
||||
* are not expanded before direct concatenation.
|
||||
*/
|
||||
#define CURL_CONC_MACROS_(A,B) A ## B
|
||||
#define CURL_CONC_MACROS(A,B) CURL_CONC_MACROS_(A,B)
|
||||
|
||||
/* curl uses its own printf() function internally. It understands the GNU
|
||||
* format. Use this format, so that is matches the GNU format attribute we
|
||||
* use with the mingw compiler, allowing it to verify them at compile-time.
|
||||
@ -495,6 +502,18 @@
|
||||
#endif
|
||||
#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - CURL_OFF_T_C(1))
|
||||
|
||||
#if (SIZEOF_CURL_OFF_T != 8)
|
||||
# error "curl_off_t must be exactly 64 bits"
|
||||
#else
|
||||
typedef unsigned CURL_TYPEOF_CURL_OFF_T curl_uint64_t;
|
||||
# ifndef CURL_SUFFIX_CURL_OFF_TU
|
||||
# error "CURL_SUFFIX_CURL_OFF_TU must be defined"
|
||||
# endif
|
||||
# define CURL_UINT64_SUFFIX CURL_SUFFIX_CURL_OFF_TU
|
||||
# define CURL_UINT64_C(val) CURL_CONC_MACROS(val,CURL_UINT64_SUFFIX)
|
||||
# define CURL_UINT64_CAST(expr) ((curl_uint64_t)(expr))
|
||||
#endif
|
||||
|
||||
#if (SIZEOF_TIME_T == 4)
|
||||
# ifdef HAVE_TIME_T_UNSIGNED
|
||||
# define TIME_T_MAX UINT_MAX
|
||||
|
Loading…
Reference in New Issue
Block a user