Re: A Windows x64 port of PostgreSQL

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "Ken Camann" <kjcamann(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: A Windows x64 port of PostgreSQL
Date: 2008-07-03 12:53:35
Message-ID: 200807031453.35980.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Am Donnerstag, 3. Juli 2008 schrieb Ken Camann:
> > Anyway, back to the immediate problem. What would probably make sense
> > to try as a first step is something like
> >
> > #ifndef WIN64
> > typedef unsigned long Datum; /* XXX sizeof(long) >= sizeof(void *) */
> > #else
> > typedef unsigned long long Datum; /* Microsoft's out in left field
> > */ #endif
> >
> > and see how many warnings that eliminates ...
>
> It's a question about style. If Microsoft Visual C really is the only
> one like this, then I guess there is no harm in #ifdef _WIN64 instead
> of #ifdef (some other name that captures the peculiarity of what is
> happening but isn't MSFT dependent). win32.h (not written by me)
> already defines SIZEOF_SIZE_T and SIZEOF_LONG_INT (or something like
> that)...It might be a better idea to use those two.

Style is something that we can worry about later, once we know how the code is
supposed to behave. Coding Datum to be >= sizeof(* void) _and_ >=
sizeof(long) and whatever else isn't that hard to do stylishly later on.

> But the thing is, this isn't the only issue. There is the fact that
> "int" appears in c.h for memory offsets and not long. As long as I
> might have to change a whole lot of this stuff to make exceptions for
> windows, I was wondering what the community thinks of the way this is
> all currently handled and what advice they have might have for me when
> changing stuff.

Present us the actual problems as you discover them, and we will find a
solution. Right now we are just guessing.

> There seems to be two problems that affect 64-bit POSIX systems too:

Well, 64-bit POSIX works just fine, so unless you can present an actual
failure in practice, I suggest you do not worry about this.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2008-07-03 12:54:29 Re: Resolving polymorphic functions with relateddatatypes
Previous Message Simon Riggs 2008-07-03 12:34:05 Re: Resolving polymorphic functions with related datatypes