diff options
| author | Michael Forney <mforney@mforney.org> | 2018-10-16 20:03:05 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2018-10-18 15:27:53 -0700 |
| commit | 6673d9ab5267ff9cfc85f22c38fed5c5e0916df5 (patch) | |
| tree | 1ff249f091dc40bb3f4f6d7ffe8838bd2f5adc23 | |
| parent | 96bcd25021135928929e629fb9d3a86571e11e26 (diff) | |
curl: Probe for size of size_t, time_t and long
There are still several more SIZEOF_* constants in curl_config.h,
but they seem to match for architectures we care about.
| m--------- | pkg/awk/src | 0 | ||||
| -rw-r--r-- | pkg/curl/curl_config.h | 6 | ||||
| -rw-r--r-- | pkg/curl/gen.lua | 10 | ||||
| m--------- | pkg/e2fsprogs/src | 0 | ||||
| m--------- | pkg/iproute2/src | 0 | ||||
| m--------- | pkg/pigz/src | 0 | ||||
| m--------- | pkg/plan9port/src | 0 | ||||
| -rw-r--r-- | probe/SIZEOF_LONG | 1 | ||||
| -rw-r--r-- | probe/SIZEOF_SIZE_T | 2 | ||||
| -rw-r--r-- | probe/SIZEOF_TIME_T | 2 | ||||
| -rw-r--r-- | probe/gen.lua | 10 |
11 files changed, 26 insertions, 5 deletions
diff --git a/pkg/awk/src b/pkg/awk/src -Subproject 1d9d86418a8e77a0270b5cff4ba97c9c4106b75 +Subproject ba9e08cf8e6bc208c61c7e78a53cb671350fdba diff --git a/pkg/curl/curl_config.h b/pkg/curl/curl_config.h index f0df3106..cf75e62f 100644 --- a/pkg/curl/curl_config.h +++ b/pkg/curl/curl_config.h @@ -295,12 +295,12 @@ #define SEND_TYPE_RETV ssize_t #define SIZEOF_CURL_OFF_T 8 #define SIZEOF_INT 4 -#define SIZEOF_LONG 8 +/* probe SIZEOF_LONG */ /* #undef SIZEOF_LONG_LONG */ #define SIZEOF_OFF_T 8 #define SIZEOF_SHORT 2 -#define SIZEOF_SIZE_T 8 -#define SIZEOF_TIME_T 8 +/* probe SIZEOF_SIZE_T */ +/* probe SIZEOF_TIME_T */ #define STDC_HEADERS 1 #define STRERROR_R_TYPE_ARG3 size_t #define TIME_WITH_SYS_TIME 1 diff --git a/pkg/curl/gen.lua b/pkg/curl/gen.lua index 2ecd45d6..9fa4dacb 100644 --- a/pkg/curl/gen.lua +++ b/pkg/curl/gen.lua @@ -2,7 +2,7 @@ cflags{ '-D HAVE_CONFIG_H', '-D BUILDING_LIBCURL', '-D CURL_STATICLIB', - '-I $dir', + '-I $outdir', '-I $outdir/include/curl', '-I $outdir/include', '-I $srcdir/lib', @@ -11,6 +11,13 @@ cflags{ '-I $builddir/pkg/zlib/include', } +build('cat', '$outdir/curl_config.h', { + '$dir/curl_config.h', + '$builddir/probe/SIZEOF_LONG', + '$builddir/probe/SIZEOF_SIZE_T', + '$builddir/probe/SIZEOF_TIME_T', +}) + pkg.hdrs = copy('$outdir/include/curl', '$srcdir/include/curl', { 'curl.h', 'curlver.h', @@ -22,6 +29,7 @@ pkg.hdrs = copy('$outdir/include/curl', '$srcdir/include/curl', { 'system.h', }) pkg.deps = { + '$outdir/curl_config.h', '$dir/headers', 'pkg/libressl/headers', 'pkg/zlib/headers', diff --git a/pkg/e2fsprogs/src b/pkg/e2fsprogs/src -Subproject 40e66e2e8be046f909dfff73b3909f15c9d0f40 +Subproject e36c60bc01c2d0ab9b6034953f7a4e016ea8123 diff --git a/pkg/iproute2/src b/pkg/iproute2/src -Subproject 31ad498a01c929755dc16a5761b011aa37d14d6 +Subproject bfc5bd369c76ffa97043d0fe3ee0c3d8e77b0df diff --git a/pkg/pigz/src b/pkg/pigz/src -Subproject fe822cb435622c43f491013da77b127e9fe851a +Subproject 2519d539688300dbc898ac002a1c000ced28ab0 diff --git a/pkg/plan9port/src b/pkg/plan9port/src -Subproject 35d43924484b88b9816e40d2f6bff4547f3eec4 +Subproject bcd53ab8bbf7890dfb7c5d27d038e63bcc4c8b8 diff --git a/probe/SIZEOF_LONG b/probe/SIZEOF_LONG new file mode 100644 index 00000000..179a5dd5 --- /dev/null +++ b/probe/SIZEOF_LONG @@ -0,0 +1 @@ +_Static_assert(SIZEOF_LONG == sizeof(long), "incorrect size"); diff --git a/probe/SIZEOF_SIZE_T b/probe/SIZEOF_SIZE_T new file mode 100644 index 00000000..6f7ba11f --- /dev/null +++ b/probe/SIZEOF_SIZE_T @@ -0,0 +1,2 @@ +#include <stddef.h> +_Static_assert(SIZEOF_SIZE_T == sizeof(size_t), "incorrect size"); diff --git a/probe/SIZEOF_TIME_T b/probe/SIZEOF_TIME_T new file mode 100644 index 00000000..54d6a4c4 --- /dev/null +++ b/probe/SIZEOF_TIME_T @@ -0,0 +1,2 @@ +#include <sys/types.h> +_Static_assert(SIZEOF_TIME_T == sizeof(time_t), "incorrect size"); diff --git a/probe/gen.lua b/probe/gen.lua index eebb877f..321f283c 100644 --- a/probe/gen.lua +++ b/probe/gen.lua @@ -1,6 +1,14 @@ local function probe(var) - build('probe', '$outdir/'..var, '$dir/'..var, {var=var}) + build('probe', '$outdir/'..var, {'$dir/'..var, '|', 'scripts/probe.sh'}, {var=var}) end probe('HAVE_IMMINTRIN_H') probe('HAVE__MM_MOVEMASK_EPI8') + +local function probesize(var) + build('probesize', '$outdir/'..var, {'$dir/'..var, '|', 'scripts/probe-size.sh'}, {var=var}) +end + +probesize('SIZEOF_LONG') +probesize('SIZEOF_SIZE_T') +probesize('SIZEOF_TIME_T') |
