Confining this to GNU C/C++ 5.4.0 for simplicity, I don't have access to llvm/clang or intel or msvc, not too sure it matters.
So I was given to believe that including pthreads (using cmake I'm linking via "set ( PROJECT_LINK_LIBS pthread )" in with a very simple test example, testing some thoughts on C++11 threads) defined the _REENTRANT macro after reading this and that on net. So, since seeing is believing I just spun up a simple test case:
#ifdef _REENTRANT
cout << "-------------------> reentrant " << endl;
#endif
in a POCO constructor, and added it to the code. To my jaded surprise the line didn't get printed out. As soon as I actually passed -D_REENTRANT to the compiler invocation it of course got printed. Anyone got the skinny on this behavior with 5.4.0? Did I "do it wrong"? Am I reading the spec (or, actually, the gcc list of expected behaviors) incorrectly?