source: rtems/testsuites/psxtests/psxhdrs/time03.c @ 003999c

4.115
Last change on this file since 003999c was 077184fd, checked in by Ralf Corsepius <ralf.corsepius@…>, on 10/12/11 at 04:19:11

2011-10-12 Ralf Corsépius <ralf.corsepius@…>

  • psxhdrs/time01.c, psxhdrs/time02.c, psxhdrs/time03.c, psxhdrs/time04.c, psxhdrs/time05.c, psxhdrs/time06.c, psxhdrs/time07.c, psxhdrs/time08.c, psxhdrs/time09.c, psxhdrs/time10.c, psxhdrs/time11.c, psxhdrs/time12.c, psxhdrs/time13.c: Let test() return values (avoid warnings).
  • Property mode set to 100644
File size: 846 bytes
Line 
1/*
2 *  This test file is used to verify that the header files associated with
3 *  invoking this function are correct.
4 *
5 *  COPYRIGHT (c) 1989-2009.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.com/license/LICENSE.
11 *
12 *  $Id$
13 */
14
15#ifdef HAVE_CONFIG_H
16#include "config.h"
17#endif
18
19#include <time.h>
20
21int test( void );
22
23int test( void )
24{
25  struct tm timestruct;
26  time_t    time_encoded;
27
28  timestruct.tm_sec = 0;
29  timestruct.tm_min = 0;
30  timestruct.tm_hour = 0;
31  timestruct.tm_mday = 1;
32  timestruct.tm_mon = 0;
33  timestruct.tm_year = 0;
34  timestruct.tm_wday = 0;
35  timestruct.tm_yday = 0;
36  timestruct.tm_isdst = 0;
37
38  time_encoded = mktime( &timestruct );
39
40  return (time_encoded != -1);
41}
Note: See TracBrowser for help on using the repository browser.