forked from Imagelibrary/rtems
new files
This commit is contained in:
29
c/src/tests/psxtests/psxhdrs/clock02.c
Normal file
29
c/src/tests/psxtests/psxhdrs/clock02.c
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifndef _POSIX_TIMERS
|
||||
#error "rtems is supposed to have clock_settime"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
clockid_t clock_id = 0;
|
||||
struct timespec tp;
|
||||
int result;
|
||||
|
||||
result = clock_settime( clock_id, &tp );
|
||||
}
|
||||
30
c/src/tests/psxtests/psxhdrs/clock03.c
Normal file
30
c/src/tests/psxtests/psxhdrs/clock03.c
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifndef _POSIX_TIMERS
|
||||
#error "rtems is supposed to have clock_getres"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
clockid_t clock_id = 0;
|
||||
struct timespec res;
|
||||
int result;
|
||||
|
||||
result = clock_getres( clock_id, &res );
|
||||
}
|
||||
25
c/src/tests/psxtests/psxhdrs/time08.c
Normal file
25
c/src/tests/psxtests/psxhdrs/time08.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void )
|
||||
{
|
||||
char *buffer;
|
||||
time_t time;
|
||||
struct tm *timestruct;
|
||||
|
||||
timestruct = gmtime( &time );
|
||||
}
|
||||
24
c/src/tests/psxtests/psxhdrs/time09.c
Normal file
24
c/src/tests/psxtests/psxhdrs/time09.c
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void )
|
||||
{
|
||||
time_t time;
|
||||
struct tm *timestruct;
|
||||
|
||||
timestruct = localtime( &time );
|
||||
}
|
||||
25
c/src/tests/psxtests/psxhdrs/time10.c
Normal file
25
c/src/tests/psxtests/psxhdrs/time10.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void )
|
||||
{
|
||||
char *buffer_pointer;
|
||||
struct tm timestruct;
|
||||
char buffer[ 80 ];
|
||||
|
||||
buffer_pointer = asctime_r( ×truct, buffer );
|
||||
}
|
||||
25
c/src/tests/psxtests/psxhdrs/time11.c
Normal file
25
c/src/tests/psxtests/psxhdrs/time11.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void )
|
||||
{
|
||||
char *buffer_pointer;
|
||||
char buffer[ 80 ];
|
||||
time_t time;
|
||||
|
||||
buffer_pointer = ctime_r( &time, buffer );
|
||||
}
|
||||
25
c/src/tests/psxtests/psxhdrs/time12.c
Normal file
25
c/src/tests/psxtests/psxhdrs/time12.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void )
|
||||
{
|
||||
time_t time;
|
||||
struct tm *timestruct_pointer;
|
||||
struct tm timestruct;
|
||||
|
||||
timestruct_pointer = gmtime_r( &time, ×truct );
|
||||
}
|
||||
25
c/src/tests/psxtests/psxhdrs/time13.c
Normal file
25
c/src/tests/psxtests/psxhdrs/time13.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void )
|
||||
{
|
||||
time_t time;
|
||||
struct tm *timestruct_pointer;
|
||||
struct tm timestruct;
|
||||
|
||||
timestruct_pointer = localtime_r( &time, ×truct );
|
||||
}
|
||||
Reference in New Issue
Block a user