[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Displaying man pages on Win32
From: |
Werner LEMBERG |
Subject: |
Re: [Groff] Displaying man pages on Win32 |
Date: |
Tue, 27 Jul 2004 01:51:18 +0200 (CEST) |
> The error message emanates from the destructor for the printer
> object, in libdriver/printer.cpp, when any previous error has been
> detected on stdout, or a fflush of stdout fails. In the specific
> instance of a fflush into a broken pipe, the MSVCRT implementation
> of fflush sets errno to EINVAL -- a value which should not normally
> occur in this situation; (it should be EPIPE, but Microsoft don't
> seem to ever use that particular code).
I *love* such stuff :-) Thanks for finding out.
> I have developed a trial patch, (attached), which seems to achieve
> the desired effect. I have not used nonposix.h, since a)
> libdriver/printer.cpp doesn't actually include it at present, and b)
> my proposed solution adds a locally defined static function to
> printer.cpp, in a single conditionally compiled block, for the Win32
> case; this would be difficult to implement as a nonposix.h macro.
For such a single case your solution is definitely the easiest one.
In case we find another place where similar actions have to be taken,
we should separate it.
I wonder whether you should report your findings to the relevant
Windows + Unix mailing groups to help other guys with such nasty
situations...
I'll apply your patch soon. Thanks again!
Werner