Merging trunk and beta branches -- hopefully will compile on all platforms
Authored by: watusimoto 2010-06-20
Parent: [r820]
Child: [r822]