[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
strsignal: fix compilation error
From: |
Bruno Haible |
Subject: |
strsignal: fix compilation error |
Date: |
Sat, 12 Apr 2008 01:35:09 +0200 |
User-agent: |
KMail/1.5.4 |
On IRIX 6.5, the strsignal replacement fails to compile:
"strsignal.c", line 69: error(1143): declaration is incompatible with
"char *_sys_siglist[]" (declared at line 176 of
"///usr/include/signal.h")
static const char *_sys_siglist[NSIG];
^
"strsignal.c", line 150: error(1166): expected a declaration
} while (0);
^
This should fix it:
2008-04-11 Bruno Haible <address@hidden>
* lib/strsignal.c (_sys_siglist): Don't declare if already declared.
(init): Fix syntax error.
* m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Check whether _sys_siglist
is declared.
--- lib/strsignal.c.orig 2008-04-12 01:32:35.000000000 +0200
+++ lib/strsignal.c 2008-04-12 01:32:32.000000000 +0200
@@ -66,7 +66,9 @@
# ifndef NSIG
# define NSIG 32
# endif /* NSIG */
+# if !HAVE_DECL__SYS_SIGLIST
static const char *_sys_siglist[NSIG];
+# endif
# endif /* !HAVE_DECL_SYS_SIGLIST */
#endif /* _LIBC */
@@ -147,7 +149,6 @@
# define init_sig(sig, abbrev, desc) \
if (sig >= 0 && sig < NSIG) \
_sys_siglist[sig] = desc;
-} while (0);
# include "siglist.h"
--- m4/strsignal.m4.orig 2008-04-12 01:32:35.000000000 +0200
+++ m4/strsignal.m4 2008-04-12 01:29:14.000000000 +0200
@@ -1,4 +1,4 @@
-# strsignal.m4 serial 2
+# strsignal.m4 serial 3
dnl Copyright (C) 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -51,5 +51,5 @@
# Prerequisites of lib/strsignal.c.
AC_DEFUN([gl_PREREQ_STRSIGNAL], [
AC_REQUIRE([AC_DECL_SYS_SIGLIST])
- :
+ AC_CHECK_DECLS([_sys_siglist], [], [], [#include <signal.h>])
])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- strsignal: fix compilation error,
Bruno Haible <=