fcntl.h posix header is only used in a few functions to perform basic file read/writes.
This PR replaces the fcntl.h calls with stdio.h calls to remove this extra dependency.
stdio calls are already used throughout the code base so this also serves to consolidate some of the file APIs.
This has been tested on linux (ubuntu gcc) and windows (Dev-C++/mingw-64)
I used fcntl.h functions in those parts only because the original game did the same.
But you're completely right, it makes more sense to use the same API throughout the whole code.
fcntl.h
posix header is only used in a few functions to perform basic file read/writes. This PR replaces thefcntl.h
calls withstdio.h
calls to remove this extra dependency. stdio calls are already used throughout the code base so this also serves to consolidate some of the file APIs.This has been tested on linux (ubuntu gcc) and windows (Dev-C++/mingw-64)