From 141ac5301b45ec9a22fb645df635fd4fec2564d8 Mon Sep 17 00:00:00 2001 From: Priyesh Kumar Date: Thu, 6 Aug 2020 06:21:22 +0530 Subject: [PATCH] [build] Fix MinGW errors while building dlg with FreeType on Windows. * builds/freetype.mk (DLG_DIR): New variable to include dlg's header files. (INCLUDES): Added `DLG_DIR' When using MinGW to build dlg along with FreeType on Windows there are missing dlg's include files errors. Therefore we need to add path to dlg's include files to remove the errors. * src/base/ftsystem.c: Fix `-Wformat' warnings. --- [priyesh]ChangeLog | 13 +++++++++++++ builds/freetype.mk | 4 +++- src/base/ftsystem.c | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/[priyesh]ChangeLog b/[priyesh]ChangeLog index b2e194f7e..ef306acc2 100644 --- a/[priyesh]ChangeLog +++ b/[priyesh]ChangeLog @@ -1,3 +1,16 @@ +2020-08-06 Priyesh Kumar + + [build] Fix MinGW errors while building dlg with FreeType on Windows. + + * builds/freetype.mk (DLG_DIR): New variable to include dlg's header + files. + (INCLUDES): Added `DLG_DIR' + When using MinGW to build dlg along with FreeType on Windows there are + missing dlg's include files errors. Therefore we need to add path to dlg's + include files to remove the errors. + + * src/base/ftsystem.c: Fix `-Wformat' warnings. + 2020-07-30 Priyesh Kumar * builds/windows/vc2010/freetype.sln: Skip building dlg for `Release' and diff --git a/builds/freetype.mk b/builds/freetype.mk index 281b5e43e..6c73e93e2 100644 --- a/builds/freetype.mk +++ b/builds/freetype.mk @@ -101,6 +101,7 @@ PUBLIC_DIR := $(TOP_DIR)/include/freetype INTERNAL_DIR := $(PUBLIC_DIR)/internal SERVICES_DIR := $(INTERNAL_DIR)/services CONFIG_DIR := $(PUBLIC_DIR)/config +DLG_DIR := $(TOP_DIR)/src/dlg # The documentation directory. # @@ -122,7 +123,8 @@ PROJECT_LIBRARY := $(LIB_DIR)/$(LIBRARY).$A INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) \ $(DEVEL_DIR) \ $(BUILD_DIR) \ - $(TOP_DIR)/include) + $(DLG_DIR) \ + $(TOP_DIR)/include) INCLUDE_FLAGS := $(INCLUDES:%=$I%) diff --git a/src/base/ftsystem.c b/src/base/ftsystem.c index 3013cbda9..b84634d06 100644 --- a/src/base/ftsystem.c +++ b/src/base/ftsystem.c @@ -275,7 +275,7 @@ stream->close = ft_ansi_stream_close; FT_TRACE1(( "FT_Stream_Open:" )); - FT_TRACE1(( " opened `%s' (%d bytes) successfully\n", + FT_TRACE1(( " opened `%s' (%ld bytes) successfully\n", filepathname, stream->size )); return FT_Err_Ok;