curl-library
Re: LONG_MAX patch
Date: Wed, 21 Jan 2004 23:33:07 +0100
"Daniel Stenberg" <daniel-curl_at_haxx.se> said:
> I think I'm now in favour of adding magic similar to this in an external
> public curl header file:
>
> #if defined(_MSC_VER) || defined(__WATCOMC__)
> /* MSVC and Watcom compilers */
> typedef signed __int64 curl_off_t;
> #else
> #if defined(__GNUC__) && defined(WIN32)
> /* gcc on windows */
> typedef long long curl_off_t;
> #else
> /* "normal" approach */
> typedef off_t curl_off_t;
> #endif
> #endif
I was mistaken; Watcom do support 'long long' natively.
Why not use "#if defined .. / #elif defined .." syntax to avoid the clutter
with multiple "#endif"' ? Are there still old pre-processors out there?
> ... and then we document that type (curl_off_t) for _LARGE options, and we use
> that internally all over where we currently use off_t.
Sound good to me.
--gv
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Received on 2004-01-22