curl-library
RE: non-blocking sockets portability test
Date: Wed, 26 Sep 2001 18:09:49 -0700
Solaris 8 Intel output (note that just "gmake" did not work, it just
assumed it was a linux config... only "gmake solaris" worked):
> ./configure
checking build system type... i386-pc-solaris2.8
checking host system type... i386-pc-solaris2.8
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking non-blocking sockets style... O_NONBLOCK
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
> gmake solaris
gcc -o connect connect.c -lnsl -lsocket
> gmake test
./connect www.haxx.se
Non-blocking socket set
connect() returned -1
select() returned 1
returned 0
gmake: *** [test] Error 11
>
-----Original Message-----
From: curl-library-admin_at_lists.sourceforge.net
[mailto:curl-library-admin_at_lists.sourceforge.net]On Behalf Of Daniel
Stenberg
Sent: Wednesday, September 26, 2001 6:40 AM
To: Curl Mailinglist
Cc: libcurl Mailing list
Subject: non-blocking sockets portability test
Hey ho!
[crossposted mail, keep future mails in this subject on the libcurl list]
Instead of doing anything else, I've started to improve how connects are
made
in libcurl. I've decided to introduce non-blocking connects for those
operating systems that support them (which I suppose most operating systems
do).
This time, I'm taking a rather casual approach and I've hacked up a
separate
test program I want us to make compile and run on as many operating systems
as possible.
The package is currently 53108 bytes and you get it here:
http://curl.haxx.se/dev/nonblockconnect.tar.gz
I would like to urge as many as possible to get this, unpack, run
configure,
and then compile and run 'make test'. If anything was needed to get it to
compile or build, submit a fix. When successful, please post what OS you're
using.
The actual test program is a less than 200 lines C source. There's also a
configure script named 'nonblock.m4' included in the package that we need
to
make sure works for most/all systems.
It seems to already work fine on Solaris (2.7) and Linux (2.4). I would
especially like to know the mileage on windows machines and machines that
don't support O_NONBLOCKING. Amiga seems to have its own system too, but I
wouldn't really expect anyone to actually have one to try this on... B-]
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2001-09-27