root / tests / tcg / cris / check_time2.c @ c09015dd
History | View | Annotate | Download (323 Bytes)
1 | dd43edf4 | ths | /* CB_SYS_time doesn't implement the Linux time syscall; the return
|
---|---|---|---|
2 | dd43edf4 | ths | value isn't written to the argument. */
|
3 | dd43edf4 | ths | |
4 | dd43edf4 | ths | #include <time.h> |
5 | dd43edf4 | ths | #include <stdio.h> |
6 | dd43edf4 | ths | #include <stdlib.h> |
7 | dd43edf4 | ths | |
8 | dd43edf4 | ths | int
|
9 | dd43edf4 | ths | main (void)
|
10 | dd43edf4 | ths | { |
11 | dd43edf4 | ths | time_t x = (time_t) -1;
|
12 | dd43edf4 | ths | time_t t = time (&x); |
13 | dd43edf4 | ths | |
14 | dd43edf4 | ths | if (t == (time_t) -1 || t != x) |
15 | dd43edf4 | ths | abort (); |
16 | dd43edf4 | ths | printf ("pass\n");
|
17 | dd43edf4 | ths | exit (0);
|
18 | dd43edf4 | ths | } |