On Wed, 2004-01-28 at 17:34, Joe Orton wrote:
> One possible minor issue with this patch:
> 
> if a C++ library based on APR uses apr_off_t in its API, I believe that
> changing apr_off_t from a long to an int changes the ABI of that
> library, because of the name mangling stuff.

To clarify, this would only be true of a library which takes APR code
and compiles it using a C++ compiler, which is a bit of a stretch.  C++
code which merely calls into APR necessarily does so with unmangled
symbols.

> We could fudge apr_off_t to still be a long on platforms where it was
> already or even on all platforms with a 32-bit long if anyone really
> cares.  It might be wise anyway... could compilers specify different
> structure padding/alignment/calling conventions for int and long even
> though they are the same size? Hmmm... 

So what if they could?  We don't require that apr_off_t and off_t have
the same alignment or calling conventions, only that you can cast
between them without losing information.

(If there are existing platforms, which APR supports, which have this
bizarre property, then the proposed change could affect the 0.9 ABI on
those platforms.  But that's even more far-fetched than the idea that we
might run into such platforms in the future.)

Reply via email to