+#ifdef __APPLE__
+ NSAutoreleasePool * o_pool;
+
+ /* If !clivlc, then run as a OS X application */
+ if( p_intf->b_block && strncmp( p_intf->p_libvlc->psz_object_name,
+ "clivlc", 6) )
+ {
+ o_pool = [[NSAutoreleasePool alloc] init];
+ [VLCApplication sharedApplication];
+ [NSApp setVLC: p_intf->p_libvlc];
+
+ if( p_intf->pf_run )
+ RunInterface( p_intf );
+ else
+ {
+ [NSApp run];
+ while( !intf_ShouldDie( p_intf ) )
+ msleep( INTF_IDLE_SLEEP * 2);
+ }
+ vlc_object_kill( p_intf );
+ }
+ else
+#endif