Closed hazimeh closed 4 years ago
Good point! Thanks for the fix. (I guess I should have written a log function to make such a change easier...)
Why do you disable buffering of stdout
in the tests though? Even if the stream is buffered by default, it should be flushed at the latest when the test program terminates. (On my Linux, this is the case, so the tests work without the call to setbuf
.) Have you encountered a system where buffering is an issue?
Sorry, I missed the comment about the order of messages - that's a valid point of course.
stdout is often parsed by applications and expected to contain specific information.
Example: sqlite3 compiles a tool
mksourceid
that outputs a unique single-line source ID which is plugged into a sqlite3 header file. If it contains SymCC debug/log information, that tool will not be usable.I also disabled buffering in tests so that the order of messages is preserved. This goes hand-in-hand with #17.