Reduce stdio dependency

This is for freestanding C environments.