Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Hackers > Re: A Windows x...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 12 Topic 9614 of 11009
Post > Topic >>

Re: A Windows x64 ****t of PostgreSQL

by tgl@[EMAIL PROTECTED] (Tom Lane) Jul 3, 2008 at 12:39 AM

"Ken Camann" <kjcamann@[EMAIL PROTECTED]
> writes:
> Well actually, let me be as strict as possible because I don't know
> the latest C standards very well (I am a C++ programmer).  Am I
> correct that the standard says that sizeof(size_t) must be
> sizeof(void*), and that no compiler has ever said otherwise?

I'm not sure that the spec actually requires that in so many words,
but it's hard to imagine a sane implementation where it isn't true.
(Now, I've worked on some less-than-sane hardware, but that stuff
all died the real death in the eighties or so.  Flat memory models
have been the only kind anyone would tolerate for a long time now.)

> EMT64/AMD64 is new compared to the older architectures, I
> would guess the older ones predate the time when it became a somewhat
> de facto standard to leave "long int" at 4 bytes, and make "long long"
> the new 64-bit type.

Apparently your definition of "de facto standard" is "any idiotic
decision Microsoft cares to make".  AFAIK there is *no* system other
than WIN64 where long is narrower than size_t; and I rather doubt that
there ever will be any.  "long long" is generally understood to mean
a type that the hardware sup****ts, but not very efficiently (ie, it's
double the native word width) --- and one would hope that pointers
are not in that category.  On a 64-bit machine LL really ought to
denote 128-bit arithmetic ... I wonder what curious syntax Microsoft
will invent when they realize their compilers ought to sup****t that?

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 ...

			regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
 




 12 Posts in Topic:
Re: A Windows x64 port of PostgreSQL
kjcamann@[EMAIL PROTECTED  2008-07-02 15:32:43 
Re: A Windows x64 port of PostgreSQL
dpage@[EMAIL PROTECTED]   2008-07-02 21:14:33 
Re: A Windows x64 port of PostgreSQL
tgl@[EMAIL PROTECTED] (T  2008-07-02 20:43:26 
Re: A Windows x64 port of PostgreSQL
kjcamann@[EMAIL PROTECTED  2008-07-03 00:13:55 
Re: A Windows x64 port of PostgreSQL
tgl@[EMAIL PROTECTED] (T  2008-07-03 00:39:20 
Re: A Windows x64 port of PostgreSQL
kjcamann@[EMAIL PROTECTED  2008-07-03 01:45:06 
Re: A Windows x64 port of PostgreSQL
mark@[EMAIL PROTECTED] (  2008-07-03 03:19:49 
Re: A Windows x64 port of PostgreSQL
peter_e@[EMAIL PROTECTED]  2008-07-03 14:53:35 
Re: A Windows x64 port of PostgreSQL
tgl@[EMAIL PROTECTED] (T  2008-07-03 12:07:41 
Re: A Windows x64 port of PostgreSQL
mark@[EMAIL PROTECTED] (  2008-07-03 13:18:19 
Re: A Windows x64 port of PostgreSQL
kleptog@[EMAIL PROTECTED]  2008-07-04 10:51:03 
Re: A Windows x64 port of PostgreSQL
rm_pg@[EMAIL PROTECTED]   2008-07-05 17:40:06 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 7:55:46 CST 2008.