ported to gcc