Subject: Re: CVS commit: pkgsrc/textproc/aspell
To: None <pkgsrc-changes@NetBSD.org>
From: Johnny Lam <firstname.lastname@example.org>
Date: 06/15/2006 09:20:46
> On Thu, Jun 15, 2006 at 03:44:07AM +0000, Johnny C. Lam wrote:
>> Welcome to the brave new world of gettext-0.14.5 -- if a source file
>> includes <libintl.h>, then it may also pull in macro redefintions for
>> all of the *printf() functions. Unfortunately, macros do not mix well
>> with C++ code which expects to be able to partition names, e.g. printf
>> and vprintf, into the class namespace. (Mostly) fix this problem by
>> undefining printf and vprintf after <libintl.h> is included. This
>> addresses PR pkg/33577.
> This is not correct either, since printf can be a macro already as well.
> I think glibc did something like that in certain versions.
I don't claim this is a general fix, but for this particular application
where the sources do not explicitly call "printf" or "vprintf" by those
names, it suffices. The real fix would involve renaming those class
methods and fixing all calls to those methods in the sources, but those
changse are quite extensive and involve many more patches, and I didn't
want to go to all that trouble.
-- Johnny Lam <email@example.com>