1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00
freebsd/lib/libftpio/Makefile
Andrey A. Chernov 0c663b7771 For functions ftpGetURL, ftpPutURL, ftpLogin it was impossible to know
FTP error return code because
1) They return NULL, it means that ftpErrno can't be used because
it takes file pointer
2) They don't have FILE-type argument as f.e. ftpGet/ftpPut to use
it for ftpErrno instead.

For that functions I add yet one int* type argument to store
FTP error return code. It is impossible to add some global variable
for that reason, because user can have multiply FTP connections
opened at the same time.

So, interface changed, major number bumped.
Userland changes will follows.

Minor bugfixes, the code:
Forget to close file in few places, when failure occurse
Forget to NULL cached host name, multiply free is possible
1996-11-14 06:59:41 +00:00

29 lines
727 B
Makefile

LIB= ftpio
CFLAGS+= -I${.CURDIR} -Wall
SRCS= ftpio.c ftperr.c
MAN3= ftpio.3
CLEANFILES+= ftperr.c
SHLIB_MAJOR= 4
SHLIB_MINOR= 0
beforeinstall:
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/ftpio.h \
${DESTDIR}/usr/include
ftperr.c: ftp.errors
@echo '#include <stdio.h>' > ${.TARGET}
@echo '#include "ftpio.h"' >> ${.TARGET}
@echo "struct ftperr ftpErrList[] = {" \ >> ${.TARGET}
@cat ${.ALLSRC} \
| grep -v ^# \
| sort \
| while read NUM STRING; do \
echo " { $${NUM}, \"$${STRING}\" },"; \
done >> ${.TARGET}
@echo "};" >> ${.TARGET}
@echo -n "int const ftpErrListLength = " >> ${.TARGET}
@echo "sizeof(ftpErrList) / sizeof(*ftpErrList);" >> ${.TARGET}
.include <bsd.lib.mk>