Closed cen1 closed 10 years ago
I guess I am seeking for an opinion rather than asking for a fix or doing a pull request.
I guess, anyone can fix this issue inside it's own project. No need to change this on StormLib side.
Changing it now would only break all programs compiled with StormLib. And as Stormlib is gonna be deprecated in some time (MPQ --> CASC), then it's not worth the effort.
Basically reopening issue from https://github.com/ladislav-zezula/StormLib/issues/11
On windows there is no conflict because Stormlib uses direct call to WINAPI function but on Linux/BSD this is defined as a wrapper function to get errno (and the call comes from stormlib itself). If you have another class or library doing the same wrapping you get into a conflict described in the issue above.
The solution is to simply introduce StormGetLastError() which calls GetLastError() on windows and errno on linux/bsd.
Two questions coming to mind:
I guess I am seeking for an opinion rather than asking for a fix or doing a pull request.