the3dfxdude / 7kaa

Seven Kingdoms: Ancient Adversaries - Go to the main source repository at https://sourceforge.net/projects/skfans/ for source code and builds
https://7kfans.com
Other
254 stars 72 forks source link

LocaleRes: fix build with NLS disabled #271

Closed AMDmi3 closed 1 year ago

AMDmi3 commented 1 year ago

Include locale.h unconditionally, as LC_MESSAGES constant from it is used in get_messages_locale() regardless of ENABLE_NLS. Not sure if that's correct logic there, alternative fix would be to warp LC_MESSAGES usage in get_messages_locale in #ifdef ENABLE_NLS too.

the3dfxdude commented 1 year ago

Thank you for the report! Your fix is sufficient. I do prefer disabling any call to setlocale when NLS is disabled anyway. Please visit us at https://sourceforge.net/projects/skfans/ for the update.