In the case where CHMOD is called with a numeric mode, the current code assumes 
that “mode_t” corresponds to an unsigned int. This is true on linux/glibc, but 
not true on macOS (where mode_t is an unsigned short) and thus creates a 
warning and possibly a runtime error. This had been spotted earlier on Windows 
and was corrected, but behind a __MINWG32__ check, although the fixed code is 
actually correct for all platforms.

I have thus committed the attached fix (revision 243796), removing the 
target-specific branch. Will work on all platforms now.

FX

Attachment: chmod.ChangeLog
Description: Binary data

Attachment: chmod.diff
Description: Binary data

Reply via email to