Newlib stdout buffering
Posted: Mon Jan 07, 2013 7:45 pm
I am using newlib 1.20.0 and it isn't flushing stdout whenever scanf() is called. In particular,
This writes "Hello!" to the screen and then waits for my input on Linux. On my OS, it writes nothing and then waits for input. The buffer only gets flushed when I print a newline character. Is there something I have to do on my end to make this happen?
Thank you.
Code: Select all
#include <stdio.h>
int main()
{
int a;
printf("Hello!");
scanf("%d",&a);
return 0;
}
Thank you.