Hello John,

On Wed, Apr 16, 2025 at 07:32:22AM -0500, John Goerzen wrote:
> I think that would work fine on Linux and Hurd.  That behavior, however,
> isn't POSIX so wouldn't be portable.  Can you clarify what the problem
> with getcwd() as written is on Hurd?  From the description in glibc, it
> sounds like the behavior is the same as on Linux.

The issue is that MAXPATHLEN is not defined on Hurd. For reference:
https://darnassus.sceen.net/~hurd-web/faq/foo_max/

It is interesting that you mention POSIX compliance, as I have seen
contradictory information about this. The above linked page states that
getcwd(NULL, 0) is part of POSIX 2008.

Best regards,
João

Reply via email to