bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #33134] spurious error when stdout is already closed


From: David Boyce
Subject: [bug #33134] spurious error when stdout is already closed
Date: Thu, 21 Apr 2011 16:25:22 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16

Follow-up Comment #2, bug #33134 (project make):

My original one-line patch had two mistakes, which may be a record! In the
course of work for enhancement #33138 I made a macro:

#define STREAM_OK(strm) ((fcntl(fileno((strm)), F_GETFD) != -1) || (errno !=
EBADF))

whose logic would be much better than the original ftell(). Turns out that on
many platforms ftell cannot be used on a non-seekable descriptor at all. My
development is on Solaris where ftell works as a go/no-go indicator, but that
isn't portable. And the EBADF test is required for reasons which are obvious
and also discussed in the email thread.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?33134>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]