Support building natively on Windows (#51)

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-14 00:23:01 +02:00 committed by GitHub
parent d27af6af10
commit 6e05e1e65e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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__