Adjust pthread include, add || defined(__PTW32_VERSION)

Made a new define: OTHER1 , in my config, to not conflict with John E's files. Keeps his build working, while adjusting to mine.

Additionally, vcpkg's pthread includes _ptw32.h, which defines __PTW32_VERSION'.
This commit is contained in:
EZ4Stephen 2025-12-02 20:24:24 +04:00 committed by GitHub
parent c08531f96e
commit edd526d94b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -36,7 +36,11 @@
#include "pbd/cpus.h"
#if defined(COMPILER_MSVC) && !defined(PTW32_VERSION)
#ifndef OTHER1
#include <ardourext/pthread.h> // Gets us 'PTW32_VERSION'
#else
#include <pthread.h> //Gets us '__PTW32_VERSION'
#endif
#endif
int32_t
@ -69,7 +73,7 @@ PBD::hardware_concurrency()
return c;
}
}
#if defined(PTW32_VERSION) || defined(__hpux)
#if defined(PTW32_VERSION) || defined(__hpux) || defined(__PTW32_VERSION)
return pthread_num_processors_np();
#elif defined(__APPLE__)
int count;