changeset 9893:ec6e90aaf2d7

Fix two compilation errors.
author Bruno Haible <bruno@clisp.org>
date Sat, 12 Apr 2008 01:34:34 +0200
parents 0b3ccf361045
children 5d7eafccfbc9
files ChangeLog lib/strsignal.c m4/strsignal.m4
diffstat 3 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Apr 12 01:07:35 2008 +0200
+++ b/ChangeLog	Sat Apr 12 01:34:34 2008 +0200
@@ -1,3 +1,10 @@
+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.
--- a/lib/strsignal.c	Sat Apr 12 01:07:35 2008 +0200
+++ b/lib/strsignal.c	Sat Apr 12 01:34:34 2008 +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"
 
--- a/m4/strsignal.m4	Sat Apr 12 01:07:35 2008 +0200
+++ b/m4/strsignal.m4	Sat Apr 12 01:34:34 2008 +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>])
 ])