Re: [HACKERS] ssize_t vs win64

2010-01-02 Thread Peter Eisentraut
On sön, 2010-01-03 at 00:24 +0100, Magnus Hagander wrote: > On Sun, Jan 3, 2010 at 00:20, Peter Eisentraut wrote: > > On lör, 2010-01-02 at 16:29 +0100, Magnus Hagander wrote: > >> On Sat, Jan 2, 2010 at 16:23, Peter Eisentraut wrote: > >> > On lör, 2010-01-02 at 15:42 +0100, Magnus Hagander wrot

Re: [HACKERS] ssize_t vs win64

2010-01-02 Thread Tom Lane
Bruce Momjian writes: > OK, so my question is whether __int64 is the right definition or only > what Python chose. I see no reason to question either the width or the signedness. If you do, feel free to research away. regards, tom lane -- Sent via pgsql-hackers mailing

Re: [HACKERS] ssize_t vs win64

2010-01-02 Thread Bruce Momjian
Magnus Hagander wrote: > On Sun, Jan 3, 2010 at 01:01, Bruce Momjian wrote: > > Tom Lane wrote: > >> Bruce Momjian writes: > >> > Tom Lane wrote: > >> >> I think the Python guys are up against the same problem as us, namely > >> >> substituting for the platform's failure to define the type. > >>

Re: [HACKERS] ssize_t vs win64

2010-01-02 Thread Magnus Hagander
On Sun, Jan 3, 2010 at 01:01, Bruce Momjian wrote: > Tom Lane wrote: >> Bruce Momjian writes: >> > Tom Lane wrote: >> >> I think the Python guys are up against the same problem as us, namely >> >> substituting for the platform's failure to define the type. >> >> > I am unclear if accepting what P

Re: [HACKERS] ssize_t vs win64

2010-01-02 Thread Tom Lane
Bruce Momjian writes: > Well, I saw two definitions listed in this thread, and it wasn't clear > to me the Python one was known to be the correct one: > PostgreSQL has it as > typedef long ssize_t; That one is our 32-bit-only definition. regards, tom lane --

Re: [HACKERS] ssize_t vs win64

2010-01-02 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Tom Lane wrote: > >> I think the Python guys are up against the same problem as us, namely > >> substituting for the platform's failure to define the type. > > > I am unclear if accepting what Python chose as a default is the right > > route vs. doing m

Re: [HACKERS] ssize_t vs win64

2010-01-02 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> I think the Python guys are up against the same problem as us, namely >> substituting for the platform's failure to define the type. > I am unclear if accepting what Python chose as a default is the right > route vs. doing more research. What exactly do

Re: [HACKERS] ssize_t vs win64

2010-01-02 Thread Bruce Momjian
Tom Lane wrote: > Magnus Hagander writes: > > On Sun, Jan 3, 2010 at 00:20, Peter Eisentraut wrote: > >> Seems kind of buggy. ?They shouldn't be defining it at all. > > > Why not? Should they just stop using it? In that case, so should we, no? > > What's buggy is M$ failing to provide it in the

Re: [HACKERS] ssize_t vs win64

2010-01-02 Thread Tom Lane
Magnus Hagander writes: > On Sun, Jan 3, 2010 at 00:20, Peter Eisentraut wrote: >> Seems kind of buggy.  They shouldn't be defining it at all. > Why not? Should they just stop using it? In that case, so should we, no? What's buggy is M$ failing to provide it in their header. It's unlikely they

Re: [HACKERS] ssize_t vs win64

2010-01-02 Thread Magnus Hagander
On Sun, Jan 3, 2010 at 00:20, Peter Eisentraut wrote: > On lör, 2010-01-02 at 16:29 +0100, Magnus Hagander wrote: >> On Sat, Jan 2, 2010 at 16:23, Peter Eisentraut wrote: >> > On lör, 2010-01-02 at 15:42 +0100, Magnus Hagander wrote: >> >> When trying to build plpython on win64, it fails because

Re: [HACKERS] ssize_t vs win64

2010-01-02 Thread Peter Eisentraut
On lör, 2010-01-02 at 16:29 +0100, Magnus Hagander wrote: > On Sat, Jan 2, 2010 at 16:23, Peter Eisentraut wrote: > > On lör, 2010-01-02 at 15:42 +0100, Magnus Hagander wrote: > >> When trying to build plpython on win64, it fails because ssize_t is > >> defined differently. > >> > >> PostgreSQL ha

Re: [HACKERS] ssize_t vs win64

2010-01-02 Thread Magnus Hagander
On Sat, Jan 2, 2010 at 16:59, Tom Lane wrote: > Magnus Hagander writes: >> I'm not entirely sure what the type is for, though, > > It's supposed to be the same width as size_t but signed.  I would assume > that it should be 64 bits on Win64. Yeah, seems reasonable. I'll put in that #ifdef in win

Re: [HACKERS] ssize_t vs win64

2010-01-02 Thread Tom Lane
Magnus Hagander writes: > I'm not entirely sure what the type is for, though, It's supposed to be the same width as size_t but signed. I would assume that it should be 64 bits on Win64. According to SUS this type should be provided by sys/types.h: http://www.opengroup.org/onlinepubs/007908799/x

Re: [HACKERS] ssize_t vs win64

2010-01-02 Thread Magnus Hagander
On Sat, Jan 2, 2010 at 16:23, Peter Eisentraut wrote: > On lör, 2010-01-02 at 15:42 +0100, Magnus Hagander wrote: >> When trying to build plpython on win64, it fails because ssize_t is >> defined differently. >> >> PostgreSQL has it as >> typedef long ssize_t; >> >> And python has it as: >> typede

Re: [HACKERS] ssize_t vs win64

2010-01-02 Thread Peter Eisentraut
On lör, 2010-01-02 at 15:42 +0100, Magnus Hagander wrote: > When trying to build plpython on win64, it fails because ssize_t is > defined differently. > > PostgreSQL has it as > typedef long ssize_t; > > And python has it as: > typedef __int64 ssize_t; What file/line is that? I don't see that i

[HACKERS] ssize_t vs win64

2010-01-02 Thread Magnus Hagander
When trying to build plpython on win64, it fails because ssize_t is defined differently. PostgreSQL has it as typedef long ssize_t; And python has it as: typedef __int64 ssize_t; The postgresql deifnition comes from include/port/win32.h, which leads me to think that we should just change that on