NagyD / SDLPoP

An open-source port of Prince of Persia, based on the disassembly of the DOS version.
GNU General Public License v3.0
1.1k stars 141 forks source link

Remove fcntl.h dependency #213

Closed Ryzee119 closed 4 years ago

Ryzee119 commented 4 years ago

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)

NagyD commented 4 years ago

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.

Thank you!