[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Subversion 1.3.0 RC1

From: Daniel Berlin <dberlin_at_dberlin.org>
Date: 2005-10-23 05:53:39 CEST

On Sun, 2005-10-23 at 11:34 +0900, Kouhei Sutou wrote:
> Hi,
>
> In <435AF0E3.5060905@calixo.net>
> "Re: Subversion 1.3.0 RC1" on Sun, 23 Oct 2005 04:09:39 +0200,
> David Anderson <david.anderson@calixo.net> wrote:
>
> > It is the only solution. We cannot import apr.h in the SWIG interface
> > code, because otherwise autogen.sh --release breaks completely.
>
> I see.
>
> > However, I'm not sure that mapping apr_uint32_t to unsigned int will
> > work consistently on 32 and 64 bit platforms. Intuitively, I reckon
> > this breaks and needs to be defined more carefully, so as to map to the
> > right types on both 32 and 64 bit architectures.
>
> I checked apr.h on FreeBSD/i386 (32 bit) and FreeBSD/amd64
> (64 bit) platforms. apr_uint32_t is typemapped as unsigned
> int on both platforms.

Most 64 bit platforms out there are LP64

This means that int is 32 bits, long 64 bits, and pointers 64 bits

Most 32 bit platforms out there are ILP32

This means that int is 32 bits, long 32 bits, and pointers 32 bits

There are some ILP64 platforms out there (ie int, long, and pointers are
64 bit).

The one weird one is Win64, which is LLP64 (int, long = 32 bits,
pointers = 64 bits, long long = 64 bits)

They did this because they didn't change the structures in the win32 api
during the last major transition (win16->win32), so that while people
were rewriting their apps (which the transition basically required),
they would be using structure definitions that were based on explicit
sizes, instead of magic fairy dust.

So now they are stuck with wanting to make porting completely painless,
and having screwed themselves 10-15 years ago by not, while in the
middle of a 16->32 bit transition, thinking that some day there might be
a 32->64 transition.

So basically, for most any platform you can think of, the typedefs
should be okay, as unsigned int is 32 bits.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Oct 23 05:54:25 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.