aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChloe Kudryavtsev <code@toast.bunkerlabs.net>2023-05-31 17:20:41 +0200
committerChloe Kudryavtsev <code@toast.bunkerlabs.net>2023-05-31 17:20:41 +0200
commit313d86c2e97edda10b6e80bb21a28f817c246f9d (patch)
treea11b0f3d46d3f17b832bbcd5afd677d0e273e3e5
parenteliminate instances of void* arithmetic (diff)
do not provide source info or documentation on windows
JANET_REG_SD is broken on MSVC
-rw-r--r--src/polyfill.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/polyfill.h b/src/polyfill.h
index 70ea4f5..e595ce0 100644
--- a/src/polyfill.h
+++ b/src/polyfill.h
@@ -21,6 +21,12 @@ const char *janet_optcbytes(const Janet *argv, int32_t argc, int32_t n, const ch
#endif // !defined(JANET_NO_SOURCEMAPS)
#endif // JANET_VERSION_MAJOR < 2 && JANET_VERSION_MINOR < 28
+// JANET_REG is broken on windows, so make it JANET_REG_ (no S no D)
+#ifdef _MSC_VER
+#undef JANET_REG
+#define JANET_REG JANET_REG_
+#endif
+
// timegm
#ifdef _MSC_VER
#define timegm _mkgmtime