This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: fdopen() and winsock


JRSON@NetZero.Net (John R Hanson) writes:
> Actually They are regular file handles, just like any other.
> There is a bug in all 9x/kernel32 libc/msv/crtdll interface
> implementations GetFileType() returns TYPE_UNKNOWN for handles to
> sockets. Since this is AFAIK the only unknown type there is, you know you hav
> e
> a socket handle;-)

Thanks for the clarification. My MSDN CD does document this and I guess
that makes it a "feature" rather than a bug ;-)

I may consider adding a GetFileType interface in mingw runtime (under
a "bug fix" library that you have to explicitly link to).

> there is a fix in the more recent perl distrib's
> that you can use as a general solution.
> -loldnames -lperlcrt -lmsvcrt will get you TYPE_CHAR
> for socket handles. that are put into an fd with _open_osfhandle()
> also fixes several other nasty bugs in the MS libcXXX.

I see references to PerlCRT DLL, but can't find the source nor any
mention of what license it's disributed under. Anyone with more info
on it?  If it's not free (in either the GNU/gratis or BSD-style free 
software sense), then, as far as I'm concerned, it's irrelevant. 

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]