cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

64/32/16bit curl_off_t for DJGPP and WATCOMC

From: Yang Tse <yangsita_at_gmail.com>
Date: Tue, 3 Jun 2008 13:55:25 +0200

Hi, all

I'm requesting verification/validation of the correctness of the
following snippet for DJGPP and WATCOMC compilers by those who
_actually_ have or really understand them.

The following snippet is intended to define a 64bit curl_off_t for
those configurations that are capable of the following requisites
simultaneously:

1) Have a 64bit data type to which curl_off_t can be typedef'ed.
2) Does pointer math correctly with the above defined curl_off_t.

If for some reason the above conditions can not be satisfied then the
curl_off_t definition is intended to be a 32bit one for which similar
requisites should apply.

I'm assuming that a 32bit curl_off_t would be possible in all
configurations of this compilers. But if for some configuration/reason
it should fall back to 16bit please show us.

I understand that the 64/32/16 bit capability could also depend on
compiler version being used, so if this is the case, please, also fix
the following snippet.

#if defined(__DJGPP__)
  typedef long curl_off_t;
  #define CURL_FORMAT_OFF_T "%ld"
  #define CURL_SIZEOF_CURL_OFF_T 4

#elif defined(__WATCOMC__)
  #if defined(__LARGE__)
    typedef signed __int64 curl_off_t;
    #define CURL_FORMAT_OFF_T "%Ld"
    #define CURL_SIZEOF_CURL_OFF_T 8
  #else
    typedef long curl_off_t;
    #define CURL_FORMAT_OFF_T "%ld"
    #define CURL_SIZEOF_CURL_OFF_T 4
  #endif

#endif

-- 
-=[Yang]=-
Received on 2008-06-03

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET