forked from Imagelibrary/rtems
Use %ld to print *.tv_nsec.
This commit is contained in:
@@ -110,7 +110,7 @@ rtems_task Init(
|
|||||||
/* print new times to make sure it has changed and we can get the realtime */
|
/* print new times to make sure it has changed and we can get the realtime */
|
||||||
sc = clock_gettime( CLOCK_PROCESS_CPUTIME, &tv );
|
sc = clock_gettime( CLOCK_PROCESS_CPUTIME, &tv );
|
||||||
rtems_test_assert( !sc );
|
rtems_test_assert( !sc );
|
||||||
printf("Time since boot: (%" PRItime_t ", %d)\n", tv.tv_sec,tv.tv_nsec );
|
printf("Time since boot: (%" PRItime_t ", %ld)\n", tv.tv_sec,tv.tv_nsec );
|
||||||
|
|
||||||
sc = clock_gettime( CLOCK_REALTIME, &tv );
|
sc = clock_gettime( CLOCK_REALTIME, &tv );
|
||||||
rtems_test_assert( !sc );
|
rtems_test_assert( !sc );
|
||||||
|
|||||||
@@ -34,39 +34,39 @@ void *POSIX_Init(
|
|||||||
fatal_posix_service_status_errno( sc, EINVAL, "bad conf name" );
|
fatal_posix_service_status_errno( sc, EINVAL, "bad conf name" );
|
||||||
|
|
||||||
sc = sysconf( _SC_CLK_TCK );
|
sc = sysconf( _SC_CLK_TCK );
|
||||||
printf( "sysconf - _SC_CLK_TCK=%d\n", sc );
|
printf( "sysconf - _SC_CLK_TCK=%ld\n", sc );
|
||||||
if ( sc == -1 )
|
if ( sc == -1 )
|
||||||
rtems_test_exit(0);
|
rtems_test_exit(0);
|
||||||
|
|
||||||
sc = sysconf( _SC_OPEN_MAX );
|
sc = sysconf( _SC_OPEN_MAX );
|
||||||
printf( "sysconf - _SC_OPEN_MAX=%d\n", sc );
|
printf( "sysconf - _SC_OPEN_MAX=%ld\n", sc );
|
||||||
if ( sc == -1 )
|
if ( sc == -1 )
|
||||||
rtems_test_exit(0);
|
rtems_test_exit(0);
|
||||||
|
|
||||||
sc = sysconf( _SC_GETPW_R_SIZE_MAX );
|
sc = sysconf( _SC_GETPW_R_SIZE_MAX );
|
||||||
printf( "sysconf - _SC_GETPW_R_SIZE_MAX=%d\n", sc );
|
printf( "sysconf - _SC_GETPW_R_SIZE_MAX=%ld\n", sc );
|
||||||
if ( sc == -1 )
|
if ( sc == -1 )
|
||||||
rtems_test_exit(0);
|
rtems_test_exit(0);
|
||||||
|
|
||||||
sc = sysconf( _SC_PAGESIZE );
|
sc = sysconf( _SC_PAGESIZE );
|
||||||
printf( "sysconf - _SC_PAGESIZE=%d\n", sc );
|
printf( "sysconf - _SC_PAGESIZE=%ld\n", sc );
|
||||||
if ( sc == -1 )
|
if ( sc == -1 )
|
||||||
rtems_test_exit(0);
|
rtems_test_exit(0);
|
||||||
|
|
||||||
sc = getpagesize();
|
sc = getpagesize();
|
||||||
printf( "getpagesize = %d\n", sc );
|
printf( "getpagesize = %ld\n", sc );
|
||||||
if ( sc == -1 )
|
if ( sc == -1 )
|
||||||
rtems_test_exit(0);
|
rtems_test_exit(0);
|
||||||
|
|
||||||
sc = sysconf( 0x12345678 );
|
sc = sysconf( 0x12345678 );
|
||||||
printf( "sysconf - bad parameter = %d errno=%s\n", sc, strerror(errno) );
|
printf( "sysconf - bad parameter = %ld errno=%s\n", sc, strerror(errno) );
|
||||||
if ( (sc != -1) || (errno != EINVAL) )
|
if ( (sc != -1) || (errno != EINVAL) )
|
||||||
rtems_test_exit(0);
|
rtems_test_exit(0);
|
||||||
|
|
||||||
#if defined(__sparc__)
|
#if defined(__sparc__)
|
||||||
/* Solaris _SC_STACK_PROT - 515 */
|
/* Solaris _SC_STACK_PROT - 515 */
|
||||||
sc = sysconf( _SC_PAGESIZE );
|
sc = sysconf( _SC_PAGESIZE );
|
||||||
printf( "sysconf - (SPARC only) _SC_STACK_PROT=%d\n", sc );
|
printf( "sysconf - (SPARC only) _SC_STACK_PROT=%ld\n", sc );
|
||||||
if ( sc == -1 )
|
if ( sc == -1 )
|
||||||
rtems_test_exit(0);
|
rtems_test_exit(0);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ void * task_a (void *arg)
|
|||||||
rtems_test_exit(0);
|
rtems_test_exit(0);
|
||||||
}
|
}
|
||||||
printf(
|
printf(
|
||||||
"task A: timer_settime - value=%" PRItime_t ":%d interval=%" PRItime_t ":%d\n",
|
"task A: timer_settime - value=%" PRItime_t ":%ld interval=%" PRItime_t ":%ld\n",
|
||||||
timergetdata.it_value.tv_sec, timergetdata.it_value.tv_nsec,
|
timergetdata.it_value.tv_sec, timergetdata.it_value.tv_nsec,
|
||||||
timergetdata.it_interval.tv_sec, timergetdata.it_interval.tv_nsec
|
timergetdata.it_interval.tv_sec, timergetdata.it_interval.tv_nsec
|
||||||
);
|
);
|
||||||
@@ -307,7 +307,7 @@ void * task_c (void *arg)
|
|||||||
rtems_test_exit(0);
|
rtems_test_exit(0);
|
||||||
}
|
}
|
||||||
printf(
|
printf(
|
||||||
"task C: timer_gettime - %" PRItime_t ":%d remaining from %" PRItime_t ":%d\n",
|
"task C: timer_gettime - %" PRItime_t ":%ld remaining from %" PRItime_t ":%ld\n",
|
||||||
timergetdata.it_value.tv_sec, timergetdata.it_value.tv_nsec,
|
timergetdata.it_value.tv_sec, timergetdata.it_value.tv_nsec,
|
||||||
timergetdata.it_interval.tv_sec, timergetdata.it_interval.tv_nsec
|
timergetdata.it_interval.tv_sec, timergetdata.it_interval.tv_nsec
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user