Index: Makefile =================================================================== RCS file: /home/ncvs/src/bin/setfacl/Makefile,v retrieving revision 1.7 diff -u -r1.7 Makefile --- Makefile 4 Dec 2001 01:57:46 -0000 1.7 +++ Makefile 3 Feb 2002 17:54:54 -0000 @@ -1,6 +1,23 @@ # $FreeBSD: src/bin/setfacl/Makefile,v 1.7 2001/12/04 01:57:46 obrien Exp $ +CFLAGS?= -O -pipe -W -Wall -Wbad-function-cast -Wcast-align \ + -Wcast-qual -Wchar-subscripts -Winline \ + -Wmissing-prototypes -Wnested-externs \ + -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings + + PROG= setfacl -SRCS= file.c mask.c merge.c remove.c setfacl.c util.c +OBJS= file.o mask.o merge.o remove.o setfacl.o util.o +LDADD= -lacl + +all: ${PROG} + +${PROG}: ${OBJS} + ${CC} ${LDFLAGS} -o ${PROG} ${OBJS} ${LDADD} + +.c.o: + ${CC} ${CFLAGS} -o $@ -c $< + +clean: + rm -f ${PROG} ${OBJS} *core -.include Index: setfacl.h =================================================================== RCS file: /home/ncvs/src/bin/setfacl/setfacl.h,v retrieving revision 1.3 diff -u -r1.3 setfacl.h --- setfacl.h 3 Dec 2001 01:20:52 -0000 1.3 +++ setfacl.h 3 Feb 2002 17:54:54 -0000 @@ -33,6 +33,10 @@ #include #include +#ifndef ACL_MAX_ENTRIES +#define ACL_MAX_ENTRIES 32 +#endif + /* file operations */ #define OP_MERGE_ACL 0x00 /* merge acl's (-mM) */ #define OP_REMOVE_DEF 0x01 /* remove default acl's (-k) */ @@ -42,6 +46,22 @@ /* ACL types for the acl array */ #define ACCESS_ACL 0 #define DEFAULT_ACL 1 + +#ifndef TAILQ_EMPTY +#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) +#endif +#ifndef TAILQ_FIRST +#define TAILQ_FIRST(head) ((head)->tqh_first) +#endif +#ifndef TAILQ_NEXT +#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) +#endif +#ifndef TAILQ_FOREACH +#define TAILQ_FOREACH(var, head, field) \ + for ((var) = TAILQ_FIRST((head)); \ + (var); \ + (var) = TAILQ_NEXT((var), field)) +#endif /* TAILQ entry for acl operations */ struct sf_entry {