blob: 4f1029981bb1609813d824feb6164fcb3f22dbf8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/* APPLE LOCAL file stdint.h */
/* { dg-do run } */
/* { dg-options "-Wall -W" } */
/* Check SIG_ATOMIC_{MIN,MAX}, WINT_{MIN,MAX}. Also check that
stdint.h and sys/types.h can be included simultaneously. */
#include <stdint.h>
#include <sys/types.h>
#include <signal.h>
#include <wchar.h>
#include <stdlib.h>
int main(void)
{
sig_atomic_t s_a;
wint_t wi;
s_a = SIG_ATOMIC_MIN;
if (s_a != SIG_ATOMIC_MIN)
abort ();
if (s_a > 0)
abort ();
s_a--;
if (s_a != SIG_ATOMIC_MAX)
abort ();
if (s_a <= 0)
abort ();
wi = WINT_MIN;
if (wi != WINT_MIN)
abort ();
if (wi > 0)
abort ();
wi--;
if (wi != WINT_MAX)
abort ();
if (wi <= 0)
abort ();
exit (0);
}
|