PATCH: Get rid of superfluous dup() and close() calls.
Martin Wilck
Martin.Wilck at Fujitsu-Siemens.com
Thu Feb 6 03:49:17 CST 2003
On Mon, 2003-02-03, I wrote:
> Why is that relevant to Wine? 99% of the Wine code uses DOS/Windows
> functions like WriteFile() anyway. All we need to do is make sure that
> these functions handle the Unix fd's properly (and they will if they
> don't call close()).
What's up, people? I think at least I deserve an answer to this
argument. Or is everybody just too busy?
I am not going to give up easily on this one, because I still think it's
the right thing to do. If anybody is worried about regressions or the
risk of future close() calls, I am willing to care for that.
As for the risk of someone inadvertently close()ing an fd and someone
else writing to it, how about something like this:
static inline int wine_close_unix_fd (int fd) { return close (fd); }
#define close(fd) ERROR --- please dont call close() in Wine !!
in the Wine headers, and changing close() to wine_close_unix_fd()
wherever the close() is found to be legitimate?
Martin
--
Martin Wilck Phone: +49 5251 8 15113
Fujitsu Siemens Computers Fax: +49 5251 8 20409
Heinz-Nixdorf-Ring 1 mailto:Martin.Wilck at Fujitsu-Siemens.com
D-33106 Paderborn http://www.fujitsu-siemens.com/primergy
More information about the wine-devel
mailing list