summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2008-04-12 01:34:34 +0200
committerBruno Haible <bruno@clisp.org>2008-04-12 01:34:34 +0200
commit829d0e0cfc21f3eb72ff83d70b7aabc5c9854a17 (patch)
treee1036e42e0b1813a41bc08961e868e58b4492aac
parentfc38bafde739caf7d6b7aa49ba6074c0a6f51a09 (diff)
downloadgnulib-829d0e0cfc21f3eb72ff83d70b7aabc5c9854a17.tar.gz
Fix two compilation errors.
-rw-r--r--ChangeLog7
-rw-r--r--lib/strsignal.c3
-rw-r--r--m4/strsignal.m44
3 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index a7fb68325e..92f8080234 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2008-04-11 Bruno Haible <bruno@clisp.org>
+ * 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.
+
+2008-04-11 Bruno Haible <bruno@clisp.org>
+
* lib/glob.c: Include <stdbool.h>. Needed at least with IRIX cc.
* modules/glob (Depends-on): Add stdbool.
diff --git a/lib/strsignal.c b/lib/strsignal.c
index 2496e2ca44..2e76bb8969 100644
--- a/lib/strsignal.c
+++ b/lib/strsignal.c
@@ -66,7 +66,9 @@ extern const char *const _sys_siglist_internal[] attribute_hidden;
# 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 @@ init (void)
# define init_sig(sig, abbrev, desc) \
if (sig >= 0 && sig < NSIG) \
_sys_siglist[sig] = desc;
-} while (0);
# include "siglist.h"
diff --git a/m4/strsignal.m4 b/m4/strsignal.m4
index 5244dcb6c1..d71f0963fb 100644
--- a/m4/strsignal.m4
+++ b/m4/strsignal.m4
@@ -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 @@ AC_DEFUN([gl_FUNC_STRSIGNAL],
# Prerequisites of lib/strsignal.c.
AC_DEFUN([gl_PREREQ_STRSIGNAL], [
AC_REQUIRE([AC_DECL_SYS_SIGLIST])
- :
+ AC_CHECK_DECLS([_sys_siglist], [], [], [#include <signal.h>])
])