]> granicus.if.org Git - nethack/commitdiff
fix NO_SIGNAL
authorAdam Powers <apowers@ato.ms>
Mon, 19 Oct 2020 20:21:07 +0000 (13:21 -0700)
committerAdam Powers <apowers@ato.ms>
Mon, 19 Oct 2020 20:21:07 +0000 (13:21 -0700)
src/files.c
src/save.c
sys/libnh/libnhmain.c

index f3c171111f850edd1c29e45298a5e0ea7f388623..dd72458611f874d99d5164fbd820489e79a81e76 100644 (file)
@@ -630,10 +630,10 @@ clearlocks()
 #endif
 #ifndef NO_SIGNAL
     (void) signal(SIGINT, SIG_IGN);
-#endif
 #if defined(UNIX) || defined(VMS)
     sethanguphandler((void FDECL((*), (int) )) SIG_IGN);
 #endif
+#endif /* NO_SIGNAL */
     /* can't access maxledgerno() before dungeons are created -dlc */
     for (x = (g.n_dgns ? maxledgerno() : 0); x >= 0; x--)
         delete_levelfile(x); /* not all levels need be present */
index c3864d5b0934f998a4fd33de7e9b7e9522e70a86..a15ce5860e2553796f4fc85cf565b8e3e4b18a64 100644 (file)
@@ -101,10 +101,10 @@ dosave0()
         return 0;
     fq_save = fqname(g.SAVEF, SAVEPREFIX, 1); /* level files take 0 */
 
+#ifndef NO_SIGNAL
 #if defined(UNIX) || defined(VMS)
     sethanguphandler((void FDECL((*), (int) )) SIG_IGN);
 #endif
-#ifndef NO_SIGNAL
     (void) signal(SIGINT, SIG_IGN);
 #endif
 
index 2a11d4d2511beaa7bb4ade3ed997fb2635bcf42e..844f385d037a6bdd932c481cf4cb9e2d6509582e 100644 (file)
@@ -555,11 +555,11 @@ whoami()
     return FALSE;
 }
 
+#ifndef NO_SIGNAL
 void
 sethanguphandler(handler)
 void FDECL((*handler), (int));
 {
-#ifndef NO_SIGNAL
 #ifdef SA_RESTART
     /* don't want reads to restart.  If SA_RESTART is defined, we know
      * sigaction exists and can be used to ensure reads won't restart.
@@ -581,8 +581,8 @@ void FDECL((*handler), (int));
     (void) signal(SIGXCPU, (SIG_RET_TYPE) handler);
 #endif
 #endif /* ?SA_RESTART */
-#endif /* !NO_SIGNAL */
 }
+#endif /* !NO_SIGNAL */
 
 #ifdef PORT_HELP
 void
@@ -1003,7 +1003,8 @@ void js_constants_init() {
     // copyright
     SET_CONSTANT_STRING("COPYRIGHT", COPYRIGHT_BANNER_A);
     SET_CONSTANT_STRING("COPYRIGHT", COPYRIGHT_BANNER_B);
-    SET_CONSTANT_STRING("COPYRIGHT", COPYRIGHT_BANNER_C);
+    // XXX: not set for cross-compile
+    //SET_CONSTANT_STRING("COPYRIGHT", COPYRIGHT_BANNER_C);
     SET_CONSTANT_STRING("COPYRIGHT", COPYRIGHT_BANNER_D);
 
     // glyphs