[PATCH v4 1/2] msvcrt: implement missing CRT functions to fix ChessBase 14 crash