Using isatty() on WIN32 platform
От
Martín Marqués
Тема
Using isatty() on WIN32 platform
Дата
Msg-id
b8899675-9af5-713d-3193-a19325088e57@2ndquadrant.com
Список
Дерево обсуждения
Using isatty() on WIN32 platform Martín Marqués <martin@2ndquadrant.com>
Re: Using isatty() on WIN32 platform Tom Lane <tgl@sss.pgh.pa.us>
Re: Using isatty() on WIN32 platform Craig Ringer <craig@2ndquadrant.com>
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
В списке pgsql-hackers по дате отправления
От: Fujii Masao
Дата: