bug-gnulib
[Top][All Lists]
Advanced

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

Re: [RFT/RFH] porting the poll module to win32


From: Simon Josefsson
Subject: Re: [RFT/RFH] porting the poll module to win32
Date: Mon, 18 Aug 2008 12:45:32 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux)

Paolo Bonzini <address@hidden> writes:

> Hi,
>
> a while ago a user of GNU Smalltalk contributed code to run the
> emulation of poll in gnulib under Win32.  The code was a little
> hackish, as it worked by emulating other POSIX system calls "as well
> as it was needed" to emulate poll; so I never contributed it to
> gnulib.
>
> Now, however, I merged that code with the gnulib poll.c in order to
> obtain a native poll emulation for Win32 (MinGW).  It supports
> sockets, console handles, and disk files.  Adding named pipes would
> not be hard, and can be done later.
>
> However, I don't have any way to test it.  It might not even compile,
> in fact.  Can anybody help?

Cool!  GnuTLS's command-line tools (gnutls-cli and gnutls-serv) uses
select() which doesn't exists under Windows, and we've used a
replacement-hack as well:

http://git.savannah.gnu.org/gitweb/?p=gnutls.git;a=blob;f=src/select.c;hb=HEAD

I'd like to depend on a gnulib module instead.

GnuTLS uses select to read from one socket and to read from
fileno(stdin).  You say "console handles" above, but does that mean
stdin?  If you believe I should be able to modify the code to use poll
instead of select, and to use your module successfully for mingw32, I
could give it a try.

/Simon




reply via email to

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