"static void *func(void *h, size_t hl, void *n, size_t nl) {\n"
"return memmem(h, hl, n, nl);"
"}\n", },
+ { "HAVE_MEMRCHR", DEFINES_FUNC, NULL, NULL,
+ "#define _GNU_SOURCE\n"
+ "#include <string.h>\n"
+ "static void *func(void *s, int c, size_t n) {\n"
+ "return memrchr(s, c, n);"
+ "}\n", },
{ "HAVE_MMAP", DEFINES_FUNC, NULL, NULL,
"#include <sys/mman.h>\n"
"static void *func(int fd) {\n"
"#include <sys/termios.h>\n" },
{ "HAVE_TYPEOF", INSIDE_MAIN, NULL, NULL,
"__typeof__(argc) i; i = argc; return i == argc ? 0 : 1;" },
+ { "HAVE_UNALIGNED_ACCESS", DEFINES_EVERYTHING|EXECUTE, NULL, NULL,
+ "#include <string.h>\n"
+ "int main(int argc, char *argv[]) {\n"
+ " char pad[sizeof(int *) * 1];\n"
+ " strncpy(pad, argv[0], sizeof(pad));\n"
+ " return *(int *)(pad) == *(int *)(pad + 1);\n"
+ "}\n" },
{ "HAVE_UTIME", DEFINES_FUNC, NULL, NULL,
"#include <sys/types.h>\n"
"#include <utime.h>\n"