diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2009-02-17 13:10:43 +0100 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2009-02-17 13:10:43 +0100 |
commit | 027c66a72f98cc18af7146e8bfa07e2968f1735e (patch) | |
tree | 00574c921190278d7680d69d6e9e6d2376df987e /tests/port | |
parent | 488fc614147da3c6ac5c040fac46c54f0cdff74d (diff) | |
download | wolfbones-027c66a72f98cc18af7146e8bfa07e2968f1735e.tar.gz wolfbones-027c66a72f98cc18af7146e8bfa07e2968f1735e.tar.bz2 |
tested on Solaris 8, also fixed tset_strerror_r test
Diffstat (limited to 'tests/port')
-rw-r--r-- | tests/port/test_strerror_r.c | 17 |
1 files changed, 5 insertions, 12 deletions
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 ); } |