misc: remove support for curl_off_t < 8 bytes

Closes #10597
This commit is contained in:
Daniel Stenberg 2023-02-24 00:45:16 +01:00
parent 9672cc640c
commit 835682661c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
10 changed files with 17 additions and 182 deletions

View file

@ -87,8 +87,6 @@ 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 (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 */
msnprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "M", bytes/ONE_MEGABYTE);
@ -111,15 +109,8 @@ static char *max5data(curl_off_t bytes, char *max5)
/* up to 10000PB, display without decimal: XXXXP */
msnprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "P", bytes/ONE_PETABYTE);
/* 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. */
#else
else
msnprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "M", bytes/ONE_MEGABYTE);
#endif
/* 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. */
return max5;
}