Remove hb-warning.cc
Fixes https://github.com/harfbuzz/harfbuzz/issues/2005
This commit is contained in:
parent
05bcdb39d8
commit
5e489670e1
|
@ -163,7 +163,6 @@ HB_BASE_sources = \
|
||||||
hb-unicode.hh \
|
hb-unicode.hh \
|
||||||
hb-utf.hh \
|
hb-utf.hh \
|
||||||
hb-vector.hh \
|
hb-vector.hh \
|
||||||
hb-warning.cc \
|
|
||||||
hb.hh \
|
hb.hh \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,6 @@
|
||||||
#include "hb-static.cc"
|
#include "hb-static.cc"
|
||||||
#include "hb-ucd.cc"
|
#include "hb-ucd.cc"
|
||||||
#include "hb-unicode.cc"
|
#include "hb-unicode.cc"
|
||||||
#include "hb-warning.cc"
|
|
||||||
#include "hb-glib.cc"
|
#include "hb-glib.cc"
|
||||||
#include "hb-ft.cc"
|
#include "hb-ft.cc"
|
||||||
#include "hb-graphite2.cc"
|
#include "hb-graphite2.cc"
|
||||||
|
|
|
@ -212,18 +212,7 @@ static inline bool _hb_compare_and_swaplp (long *P, long O, long N)
|
||||||
static_assert ((sizeof (long) == sizeof (void *)), "");
|
static_assert ((sizeof (long) == sizeof (void *)), "");
|
||||||
|
|
||||||
|
|
||||||
#elif !defined(HB_NO_MT)
|
#elif defined(HB_NO_MT)
|
||||||
|
|
||||||
#define HB_ATOMIC_INT_NIL 1 /* Warn that fallback implementation is in use. */
|
|
||||||
|
|
||||||
#define _hb_memory_barrier() do {} while (0)
|
|
||||||
|
|
||||||
#define hb_atomic_int_impl_add(AI, V) ((*(AI) += (V)) - (V))
|
|
||||||
|
|
||||||
#define hb_atomic_ptr_impl_cmpexch(P,O,N) (* (void **) (P) == (void *) (O) ? (* (void **) (P) = (void *) (N), true) : false)
|
|
||||||
|
|
||||||
|
|
||||||
#else /* HB_NO_MT */
|
|
||||||
|
|
||||||
#define hb_atomic_int_impl_add(AI, V) ((*(AI) += (V)) - (V))
|
#define hb_atomic_int_impl_add(AI, V) ((*(AI) += (V)) - (V))
|
||||||
|
|
||||||
|
@ -232,6 +221,11 @@ static_assert ((sizeof (long) == sizeof (void *)), "");
|
||||||
#define hb_atomic_ptr_impl_cmpexch(P,O,N) (* (void **) (P) == (void *) (O) ? (* (void **) (P) = (void *) (N), true) : false)
|
#define hb_atomic_ptr_impl_cmpexch(P,O,N) (* (void **) (P) == (void *) (O) ? (* (void **) (P) = (void *) (N), true) : false)
|
||||||
|
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#error "Could not find any system to define atomic_int macros."
|
||||||
|
#error "Check hb-atomic.hh for possible resolutions."
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -92,25 +92,7 @@ typedef volatile int hb_mutex_impl_t;
|
||||||
#define hb_mutex_impl_finish(M) HB_STMT_START {} HB_STMT_END
|
#define hb_mutex_impl_finish(M) HB_STMT_START {} HB_STMT_END
|
||||||
|
|
||||||
|
|
||||||
#elif !defined(HB_NO_MT)
|
#elif defined(HB_NO_MT)
|
||||||
|
|
||||||
#if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_YIELD)
|
|
||||||
# include <sched.h>
|
|
||||||
# define HB_SCHED_YIELD() sched_yield ()
|
|
||||||
#else
|
|
||||||
# define HB_SCHED_YIELD() HB_STMT_START {} HB_STMT_END
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define HB_MUTEX_INT_NIL 1 /* Warn that fallback implementation is in use. */
|
|
||||||
typedef volatile int hb_mutex_impl_t;
|
|
||||||
#define HB_MUTEX_IMPL_INIT 0
|
|
||||||
#define hb_mutex_impl_init(M) *(M) = 0
|
|
||||||
#define hb_mutex_impl_lock(M) HB_STMT_START { while (*(M)) HB_SCHED_YIELD (); (*(M))++; } HB_STMT_END
|
|
||||||
#define hb_mutex_impl_unlock(M) (*(M))--
|
|
||||||
#define hb_mutex_impl_finish(M) HB_STMT_START {} HB_STMT_END
|
|
||||||
|
|
||||||
|
|
||||||
#else /* HB_NO_MT */
|
|
||||||
|
|
||||||
typedef int hb_mutex_impl_t;
|
typedef int hb_mutex_impl_t;
|
||||||
#define HB_MUTEX_IMPL_INIT 0
|
#define HB_MUTEX_IMPL_INIT 0
|
||||||
|
@ -120,6 +102,11 @@ typedef int hb_mutex_impl_t;
|
||||||
#define hb_mutex_impl_finish(M) HB_STMT_START {} HB_STMT_END
|
#define hb_mutex_impl_finish(M) HB_STMT_START {} HB_STMT_END
|
||||||
|
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#error "Could not find any system to define mutex macros."
|
||||||
|
#error "Check hb-mutex.hh for possible resolutions."
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright © 2012 Google, Inc.
|
|
||||||
*
|
|
||||||
* This is part of HarfBuzz, a text shaping library.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, without written agreement and without
|
|
||||||
* license or royalty fees, to use, copy, modify, and distribute this
|
|
||||||
* software and its documentation for any purpose, provided that the
|
|
||||||
* above copyright notice and the following two paragraphs appear in
|
|
||||||
* all copies of this software.
|
|
||||||
*
|
|
||||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
|
|
||||||
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
|
||||||
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
|
|
||||||
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
||||||
* DAMAGE.
|
|
||||||
*
|
|
||||||
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
|
||||||
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
|
|
||||||
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
||||||
*
|
|
||||||
* Google Author(s): Behdad Esfahbod
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "hb.hh"
|
|
||||||
|
|
||||||
#ifdef HB_ATOMIC_INT_NIL
|
|
||||||
#error "Could not find any system to define atomic_int macros, library WILL NOT be thread-safe"
|
|
||||||
#error "Check hb-atomic.hh for possible resolutions."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HB_MUTEX_IMPL_NIL
|
|
||||||
#error "Could not find any system to define mutex macros, library WILL NOT be thread-safe"
|
|
||||||
#error "Check hb-mutex.hh for possible resolutions."
|
|
||||||
#endif
|
|
Loading…
Reference in New Issue