Skip to content

Commit 2a313ae

Browse files
committed
fbc-tests: varargs.bas: snprintf() should be standard stdio function
1 parent 75ec904 commit 2a313ae

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

inc/crt/dos/stdio.bi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,6 @@ declare function popen cdecl alias "popen" (byval as zstring ptr, byval as zstri
4141
declare function pclose cdecl alias "pclose" (byval as FILE ptr) as integer
4242
declare function getw cdecl alias "getw" (byval as FILE ptr) as integer
4343
declare function putw cdecl alias "putw" (byval as integer, byval as FILE ptr) as integer
44+
declare function snprintf cdecl alias "snprintf" (byval as zstring ptr, byval as size_t, byval as zstring ptr, ...) as long
4445

45-
#endif
46+
#endif

tests/crt/varargs.bas

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ SUITE( fbc_tests.crt.varargs )
55

66
TEST( args )
77

8-
#ifndef snprintf
9-
CU_FAIL( snprintf not available for this target )
10-
#else
118
'' To test varargs even under -gen gcc, when other vararg tests are
129
'' disabled due to va_first() being disallowed in -gen gcc
1310
const BUFFER_SIZE = 128
@@ -16,7 +13,6 @@ SUITE( fbc_tests.crt.varargs )
1613
dim as zstring ptr pz = @"hello"
1714
snprintf( @z, BUFFER_SIZE, "%i %s %i", i, pz, clng( 456 ) )
1815
CU_ASSERT( z = "123 hello 456" )
19-
#endif
2016

2117
END_TEST
2218

0 commit comments

Comments
 (0)