swebb2066 commented on issue #388:
URL: 
https://github.com/apache/logging-log4cxx/issues/388#issuecomment-2215961338

   > To make it work on both, It should detect whether the threading library is 
posix (default for g++/libstdc++ through winpthreads) or win32 (default for 
clang++/libc++).
   
   The log4cxx build does detect whether the threading library is posix using 
the cmake `try_compile` command on the file:
   ```
   #include <pthread.h>
   
   int main(){
        pthread_t tid;
        pthread_setname_np(tid, "name");
   }
   ```
   and sets the macro to 0 or 1 in LOG4CXX_HAS_PTHREAD_SETNAME in 
`build/src/main/include/log4cxx/private/log4cxx_private.h`
   
   When I build log4cxx using gcc 14.1.0, the macro LOG4CXX_HAS_PTHREAD_SETNAME 
is set to 1.
   
   Please try compiling the above code on your system and post the result.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to