X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Fvprintf.c;fp=functions%2Fstdio%2Fvprintf.c;h=4af2f385ebb52d7890aed185893df372b2298cf0;hb=a0746ea9f2660205d2c885e34c515184442ddab1;hp=58e4748c6a1ede25bba056b5b5daaff6b4ef00cb;hpb=60dae0fec674240bad2a6acc58dadbd81cbd9c3a;p=pdclib diff --git a/functions/stdio/vprintf.c b/functions/stdio/vprintf.c index 58e4748..4af2f38 100644 --- a/functions/stdio/vprintf.c +++ b/functions/stdio/vprintf.c @@ -36,11 +36,11 @@ static int testprintf( FILE * stream, size_t n, const char * format, ... ) int main( void ) { FILE * buffer; - TESTCASE( ( buffer = freopen( "testfile", "w", stdout ) ) != NULL ); + TESTCASE( ( buffer = freopen( "testfile", "wb", stdout ) ) != NULL ); #include "printf_testcases.incl" TESTCASE( fclose( buffer ) == 0 ); char readbuffer[1000]; - TESTCASE( ( buffer = fopen( "testfile", "r" ) ) != NULL ); + TESTCASE( ( buffer = fopen( "testfile", "rb" ) ) != NULL ); TESTCASE( fread( readbuffer, 1, 1000, buffer ) == 985 ); TESTCASE( fclose( buffer ) == 0 ); TESTCASE( remove( "testfile" ) == 0 );