Skip to content

ck_ec: test fixes for platforms where sizeof(time_t)!=sizeof(long) - #290

Merged
cognet merged 1 commit into
concurrencykit:masterfrom
nickhutchinson:ec-timespec-tests
Sep 29, 2026
Merged

cognet merged 1 commit into
concurrencykit:masterfrom
nickhutchinson:ec-timespec-tests

Conversation

@nickhutchinson

Copy link
Copy Markdown
Contributor

In ck_ec tests, remove the assumption that sizeof(time_t)==sizeof(long), and use a homebrewed int128 implementation rather than assuming the compiler itself has support for the __int128 type.

On Windows, sizeof(long)==4 and sizeof(time_t)==8. GCC/Clang do not support __int128 on 32-bit targets, and MSVC does not support it at all.

In ck_ec tests, remove the assumption that
`sizeof(time_t)==sizeof(long)`, and use a homebrewed int128
implementation rather than assuming the compiler itself has support for
the `__int128` type.

On Windows, `sizeof(long)==4` and `sizeof(time_t)==8`. GCC/Clang do not
support `__int128` on 32-bit targets, and MSVC does not support it at
all.

- Fixes prop_test_timeutil_add, prop_test_timeutil_add_ns,
  prop_test_timeutil_cmp tests failing on Windows MinGW.
- Fixes concurrencykit#208.
@cognet

cognet commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Thanks a lot for doing this! Hopefully you won't have much more trouble on your quest to get it to properly run on Windows

@cognet
cognet merged commit 91a56fa into concurrencykit:master Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ck_ec test fails on 32-bit musl systems

2 participants