From dc4fbb81d1438794e7e9f16b70bd1cb8abc4c64e Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Thu, 29 Oct 2009 05:45:49 +0000 Subject: Comment out sysconf(LONG_MAX) check (not useful). Change sysconf(0x12345678) check into sysconf(INT_MAX) for better 16bit compliance. --- testsuites/psxtests/psxsysconf/init.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'testsuites/psxtests/psxsysconf/init.c') diff --git a/testsuites/psxtests/psxsysconf/init.c b/testsuites/psxtests/psxsysconf/init.c index c220657847..1d6bdb06d2 100644 --- a/testsuites/psxtests/psxsysconf/init.c +++ b/testsuites/psxtests/psxsysconf/init.c @@ -28,11 +28,17 @@ void *POSIX_Init( puts( "sysconf -- bad configuration parameter - negative" ); sc = sysconf( -1 ); fatal_posix_service_status_errno( sc, EINVAL, "bad conf name" ); - + +#if UNUSED +/* FIXME: This test doesn't make sense. + * On targets with sizeof(int) < sizeof(long), compilation will fail, + * On targets with sizeof(int) == sizeof(long) the call is valid. + */ puts( "sysconf -- bad configuration parameter - too large" ); sc = sysconf( LONG_MAX ); fatal_posix_service_status_errno( sc, EINVAL, "bad conf name" ); - +#endif + sc = sysconf( _SC_CLK_TCK ); printf( "sysconf - _SC_CLK_TCK=%ld\n", sc ); if ( sc == -1 ) @@ -58,7 +64,7 @@ void *POSIX_Init( if ( sc == -1 ) rtems_test_exit(0); - sc = sysconf( 0x12345678 ); + sc = sysconf( INT_MAX ); printf( "sysconf - bad parameter = %ld errno=%s\n", sc, strerror(errno) ); if ( (sc != -1) || (errno != EINVAL) ) rtems_test_exit(0); -- cgit v1.2.3