This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Add sigaltstack() prototype
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Thu, 14 Aug 2014 18:08:20 -0500
- Subject: Add sigaltstack() prototype
- Authentication-results: sourceware.org; auth=none
Hi
I have had this one laying around a while. Originally posted
https://sourceware.org/ml/newlib/2012/msg00335.html.
2014-08-24 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/sys/signal.h: Add sigaltstack() support.
The comments on the original version were:
> 1. http://pubs.opengroup.org/onlinepubs/9699919799/functions/sigaltstack.html says
> sigaltstack should be provided as an XSI extension to <signal.h>
>
> Your patch adds sigaltstack to <sys/signal.h>, however I don't see
> much reasons, why it can't be added to <signal.h>.
>
All of newlib's <signal.h> content is in <sys/signal.h> so this follows
that pattern.
<signal.h> always includes <sys/signal.h>
This version has this conditional on the structure and method.
#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112
If that is not 100% correct, then I am happy to change it. It has been
in POSIX long enough that the Open Group page says it was in
Edition 5 as part of BASE. The note for Edition 6 appears to indicate
that my picking 200112 may be too new. It was modified in the
2002 corrigenda.
>
> 2. Your patch contains this:
>
> typedef struct sigalstack { ... } stack_t
>
> Am I correct in assuming the "sigalstack" to be a typo?
That was a typo. Now fixed.
Also the fields are not in the same order as glibc.
If the guards are OK, then it should be OK to commit.
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985