perl: Include <inttypes.h> and assume it always defines PRId64 and PRIu64.

If these are not defined in the header files, it's a problem on
the platform which we should fix with gnulib.  Our replacement
definitions might be wrong here.
This commit is contained in:
Richard W.M. Jones
2012-09-15 12:21:24 +01:00
parent 5a46eadd3d
commit 188b44ee45

View File

@@ -37,16 +37,14 @@ let rec generate_perl_xs () =
pr "\
#include <config.h>
#include <inttypes.h>
#include \"EXTERN.h\"
#include \"perl.h\"
#include \"XSUB.h\"
#include <guestfs.h>
#ifndef PRId64
#define PRId64 \"lld\"
#endif
static SV *
my_newSVll(long long val) {
#ifdef USE_64_BIT_ALL
@@ -59,10 +57,6 @@ my_newSVll(long long val) {
#endif
}
#ifndef PRIu64
#define PRIu64 \"llu\"
#endif
static SV *
my_newSVull(unsigned long long val) {
#ifdef USE_64_BIT_ALL