From edc2856a2ae2dc46037f85652440bd329b1a2c8a Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 2 Aug 2015 21:41:40 +0300 Subject: Rework zOS patches; keep separate from autotools. --- awk.h | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) (limited to 'awk.h') diff --git a/awk.h b/awk.h index 1eb26880..2b823667 100644 --- a/awk.h +++ b/awk.h @@ -108,24 +108,12 @@ extern int errno; #undef CHARBITS #undef INTBITS -#if !defined(ZOS_USS) #if HAVE_INTTYPES_H # include #endif #if HAVE_STDINT_H # include #endif -#else /* ZOS_USS */ -#include -#include -#define INT32_MAX INT_MAX -#define INT32_MIN INT_MIN -#ifndef __uint32_t -#define __uint32_t 1 -typedef unsigned long uint32_t; -#endif -typedef long int32_t; -#endif /* !ZOS_USS */ /* ----------------- System dependencies (with more includes) -----------*/ @@ -159,11 +147,14 @@ typedef int off_t; #ifdef NEED_MEMORY_H #include #endif /* NEED_MEMORY_H */ -#else /* not HAVE_STRING_H */ +#endif /* HAVE_STRING_H */ #ifdef HAVE_STRINGS_H #include #endif /* HAVE_STRINGS_H */ -#endif /* not HAVE_STRING_H */ + +#ifdef HAVE_SYS_SELECT_H +#include +#endif /* HAVE_SYS_SELECT_H */ #if HAVE_UNISTD_H #include @@ -1633,6 +1624,11 @@ extern uintmax_t adjust_uint(uintmax_t n); #endif /* ! defined(VMS)) */ #endif /* WEXITSTATUS */ +/* For z/OS, from Dave Pitts. EXIT_FAILURE is normally 8, make it 1. */ +#if defined(EXIT_FAILURE) && EXIT_FAILURE == 8 +# undef EXIT_FAILURE +#endif + /* EXIT_SUCCESS and EXIT_FAILURE normally come from */ #ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -1645,16 +1641,6 @@ extern uintmax_t adjust_uint(uintmax_t n); # define EXIT_FATAL 2 #endif -/* For z/OS, from Dave Pitts. EXIT_FAILURE is normally 8, make it 1. */ -#ifdef ZOS_USS - -#ifdef EXIT_FAILURE -#undef EXIT_FAILURE -#endif - -#define EXIT_FAILURE 1 -#endif - /* ------------------ Inline Functions ------------------ */ /* -- cgit v1.2.3 From 5e547510dfad2ce5f00e2f495b054c4331c62dfc Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 26 Aug 2015 21:57:28 +0300 Subject: Move include of sys/select.h to io.c. --- awk.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'awk.h') diff --git a/awk.h b/awk.h index 1a7dc242..c74c6881 100644 --- a/awk.h +++ b/awk.h @@ -152,10 +152,6 @@ typedef int off_t; #include #endif /* HAVE_STRINGS_H */ -#ifdef HAVE_SYS_SELECT_H -#include -#endif /* HAVE_SYS_SELECT_H */ - #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ -- cgit v1.2.3