Gnulib, the GNU portability library, is a macro system and C declarations and definitions for commonly-used API elements and abstracted system behaviors. It can be used to improve portability and other functionality in your programs.
I maintain stable snapshots of the Gnulib codebase. Snapshots are available from the git repo (branch: stable) or as tarballs:
For detailed information on what is in a stable snapshot, see NEWS.stable.
A guide to creating new stable snapshots is here, along with a helper script, stable-cherry-pick.