Skip to content

Commit

Permalink
Support building natively on Windows (#51)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
qmfrederik committed Sep 13, 2024
1 parent d27af6a commit 6e05e1e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Tools/gpbs.m
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down

0 comments on commit 6e05e1e

Please sign in to comment.