Subject: Re: libpl.dll on win32

From: Jan Wielemaker <[email-masked]>
Date: Fri, 25 Feb 2000 13:08:32 +0100

On Fri, 25 Feb 2000, Petr Kocmid wrote:

>Investigating libpl.dll architecture in Dependency
>Walker, it shows libpl dynamic library imports 
>winsock.
>
>wsock32.dll:
>ordinal 18 select
>ordinal 151 __WSDAFDIsSet
>
>I was curious why. Closer look into source shows 
>winsock select() is used 3 times at:
>
>pl-file.c(1038)
>pl-fli.c(2580)
>pl-os.c(2652)
>
>At all those places, it looks like the only purpose of 
>select() is.. timing only. Seems to me as an overkill.

The one in pl-fli.c is not used at all on Win32.  It is used
in the Unix/X11 version to deal with graphical packages, but
this works entirely different in Win32.

The one in pl-os.c is one of the alternatives to deal with
sleep/1, but on Win32 it prevers another.

The one in pl-file.c is real.  It is needed if a stream is
bound to a socket, as is achieved by the socket.pl library.

>Straightforward way to get rid of it is to #undef
>HAVE_SELECT in config/win32.h. I did that and plwin
>is working ok, having no more wsock32.dll binding in 
>libpl.dll.
>
>Am I missed something, or does it make sense to implement 
>another timing method?
>
>What about other platforms?

So, if you give up wait_for_input/3, you can do what you
did.  Otherwise you need it.

	Regards --- Jan