Commit 4db6a670 authored by Rusty Russell's avatar Rusty Russell

configurator: HAVE_FILE_OFFSET_BITS

Defines whether it's useful to do #define _FILE_OFFSET_BITS 64 to get a
larger off_t.
parent 1c6f12a3
......@@ -5,6 +5,7 @@
#define CCAN_COMPILER "cc"
#define CCAN_CFLAGS "-g -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wwrite-strings -DCCAN_STR_DEBUG=1"
#define HAVE_32BIT_OFF_T 1
#define HAVE_ALIGNOF 1
#define HAVE_ASPRINTF 1
#define HAVE_ATTRIBUTE_COLD 1
......@@ -28,6 +29,7 @@
#define HAVE_BUILTIN_TYPES_COMPATIBLE_P 1
#define HAVE_BYTESWAP_H 1
#define HAVE_COMPOUND_LITERALS 1
#define HAVE_FILE_OFFSET_BITS 1
#define HAVE_FOR_LOOP_DECLARATION 0
#define HAVE_FLEXIBLE_ARRAY_MEMBER 1
#define HAVE_GETPAGESIZE 1
......
......@@ -38,6 +38,11 @@ struct test {
};
static struct test tests[] = {
{ "HAVE_32BIT_OFF_T", DEFINES_EVERYTHING|EXECUTE, NULL,
"#include <sys/types.h>\n"
"int main(int argc, char *argv[]) {\n"
" return sizeof(off_t) == 4 ? 0 : 1;\n"
"}\n" },
{ "HAVE_ALIGNOF", INSIDE_MAIN, NULL,
"return __alignof__(double) > 0 ? 0 : 1;" },
{ "HAVE_ASPRINTF", DEFINES_FUNC, NULL,
......@@ -95,6 +100,13 @@ static struct test tests[] = {
{ "HAVE_COMPOUND_LITERALS", INSIDE_MAIN, NULL,
"int *foo = (int[]) { 1, 2, 3, 4 };\n"
"return foo[0] ? 0 : 1;" },
{ "HAVE_FILE_OFFSET_BITS", DEFINES_EVERYTHING|EXECUTE,
"HAVE_32BIT_OFF_T",
"#define _FILE_OFFSET_BITS 64\n"
"#include <sys/types.h>\n"
"int main(int argc, char *argv[]) {\n"
" return sizeof(off_t) == 8 ? 0 : 1;\n"
"}\n" },
{ "HAVE_FOR_LOOP_DECLARATION", INSIDE_MAIN, NULL,
"for (int i = 0; i < argc; i++) { return 0; };\n"
"return 1;" },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment