From a33c02612ad12b27ba2da1d3b9be0fb9bb339367 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 22 Jul 2005 11:16:32 +0000 Subject: r8713: Experiment to try and fix warnings on 64-bit machines without breaking 32-bit ones. Yes, this weird looking macros are part of C99. (This used to be commit 7b316f119b8486b75ebe63b185c50fab82313e58) --- source4/build/m4/rewrite.m4 | 2 +- source4/dsdb/samdb/samdb.c | 4 ++-- source4/include/includes.h | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'source4') diff --git a/source4/build/m4/rewrite.m4 b/source4/build/m4/rewrite.m4 index 35482b6cec..fd19de5d17 100644 --- a/source4/build/m4/rewrite.m4 +++ b/source4/build/m4/rewrite.m4 @@ -63,7 +63,7 @@ AC_CHECK_HEADERS(sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h) AC_CHECK_HEADERS(fnmatch.h pwd.h sys/termio.h sys/time.h sys/statfs.h sys/statvfs.h stdarg.h sys/sockio.h) AC_CHECK_HEADERS(security/pam_modules.h security/_pam_macros.h dlfcn.h) AC_CHECK_HEADERS(sys/syslog.h syslog.h) -AC_CHECK_HEADERS(stdint.h locale.h) +AC_CHECK_HEADERS(stdint.h inttypes.h locale.h) AC_CHECK_HEADERS(shadow.h netdb.h netinet/in.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h) AC_CHECK_HEADERS(nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h) AC_CHECK_HEADERS(sys/capability.h syscall.h sys/syscall.h) diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c index 448e4292aa..7811ca1965 100644 --- a/source4/dsdb/samdb/samdb.c +++ b/source4/dsdb/samdb/samdb.c @@ -852,7 +852,7 @@ int samdb_msg_add_uint(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct int samdb_msg_add_int64(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg, const char *attr_name, int64_t v) { - const char *s = talloc_asprintf(mem_ctx, "%lld", v); + const char *s = talloc_asprintf(mem_ctx, "%PRIi64", v); return samdb_msg_add_string(sam_ldb, mem_ctx, msg, attr_name, s); } @@ -862,7 +862,7 @@ int samdb_msg_add_int64(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct int samdb_msg_add_uint64(struct ldb_context *sam_ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg, const char *attr_name, uint64_t v) { - const char *s = talloc_asprintf(mem_ctx, "%llu", v); + const char *s = talloc_asprintf(mem_ctx, "%PRIu64", v); return samdb_msg_add_string(sam_ldb, mem_ctx, msg, attr_name, s); } diff --git a/source4/include/includes.h b/source4/include/includes.h index 88ee4af3b0..58799d9b86 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -47,6 +47,10 @@ #include #endif +#ifdef HAVE_INTTYPES_H +#include +#endif + #ifdef HAVE_STRING_H #include #endif -- cgit