New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fontconfig fails to build on 10.4 G3 #28
Comments
Relevant part of the build:
Not sure if this function is available in 10.4. |
From the manpage:
So the function doesn't exist in Tiger. This will require a patch for fontconfig which can get the same functionality using functions available on Tiger. |
The function is used in this #define in #define fc_atomic_ptr_cmpexch(P,O,N) OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P)) |
Apple's developer docs on the OSAtomic functions: http://developer.apple.com/library/mac/#documentation/System/Reference/OSAtomic_header_reference/Reference/reference.html |
Since the 32-bit and 64-bit versions exist on Tiger, the #define could be done like this: diff --git a/src/fcatomic.h b/src/fcatomic.h
index a764311..fc849b6 100644
--- a/src/fcatomic.h
+++ b/src/fcatomic.h
@@ -75,7 +75,13 @@ typedef int fc_atomic_int_t;
#define fc_atomic_int_add(AI, V) (OSAtomicAdd32Barrier ((V), &(AI)) - (V))
#define fc_atomic_ptr_get(P) (OSMemoryBarrier (), (void *) *(P))
-#define fc_atomic_ptr_cmpexch(P,O,N) OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P))
+#if defined(OSAtomicCompareAndSwapPtrBarrier)
+ #define fc_atomic_ptr_cmpexch(P,O,N) OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P))
+#elif defined(__LP64__)
+ #define fc_atomic_ptr_cmpexch(P,O,N) OSAtomicCompareAndSwap64Barrier ((void *) (O), (void *) (N), (void **) (P))
+#else
+ #define fc_atomic_ptr_cmpexch(P,O,N) OSAtomicCompareAndSwap32Barrier ((void *) (O), (void *) (N), (void **) (P))
+#endif
#elif !defined(FC_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES) Built, testing it out to see if it works. |
Submitted a better version of the patch upstream, and included it in the formula. |
fontconfig (dependency for mplayer) does not build
https://gist.github.com/theos911/5384545
The text was updated successfully, but these errors were encountered: