
Caleb Epstein wrote:
Well, there is code in libs/filesystem/src/operations_posix_windows.cpp that attempts to detect if it is being compiled with multi-threading enabled:
# if defined(_POSIX_THREAD_SAFE_FUNCTIONS) \ && defined(_SC_THREAD_SAFE_FUNCTIONS) \ && (_POSIX_THREAD_SAFE_FUNCTIONS+0 >= 0)
Presumably aCC sets these macros incorrectly, or this code is not correct. Maybe the check should be for >0?
Since somebody suggested that _REENTRANT is defined on HP when the '-mt' flag is used, what about only adding adding following to this #if # if defined(_POSIX_THREAD_SAFE_FUNCTIONS) \ && defined(_SC_THREAD_SAFE_FUNCTIONS) \ && (_POSIX_THREAD_SAFE_FUNCTIONS+0 >= 0) || (defined(__HP_aCC) && defined(_REENTRANT)) toon