X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=functions%2Fstdio%2Fvprintf.c;h=4af2f385ebb52d7890aed185893df372b2298cf0;hb=ef983399df8acb3c59a4a236b487613cf683d7aa;hp=58e4748c6a1ede25bba056b5b5daaff6b4ef00cb;hpb=06f8c9dc697f4cc88f601f742ec581da79ead02f;p=fw%2Fpdclib 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 );