Re: win32 and glib, socket data inaccessible



On Fri, Jul 01, 2005 at 07:13:29AM +0200, Marc Lehmann <gtk-perl schmorp de> wrote:
I'll do some research.

Ok, activestateperl changed sth. "recently", does it's own filehandle
namespace, and exports win32_get_osfhandle, which finally returns the
correct handle (and is aliases to _get_osfhandle in older releases).

I checked in a patch to Glib. Feel free to inflict pain on me if I did
something bad :)

In any case, as the fd space seems not to be the msvcrt fd namespace and I
have no idea how to convert a perl fd to a msvcrt fd (which glib seems to
need), I just call g_io_channel_win32_new_socket on win32 (it doesn't make
much sense to add watchers to other types of fd, I guess, as pipes seem to
be sockets, too, under windows).

This shouldn't break anything (after all, it didn't work before), not
even cygwin, which hopefully doesn't define USE_SOCKETS_AS_HANDLES, but who
knows...

(If somebody tells me how to create a ppm I can create one, too).

-- 
                The choice of a
      -----==-     _GNU_
      ----==-- _       generation     Marc Lehmann
      ---==---(_)__  __ ____  __      pcg goof com
      --==---/ / _ \/ // /\ \/ /      http://schmorp.de/
      -=====/_/_//_/\_,_/ /_/\_\      XX11-RIPE



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