diff options
Diffstat (limited to 'newlib/libc/include')
-rw-r--r-- | newlib/libc/include/machine/setjmp.h | 12 | ||||
-rw-r--r-- | newlib/libc/include/sys/errno.h | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/newlib/libc/include/machine/setjmp.h b/newlib/libc/include/machine/setjmp.h index 747fe17ef..c65c4557f 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 1b5f216d8..672d99eac 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) |