From b54445b725609b8439a643325c1457d63382d07b Mon Sep 17 00:00:00 2001 From: Seth Hall Date: Tue, 8 Feb 2011 20:28:56 -0500 Subject: [PATCH] Fixed problem with PRI macros. Thanks Gregor! --- src/RemoteSerializer.cc | 1 - src/SMB.cc | 4 +--- src/util.h | 6 ++++++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/RemoteSerializer.cc b/src/RemoteSerializer.cc index 7d731c5204..f185b0c4ff 100644 --- a/src/RemoteSerializer.cc +++ b/src/RemoteSerializer.cc @@ -159,7 +159,6 @@ #include #include #include -#include #include "config.h" #ifdef TIME_WITH_SYS_TIME diff --git a/src/SMB.cc b/src/SMB.cc index 5520ef4848..78caf55eab 100644 --- a/src/SMB.cc +++ b/src/SMB.cc @@ -6,7 +6,6 @@ #include "SMB.h" #include "smb_pac.h" #include "Val.h" -#include "inttypes.h" namespace { const bool DEBUG_smb_ipc = true; @@ -167,8 +166,7 @@ void SMB_Session::Deliver(int is_orig, int len, const u_char* data) const u_char* tmp = data_start + next; if ( data_start + next < data + body.length() ) { - //Weird(fmt("ANDX buffer overlapping: next = %d, buffer_end = %" PRId32, next, data + body.length() - data_start)); - printf("ANDX buffer overlapping: next = %" PRId64 ", buffer_end = %" PRId32 " ", next, data + body.length() - data_start); + Weird(fmt("ANDX buffer overlapping: next = %d, buffer_end = %" PRIdPTR, next, data + body.length() - data_start)); break; } diff --git a/src/util.h b/src/util.h index f4f007a27d..4e648cee5d 100644 --- a/src/util.h +++ b/src/util.h @@ -11,6 +11,12 @@ #include #include "config.h" +#define _ISOC99_SOURCE +#define __STDC_LIMIT_MACROS +#define __STDC_CONSTANT_MACROS +#define __STDC_FORMAT_MACROS +#include "inttypes.h" + #if __STDC__ #define myattribute __attribute__ #else