Add some fixes and compiler flags
This commit is contained in:
parent
59c5470ade
commit
31649edc77
@ -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) {
|
||||
|
4
Makefile
4
Makefile
@ -2,7 +2,8 @@ NAME=bp
|
||||
CC=cc
|
||||
PREFIX=/usr/local
|
||||
SYSCONFDIR=/etc
|
||||
CFLAGS=-std=c99 -Werror -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -flto=auto -fvisibility=hidden
|
||||
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 -Wno-format
|
||||
# -Wpedantic -Wsign-conversion -Wtype-limits -Wunused-result -Wnull-dereference \
|
||||
# -Waggregate-return -Walloc-zero -Walloca -Warith-conversion -Wcast-align -Wcast-align=strict \
|
||||
@ -46,6 +47,7 @@ tags: $(CFILES) bp.c
|
||||
|
||||
clean:
|
||||
rm -f $(NAME) $(OBJFILES)
|
||||
@cd Lua && make clean
|
||||
|
||||
lua:
|
||||
@cd Lua && make
|
||||
|
Loading…
Reference in New Issue
Block a user