Add WITHOUT_THREAD/FPRINTF macros and corresponding code.