Added rough detection for macos.
Bashed a few more instances of uint -> uint_t.