Windows: make the CMake build work with MSYS2's native toolchain
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user