diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-12-20 16:10:41 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-12-20 16:10:41 +0000 |
| commit | b8fc4287839236f239baa9de35dbe0141b56cbf7 (patch) | |
| tree | 46b5a9fadd9768d3a18405b9ba9cfd05455ef329 /runtime | |
| parent | 92f00e46821d40107b6376877e363ff7171dbbd1 (diff) | |
Add executable to find size of jmp_buf
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/meson.build | 3 | ||||
| -rw-r--r-- | runtime/src/jmp_buf/sizeof_jmp_buf.c | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/runtime/meson.build b/runtime/meson.build index 2b90b2fe..569d2d92 100644 --- a/runtime/meson.build +++ b/runtime/meson.build @@ -1,4 +1,5 @@ project('shed-runtime', 'c', default_options : ['warning_level=1']) + static_library( 'shed', 'src/patio/exceptions.c', @@ -17,4 +18,6 @@ if meson.get_external_property('shed_runtime_is_wasm', false) 'deps/walloc/walloc.c', override_options : ['warning_level=0'], ) +else + executable('sizeof_jmp_buf', 'src/jmp_buf/sizeof_jmp_buf.c') endif diff --git a/runtime/src/jmp_buf/sizeof_jmp_buf.c b/runtime/src/jmp_buf/sizeof_jmp_buf.c new file mode 100644 index 00000000..f08825d4 --- /dev/null +++ b/runtime/src/jmp_buf/sizeof_jmp_buf.c @@ -0,0 +1,8 @@ +#include <setjmp.h> +#include <stdio.h> + +int main() { + printf("%lu\n", sizeof(jmp_buf)); + + return 0; +} |
