---
mingw-w64-libraries/winpthreads/src/thread.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/mingw-w64-libraries/winpthreads/src/thread.c
b/mingw-w64-libraries/winpthreads/src/thread.c
index d5b3aaa05..f1af0ea44 100644
--- a/mingw-w64-libraries/winpthreads/src
Hi!
Patch 1 is obviously correct.
Patch 2 seems correct too. I wrote a patch series a while ago that
changed the winpthreads testsuite for msvc but didn't get the time to
get it merged. See the full thread here:
https://sourceforge.net/p/mingw-w64/mailman/mingw-w64-public/thread/20240129165759.1912
y which they work are independent of
> each other.
Signed-off-by: Antonin Décimo
---
Thanks for the review! I've amended the commit message above to be
hopefully a bit clearer.
mingw-w64-libraries/winpthreads/src/misc.c | 8
mingw-w64-libraries/winpthreads/src/misc.h
22&tabs=csharp#set-a-thread-name-in-cc
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/misc.c | 8
mingw-w64-libraries/winpthreads/src/misc.h | 1 +
mingw-w64-libraries/winpthreads/src/thread.c | 15 +++
3 files changed, 24 insertions(+)
diff
> Frankly speaking, I don't agree with that.
Are you disagreeing about the default autocrlf setting, or about
forcing LF on shell scripts? I don't have a strong opinion on the
autocrlf setting.
I do have a strong opinion on forcing LF on shell scripts. I think
this helps when dealing with unconfig
> > +# Set the default behavior, in case people don't have core.autocrlf set.
> > +* text=auto
>
> Would you prefer `autocrlf=input` to `autocrlf=auto`?
Not necessarily, were there ever unwanted CRLF or LF being committed
to the repository?
What really matters to me are unwanted CRLF when checking
My mingw-w64 12.0.4 reports a warning:
-Wprio-ctor-dtor
Do not warn if a priority from 0 to 100 is used for constructor or
destructor. The use of constructor and destructor attributes allow you
to assign a priority to the constructor/destructor to control its
order of execution before main is cal
Otherwise bash errors with errors such as
./configure: line 17: $'\r': command not found
./configure: line 33: syntax error near unexpected token `newline'
'/configure: line 33: ` ;;
Signed-off-by: Antonin Décimo
---
.gitattributes
Le lun. 5 août 2024 à 11:27, LIU Hao a écrit :
>
> 在 2024-08-05 01:40, Pali Rohár 写道:
> > It looks like that casting whole function pointer to LPVOID type prior
> > casting to FARPROC mutes this warning.
> >
> > Now I remember that in past I have already used casting return value
> > from GetProcA
> Do you wish to create a separate repository for winpthreads, and commit
> .gitignore there?
We're maintaining a separate repository at
https://github.com/ocaml/winpthreads, with instructions on how to
embed the subtree as a submodule in the ocaml sources at
https://github.com/ocaml/ocaml/blob/t
This helps when vendoring winpthreads as a subtree.
---
I've just copied the root .gitignore. Works as expected.
mingw-w64-libraries/winpthreads/.gitignore | 41 ++
1 file changed, 41 insertions(+)
create mode 100644 mingw-w64-libraries/winpthreads/.gitignore
diff --git a/m
> Liu Hao also pointed out that we could use _ReadWriteBarrier() with MSVC,
> and that one doesn't seem to require including any header before it is
> usable.
I couldn't find the difference between MemoryBarrier and _ReadWriteBarrier.
Maybe the MemoryBarrier macro is available on more architecture
> If my suggested modification is ok with you, I'd go ahead and push this
set soon.
Thank you very much for your careful review, your patch makes it clearly
better!
-- Antonin
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
htt
getntptimeofday is specific to mingw. QueryPerformanceCounter is always
available.
https://learn.microsoft.com/en-us/windows/win32/sysinfo/acquiring-high-resolution-time-stamps\#using-qpc-in-native-code
Signed-off-by: Antonin Décimo
---
.../winpthreads/tests/t_nanosleep.c | 29
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/tests/t_clock_getres.c| 2 +-
mingw-w64-libraries/winpthreads/tests/t_clock_gettime.c | 3 ++-
mingw-w64-libraries/winpthreads/tests/t_clock_nanosleep.c | 2 +-
mingw-w64-libraries/winpthreads/tests/t_clock_settime.c | 4
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/tests/Makefile.am | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/mingw-w64-libraries/winpthreads/tests/Makefile.am
b/mingw-w64-libraries/winpthreads/tests/Makefile.am
index 19ab5f23e..d0b3ed9fa
Missing clock_nanosleep and nanosleep declarations.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/tests/t_clock_gettime.c | 1 +
mingw-w64-libraries/winpthreads/tests/t_nanosleep.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/mingw-w64-libraries
- conversion warnings from the compiler;
- random generator not initialized.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/tests/t_clock_getres.c | 2 +-
mingw-w64-libraries/winpthreads/tests/t_nanosleep.c| 9 ++---
2 files changed, 7 insertions(+), 4 deletions
It doesn't trigger a popup in console/batch mode.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/tests/t_clock_getres.c | 9 +
mingw-w64-libraries/winpthreads/tests/t_clock_gettime.c | 9 +
.../winpthreads/tests/t_clock_nanosleep.c
Signed-off-by: Antonin Décimo
---
.../winpthreads/tests/t_clock_gettime.c | 2 +-
.../winpthreads/tests/t_clock_nanosleep.c| 2 +-
.../winpthreads/tests/t_clock_settime.c | 2 +-
.../winpthreads/tests/t_nanosleep.c | 2 +-
mingw-w64-libraries
Signed-off-by: Antonin Décimo
---
.../winpthreads/tests/t_clock_getres.c| 4 +-
.../winpthreads/tests/t_clock_gettime.c | 2 +-
.../winpthreads/tests/t_clock_nanosleep.c | 2 +-
.../winpthreads/tests/t_clock_settime.c | 2 +-
.../winpthreads/tests/t_nanosleep.c
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/tests/Makefile.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mingw-w64-libraries/winpthreads/tests/Makefile.in
b/mingw-w64-libraries/winpthreads/tests/Makefile.in
index bb0e75bcc..1cf0f5efe 100644
--- a
-w64-mingw32
make -j
make check -j1
The patch series only touches tests registered via Automake, and *not*
the tests imported from pthread-win32.
Best regards,
Antonin Décimo (9):
winpthreads: tests: Use the libc assert
winpthreads: tests: Mark unexported symbols as static
/win32/api/winnt/nf-winnt-memorybarrier
[3]:
https://learn.microsoft.com/en-us/cpp/intrinsics/readwritebarrier\?view\=msvc-170
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/include/pthread.h | 4 ++--
mingw-w64-libraries/winpthreads/src/misc.h| 4
2 files changed, 2
selectany & int both part of decl-specifier
int __declspec(selectany) * pi2 = 0;
// ERROR, selectany is not part of a declarator
int * __declspec(selectany) pi3 = 0;
https://learn.microsoft.com/en-us/cpp/cpp/declspec?view=msvc-170
Signed-off-by: Antonin Décimo
---
.../winpth
It is sufficient to specify the section on the symbol declaration.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/thread.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mingw-w64-libraries/winpthreads/src/thread.c
b/mingw-w64-libraries
The non-suffixed macro GetModuleHandle depends on whether the file is
being compiled in Unicode mode or not. Prefer using the char string
literal here, for compatibility with old Windows not supporting
Unicode.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/misc.c | 2
e needed to instruct the
linker on MSVC, gather the discovery of the WinAPI functions in a
single winpthreads_init function. The WinAPI functions can be accessed
through internal global function pointers.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/clock.c | 31 ++---
.com/en-us/windows/win32/sync/interlocked-variable-access
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/mutex.c| 15 +++
mingw-w64-libraries/winpthreads/src/spinlock.c | 4 ++--
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/mingw-w64
eses
functions at runtime with GetModuleHandle and GetProcAddress. It uses
a function tagged with the constructor attribute for MinGW and
clang-cl, and a CRT initialization and linker trick to use a single
'winpthreads_init' function to load these required WinAPI functions.
Antonin Décimo (9):
wi
- Make pthread_create_wrapper return an unsigned;
_beginthreadindex takes a function returning an unsigned. The
variable holding the return value of pthread_create_wrapper is
already an unsigned.
- Make pthread_create_wrapper __stdcall.
Co-authored-by: Samuel Hym
Signed-off-by: Antonin
Use YieldProcessor which already has the best definition for all MSVC
and MinGW supported architectures of the memory pause / yield
instruction.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/misc.h | 8
mingw-w64-libraries/winpthreads/src/spinlock.c | 8
The requested stack size is a `size_t`, whereas _beginthreadex takes
an `unsigned int`. This provides a bit of input sanitation, and
prevents a compiler warning.
Co-authored-by: Samuel Hym
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/thread.c | 7 +--
1 file
> diff --git a/mingw-w64-libraries/winpthreads/include/pthread.h
> b/mingw-w64-libraries/winpthreads/include/pthread.h
> index 0ab7fef11..4ce815c64 100644
> --- a/mingw-w64-libraries/winpthreads/include/pthread.h
> +++ b/mingw-w64-libraries/winpthreads/include/pthread.h
> @@ -307,7 +307,7 @@ unsig
The requested stack size is a `size_t`, whereas _beginthreadex takes
an `unsigned int`. This provides a bit of input sanitation, and
prevents a compiler warning.
Co-authored-by: Samuel Hym
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/thread.c | 7 +--
1 file
Use YieldProcessor which already has the best definition for all MSVC
and MinGW supported architectures of the memory pause / yield
instruction.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/misc.h | 8
mingw-w64-libraries/winpthreads/src/spinlock.c | 8
- Make pthread_create_wrapper return an unsigned;
_beginthreadindex takes a function returning an unsigned. The
variable holding the return value of pthread_create_wrapper is
already an unsigned.
- Make pthread_create_wrapper __stdcall.
Co-authored-by: Samuel Hym
Signed-off-by: Antonin
rick to use a single
'winpthreads_init' function to load these required WinAPI functions.
Antonin Décimo (8):
winpthreads: Check if requested stack size fits in an unsigned int
winpthreads: Fix pthread_create_wrapper type
winpthreads: Use YieldProcessor in pthread_spin_lock
win
.com/en-us/windows/win32/sync/interlocked-variable-access
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/mutex.c| 15 +++
mingw-w64-libraries/winpthreads/src/spinlock.c | 4 ++--
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/mingw-w64
It is sufficient to specify the section on the symbol declaration.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/thread.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mingw-w64-libraries/winpthreads/src/thread.c
b/mingw-w64-libraries
/win32/api/winnt/nf-winnt-memorybarrier
[3]:
https://learn.microsoft.com/en-us/cpp/intrinsics/readwritebarrier\?view\=msvc-170
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/include/pthread.h | 4 ++--
mingw-w64-libraries/winpthreads/src/misc.h| 4
2 files changed, 2
e needed to instruct the
linker on MSVC, gather the discovery of the WinAPI functions in a
single winpthreads_init function. The WinAPI functions can be accessed
through internal global function pointers.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/clock.c | 31 ++---
The non-suffixed macro GetModuleHandle depends on whether the file is
being compiled in Unicode mode or not. Prefer using the char string
literal here, for compatibility with old Windows not supporting
Unicode.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/misc.c | 2
Le lun. 15 janv. 2024 à 22:57, Martin Storsjö a écrit :
>
> On Thu, 11 Jan 2024, Antonin Décimo wrote:
>
> > Some WinAPI functions were introduced in recent versions of
> > Windows. It's not possible to detect if they're available at compile
> > time, so
Le lun. 15 janv. 2024 à 22:57, Martin Storsjö a écrit :
>
> On Thu, 11 Jan 2024, Antonin Décimo wrote:
>
> > It is sufficient to specify the section on the symbol declaration.
> >
> > Signed-off-by: Antonin Décimo
> > ---
> > mingw-w64-libraries/winpth
Le lun. 15 janv. 2024 à 23:01, Martin Storsjö a écrit :
>
> On Fri, 12 Jan 2024, LIU Hao wrote:
>
> > 在 2024/1/11 23:41, Antonin Décimo 写道:
> >> The non-suffixed macro GetModuleHandle depends on whether the file is
> >> being compiled in Unicode mode or
/win32/api/winnt/nf-winnt-memorybarrier
[3]:
https://learn.microsoft.com/en-us/cpp/intrinsics/readwritebarrier\?view\=msvc-170
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/include/pthread.h | 4 ++--
mingw-w64-libraries/winpthreads/src/misc.h| 4
2 files changed, 2
The non-suffixed macro GetModuleHandle depends on whether the file is
being compiled in Unicode mode or not. Prefer using the char string
literal in this simple case.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/misc.c | 2 +-
mingw-w64-libraries/winpthreads/src
- Make pthread_create_wrapper return an unsigned;
_beginthreadindex takes a function returning an unsigned. The
variable holding the return value of pthread_create_wrapper is
already an unsigned.
- Make pthread_create_wrapper __stdcall.
Co-authored-by: Samuel Hym
Signed-off-by: Antonin
of boilerplate code needed to instruct the
linker on MSVC, gather the discovery of the WinAPI functions in a
single winpthreads_init function. The WinAPI functions can be accessed
through internal global function pointers.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/c
The requested stack size is a `size_t`, whereas _beginthreadex takes
an `unsigned int`. This provides a bit of input sanitation, and
prevents a compiler warning.
Co-authored-by: Samuel Hym
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/thread.c | 7 +--
1 file
.com/en-us/windows/win32/sync/interlocked-variable-access
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/mutex.c| 15 +++
mingw-w64-libraries/winpthreads/src/spinlock.c | 4 ++--
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/mingw-w64
and linker
trick to use a single 'winpthreads_init' function to load these
required WinAPI functions.
Antonin Décimo (8):
winpthreads: Check if requested stack size fits in an unsigned int
winpthreads: Fix pthread_create_wrapper type
winpthreads: Use YieldProcessor in pthread
It is sufficient to specify the section on the symbol declaration.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/thread.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mingw-w64-libraries/winpthreads/src/thread.c
b/mingw-w64-libraries
Use YieldProcessor which already has the best definition for all MSVC
and MinGW supported architectures of the memory pause / yield
instruction.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/misc.h | 8
mingw-w64-libraries/winpthreads/src/spinlock.c | 8
Not so long after we updated to autoconf 2.71, a new release sporting
bug fixes was cut.
https://lists.gnu.org/archive/html/info-gnu/2023-12/msg2.html
Using MSYS2 MINGW64 environment, and with an updated install, the
scripts can be regenerated from the top directory with
WANT_AUTOMAKE=1.16
> > https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-gettickcount64
> >
> > Signed-off-by: Antonin Décimo
> > ---
> > mingw-w64-libraries/winpthreads/src/misc.c | 29 +++---
> > 1 file changed, 20 insertions(+), 9 del
/win32/api/winnt/nf-winnt-memorybarrier
[3]:
https://learn.microsoft.com/en-us/cpp/intrinsics/readwritebarrier\?view\=msvc-170
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/include/pthread.h | 4 ++--
mingw-w64-libraries/winpthreads/src/misc.h| 4
2 files changed, 2
infoapi/nf-sysinfoapi-gettickcount64
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/misc.c | 29 +++---
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/mingw-w64-libraries/winpthreads/src/misc.c
b/mingw-w64-libraries/winpthreads/src/misc.c
index
.com/en-us/windows/win32/sync/interlocked-variable-access
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/mutex.c| 15 +++
mingw-w64-libraries/winpthreads/src/spinlock.c | 4 ++--
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/mingw-w64
rsion-17-5-preview-2/
Antonin Décimo (6):
winpthreads: Check if requested stack size fits in an unsigned int
winpthreads: Fix pthread_create_wrapper type
winpthreads: Use YieldProcessor in pthread_spin_lock
winpthreads: Use GetTickCount64 directly if available
winpthreads: Replace GC
Use YieldProcessor which already has the best definition for all MSVC
and MinGW supported architectures of the memory pause / yield
instruction.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/misc.h | 8
mingw-w64-libraries/winpthreads/src/spinlock.c | 8
- Make pthread_create_wrapper return an unsigned;
_beginthreadindex takes a function returning an unsigned. The
variable holding the return value of pthread_create_wrapper is
already an unsigned.
- Make pthread_create_wrapper __stdcall.
Co-authored-by: Samuel Hym
Signed-off-by: Antonin
The requested stack size is a `size_t`, whereas _beginthreadex takes
an `unsigned int`. This provides a bit of input sanitation, and
prevents a compiler warning.
Co-authored-by: Samuel Hym
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/thread.c | 7 +--
1 file
> I pushed this patchset now, with this change squashed in.
Thanks a lot!
Sorry for that mistake, I extracted the patchset from a larger branch,
and that fix happened on a later commit.
On to more hacking!
-- Antonin
___
Mingw-w64-public mailing list
M
- don't pass -D__USE_MINGW_ANSI_STDIO=0 to MSVC;
- don't build libgcc/fakelib with MSVC.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/Makefile.am | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/mingw-w64-libraries/winpthreads/Make
mpiler-warnings/compiler-warning-level-4-c4706?view=msvc-170
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/barrier.c | 6 +++---
mingw-w64-libraries/winpthreads/src/cond.c| 6 +++---
mingw-w64-libraries/winpthreads/src/sem.c | 2 +-
3 files changed, 7 insertions
This is done by running `WANT_AUTOMAKE=1.16 autoreconf -ifv` in the
winpthreads directory.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/Makefile.in | 37 +++---
mingw-w64-libraries/winpthreads/configure | 131
2 files changed, 48 insertions(+), 120
Retain the old name for backwards compatibility.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/include/pthread.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mingw-w64-libraries/winpthreads/include/pthread.h
b/mingw-w64-libraries/winpthreads/include
e field is updated to "MIT AND BSD-3-Clause" using SPDX [2]
identifiers and expressions, removing ZPL, considering the COPYING
file in winpthreads.
[1]: https://learn.microsoft.com/en-us/windows/win32/menurc/resource-compiler
[2]: https://spdx.dev/use/specifications/
Signed-of
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/clock.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mingw-w64-libraries/winpthreads/src/clock.c
b/mingw-w64-libraries/winpthreads/src/clock.c
index 322b7e5c4..db8b34ea5 100644
--- a/mingw-w64
- remove superflous semicolons;
- avoid dead code warnings;
- avoid function redeclaration with an added 'dllexport' attribute.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/sem.c| 4 ++--
mingw-w64-libraries/winpthreads/src/thread.c | 5 +++--
mingw-w64
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/Makefile.am | 4
mingw-w64-libraries/winpthreads/configure.ac | 5 -
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/mingw-w64-libraries/winpthreads/Makefile.am
b/mingw-w64-libraries/winpthreads
Fixes a warning from libtoolize: 'AC_PROG_RANLIB' is rendered obsolete
by 'LT_INIT'.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/configure.ac | 1 -
1 file changed, 1 deletion(-)
diff --git a/mingw-w64-libraries/winpthreads/configure.ac
b/mingw-w64-l
https://learn.microsoft.com/en-us/cpp/preprocessor/pragma-seg?view=msvc-170
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/thread.c | 33
1 file changed, 27 insertions(+), 6 deletions(-)
diff --git a/mingw-w64-libraries/winpthreads/src/thread.c
b/mingw-w64-libr
Prevents a warning of `r` being shadowed, and makes the code clearer.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/rwlock.c | 6 +-
mingw-w64-libraries/winpthreads/src/rwlock.h | 3 ---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/mingw-w64
https://learn.microsoft.com/en-us/cpp/intrinsics/assume?view=msvc-170
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/misc.h | 6 ++
mingw-w64-libraries/winpthreads/src/mutex.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/mingw-w64-libraries
Signed-off-by: Antonin Décimo
---
.../winpthreads/build-aux/windres-rc | 158 ++
mingw-w64-libraries/winpthreads/configure.ac | 7 +-
2 files changed, 163 insertions(+), 2 deletions(-)
create mode 100755 mingw-w64-libraries/winpthreads/build-aux/windres-rc
diff
windows.h is a system header and better placed at first, enclosed in
angle brackets.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/barrier.h | 2 +-
mingw-w64-libraries/winpthreads/src/misc.c| 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a
-messages/compiler-warnings/compiler-warning-level-3-c4996?view=msvc-170#posix-function-names
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/mingw-w64-libraries/winpthreads/Makefile.am
b/mingw-w64-libraries/winpthreads
-the-Semicolon.html
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/barrier.h | 7 +++--
mingw-w64-libraries/winpthreads/src/cond.h| 10 ---
mingw-w64-libraries/winpthreads/src/misc.h| 30 ---
3 files changed, 30 insertions(+), 17 deletions
in pthread_cleanup_pop prevents compiler
warnings against not using the return value of the expression, and a
against an empty statement.
[1]: https://gcc.gnu.org/onlinedocs/cpp/Swallowing-the-Semicolon.html
Signed-off-by: Antonin Décimo
---
.../winpthreads/include/pthread.h | 22
As DWORD is a typedef for unsigned long, we can use the %lu format
specifier. The %p format specifier requires (void *) pointers.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/cond.c | 6 +++---
mingw-w64-libraries/winpthreads/src/rwlock.c | 6 +++---
mingw-w64
cts the COPYING file of winpthreads.
Thanks to Martin Storsjö for the previous rounds of insightful reviews.
I have more patches incoming but I would prefer to get this batch in
first. Thanks a lot for the hard work!
Antonin Décimo (22):
winpthreads: Ignore MSVC object files and Autotools
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/misc.h | 8
mingw-w64-libraries/winpthreads/src/mutex.c| 3 ---
mingw-w64-libraries/winpthreads/src/spinlock.c | 3 ---
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/mingw-w64-libraries
Previous code was too complex and hard to understand, and snprintf
fits the job nicely.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/thread.c | 21
1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/mingw-w64-libraries/winpthreads/src
Signed-off-by: Antonin Décimo
---
.gitignore | 4
1 file changed, 4 insertions(+)
diff --git a/.gitignore b/.gitignore
index 4cd47565a..3d1022348 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,13 +12,17 @@
*.lo
*.la
*.gch
+*.obj
+*.res
# Specialized files
autom4te.cache
https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#tls-callback-functions
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/thread.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/mingw-w64-libraries/winpthreads/src/thread.c
b/mingw
> After checking, winpthreads itself is licensed under a mix of MIT, BSD
> 3-clauses, and Public Domain [3] (whatever that means).
> It's really not clear… Most of the files have MIT headers, some Public
> Domain, BSD 3-clauses could be here for historical reasons, maybe
> there are actually no par
Unfortunately I somehow forgot to test this new patch with clang-cl,
which warns about the snippet. It requires a previous declaration of
the variable. I'm not sure if both declaration and definition require
the attributes too.
src/thread.c(540,84): error: no previous extern declaration for
non-st
> These changes here aren't accounted for in the commit message; the typo
> fixes are straightforward, but it might be good also to mention that
> you're expressing the license with a specific version
That's probably me being overzealous! My intent was to use the ZPL
SPDX identifier [1].
There's n
> Very much a nitpick/subjective preference; there's no need to use shouty
> uppercase for the /INCLUDE directive, lowercase should work just as well.
And shouting at the linker doesn't fix its bugs :/
> Other than that, this patch looks good to me now, thanks!
Thanks a lot for the reviews!
--
/compiler-warnings/compiler-warning-level-3-c4996?view=msvc-170#posix-function-names
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mingw-w64-libraries/winpthreads/configure.ac
b/mingw-w64-libraries
Retain the old name for backwards compatibility.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/include/pthread.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mingw-w64-libraries/winpthreads/include/pthread.h
b/mingw-w64-libraries/winpthreads/include
https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#tls-callback-functions
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/thread.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/mingw-w64-libraries/winpthreads/src/thread.c
b/mingw
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/clock.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mingw-w64-libraries/winpthreads/src/clock.c
b/mingw-w64-libraries/winpthreads/src/clock.c
index 322b7e5c4..db8b34ea5 100644
--- a/mingw-w64
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/configure | 117 ++
1 file changed, 11 insertions(+), 106 deletions(-)
diff --git a/mingw-w64-libraries/winpthreads/configure
b/mingw-w64-libraries/winpthreads/configure
index 22b955cd4..da002e7cb 100755
As DWORD is a typedef for unsigned long, we can use the %lu format
specifier. The %p format specifier requires (void *) pointers.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/cond.c | 6 +++---
mingw-w64-libraries/winpthreads/src/rwlock.c | 6 +++---
mingw-w64
This particular snippet raises an annoying MSVC warning, C4706.
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4706?view=msvc-170
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/barrier.c | 6 +++---
mingw-w64-libraries
- remove superflous semicolons;
- avoid dead code warnings;
- avoid function redeclaration with an added 'dllexport' attribute.
Signed-off-by: Antonin Décimo
---
mingw-w64-libraries/winpthreads/src/sem.c| 4 ++--
mingw-w64-libraries/winpthreads/src/thread.c | 5 +++--
mingw-w64
1 - 100 of 153 matches
Mail list logo