Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v3.8 227 lines 3.4 kB view raw
1define SOURCE_HELLO 2#include <stdio.h> 3int main(void) 4{ 5 return puts(\"hi\"); 6} 7endef 8 9ifndef NO_DWARF 10define SOURCE_DWARF 11#include <dwarf.h> 12#include <elfutils/libdw.h> 13#include <elfutils/version.h> 14#ifndef _ELFUTILS_PREREQ 15#error 16#endif 17 18int main(void) 19{ 20 Dwarf *dbg = dwarf_begin(0, DWARF_C_READ); 21 return (long)dbg; 22} 23endef 24endif 25 26define SOURCE_LIBELF 27#include <libelf.h> 28 29int main(void) 30{ 31 Elf *elf = elf_begin(0, ELF_C_READ, 0); 32 return (long)elf; 33} 34endef 35 36define SOURCE_GLIBC 37#include <gnu/libc-version.h> 38 39int main(void) 40{ 41 const char *version = gnu_get_libc_version(); 42 return (long)version; 43} 44endef 45 46define SOURCE_BIONIC 47#include <android/api-level.h> 48 49int main(void) 50{ 51 return __ANDROID_API__; 52} 53endef 54 55define SOURCE_ELF_MMAP 56#include <libelf.h> 57int main(void) 58{ 59 Elf *elf = elf_begin(0, ELF_C_READ_MMAP, 0); 60 return (long)elf; 61} 62endef 63 64ifndef NO_NEWT 65define SOURCE_NEWT 66#include <newt.h> 67 68int main(void) 69{ 70 newtInit(); 71 newtCls(); 72 return newtFinished(); 73} 74endef 75endif 76 77ifndef NO_GTK2 78define SOURCE_GTK2 79#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" 80#include <gtk/gtk.h> 81#pragma GCC diagnostic error \"-Wstrict-prototypes\" 82 83int main(int argc, char *argv[]) 84{ 85 gtk_init(&argc, &argv); 86 87 return 0; 88} 89endef 90 91define SOURCE_GTK2_INFOBAR 92#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" 93#include <gtk/gtk.h> 94#pragma GCC diagnostic error \"-Wstrict-prototypes\" 95 96int main(void) 97{ 98 gtk_info_bar_new(); 99 100 return 0; 101} 102endef 103endif 104 105ifndef NO_LIBPERL 106define SOURCE_PERL_EMBED 107#include <EXTERN.h> 108#include <perl.h> 109 110int main(void) 111{ 112perl_alloc(); 113return 0; 114} 115endef 116endif 117 118ifndef NO_LIBPYTHON 119define SOURCE_PYTHON_VERSION 120#include <Python.h> 121#if PY_VERSION_HEX >= 0x03000000 122 #error 123#endif 124int main(void) 125{ 126 return 0; 127} 128endef 129define SOURCE_PYTHON_EMBED 130#include <Python.h> 131int main(void) 132{ 133 Py_Initialize(); 134 return 0; 135} 136endef 137endif 138 139define SOURCE_BFD 140#include <bfd.h> 141 142int main(void) 143{ 144 bfd_demangle(0, 0, 0); 145 return 0; 146} 147endef 148 149define SOURCE_CPLUS_DEMANGLE 150extern char *cplus_demangle(const char *, int); 151 152int main(void) 153{ 154 cplus_demangle(0, 0); 155 return 0; 156} 157endef 158 159define SOURCE_STRLCPY 160#include <stdlib.h> 161extern size_t strlcpy(char *dest, const char *src, size_t size); 162 163int main(void) 164{ 165 strlcpy(NULL, NULL, 0); 166 return 0; 167} 168endef 169 170ifndef NO_LIBUNWIND 171define SOURCE_LIBUNWIND 172#include <libunwind.h> 173#include <stdlib.h> 174 175extern 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); 180 181 182#define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table) 183 184int main(void) 185{ 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; 191} 192endef 193endif 194 195ifndef NO_BACKTRACE 196define SOURCE_BACKTRACE 197#include <execinfo.h> 198#include <stdio.h> 199 200int main(void) 201{ 202 backtrace(NULL, 0); 203 backtrace_symbols(NULL, 0); 204 return 0; 205} 206endef 207endif 208 209ifndef NO_LIBAUDIT 210define SOURCE_LIBAUDIT 211#include <libaudit.h> 212 213int main(void) 214{ 215 return audit_open(); 216} 217endef 218endif 219 220define SOURCE_ON_EXIT 221#include <stdio.h> 222 223int main(void) 224{ 225 return on_exit(NULL, NULL); 226} 227endef