diff options
| author | Mosder <git@mosder.eu> | 2026-09-17 12:37:01 +0200 |
|---|---|---|
| committer | Mosder <git@mosder.eu> | 2026-09-17 12:37:11 +0200 |
| commit | de163fe7ee64e63d36dd581db16c776831cbead0 (patch) | |
| tree | 57f9861bd63a5479c8ee1d829a00d3b4ab053bba /Makefile | |
| parent | 33e2e9d8aff7ee16aa5c071df93d6f9c0a37e53f (diff) | |
feat: improved compatibility - removed possible duplicate names, exit tests now create a fork instead of relying on being able to overwrite exit function, made tester only output ASCII escape sequences for colour into a tty
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -22,14 +22,14 @@ TESTS_LDFLAGS=-L$(LIB_DIR) -Wl,-rpath,$(LIB_DIR) -lmoslib TESTS_SRCS:=$(shell find tests compat | grep "\.c$$") define probe_fun - $(shell printf '#define $(1)\n#include <$(2)>\nint main(void){$(3);}' \ + $(shell printf '#include "compat.h"\n#include <$(1)>\nint main(void){$(2);return 0;}' \ | $(CC) $(CFLAGS) -x c - -o /dev/null 2>/dev/null \ - || echo -DNO_$(shell echo $(3) | tr a-z A-Z)) + || echo -DNO_$(shell echo $(2) | tr a-z A-Z)) endef PROBED:= \ - $(call probe_fun,_GNU_SOURCE,string.h,memmem) \ - $(call probe_fun,_XOPEN_SOURCE 500,string.h,strdup) + $(call probe_fun,string.h,memmem) \ + $(call probe_fun,string.h,strdup) CFLAGS+=$(PROBED) TESTS_CFLAGS+=$(PROBED) |
