Can we include "includes" a little later?

Jelmer Vernooij jelmer at ubuntu.com
Fri Dec 7 12:12:43 MST 2012


On Fri, Dec 07, 2012 at 09:09:27AM -0800, Richard Sharpe wrote:
> 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 ...
This is a bug in libreplace. It shouldn't be defining PRIi64 if the
system already provides it. Rather, it should be including the
relevant system headers itself.

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20121207/c2012ad4/attachment.pgp>


More information about the samba-technical mailing list