bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Buildreport for GnuTLS 2.8.3


From: Paolo Bonzini
Subject: Re: Buildreport for GnuTLS 2.8.3
Date: Mon, 17 Aug 2009 18:04:34 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3

On 08/17/2009 05:57 PM, Simon Josefsson wrote:
Eric Blake<address@hidden>  writes:

It fails to build on IRIX 5.3 due to missing siginterrupt function:
ld: ERROR 33: Unresolved text symbol "siginterrupt" -- 1st referenced by
tests.o.

Since gnulib does not provide a siginterrupt replacement I instead added
the replacement used by bash 4.0 to tests.c:

Thanks for the report, I believe this should be fixed in gnulib.

I'm not so sure.  POSIX lists siginterrupt as obsolete (in other
words, the better action would be fixing your code to comply
to modern POSIX, rather than making it easy to rely on a
crutch for using an obsolete interface, similar to how we
recommend memset over bzero).

Oh.  I didn't notice that.  There is a slight difference though, since
siginterrupt is still part of POSIX but bzero is not.

However, I share your concern, and no longer feel it is important to
push this into gnulib.  I'm going to fix my code to use sigaction
instead.

I noticed my code does something like this:

#ifndef _WIN32
   old = siginterrupt (SIGALRM, 1);
   alarm (secs);
#else
   setsockopt ((int) gnutls_transport_get_ptr (session), SOL_SOCKET,
              SO_RCVTIMEO, (char *)&secs, sizeof (int));
#endif

I'm thinking that using setsockopt may be more elegant than using a
SIGALRM signal, but I'm not sure.  Any advice?

Solaris and HP-UX do not support SO_RCVTIMEO, unfortunately, according to

http://portabilityblog.com/blog/archives/10-SO_SNDTIMEO-and-SO_RCVTIMEO.html

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]