> The first hunk seems harmless. But why would you like to define
`WINPTHREAD_API` yourself?
Custom build system. Building winpthreads under native win32 with
clang (not clang-cl) without msvc compat.
Clang in such mode requires __attribute__ ((dllexport) and
__attribute__ ((dllimport), not __declspecs.
> struct timespec
I see errors without second hunk. It points to timespec in windows
headers, but then it tries to be redefined if no _TIMESPEC_DEFINED
provided.
I still see errors even if _TIMESPEC_DEFINED provided.
no _TIMESPEC_DEFINED
---
D:/temp/9/mingw-w64-mingw-w64/mingw-w64-libraries/winpthreads/src/misc.h:104:20:
error: conflicting types for '_pthread_time_in_ms_from_timespec'
unsigned long long _pthread_time_in_ms_from_timespec(const struct timespec *ts);
^
D:/temp/9/mingw-w64-mingw-w64/mingw-w64-libraries/winpthreads/include\pthread.h:414:43:
note: previous declaration is here
unsigned long long WINPTHREAD_API
_pthread_time_in_ms_from_timespec(const struct timespec *ts);
^
In file included from
D:/temp/9/mingw-w64-mingw-w64/mingw-w64-libraries/winpthreads/src/thread.c:31:
D:/temp/9/mingw-w64-mingw-w64/mingw-w64-libraries/winpthreads/src/misc.h:105:20:
error: conflicting types for '_pthread_rel_time_in_ms'
unsigned long long _pthread_rel_time_in_ms(const struct timespec *ts);
^
D:/temp/9/mingw-w64-mingw-w64/mingw-w64-libraries/winpthreads/include\pthread.h:412:43:
note: previous declaration is here
unsigned long long WINPTHREAD_API
_pthread_rel_time_in_ms(const struct timespec *ts);
^
D:/temp/9/mingw-w64-mingw-w64/mingw-w64-libraries/winpthreads/src/thread.c:643:1:
error: conflicting types for 'pthread_delay_np'
pthread_delay_np (const struct timespec *interval)
^
D:/temp/9/mingw-w64-mingw-w64/mingw-w64-libraries/winpthreads/include\pthread.h:162:24:
note: previous declaration is here
int WINPTHREAD_API pthread_delay_np (const struct timespec *interval);
^
3 errors generated.
---
with _TIMESPEC_DEFINED
---
D:/temp/9/mingw-w64-mingw-w64/mingw-w64-libraries/winpthreads/src/thread.c:643:1:
error: conflicting types for 'pthread_delay_np'
pthread_delay_np (const struct timespec *interval)
^
D:/temp/9/mingw-w64-mingw-w64/mingw-w64-libraries/winpthreads/include\pthread.h:162:24:
note: previous declaration is here
int WINPTHREAD_API pthread_delay_np (const struct timespec *interval);
^
1 error generated.
---
On Fri, 13 Mar 2020 at 15:21, Liu Hao <[email protected]> wrote:
>
> 在 2020/3/13 0:34, Egor Pugin 写道:
> > Sure.
> >
> >
>
> The first hunk seems harmless. But why would you like to define
> `WINPTHREAD_API` yourself?
>
> The second hunk is unnecessary. The prototype of `pthread_delay_np()`
> contains `struct timespec` which is a valid type name there. The
> declaration doesn't require it to be a complete type.
>
>
> --
> Best regards,
> LH_Mouse
>
--
Egor Pugin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public