can we use Ralf Engelschall's mm library here? it sure seems like we're reinventing all the portable work that's gone into that. if it could be used upstream, life would be much easier.