Fix generator glue to only expose extern struct units %s_units[] is

struct units defintition it known. The above construct is treated
as an incorrect C by GCC 4.2 otherwise.
This commit is contained in:
kan 2007-05-19 03:29:37 +00:00
parent 5d4b28ff73
commit 20a6c9830c

View File

@ -8,7 +8,7 @@ SRCS= gen.c \
gen_decode.c \
gen_encode.c \
gen_free.c \
gen_glue.c \
gen_glue-fixed.c \
gen_length.c \
hash.c \
emalloc.c \
@ -40,6 +40,11 @@ roken.h: ../make-roken/make-roken
../make-roken/make-roken: .PHONY
cd ${.CURDIR}/../make-roken && ${MAKE}
gen_glue-fixed.c: gen_glue.c
sed -e '106s/"/"#ifdef __PARSE_UNITS_H__\\n/;'\
-e '106s/",/\\n#endif\\n",/' ${.ALLSRC} > ${.TARGET}
CLEANFILES+= gen_glue-fixed.c
.include <bsd.prog.mk>
# There are two print_version.c's, the one we need is in ${KRB5DIR}/lib/vers,