From c1ae0ace07730e403e7ea3b32600b129ddd3b45e Mon Sep 17 00:00:00 2001 From: jca Date: Mon, 11 Sep 2017 06:31:44 +0000 Subject: [PATCH] Fix build failure due to a macro clashing with system headers universal-ctags 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, just like in devel/ectags. Comment suggested by schwarze@, ok schwarze@ sthen@ rsadowski@ (maintainer) --- devel/universal-ctags/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/devel/universal-ctags/Makefile b/devel/universal-ctags/Makefile index 9e3092ac9ea..c4dcc31ff61 100644 --- a/devel/universal-ctags/Makefile +++ b/devel/universal-ctags/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1.1.1 2017/04/12 20:00:30 rsadowski Exp $ +# $OpenBSD: Makefile,v 1.2 2017/09/11 06:31:44 jca Exp $ COMMENT = multilanguage reimplementation of the Unix ctags utility @@ -51,6 +51,13 @@ LIB_DEPENDS+= converters/libiconv WANTLIB+= iconv .endif +# Application software must not redefine macros in the +# implementation namespace. For example, redefining __unused__ +# blows up in our . +post-extract: + find ${WRKSRC} -type f -name '*.[ch]' -exec sed -i \ + 's/__unused__/uct_unused/g; s/__printf__/uct_printf/g' {} + + pre-configure: cd ${WRKSRC} && ${SETENV} AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \ AUTOCONF_VERSION=${AUTOCONF_VERSION} ./autogen.sh