Re: ptsname_r on Cygwin

2021-01-22 Thread Ken Brown
On 1/21/2021 5:45 PM, Ken Brown wrote: On 1/21/2021 3:26 PM, Bruno Haible wrote: Ken Brown wrote: Thanks for the report.  I've submitted a patch that fixes this:     https://cygwin.com/pipermail/cygwin-patches/2021q1/010995.html Thanks. EBADF is the more "proper" errno value here, for fd < 0

Re: ptsname_r on Cygwin

2021-01-21 Thread Ken Brown
On 1/21/2021 3:26 PM, Bruno Haible wrote: Ken Brown wrote: Thanks for the report. I've submitted a patch that fixes this: https://cygwin.com/pipermail/cygwin-patches/2021q1/010995.html Thanks. EBADF is the more "proper" errno value here, for fd < 0. But glibc produces errno ENOTTY in thi

Re: ptsname_r on Cygwin

2021-01-21 Thread Bruno Haible
Ken Brown wrote: > Thanks for the report. I've submitted a patch that fixes this: > >https://cygwin.com/pipermail/cygwin-patches/2021q1/010995.html Thanks. EBADF is the more "proper" errno value here, for fd < 0. But glibc produces errno ENOTTY in this case; so it should be acceptable too.

Re: ptsname_r on Cygwin

2021-01-21 Thread Ken Brown
Hi Bruno, On 1/20/2021 1:31 AM, Bruno Haible wrote: Hi Ken, On Cygwin 2.9 (64-bit) I see a test failure in test-ptsname_r.c, here: { char buffer[256]; int result; result = ptsname_r (-1, buffer, sizeof buffer); ASSERT (result != 0); // < HERE

Re: ptsname_r on Cygwin

2021-01-20 Thread Bruno Haible
> While https://www.kernel.org/doc/man-pages/online/pages/man3/ptsname_r.3.html > says that ptsname_r, upon failure, should return an error code, on Cygwin, > it returns 0 and stores the empty string in 'buffer'. Let me document this issue. 2021-01-20 Bruno Haible doc: Document ptsna

ptsname_r on Cygwin

2021-01-19 Thread Bruno Haible
Hi Ken, On Cygwin 2.9 (64-bit) I see a test failure in test-ptsname_r.c, here: { char buffer[256]; int result; result = ptsname_r (-1, buffer, sizeof buffer); ASSERT (result != 0); // < HERE ASSERT (result == EBADF || result == ENOTTY); } While h