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. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers