cURL / Mailing Lists / curl-library / Single Mail


64/32/16bit curl_off_t for _WIN32_WCE and ILEC400

From: Yang Tse <>
Date: Tue, 3 Jun 2008 14:23:26 +0200

Hi, all

I'm requesting verification/validation of the correctness of the
following snippet for WIN32_WCE and ILEC400 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

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(_WIN32_WCE)
  typedef long curl_off_t;
  #define CURL_FORMAT_OFF_T "%ld"

#elif defined(__ILEC400__)
  typedef long long curl_off_t;
  #define CURL_FORMAT_OFF_T "%lld"


Received on 2008-06-03