Fix build failure due to a macro crashing with system headers

ectags defines an __unused__ macro that clashes with functions using
__attribute__((__unused__).  A bunch of such functions were introduced
recently as part of the uselocale work from schwarze@.

Bulk-rename the offending macro and another one similarly named to
something more reasonable.

Committing early since ectags is needed by vim-taglist and
x11/gnome/builder.  Comment suggested by schwarze@, ok schwarze@ sthen@
This commit is contained in:
jca 2017-09-06 21:14:16 +00:00
parent 04bb81fb10
commit 4d7b3e61bf

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.20 2016/12/29 14:48:51 shadchin Exp $
# $OpenBSD: Makefile,v 1.21 2017/09/06 21:14:16 jca Exp $
COMMENT= multilanguage implementation of ctags
@ -20,6 +20,10 @@ CONFIGURE_STYLE=gnu
DOCS= FAQ NEWS README EXTENDING.html
post-extract:
find ${WRKSRC} -type f -name '*.[ch]' -exec sed -i \
's/__unused__/ect_unused/g; s/__printf__/ect_printf/g' {} +
do-install:
${INSTALL_PROGRAM} ${WRKBUILD}/ctags ${PREFIX}/bin/ectags
${INSTALL_MAN} ${WRKSRC}/ctags.1 ${PREFIX}/man/man1/ectags.1