Fix building on Windows #1

Merged
seoxi merged 2 commits from windows_compat into meta 2026-08-27 00:06:38 -04:00
Collaborator

Update keke_array_qsort and keke_array_qsort_header to use qsort_s on Windows since qsort_r isn't standard.
Also define _GNU_SOURCE because GCC isn't happy if you try to use qsort_r without it being defined.

Update keke_array_qsort and keke_array_qsort_header to use qsort_s on Windows since qsort_r isn't standard. Also define _GNU_SOURCE because GCC isn't happy if you try to use qsort_r without it being defined.
starbitdev added 2 commits 2026-08-26 21:43:19 -04:00
qsort_r is not completely standardized, so we must accomodate for different platforms. The qsort_s function is available on Windows and we can use macros to transparently change behavior when required.
GCC will not use non-standard GNU functions unless you define this macro.
seoxi merged commit 8b2a2e8f65 into meta 2026-08-27 00:06:38 -04:00
seoxi deleted branch windows_compat 2026-08-27 00:06:38 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seoxi/libkeke#1