Re: [HACKERS] Windows 64 bit warnings

2011-04-25 Thread Michael Meskes
> One is at src/interfaces/ecpg/ecpglib/sqlda.c:231, which is this line: > >sqlda->sqlvar[i].sqlformat = (char *) (long) PQfformat(res, i); > > I'm not clear about the purpose of this anyway. It doesn't seem to After not hearing from the author I just commented out that line. I cannot find a

Re: [HACKERS] Windows 64 bit warnings

2011-04-19 Thread Tom Lane
Andrew Dunstan writes: > If we cast the HANDLE to a long long first and then truncate it the > compiler is silent, it only complains if that's done in one operation. > So maybe something like: > #ifdef WIN64 > #define ULONGPID(x) (unsigned long) (unsigned long long) (x) > #else >

Re: [HACKERS] Windows 64 bit warnings

2011-04-19 Thread Michael Meskes
On Sat, Apr 16, 2011 at 08:46:44PM -0400, Andrew Dunstan wrote: > One is at src/interfaces/ecpg/ecpglib/sqlda.c:231, which is this line: > >sqlda->sqlvar[i].sqlformat = (char *) (long) PQfformat(res, i); > > I'm not clear about the purpose of this anyway. It doesn't seem to > be used anywhere

Re: [HACKERS] Windows 64 bit warnings

2011-04-19 Thread Andrew Dunstan
On 04/19/2011 04:08 AM, Magnus Hagander wrote: IIRC, even while HANDLE is a 64-bit value on Win64, only the lower 32-bits are actually used. Took me a while to find a ref, but this is one I found: http://msdn.microsoft.com/en-us/library/aa384203(v=vs.85).aspx Good. I think all we need here

Re: [HACKERS] Windows 64 bit warnings

2011-04-19 Thread Magnus Hagander
On Mon, Apr 18, 2011 at 19:00, Tom Lane wrote: > Alvaro Herrera writes: >> Excerpts from Andrew Dunstan's message of sáb abr 16 21:46:44 -0300 2011: >>> The other, slightly more serious case, is at >>> src/test/regress/pg_regress.c:2280, which is this code: >>> >>> printf(_("running on port %d wi

Re: [HACKERS] Windows 64 bit warnings

2011-04-18 Thread Tom Lane
Alvaro Herrera writes: > Excerpts from Andrew Dunstan's message of sáb abr 16 21:46:44 -0300 2011: >> The other, slightly more serious case, is at >> src/test/regress/pg_regress.c:2280, which is this code: >> >> printf(_("running on port %d with pid %lu\n"), >> port, (unsigned long) postmaster_

Re: [HACKERS] Windows 64 bit warnings

2011-04-18 Thread Alvaro Herrera
Excerpts from Andrew Dunstan's message of sáb abr 16 21:46:44 -0300 2011: > The other, slightly more serious case, is at > src/test/regress/pg_regress.c:2280, which is this code: > > printf(_("running on port %d with pid %lu\n"), > port, (unsigned long) postmaster_pid); > > Here th

[HACKERS] Windows 64 bit warnings

2011-04-16 Thread Andrew Dunstan
While looking into setting up some libraries to use for 64 bit Windows builds, I took a quick look at the output from the 64 bit postgres builds currently running. They're actually quite clean, a heck of a lot cleaner than several other packages I have been looking at, quite a good testament