"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: avoid per tree-entry asprintf/free
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Tue, 24 Feb 2026 21:57:10 +0100

Download raw body.

Thread
On Tue, Feb 24, 2026 at 09:47:19PM +0100, Omar Polo wrote:
> > +	int i, ret, psize = _POSIX_PATH_MAX;
> 
> can we use PATH_MAX instead?
> 
> 	$ grep -R PATH_MAX | grep -vc _POSIX
> 	88
> 	$ grep -R POSIX_PATH_MAX | wc -l
> 	15
>       
> we seem to have a preference for PATH_MAX and, as far as I know, unlike
> HOST_NAME_MAX which is problematic in portable, PATH_MAX is generally
> okay.
> 
> (plus I'd like to avoid these _POSIX_* spelling if possible)

Sure, no problem. I prefer PATH_MAX, too. I was thinking -portable
liked _POSIX_PATH_MAX better for some reason. Seems I got mixed up.