Skip to content

Commit 75ab75d

Browse files
committed
🛠 Windows is still broken, but Linux/BSDs/MacOS should be okay!
1 parent a717118 commit 75ab75d

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/push-pull_request.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ jobs:
1616
- ubuntu
1717
- windows
1818
- macos
19+
image_version:
20+
- latest
21+
- 2025
1922
compiler:
2023
- msvc
2124
- gcc
@@ -32,7 +35,14 @@ jobs:
3235
os: ubuntu
3336
- compiler: msvc
3437
os: macos
35-
runs-on: ${{matrix.os}}-latest
38+
# workarounds for shitty hard requirements in MSVC STL
39+
- os: ubuntu
40+
image_version: 2025
41+
- os: macos
42+
image_version: 2025
43+
- os: windows
44+
image_version: latest
45+
runs-on: ${{matrix.os}}-${{matrix.image_version}}
3646
env:
3747
CMAKE_CXX_STANDARD: ${{matrix.cxx_standard}}
3848
CMAKE_C_STANDARD: ${{matrix.c_standard}}

include/ztd/thread/threads.native.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ typedef
8383
#if ZTD_IS_ON(ZTD_THREAD_INTEGER_THREAD_ID)
8484
#if ZTD_IS_ON(ZTD_THREAD_ANY_WIN32_BASED)
8585
uint32_t
86-
#else ZTD_IS_ON(ZTD_HEADER_PTHREAD_NP)
86+
#else
8787
int32_t
8888
#endif
8989
#else

source/ztd/thread/threads.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,9 @@
3939
ZTD_USE(ZTD_THREAD_API_LINKAGE)
4040
const ztdc_thrd_native_handle_t ztdc_thrd_null_native_handle =
4141
#if ZTD_IS_ON(ZTD_THREAD_PTHREAD_BASED)
42-
#if ZTD_IS_OFF(ZTD_HEADER_THREADS_H)
4342
(ztdc_thrd_native_handle_t)NULL
4443
#else
45-
#endif
46-
#else
47-
(ztdc_thrd_native_handle_t)NULL
44+
(ztdc_thrd_native_handle_t)INVALID_HANDLE_VALUE
4845
#endif
4946
;
5047

@@ -143,6 +140,7 @@ ZTD_USE(ZTD_THREAD_API_LINKAGE)
143140
ztdc_thrd_id_t ztdc_thrd_current_id() {
144141
// what the fuck is going on, lol.
145142
#if ZTD_IS_ON(ZTD_THREAD_ANY_WIN32_BASED)
143+
thrd_t __thr = thrd_current();
146144
return *__ztdc_win32_handle_id(&__thr);
147145
#elif ZTD_IS_ON(ZTD_PLATFORM_DRAGONFLY_BSD)
148146
return (ztdc_thrd_id_t)lwp_gettid();

0 commit comments

Comments
 (0)