fix codetest failure - ASSERT_ARGS does not have a ; after and
[parrot.git] / config / gen / config_h / feature_h.in
blob5bd9190743c3bf952b16f5b15ef5014cd21d09e1
1 /* feature.h - arch specific defines resulting from some tests */
4 #ifndef PARROT_FEATURE_H_GUARD
5 #define PARROT_FEATURE_H_GUARD
7 #perl - all below here gets evaled by perl, OUT is the filehandle
9 print OUT <<'END_PRINT';
11 /* from config/auto/memalign */
12 END_PRINT
13 if (@memalign@ eq 'posix_memalign') {
14     print OUT <<'END_PRINT'
15 #define PARROT_HAS_POSIX_MEMALIGN
16 #define PARROT_HAS_SOME_MEMALIGN
17 END_PRINT
19 elsif (@memalign@ eq 'memalign') {
20     print OUT <<'END_PRINT'
21 #define PARROT_HAS_MEMALIGN
22 #define PARROT_HAS_SOME_MEMALIGN
23 END_PRINT
25 elsif (@memalign@ eq 'some_memalign') {
26     print OUT <<'END_PRINT'
27 #define PARROT_HAS_SOME_MEMALIGN
28 END_PRINT
31 print OUT <<'END_PRINT';
33 /* from config/auto/isreg */
34 END_PRINT
35 unless (@isreg@) {
36     print OUT <<'END_PRINT';
37 #define PARROT_HAS_BROKEN_ISREG 1
38 END_PRINT
41 print OUT <<'END_PRINT';
43 /* from config/auto/jit */
44 END_PRINT
45 if ( @has_exec_protect@ )
47     print OUT <<'END_PRINT';
48 #define PARROT_HAS_EXEC_PROTECT
49 END_PRINT
51 if (@jit_i386@ && @jit_i386@ eq 'fcomip') {
52     print OUT <<'END_PRINT';
53 #ifdef I386
54 #  define PARROT_HAS_JIT_FCOMIP
55 #endif
56 END_PRINT
59 my $va_result = @va_ptr_type@;
60 print OUT <<"END_PRINT";
62 /* from config/auto/va_ptr.pm: va_ptr_type => $va_result */
63 END_PRINT
64 if (@va_ptr_type@ eq 'register') {
65     print OUT <<'END_PRINT';
66 /* if defined __powerpc__ || defined __x86_64__ || defined __s390__ */
67 #  define PARROT_VA_TO_VAPTR(x) (x)
68 END_PRINT
70 if (@va_ptr_type@ eq 'stack') {
71     print OUT <<'END_PRINT';
72 #  define PARROT_VA_TO_VAPTR(x) (&(x))
73 END_PRINT
76 print OUT <<'END_PRINT';
78 /* signal stuff from config/auto/signal */
79 END_PRINT
81 if (@has_sigaction@) {
82     print OUT <<'END_PRINT';
83 #define PARROT_HAS_SIGACTION 1
84 END_PRINT
86 if (@has___sighandler_t@) {
87     print OUT <<'END_PRINT';
88 #define PARROT_HAS___SIGHANDLER_T 1
89 END_PRINT
91 if (@has_setitimer@) {
92     print OUT <<'END_PRINT';
93 #define PARROT_HAS_SETITIMER 1
94 #define PARROT_HAS_SOME_SYS_TIMER 1
95 END_PRINT
98 print OUT <<'END_PRINT';
100 /* from config/auto/env */
101 END_PRINT
102 if (@setenv@) {
103     print OUT <<'END_PRINT';
104 #define PARROT_HAS_SETENV 1
105 END_PRINT
107 if (@unsetenv@) {
108     print OUT <<'END_PRINT';
109 #define PARROT_HAS_UNSETENV 1
110 END_PRINT
113 print OUT <<'END_PRINT';
115 /* from config/auto/inline */
116 END_PRINT
117 if (@inline@ ne '') {
118     my $inl = @inline@;
119     print OUT <<"END_PRINT";
120 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
121 #  define PARROT_INLINE inline
122 #  define PARROT_HAS_INLINE
123 #else
124 #  define PARROT_INLINE
125 #endif
126 END_PRINT
128 else {
129     print OUT <<'END_PRINT';
130 #define PARROT_INLINE
131 END_PRINT
134 my $has_socklen_t = @has_socklen_t@;
135     print OUT <<"END_PRINT";
137 /* from config/auto/socklen_t */
138 #define PARROT_HAS_SOCKLEN_T $has_socklen_t
139 END_PRINT
141 print OUT <<'END_PRINT';
143 /* from config/auto/backtrace */
144 END_PRINT
145 if (defined @backtrace@) {
146     print OUT <<"END_PRINT";
147 #define PARROT_HAS_BACKTRACE
148 #include <execinfo.h>
149 /* __USE_GNU seems to mess up stdio.h on Linux; only define it for dlfcn.h if
150 it's not already defined */
151 #ifndef __USE_GNU
152 #  define __USE_GNU
153 #  include <dlfcn.h>
154 #  undef __USE_GNU
155 #else
156 #  include <dlfcn.h>
157 #endif
158 END_PRINT
161 print OUT <<'END_PRINT';
163 /* from config/auto/neg_0 */
164 END_PRINT
165 if (@has_negative_zero@) {
166     print OUT <<'END_PRINT';
167 #define PARROT_HAS_NEGATIVE_ZERO 1
168 END_PRINT
170 else {
171     print OUT <<'END_PRINT';
172 #undef PARROT_HAS_NEGATIVE_ZERO
173 END_PRINT
176 print OUT <<'END_PRINT';
178 #endif /* PARROT_FEATURE_H_GUARD */
179 END_PRINT
181 print OUT <<"END_PRINT";
184  * Local variables:
185  *   c-file-style: "parrot"
186  * End:
187  * vim: expandtab shiftwidth=4:
188  */
189 END_PRINT