Subject: Re: pkgsrc NetBSD 2.99.10/i386 bulk build results 2004-10-27
To: None <tech-pkg@netbsd.org>
From: None <martijn.van.buul@gmail.com>
List: tech-pkg
Date: 10/29/2004 11:39:51
Alistair Crooks wrote to p[kgsrc-bulk:
> Broken packages
>
> Package                    Breaks  Maintainer
> --------------------------------------------------------------
> devel/anjuta                       tech-pkg@NetBSD.org

I'm missing devel/exctags here.

Could someone with a little bit more knowledge about the system include
files please review PR #27216? 

I posted a workaround there - not a fix (As I'm not sure whether exctags/anjuta
or /usr/include/sys/cdefs.h is at err)

Hm, at least I thought I did. Apperently it never really left my mailqueue.
Oops.

To quote myself:

I know a workaround - I haven't come around to send-PR'ing it, because
I'm not really sure what needs to be fixed (/usr/include/sys/cdefs.h or
the packages..), but newer versions of cdefs.h (at least 1.57 has it)
seem to do the same thing as debug.h from anjuta / exctags does: #defining
a macro for __attribute__((__unused__)).

cdefs.h uses a #define __unused         __attribute__((__unused__))

while exctags uses

#define __unused__      __attribute__((__unused__))

The problem is that anjuta/exctags uses "__unused__" as a macro name -
a rather silly thing to do, if you ask me -, and cdefs.h / edian.h is included
*after* this #define, making the macro in endian.h expand to

__attribute__((__attribute__((__unused__))))

And that ain't going to work.

A dirty workaround would be to replace line #31 of general.h (both exctags
as well as anjuta (in tagmanager/) ) with something like

#include <sys/cdefs.h>
#define __unused__ __unused

Which is just as dirty, but at least it works. A better way would be to
rename those __unused__ occurrances to something that doesn't cause a name
clash.

Kind regards,

Martijn