When compiling on Windows without Posix mutexes, the Mutex lock/unlock methods do nothing.
The Windows equivalent of the Posix mutex is the critical section, and this patch uses this to implement the lock/unlock methods.
Thanks. It would be really helpful if you could attach a real patch file like you did for the more recent reports. Please do it in this report. If for some reason you don't have permission to delete the old file I will.
Replaced source with patch as requested.
Thanks, I can see the changes more clearly now.
Is there a reason you do not what to include "Windows.h" in the "lock.hpp" header file? Is this some huge file which will not normally be included in a windows program?
I couldn't get it to build with Windows.h in the header file because the compiler complains about duplicate definitiions between acommon::IOStream and Windows IOStream. It somehow thought that the Windows IOStream was in the acommon namespace even though I placed it before the namespace declaration.
I manually checked the pre-processed only .i file and came to the conclusion that it's a compiler bug because the .i file looked ok.
This issue has moved to GitHub: https://github.com/GNUAspell/aspell/issues/483