summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-25 23:04:30 +0000
committerZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-25 23:04:30 +0000
commit1da2411243f9c358c29e0ab3de598fd57ba955d1 (patch)
treeebbfbf72d9dfa9e06b0e7de620a8de5f00c096d9 /src
parent884b5f6840b0de3099199fb161561cf037149faf (diff)
Moved macro to zprep.h to have it centralized.
Diffstat (limited to 'src')
-rw-r--r--src/parser/parser_stmt.c4
-rw-r--r--src/zprep.h8
2 files changed, 8 insertions, 4 deletions
diff --git a/src/parser/parser_stmt.c b/src/parser/parser_stmt.c
index 6c1a3ac..f7c1d32 100644
--- a/src/parser/parser_stmt.c
+++ b/src/parser/parser_stmt.c
@@ -12,10 +12,6 @@
#include "zprep_plugin.h"
#include "../codegen/codegen.h"
-#ifdef _WIN32
-#define realpath(N, R) _fullpath((R), (N), PATH_MAX)
-#endif
-
char *curr_func_ret = NULL;
char *run_comptime_block(ParserContext *ctx, Lexer *l);
diff --git a/src/zprep.h b/src/zprep.h
index ea38927..06c70b6 100644
--- a/src/zprep.h
+++ b/src/zprep.h
@@ -8,6 +8,14 @@
#include <stdlib.h>
#include <string.h>
+#ifdef _WIN32
+#include <sys/types.h>
+#ifndef PATH_MAX
+#define PATH_MAX 260
+#endif
+#define realpath(N, R) _fullpath((R), (N), PATH_MAX)
+#endif
+
// **ZEN VERSION**
#define ZEN_VERSION "0.1.0"