Compare commits

...

4 Commits

4 changed files with 10 additions and 4 deletions

1
.gitignore vendored
View File

@ -4,4 +4,5 @@ test
test.*
*.dSYM
compile_commands.json
libwapp-build
libwapp.so

View File

@ -30,6 +30,11 @@ SRC="\
TEST_SRC="\
$(find tests -type f -name "*.c" | xargs -I{} echo -n "{} ") \
"
BUILD_DIR="libwapp-build/posix-$BUILD_TYPE"
if [[ -d $BUILD_DIR ]]; then
rm -rf $BUILD_DIR
fi
mkdir -p $BUILD_DIR
if [[ $BUILD_TYPE == "release" ]]; then
CFLAGS+="-O3"
@ -37,8 +42,8 @@ else
CFLAGS+="-g -fsanitize=address -fsanitize=undefined"
fi
OUT="libwapp.so"
TEST_OUT="./wapptest"
OUT="$BUILD_DIR/libwapp.so"
TEST_OUT="$BUILD_DIR/wapptest"
# Compile tests
if [[ $(echo $TEST_SRC | xargs) != "" ]]; then

View File

@ -40,7 +40,7 @@ void dirup(char *dst, u64 levels, const char *path) {
--length;
}
for (u64 i = length - 1; i >= 0; --i) {
for (i64 i = length - 1; i >= 0; --i) {
if (path[i] == path_sep) {
++sep_count;
end_index = i;

View File

@ -1,6 +1,6 @@
#include "tester.h"
#include "aliases.h"
#include "termcolour/termcolour.h"
#include "termcolour.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>