Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.85k stars 527 forks source link

_PC_CHOWN_RESTRICTED can only be used via pathconf/fpathconf, not sysconf #22161

Closed BernardQuatermass closed 3 weeks ago

BernardQuatermass commented 3 weeks ago

The documentation regarding availability of chown (perldoc -f chown) incorrectly uses the sysconf() function rather than the pathconf() function along with a path.

_PC* can only be used as parameters to pathconf()/fpathconf(). Only _SC* values can be used against sysconf().

Cannot speak to other systems but on all linux systems the original code would be returning the value for "_SC_TZNAME_MAX, The maximum number of bytes in a timezone name."

mauke commented 3 weeks ago

I had some issues with porting tests failing, so I made some minor changes and force-pushed the PR branch. fingers crossed