On Tue, May 26, 2020 at 12:13:02AM +0200, Ingo Schwarze wrote:
> Regarding the FreeBSD headers, i like them even less.  There are both
> terrible design choices and terrible implementation choices.  Regarding
> design, it appears that you *must* #include <xlocale.h> after other
> headers - if you include it before, it won't work.  Regarding
> implementation, there is quite repulsive macro abuse in xlocale/_ctype.h;
> but probably that can be unrolled in LibreSSL style.  Either way, none
> of that hinders providing them if doing so yields benefit.

Thinking a bit more about that, two points:
- we do have headers in sys/  that do require a specific order of inclusion,
though that has mostly vanished over the years

- starting from a FreeBSD-like structure and making xlocale.h 
position-independent if we so wish is trivial  and not even that much
work. Each snippet is neatly tucked into an xlocale/  subdirectory,
so including xlocale.h early just requires something like

#ifdef _X_LOCALE_H
#include <xlocale/_foo.h>
#endif

inside each <foo.h> header...

Reply via email to