Learning to read GNU code?

Currently I know C++ and am learning the discrepancies of C to C++. I've always wanted to understand C and C++ headers files at least a bit more. How can I go about learning GNU source. There is a flood of macros and typedefs but I'd like to understand there code.

One of the reasons for this is because I was making a pow function but I wanted to compare it to the actual math.h pow function. I want to know the design, structure, and style of how GNU goes about to making headers. So I want something a little more concrete than O(n) efficiency if possible.
The actual GNU math.h pow function is not in the header at all, it is here in its general form (written in C)
http://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/ieee754/dbl-64/e_pow.c
and here in its Intel-specific form (written in assembly)
http://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86_64/fpu/e_powl.S

GNU libraries have been evolving since the 1980s, so there is a lot of patches, kludges, and ancient compatibility macros. If you want a library that makes sense, look at clang's libc++ here: http://llvm.org/svn/llvm-project/libcxx/trunk/include/ -- but even that is not educational material, it is a production-grade library code.
Topic archived. No new replies allowed.