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

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: popen and pclose redefinitions causing many warning in Windows build
Date: 2014-05-08 17:00:29
Message-ID: 536BB82D.7080503@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 05/08/2014 12:14 PM, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)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 got a number of hits
> suggesting that mingw didn't emulate popen at all till pretty recently.
> For instance this:
> https://lists.fedoraproject.org/pipermail/fedora-mingw/2009-September/002087.html
> Jones is an ex-coworker of mine, and I'm pretty sure that if he said
> it wasn't there then it wasn't there.
>
> So I'm confused about how this worked at all in mingw back-when.

Mingw didn't, possibly, but we didn't rely on that. The MS C runtime
library (msvcrt.dll_ has had _popen() forever, and we had this for
Windows in PG 8.0 and have it still in all the back branches AFAICT:

#define popen(a,b) _popen(a,b)
#define pclose(a) _pclose(a)

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-05-08 17:40:21 Re: PQputCopyEnd doesn't adhere to its API contract
Previous Message Tom Lane 2014-05-08 16:53:35 Re: PQputCopyEnd doesn't adhere to its API contract