bisqwit / adlmidi

ADLMIDI is a MIDI player that uses OPL3 emulation.
59 stars 10 forks source link

stderr is set up using C standard library function. #2

Closed MechanicalPen closed 5 years ago

MechanicalPen commented 5 years ago

On this line; https://github.com/bisqwit/adlmidi/blob/master/midiplay.cc#L361

setbuffer(stderr, stderr_buffer, sizeof(stderr_buffer)); (the c form) is used rather than, setvbuf(stderr, stderr_buffer, _IONBF, sizeof(stderr_buffer)); (the c++ form).

I only noticed this because I don't have the C language build tools installed, so compilation failed.

bisqwit commented 5 years ago

Good point! I did not realize this function was not brought into C++. The std:: prefix is missing there because I thought it was a library defect, but I never bothered to verify. Fixed in commit 2f3a6263b79b832efac1feda07cee07820dfc309.