about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2013-10-08 02:06:04 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2013-10-08 02:06:04 +0000
commitf794be7369ce393cd84c42035c89807fc49f9c9b (patch)
tree326f319588babe873eea06d0e61627261b3e51c0
parentf48656cce2160d1684d96fa1dfe59e99a1e6bf97 (diff)
downloadnetpbm-mirror-f794be7369ce393cd84c42035c89807fc49f9c9b.tar.gz
netpbm-mirror-f794be7369ce393cd84c42035c89807fc49f9c9b.tar.xz
netpbm-mirror-f794be7369ce393cd84c42035c89807fc49f9c9b.zip
Don't refer to SIGWINCH, SIGIO if they don't exist
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2010 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--doc/HISTORY3
-rw-r--r--lib/libsystem.c10
2 files changed, 13 insertions, 0 deletions
diff --git a/doc/HISTORY b/doc/HISTORY
index 39109f3a..a9c88350 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -9,6 +9,9 @@ not yet  BJH  Release 10.65.00
               Build for big-endian machines: fix syntax error so it compiles.
               Broken in 10.63 (June 2013).
 
+              Fix compile failure on system such as OpenBSD that don't have
+              SIGWINCH and SIGIO.
+
 13.09.28 BJH  Release 10.64.00
 
               pngtopam: fix bug: ignores -gamma.  Introduced in 10.48
diff --git a/lib/libsystem.c b/lib/libsystem.c
index b8c3ea50..d6c69c2b 100644
--- a/lib/libsystem.c
+++ b/lib/libsystem.c
@@ -273,10 +273,20 @@ signalName(unsigned int const signalClass) {
         return "SIGVTALRM";
     case SIGPROF:
         return "SIGPROF";
+/* Most systems have SIGWINCH and SIGIO, but at least OpenBSD, in 2013,
+   does not.  Systems that do don't necessarily supply it as a macro, so
+   the following tests are not perfect, but a false negative is a really,
+   really, small problem, so we don't bother with all the work it would
+   take to do better.
+*/
+#ifdef SIGWINCH
     case SIGWINCH:
         return "SIGWINCH";
+#endif
+#ifdef HAVE_SIGIO
     case SIGIO:
         return "SIGIO";
+#endif
     case SIGSYS:
         return "SIGSYS";
     default: