Michael Paquier <[email protected]> writes:
> Hmm.  All buildfarm members are happy with this change, except
> prairiedog which is picky about the part in rewriteManip.h

It's not only prairiedog --- my RHEL6 workstation (gcc 4.4.7) is failing
as well, and I see buildfarm member grouse is unhappy too.  

> In file included from index.c:66:
> ../../../src/include/rewrite/rewriteManip.h:20: error: redefinition of
> typedef 'AttrMap'

This is simply the wrong way to do it.  What you have to do, if you
want to not include attmap.h here, is to say

struct AttrMap;

(no typedef) and then refer to it as "struct AttrMap" in the rest
of the header file.  There are lots of other examples in our headers.

BTW, it's also conventional to add a comment saying "this is to
avoid including foo.h", or equivalent.

TBH, though, I wonder if this doesn't indicate you've put this
function in the wrong header to begin with.  Why does it belong
in rewriteManip?

                        regards, tom lane


Reply via email to