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 /probe | |
| 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.
Diffstat (limited to 'probe')
| -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 |
4 files changed, 14 insertions, 1 deletions
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') |
