Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sat, 25 Aug 2012 21:42:25 -0400
From: Gregor Richards <gr@...due.edu>
To: musl@...ts.openwall.com
Subject: C11 low-hanging fruit

Attached is a diff that adds the trivially-simple bits of C11. That is, 
those that require changes to the standard headers, but very little in 
the way of implementation. Included are:
  * stdalign.h , including backwards compatibility for GCC.
  * aligned_alloc
  * fopen(..., "...x")
  * conditional removal of gets

Excluded are:
  * threads.h (waiting to see glibc's ABI)
  * stdatomic.h (complicated, probably has ABI implications too, not 
even fully supported by GCC yet)
  * uchar.h (this is MOSTLY trivial since musl's wchar is Unicode 
anyway, but char32_t makes it a bit more than some weak aliases)
  * at_quick_exit, quick_exit (I suspect that our benevolent dictator 
will have a lot to say in exactly what makes an exit "quick" or not, so 
I'm not touching this)

I used __STDC_VERSION__ in the headers to control exposure of 
aligned_alloc and gets. aligned_alloc I additionally exposed with the 
non-standard feature test macro _ISOC11_SOURCE, for the simple reason 
that glibc does it; if you have a non-C11 compiler but C11 libc, 
-D_ISOC11_SOURCE is a much less gross way to get aligned_alloc than 
-D_GNU_SOURCE, anyway :)

With valediction,
  - Gregor Richards


View attachment "c11-easy.diff" of type "text/x-diff" (2398 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.