[PATCH v2 1/5] Sync getcwd with gnulib

Paul Eggert eggert@cs.ucla.edu
Tue Sep 1 21:24:30 GMT 2020


On 9/1/20 1:37 PM, Adhemerval Zanella via Libc-alpha wrote:

> It sync with gnulib version 615b43e1f9.  The only change is the usage
> of GETCWD_RETURN_TYPE so the linux getcwd implementation defines the
> generic implementation as static.

That particular patch results in other changes with Gnulib version 615b43e1f, 
such as __readdir64 vs __readdir. Perhaps change the wording to:

"This is the first of a series of patches to sync with Gnulib commit 615b43e1f9. 
This patch adopts most of the changes of Gnulib, except it retains 
GETCWD_RETURN_TYPE and does not always use a 64-bit internal API. These 
remaining discrepancies will be addressed in later patches in this series."

> +#if !_LIBC
> +# include <config.h>
> +# include <unistd.h>
> +#else

This needs '# include "pathmax.h"' after '# include <unistd.h>' so that the 
entire set of patches will result in the Gnulib version you mentioned. This 
include does not affect Glibc, only the Gnulib side.

Otherwise, this patch looks good, as do the 2nd and 3rd patches. The remaining 
ones could use another pair of eyes.


More information about the Libc-alpha mailing list