提交 f60271c0 编写于 作者: B Behdad Esfahbod

Add mingw32 support

With these changes, on Ubuntu I can do:

./configure --host=i586-mingw32msvc  && make
上级 1264b23e
......@@ -104,6 +104,7 @@ dnl ==========================================================================
PKG_CHECK_MODULES(ICU, icu, have_icu=true, [
AC_CHECK_PROG([have_icu], [icu-config], [true], [false])
have_icu=false
if $have_icu; then
icu_cflags=`icu-config --cppflags`
icu_libs=`icu-config --ldflags-libsonly`
......
......@@ -53,9 +53,9 @@ typedef GStaticMutex hb_mutex_impl_t;
#define hb_mutex_impl_free(M) g_static_mutex_free (M)
#elif defined(_MSC_VER)
#elif defined(_MSC_VER) || defined(__MINGW32__)
#include <Windows.h>
#include <windows.h>
typedef CRITICAL_SECTION hb_mutex_impl_t;
#define HB_MUTEX_IMPL_INIT { NULL, 0, 0, NULL, NULL, 0 }
......
......@@ -384,6 +384,11 @@ struct IntType
DEFINE_SIZE_STATIC (sizeof (Type));
};
/* Typedef these to avoid clash with windows.h */
#define USHORT HB_USHORT
#define SHORT HB_SHORT
#define ULONG HB_ULONG
#define LONG HB_LONG
typedef IntType<uint16_t> USHORT; /* 16-bit unsigned integer. */
typedef IntType<int16_t> SHORT; /* 16-bit signed integer. */
typedef IntType<uint32_t> ULONG; /* 32-bit unsigned integer. */
......
......@@ -139,7 +139,11 @@ ASSERT_STATIC (sizeof (hb_var_int_t) == 4);
#endif
#ifndef HB_INTERNAL
# define HB_INTERNAL __attribute__((__visibility__("hidden")))
# ifndef __MINGW32__
# define HB_INTERNAL __attribute__((__visibility__("hidden")))
# else
# define HB_INTERNAL
# endif
#endif
......
......@@ -25,6 +25,7 @@
*/
#define HB_OT_LAYOUT_CC
#include "hb-mutex-private.hh"
#include "hb-open-file-private.hh"
#include "hb-ot-layout-gdef-private.hh"
#include "hb-ot-layout-gsubgpos-private.hh"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册