Where is the libreplace stuff done in configure?

Jelmer Vernooij jelmer at canonical.com
Mon Dec 10 14:05:35 MST 2012

On Mon, Dec 10, 2012 at 09:49:10AM -0800, Richard Sharpe wrote:
> Hi folks,
> Can someone point out where the libreplace stuff is being run so I can
> figure out how to handle the errors about PRId etc being redefined ...
> Compiling ../lib/addns/dnsrecord.c
> 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 ../lib/addns/dns.h:57,
>                  from ../lib/addns/dnsrecord.c:24:
> /home/rsharpe/dev-src/buildroot/tools/x86_gcc4.2.4/usr/include/machine/_inttypes.h:52:1:
> warning: "PRId64" redefined
> currently, in our build libreplace.h is defining these symbols which
> suggests that configure is not finding them.
It looks like there is no configure test, but libreplace.h just uses
#ifndef to define them if they're not available.

It looks like inttypes.h has PRId in your situation. I see that
libreplace.h already tries to include inttypes.h before the #ifndef
PRIx code, so presumably there is some reason why inttypes.h doesn't
get included in libreplace.h. Here is the code:

#include <stdint.h>
/* force off HAVE_INTTYPES_H so that roken doesn't try to include
 * both,
    which causes a warning storm on irix */
#include <inttypes.h>



More information about the samba-technical mailing list