$NetBSD: patch-bb,v 1.3 2019/10/11 09:27:16 jperkin Exp $ Do use non-standard getcwd(NULL, 0); This unbreaks cvs on Interix. Disable broken custom getcwd() on Apple, it breaks on Catalina. --- lib/xgetcwd.c.orig 2005-09-19 21:12:25.000000000 +0000 +++ lib/xgetcwd.c @@ -25,8 +25,13 @@ #include "xgetcwd.h" #include +#include +#ifdef __APPLE__ +#include +#else #include "getcwd.h" +#endif #include "xalloc.h" /* Return the current directory, newly allocated. @@ -36,8 +41,8 @@ char * xgetcwd (void) { - char *cwd = getcwd (NULL, 0); + char *cwd = xmalloc (PATH_MAX); if (! cwd && errno == ENOMEM) xalloc_die (); - return cwd; + return getcwd (cwd, PATH_MAX); }