From 4982d4ebc3bd4924d73f2f2ad584309e9ec97435 Mon Sep 17 00:00:00 2001 From: Ben Huntsman Date: Mon, 4 May 2020 19:52:02 -0700 Subject: all: update build scripts to fix AIX XL/C compatibility --- include/u.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/u.h') diff --git a/include/u.h b/include/u.h index 3bea890e..137b6161 100644 --- a/include/u.h +++ b/include/u.h @@ -20,7 +20,7 @@ extern "C" { #define _NETBSD_SOURCE 1 /* NetBSD */ #define _SVID_SOURCE 1 #define _DEFAULT_SOURCE 1 -#if !defined(__APPLE__) && !defined(__OpenBSD__) +#if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__AIX__) # define _XOPEN_SOURCE 1000 # define _XOPEN_SOURCE_EXTENDED 1 #endif @@ -33,7 +33,7 @@ extern "C" { # define __LONG_LONG_SUPPORTED #endif #if defined(__AIX__) -# define _XOPEN_SOURCE 1 +# define _XOPEN_SOURCE 600 #endif #if defined(__APPLE__) # define _DARWIN_NO_64_BIT_INODE /* Snow Leopard */ -- cgit v1.2.3 From 5802b09e9d8ceadd2cefdccfd0391c04e492369b Mon Sep 17 00:00:00 2001 From: Ben Huntsman Date: Mon, 4 May 2020 19:53:21 -0700 Subject: all: fix #includes for AIX, add a few AIX "implementation" files --- include/u.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/u.h') diff --git a/include/u.h b/include/u.h index 137b6161..10fc7257 100644 --- a/include/u.h +++ b/include/u.h @@ -6,6 +6,8 @@ extern "C" { #endif +#define HAS_SYS_TERMIOS 1 + #define __BSD_VISIBLE 1 /* FreeBSD 5.x */ #if defined(__sun__) # define __EXTENSIONS__ 1 /* SunOS */ @@ -34,6 +36,8 @@ extern "C" { #endif #if defined(__AIX__) # define _XOPEN_SOURCE 600 +# define _ALL_SOURCE +# undef HAS_SYS_TERMIOS #endif #if defined(__APPLE__) # define _DARWIN_NO_64_BIT_INODE /* Snow Leopard */ -- cgit v1.2.3 From 8cb7308f3a24249ed091c7decf22005c64099783 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sun, 17 May 2020 20:02:07 -0400 Subject: lib9: use opendir/readdir to read directories getdirentries(2) has been deprecated on macOS since 10.5 (ten releases ago). Using it requires disabling 64-bit inodes, but that in turn makes binaries incompatible with some dynamic libraries, most notably ASAN. At some point getdirentries(2) will actually be removed. For both these reasons, switch to opendir/readdir. A little clunky since we have to keep the DIR* hidden away to preserve the int fd interfaces, but it lets us remove a bunch of OS-specific code too. --- include/u.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/u.h') diff --git a/include/u.h b/include/u.h index 10fc7257..297df70a 100644 --- a/include/u.h +++ b/include/u.h @@ -39,9 +39,6 @@ extern "C" { # define _ALL_SOURCE # undef HAS_SYS_TERMIOS #endif -#if defined(__APPLE__) -# define _DARWIN_NO_64_BIT_INODE /* Snow Leopard */ -#endif #define _LARGEFILE64_SOURCE 1 #define _FILE_OFFSET_BITS 64 -- cgit v1.2.3 From b4cc38f94321c71e8d19fbbd4691e72f7c0d817b Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 18 May 2020 22:58:09 -0400 Subject: build: drop _XOPEN_SOURCE in u.h on AIX --- include/u.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/u.h') diff --git a/include/u.h b/include/u.h index 297df70a..f84e348a 100644 --- a/include/u.h +++ b/include/u.h @@ -35,7 +35,6 @@ extern "C" { # define __LONG_LONG_SUPPORTED #endif #if defined(__AIX__) -# define _XOPEN_SOURCE 600 # define _ALL_SOURCE # undef HAS_SYS_TERMIOS #endif -- cgit v1.2.3