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/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make