Merge pull request #354 from bcampbell/new-msys-fixes

Fixes to compile utflib-and-attrstr changes on Windows with MinGW-w64

I did not do this myself; thanks @bcampbell for the fixes!
This commit is contained in:
Pietro Gagliardi 2018-04-30 21:45:29 -04:00 committed by GitHub
commit b9fd9fc395
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -1,6 +1,13 @@
// 21 april 2016
#include "uipriv_windows.hpp"
// sanity check - make sure wchar_t is 16 bits (the assumption on windows)
// (MinGW-w64 gcc does seem to define a 16bit wchar_t, but you never know. Other windows gcc ports might not)
#if WCHAR_MAX > 0xFFFF
#error wchar_t larger than 16bit
#endif
// see http://stackoverflow.com/a/29556509/3408572
WCHAR *toUTF16(const char *str)

View File

@ -23,6 +23,13 @@
#define _WIN32_IE 0x0700
#define NTDDI_VERSION 0x06000000
// the msys2 header has an unverified IDWriteTypography definition.
// Would be good to get it verified and fixed in msys2, but in the meantime,
// this define lets us compile....
#if !defined(_MSC_VER)
#define __MINGW_USE_BROKEN_INTERFACE
#endif
#include <windows.h>
// Microsoft's resource compiler will segfault if we feed it headers it was not designed to handle