Re: [HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-06-16 Thread Bruce Momjian
On Fri, Jun 6, 2014 at 01:18:24PM -0400, Alvaro Herrera wrote: > Bruce Momjian wrote: > > On Wed, May 28, 2014 at 12:29:28PM -0400, Tom Lane wrote: > > > Bruce Momjian writes: > > > > I think this is caused because the variable is not defined as SOCKET. > > > > The attached patch fixes this. Th

Re: [HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-06-06 Thread Alvaro Herrera
Bruce Momjian wrote: > On Wed, May 28, 2014 at 12:29:28PM -0400, Tom Lane wrote: > > Bruce Momjian writes: > > > I think this is caused because the variable is not defined as SOCKET. > > > The attached patch fixes this. This should prevent the warning. > > > > Surely that's just going to move t

Re: [HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-05-28 Thread Bruce Momjian
On Wed, May 28, 2014 at 12:29:28PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > I think this is caused because the variable is not defined as SOCKET. > > The attached patch fixes this. This should prevent the warning. > > Surely that's just going to move the errors somewhere else. The ca

Re: [HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-05-28 Thread Tom Lane
Bruce Momjian writes: > I think this is caused because the variable is not defined as SOCKET. > The attached patch fixes this. This should prevent the warning. Surely that's just going to move the errors somewhere else. The call site still expects the argument to be int[].

Re: [HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-05-28 Thread Jeff Janes
On Wed, May 28, 2014 at 7:38 AM, Bruce Momjian wrote: > On Mon, May 26, 2014 at 09:50:42PM +0900, Michael Paquier wrote: > > > x86_64-w64-mingw32-gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith > -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute > -Wformat-security -fno-s

Re: [HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-05-28 Thread Bruce Momjian
On Mon, May 26, 2014 at 09:50:42PM +0900, Michael Paquier wrote: > > x86_64-w64-mingw32-gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith > > -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute > > -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard >

Re: [HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-05-26 Thread Tom Lane
Michael Paquier writes: > On Tue, May 27, 2014 at 1:39 AM, Tom Lane wrote: >> The best alternative I can think of is to use strncmp() to check for >> whether the head of the string matches "COPY ", and then perform the >> integer conversion using strtoull() #ifdef HAVE_STRTOULL and strtoul() >> o

Re: [HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-05-26 Thread Michael Paquier
On Tue, May 27, 2014 at 1:39 AM, Tom Lane wrote: > The best alternative I can think of is to use strncmp() to check for > whether the head of the string matches "COPY ", and then perform the > integer conversion using strtoull() #ifdef HAVE_STRTOULL and strtoul() > otherwise. What about the attach

Re: [HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-05-26 Thread Tom Lane
Michael Paquier writes: > On Fri, May 23, 2014 at 10:43 PM, Alvaro Herrera > wrote: >> c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.5100/../pgsql/contrib/pg_stat_statements/pg_stat_statements.c: >> In function 'pgss_ProcessUtility': >> c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.510

Re: [HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-05-26 Thread Michael Paquier
On Fri, May 23, 2014 at 10:43 PM, Alvaro Herrera wrote: > x86_64-w64-mingw32-gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith > -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute > -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g > -I../../../

Re: [HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-05-23 Thread Alvaro Herrera
Heikki Linnakangas wrote: > On 05/15/2014 04:15 PM, Michael Paquier wrote: > >On Thu, May 15, 2014 at 6:20 PM, Heikki Linnakangas > > wrote: > >>Ok, I committed #undefs. I don't have a Mingw(-w64) environment to test > >>with, so let's see if the buildfarm likes it. > >There does not seem to be a b

[HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-05-15 Thread Heikki Linnakangas
On 05/15/2014 04:15 PM, Michael Paquier wrote: On Thu, May 15, 2014 at 6:20 PM, Heikki Linnakangas wrote: Ok, I committed #undefs. I don't have a Mingw(-w64) environment to test with, so let's see if the buildfarm likes it. There does not seem to be a buildfarm machine using MinGW-w64... Jac

[HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-05-15 Thread Heikki Linnakangas
On 05/14/2014 06:06 PM, Noah Misch wrote: On Wed, May 14, 2014 at 05:51:24PM +0300, Heikki Linnakangas wrote: On 05/14/2014 05:37 PM, Noah Misch wrote: On Wed, May 14, 2014 at 03:15:38PM +0300, Heikki Linnakangas wrote: On 05/09/2014 02:56 AM, Noah Misch wrote: MinGW: http://sourceforge.net/

[HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-05-14 Thread Noah Misch
On Wed, May 14, 2014 at 05:51:24PM +0300, Heikki Linnakangas wrote: > On 05/14/2014 05:37 PM, Noah Misch wrote: > >On Wed, May 14, 2014 at 03:15:38PM +0300, Heikki Linnakangas wrote: > >>On 05/09/2014 02:56 AM, Noah Misch wrote: > >>>MinGW: > >>>http://sourceforge.net/p/mingw/mingw-org-wsl/ci/mast

[HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-05-14 Thread Heikki Linnakangas
On 05/14/2014 05:37 PM, Noah Misch wrote: On Wed, May 14, 2014 at 03:15:38PM +0300, Heikki Linnakangas wrote: On 05/09/2014 02:56 AM, Noah Misch wrote: MinGW: http://sourceforge.net/p/mingw/mingw-org-wsl/ci/master/tree/include/stdio.h#l467 MinGW-w64: http://sourceforge.net/p/mingw-w64/code/HE

[HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-05-14 Thread Noah Misch
On Wed, May 14, 2014 at 03:15:38PM +0300, Heikki Linnakangas wrote: > On 05/09/2014 02:56 AM, Noah Misch wrote: > >MinGW: > >http://sourceforge.net/p/mingw/mingw-org-wsl/ci/master/tree/include/stdio.h#l467 > >MinGW-w64: > >http://sourceforge.net/p/mingw-w64/code/HEAD/tree/trunk/mingw-w64-headers/

[HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-05-14 Thread Andrew Dunstan
On 05/14/2014 08:15 AM, Heikki Linnakangas wrote: On 05/09/2014 02:56 AM, Noah Misch wrote: On Thu, May 08, 2014 at 12:14:44PM -0400, Tom Lane wrote: Andrew Dunstan writes: I'm pretty sure we need this on Mingw - this SYSTEMQUOTE stuff dates back well before 8.3, IIRC, which is when we first

[HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-05-14 Thread Heikki Linnakangas
On 05/09/2014 02:56 AM, Noah Misch wrote: On Thu, May 08, 2014 at 12:14:44PM -0400, Tom Lane wrote: Andrew Dunstan writes: I'm pretty sure we need this on Mingw - this SYSTEMQUOTE stuff dates back well before 8.3, IIRC, which is when we first got full MSVC support. I tried googling for some

[HACKERS] Re: popen and pclose redefinitions causing many warning in Windows build

2014-05-08 Thread Noah Misch
On Thu, May 08, 2014 at 12:14:44PM -0400, Tom Lane wrote: > Andrew Dunstan writes: > > I'm pretty sure we need this on Mingw - this SYSTEMQUOTE stuff dates > > back well before 8.3, IIRC, which is when we first got full MSVC support. > > I tried googling for some info on this, and got a number o