From e9df119be4478335d5d499fa8aefa91e37729efc Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Dec 2020 16:51:58 -0800 Subject: [PATCH 2/5] getcwd: port to AIX * lib/getcwd.c [!_LIBC]: Undef stat64 before #defining it, in case our sys/stat.h #defined a function macro with the same name. --- ChangeLog | 4 ++++ lib/getcwd.c | 1 + 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2ebf31995..7162110c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2020-12-13 Paul Eggert + getcwd: port to AIX + * lib/getcwd.c [!_LIBC]: Undef stat64 before #defining it, + in case our sys/stat.h #defined a function macro with the same name. + readlink, readlinkat: add ERANGE portability Fix some portability issues with Gnulib's readlink and readlinkat, notably mostly working around the ERANGE problem in AIX and HP-UX. diff --git a/lib/getcwd.c b/lib/getcwd.c index 9b74b7b0c..418c1e5b9 100644 --- a/lib/getcwd.c +++ b/lib/getcwd.c @@ -92,6 +92,7 @@ # define GETCWD_RETURN_TYPE char * # define __close_nocancel_nostatus close # define __getcwd_generic rpl_getcwd +# undef stat64 # define stat64 stat # define __fstat64 fstat # define __fstatat64 fstatat -- 2.27.0