diff options
author | Christopher Faylor <me@cgf.cx> | 2001-08-14 14:36:58 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-08-14 14:36:58 +0000 |
commit | 4acf3edf6aeeb40c28bbce6f48747fcbdcb3a506 (patch) | |
tree | 22806b655bb076e72d0f1d39c164fd923a886fdc /newlib | |
parent | 6a574f1ad6df42447a242b521c3bdc9e9039910c (diff) | |
download | newlib-4acf3edf6aeeb40c28bbce6f48747fcbdcb3a506.zip newlib-4acf3edf6aeeb40c28bbce6f48747fcbdcb3a506.tar.gz newlib-4acf3edf6aeeb40c28bbce6f48747fcbdcb3a506.tar.bz2 |
* libc/include/machine/setjmp.h: Protect sigsetjmp/siglongjmp macro arguments.
* libc/include/sys/errno.h: Declare sys_errlist and sys_nerr, under Cygwin.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/ChangeLog | 8 | ||||
-rw-r--r-- | newlib/libc/include/machine/setjmp.h | 12 | ||||
-rw-r--r-- | newlib/libc/include/sys/errno.h | 4 |
3 files changed, 20 insertions, 4 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 53991e0..51a0285 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,11 @@ +Mon Aug 13 22:26:01 2001 Christopher Faylor <cgf@cygnus.com> + + * libc/include/machine/setjmp.h: Protect sigsetjmp/siglongjmp macro + arguments. + + * libc/include/sys/errno.h: Declare sys_errlist and sys_nerr, under + Cygwin. + 2001-08-13 Jeff Johnston <jjohnstn@redhat.com> * libc/include/malloc.h (M_MXFAST, M_NLBLKS, M_GRAIN, M_KEEP): New diff --git a/newlib/libc/include/machine/setjmp.h b/newlib/libc/include/machine/setjmp.h index 747fe17..c65c455 100644 --- a/newlib/libc/include/machine/setjmp.h +++ b/newlib/libc/include/machine/setjmp.h @@ -161,12 +161,16 @@ typedef int sigjmp_buf[_JBLEN+2]; #define _SAVEMASK _JBLEN #define _SIGMASK (_JBLEN+1) -#define sigsetjmp(env, savemask) (env[_SAVEMASK] = savemask,\ - sigprocmask (SIG_SETMASK, 0, (sigset_t *) &env[_SIGMASK]),\ +#ifdef __CYGWIN__ +# define _CYGWIN_WORKING_SIGSETJMP +#endif + +#define sigsetjmp(env, savemask) ((env)[_SAVEMASK] = savemask,\ + sigprocmask (SIG_SETMASK, 0, (sigset_t *) ((env) + _SIGMASK)),\ setjmp (env)) -#define siglongjmp(env, val) (((env[_SAVEMASK])?\ - sigprocmask (SIG_SETMASK, (sigset_t *) &env[_SIGMASK], 0):0),\ +#define siglongjmp(env, val) ((((env)[_SAVEMASK])?\ + sigprocmask (SIG_SETMASK, (sigset_t *) ((env) + _SIGMASK), 0):0),\ longjmp (env, val)) #endif /* __CYGWIN__ or __rtems__ */ diff --git a/newlib/libc/include/sys/errno.h b/newlib/libc/include/sys/errno.h index 1b5f216..672d99e 100644 --- a/newlib/libc/include/sys/errno.h +++ b/newlib/libc/include/sys/errno.h @@ -17,6 +17,10 @@ extern int *__errno _PARAMS ((void)); extern __IMPORT _CONST char * _CONST _sys_errlist[]; extern __IMPORT int _sys_nerr; +#ifdef __CYGWIN__ +extern __IMPORT const char * const sys_errlist[]; +extern __IMPORT int sys_nerr; +#endif #define __errno_r(ptr) ((ptr)->_errno) |