* misc.c (__pthread_register_cancel, __pthread_unregister_cancel):
Move prototypes to pthread_support.c.
* pthread_support.c (__pthread_unregister_cancel,
__pthread_unregister_cancel): Declare only if
PTHREAD_REGISTER_CANCEL_WEAK_STUBS defined.
{
return (int)GC_force_unmap_on_gcollect;
}
-
-void __pthread_register_cancel() __attribute__ ((weak));
-void __pthread_unregister_cancel() __attribute__ ((weak));
-void __pthread_register_cancel() {}
-void __pthread_unregister_cancel() {}
#endif /* PARALLEL_MARK */
+#ifdef PTHREAD_REGISTER_CANCEL_WEAK_STUBS
+ /* Workaround "undefined reference" linkage errors on some targets. */
+ void __pthread_register_cancel() __attribute__((__weak__));
+ void __pthread_unregister_cancel() __attribute__((__weak__));
+ void __pthread_register_cancel() {}
+ void __pthread_unregister_cancel() {}
+#endif
+
#endif /* GC_PTHREADS */