Commit | Line | Data |
---|---|---|
f9af3a4c ACM |
1 | define SOURCE_HELLO |
2 | #include <stdio.h> | |
3 | int main(void) | |
4 | { | |
5 | return puts(\"hi\"); | |
6 | } | |
7 | endef | |
8 | ||
9 | ifndef NO_DWARF | |
10 | define SOURCE_DWARF | |
11 | #include <dwarf.h> | |
a7112397 RM |
12 | #include <elfutils/libdw.h> |
13 | #include <elfutils/version.h> | |
f9af3a4c ACM |
14 | #ifndef _ELFUTILS_PREREQ |
15 | #error | |
16 | #endif | |
17 | ||
18 | int main(void) | |
19 | { | |
20 | Dwarf *dbg = dwarf_begin(0, DWARF_C_READ); | |
21 | return (long)dbg; | |
22 | } | |
23 | endef | |
24 | endif | |
25 | ||
26 | define SOURCE_LIBELF | |
27 | #include <libelf.h> | |
28 | ||
29 | int main(void) | |
30 | { | |
31 | Elf *elf = elf_begin(0, ELF_C_READ, 0); | |
32 | return (long)elf; | |
33 | } | |
34 | endef | |
35 | ||
36 | define SOURCE_GLIBC | |
37 | #include <gnu/libc-version.h> | |
38 | ||
39 | int main(void) | |
40 | { | |
41 | const char *version = gnu_get_libc_version(); | |
42 | return (long)version; | |
43 | } | |
44 | endef | |
45 | ||
46 | define SOURCE_ELF_MMAP | |
47 | #include <libelf.h> | |
48 | int main(void) | |
49 | { | |
50 | Elf *elf = elf_begin(0, ELF_C_READ_MMAP, 0); | |
51 | return (long)elf; | |
52 | } | |
53 | endef | |
54 | ||
55 | ifndef NO_NEWT | |
56 | define SOURCE_NEWT | |
57 | #include <newt.h> | |
58 | ||
59 | int main(void) | |
60 | { | |
61 | newtInit(); | |
62 | newtCls(); | |
63 | return newtFinished(); | |
64 | } | |
65 | endef | |
66 | endif | |
67 | ||
c31a9457 PE |
68 | ifndef NO_GTK2 |
69 | define SOURCE_GTK2 | |
70 | #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" | |
71 | #include <gtk/gtk.h> | |
72 | #pragma GCC diagnostic error \"-Wstrict-prototypes\" | |
73 | ||
74 | int main(int argc, char *argv[]) | |
75 | { | |
76 | gtk_init(&argc, &argv); | |
77 | ||
78 | return 0; | |
79 | } | |
80 | endef | |
81 | endif | |
82 | ||
f9af3a4c ACM |
83 | ifndef NO_LIBPERL |
84 | define SOURCE_PERL_EMBED | |
85 | #include <EXTERN.h> | |
86 | #include <perl.h> | |
87 | ||
88 | int main(void) | |
89 | { | |
90 | perl_alloc(); | |
91 | return 0; | |
92 | } | |
93 | endef | |
94 | endif | |
95 | ||
96 | ifndef NO_LIBPYTHON | |
ced465c4 MW |
97 | define SOURCE_PYTHON_VERSION |
98 | #include <Python.h> | |
99 | #if PY_VERSION_HEX >= 0x03000000 | |
100 | #error | |
101 | #endif | |
102 | int main(void){} | |
103 | endef | |
f9af3a4c ACM |
104 | define SOURCE_PYTHON_EMBED |
105 | #include <Python.h> | |
f9af3a4c ACM |
106 | int main(void) |
107 | { | |
108 | Py_Initialize(); | |
109 | return 0; | |
110 | } | |
111 | endef | |
112 | endif | |
113 | ||
114 | define SOURCE_BFD | |
115 | #include <bfd.h> | |
116 | ||
117 | int main(void) | |
118 | { | |
119 | bfd_demangle(0, 0, 0); | |
120 | return 0; | |
121 | } | |
122 | endef | |
123 | ||
124 | define SOURCE_CPLUS_DEMANGLE | |
125 | extern char *cplus_demangle(const char *, int); | |
126 | ||
127 | int main(void) | |
128 | { | |
129 | cplus_demangle(0, 0); | |
130 | return 0; | |
131 | } | |
132 | endef | |
133 | ||
f4e7ac0a KS |
134 | define SOURCE_STRLCPY |
135 | #include <stdlib.h> | |
136 | extern size_t strlcpy(char *dest, const char *src, size_t size); | |
137 | ||
138 | int main(void) | |
139 | { | |
140 | strlcpy(NULL, NULL, 0); | |
141 | return 0; | |
142 | } | |
143 | endef |