The attached patch is needed to build on AIX 7.1 with xlc V12.1 without generating warnings about SIGPIPE being redefined (gzip tailor.h defines SIGPIPE to 0 before /usr/include/signal.h redefines it to the proper value, and other include files include signal.h). I think gzip works OK even with the warnings, on this platform. Possibly the problem would prevent gzip builds on other platforms, though. Normally I'd just install this patch but we're so close to a release I thought I'd ask you first.
From b7b57b0fe8db2251b4054a9f3cddf029c6694c49 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue, 15 Mar 2016 15:45:42 -0700
Subject: [PATCH] gzip: port to AIX 7.1 + xlc V12.1

* inflate.c, unlzw.c, util.c: Include tailor.h after including any
system include file that might in turn include signal.h for the
first time, so that SIGPIPE is not #defined to 0 prematurely,
which clashes with signal.h's SIGPIPE.
---
 inflate.c | 2 +-
 unlzw.c   | 2 +-
 util.c    | 4 +---
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/inflate.c b/inflate.c
index b9201bb..ff2be7e 100644
--- a/inflate.c
+++ b/inflate.c
@@ -116,10 +116,10 @@
  */
 
 #include <config.h>
-#include "tailor.h"
 
 #include <stdlib.h>
 
+#include "tailor.h"
 #include "gzip.h"
 #define slide window
 
diff --git a/unlzw.c b/unlzw.c
index 69a47b4..d5b01f5 100644
--- a/unlzw.c
+++ b/unlzw.c
@@ -8,11 +8,11 @@
  */
 
 #include <config.h>
-#include "tailor.h"
 
 #include <unistd.h>
 #include <fcntl.h>
 
+#include "tailor.h"
 #include "gzip.h"
 #include "lzw.h"
 
diff --git a/util.c b/util.c
index 522d6ef..c06bcc4 100644
--- a/util.c
+++ b/util.c
@@ -21,15 +21,13 @@
 #include <config.h>
 #include <ctype.h>
 #include <errno.h>
-
-#include "tailor.h"
-
 #include <limits.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <stdlib.h>
 #include <errno.h>
 
+#include "tailor.h"
 #include "gzip.h"
 #include <xalloc.h>
 
-- 
2.5.0

Reply via email to