mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
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 */
|
||||
sc = clock_gettime( CLOCK_PROCESS_CPUTIME, &tv );
|
||||
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 );
|
||||
rtems_test_assert( !sc );
|
||||
|
||||
@@ -34,39 +34,39 @@ void *POSIX_Init(
|
||||
fatal_posix_service_status_errno( sc, EINVAL, "bad conf name" );
|
||||
|
||||
sc = sysconf( _SC_CLK_TCK );
|
||||
printf( "sysconf - _SC_CLK_TCK=%d\n", sc );
|
||||
printf( "sysconf - _SC_CLK_TCK=%ld\n", sc );
|
||||
if ( sc == -1 )
|
||||
rtems_test_exit(0);
|
||||
|
||||
sc = sysconf( _SC_OPEN_MAX );
|
||||
printf( "sysconf - _SC_OPEN_MAX=%d\n", sc );
|
||||
printf( "sysconf - _SC_OPEN_MAX=%ld\n", sc );
|
||||
if ( sc == -1 )
|
||||
rtems_test_exit(0);
|
||||
|
||||
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 )
|
||||
rtems_test_exit(0);
|
||||
|
||||
sc = sysconf( _SC_PAGESIZE );
|
||||
printf( "sysconf - _SC_PAGESIZE=%d\n", sc );
|
||||
printf( "sysconf - _SC_PAGESIZE=%ld\n", sc );
|
||||
if ( sc == -1 )
|
||||
rtems_test_exit(0);
|
||||
|
||||
sc = getpagesize();
|
||||
printf( "getpagesize = %d\n", sc );
|
||||
printf( "getpagesize = %ld\n", sc );
|
||||
if ( sc == -1 )
|
||||
rtems_test_exit(0);
|
||||
|
||||
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) )
|
||||
rtems_test_exit(0);
|
||||
|
||||
#if defined(__sparc__)
|
||||
/* Solaris _SC_STACK_PROT - 515 */
|
||||
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 )
|
||||
rtems_test_exit(0);
|
||||
#endif
|
||||
|
||||
@@ -121,7 +121,7 @@ void * task_a (void *arg)
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
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_interval.tv_sec, timergetdata.it_interval.tv_nsec
|
||||
);
|
||||
@@ -307,7 +307,7 @@ void * task_c (void *arg)
|
||||
rtems_test_exit(0);
|
||||
}
|
||||
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_interval.tv_sec, timergetdata.it_interval.tv_nsec
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user