]> git.armaanb.net Git - stagit.git/commitdiff
Always use the compat functions
authorsin <sin@2f30.org>
Wed, 6 Jan 2016 17:05:46 +0000 (17:05 +0000)
committersin <sin@2f30.org>
Wed, 6 Jan 2016 17:07:47 +0000 (17:07 +0000)
Makefile
compat.h
config.mk

index 7d6454a739632a7a239a1d7c71d94db6f61dc196..fb9c20c2a5eb8dea2ec4eef0bc577f547849bb8e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,11 @@ DOC = \
        TODO
 HDR = compat.h
 
+COMPATOBJ = \
+       reallocarray.o\
+       strlcat.o\
+       strlcpy.o
+
 OBJ = ${SRC:.c=.o} ${COMPATOBJ}
 
 all: $(BIN)
index f619c16e1f54a20f999711e52f3394254b133c49..f97a69b8497848184d7f1a2dfc39b0116d790e00 100644 (file)
--- a/compat.h
+++ b/compat.h
@@ -1,8 +1,6 @@
-#ifdef COMPAT
 #undef strlcat
 size_t strlcat(char *, const char *, size_t);
 #undef strlcpy
 size_t strlcpy(char *, const char *, size_t);
 #undef reallocarray
 void *reallocarray(void *, size_t, size_t);
-#endif
index 6e84946c8d0bba14ad28a580e1133143b009b4d7..d918949bc5be26484a3b0cfd0245d9c05ae67546 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -26,10 +26,5 @@ LDFLAGS = ${LIBS}
 #      -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_BSD_SOURCE ${INCS}
 #LDFLAGS = -static -s ${LIBS}
 
-# uncomment for compat
-CFLAGS += -DCOMPAT
-# uncomment if your libc doesn't support reallocarray, strlcat, strlcpy.
-COMPATOBJ = reallocarray.o strlcat.o strlcpy.o
-
 # compiler and linker
 #CC = cc