Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@wins.uva.nl>
To: gdb-patches@sources.redhat.com
Subject: Autoconfigify HAVE_SIGSETJMP
Date: Thu, 12 Jul 2001 06:50:00 -0000	[thread overview]
Message-ID: <200107121350.f6CDo1g04182@delius.kettenis.local> (raw)

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>


                 reply	other threads:[~2001-07-12  6:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200107121350.f6CDo1g04182@delius.kettenis.local \
    --to=kettenis@wins.uva.nl \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox