diff --git a/src/doors/dgnlance/GNUmakefile b/src/doors/dgnlance/GNUmakefile
index b463cebaca412583e67718df9b198377b82c8c86..b28c35bddff363b8ce6fa857d5d994269524b0ba 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 af463129e7b2b90eff4002b48319862ed04810ae..d671eec61c9440c4866a56a69b8361cb4e725c4e 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