http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59188

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
glibc (at least the 2.17 I have around) doesn't have sigsetjmp function at all,
it only conditionally has sigsetjmp as a macro:
#ifdef  __USE_POSIX
...
/* Store the calling environment in ENV, also saving the
   signal mask if SAVEMASK is nonzero.  Return 0.  */
# define sigsetjmp(env, savemask)       __sigsetjmp (env, savemask)
...
#endif

so
extern "C" int setjmp(void *env);
extern "C" int _setjmp(void *env);
extern "C" int sigsetjmp(void *env);
extern "C" int __sigsetjmp(void *env);
DEFINE_REAL(int, setjmp, void *env)
DEFINE_REAL(int, _setjmp, void *env)
DEFINE_REAL(int, sigsetjmp, void *env)
DEFINE_REAL(int, __sigsetjmp, void *env)

is just asking for trouble.  Not to mention that the arguments are wrong even
for __sigsetjmp, which has two arguments rather than just one.  So, if it works
with clang, must be purely by accident, perhaps the difference is that
__USE_POSIX is defined in one case and not in the other one, or something, but
still, it can't really work in either case.

Reply via email to