[Toybox] this week in weird coreutils stuff: chmod

Rob Landley rob at landley.net
Fri May 31 08:29:25 PDT 2024


On 5/30/24 14:59, enh wrote:
>> *shrug* Removing all uses of mode_t and using "unsigned" instead consistently
>> should work fine. Only "struct stat" should really care, and even then they
>> could just use the actual primitive type in the struct definition...
>>
>> (I'm not a fan of data hiding without some _reason_ for it. I used to humor
>> it a lot more, but now I want to know what/why it's doing.)
>
> funnily enough, i'm having exactly this argument with the person who
> asked for this chmod functionality, since they own the ABI checker,
> and i'm claiming that telling me that i've "changed" u_int32_t to
> uint32_t is not helpful, and that when talking about ABI i always want
> the underlying type :-)

LP64 remains a good idea. Pity the ANSI C committee for C89 didn't have a spine.

(Yeah they had to navigate the 16->32 bit transition, but LP32 for 32-bit ANSI C
systems would have made OBVIOUS SENSE. "There are older systems that aren't
LP32" was a given. The 68k came out in 1980 and the 386 in 1985, they weren't
exactly taken by surprise by 32 bit registers and a flat memory model...)

Rob


More information about the Toybox mailing list