From: | Martín Marqués <martin(at)2ndquadrant(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Using isatty() on WIN32 platform |
Date: | 2017-11-20 18:27:00 |
Message-ID: | b8899675-9af5-713d-3193-a19325088e57@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
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].
It's true that isatty() is still supported by Visual C (else we'd fail
to compile) but per the documentation it could get removed at any moment.
Instead of just using #ifdef in my patch, I thought we could have a
cleaner patch which would cover all calls for isatty().
Attached is a patch for src/include/ports/win32.h
[1]: https://msdn.microsoft.com/en-us/library/ms235388.aspx
P.D.: Which would be the correct usage, per-standards: with or without
the _ prefix?
--
Martín Marqués http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Attachment | Content-Type | Size |
---|---|---|
win32_isatty.patch | text/x-patch | 449 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-11-20 18:40:57 | Re: [HACKERS] pgbench regression test failure |
Previous Message | Fujii Masao | 2017-11-20 18:11:52 | Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted. |