Can we include "includes" a little later?

simo idra at samba.org
Fri Dec 7 12:03:28 MST 2012


On Fri, 2012-12-07 at 13:21 -0500, Scott Lovenberg wrote:
> On Fri, Dec 7, 2012 at 12:09 PM, Richard Sharpe
> <realrichardsharpe at gmail.com> wrote:
> > Hi folks,
> >
> > In our build there are lots of instances of these warnings:
> >
> > /home/rsharpe/dev-src/buildroot/tools/x86_gcc4.2.4/usr/include/machine/_inttypes.h:67:1:
> > warning: "PRIi64" redefined
> > In file included from include/includes.h:23,
> >                  from libnet/libnet_dssync_keytab.c:21:
> > ./../lib/replace/../replace/replace.h:91:1: warning: this is the
> > location of the previous definition
> > In file included from
> > /home/rsharpe/dev-src/buildroot/tools/x86_gcc4.2.4/usr/include/inttypes.h:32,
> >                  from
> > /home/rsharpe/dev-src/buildroot/tools/x86_gcc4.2.4/usr/include/krb5-types.h:9,
> >                  from
> > /home/rsharpe/dev-src/buildroot/tools/x86_gcc4.2.4/usr/include/krb5.h:40,
> >                  from include/smb_krb5.h:36,
> >                  from libnet/libnet_dssync_keytab.c:22:
> >
> > These come about because we include includes.h before smb_krb5.conf in
> > source3/libnet/libnet_dssync_keytab.c:
> >
> > #include "includes.h"
> > #include "smb_krb5.h"
> > #include "ads.h"
> > #include "libnet/libnet_dssync.h"
> > #include "libnet/libnet_keytab.h"
> > #include "librpc/gen_ndr/ndr_drsblobs.h"
> >
> > includes.h pulls in replace.h which defines all those PRIxxx things
> > before the system includes that get pulled in by smb_krb5.h.
> >
> > It sure would remove a lot of useless noise warnings if we changed the
> > order of includes ...
> >
> > --
> > Regards,
> > Richard Sharpe
> > (何以解憂?唯有杜康。--曹操)
> 
> FWIW, I think that's reasonable.

Looks to me a bug in libreplace on your platform.
Libreplace should not provide symbols that are already available.

I do not think changing order is the correct solution.

Simo.


-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>



More information about the samba-technical mailing list