3 ms·
I thought the Linux kernel enforces/requires a pointer to fit into a long, so any platform with Linux will define long type as appropriately sized?
by dooglius 3y ago
I thought the Linux kernel enforces/requires a pointer to fit into a long, so any platform with Linux will define long type as appropriately sized?
- DinoCoder99 3y agoI'd much prefer C users not use long at all. What's wrong with size_t and uint32_t and uint64_t?
- UncleEntity 3y ago> What's wrong with size_t and uint32_t and uint64_t? An extra #include and more typing? Plus, all the C89 users are out of luck...
- int_19h 3y agoIt's trivial to roll your own basic <stdint.h> with those types for existing C89 implementations. Unless they don't provide the corresponding type natively at all (which can be the case for some 16-bit platforms and 64-bit). But then you have a bigger problem anyway.
- legulere 3y agoOnly with effort Linux was able to be ported to Clang. All compilers that compile Linux should also be able to deal with size_t and consorts.
- deleted 3y ago[deleted]