]> Savannah Git Hosting - gnulib.git/commit
getcwd: help the merge back into glibc
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 26 Aug 2020 22:30:53 +0000 (15:30 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 26 Aug 2020 22:31:44 +0000 (15:31 -0700)
commit615b43e1f914687b6ccd40c79a05626098a361d7
tree9032f228bcdae313d53b01b836186d330a9ed672
parent5667b92ddf0c830d612344aa20206c9000e931f8
getcwd: help the merge back into glibc

This patch was inspired by Adhemerval Zanella’s proposed glibc patches:
https://sourceware.org/pipermail/libc-alpha/2020-August/117294.html
The idea is to make it easier for Gnulib lib/getcwd.c to match
glibc io/getcwd-generic.c.
* lib/getcwd.c [_LIBC]: Do not include pathmax.h.
Include not-cancel.h.
(HAVE_OPENAT, D_INO_IN_DIRENT, HAVE_MSVC_INVALID_PARAMETER_HANDLER)
(HAVE_MINIMALLY_WORKING_GETCWD): Define for the _LIBC case.
(__getcwd, __lstat, __readdir) [!_LIBC]: Remove these macros.
(__close_nocancel_nostatus, __getcwd_generic, stat64, __fstat64)
(__fstatat64, __lstat64, __readdir64, __fdopendir, __openat)
(__rewinddir, __openat64, dirent64) [_LIBC]: New macros.
(__getcwd_generic): Rename from __getcwd.
Use the abovementioned macros for consistency with glibc.
(weak_alias): Remove.
ChangeLog
lib/getcwd.c