Portability part 1 - C99 printf

printf, sprintf, fprintf etc are now all C99 compliant. All except sprintf, which is now signaled as deprecated. This raises a few warnings about sprintf usage in the build. Some I fix with pull requests that will follow. Some others should be fixed by the respective authors.
My problem with ifdefs in the code is that they hamper readability. Indenting them at least helps a bit. I'm good to convert it here, it's a small function anyway. But I've done this again in a big function (somewhere in cf-serverd), and it really helps readability.

If we adopt any ifdef-specific coding guidelines, I'd prefer them to be that ifdefs in platform-independent files are completely forbidden... ;-)