mirror of
git://git.codemadness.org/stagit
synced 2025-03-06 22:59:11 -05:00
Always use the compat functions
This commit is contained in:
parent
2809fd3795
commit
bd854ac71f
5
Makefile
5
Makefile
@ -21,6 +21,11 @@ DOC = \
|
||||
TODO
|
||||
HDR = compat.h
|
||||
|
||||
COMPATOBJ = \
|
||||
reallocarray.o\
|
||||
strlcat.o\
|
||||
strlcpy.o
|
||||
|
||||
OBJ = ${SRC:.c=.o} ${COMPATOBJ}
|
||||
|
||||
all: $(BIN)
|
||||
|
2
compat.h
2
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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user