reverted fileno change, MSVS specific API changes follow in another PR