diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-05-28 01:59:03 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-05-28 01:59:03 -0400 |
| commit | 31649edc7777e9cf6098cc7bf780f2f963b26d33 (patch) | |
| tree | aa8b280492b18d31144cfae1320a146028315b1e /Lua | |
| parent | 59c5470adeb99da30dfd9d45a6035ec0936b29f3 (diff) | |
Add some fixes and compiler flags
Diffstat (limited to 'Lua')
| -rw-r--r-- | Lua/Makefile | 3 | ||||
| -rw-r--r-- | Lua/lbp.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Lua/Makefile b/Lua/Makefile index 3c9a745..0912289 100644 --- a/Lua/Makefile +++ b/Lua/Makefile @@ -5,7 +5,8 @@ LUA_DIR=/usr/local LUA_INC= $(LUA_DIR)/include LUA=lua INCS=-I$(LUA_INC) -CFLAGS=-std=c99 -Werror -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -flto +CFLAGS=-std=c11 -Werror -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -fPIC -flto=auto -fvisibility=hidden \ + -fsanitize=signed-integer-overflow -fno-sanitize-recover CWARN=-Wall -Wextra # -Wpedantic -Wsign-conversion -Wtype-limits -Wunused-result -Wnull-dereference \ # -Waggregate-return -Walloc-zero -Walloca -Warith-conversion -Wcast-align -Wcast-align=strict \ @@ -22,6 +22,7 @@ #include "../pattern.h" #include "../match.h" #include "../printmatch.h" +#include "../utils.h" static const char *builtins_source = ( #include "builtins.h" @@ -369,7 +370,7 @@ static const luaL_Reg bp_methods[] = { {NULL, NULL} }; -LUALIB_API int luaopen_bp(lua_State *L) +public LUALIB_API int luaopen_bp(lua_State *L) { maybe_pat_t maybe_pat = bp_pattern(builtins_source, builtins_source+strlen(builtins_source)); if (!maybe_pat.success) { |
