Re: Using isatty() on WIN32 platform - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: Using isatty() on WIN32 platform
Date
Msg-id CAMsr+YEXUk8_ZAiD530k3CCT=rHJ2pDSUYrQs3mSc-rqRMZhGw@mail.gmail.com
Whole thread Raw
In response to Re: Using isatty() on WIN32 platform  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 21 November 2017 at 03:53, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Martín Marqu=c3\xA9s <martin@2ndquadrant.com> writes:
> While following suggestions from Arthur Zakirov on a patch for
> pg_basebackup I found that we are using isatty() in multiple places, but
> we don't distinguish the WIN32 code which should use _isatty() as per [1].

I dunno, [1] looks like pure pedantry to me.  Unless they intend to stop
conforming to POSIX at all, they aren't going to be able to remove the
isatty() spelling.

I agree that it's meaningless pedantry, and we should just suppress any warning and get on with our lives.
 
If you're seeing warnings from use of isatty(), I'd be inclined to think
about dealing with it by adding #define _CRT_NONSTDC_NO_WARNINGS,
rather than trying to individually #define every affected function.


Yes, this.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Add PGDLLIMPORT lines to some variables
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Index only scan for cube and seg