mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
For congruency sake with the naming of other CURL_XXXXXX_CURL_OFF_T macros,
the names of the curl_off_t formatting string directives now become CURL_FORMAT_CURL_OFF_T and CURL_FORMAT_CURL_OFF_TU. CURL_FMT_OFF_T -> CURL_FORMAT_CURL_OFF_T CURL_FMT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU Remove the use of an internal name for the curl_off_t formatting string directives and use the common one available from the inside and outside of the library. FORMAT_OFF_T -> CURL_FORMAT_CURL_OFF_T FORMAT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU
This commit is contained in:
parent
11cb78c5f8
commit
66fb9ca5f6
6
CHANGES
6
CHANGES
@ -6,6 +6,12 @@
|
|||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
Yang Tse (15 Aug 2008)
|
||||||
|
- C preprocessor macros used internally and equally available externally which
|
||||||
|
aid in the use of the curl_off_t data type are named: CURL_FORMAT_CURL_OFF_T,
|
||||||
|
CURL_FORMAT_CURL_OFF_TU, CURL_SIZEOF_CURL_OFF_T, CURL_SUFFIX_CURL_OFF_T,
|
||||||
|
CURL_SUFFIX_CURL_OFF_TU, CURL_OFF_T_C and CURL_OFF_TU_C.
|
||||||
|
|
||||||
Yang Tse (13 Aug 2008)
|
Yang Tse (13 Aug 2008)
|
||||||
- The size of long is a build time characteristic and as such it is now recorded
|
- The size of long is a build time characteristic and as such it is now recorded
|
||||||
in curlbuild.h as CURL_SIZEOF_LONG. Definition now done from configure process
|
in curlbuild.h as CURL_SIZEOF_LONG. Definition now done from configure process
|
||||||
|
@ -3886,8 +3886,8 @@ AC_DEFUN([CURL_CONFIGURE_CURL_OFF_T], [
|
|||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
CURL_DEFINE_UNQUOTED([CURL_OFF_T], [$x_typeof])
|
CURL_DEFINE_UNQUOTED([CURL_OFF_T], [$x_typeof])
|
||||||
CURL_DEFINE_UNQUOTED([CURL_FMT_OFF_T], ["$x_format"])
|
CURL_DEFINE_UNQUOTED([CURL_FORMAT_CURL_OFF_T], ["$x_format"])
|
||||||
CURL_DEFINE_UNQUOTED([CURL_FMT_OFF_TU], ["$u_format"])
|
CURL_DEFINE_UNQUOTED([CURL_FORMAT_CURL_OFF_TU], ["$u_format"])
|
||||||
CURL_DEFINE_UNQUOTED([CURL_FORMAT_OFF_T], ["%$x_format"])
|
CURL_DEFINE_UNQUOTED([CURL_FORMAT_OFF_T], ["%$x_format"])
|
||||||
CURL_DEFINE_UNQUOTED([CURL_SIZEOF_CURL_OFF_T], [$x_sizeof])
|
CURL_DEFINE_UNQUOTED([CURL_SIZEOF_CURL_OFF_T], [$x_sizeof])
|
||||||
CURL_DEFINE_UNQUOTED([CURL_SUFFIX_CURL_OFF_T], [$curl_suffix_curl_off_t])
|
CURL_DEFINE_UNQUOTED([CURL_SUFFIX_CURL_OFF_T], [$curl_suffix_curl_off_t])
|
||||||
|
@ -114,14 +114,14 @@
|
|||||||
Error Compilation_aborted_CURL_OFF_T_already_defined
|
Error Compilation_aborted_CURL_OFF_T_already_defined
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CURL_FMT_OFF_T
|
#ifdef CURL_FORMAT_CURL_OFF_T
|
||||||
# error "CURL_FMT_OFF_T shall not be defined except in curlbuild.h"
|
# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
|
||||||
Error Compilation_aborted_CURL_FMT_OFF_T_already_defined
|
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CURL_FMT_OFF_TU
|
#ifdef CURL_FORMAT_CURL_OFF_TU
|
||||||
# error "CURL_FMT_OFF_TU shall not be defined except in curlbuild.h"
|
# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
|
||||||
Error Compilation_aborted_CURL_FMT_OFF_TU_already_defined
|
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CURL_FORMAT_OFF_T
|
#ifdef CURL_FORMAT_OFF_T
|
||||||
@ -141,8 +141,8 @@
|
|||||||
#if defined(__DJGPP__)
|
#if defined(__DJGPP__)
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T long
|
# define CURL_OFF_T long
|
||||||
# define CURL_FMT_OFF_T "ld"
|
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||||
# define CURL_FMT_OFF_TU "lu"
|
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||||
# define CURL_FORMAT_OFF_T "%ld"
|
# define CURL_FORMAT_OFF_T "%ld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||||
# define CURL_SUFFIX_CURL_OFF_T L
|
# define CURL_SUFFIX_CURL_OFF_T L
|
||||||
@ -151,8 +151,8 @@
|
|||||||
#elif defined(__SALFORDC__)
|
#elif defined(__SALFORDC__)
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T long
|
# define CURL_OFF_T long
|
||||||
# define CURL_FMT_OFF_T "ld"
|
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||||
# define CURL_FMT_OFF_TU "lu"
|
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||||
# define CURL_FORMAT_OFF_T "%ld"
|
# define CURL_FORMAT_OFF_T "%ld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||||
# define CURL_SUFFIX_CURL_OFF_T L
|
# define CURL_SUFFIX_CURL_OFF_T L
|
||||||
@ -162,8 +162,8 @@
|
|||||||
# if (__BORLANDC__ < 0x520)
|
# if (__BORLANDC__ < 0x520)
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T long
|
# define CURL_OFF_T long
|
||||||
# define CURL_FMT_OFF_T "ld"
|
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||||
# define CURL_FMT_OFF_TU "lu"
|
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||||
# define CURL_FORMAT_OFF_T "%ld"
|
# define CURL_FORMAT_OFF_T "%ld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||||
# define CURL_SUFFIX_CURL_OFF_T L
|
# define CURL_SUFFIX_CURL_OFF_T L
|
||||||
@ -171,8 +171,8 @@
|
|||||||
# else
|
# else
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T __int64
|
# define CURL_OFF_T __int64
|
||||||
# define CURL_FMT_OFF_T "I64d"
|
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
||||||
# define CURL_FMT_OFF_TU "I64u"
|
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
||||||
# define CURL_FORMAT_OFF_T "%I64d"
|
# define CURL_FORMAT_OFF_T "%I64d"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T i64
|
# define CURL_SUFFIX_CURL_OFF_T i64
|
||||||
@ -182,8 +182,8 @@
|
|||||||
#elif defined(__TURBOC__)
|
#elif defined(__TURBOC__)
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T long
|
# define CURL_OFF_T long
|
||||||
# define CURL_FMT_OFF_T "ld"
|
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||||
# define CURL_FMT_OFF_TU "lu"
|
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||||
# define CURL_FORMAT_OFF_T "%ld"
|
# define CURL_FORMAT_OFF_T "%ld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||||
# define CURL_SUFFIX_CURL_OFF_T L
|
# define CURL_SUFFIX_CURL_OFF_T L
|
||||||
@ -193,8 +193,8 @@
|
|||||||
# if defined(__386__)
|
# if defined(__386__)
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T __int64
|
# define CURL_OFF_T __int64
|
||||||
# define CURL_FMT_OFF_T "I64d"
|
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
||||||
# define CURL_FMT_OFF_TU "I64u"
|
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
||||||
# define CURL_FORMAT_OFF_T "%I64d"
|
# define CURL_FORMAT_OFF_T "%I64d"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T i64
|
# define CURL_SUFFIX_CURL_OFF_T i64
|
||||||
@ -202,8 +202,8 @@
|
|||||||
# else
|
# else
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T long
|
# define CURL_OFF_T long
|
||||||
# define CURL_FMT_OFF_T "ld"
|
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||||
# define CURL_FMT_OFF_TU "lu"
|
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||||
# define CURL_FORMAT_OFF_T "%ld"
|
# define CURL_FORMAT_OFF_T "%ld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||||
# define CURL_SUFFIX_CURL_OFF_T L
|
# define CURL_SUFFIX_CURL_OFF_T L
|
||||||
@ -214,8 +214,8 @@
|
|||||||
# if (__POCC__ < 280)
|
# if (__POCC__ < 280)
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T long
|
# define CURL_OFF_T long
|
||||||
# define CURL_FMT_OFF_T "ld"
|
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||||
# define CURL_FMT_OFF_TU "lu"
|
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||||
# define CURL_FORMAT_OFF_T "%ld"
|
# define CURL_FORMAT_OFF_T "%ld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||||
# define CURL_SUFFIX_CURL_OFF_T L
|
# define CURL_SUFFIX_CURL_OFF_T L
|
||||||
@ -223,8 +223,8 @@
|
|||||||
# elif defined(_MSC_VER)
|
# elif defined(_MSC_VER)
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T __int64
|
# define CURL_OFF_T __int64
|
||||||
# define CURL_FMT_OFF_T "I64d"
|
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
||||||
# define CURL_FMT_OFF_TU "I64u"
|
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
||||||
# define CURL_FORMAT_OFF_T "%I64d"
|
# define CURL_FORMAT_OFF_T "%I64d"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T i64
|
# define CURL_SUFFIX_CURL_OFF_T i64
|
||||||
@ -232,8 +232,8 @@
|
|||||||
# else
|
# else
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T long long
|
# define CURL_OFF_T long long
|
||||||
# define CURL_FMT_OFF_T "lld"
|
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||||
# define CURL_FMT_OFF_TU "llu"
|
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||||
# define CURL_FORMAT_OFF_T "%lld"
|
# define CURL_FORMAT_OFF_T "%lld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||||
@ -243,8 +243,8 @@
|
|||||||
#elif defined(__LCC__)
|
#elif defined(__LCC__)
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T long
|
# define CURL_OFF_T long
|
||||||
# define CURL_FMT_OFF_T "ld"
|
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||||
# define CURL_FMT_OFF_TU "lu"
|
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||||
# define CURL_FORMAT_OFF_T "%ld"
|
# define CURL_FORMAT_OFF_T "%ld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||||
# define CURL_SUFFIX_CURL_OFF_T L
|
# define CURL_SUFFIX_CURL_OFF_T L
|
||||||
@ -254,8 +254,8 @@
|
|||||||
# if defined(__GCC32__)
|
# if defined(__GCC32__)
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T long long
|
# define CURL_OFF_T long long
|
||||||
# define CURL_FMT_OFF_T "lld"
|
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||||
# define CURL_FMT_OFF_TU "llu"
|
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||||
# define CURL_FORMAT_OFF_T "%lld"
|
# define CURL_FORMAT_OFF_T "%lld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||||
@ -264,8 +264,8 @@
|
|||||||
# pragma longlong on
|
# pragma longlong on
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T long long
|
# define CURL_OFF_T long long
|
||||||
# define CURL_FMT_OFF_T "lld"
|
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||||
# define CURL_FMT_OFF_TU "llu"
|
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||||
# define CURL_FORMAT_OFF_T "%lld"
|
# define CURL_FORMAT_OFF_T "%lld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||||
@ -273,8 +273,8 @@
|
|||||||
# elif defined(__VC32__)
|
# elif defined(__VC32__)
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T __int64
|
# define CURL_OFF_T __int64
|
||||||
# define CURL_FMT_OFF_T "lld"
|
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||||
# define CURL_FMT_OFF_TU "llu"
|
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||||
# define CURL_FORMAT_OFF_T "%lld"
|
# define CURL_FORMAT_OFF_T "%lld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||||
@ -284,8 +284,8 @@
|
|||||||
#elif defined(__MWERKS__)
|
#elif defined(__MWERKS__)
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T long long
|
# define CURL_OFF_T long long
|
||||||
# define CURL_FMT_OFF_T "lld"
|
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||||
# define CURL_FMT_OFF_TU "llu"
|
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||||
# define CURL_FORMAT_OFF_T "%lld"
|
# define CURL_FORMAT_OFF_T "%lld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||||
@ -294,8 +294,8 @@
|
|||||||
#elif defined(_WIN32_WCE)
|
#elif defined(_WIN32_WCE)
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T __int64
|
# define CURL_OFF_T __int64
|
||||||
# define CURL_FMT_OFF_T "I64d"
|
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
||||||
# define CURL_FMT_OFF_TU "I64u"
|
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
||||||
# define CURL_FORMAT_OFF_T "%I64d"
|
# define CURL_FORMAT_OFF_T "%I64d"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T i64
|
# define CURL_SUFFIX_CURL_OFF_T i64
|
||||||
@ -304,8 +304,8 @@
|
|||||||
#elif defined(__MINGW32__)
|
#elif defined(__MINGW32__)
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T long long
|
# define CURL_OFF_T long long
|
||||||
# define CURL_FMT_OFF_T "I64d"
|
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
||||||
# define CURL_FMT_OFF_TU "I64u"
|
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
||||||
# define CURL_FORMAT_OFF_T "%I64d"
|
# define CURL_FORMAT_OFF_T "%I64d"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||||
@ -315,8 +315,8 @@
|
|||||||
# if defined(__alpha) || defined(__ia64)
|
# if defined(__alpha) || defined(__ia64)
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T long long
|
# define CURL_OFF_T long long
|
||||||
# define CURL_FMT_OFF_T "lld"
|
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||||
# define CURL_FMT_OFF_TU "llu"
|
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||||
# define CURL_FORMAT_OFF_T "%lld"
|
# define CURL_FORMAT_OFF_T "%lld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||||
@ -324,8 +324,8 @@
|
|||||||
# else
|
# else
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T long
|
# define CURL_OFF_T long
|
||||||
# define CURL_FMT_OFF_T "ld"
|
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||||
# define CURL_FMT_OFF_TU "lu"
|
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||||
# define CURL_FORMAT_OFF_T "%ld"
|
# define CURL_FORMAT_OFF_T "%ld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||||
# define CURL_SUFFIX_CURL_OFF_T L
|
# define CURL_SUFFIX_CURL_OFF_T L
|
||||||
@ -336,8 +336,8 @@
|
|||||||
# if defined(__ILEC400__)
|
# if defined(__ILEC400__)
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T long long
|
# define CURL_OFF_T long long
|
||||||
# define CURL_FMT_OFF_T "lld"
|
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||||
# define CURL_FMT_OFF_TU "llu"
|
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||||
# define CURL_FORMAT_OFF_T "%lld"
|
# define CURL_FORMAT_OFF_T "%lld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||||
@ -353,24 +353,24 @@
|
|||||||
# endif
|
# endif
|
||||||
# if defined(_LONG_LONG)
|
# if defined(_LONG_LONG)
|
||||||
# define CURL_OFF_T long long
|
# define CURL_OFF_T long long
|
||||||
# define CURL_FMT_OFF_T "lld"
|
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||||
# define CURL_FMT_OFF_TU "llu"
|
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||||
# define CURL_FORMAT_OFF_T "%lld"
|
# define CURL_FORMAT_OFF_T "%lld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||||
# elif defined(_LP64)
|
# elif defined(_LP64)
|
||||||
# define CURL_OFF_T long
|
# define CURL_OFF_T long
|
||||||
# define CURL_FMT_OFF_T "ld"
|
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||||
# define CURL_FMT_OFF_TU "lu"
|
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||||
# define CURL_FORMAT_OFF_T "%ld"
|
# define CURL_FORMAT_OFF_T "%ld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T L
|
# define CURL_SUFFIX_CURL_OFF_T L
|
||||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||||
# else
|
# else
|
||||||
# define CURL_OFF_T long
|
# define CURL_OFF_T long
|
||||||
# define CURL_FMT_OFF_T "ld"
|
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||||
# define CURL_FMT_OFF_TU "lu"
|
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||||
# define CURL_FORMAT_OFF_T "%ld"
|
# define CURL_FORMAT_OFF_T "%ld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||||
# define CURL_SUFFIX_CURL_OFF_T L
|
# define CURL_SUFFIX_CURL_OFF_T L
|
||||||
@ -387,24 +387,24 @@
|
|||||||
# endif
|
# endif
|
||||||
# if defined(_LONG_LONG)
|
# if defined(_LONG_LONG)
|
||||||
# define CURL_OFF_T long long
|
# define CURL_OFF_T long long
|
||||||
# define CURL_FMT_OFF_T "lld"
|
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||||
# define CURL_FMT_OFF_TU "llu"
|
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||||
# define CURL_FORMAT_OFF_T "%lld"
|
# define CURL_FORMAT_OFF_T "%lld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||||
# elif defined(_LP64)
|
# elif defined(_LP64)
|
||||||
# define CURL_OFF_T long
|
# define CURL_OFF_T long
|
||||||
# define CURL_FMT_OFF_T "ld"
|
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||||
# define CURL_FMT_OFF_TU "lu"
|
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||||
# define CURL_FORMAT_OFF_T "%ld"
|
# define CURL_FORMAT_OFF_T "%ld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T L
|
# define CURL_SUFFIX_CURL_OFF_T L
|
||||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||||
# else
|
# else
|
||||||
# define CURL_OFF_T long
|
# define CURL_OFF_T long
|
||||||
# define CURL_FMT_OFF_T "ld"
|
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||||
# define CURL_FMT_OFF_TU "lu"
|
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||||
# define CURL_FORMAT_OFF_T "%ld"
|
# define CURL_FORMAT_OFF_T "%ld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||||
# define CURL_SUFFIX_CURL_OFF_T L
|
# define CURL_SUFFIX_CURL_OFF_T L
|
||||||
@ -420,8 +420,8 @@
|
|||||||
# if (_MSC_VER >= 900)
|
# if (_MSC_VER >= 900)
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T __int64
|
# define CURL_OFF_T __int64
|
||||||
# define CURL_FMT_OFF_T "I64d"
|
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
||||||
# define CURL_FMT_OFF_TU "I64u"
|
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
||||||
# define CURL_FORMAT_OFF_T "%I64d"
|
# define CURL_FORMAT_OFF_T "%I64d"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T i64
|
# define CURL_SUFFIX_CURL_OFF_T i64
|
||||||
@ -429,8 +429,8 @@
|
|||||||
# else
|
# else
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T long
|
# define CURL_OFF_T long
|
||||||
# define CURL_FMT_OFF_T "ld"
|
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||||
# define CURL_FMT_OFF_TU "lu"
|
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||||
# define CURL_FORMAT_OFF_T "%ld"
|
# define CURL_FORMAT_OFF_T "%ld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 4
|
# define CURL_SIZEOF_CURL_OFF_T 4
|
||||||
# define CURL_SUFFIX_CURL_OFF_T L
|
# define CURL_SUFFIX_CURL_OFF_T L
|
||||||
@ -445,8 +445,8 @@
|
|||||||
# if defined(__i386__)
|
# if defined(__i386__)
|
||||||
# define CURL_SIZEOF_LONG 4
|
# define CURL_SIZEOF_LONG 4
|
||||||
# define CURL_OFF_T long long
|
# define CURL_OFF_T long long
|
||||||
# define CURL_FMT_OFF_T "lld"
|
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||||
# define CURL_FMT_OFF_TU "llu"
|
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||||
# define CURL_FORMAT_OFF_T "%lld"
|
# define CURL_FORMAT_OFF_T "%lld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||||
@ -454,8 +454,8 @@
|
|||||||
# elif defined(__x86_64__)
|
# elif defined(__x86_64__)
|
||||||
# define CURL_SIZEOF_LONG 8
|
# define CURL_SIZEOF_LONG 8
|
||||||
# define CURL_OFF_T long
|
# define CURL_OFF_T long
|
||||||
# define CURL_FMT_OFF_T "ld"
|
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||||
# define CURL_FMT_OFF_TU "lu"
|
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||||
# define CURL_FORMAT_OFF_T "%ld"
|
# define CURL_FORMAT_OFF_T "%ld"
|
||||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||||
# define CURL_SUFFIX_CURL_OFF_T L
|
# define CURL_SUFFIX_CURL_OFF_T L
|
||||||
|
@ -63,14 +63,14 @@
|
|||||||
Error Compilation_aborted_CURL_OFF_T_already_defined
|
Error Compilation_aborted_CURL_OFF_T_already_defined
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CURL_FMT_OFF_T
|
#ifdef CURL_FORMAT_CURL_OFF_T
|
||||||
# error "CURL_FMT_OFF_T shall not be defined except in curlbuild.h"
|
# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
|
||||||
Error Compilation_aborted_CURL_FMT_OFF_T_already_defined
|
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CURL_FMT_OFF_TU
|
#ifdef CURL_FORMAT_CURL_OFF_TU
|
||||||
# error "CURL_FMT_OFF_TU shall not be defined except in curlbuild.h"
|
# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
|
||||||
Error Compilation_aborted_CURL_FMT_OFF_TU_already_defined
|
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CURL_FORMAT_OFF_T
|
#ifdef CURL_FORMAT_OFF_T
|
||||||
@ -118,10 +118,10 @@
|
|||||||
typedef CURL_OFF_T curl_off_t;
|
typedef CURL_OFF_T curl_off_t;
|
||||||
|
|
||||||
/* curl_off_t formatting string directive without "%" conversion specifier. */
|
/* curl_off_t formatting string directive without "%" conversion specifier. */
|
||||||
#undef CURL_FMT_OFF_T
|
#undef CURL_FORMAT_CURL_OFF_T
|
||||||
|
|
||||||
/* unsigned curl_off_t formatting string without "%" conversion specifier. */
|
/* unsigned curl_off_t formatting string without "%" conversion specifier. */
|
||||||
#undef CURL_FMT_OFF_TU
|
#undef CURL_FORMAT_CURL_OFF_TU
|
||||||
|
|
||||||
/* curl_off_t formatting string directive with "%" conversion specifier. */
|
/* curl_off_t formatting string directive with "%" conversion specifier. */
|
||||||
#undef CURL_FORMAT_OFF_T
|
#undef CURL_FORMAT_OFF_T
|
||||||
|
@ -86,14 +86,14 @@
|
|||||||
Error Compilation_aborted_CURL_OFF_T_is_missing
|
Error Compilation_aborted_CURL_OFF_T_is_missing
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CURL_FMT_OFF_T
|
#ifndef CURL_FORMAT_CURL_OFF_T
|
||||||
# error "CURL_FMT_OFF_T definition is missing!"
|
# error "CURL_FORMAT_CURL_OFF_T definition is missing!"
|
||||||
Error Compilation_aborted_CURL_FMT_OFF_T_is_missing
|
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_is_missing
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CURL_FMT_OFF_TU
|
#ifndef CURL_FORMAT_CURL_OFF_TU
|
||||||
# error "CURL_FMT_OFF_TU definition is missing!"
|
# error "CURL_FORMAT_CURL_OFF_TU definition is missing!"
|
||||||
Error Compilation_aborted_CURL_FMT_OFF_TU_is_missing
|
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_is_missing
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CURL_FORMAT_OFF_T
|
#ifndef CURL_FORMAT_OFF_T
|
||||||
|
@ -601,8 +601,8 @@ $(CURL_INC)/curl/curlbuild.h: Makefile.netware FORCE
|
|||||||
ifeq ($(LIBARCH),LIBC)
|
ifeq ($(LIBARCH),LIBC)
|
||||||
@echo $(DL)#define CURL_SIZEOF_LONG 4$(DL) >> $@
|
@echo $(DL)#define CURL_SIZEOF_LONG 4$(DL) >> $@
|
||||||
@echo $(DL)#define CURL_OFF_T long long$(DL) >> $@
|
@echo $(DL)#define CURL_OFF_T long long$(DL) >> $@
|
||||||
@echo $(DL)#define CURL_FMT_OFF_T "lld"$(DL) >> $@
|
@echo $(DL)#define CURL_FORMAT_CURL_OFF_T "lld"$(DL) >> $@
|
||||||
@echo $(DL)#define CURL_FMT_OFF_TU "llu"$(DL) >> $@
|
@echo $(DL)#define CURL_FORMAT_CURL_OFF_TU "llu"$(DL) >> $@
|
||||||
@echo $(DL)#define CURL_FORMAT_OFF_T "$(PCT)lld"$(DL) >> $@
|
@echo $(DL)#define CURL_FORMAT_OFF_T "$(PCT)lld"$(DL) >> $@
|
||||||
@echo $(DL)#define CURL_SIZEOF_CURL_OFF_T 8$(DL) >> $@
|
@echo $(DL)#define CURL_SIZEOF_CURL_OFF_T 8$(DL) >> $@
|
||||||
@echo $(DL)#define CURL_SUFFIX_CURL_OFF_T LL$(DL) >> $@
|
@echo $(DL)#define CURL_SUFFIX_CURL_OFF_T LL$(DL) >> $@
|
||||||
@ -610,8 +610,8 @@ ifeq ($(LIBARCH),LIBC)
|
|||||||
else
|
else
|
||||||
@echo $(DL)#define CURL_SIZEOF_LONG 4$(DL) >> $@
|
@echo $(DL)#define CURL_SIZEOF_LONG 4$(DL) >> $@
|
||||||
@echo $(DL)#define CURL_OFF_T long$(DL) >> $@
|
@echo $(DL)#define CURL_OFF_T long$(DL) >> $@
|
||||||
@echo $(DL)#define CURL_FMT_OFF_T "ld"$(DL) >> $@
|
@echo $(DL)#define CURL_FORMAT_CURL_OFF_T "ld"$(DL) >> $@
|
||||||
@echo $(DL)#define CURL_FMT_OFF_TU "lu"$(DL) >> $@
|
@echo $(DL)#define CURL_FORMAT_CURL_OFF_TU "lu"$(DL) >> $@
|
||||||
@echo $(DL)#define CURL_FORMAT_OFF_T "$(PCT)ld"$(DL) >> $@
|
@echo $(DL)#define CURL_FORMAT_OFF_T "$(PCT)ld"$(DL) >> $@
|
||||||
@echo $(DL)#define CURL_SIZEOF_CURL_OFF_T 4$(DL) >> $@
|
@echo $(DL)#define CURL_SIZEOF_CURL_OFF_T 4$(DL) >> $@
|
||||||
@echo $(DL)#define CURL_SUFFIX_CURL_OFF_T L$(DL) >> $@
|
@echo $(DL)#define CURL_SUFFIX_CURL_OFF_T L$(DL) >> $@
|
||||||
|
@ -940,7 +940,7 @@ static char *get_netscape_format(const struct Cookie *co)
|
|||||||
"%s\t" /* tailmatch */
|
"%s\t" /* tailmatch */
|
||||||
"%s\t" /* path */
|
"%s\t" /* path */
|
||||||
"%s\t" /* secure */
|
"%s\t" /* secure */
|
||||||
"%" FORMAT_OFF_T "\t" /* expires */
|
"%" CURL_FORMAT_CURL_OFF_T "\t" /* expires */
|
||||||
"%s\t" /* name */
|
"%s\t" /* name */
|
||||||
"%s", /* value */
|
"%s", /* value */
|
||||||
co->httponly?"#HttpOnly_":"",
|
co->httponly?"#HttpOnly_":"",
|
||||||
|
15
lib/file.c
15
lib/file.c
@ -149,7 +149,7 @@ static CURLcode file_range(struct connectdata *conn)
|
|||||||
if((-1 == to) && (from>=0)) {
|
if((-1 == to) && (from>=0)) {
|
||||||
/* X - */
|
/* X - */
|
||||||
data->state.resume_from = from;
|
data->state.resume_from = from;
|
||||||
DEBUGF(infof(data, "RANGE %" FORMAT_OFF_T " to end of file\n",
|
DEBUGF(infof(data, "RANGE %" CURL_FORMAT_CURL_OFF_T " to end of file\n",
|
||||||
from));
|
from));
|
||||||
}
|
}
|
||||||
else if(from < 0) {
|
else if(from < 0) {
|
||||||
@ -157,7 +157,7 @@ static CURLcode file_range(struct connectdata *conn)
|
|||||||
totalsize = -from;
|
totalsize = -from;
|
||||||
data->req.maxdownload = -from;
|
data->req.maxdownload = -from;
|
||||||
data->state.resume_from = from;
|
data->state.resume_from = from;
|
||||||
DEBUGF(infof(data, "RANGE the last %" FORMAT_OFF_T " bytes\n",
|
DEBUGF(infof(data, "RANGE the last %" CURL_FORMAT_CURL_OFF_T " bytes\n",
|
||||||
totalsize));
|
totalsize));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -165,12 +165,13 @@ static CURLcode file_range(struct connectdata *conn)
|
|||||||
totalsize = to-from;
|
totalsize = to-from;
|
||||||
data->req.maxdownload = totalsize+1; /* include last byte */
|
data->req.maxdownload = totalsize+1; /* include last byte */
|
||||||
data->state.resume_from = from;
|
data->state.resume_from = from;
|
||||||
DEBUGF(infof(data, "RANGE from %" FORMAT_OFF_T
|
DEBUGF(infof(data, "RANGE from %" CURL_FORMAT_CURL_OFF_T
|
||||||
" getting %" FORMAT_OFF_T " bytes\n",
|
" getting %" CURL_FORMAT_CURL_OFF_T " bytes\n",
|
||||||
from, data->req.maxdownload));
|
from, data->req.maxdownload));
|
||||||
}
|
}
|
||||||
DEBUGF(infof(data, "range-download from %" FORMAT_OFF_T
|
DEBUGF(infof(data, "range-download from %" CURL_FORMAT_CURL_OFF_T
|
||||||
" to %" FORMAT_OFF_T ", totally %" FORMAT_OFF_T " bytes\n",
|
" to %" CURL_FORMAT_CURL_OFF_T
|
||||||
|
", totally %" CURL_FORMAT_CURL_OFF_T " bytes\n",
|
||||||
from, to, data->req.maxdownload));
|
from, to, data->req.maxdownload));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -460,7 +461,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
|
|||||||
if(data->set.opt_no_body && data->set.include_header && fstated) {
|
if(data->set.opt_no_body && data->set.include_header && fstated) {
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
snprintf(buf, sizeof(data->state.buffer),
|
snprintf(buf, sizeof(data->state.buffer),
|
||||||
"Content-Length: %" FORMAT_OFF_T "\r\n", expected_size);
|
"Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n", expected_size);
|
||||||
result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0);
|
result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0);
|
||||||
if(result)
|
if(result)
|
||||||
return result;
|
return result;
|
||||||
|
@ -1674,7 +1674,7 @@ int main(int argc, argv_item_t argv[])
|
|||||||
} while(1);
|
} while(1);
|
||||||
|
|
||||||
fprintf(stdout, "size: ");
|
fprintf(stdout, "size: ");
|
||||||
fprintf(stdout, CURL_FORMAT_OFF_T, size);
|
fprintf(stdout, "%" CURL_FORMAT_CURL_OFF_T, size);
|
||||||
fprintf(stdout, "\n");
|
fprintf(stdout, "\n");
|
||||||
if(errors)
|
if(errors)
|
||||||
fprintf(stdout, "\n==> %d Test(s) failed!\n", errors);
|
fprintf(stdout, "\n==> %d Test(s) failed!\n", errors);
|
||||||
|
44
lib/ftp.c
44
lib/ftp.c
@ -2125,8 +2125,8 @@ static CURLcode ftp_state_post_retr_size(struct connectdata *conn,
|
|||||||
if(data->state.resume_from< 0) {
|
if(data->state.resume_from< 0) {
|
||||||
/* We're supposed to download the last abs(from) bytes */
|
/* We're supposed to download the last abs(from) bytes */
|
||||||
if(filesize < -data->state.resume_from) {
|
if(filesize < -data->state.resume_from) {
|
||||||
failf(data, "Offset (%" FORMAT_OFF_T
|
failf(data, "Offset (%" CURL_FORMAT_CURL_OFF_T
|
||||||
") was beyond file size (%" FORMAT_OFF_T ")",
|
") was beyond file size (%" CURL_FORMAT_CURL_OFF_T ")",
|
||||||
data->state.resume_from, filesize);
|
data->state.resume_from, filesize);
|
||||||
return CURLE_BAD_DOWNLOAD_RESUME;
|
return CURLE_BAD_DOWNLOAD_RESUME;
|
||||||
}
|
}
|
||||||
@ -2137,8 +2137,8 @@ static CURLcode ftp_state_post_retr_size(struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(filesize < data->state.resume_from) {
|
if(filesize < data->state.resume_from) {
|
||||||
failf(data, "Offset (%" FORMAT_OFF_T
|
failf(data, "Offset (%" CURL_FORMAT_CURL_OFF_T
|
||||||
") was beyond file size (%" FORMAT_OFF_T ")",
|
") was beyond file size (%" CURL_FORMAT_CURL_OFF_T ")",
|
||||||
data->state.resume_from, filesize);
|
data->state.resume_from, filesize);
|
||||||
return CURLE_BAD_DOWNLOAD_RESUME;
|
return CURLE_BAD_DOWNLOAD_RESUME;
|
||||||
}
|
}
|
||||||
@ -2160,10 +2160,10 @@ static CURLcode ftp_state_post_retr_size(struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Set resume file transfer offset */
|
/* Set resume file transfer offset */
|
||||||
infof(data, "Instructs server to resume from offset %" FORMAT_OFF_T
|
infof(data, "Instructs server to resume from offset %"
|
||||||
"\n", data->state.resume_from);
|
CURL_FORMAT_CURL_OFF_T "\n", data->state.resume_from);
|
||||||
|
|
||||||
NBFTPSENDF(conn, "REST %" FORMAT_OFF_T, data->state.resume_from);
|
NBFTPSENDF(conn, "REST %" CURL_FORMAT_CURL_OFF_T, data->state.resume_from);
|
||||||
|
|
||||||
state(conn, FTP_RETR_REST);
|
state(conn, FTP_RETR_REST);
|
||||||
|
|
||||||
@ -2193,7 +2193,7 @@ static CURLcode ftp_state_size_resp(struct connectdata *conn,
|
|||||||
#ifdef CURL_FTP_HTTPSTYLE_HEAD
|
#ifdef CURL_FTP_HTTPSTYLE_HEAD
|
||||||
if(-1 != filesize) {
|
if(-1 != filesize) {
|
||||||
snprintf(buf, sizeof(data->state.buffer),
|
snprintf(buf, sizeof(data->state.buffer),
|
||||||
"Content-Length: %" FORMAT_OFF_T "\r\n", filesize);
|
"Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n", filesize);
|
||||||
result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0);
|
result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0);
|
||||||
if(result)
|
if(result)
|
||||||
return result;
|
return result;
|
||||||
@ -2392,10 +2392,12 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn,
|
|||||||
if(size > data->req.maxdownload && data->req.maxdownload > 0)
|
if(size > data->req.maxdownload && data->req.maxdownload > 0)
|
||||||
size = data->req.size = data->req.maxdownload;
|
size = data->req.size = data->req.maxdownload;
|
||||||
|
|
||||||
infof(data, "Maxdownload = %" FORMAT_OFF_T "\n", data->req.maxdownload);
|
infof(data, "Maxdownload = %" CURL_FORMAT_CURL_OFF_T "\n",
|
||||||
|
data->req.maxdownload);
|
||||||
|
|
||||||
if(instate != FTP_LIST)
|
if(instate != FTP_LIST)
|
||||||
infof(data, "Getting file with size: %" FORMAT_OFF_T "\n", size);
|
infof(data, "Getting file with size: %" CURL_FORMAT_CURL_OFF_T "\n",
|
||||||
|
size);
|
||||||
|
|
||||||
/* FTP download: */
|
/* FTP download: */
|
||||||
result=Curl_setup_transfer(conn, SECONDARYSOCKET, size, FALSE,
|
result=Curl_setup_transfer(conn, SECONDARYSOCKET, size, FALSE,
|
||||||
@ -3283,8 +3285,8 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
|
|||||||
(data->set.infilesize != *ftp->bytecountp) &&
|
(data->set.infilesize != *ftp->bytecountp) &&
|
||||||
!data->set.crlf &&
|
!data->set.crlf &&
|
||||||
(ftp->transfer == FTPTRANSFER_BODY)) {
|
(ftp->transfer == FTPTRANSFER_BODY)) {
|
||||||
failf(data, "Uploaded unaligned file size (%" FORMAT_OFF_T
|
failf(data, "Uploaded unaligned file size (%" CURL_FORMAT_CURL_OFF_T
|
||||||
" out of %" FORMAT_OFF_T " bytes)",
|
" out of %" CURL_FORMAT_CURL_OFF_T " bytes)",
|
||||||
*ftp->bytecountp, data->set.infilesize);
|
*ftp->bytecountp, data->set.infilesize);
|
||||||
result = CURLE_PARTIAL_FILE;
|
result = CURLE_PARTIAL_FILE;
|
||||||
}
|
}
|
||||||
@ -3301,7 +3303,8 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
|
|||||||
*ftp->bytecountp) &&
|
*ftp->bytecountp) &&
|
||||||
#endif /* CURL_DO_LINEEND_CONV */
|
#endif /* CURL_DO_LINEEND_CONV */
|
||||||
(data->req.maxdownload != *ftp->bytecountp)) {
|
(data->req.maxdownload != *ftp->bytecountp)) {
|
||||||
failf(data, "Received only partial file: %" FORMAT_OFF_T " bytes",
|
failf(data, "Received only partial file: %" CURL_FORMAT_CURL_OFF_T
|
||||||
|
" bytes",
|
||||||
*ftp->bytecountp);
|
*ftp->bytecountp);
|
||||||
result = CURLE_PARTIAL_FILE;
|
result = CURLE_PARTIAL_FILE;
|
||||||
}
|
}
|
||||||
@ -3449,7 +3452,8 @@ static CURLcode ftp_range(struct connectdata *conn)
|
|||||||
if((-1 == to) && (from>=0)) {
|
if((-1 == to) && (from>=0)) {
|
||||||
/* X - */
|
/* X - */
|
||||||
data->state.resume_from = from;
|
data->state.resume_from = from;
|
||||||
DEBUGF(infof(conn->data, "FTP RANGE %" FORMAT_OFF_T " to end of file\n",
|
DEBUGF(infof(conn->data, "FTP RANGE %" CURL_FORMAT_CURL_OFF_T
|
||||||
|
" to end of file\n",
|
||||||
from));
|
from));
|
||||||
}
|
}
|
||||||
else if(from < 0) {
|
else if(from < 0) {
|
||||||
@ -3457,7 +3461,8 @@ static CURLcode ftp_range(struct connectdata *conn)
|
|||||||
totalsize = -from;
|
totalsize = -from;
|
||||||
data->req.maxdownload = -from;
|
data->req.maxdownload = -from;
|
||||||
data->state.resume_from = from;
|
data->state.resume_from = from;
|
||||||
DEBUGF(infof(conn->data, "FTP RANGE the last %" FORMAT_OFF_T " bytes\n",
|
DEBUGF(infof(conn->data, "FTP RANGE the last %" CURL_FORMAT_CURL_OFF_T
|
||||||
|
" bytes\n",
|
||||||
totalsize));
|
totalsize));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -3465,12 +3470,13 @@ static CURLcode ftp_range(struct connectdata *conn)
|
|||||||
totalsize = to-from;
|
totalsize = to-from;
|
||||||
data->req.maxdownload = totalsize+1; /* include last byte */
|
data->req.maxdownload = totalsize+1; /* include last byte */
|
||||||
data->state.resume_from = from;
|
data->state.resume_from = from;
|
||||||
DEBUGF(infof(conn->data, "FTP RANGE from %" FORMAT_OFF_T
|
DEBUGF(infof(conn->data, "FTP RANGE from %" CURL_FORMAT_CURL_OFF_T
|
||||||
" getting %" FORMAT_OFF_T " bytes\n",
|
" getting %" CURL_FORMAT_CURL_OFF_T " bytes\n",
|
||||||
from, data->req.maxdownload));
|
from, data->req.maxdownload));
|
||||||
}
|
}
|
||||||
DEBUGF(infof(conn->data, "range-download from %" FORMAT_OFF_T
|
DEBUGF(infof(conn->data, "range-download from %" CURL_FORMAT_CURL_OFF_T
|
||||||
" to %" FORMAT_OFF_T ", totally %" FORMAT_OFF_T " bytes\n",
|
" to %" CURL_FORMAT_CURL_OFF_T
|
||||||
|
", totally %" CURL_FORMAT_CURL_OFF_T " bytes\n",
|
||||||
from, to, data->req.maxdownload));
|
from, to, data->req.maxdownload));
|
||||||
ftpc->dont_check = TRUE; /* dont check for successful transfer */
|
ftpc->dont_check = TRUE; /* dont check for successful transfer */
|
||||||
}
|
}
|
||||||
|
22
lib/http.c
22
lib/http.c
@ -398,7 +398,7 @@ CURLcode Curl_http_perhapsrewind(struct connectdata *conn)
|
|||||||
/* this is already marked to get closed */
|
/* this is already marked to get closed */
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
|
|
||||||
infof(data, "NTLM send, close instead of sending %" FORMAT_OFF_T
|
infof(data, "NTLM send, close instead of sending %" CURL_FORMAT_CURL_OFF_T
|
||||||
" bytes\n", (curl_off_t)(expectsend - bytessent));
|
" bytes\n", (curl_off_t)(expectsend - bytessent));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1576,7 +1576,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
|
|||||||
|
|
||||||
if(cl) {
|
if(cl) {
|
||||||
|
|
||||||
infof(data, "Ignore %" FORMAT_OFF_T
|
infof(data, "Ignore %" CURL_FORMAT_CURL_OFF_T
|
||||||
" bytes of response-body\n", cl);
|
" bytes of response-body\n", cl);
|
||||||
/* remove the remaining chunk of what we already
|
/* remove the remaining chunk of what we already
|
||||||
read */
|
read */
|
||||||
@ -2337,7 +2337,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
|||||||
|
|
||||||
passed += actuallyread;
|
passed += actuallyread;
|
||||||
if(actuallyread != readthisamountnow) {
|
if(actuallyread != readthisamountnow) {
|
||||||
failf(data, "Could only read %" FORMAT_OFF_T
|
failf(data, "Could only read %" CURL_FORMAT_CURL_OFF_T
|
||||||
" bytes from the input",
|
" bytes from the input",
|
||||||
passed);
|
passed);
|
||||||
return CURLE_READ_ERROR;
|
return CURLE_READ_ERROR;
|
||||||
@ -2383,8 +2383,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
|||||||
remote part so we tell the server (and act accordingly) that we
|
remote part so we tell the server (and act accordingly) that we
|
||||||
upload the whole file (again) */
|
upload the whole file (again) */
|
||||||
conn->allocptr.rangeline =
|
conn->allocptr.rangeline =
|
||||||
aprintf("Content-Range: bytes 0-%" FORMAT_OFF_T
|
aprintf("Content-Range: bytes 0-%" CURL_FORMAT_CURL_OFF_T
|
||||||
"/%" FORMAT_OFF_T "\r\n",
|
"/%" CURL_FORMAT_CURL_OFF_T "\r\n",
|
||||||
data->set.infilesize - 1, data->set.infilesize);
|
data->set.infilesize - 1, data->set.infilesize);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2393,8 +2393,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
|||||||
curl_off_t total_expected_size=
|
curl_off_t total_expected_size=
|
||||||
data->state.resume_from + data->set.infilesize;
|
data->state.resume_from + data->set.infilesize;
|
||||||
conn->allocptr.rangeline =
|
conn->allocptr.rangeline =
|
||||||
aprintf("Content-Range: bytes %s%" FORMAT_OFF_T
|
aprintf("Content-Range: bytes %s%" CURL_FORMAT_CURL_OFF_T
|
||||||
"/%" FORMAT_OFF_T "\r\n",
|
"/%" CURL_FORMAT_CURL_OFF_T "\r\n",
|
||||||
data->state.range, total_expected_size-1,
|
data->state.range, total_expected_size-1,
|
||||||
total_expected_size);
|
total_expected_size);
|
||||||
}
|
}
|
||||||
@ -2402,7 +2402,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
|||||||
/* Range was selected and then we just pass the incoming range and
|
/* Range was selected and then we just pass the incoming range and
|
||||||
append total size */
|
append total size */
|
||||||
conn->allocptr.rangeline =
|
conn->allocptr.rangeline =
|
||||||
aprintf("Content-Range: bytes %s/%" FORMAT_OFF_T "\r\n",
|
aprintf("Content-Range: bytes %s/%" CURL_FORMAT_CURL_OFF_T "\r\n",
|
||||||
data->state.range, data->set.infilesize);
|
data->state.range, data->set.infilesize);
|
||||||
}
|
}
|
||||||
if(!conn->allocptr.rangeline)
|
if(!conn->allocptr.rangeline)
|
||||||
@ -2629,7 +2629,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
|||||||
if(!data->req.upload_chunky) {
|
if(!data->req.upload_chunky) {
|
||||||
/* only add Content-Length if not uploading chunked */
|
/* only add Content-Length if not uploading chunked */
|
||||||
result = add_bufferf(req_buffer,
|
result = add_bufferf(req_buffer,
|
||||||
"Content-Length: %" FORMAT_OFF_T "\r\n",
|
"Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n",
|
||||||
http->postsize);
|
http->postsize);
|
||||||
if(result)
|
if(result)
|
||||||
return result;
|
return result;
|
||||||
@ -2701,7 +2701,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
|||||||
if((postsize != -1) && !data->req.upload_chunky) {
|
if((postsize != -1) && !data->req.upload_chunky) {
|
||||||
/* only add Content-Length if not uploading chunked */
|
/* only add Content-Length if not uploading chunked */
|
||||||
result = add_bufferf(req_buffer,
|
result = add_bufferf(req_buffer,
|
||||||
"Content-Length: %" FORMAT_OFF_T "\r\n",
|
"Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n",
|
||||||
postsize );
|
postsize );
|
||||||
if(result)
|
if(result)
|
||||||
return result;
|
return result;
|
||||||
@ -2753,7 +2753,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
|||||||
/* we allow replacing this header, although it isn't very wise to
|
/* we allow replacing this header, although it isn't very wise to
|
||||||
actually set your own */
|
actually set your own */
|
||||||
result = add_bufferf(req_buffer,
|
result = add_bufferf(req_buffer,
|
||||||
"Content-Length: %" FORMAT_OFF_T"\r\n",
|
"Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n",
|
||||||
postsize);
|
postsize);
|
||||||
if(result)
|
if(result)
|
||||||
return result;
|
return result;
|
||||||
|
@ -67,40 +67,40 @@ static char *max5data(curl_off_t bytes, char *max5)
|
|||||||
#define ONE_PETABYTE (CURL_OFF_T_C(1024) * ONE_TERABYTE)
|
#define ONE_PETABYTE (CURL_OFF_T_C(1024) * ONE_TERABYTE)
|
||||||
|
|
||||||
if(bytes < CURL_OFF_T_C(100000))
|
if(bytes < CURL_OFF_T_C(100000))
|
||||||
snprintf(max5, 6, "%5" FORMAT_OFF_T, bytes);
|
snprintf(max5, 6, "%5" CURL_FORMAT_CURL_OFF_T, bytes);
|
||||||
|
|
||||||
else if(bytes < CURL_OFF_T_C(10000) * ONE_KILOBYTE)
|
else if(bytes < CURL_OFF_T_C(10000) * ONE_KILOBYTE)
|
||||||
snprintf(max5, 6, "%4" FORMAT_OFF_T "k", bytes/ONE_KILOBYTE);
|
snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "k", bytes/ONE_KILOBYTE);
|
||||||
|
|
||||||
else if(bytes < CURL_OFF_T_C(100) * ONE_MEGABYTE)
|
else if(bytes < CURL_OFF_T_C(100) * ONE_MEGABYTE)
|
||||||
/* 'XX.XM' is good as long as we're less than 100 megs */
|
/* 'XX.XM' is good as long as we're less than 100 megs */
|
||||||
snprintf(max5, 6, "%2" FORMAT_OFF_T ".%0" FORMAT_OFF_T "M",
|
snprintf(max5, 6, "%2" CURL_FORMAT_CURL_OFF_T ".%0"
|
||||||
bytes/ONE_MEGABYTE,
|
CURL_FORMAT_CURL_OFF_T "M", bytes/ONE_MEGABYTE,
|
||||||
(bytes%ONE_MEGABYTE) / (ONE_MEGABYTE/CURL_OFF_T_C(10)) );
|
(bytes%ONE_MEGABYTE) / (ONE_MEGABYTE/CURL_OFF_T_C(10)) );
|
||||||
|
|
||||||
#if CURL_SIZEOF_CURL_OFF_T > 4
|
#if CURL_SIZEOF_CURL_OFF_T > 4
|
||||||
|
|
||||||
else if(bytes < CURL_OFF_T_C(10000) * ONE_MEGABYTE)
|
else if(bytes < CURL_OFF_T_C(10000) * ONE_MEGABYTE)
|
||||||
/* 'XXXXM' is good until we're at 10000MB or above */
|
/* 'XXXXM' is good until we're at 10000MB or above */
|
||||||
snprintf(max5, 6, "%4" FORMAT_OFF_T "M", bytes/ONE_MEGABYTE);
|
snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "M", bytes/ONE_MEGABYTE);
|
||||||
|
|
||||||
else if(bytes < CURL_OFF_T_C(100) * ONE_GIGABYTE)
|
else if(bytes < CURL_OFF_T_C(100) * ONE_GIGABYTE)
|
||||||
/* 10000 MB - 100 GB, we show it as XX.XG */
|
/* 10000 MB - 100 GB, we show it as XX.XG */
|
||||||
snprintf(max5, 6, "%2" FORMAT_OFF_T ".%0" FORMAT_OFF_T "G",
|
snprintf(max5, 6, "%2" CURL_FORMAT_CURL_OFF_T ".%0"
|
||||||
bytes/ONE_GIGABYTE,
|
CURL_FORMAT_CURL_OFF_T "G", bytes/ONE_GIGABYTE,
|
||||||
(bytes%ONE_GIGABYTE) / (ONE_GIGABYTE/CURL_OFF_T_C(10)) );
|
(bytes%ONE_GIGABYTE) / (ONE_GIGABYTE/CURL_OFF_T_C(10)) );
|
||||||
|
|
||||||
else if(bytes < CURL_OFF_T_C(10000) * ONE_GIGABYTE)
|
else if(bytes < CURL_OFF_T_C(10000) * ONE_GIGABYTE)
|
||||||
/* up to 10000GB, display without decimal: XXXXG */
|
/* up to 10000GB, display without decimal: XXXXG */
|
||||||
snprintf(max5, 6, "%4" FORMAT_OFF_T "G", bytes/ONE_GIGABYTE);
|
snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "G", bytes/ONE_GIGABYTE);
|
||||||
|
|
||||||
else if(bytes < CURL_OFF_T_C(10000) * ONE_TERABYTE)
|
else if(bytes < CURL_OFF_T_C(10000) * ONE_TERABYTE)
|
||||||
/* up to 10000TB, display without decimal: XXXXT */
|
/* up to 10000TB, display without decimal: XXXXT */
|
||||||
snprintf(max5, 6, "%4" FORMAT_OFF_T "T", bytes/ONE_TERABYTE);
|
snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "T", bytes/ONE_TERABYTE);
|
||||||
|
|
||||||
else
|
else
|
||||||
/* up to 10000PB, display without decimal: XXXXP */
|
/* up to 10000PB, display without decimal: XXXXP */
|
||||||
snprintf(max5, 6, "%4" FORMAT_OFF_T "P", bytes/ONE_PETABYTE);
|
snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "P", bytes/ONE_PETABYTE);
|
||||||
|
|
||||||
/* 16384 petabytes (16 exabytes) is the maximum a 64 bit unsigned number
|
/* 16384 petabytes (16 exabytes) is the maximum a 64 bit unsigned number
|
||||||
can hold, but our data type is signed so 8192PB will be the maximum. */
|
can hold, but our data type is signed so 8192PB will be the maximum. */
|
||||||
@ -108,7 +108,7 @@ static char *max5data(curl_off_t bytes, char *max5)
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
else
|
else
|
||||||
snprintf(max5, 6, "%4" FORMAT_OFF_T "M", bytes/ONE_MEGABYTE);
|
snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "M", bytes/ONE_MEGABYTE);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -357,8 +357,8 @@ int Curl_pgrsUpdate(struct connectdata *conn)
|
|||||||
if(!(data->progress.flags & PGRS_HEADERS_OUT)) {
|
if(!(data->progress.flags & PGRS_HEADERS_OUT)) {
|
||||||
if(data->state.resume_from) {
|
if(data->state.resume_from) {
|
||||||
fprintf(data->set.err,
|
fprintf(data->set.err,
|
||||||
"** Resuming transfer from byte position %" FORMAT_OFF_T "\n",
|
"** Resuming transfer from byte position %"
|
||||||
data->state.resume_from);
|
CURL_FORMAT_CURL_OFF_T "\n", data->state.resume_from);
|
||||||
}
|
}
|
||||||
fprintf(data->set.err,
|
fprintf(data->set.err,
|
||||||
" %% Total %% Received %% Xferd Average Speed Time Time Time Current\n"
|
" %% Total %% Received %% Xferd Average Speed Time Time Time Current\n"
|
||||||
|
16
lib/setup.h
16
lib/setup.h
@ -121,25 +121,21 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set up internal curl_off_t formatting string directive
|
* Ensure that no one is using the old internal FORMAT_OFF_T macro
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef FORMAT_OFF_T
|
#ifdef FORMAT_OFF_T
|
||||||
# error "FORMAT_OFF_T shall not be defined before this point!"
|
# error "FORMAT_OFF_T shall not be defined!"
|
||||||
Error Compilation_aborted_FORMAT_OFF_T_already_defined
|
Error Compilation_aborted_FORMAT_OFF_T_shall_not_be_defined
|
||||||
#else
|
|
||||||
# define FORMAT_OFF_T CURL_FMT_OFF_T
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set up internal unsigned curl_off_t formatting string directive
|
* Ensure that no one is using the old internal FORMAT_OFF_TU macro
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef FORMAT_OFF_TU
|
#ifdef FORMAT_OFF_TU
|
||||||
# error "FORMAT_OFF_TU shall not be defined before this point!"
|
# error "FORMAT_OFF_TU shall not be defined!"
|
||||||
Error Compilation_aborted_FORMAT_OFF_TU_already_defined
|
Error Compilation_aborted_FORMAT_OFF_TU_shall_not_be_defined
|
||||||
#else
|
|
||||||
# define FORMAT_OFF_TU CURL_FMT_OFF_TU
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1647,8 +1647,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
|
|||||||
if(data->state.resume_from< 0) {
|
if(data->state.resume_from< 0) {
|
||||||
/* We're supposed to download the last abs(from) bytes */
|
/* We're supposed to download the last abs(from) bytes */
|
||||||
if((curl_off_t)attrs.filesize < -data->state.resume_from) {
|
if((curl_off_t)attrs.filesize < -data->state.resume_from) {
|
||||||
failf(data, "Offset (%"
|
failf(data, "Offset (%" CURL_FORMAT_CURL_OFF_T
|
||||||
FORMAT_OFF_T ") was beyond file size (%" FORMAT_OFF_T ")",
|
") was beyond file size (%" CURL_FORMAT_CURL_OFF_T ")",
|
||||||
data->state.resume_from, attrs.filesize);
|
data->state.resume_from, attrs.filesize);
|
||||||
return CURLE_BAD_DOWNLOAD_RESUME;
|
return CURLE_BAD_DOWNLOAD_RESUME;
|
||||||
}
|
}
|
||||||
@ -1657,8 +1657,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if((curl_off_t)attrs.filesize < data->state.resume_from) {
|
if((curl_off_t)attrs.filesize < data->state.resume_from) {
|
||||||
failf(data, "Offset (%" FORMAT_OFF_T
|
failf(data, "Offset (%" CURL_FORMAT_CURL_OFF_T
|
||||||
") was beyond file size (%" FORMAT_OFF_T ")",
|
") was beyond file size (%" CURL_FORMAT_CURL_OFF_T ")",
|
||||||
data->state.resume_from, attrs.filesize);
|
data->state.resume_from, attrs.filesize);
|
||||||
return CURLE_BAD_DOWNLOAD_RESUME;
|
return CURLE_BAD_DOWNLOAD_RESUME;
|
||||||
}
|
}
|
||||||
|
@ -567,9 +567,9 @@ static CURLcode readwrite_data(struct SessionHandle *data,
|
|||||||
if(excess > 0 && !k->ignorebody) {
|
if(excess > 0 && !k->ignorebody) {
|
||||||
infof(data,
|
infof(data,
|
||||||
"Rewinding stream by : %d"
|
"Rewinding stream by : %d"
|
||||||
" bytes on url %s (size = %" FORMAT_OFF_T
|
" bytes on url %s (size = %" CURL_FORMAT_CURL_OFF_T
|
||||||
", maxdownload = %" FORMAT_OFF_T
|
", maxdownload = %" CURL_FORMAT_CURL_OFF_T
|
||||||
", bytecount = %" FORMAT_OFF_T ", nread = %d)\n",
|
", bytecount = %" CURL_FORMAT_CURL_OFF_T ", nread = %d)\n",
|
||||||
excess, data->state.path,
|
excess, data->state.path,
|
||||||
k->size, k->maxdownload, k->bytecount, nread);
|
k->size, k->maxdownload, k->bytecount, nread);
|
||||||
read_rewind(conn, excess);
|
read_rewind(conn, excess);
|
||||||
@ -1135,7 +1135,7 @@ static CURLcode readwrite_headers(struct SessionHandle *data,
|
|||||||
happens for example when older Apache servers send large
|
happens for example when older Apache servers send large
|
||||||
files */
|
files */
|
||||||
conn->bits.close = TRUE;
|
conn->bits.close = TRUE;
|
||||||
infof(data, "Negative content-length: %" FORMAT_OFF_T
|
infof(data, "Negative content-length: %" CURL_FORMAT_CURL_OFF_T
|
||||||
", closing after transfer\n", contentlength);
|
", closing after transfer\n", contentlength);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1647,11 +1647,12 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
|||||||
(Curl_tvdiff(k->now, k->start) >= data->set.timeout)) {
|
(Curl_tvdiff(k->now, k->start) >= data->set.timeout)) {
|
||||||
if(k->size != -1) {
|
if(k->size != -1) {
|
||||||
failf(data, "Operation timed out after %ld milliseconds with %"
|
failf(data, "Operation timed out after %ld milliseconds with %"
|
||||||
FORMAT_OFF_T " out of %" FORMAT_OFF_T " bytes received",
|
CURL_FORMAT_CURL_OFF_T " out of %"
|
||||||
|
CURL_FORMAT_CURL_OFF_T " bytes received",
|
||||||
data->set.timeout, k->bytecount, k->size);
|
data->set.timeout, k->bytecount, k->size);
|
||||||
} else {
|
} else {
|
||||||
failf(data, "Operation timed out after %ld milliseconds with %"
|
failf(data, "Operation timed out after %ld milliseconds with %"
|
||||||
FORMAT_OFF_T " bytes received",
|
CURL_FORMAT_CURL_OFF_T " bytes received",
|
||||||
data->set.timeout, k->bytecount);
|
data->set.timeout, k->bytecount);
|
||||||
}
|
}
|
||||||
return CURLE_OPERATION_TIMEDOUT;
|
return CURLE_OPERATION_TIMEDOUT;
|
||||||
@ -1673,7 +1674,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
|||||||
(k->bytecount != (k->size + data->state.crlf_conversions)) &&
|
(k->bytecount != (k->size + data->state.crlf_conversions)) &&
|
||||||
#endif /* CURL_DO_LINEEND_CONV */
|
#endif /* CURL_DO_LINEEND_CONV */
|
||||||
!data->req.newurl) {
|
!data->req.newurl) {
|
||||||
failf(data, "transfer closed with %" FORMAT_OFF_T
|
failf(data, "transfer closed with %" CURL_FORMAT_CURL_OFF_T
|
||||||
" bytes remaining to read",
|
" bytes remaining to read",
|
||||||
k->size - k->bytecount);
|
k->size - k->bytecount);
|
||||||
return CURLE_PARTIAL_FILE;
|
return CURLE_PARTIAL_FILE;
|
||||||
|
@ -3185,7 +3185,7 @@ static CURLcode setup_range(struct SessionHandle *data)
|
|||||||
free(s->range);
|
free(s->range);
|
||||||
|
|
||||||
if(s->resume_from)
|
if(s->resume_from)
|
||||||
s->range = aprintf("%" FORMAT_OFF_TU "-", s->resume_from);
|
s->range = aprintf("%" CURL_FORMAT_CURL_OFF_TU "-", s->resume_from);
|
||||||
else
|
else
|
||||||
s->range = strdup(data->set.str[STRING_SET_RANGE]);
|
s->range = strdup(data->set.str[STRING_SET_RANGE]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user