[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patches] Option group headers
- To: patches@xxxxxxxxxx
- Subject: [patches] Option group headers
- From: Jim Blandy <jimb@xxxxxxxxxxxxxxxx>
- Date: Sun, 07 Oct 2007 22:21:09 -0700
One of the principles GLIBC (no 'E') is that the API be the same on
all platforms. To that end, there is no installed header (that I've
found) that reflects properties unique to a specific build.
However, in EGLIBC, option groups allow different builds of EGLIBC to
have different APIs. Application code should have the ability to test
which option groups are present. In particular, 1) I'm tired of
manually hacking Makefiles to #define OPTION_foo, and 2) I'd like to
implement a malloc debugging option group without having to go through
every source file that calls mtrace and muntrace and make the calls
conditional.
I'm thinking of having <features.h> #include another installed,
generated header that defines or leaves undefined macros named
__OPTION_x__ for each option group x.
Is this a losing idea, or a good one? I'm definitely a butcher at the
moment; I hope the folks here can help me become a bit more like a
surgeon.