From a76dfa5893db7de262bd1008001ba8042ded6f7f Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Wed, 19 Oct 2011 01:18:42 +0000
Subject: [PATCH] Update to C99 and use -Wall -pedantic

---
 src/doors/dgnlance/GNUmakefile | 2 +-
 src/doors/dgnlance/xp64.h      | 9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/doors/dgnlance/GNUmakefile b/src/doors/dgnlance/GNUmakefile
index b463cebaca..b28c35bddf 100644
--- a/src/doors/dgnlance/GNUmakefile
+++ b/src/doors/dgnlance/GNUmakefile
@@ -3,7 +3,7 @@ include ${SRC_ROOT}/build/Common.gmake
 
 # OpenDoors
 LDFLAGS	+=	-L$(SRC_ROOT)/odoors/libs-`uname`
-CFLAGS	+=	-I$(SRC_ROOT)/odoors
+CFLAGS	+=	-I$(SRC_ROOT)/odoors -Wall -pedantic -std=c99
 
 ifdef STATIC
  LDFLAGS	+=	-static
diff --git a/src/doors/dgnlance/xp64.h b/src/doors/dgnlance/xp64.h
index af463129e7..d671eec61c 100644
--- a/src/doors/dgnlance/xp64.h
+++ b/src/doors/dgnlance/xp64.h
@@ -2,7 +2,8 @@
 #ifdef _MSC_VER
 #define INT64	__int64
 #else
-#define INT64	long long int
+#include <inttypes.h>
+#define INT64	int64_t
 #endif
 #endif
 
@@ -13,7 +14,7 @@
 #ifdef _MSC_VER
 #define INT64FORMAT	"I64d"
 #else
-#define INT64FORMAT		"lld"
+#define INT64FORMAT	PRId64
 #endif
 #endif
 #endif
@@ -22,7 +23,7 @@
 #ifdef _MSC_VER
 #define QWORD	unsigned _int64
 #else
-#define	QWORD	unsigned long long int
+#define	QWORD	uint64_t
 #endif
 #endif
 
@@ -33,7 +34,7 @@
 #ifdef _MSC_VER
 #define 	QWORDFORMAT	"I64u"
 #else
-#define 	QWORDFORMAT	"llu"
+#define 	QWORDFORMAT	PRIu64
 #endif
 #endif
 #endif
-- 
GitLab