From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Seitz To: Subject: [RFC] sigsetjmp/siglongjmp on cygwin Date: Wed, 01 Aug 2001 14:01:00 -0000 Message-id: X-SW-Source: 2001-08/msg00012.html Hi, I would like to discuss what to do about siglongjmp/sigsetjmp. These functions were recently added to configure.in: 2001-07-12 Mark Kettenis * configure.in: Add check for sigsetjmp. To make a long story short, I spent a lot of time trying to track this down. The crux of it is that sigsetjmp/siglongjmp _do_ exist on cygwin, but they are not reliable. I don't know why, but they are not. Until the above change, cygwin used setjmp/longjmp, and this patch will force gdb to use them again. I'm open to better ways of dealing with this. Keith Possible ChangeLog 2001-08-01 Keith Seitz * configure.in: Don't use sigsetjmp/siglongjmp on cygwin, even if it is available: it doesn't work. * configure: Regenerate. Possible Patch Index: configure.in =================================================================== RCS file: /cvs/src/src/gdb/configure.in,v retrieving revision 1.66 diff -u -p -r1.66 configure.in --- configure.in 2001/07/12 13:48:45 1.66 +++ configure.in 2001/08/01 21:01:29 @@ -137,11 +137,16 @@ AC_FUNC_ALLOCA # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do # since sigsetjmp might only be defined as a macro. +# Cygwin has sigsetjmp/siglongjmp, but it doesn't seem to work... AC_CACHE_CHECK([for sigsetjmp], gdb_cv_func_sigsetjmp, [AC_TRY_COMPILE([ #include ], [sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);], -gdb_cv_func_sigsetjmp=yes, gdb_cv_func_sigsetjmp=no)]) +[case "${host}" in + *cygwin*) gdb_cv_func_sigsetjmp=no ;; + *) gdb_cv_func_sigsetjmp=yes ;; +esac +], gdb_cv_func_sigsetjmp=no)]) if test $gdb_cv_func_sigsetjmp = yes; then AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available. ]) fi