From 5d4cad9c02e9d4f31477fed0e3b20b35c83936f8 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Wed, 20 Jun 2012 11:20:57 -0400 Subject: ABI change: fix use of off_t, size_t, and integer types Significantly improve the code's use of off_t for file offsets, size_t for memory sizes, and integer types in cases where there has to be compatibility with external interfaces. Rework sections of the code that would have prevented qpdf from working on files larger than 2 (or maybe 4) GB in size. --- make/msvc.mk | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'make/msvc.mk') diff --git a/make/msvc.mk b/make/msvc.mk index 875e5934..8ad7f589 100644 --- a/make/msvc.mk +++ b/make/msvc.mk @@ -19,6 +19,16 @@ endef CFLAGS := $(filter-out -g,$(CFLAGS)) CXXFLAGS := $(filter-out -g,$(CXXFLAGS)) +# /WX makes all warnings errors. +CFLAGS += /WX +CXXFLAGS += /WX + +# /w14267 makes warning 4267 a level 1 warning. This warning reports +# potential issues between size_t, off_t, and non-compatible integer +# types. +CFLAGS += /w14267 +CXXFLAGS += /w14267 + clean:: $(RM) *.pdb @@ -35,7 +45,7 @@ endef # 1 2 # Usage: $(call c_compile,src,includes) define c_compile - cl /nologo /O2 /Zi /Gy /EHsc /MD $(CPPFLAGS) $(CXXFLAGS) \ + cl /nologo /O2 /Zi /Gy /EHsc /MD $(CPPFLAGS) $(CFLAGS) \ $(foreach I,$(2),-I$(I)) \ /c $(1) /Fo$(call c_src_to_obj,$(1)) endef -- cgit v1.2.3-54-g00ecf