cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: examples compiler warnings

From: John P. Hartmann <jphartmann_at_gmail.com>
Date: Thu, 22 Sep 2011 17:12:09 +0100

My apologies. %zd is a GNU extension to POSIX.

There is no posix solution to the quagmire of size_t (and ssize_t).

The pragmatic solution is to use long and %ld instead.

On 22 September 2011 16:47, Guenter <lists_at_gknw.net> wrote:
> Am 22.09.2011 17:15, schrieb John P. Hartmann:
>>
>> Use %zd to print size_t portably between 32 and 64 bit platforms.
>
> that doesnt work on all platforms (even not all *nix flavours) and of course
> not on Windows:
> http://bytes.com/topic/c/answers/506972-64-bit-portability-size_t-printf-format-strings
>
> Gün.
>
>
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette:  http://curl.haxx.se/mail/etiquette.html
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-09-22