Fix build around true/false
This commit is contained in:
parent
538f1579e8
commit
b1510145e7
|
@ -94,7 +94,7 @@ typedef volatile int fc_atomic_int_t;
|
|||
#define fc_atomic_int_add(AI, V) (((AI) += (V)) - (V))
|
||||
|
||||
#define fc_atomic_ptr_get(P) ((void *) *(P))
|
||||
#define fc_atomic_ptr_cmpexch(P,O,N) (* (void * volatile *) (P) == (void *) (O) ? (* (void * volatile *) (P) = (void *) (N), true) : false)
|
||||
#define fc_atomic_ptr_cmpexch(P,O,N) (* (void * volatile *) (P) == (void *) (O) ? (* (void * volatile *) (P) = (void *) (N), FcTrue) : FcFalse)
|
||||
|
||||
|
||||
#else /* FC_NO_MT */
|
||||
|
@ -103,7 +103,7 @@ typedef int fc_atomic_int_t;
|
|||
#define fc_atomic_int_add(AI, V) (((AI) += (V)) - (V))
|
||||
|
||||
#define fc_atomic_ptr_get(P) ((void *) *(P))
|
||||
#define fc_atomic_ptr_cmpexch(P,O,N) (* (void **) (P) == (void *) (O) ? (* (void **) (P) = (void *) (N), true) : false)
|
||||
#define fc_atomic_ptr_cmpexch(P,O,N) (* (void **) (P) == (void *) (O) ? (* (void **) (P) = (void *) (N), FcTrue) : FcFalse)
|
||||
|
||||
#endif
|
||||
|
||||
|
|
10
src/fcinit.c
10
src/fcinit.c
|
@ -25,6 +25,16 @@
|
|||
#include "fcint.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(FC_ATOMIC_INT_NIL)
|
||||
#pragma message("Could not find any system to define atomic_int macros, library may NOT be thread-safe.")
|
||||
#endif
|
||||
#if defined(FC_MUTEX_IMPL_NIL)
|
||||
#pragma message("Could not find any system to define mutex macros, library may NOT be thread-safe.")
|
||||
#endif
|
||||
#if defined(FC_ATOMIC_INT_NIL) || defined(FC_MUTEX_IMPL_NIL)
|
||||
#pragma message("To suppress these warnings, define FC_NO_MT.")
|
||||
#endif
|
||||
|
||||
static FcConfig *
|
||||
FcInitFallbackConfig (void)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue