cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: HP-UX Saga

From: Rick Jones <raj_at_tardy.cup.hp.com>
Date: Wed, 27 Nov 2002 10:54:59 -0800 (PST)

> > I've compiled libcURL for HP-UX 11.00 using OpenSSL 0.9.6g with
> > the HP aCC compiler. I'm having an odd problem I was hoping
> > someone could help me with.
>
> I've never used aCC nor have I any access to any HP-UX machines, but
> I'll give my view of things anyway.
And I am far from a compiler expert, but my understanding is that it
isn't until the IPF compilers (IPF == Itanium Processor Family, what
some call IA64) that ANSI C and C++ are handled by the same compiler.
I tink that until then it is still suggested that one compile C with
the ANSI C compiler.
> > I added some debugging messages to the libcURL code and found that when
> > non-blocking sockets are used, OpenSSL will sometimes return
> > SSL_ERROR_SYSCALL with errno set to EAGAIN. The problem is that errno is a
> > global variable and one thread may change it before another thread looks at
> > it. At least, that is how it appears.
>
> Is it really (a problem with errno and threads)? Most modern unixes have
> fixed the early problems with errno being a single global variable.
If the proper compile-time defines are set then on HP-UX indeed errno
becomes a function returning the per-thread error number. I think that
one needs to be compiled (and that would be everything - the app, the
libcURL, the OpenSSL...) with something like -D_REENTRANT.
rick jones

-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
Received on 2002-11-27