Skip to content

Commit

Permalink
Block out some code that breaks VS2022 builds (robinrowe#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
timwoj committed Feb 24, 2023
1 parent db3f402 commit c854904
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions unistd/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ CFUNC int vasprintf(char **strp, const char *fmt, va_list ap);
#undef CompareString
#undef NO_ERROR

// Workaround negative character values that caused asserts
#if _MSC_VER < 1930
// Workaround negative character values that caused asserts on VS 2019 and below
#define isalpha(ch) isalpha((unsigned char)(ch))
#define isupper(ch) isupper((unsigned char)(ch))
#define islower(ch) islower((unsigned char)(ch))
Expand All @@ -245,6 +246,6 @@ CFUNC int vasprintf(char **strp, const char *fmt, va_list ap);
#define isprint(ch) isprint((unsigned char)(ch))
#define isgraph(ch) isgraph((unsigned char)(ch))
#define iscntrl(ch) iscntrl((unsigned char)(ch))

#endif

#endif

0 comments on commit c854904

Please sign in to comment.