"static int __attribute__((unused)) func(int x) { return x; }" },
{ "HAVE_ATTRIBUTE_USED", OUTSIDE_MAIN, NULL,
"static int __attribute__((used)) func(int x) { return x; }" },
+ { "HAVE_BACKTRACE", DEFINES_FUNC, NULL,
+ "#include <execinfo.h>\n"
+ "static int func(int x) {"
+ " void *bt[10];\n"
+ " return backtrace(bt, 10) < x;\n"
+ "}" },
{ "HAVE_BIG_ENDIAN", INSIDE_MAIN|EXECUTE, NULL,
"union { int i; char c[sizeof(int)]; } u;\n"
"u.i = 0x01020304;\n"
"static void *func(int fd) {\n"
" return mmap(0, 65536, PROT_READ, MAP_SHARED, fd, 0);\n"
"}" },
+ { "HAVE_PROC_SELF_MAPS", DEFINES_EVERYTHING|EXECUTE, NULL,
+ "#include <sys/types.h>\n"
+ "#include <sys/stat.h>\n"
+ "#include <sys/fcntl.h>\n"
+ "int main(void) {\n"
+ " return open(\"/proc/self/maps\", O_RDONLY) != -1 ? 0 : 1;\n"
+ "}\n" },
{ "HAVE_QSORT_R_PRIVATE_LAST",
DEFINES_EVERYTHING|EXECUTE|MAY_NOT_COMPILE, NULL,
"#define _GNU_SOURCE 1\n"