cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Changes for MPE/iX

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 29 Jan 2004 16:26:15 +0100 (CET)

On Sun, 25 Jan 2004, Ken Hirsch wrote:

> Hello. My name is Ken Hirsch. I'm working on porting Curl-7.11.0 to the
> MPE/iX operating system (the OS for almost defunct HP3000). It's a great
> progam. Thanks a lot.

Thanks for helping us making it run on more platforms!

> 1. add <limits.h> to main.c
> Evidently that's already been added since pre1.

Yeps, it is done in CVS. (Can't remember about the release version, but I tend
to only really care about the current dev situation.)

> 2. Change all the "mv" to "mv -f" in configure
>
> Otherwise I get prompted for confirmation every time mv overwrites an
> existing file, e.g. in the loop with "mv conftest.tmp conftest.in"
>
> Some of the "mv" already have "-f", so I don't expect any problems.
>
> Rather than submit a patch, it would be simpler if you would just
> perl -i.bak -pe 's/\bmv +([^-\s])/mv -f $1/g' aclocal.m4
> and re-run autoconf.

Uh. This is certainly a nice command line and fix, but I really don't like
having to "manually" patch the output of 'aclocal' (which that aclocal.m4 is).
I figure I need to add that command line to the 'buildconf' script so that it
won't be neglected when we rebuild stuff...

I believe mv -f is portable enough for configure, as it already uses that at
several places within the script.

Have you considered approach the autoconf developers with this request so that
future versions of aclocal could do this by itself?

> 3. Add the following three lines to lib/if2ip.c (if2ip.diff attached)
> #ifdef mpeix
> #define IOCTL_3_ARGS
> #endif

I prefer to have such ifdef magic in the setup.h file, so I added it there and
I moved the other IOCTL_3_ARGS #defines from if2ip.c to that file as well!

> 4. Swap these two lines in lib/connect.c (connect1.diff attached)

...

> My OS is broken in requiring this, but I don't think there would be
> any adverse effect in doing this.

That should be safe indeed.

> 5. I need to call getsockopt(... SO_ERROR) to clear the EINPROGRESS
> error after the connect call. Otherwise verifyconnect still gives an
> error after the select(). I think the most logical place to put this
> call is in waitconnect before the select().
>
> So I added these lines at the beginning of the function:
>
> #if defined(SO_ERROR) && !defined(WIN32)
> int err = 0;
> socklen_t errSize = sizeof(err);
>
> /* Clear any error condition on socket */
> getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (void *)&err, &errSize);
> #endif

I modified this fix to instead simply call the verifyconnect() function, as
that will do exactly this operation with the same #ifdef logic.

> That's all for now. Most tests pass, although a few do not, so I may have
> more later.

After this mail, I'll commit your changes with my edits, so I suggest you get
the sources from CVS or download a daily build tomorrow to see if it builds
fine for you now!

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Received on 2004-01-30