Earlier quoted context omitted.
Have you even looked at the source code to glibc? It's stuffed full of macros and #ifdef hell. Not to mention symbol versioning, the use of gcc-specific compiler extensions, and ancient-UNIX-beard performance hacks. You'd have more success teaching a chimpanzee to play the violin, than automatically translating glibc into anything.
I've seen a lot of weird preprocessor (ab)use in GNU code. The coreutils true/false (of all programs to invoke clever preprocessor tricks...) has this gem: in true.c (all told, an 80-line file): /* Act like "true" by default; false.c overrides this. */ #ifndef EXIT_STATUS # define EXIT_STATUS EXIT_SUCCESS #endif false.c, of course, contains only: #define EXIT_STATUS EXIT_FAILURE #include "true.c" On my current system…
(I dimly remember an essay about similar issue in a similar mainframe command (maybe in JCL?) taking a bunch of revisions to actually get right?)