summaryrefslogtreecommitdiff
path: root/src/porting.h
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2014-02-09 12:38:50 -0500
committerkwolekr <kwolekr@minetest.net>2014-02-09 12:44:31 -0500
commit2a01050a0cf0826f25240e2cb407535394ee360f (patch)
treebb6d3fd3b27be094db7e885adc5ac25dc5e45139 /src/porting.h
parent57710520dca6bce175a6be48989e0a4689b1404e (diff)
downloadminetest-2a01050a0cf0826f25240e2cb407535394ee360f.tar.gz
minetest-2a01050a0cf0826f25240e2cb407535394ee360f.tar.bz2
minetest-2a01050a0cf0826f25240e2cb407535394ee360f.zip
Add capability to read table flag fields from Lua API
Diffstat (limited to 'src/porting.h')
-rw-r--r--src/porting.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/porting.h b/src/porting.h
index 4cfac21d1..0f2007fa7 100644
--- a/src/porting.h
+++ b/src/porting.h
@@ -88,6 +88,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define strtoull(x, y, z) _strtoui64(x, y, z)
#define strcasecmp(x, y) stricmp(x, y)
#define strncasecmp(x, y, n) strnicmp(x, y, n)
+
+ // We can't simply alias strlcpy() to MSVC's strcpy_s(), since strcpy_s
+ // by default raises an assertion error and aborts the program if the
+ // buffer is too small. So we need to define our own.
+ #define strlcpy(x, y, n) mystrlcpy(x, y, n)
#else
#define ALIGNOF(x) __alignof__(x)
#endif