diff --git a/configure.ac b/configure.ac index 571f96b28..ef1a88edc 100644 --- a/configure.ac +++ b/configure.ac @@ -88,20 +88,20 @@ if test "x$GCC" = "xyes"; then esac fi +hb_os_win32=no AC_MSG_CHECKING([for native Win32]) case "$host" in *-*-mingw*) hb_os_win32=yes ;; - *) - hb_os_win32=no - ;; esac AC_MSG_RESULT([$hb_os_win32]) AM_CONDITIONAL(OS_WIN32, test "$hb_os_win32" = "yes") have_pthread=false -AX_PTHREAD([have_pthread=true]) +if test "$hb_os_win32" = no; then + AX_PTHREAD([have_pthread=true]) +fi if $have_pthread; then AC_DEFINE(HAVE_PTHREAD, 1, [Have POSIX threads]) fi diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh index 4ae5b866a..5861a7124 100644 --- a/src/hb-atomic-private.hh +++ b/src/hb-atomic-private.hh @@ -85,19 +85,6 @@ typedef int hb_atomic_int_t; #define hb_atomic_ptr_get(P) (void *) (__sync_synchronize (), *(P)) #define hb_atomic_ptr_cmpexch(P,O,N) __sync_bool_compare_and_swap ((P), (O), (N)) -#elif !defined(HB_NO_MT) && defined(HAVE_GLIB) - -#include -typedef int hb_atomic_int_t; -#if GLIB_CHECK_VERSION(2,29,5) -#define hb_atomic_int_add(AI, V) g_atomic_int_add (&(AI), (V)) -#else -#define hb_atomic_int_add(AI, V) g_atomic_int_exchange_and_add (&(AI), (V)) -#endif - -#define hb_atomic_ptr_get(P) g_atomic_pointer_get (P) -#define hb_atomic_ptr_cmpexch(P,O,N) g_atomic_pointer_compare_and_exchange ((void **) (P), (void *) (O), (void *) (N)) - #elif !defined(HB_NO_MT) diff --git a/src/hb-mutex-private.hh b/src/hb-mutex-private.hh index fc8ef4959..5b3a17e91 100644 --- a/src/hb-mutex-private.hh +++ b/src/hb-mutex-private.hh @@ -65,26 +65,6 @@ typedef pthread_mutex_t hb_mutex_impl_t; #define hb_mutex_impl_finish(M) pthread_mutex_destroy (M) -#elif !defined(HB_NO_MT) && defined(HAVE_GLIB) - -#include -#if !GLIB_CHECK_VERSION(2,32,0) -typedef GStaticMutex hb_mutex_impl_t; -#define HB_MUTEX_IMPL_INIT G_STATIC_MUTEX_INIT -#define hb_mutex_impl_init(M) g_static_mutex_init (M) -#define hb_mutex_impl_lock(M) g_static_mutex_lock (M) -#define hb_mutex_impl_unlock(M) g_static_mutex_unlock (M) -#define hb_mutex_impl_finish(M) g_static_mutex_free (M) -#else -typedef GMutex hb_mutex_impl_t; -#define HB_MUTEX_IMPL_INIT {0} -#define hb_mutex_impl_init(M) g_mutex_init (M) -#define hb_mutex_impl_lock(M) g_mutex_lock (M) -#define hb_mutex_impl_unlock(M) g_mutex_unlock (M) -#define hb_mutex_impl_finish(M) g_mutex_clear (M) -#endif - - #elif !defined(HB_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES) #if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_YIELD)