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: Simon Josefsson
Subject: Re: Buildreport for GnuTLS 2.8.3
Date: Mon, 17 Aug 2009 17:57:48 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

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?

/Simon




reply via email to

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