3 ms·
I understand Drepper pretty much considers string.h a lost cause, and I can’t fault him for that. It’s rather that POSIX decided to add the strl functions, so
by masklinn 3y ago
I understand Drepper pretty much considers string.h a lost cause, and I can’t fault him for that.
It’s rather that POSIX decided to add the strl functions, so adding them (and verifying their semantics) is a necessity.
- silon42 3y agoA purist would support removing strcpy, etc... but that wouldn't go well, so adding an improvement is acceptable.
- masklinn 3y ago> A purist would support removing strcpy, etc... That is very much Drepper’s position: > Correct string handling means that you always know how long your strings are and therefore you can you memcpy (instead of strcpy). > Beside, those who are using strcat or variants deserved to be punished.
- Gibbon1 3y agoThey should have added a warning for strcpy 20 years ago and shipped the compiler with it default enabled.