the void you describe is largely addressed by things like the gnulib project. it takes care
of all the OS-specific issues by checking to see if the function in question is usable on the
host system. if it isnt, the gnulib version is provided. thus the code that *you* write is
able to freely assume that function in question is available.
as for encouraging ifdef's, there are simply some things you cannot solve otherwise. how do
you propose people integrate optional support for addon libraries ? perhaps you can support a
wide range of graphic formats, but only if the external library is available ... yes, you can
write autotool code to largely avoid this (make most pieces standalone files that are
optionally compiled), but it doesnt make the issue magically go away due to the nature of the
code (assuming C/C++ here).