PATH_MAX true POSIX size?

From: Heny Townsend (henry.townsend_at_not.here)
Date: 01/29/05


Date: Fri, 28 Jan 2005 19:17:44 -0500

I notice that PATH_MAX on Solaris is at (2**n - 1):

% getconf -a | grep PATH_MAX
PATH_MAX: 1023
_POSIX_PATH_MAX: 255

Whereas on Linux and FreeBSD it's the full round number (256/1024 on
FreeBSD, 256/4096 on Linux). Did somebody read POSIX wrong? Or is it a
case where POSIX is unclear and Sun decided to be pessimistic while the
freebies were optimistic? Or maybe Solaris is counting on the fact that
a request for 1023 bytes will generally be padded to 1024, thus allowing
a "hidden" spot for the null byte and avoiding programmer off-by-one errors?

Notice that it's not just the interpretation of PATH_MAX that differs.
They disagree on the interpretation of _POSIX_PATH_MAX too.

-- 
Henry Townsend


Relevant Pages

  • PATH_MAX true POSIX size?
    ... I notice that PATH_MAX on Solaris is at: ... FreeBSD, 256/4096 on Linux). ... Notice that it's not just the interpretation of PATH_MAX that differs. ...
    (comp.unix.programmer)
  • Re: Solaris vs Linux vs FreeBSD on SPARC Machine (was: Re: Was: More FreeBSD Problems! Graphics are
    ... The irony of my going from Linux to FreeBSD while you went the other way. ... is no native ports system for Solaris or Linux you would want to ensure ... But if I'm running into trouble compiling GNU programs on Solaris X86, ...
    (comp.unix.bsd.freebsd.misc)
  • followup: IPv6 multicast sendto() operation not supported
    ... works on linux and on Solaris, but not on FreeBSD. ... To verify my app was OK, I installed a solaris box on the LAN beside the ...
    (freebsd-net)
  • Re: Ma se uno volesse iniziare con Linux...
    ... pero' su Solaris va meglio... ... effetti non avrei dovuto dirlo in maniera assoluta, ... FreeBSD ha sempre battuto Linux a performance raw, ai tempi di Linux 2.4 e ... FreeBSD 4, ...
    (it.comp.macintosh)
  • Re: an argument of make(1)
    ... Since the topic of using FreeBSD make on non-BSD platforms seems to ... and tries to pull bsd.*.mk files on Linux and Solaris 10 here. ... I'll see how much of the changes I can clean up ...
    (freebsd-arch)