From 2e8560af35032bdb0a158e3bba5d9c41a7785a1b Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath
Date: Thu, 19 Sep 2024 05:31:19 +
Subject: [PATCH] crt: Add new APIs in user32 import library
Signed-off-by: Biswapriyo Nath
---
mingw-w64-crt/lib-common/user32.def.in | 20
mi
These functions return pointer to global variables with same name but
without the first leading underscore. These functions are available also
under name with leading "__p" prefix.
Functions __daylight(), __dstbias(), __timezone() and __tzname() are
available in msvcr80+ libraries and also in UCRT
On 18.09.2024 16:16, LIU Hao wrote:
Maybe, but in practice it's pretty well defined behavior.
Yes; my suggestion about casting via `intptr_t` also just happens to
work in practice.
So far there are two compilers which are known to warn sometimes about
conversion between a function pointer a
On Wednesday 18 September 2024 12:05:44 Martin Storsjö wrote:
> On Sun, 15 Sep 2024, Pali Rohár wrote:
>
> > When compiling any application with flags under gcc 7+ with flags
> > -D__MINGW_INTRIN_INLINE -Wall -Wextra, it throws about 300 lines of
> > preprocessor warnings for __INTRINSIC_PROLOG us
在 2024-09-18 22:07, Jacek Caban 写道:
If it's just about -Wpedantic, I think we could just ignore it. For crt, we control default flags
and if user explicitly specifies flags like that, a warning is not the worst thing to get... (It
would be different for headers, that may be exposed to any user c
On 18.09.2024 15:25, LIU Hao wrote:
在 2024-09-18 21:02, Martin Storsjö 写道:
Hmm, can you give a godbolt example or similar, for where the
compilers diverge about warnings here?
With Clang, I don't seem to be able to get any warnings for either
casts via (void(*)(void)) or (void*), with either
在 2024-09-18 21:02, Martin Storsjö 写道:
Hmm, can you give a godbolt example or similar, for where the compilers diverge
about warnings here?
With Clang, I don't seem to be able to get any warnings for either casts via (void(*)(void)) or
(void*), with either C or C++, with -Wall -Wextra -pedanti
On Wed, 18 Sep 2024, LIU Hao wrote:
在 2024-09-18 20:36, Jacek Caban 写道:
That warning seems very impractical in code dealing with GetProcAddress. In
Wine, we usually just cast it to (void *), but I recall that it was
problematic for mingw-w64-crt for some reason too. Maybe we could just
disabl
在 2024-09-18 20:36, Jacek Caban 写道:
That warning seems very impractical in code dealing with GetProcAddress. In Wine, we usually just
cast it to (void *), but I recall that it was problematic for mingw-w64-crt for some reason too.
Maybe we could just disable that warning in the configure script?
On 18.09.2024 14:06, Martin Storsjö wrote:
This avoids warnings from Clang, pointing out that this function
could be marked noreturn.
---
mingw-w64-crt/misc/wassert.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mingw-w64-crt/misc/wassert.c b/mingw-w64-crt/misc/wassert.c
index d342048ec
On Wed, 18 Sep 2024, Jacek Caban wrote:
On 18.09.2024 14:06, Martin Storsjö wrote:
Modern GCC and Clang warn for these casts, with warnings like these:
../secapi/_chsize_s.c:20:6:
warning: cast from 'FARPROC' (aka 'long long (*)()') to 'errno_t
((*))(int, long long) __attribute__((cdecl))' (
On 18.09.2024 14:06, Martin Storsjö wrote:
Modern GCC and Clang warn for these casts, with warnings like these:
../secapi/_chsize_s.c:20:6:
warning: cast from 'FARPROC' (aka 'long long (*)()') to 'errno_t
((*))(int, long long) __attribute__((cdecl))' (aka 'int (*)(int, lo
ng long)') converts t
This avoids warnings from Clang, pointing out that this function
could be marked noreturn.
---
mingw-w64-crt/misc/wassert.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mingw-w64-crt/misc/wassert.c b/mingw-w64-crt/misc/wassert.c
index d342048ec..b43ddaf20 100644
--- a/mingw-w64-crt/misc/was
Modern GCC and Clang warn for these casts, with warnings like these:
../secapi/_chsize_s.c:20:6: warning: cast from 'FARPROC' (aka 'long long
(*)()') to 'errno_t ((*))(int, long long) __attribute__((cdecl))' (aka 'int
(*)(int, lo
ng long)') converts to incompatible function type
[-Wcast-functio
在 2024-09-18 17:16, Martin Storsjö 写道:
From: Pali Rohár
If the mingw-w64 headers are included in a way that doesn't mute
warnings in system headers, this header causes lots of warnings like:
warning: this use of "defined" may not be portable
It is caused by the fact that this macro __INTRINSIC
On Sun, 15 Sep 2024, Pali Rohár wrote:
_osver, _winmajor, _winminor and _winver are exported from CRT DLL library
up to the msvcr80.dll version. Add support for __p_ functions also for
msvcr90+ and UCRT import libraries.
---
mingw-w64-crt/Makefile.am | 27 +++---
mingw-w64-crt
On Sun, 15 Sep 2024, Pali Rohár wrote:
Global variable _osplatform for i386 is provided in new versions of
msvcrt.dll and then also in msvcr70.dll, msvcr71.dll and msvcr80.dll.
For x64 it is provided in all msvcrt.dll and msvcr80.dll versions.
Function __p__osplatform() which returns pointer to
On Sun, 15 Sep 2024, Pali Rohár wrote:
crtdll.dll's struct _stat is different than msvcrt.dll's struct _stat.
crtdll.dll's dev_t type (used in struct _stat) is short but msvcrt.dll's
dev_t type is unsigned int.
Fix this problem by providing mingw-w64 _stat32() and _fstat32() compatible
wrappers
On Sun, 15 Sep 2024, Pali Rohár wrote:
gcc 8+ throws warning during imaxdiv.c compilation:
misc/imaxdiv.c:34:1: warning: ‘lldiv’ alias between functions of incompatible types
‘lldiv_t(long long int, long long int)’ {aka ‘struct (long long int,
long long int)’} and ‘imaxdiv_t(intmax_t, int
From: Pali Rohár
If the mingw-w64 headers are included in a way that doesn't mute
warnings in system headers, this header causes lots of warnings like:
warning: this use of "defined" may not be portable
It is caused by the fact that this macro __INTRINSIC_PROLOG uses
non-portable Conditional inc
On Sun, 15 Sep 2024, Pali Rohár wrote:
When compiling any application with flags under gcc 7+ with flags
-D__MINGW_INTRIN_INLINE -Wall -Wextra, it throws about 300 lines of
preprocessor warnings for __INTRINSIC_PROLOG usage:
warning: this use of "defined" may not be portable
This isn't actuall
21 matches
Mail list logo