Changed all flags_t typedefs to use the int type in order to silence MSVC's signed-unsigned warnings.