Closed darealshinji closed 6 years ago
Building with -D_POSIX_C_SOURCE=200809L
would prevent us from implementing our own version of strdup()
:
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
CC = gcc
CFLAGS = -O3 -std=c99 -Wall -Wformat -Wunused-variable -pedantic
-CPPFLAGS = -D_POSIX_C_SOURCE=200112L
+CPPFLAGS =
LDFLAGS =
INSTALL = install -c
@@ -37,9 +37,11 @@ else
ifeq ($(UNAME_S),Linux)
SOURCES += $(wildcard ./src/plat/linux/*.c)
CFLAGS += -Wno-unused-result
+ CPPFLAGS += -D_POSIX_C_SOURCE=200809L
LDFLAGS += -lX11 -lGL
SCRIPTS += ./src/scripts/detectgtk
TESTS += x11test gltest
+ else
+ CPPFLAGS += -D_POSIX_C_SOURCE=200112L
endif
ifeq ($(UNAME_S),Darwin)
This looks pretty good to me, besides the one change above. Thanks a ton!
I've updated src/util.c
Thanks! I'll take a final look at this in a bit.
An attempt to replace the detectwm script. Still needs to be tested on all WMs/DEs except MATE/Metacity.