3 ms·
I would recommend musl, although the style is a bit idiosyncratic in places: https://www.musl-libc.org https://www.musl-libc.org Mbed TLS, since I have it in m
by pascal_cuoq 6y ago
I would recommend musl, although the style is a bit idiosyncratic in places: https://www.musl-libc.org https://www.musl-libc.org
Mbed TLS, since I have it in mind from another thread, is also a pretty clean C library for the problem it tries to solve; it's a testament to its design that we (TrustInSoft, who had not participated to its development) were able to verify that some uses of the library were free of Undefined Behavior: https://tls.mbed.org https://tls.mbed.org
- uasm 6y ago> "I would recommend musl, although the style is a bit idiosyncratic in places: https://www.musl-libc.org" https://www.musl-libc.org" Opened a random part of musl out of sheer boredom. Here's what I see: https://git.musl-libc.org/cgit/musl/tree/include/aio.h https://git.musl-libc.org/cgit/musl/tree/include/aio.h A bunch of return codes #defined like so (see https://git.musl-libc.org/cgit/musl/tree/src/aio/aio.c https://git.musl-libc.org/cgit/musl/tree/src/aio/aio.c): #define AIO_CANCELED 0 #define AIO_NOTCANCELED 1 #define AIO_ALLDONE 2 #define LIO_READ 0 #define LIO_WRITE 1 #define LIO_NOP 2 #define LIO_WAIT 0 #define LIO_NOWAIT 1 Why weren't they using an enum instead? I wouldn't sign off on this code (and I don't think it lives up to best practices).
- pdw 6y agomusl is implementing POSIX. POSIX requires those constants to be preprocessor defines. (Generally, musl asssumes the reader is quite familiar with the C and POSIX standards, which makes sense since it's a libc implementation.)