This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Add sigaltstack() prototype


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]