be extra sure not to overflow integers
name conflicts--
fix win32 compile