Re: PATCH: LWPng-alpha on Windows NT

Blair Zajac (blair@gps.caltech.edu)
Fri, 3 Jul 1998 12:27:19 -0700 (PDT)


I'm cc'ing this message to Gurusamy Sarathy because he knows a lot
about WinNT systems.

Gisle Aas writes:

> Blair Zajac <blair@gps.caltech.edu> writes:
> 
> > I've completed porting LWPng-alpha to Windows NT.
> 
> Very nice!
> 
> > I'm including below the complete patch for LWPng-alpha 0.21.  It
> > fixes a few things:
> > 
> > 1) Add LWP::Extras that calculates EINPROGRESS and defines
> >    IO::Handle::blocking.
> > 2) Replace the EINPROGRESS and IO::Handle::blocking code from LWP::Conn::HTTP
> >    and LWP::Conn::_Connet with use LWP::Extras.
> > 3) Have LWPng-alpha/Makefile.PL require LWP 5.33.
> 
> I have some touble with this.  I would really like to avoid adding XS
> code to LWP and I don't really like the LWP::Extras name either.
> Wouldn't it be much better to just say that you need IO-1.19 installed
> to make it work on WinNT?

What about older versions of Perl?  Are we going to require an upgrade in
either IO or Perl to use LWPng-alpha?  In my experience, putting a newer
IO in an older Perl hasn't always worked too well.

> 
> Does IO-1.19 work on WinNT?
> 
> > 4) In LWP::Conn::FILE test for the existence of getpwuid and getgrgid.  These
> >    were causing the main failures of LWPng on NT.
> 
> This part of patch has been applied.
> 
> > Gisle, again, could you put out a new LWPng-alpha 0.22 release soon?  I'm
> > releasing another package that will need these patches installed and
> > these patches will also allow WebFS::FileCopy to work on NT.
> 
> I would also like to see it work on NT, but I would prefer if we just
> made the IO modules do the work.
> 
> ... or just test $^O and hardcode some EINPROGRESS that works for
> WinNT?

We could do that.  EINPROGRESS on WinNT is 10036.  I don't know for sure
if the socket calls will return EINPROGRESS if the socket call will block.
Somebody else may need to answer this.

The latest Errno in perl 5.004_69 package doesn't seem to find EINPROGRESS.
I don't have an NT box here at home, but that's what I recall from getting
LWPng-alpha going on NT at work.  I'm by no means a WinNT expert here, but
here are my comments.  Errno on WinNT did not appear to set EINPROGRESS.
In examining the winsock.h, it looks somewhat like this

#define WSABASEERROR 10000
.
.
.
.
#define WSAEINPROGRESS WSABASEERROR + 36
.
.
.
/* We (Microsoft) decided not to define these for some reason. */
#if 0
.
.
#define EINPROGRESS WSAEINPROGRESS
.
.
#endif

The whole file looks like this and defines a whole series of WSA constants.
We may need to look for the WSA constants and convert these to the standard
E constants.  Do we use these WSA constants?

Blair