[Top][All Lists]

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

Re: [PATCH] implement full-blown select(2) for winsock

From: Simon Josefsson
Subject: Re: [PATCH] implement full-blown select(2) for winsock
Date: Tue, 23 Sep 2008 18:33:13 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux)

Paolo Bonzini <address@hidden> writes:

>> the stdio module [...]
>> does not pull in the fopen module, even though the fopen module
>> makes fopen function work *the way anyone including stdio.h would
>> expect them work*.
> I disagree on the "anyone" part.  I never missed the fopen module, but
> I'm sure everyone who wrote cross-platform socket code did direct some
> @#$% at whoever invented Winsock.

The choice of fopen was merely an illustration, I'm sure there are
gnulib modules for system functions that fix critical issues on some
platform.  Looking through the documentation gives the example of
'truncl' crashing on some platforms, but the math.h module doesn't pull
in the truncl replacement.

A more relevant example may be the many *printf functions.  The
documentation says they can crash on some platforms, and they produce
incorrect results on others, yet the stdio.h module does not pull in
*printf replacement.

However, I read on opengroup.org about sys/select.h and the only
non-select function related definition the header adds is timeval, which
can be found in sys/time.h too.  So essentially the entire sys/select.h
header is only for the select function.  Then I would agree that the
module should also include the replacement for the select function, that
is similar how other function-specific modules in gnulib works (e.g.,
argp, iconv).  In this case, the tradition is that the gnulib module
name is named after the function and not the header file, though, so
possibly you could rename sys_select to select?  Maybe it is not worth
the breakage though, you decide.

So I have reconsidered, and your last patch seems fine to me.  Please
push it.


reply via email to

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