Windows: make the CMake build work with MSYS2's native toolchain

This commit is contained in:
XYZ
2026-10-06 16:13:45 +08:00
parent 1c26cc6e30
commit 3db33eddac
4 changed files with 106 additions and 6 deletions
+11
View File
@@ -111,6 +111,17 @@ void os_localtime(const time_t *t, struct tm *out);
int os_getpid(void);
int os_chmod_private(const char *path); /* best-effort 0600; no-op/ok on Win */
/* --- libc gaps on Windows ------------------------------------------------
* MinGW-w64 provides neither strcasestr() (a GNU extension) nor
* setenv()/unsetenv() (POSIX): they are simply absent from its headers.
* src/tui.c uses all three. Implemented in os_compat.c for _WIN32 only,
* so the Unix builds keep using the libc versions. */
#if defined(_WIN32)
char *strcasestr(const char *haystack, const char *needle);
int setenv(const char *name, const char *value, int overwrite);
int unsetenv(const char *name);
#endif
#ifdef __cplusplus
}
#endif