@@ -9,10 +9,11 @@ * the packaging of this file. */ #include "config.h" +#include #include #include #include #include @@ -37,14 +38,24 @@ #define PRE_IVAR ((struct pre_ivar*)((char*)self - PRE_IVAR_ALIGN)) static struct { Class isa; } alloc_failed_exception; + +#ifdef NEED_OBJC_SYNC_INIT +extern BOOL objc_sync_init(); +#endif @implementation OFObject + (void)initialize { +#ifdef NEED_OBJC_SYNC_INIT + if (!objc_sync_init()) { + fputs("Runtime error: objc_sync_init() failed!\n", stderr); + abort(); + } +#endif } + alloc { OFObject *instance;