Add mingw32 support

With these changes, on Ubuntu I can do:

./configure --host=i586-mingw32msvc  && make
pull/1/head
Behdad Esfahbod 14 years ago
parent 1264b23e4a
commit f60271c0c2
  1. 1
      configure.ac
  2. 4
      src/hb-mutex-private.hh
  3. 5
      src/hb-open-type-private.hh
  4. 6
      src/hb-private.hh
  5. 1
      src/main.cc

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

Loading…
Cancel
Save