Use fseeko & ftello from MingW with slight modifications.
Remoe ftol dependency
Use free for delete operator.(Same in MSVCRT.dll) Use Bswap intrinsic.