]> git.eshelyaron.com Git - emacs.git/commitdiff
More fixes for NetBSD/vax
authorPo Lu <luangruo@yahoo.com>
Fri, 5 May 2023 06:13:37 +0000 (14:13 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 5 May 2023 06:15:23 +0000 (14:15 +0800)
* src/sysdep.c (init_signals) [__vax__]: Treat SIGILL
as a floating point error on VAXen.
Otherwise, (log 0.0) crashes Emacs.

src/sysdep.c

index ce6a20f53022f49f114f4b22a0044075412ed911..7bac3d8935a38446c498d7ee92b771c8ac06d6e2 100644 (file)
@@ -2005,7 +2005,9 @@ init_signals (void)
     signal (SIGPIPE, SIG_IGN);
 
   sigaction (SIGQUIT, &process_fatal_action, 0);
+#ifndef __vax__
   sigaction (SIGILL, &thread_fatal_action, 0);
+#endif /* __vax__ */
   sigaction (SIGTRAP, &thread_fatal_action, 0);
 
   /* Typically SIGFPE is thread-specific and is fatal, like SIGILL.
@@ -2018,6 +2020,11 @@ init_signals (void)
     {
       emacs_sigaction_init (&action, deliver_arith_signal);
       sigaction (SIGFPE, &action, 0);
+#ifdef __vax__
+      /* NetBSD/vax generates SIGILL upon some floating point errors,
+        such as taking the log of 0.0.  */
+      sigaction (SIGILL, &action, 0);
+#endif /* __vax__ */
     }
 
 #ifdef SIGUSR1