You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mi...@apache.org on 2020/04/26 18:52:58 UTC

[tomcat-native] 02/02: Improve OS-specific header include for native thread id

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git

commit 19124fd730c8ca4d080d1ebeed4272944629373e
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Apr 26 20:52:26 2020 +0200

    Improve OS-specific header include for native thread id
---
 native/src/jnilib.c               | 17 +++++++----------
 xdocs/miscellaneous/changelog.xml |  3 +++
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/native/src/jnilib.c b/native/src/jnilib.c
index e88d4d5..5004966 100644
--- a/native/src/jnilib.c
+++ b/native/src/jnilib.c
@@ -23,20 +23,17 @@
 
 #include "tcn_version.h"
 
-#ifdef WIN32
+#if defined(WIN32)
 #include <Windows.h>
-#endif
-
-#ifdef DARWIN
+#elif defined(DARWIN)
+/* Included intentionally for the sake of completeness */
 #include <pthread.h>
-#endif
-
-#ifdef __FreeBSD__
+#elif defined(__FreeBSD__)
 #include <pthread_np.h>
-#endif
-
-#ifdef __linux__
+#elif defined(__linux__)
 #include <sys/syscall.h>
+#else
+#include <pthread.h>
 #endif
 
 #ifdef TCN_DO_STATISTICS
diff --git a/xdocs/miscellaneous/changelog.xml b/xdocs/miscellaneous/changelog.xml
index fe3077b..164437f 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -39,6 +39,9 @@
     <fix>
       Incomplete name mangling fix for C++ compilers in tcn_api.h. (michaelo)
     </fix>
+    <update>
+      Improve OS-specific header include for native thread id. (michaelo)
+    </update>
   </changelog>
 </section>
 <section name="Changes in 1.2.24">


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org