From 2d8af8f82934fd0589d78755162db27bb761da53 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Dec 2020 16:51:58 -0800 Subject: [PATCH] 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 2ebf31995c..7162110c9f 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 9b74b7b0c7..418c1e5b90 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.39.5