Support building natively on Windows

When building for Windows using a native toolchain (i.e. not MinGW or MSYS), `<unistd.h>` is not available.  Include `<io.h>` instead and define `strcasecmp`.
This commit is contained in:
Frederik Carlier 2024-09-13 22:05:06 +02:00
parent d27af6af10
commit 92c14d194f
No known key found for this signature in database
GPG key ID: 11638A1220ED91C7

View file

@ -38,7 +38,12 @@
#endif
#include <signal.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#else
#include <io.h>
#define strcasecmp _stricmp
#endif
#include <ctype.h>
#ifdef __MINGW__