Add mingw32 support

With these changes, on Ubuntu I can do:

./configure --host=i586-mingw32msvc  && make
This commit is contained in:
Behdad Esfahbod 2011-08-02 09:56:30 -04:00
parent 1264b23e4a
commit f60271c0c2
5 changed files with 14 additions and 3 deletions

View File

@ -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`

View File

@ -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 }

View File

@ -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. */

View File

@ -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

View File

@ -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"