PANICTRACE bits

Add missing check for NO_SIGNAL in PANICTRACE versionof NH_abort().
Fix indentation of pre-processing directives.
Add #endif comments to make things clearer.
This commit is contained in:
keni
2010-01-16 21:54:24 +00:00
parent edf5b1c091
commit 89db1f9e73
+10 -8
View File
@@ -75,8 +75,8 @@ extern void FDECL(nethack_exit,(int));
# else # else
# define NH_abort_() abort() # define NH_abort_() abort()
# endif # endif
# endif # endif /* !SYSV */
#endif #endif /* !AMIGA */
#ifdef PANICTRACE #ifdef PANICTRACE
# include <errno.h> # include <errno.h>
@@ -160,7 +160,7 @@ boolean set;
# endif # endif
# undef SETSIGNAL # undef SETSIGNAL
} }
#endif # endif /* NO_SIGNAL */
static void static void
NH_abort(){ NH_abort(){
@@ -179,7 +179,9 @@ NH_abort(){
NH_panictrace_glibc() || (gdb_prio && NH_panictrace_gdb()); NH_panictrace_glibc() || (gdb_prio && NH_panictrace_gdb());
} }
# ifndef NO_SIGNAL
panictrace_setsignals(FALSE); panictrace_setsignals(FALSE);
# endif
NH_abort_(); NH_abort_();
} }
@@ -201,7 +203,7 @@ NH_panictrace_glibc(){
return TRUE; return TRUE;
# else # else
return FALSE; return FALSE;
# endif # endif /* !PANICTRACE_GLIBC */
} }
# ifdef PANICTRACE_GDB # ifdef PANICTRACE_GDB
@@ -212,8 +214,8 @@ NH_panictrace_glibc(){
# ifndef GDBPATH # ifndef GDBPATH
# define GDBPATH "/usr/bin/gdb" # define GDBPATH "/usr/bin/gdb"
# endif # endif
# endif # endif /* !SYSCF */
# endif # endif /* PANICTRACE_GDB */
static boolean static boolean
NH_panictrace_gdb(){ NH_panictrace_gdb(){
@@ -240,9 +242,9 @@ NH_panictrace_gdb(){
} }
# else # else
return FALSE; return FALSE;
# endif # endif /* !PANICTRACE_GDB */
} }
#endif #endif /* PANICTRACE */
/* /*
* The order of these needs to match the macros in hack.h. * The order of these needs to match the macros in hack.h.