在 2025-02-08 01:06, Kirill Makurin 写道:
 From 87951029ce19f763ebf28262bf0bb3a48fbed0c2 Mon Sep 17 00:00:00 2001
From: Kirill Makurin<maiddais...@outlook.com>
Date: Sat, 8 Feb 2025 01:45:40 +0900
Subject: [PATCH] winpthreads: make sure WINPTHREAD_API is correctly defined in
  pthread_time.h

When building with MSVC, pthread_time.h is included from pthread.h before
WINPTHREAD_API macro is defined. This may lead to functions declared in
pthread_time.h not being exported from the DLL.

Use same logic to define WINPTHREAD_API as in pthread.h.

Signed-off-by: Kirill Makurin<maiddais...@outlook.com>
---
  .../winpthreads/include/pthread_time.h         | 18 +++++++++++++-----
  1 file changed, 13 insertions(+), 5 deletions(-)

Can we just get rid of these superfluous declarations? They are defined elsewhere and do not seem to do anything in that header.



diff --git a/mingw-w64-libraries/winpthreads/include/pthread_compat.h b/mingw-w64-libraries/winpthreads/include/pthread_compat.h
index 63f5f495f..901bf421c 100644
--- a/mingw-w64-libraries/winpthreads/include/pthread_compat.h
+++ b/mingw-w64-libraries/winpthreads/include/pthread_compat.h
@@ -68,15 +68,6 @@

 #elif _MSC_VER

-#include "pthread_time.h"
-
-#ifdef _WIN64
-typedef __int64 pid_t;
-#else
-typedef int     pid_t;
-#endif
-typedef int clockid_t;
-
 #define WINPTHREADS_INLINE __inline
 #define WINPTHREADS_ATTRIBUTE(X) __declspec X
 #define WINPTHREADS_SECTION(X) allocate(X)



--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to