1 #define _GNU_SOURCE 2 #include <stdio.h> 3 setlinebuf(FILE * f)4 void setlinebuf(FILE *f) 5 { 6 setvbuf(f, 0, _IOLBF, 0); 7 } 8