Add configuration check for setlinebuf

This function is not present on MinGW (of course), and
the equivalent behaves in a non-sensical way (full buffering).

See discussion here: https://stackoverflow.com/questions/15972550/what-is-the-use-of-setvbuf-in-an-applicationexecutable
This commit is contained in:
Christophe de Dinechin 2019-03-28 11:37:19 +01:00
parent e5e8eb4866
commit 9089276d59
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,7 @@
#include <stdio.h>
int main()
{
FILE *f = stdout;
setlinebuf(f);
}

View File

@ -51,6 +51,7 @@ CONFIG= <stdio.h> \
<sys/improbable.h> \ <sys/improbable.h> \
<iostream> \ <iostream> \
clearenv \ clearenv \
setlinebuf \
libm \ libm \
liboony \ liboony \
sbrk sbrk