Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Feb 1997 17:32:42 -0800 (PST)
From:      Mike Pritchard <mpp>
To:        bde@zeta.org.au (Bruce Evans)
Cc:        bde@zeta.org.au, freebsd-hackers@freefall.freebsd.org
Subject:   Re: sig*set macros in <signal.h>
Message-ID:  <199702280132.RAA00137@freefall.freebsd.org>
In-Reply-To: <199702271114.WAA28126@godzilla.zeta.org.au> from "Bruce Evans" at Feb 27, 97 10:14:34 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans wrote:
> 
> >> >Is there a good reason for having the sig*set macros defined
> >> >in <signal.h> and the equivalent functions in libc?
> 
> >> [Long answer.]
> 
> >Let's try this again.
> 
> >Can we remove the macro definitions, and just rely on the functions?
> 
> Not so long answer: why do you want to?  Some versions of Linux
> removed them because they are buggy, but the FreeBSD libc versions
> are equally buggy.
> 
> Short answer: no.

I've got a PR I was fixing, and it says that POSIX requires that these
functions check the value of the signal number that was passed in, and
return -1 if it is out of range, and set errno to EINVAL.

Doing this in the macro versions now causes name space polution in signal.h,
because they now depend on errno.h for EINVAL and errno.

Removing the macros and just using the functions solves this problem.
-- 
Mike Pritchard
mpp@FreeBSD.org
"Go that way.  Really fast.  If something gets in your way, turn"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702280132.RAA00137>