2 ms·
how is it difficult to avoid libc? All you need are the system calls of your kernel. You don't need libc to call those.
by mgaunard 4y ago
how is it difficult to avoid libc?
All you need are the system calls of your kernel. You don't need libc to call those.
- woodruffw 4y agoRelatively little of libc overlaps with the system call space: there's some I/O and a little bit of stuff that could be done with a system call (like time), but traditionally aren't for both concern separation and performance reasons. As a small example: `strtok` is simultaneously a very useful function and one that's annoying to use correctly (much less independently implement correctly). It isn't a system call.
- mgaunard 4y agostrtok is a trivial and not particularly good function, in part due to its poor API. You can write a better one in minutes (which is incidentally less than the time to understand the corner cases of this function's behaviour)