Re: Using isatty() on WIN32 platform

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Martín Marqués <martin(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Using isatty() on WIN32 platform
Date: 2017-11-21 01:29:50
Message-ID: CAMsr+YEXUk8_ZAiD530k3CCT=rHJ2pDSUYrQs3mSc-rqRMZhGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 21 November 2017 at 03:53, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> =?UTF-8?Q?Mart=c3=adn_Marqu=c3=a9s?= <martin(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-11-21 01:30:00 Re: [HACKERS] Index only scan for cube and seg
Previous Message Craig Ringer 2017-11-21 01:26:29 Re: Add PGDLLIMPORT lines to some variables