more xcode/clanf fixes. now runs on mac, although with some random livelocks. :)