delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/04/20/00:24:05

From: sos AT prospect DOT com DOT ru (Sergey Okhapkin)
Subject: newlib bug
20 Apr 1998 00:24:05 -0700 :
Message-ID: <01BD6C4F.46678ED0.cygnus.cygwin32.developers@drs>
To: "'cygwin32-developers AT cygnus DOT com'" <cygwin32-developers AT cygnus DOT com>

Hi!

Newlib-980310 sources contains old buggy include/machine/setjmp.h - 
sigjmp_buf defined as a structure instead of an array for __CYGWIN32__. The 
correct definition must be

#ifdef __CYGWIN32__
#include <signal.h>

/* POSIX sigsetjmp/siglongjmp macros */
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]),\
			setjmp (env))

#define siglongjmp(env, val) (((env[_SAVEMASK])?\
			sigprocmask (SIG_SETMASK, (sigset_t *) &env[_SIGMASK], 0):0),\
			longjmp (env, val))
#endif /* __CYGWIN32__*/


--
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019