2 ms·
Sometimes it's harded than that. For example in Windows XP, if you have __declspec(thread) variable then it won't work if it's in DLL (this has been fixed since
by malkia 13y ago
Sometimes it's harded than that. For example in Windows XP, if you have __declspec(thread) variable then it won't work if it's in DLL (this has been fixed since Vista).
Not really a compiler, but more like linker/loader problem. If the __declspec(thread) is in the main .exe it works.
Things like this affect for example ANGLE (WebGL) when compiling for XP, as such one would have to resort to TlsAlloc/TlsFree.
It's just an example, where an OSS might've used the gcc/clang primitive for thread-safe var, and later someone does it for Visual Studio, only to understand later that it won't work when in DLL for XP.
Now I know XP is no longer supported, but a lot of OSS projects still target it. (and probably lots of others).
Then again, it's not such biggie, for example Elmindreda, the GLFW developer was really kind to re-implement the feature once I reported the problem.
- pjmlp 13y agoWouldn't you have a similar problem when porting to another systems where the OS vendor compiler is used? I had my share of issues using xlc, aCC and sunpro cc.