c99 std supports

This commit is contained in:
lionsoul2014 2025-11-02 23:03:07 +08:00
parent 1da81ffc02
commit dc64c27abd
3 changed files with 6 additions and 6 deletions

View File

@ -1,16 +1,16 @@
all: xdb_searcher test_util
xdb_searcher: xdb_api.h xdb_util.c xdb_searcher.c main.c
gcc -Wall -O2 -I./ xdb_util.c xdb_searcher.c main.c -o xdb_searcher
gcc -std=c99 -Wall -O2 -I./ xdb_util.c xdb_searcher.c main.c -o xdb_searcher
test_util: xdb_api.h xdb_util.c test_util.c
gcc -Wall -O2 -I./ xdb_util.c test_util.c -o test_util
gcc -std=c99 -Wall -O2 -I./ xdb_util.c test_util.c -o test_util
xdb_searcher.o: xdb_searcher.c
gcc -Wall -c xdb_searcher.c
gcc -std=c99 -Wall -c xdb_searcher.c
xdb_util.o: xdb_util.c
gcc -Wall -c xdb_util.c
gcc -std=c99 -Wall -c xdb_util.c
xdb_searcher_lib: xdb_util.o xdb_searcher.o
mkdir -p build/lib

View File

@ -236,7 +236,7 @@ void test_search(int argc, char *argv[]) {
continue;
}
if (strcasecmp( line, "quit") == 0 ) {
if (strcmp(line, "quit") == 0 ) {
break;
}

View File

@ -2,7 +2,7 @@ LuaVersion = 5.4
LIB_DIR = /usr/local/share/lua/$(LuaVersion)
all: ../c/xdb_api.h ../c/xdb_util.c ../c/xdb_searcher.c xdb_searcher.c
gcc -Wall -O2 -I../c/ -I/usr/include/lua$(LuaVersion) ../c/xdb_util.c ../c/xdb_searcher.c xdb_searcher.c -fPIC -shared -o xdb_searcher.so
gcc -std=c99 -Wall -O2 -I../c/ -I/usr/include/lua$(LuaVersion) ../c/xdb_util.c ../c/xdb_searcher.c xdb_searcher.c -fPIC -shared -o xdb_searcher.so
install:
sudo mkdir -p $(LIB_DIR); \