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 br...@momjian.us writes: I think this is caused because the variable is not defined as SOCKET. The attached patch fixes this.

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 br...@momjian.us 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

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

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 br...@momjian.us 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

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

2014-05-28 Thread Tom Lane
Bruce Momjian br...@momjian.us 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 Bruce Momjian
On Wed, May 28, 2014 at 12:29:28PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us 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

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 alvhe...@2ndquadrant.com 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

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

2014-05-26 Thread Tom Lane
Michael Paquier michael.paqu...@gmail.com writes: On Fri, May 23, 2014 at 10:43 PM, Alvaro Herrera alvhe...@2ndquadrant.com 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':

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 t...@sss.pgh.pa.us 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

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

2014-05-26 Thread Tom Lane
Michael Paquier michael.paqu...@gmail.com writes: On Tue, May 27, 2014 at 1:39 AM, Tom Lane t...@sss.pgh.pa.us 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()

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 hlinnakan...@vmware.com 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

[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:

[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 hlinnakan...@vmware.com 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

[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 and...@dunslane.net 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

[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 and...@dunslane.net writes: I'm pretty sure we need this on Mingw - this SYSTEMQUOTE stuff dates back well before 8.3, IIRC,

[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:

[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:

[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:

[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 and...@dunslane.net 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