First draft of port to 10.6. Untested.
Build and project fixes for running on 10.6 (64-bit).