Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Autoconfigify HAVE_SIGSETJMP
@ 2001-07-12  6:50 Mark Kettenis
  0 siblings, 0 replies; only message in thread
From: Mark Kettenis @ 2001-07-12  6:50 UTC (permalink / raw)
  To: gdb-patches

Check stolen from libstdc++-v3.  Checked in.

Mark

Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* configure.in: Add check for sigsetjmp.
	* config/m68k/xm-linux.h (HAVE_SIGSETJMP): Removed.
	* config/xm-sysv4.h (HAVE_SIGSETJMP): Removed.
	* configure, config.in: Regenerated.

Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.65
diff -u -p -r1.65 configure.in
--- configure.in 2001/06/28 19:04:10 1.65
+++ configure.in 2001/07/12 13:47:04
@@ -135,6 +135,17 @@ AC_CHECK_FUNCS(setpgid sbrk sigaction is
 AC_FUNC_VFORK
 AC_FUNC_ALLOCA
 
+# Check if sigsetjmp is available.  Using AC_CHECK_FUNCS won't do
+# since sigsetjmp might only be defined as a macro.
+AC_CACHE_CHECK([for sigsetjmp], gdb_cv_func_sigsetjmp,
+[AC_TRY_COMPILE([
+#include <setjmp.h>
+], [sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);],
+gdb_cv_func_sigsetjmp=yes, gdb_cv_func_sigsetjmp=no)])
+if test $gdb_cv_func_sigsetjmp = yes; then
+  AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available. ])
+fi
+
 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
 AC_CACHE_CHECK([for r_fs in struct reg], gdb_cv_struct_reg_r_fs,
Index: config/m68k/xm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/m68k/xm-linux.h,v
retrieving revision 1.2
diff -u -p -r1.2 xm-linux.h
--- config/m68k/xm-linux.h 2001/03/06 08:21:30 1.2
+++ config/m68k/xm-linux.h 2001/07/12 13:47:04
@@ -32,9 +32,6 @@
 #define HAVE_TERMIOS
 #define NEED_POSIX_SETPGID
 
-/* Linux has sigsetjmp and siglongjmp */
-#define HAVE_SIGSETJMP
-
 /* Need R_OK etc, but USG isn't defined.  */
 #include <unistd.h>
 
Index: config/xm-sysv4.h
===================================================================
RCS file: /cvs/src/src/gdb/config/xm-sysv4.h,v
retrieving revision 1.2
diff -u -p -r1.2 xm-sysv4.h
--- config/xm-sysv4.h 2001/03/06 08:21:20 1.2
+++ config/xm-sysv4.h 2001/07/12 13:47:04
@@ -32,9 +32,6 @@
 
 #define NEED_POSIX_SETPGID
 
-/* SVR4 has sigsetjmp and siglongjmp */
-#define HAVE_SIGSETJMP
-
 /* We have to include these files now, so that GDB will not make
    competing definitions in defs.h.  */
 #include <limits.h>


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-07-12  6:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-12  6:50 Autoconfigify HAVE_SIGSETJMP Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox