curl-library
int64 printf format specifier in MSVC?
From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 1 Mar 2004 15:01:30 +0100 (CET)
Date: Mon, 1 Mar 2004 15:01:30 +0100 (CET)
Hey
What's the %-flag for printf() to print a int64 variable when using MSVC?
I'm reverting the idea of using '%Od' for curl_off_t printf()ing, and I am
now going for:
curl_off_t size=1000;
printf( CURL_FORMAT_OFF_T, size);
... where CURL_FORMAT_OFF_T is properly defined in curl/curl.l next to the
code that typedefs the variable.
For POSIX-systems with large file support, CURL_FORMAT_OFF_T will be %lld.
This makes it easier for app coders to printf() the variables using non-curl
printf()s and it will stop compilers from warning on our custom %Od stuff. The
curl printf code supports %lld, and I'd want it to support the MSVC way too
(if possible, otherwise I'll redefine the define for internal libcurl
purposes).
-- Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/ [[ Do not send mails to this email address. They won't reach me. ]]Received on 2004-03-01