* configure.ac (sys_siglist): Look for its decl in <signal.h>.
Otherwise, it's not found in either Fedora 17 or Solaris 11.
* src/sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
defined as a macro, as is done in Solaris.
(sys_siglist_entries): New macro.
(save_strsignal): Use it.
* src/syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
+2012-10-07 Paul Eggert <eggert@cs.ucla.edu>
+
+ Improve sys_siglist detection.
+ * configure.ac (sys_siglist): Look for its decl in <signal.h>.
+ Otherwise, it's not found in either Fedora 17 or Solaris 11.
+
2012-10-04 Paul Eggert <eggert@cs.ucla.edu>
Merge from gnulib, incorporating:
dnl it doesn't define `bool'.
AC_CHECK_HEADERS(term.h, , , -)
AC_HEADER_TIME
-AC_CHECK_DECLS([sys_siglist])
+AC_CHECK_DECLS([sys_siglist], [], [], [[#include <signal.h>
+ ]])
if test $ac_cv_have_decl_sys_siglist != yes; then
# For Tru64, at least:
- AC_CHECK_DECLS([__sys_siglist])
+ AC_CHECK_DECLS([__sys_siglist], [], [], [[#include <signal.h>
+ ]])
if test $ac_cv_have_decl___sys_siglist = yes; then
AC_DEFINE(sys_siglist, __sys_siglist,
[Define to any substitute for sys_siglist.])
+2012-10-07 Paul Eggert <eggert@cs.ucla.edu>
+
+ Improve sys_siglist detection.
+ * sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
+ defined as a macro, as is done in Solaris.
+ (sys_siglist_entries): New macro.
+ (save_strsignal): Use it.
+ * syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
+ GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
+
2012-10-06 Jan Djärv <jan.h.d@swipnet.se>
* nsfns.m (Fx_create_frame): Call x_default_parameter with
\f
#if !HAVE_DECL_SYS_SIGLIST
# undef sys_siglist
-# define sys_siglist my_sys_siglist
+# ifdef _sys_siglist
+# define sys_siglist _sys_siglist
+# else
+# define sys_siglist my_sys_siglist
static char const *sys_siglist[NSIG];
+# endif
+#endif
+
+#ifdef _sys_nsig
+# define sys_siglist_entries _sys_nsig
+#else
+# define sys_siglist_entries NSIG
#endif
/* Handle bus errors, invalid instruction, etc. */
main_thread = pthread_self ();
#endif
-#if !HAVE_DECL_SYS_SIGLIST
+#if !HAVE_DECL_SYS_SIGLIST && !defined _sys_siglist
if (! initialized)
{
sys_siglist[SIGABRT] = "Aborted";
sys_siglist[SIGXFSZ] = "File size limit exceeded";
# endif
}
-#endif /* !HAVE_DECL_SYS_SIGLIST */
+#endif /* !HAVE_DECL_SYS_SIGLIST && !_sys_siglist */
/* Don't alter signal handlers if dumping. On some machines,
changing signal handlers sets static data that would make signals
{
char const *signame = 0;
- if (0 <= code && code < NSIG)
+ if (0 <= code && code < sys_siglist_entries)
signame = sys_siglist[code];
if (! signame)
signame = "Unknown signal";
typedef void (*signal_handler_t) (int);
extern void emacs_sigaction_init (struct sigaction *, signal_handler_t);
-char const *safe_strsignal (int);
+char const *safe_strsignal (int) ATTRIBUTE_CONST;
#if NSIG < NSIG_MINIMUM
# undef NSIG