cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Binary compatibility and 64-bit curl_off_t

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 14 Aug 2008 08:31:46 +0200 (CEST)

On Wed, 13 Aug 2008, Dan Fandrich wrote:

> Good thinking, except for the pathological case where a compile-time switch
> will turn on 64-bit off_t, the old libcurl was compiled with that enabled,
> and the new libcurl was not. Then it would appear that the size has changed
> when it actually hasn't.

Hm. Yes. Perhaps we should simply leave that case with a big fat warning in
the configure output if anyone decides to explicitly disable 64bit off_t on a
system which has 64bit curl_off_t (using the new checks) and clearly can have
64bit off_t as well.

To me, it seems so unlikely to hit more than a very small user-base so
displaying a warning with some good wording about how this may cause an ABI
difference is better than trying to come up with an approach that catches all
cases. (All this of course just to avoid bumping the SONAME for the large
crowd that clearly has the same ABI.)

So, to sum up I'm suggesting that we do a check like this in the configure
script:

  if( system_supports_LFS && sizeof(curl_off_t) > 4 ) {
    if( sizeof(off_t) < sizeof(curl_off_t)) {
      /* LFS support explicitly disabled! */
      display_warning("potential ABI breakage");
    }
  }
  else if(!system_supports_LFS && sizeof(curl_off_t) > 4 ) {
    ABI++; /* this must cause a SONAME bump due to curl_off_t size difference
              compared to older libcurls */
  }

-- 
  / daniel.haxx.se
Received on 2008-08-14