ath9k: fix RSSI dummy marker value
[linux/fpc-iii.git] / tools / perf / config / feature-tests.mak
blobf5ac77485a4f6124c3216c93556fb26c33ae79c9
1 define SOURCE_HELLO
2 #include <stdio.h>
3 int main(void)
5 return puts(\"hi\");
7 endef
9 ifndef NO_DWARF
10 define SOURCE_DWARF
11 #include <dwarf.h>
12 #include <elfutils/libdw.h>
13 #include <elfutils/version.h>
14 #ifndef _ELFUTILS_PREREQ
15 #error
16 #endif
18 int main(void)
20 Dwarf *dbg = dwarf_begin(0, DWARF_C_READ);
21 return (long)dbg;
23 endef
24 endif
26 define SOURCE_LIBELF
27 #include <libelf.h>
29 int main(void)
31 Elf *elf = elf_begin(0, ELF_C_READ, 0);
32 return (long)elf;
34 endef
36 define SOURCE_GLIBC
37 #include <gnu/libc-version.h>
39 int main(void)
41 const char *version = gnu_get_libc_version();
42 return (long)version;
44 endef
46 define SOURCE_BIONIC
47 #include <android/api-level.h>
49 int main(void)
51 return __ANDROID_API__;
53 endef
55 define SOURCE_ELF_MMAP
56 #include <libelf.h>
57 int main(void)
59 Elf *elf = elf_begin(0, ELF_C_READ_MMAP, 0);
60 return (long)elf;
62 endef
64 ifndef NO_NEWT
65 define SOURCE_NEWT
66 #include <newt.h>
68 int main(void)
70 newtInit();
71 newtCls();
72 return newtFinished();
74 endef
75 endif
77 ifndef NO_GTK2
78 define SOURCE_GTK2
79 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
80 #include <gtk/gtk.h>
81 #pragma GCC diagnostic error \"-Wstrict-prototypes\"
83 int main(int argc, char *argv[])
85 gtk_init(&argc, &argv);
87 return 0;
89 endef
91 define SOURCE_GTK2_INFOBAR
92 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
93 #include <gtk/gtk.h>
94 #pragma GCC diagnostic error \"-Wstrict-prototypes\"
96 int main(void)
98 gtk_info_bar_new();
100 return 0;
102 endef
103 endif
105 ifndef NO_LIBPERL
106 define SOURCE_PERL_EMBED
107 #include <EXTERN.h>
108 #include <perl.h>
110 int main(void)
112 perl_alloc();
113 return 0;
115 endef
116 endif
118 ifndef NO_LIBPYTHON
119 define SOURCE_PYTHON_VERSION
120 #include <Python.h>
121 #if PY_VERSION_HEX >= 0x03000000
122 #error
123 #endif
124 int main(void)
126 return 0;
128 endef
129 define SOURCE_PYTHON_EMBED
130 #include <Python.h>
131 int main(void)
133 Py_Initialize();
134 return 0;
136 endef
137 endif
139 define SOURCE_BFD
140 #include <bfd.h>
142 int main(void)
144 bfd_demangle(0, 0, 0);
145 return 0;
147 endef
149 define SOURCE_CPLUS_DEMANGLE
150 extern char *cplus_demangle(const char *, int);
152 int main(void)
154 cplus_demangle(0, 0);
155 return 0;
157 endef
159 define SOURCE_STRLCPY
160 #include <stdlib.h>
161 extern size_t strlcpy(char *dest, const char *src, size_t size);
163 int main(void)
165 strlcpy(NULL, NULL, 0);
166 return 0;
168 endef
170 ifndef NO_LIBUNWIND
171 define SOURCE_LIBUNWIND
172 #include <libunwind.h>
173 #include <stdlib.h>
175 extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as,
176 unw_word_t ip,
177 unw_dyn_info_t *di,
178 unw_proc_info_t *pi,
179 int need_unwind_info, void *arg);
182 #define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table)
184 int main(void)
186 unw_addr_space_t addr_space;
187 addr_space = unw_create_addr_space(NULL, 0);
188 unw_init_remote(NULL, addr_space, NULL);
189 dwarf_search_unwind_table(addr_space, 0, NULL, NULL, 0, NULL);
190 return 0;
192 endef
193 endif
195 ifndef NO_BACKTRACE
196 define SOURCE_BACKTRACE
197 #include <execinfo.h>
198 #include <stdio.h>
200 int main(void)
202 backtrace(NULL, 0);
203 backtrace_symbols(NULL, 0);
204 return 0;
206 endef
207 endif
209 ifndef NO_LIBAUDIT
210 define SOURCE_LIBAUDIT
211 #include <libaudit.h>
213 int main(void)
215 return audit_open();
217 endef
218 endif
220 define SOURCE_ON_EXIT
221 #include <stdio.h>
223 int main(void)
225 return on_exit(NULL, NULL);
227 endef