From 027c66a72f98cc18af7146e8bfa07e2968f1735e Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Tue, 17 Feb 2009 13:10:43 +0100 Subject: tested on Solaris 8, also fixed tset_strerror_r test --- tests/port/test_strerror_r.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'tests/port') diff --git a/tests/port/test_strerror_r.c b/tests/port/test_strerror_r.c index 40079d8..3f95f06 100644 --- a/tests/port/test_strerror_r.c +++ b/tests/port/test_strerror_r.c @@ -9,22 +9,15 @@ int main( void ) { int i; - int res_sys; - int res_stub; - char buf_sys[1024]; - char buf_stub[1024]; + int res; + char buf[1024]; /* go through signal numbers (TODO: find out how many of them there are!) */ for( i = 0; i < 255; i++ ) { - printf( "%d: ", i ); errno = 0; - *buf_sys = '\0'; - res_sys = strerror_r( i, buf_sys, 1024 ); - printf( "sys: %d \"%s\"", res_sys, buf_sys ); - errno = 0; - *buf_stub = '\0'; - res_stub = wolf_strerror_r( i, buf_stub, 1024 ); - printf( ", stub: %d \"%s\"\n", res_stub, buf_stub ); + *buf = '\0'; + res = wolf_strerror_r( i, buf, 1024 ); + printf( "%d: %d \"%s\"\n", i, res, buf ); } exit( EXIT_SUCCESS ); } -- cgit v1.2.3-54-g00ecf