msvcr120 and UCRT provides native nextafter symbol. So do not define
duplicate symbol nextafter via crt-aliases.def.in file for these import
libraries.
---
mingw-w64-crt/def-include/crt-aliases.def.in | 2 ++
mingw-w64-crt/lib-common/msvcrt.def.in | 1 +
mingw-w64-crt/lib32/crtdll.def.in
All msvcr120 DLL libraries provides C99 nextafter() function. i386
msvcr120d.def.in already contains it. In other def files it is missing.
---
mingw-w64-crt/lib32/msvcr120.def.in | 1 +
mingw-w64-crt/lib64/msvcr120.def.in | 1 +
mingw-w64-crt/lib64/msvcr120d.def.in | 1 +
3 files changed, 3
Long double type for msvc is 64-bit but for gcc it is 80-bit.
So these long double functions are not compatible with gcc.
Comment them in all msvcr120 def files for x86 platform.
---
mingw-w64-crt/lib-common/msvcr120_app.def.in | 122 +--
mingw-w64-crt/lib32/msvcr120.def.in
Some cdecl functions have incorrect stdcall suffix @0 probably due to
false-positive detection by gendef. Remove incorrect suffix.
---
mingw-w64-crt/lib32/msvcr120.def.in | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/mingw-w64-crt/lib32/msvcr120.def.in
Remove Check!!! comments.
---
mingw-w64-crt/lib32/msvcr120.def.in | 48 ++--
mingw-w64-crt/lib32/msvcr120d.def.in | 6 ++--
2 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/mingw-w64-crt/lib32/msvcr120.def.in
b/mingw-w64-crt/lib32/msvcr120.def.in
index
x64 version has this symbol with two leading underlines.
i386 version has this symbol with just one leading underline.
Same applies for other msvcrt libraries.
---
mingw-w64-crt/lib-common/msvcr120_app.def.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
Remove Check!!! comments and move math comments to the correct lines.
---
mingw-w64-crt/lib32/msvcr110.def.in | 58 ++---
1 file changed, 27 insertions(+), 31 deletions(-)
diff --git a/mingw-w64-crt/lib32/msvcr110.def.in
b/mingw-w64-crt/lib32/msvcr110.def.in
index
Export name is upper case in the original Visual C++ library.
---
mingw-w64-crt/lib32/msvcr100.def.in | 4 ++--
mingw-w64-crt/lib64/msvcr100.def.in | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/mingw-w64-crt/lib32/msvcr100.def.in
b/mingw-w64-crt/lib32/msvcr100.def.in
---
mingw-w64-crt/lib64/msvcr100.def.in | 2 +-
mingw-w64-crt/lib64/msvcr110.def.in | 2 +-
mingw-w64-crt/lib64/msvcr120.def.in | 2 +-
mingw-w64-crt/lib64/msvcr120d.def.in | 2 +-
mingw-w64-crt/lib64/msvcr90.def.in | 2 +-
mingw-w64-crt/lib64/msvcr90d.def.in | 2 +-
6 files changed, 6
Some cdecl functions have incorrect stdcall suffix @0 probably due to
false-positive detection by gendef. Remove incorrect suffix.
---
mingw-w64-crt/lib32/msvcr110.def.in | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/mingw-w64-crt/lib32/msvcr110.def.in
Visual C++ 2012 Update 1 introduced new symbols. Append them at the end of
def files.
---
mingw-w64-crt/lib32/msvcr110.def.in | 20
mingw-w64-crt/lib64/msvcr110.def.in | 19 +++
2 files changed, 39 insertions(+)
diff --git
Function _adj_fdiv_r in msvcr90d.dll returns like in other msvcrt
libraries. Just gendef is not able to recognize it.
---
mingw-w64-crt/lib32/msvcr90d.def.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mingw-w64-crt/lib32/msvcr90d.def.in
Export name is upper case in the original Visual C++ library.
---
mingw-w64-crt/lib32/msvcr90.def.in | 4 ++--
mingw-w64-crt/lib64/msvcr90.def.in | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/mingw-w64-crt/lib32/msvcr90.def.in
b/mingw-w64-crt/lib32/msvcr90.def.in
index
Hello, after fixing msvcrt10-80 def files & import libs, I'm sending
next batch of fixes for msvcr90-120 def files.
Pali Rohár (14):
crt: Move $I10_OUTPUT symbol out of the C++ mangled section in lib64
def.in files
crt: Fix some function symbols in msvcr90.def.in and msvcr100.de
Following symbols represents functions. So remove DATA keyword from them.
__report_gsfailure
_byteswap_uint64
_byteswap_ulong
_byteswap_ushort
_get_errno
_rotl64
_rotr64
_set_errno
btowc
mbrlen
mbrtowc
mbsrtowcs
strnlen
wcrtomb
wcsnlen
wcsrtombs
wctob
---
mingw-w64-crt/lib32/msvcr100.def.in | 34
Function _filelengthi64() is available since msvcrt40.dll.
For previous CRT versions, which have only 32-bit file offsets, define it
as wrapper around 32-bit _filelength() function.
---
mingw-w64-crt/Makefile.am| 3 +++
mingw-w64-crt/stdio/_filelengthi64.c | 16
2
Functions _get_errno() and _set_errno() are natively available since
msvcr80.dll and also since Windows Vista version of msvcrt.dll.
Import libraries for crtdll, msvcrt10-40 and msvcrt.dll already contains
emulation of these functions. Include this emulation also for msvcr70 and
msvcr71, so these
Functions _fseeki64() and _ftelli64() are natively available since
msvcr80.dll.
mingw-w64 already provides emulation of _fseeki64() and _ftelli64()
functions for msvcrt.dll import library via _filelengthi64(), fgetpos(),
fsetpos() and fflush() functions.
So include this emulation into all
Functions fgetpos64() and fsetpos64() are just aliases for functions
fgetpos() and fsetpos() as they are already using 64-bit fpos_t type.
Most aliased functions are defined in crt-aliases.def.in file. Do same also
for fgetpos64() and fsetpos64() functions by moving them from individual C
files
Function _configthreadlocale() is natively available since msvcr80.dll.
For all previous CRT versions include mingw-w64 emulation.
Emulation is already included for msvcrt-os.
---
mingw-w64-crt/Makefile.am | 6 ++
1 file changed, 6 insertions(+)
diff --git a/mingw-w64-crt/Makefile.am
Function _wassert() is natively available since msvcr80.dll and also since
Windows Vista version of msvcrt.dll.
Import library for i386 version of msvcrt.dll already contains emulation of
this function.
Include this emulation into x64 version of msvcrt.dll and also into crtdll,
msvcrt10-40 and
Functions fgetpos() and fsetpos() in these libraries have different ABI
than in all later versions starting with msvcrt40.
Their second argument is pointer to 32-bit signed value, which is not
compatible with the fpos_t type (64-bit), used by all later versions.
So rename these functions in
These functions are natively available since msvcr80.dll and also since
Vista version of msvcrt.dll. They are available also in ARM versions.
For all older CRT versions include mingw-w64 emulation.
Emulation in misc/output_format.c is slightly updated to optimize code for
non-msvcrt.dll version
Function _set_purecall_handler() is natively available since msvcr70.dll.
For all previous CRT versions include mingw-w64 emulation.
Emulation is already included for msvcrt-os.
---
mingw-w64-crt/Makefile.am | 4
1 file changed, 4 insertions(+)
diff --git a/mingw-w64-crt/Makefile.am
On Saturday 15 June 2024 23:04:09 LIU Hao wrote:
> 在 2024-06-15 04:54, Pali Rohár 写道:
> > But I still think that it is a bug if gcc/ld can produces "broken"
> > executable just because msvcr* import library contains incorrect
> > symbols. And it can be simple avoide
On Friday 14 June 2024 10:01:49 LIU Hao wrote:
> 在 2024-06-14 04:53, Martin Storsjö 写道:
> > I'm not entirely sure - that's long before my involvement with the
> > project. But I would primarily believe that there were issues with
> > corner case correctness wrt what e.g. C99 specifies. Possibly
On Tuesday 11 June 2024 09:25:36 LIU Hao wrote:
> 在 2024-06-11 03:31, Pali Rohár 写道:
> > Any opinion on this? Because currently import libs for msvcr80(d)
> > contains symbols which refers to non-existent symbols in DLL.
> >
> > I think that import library must no
On Friday 14 June 2024 00:22:17 Martin Storsjö wrote:
> On Thu, 13 Jun 2024, Pali Rohár wrote:
>
> > On Thursday 13 June 2024 16:11:15 Martin Storsjö wrote:
> > > On Fri, 7 Jun 2024, Pali Rohár wrote:
> > >
> > > > Declare __argc, __argv, __
On Thursday 13 June 2024 16:11:15 Martin Storsjö wrote:
> On Fri, 7 Jun 2024, Pali Rohár wrote:
>
> > Declare __argc, __argv, __wargv, _pgmptr, _wpgmptr via corresponding
> > __p_func() function as now it is provided by every CRT import library
> > (either directly or ma
On Tuesday 11 June 2024 22:40:55 Martin Storsjö wrote:
> On Mon, 10 Jun 2024, Pali Rohár wrote:
>
> > Hello, I see that in some CRT def files are math functions (asin, atan,
> > cos, exp, fabs, ...) declared as DATA. But it is not consistent, in some
> > CRT def
On Tuesday 11 June 2024 23:16:23 Martin Storsjö wrote:
> On Fri, 7 Jun 2024, Pali Rohár wrote:
>
> > Function __p___wargv() returns pointer to the first member of global array
> > __wargv[] and is available since VC20, it is available also in UCRT, and
> > also in x86 vers
Hello, I see that in some CRT def files are math functions (asin, atan,
cos, exp, fabs, ...) declared as DATA. But it is not consistent, in some
CRT def files they are with DATA and in some without DATA.
I guess that this is not an "gendef" false positive detection.
So what is the reason that
On Tuesday 04 June 2024 19:25:42 Pali Rohár wrote:
> On Tuesday 04 June 2024 09:54:20 LIU Hao wrote:
> > 在 2024-06-04 05:39, Pali Rohár 写道:
> > > Symbols @_calloc_crt@8, @_malloc_crt@4 and @_realloc_crt@8 are exported
> > > from msvcr80 DLL libraries wi
On Monday 10 June 2024 15:02:29 Martin Storsjö wrote:
> On Sat, 8 Jun 2024, Pali Rohár wrote:
>
> > On Saturday 08 June 2024 08:25:49 Martin Storsjö wrote:
> > > On Fri, 7 Jun 2024, Pali Rohár wrote:
> > >
> > > > On Tuesday 04 June 2024 15:39:46 Mar
On Saturday 08 June 2024 08:25:49 Martin Storsjö wrote:
> On Fri, 7 Jun 2024, Pali Rohár wrote:
>
> > On Tuesday 04 June 2024 15:39:46 Martin Storsjö wrote:
> > > On Mon, 3 Jun 2024, Pali Rohár wrote:
> > >
> > > > Add once-guard to e
On Tuesday 04 June 2024 15:39:46 Martin Storsjö wrote:
> On Mon, 3 Jun 2024, Pali Rohár wrote:
>
> > Add once-guard to ensure that the file is processed only once.
> >
> > Add arch-guard to ensure that DEF_ is always defined to prevent an
> > issue that symbols defi
In followup change will be definition of __argv in stdlib.h changed and
will not use __MINGW_IMP_SYMBOL(__argv) anymore.
So declare __MINGW_IMP_SYMBOL(__argv) in __p___argv.c file manually.
---
mingw-w64-crt/misc/__p___argv.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
Declare __argc, __argv, __wargv, _pgmptr, _wpgmptr via corresponding
__p_func() function as now it is provided by every CRT import library
(either directly or manually by mingw-w64 code) which also provides that
symbol.
Declare _environ and _wenviron based on architecture. On i386 and x64 it is
Function __p__wpgmptr() returns pointer to global variable _wpgmptr and is
available since VC20, it is available also in UCRT, and also in x86 version
of OS system version msvcrt.dll.
crtdll.dll and msvcrt10.dll do not provide global variable _wpgmptr and
neither __p__wpgmptr() function.
For
Function __p__wenviron() returns pointer to the first member of global
array _wenviron[] and is available since VC20, it is available also in
UCRT, and also in x86 version of OS system version msvcrt.dll.
For x64 version of msvcrt.dll provide mingw-w64 version of __p__wenviron()
function defined
Function __p___wargv() returns pointer to the first member of global array
__wargv[] and is available since VC20, it is available also in UCRT, and
also in x86 version of OS system version msvcrt.dll.
crtdll.dll and msvcrt10.dll do not provide __wargv[] array and
__wgetmainargs() function, so for
Function __p__pgmptr() returns pointer to global variable _pgmptr and is
available since VC20, it is available also in UCRT, and also in x86 version
of OS system version msvcrt.dll.
For all other CRT import libraries (crtdll.dll, msvcrt10.dll and
x64/arm32/arm64 msvcrt.dll) provide mingw-w64
Function __p___argc() returns pointer to global variable __argc and is
available since VC20, it is available also in UCRT, and also in x86 version
of OS system version msvcrt.dll.
For all other CRT import libraries (crtdll.dll, msvcrt10.dll and
x64/arm32/arm64 msvcrt.dll) provide mingw-w64
Function __p__environ() returns pointer to the first member of global array
_environ[] and is available since VC20, it is available also in UCRT, and
also in x86 version of OS system version msvcrt.dll.
CRT libraries crtdll.dll, msvcrt10.dll and x64 msvcrt.dll do not provide
__p__environ()
On Tuesday 04 June 2024 09:54:20 LIU Hao wrote:
> 在 2024-06-04 05:39, Pali Rohár 写道:
> > Symbols @_calloc_crt@8, @_malloc_crt@4 and @_realloc_crt@8 are exported
> > from msvcr80 DLL libraries with their @suffix decoration. This is not
> > usual.
> >
> > Those dec
On Monday 03 June 2024 23:39:47 Pali Rohár wrote:
> Having -DDEF_ is required by func.def.in which is used either
> directly or indirectly by crt-aliases.def.in in all CRT def.in files.
> Some symbols in crt-aliases.def.in are defined via F* macros and these
> symbols are curre
Global variable _mbctype[] is not available in UCRT and msvcrt10.dll. UCRT
instead provides __p__mbctype() function which returns pointer to the first
_mbctype array member. msvcrt10.dll does not have any replacement.
Function __p__mbctype() is present also in all msvcrt VC versions starting
from
_mbcasemap[] global array is available since Microsoft Visual C++ 5.0 SP1
version of msvcrt.dll for all architectures, and then also in new msvcr*
DLL libraries, and also in UCRT.
__p__mbcasemap() function is available in msvcrt.dll only for i386
architecture since Microsoft Visual C++ 5.0 SP1.
Global variable _sys_nerr is present in every CRT library except UCRT.
Function __sys_nerr() is present since msvcr80.dll and returns pointer to
the global variable _sys_nerr. This function is not present in any
msvcrt.dll library version, but is present in UCRT library.
Same applies for global
_wctype is global variable exported from DLL library, so mark it with
DATA and removes false-positive function stdcall @size decoration.
---
mingw-w64-crt/lib-common/api-ms-win-crt-string-l1-1-0.def | 2 +-
mingw-w64-crt/lib-common/msvcr120_app.def.in | 4 +---
Global variable _pwctype is not available in UCRT. Instead UCRT has only
__pwctype_func() function which returns value of _pwctype variable.
Function __pwctype_func() is available also in msvcrt since VC70. For
previous i386 msvcrt versions there is a __p__pwctype() function which
returns pointer
_wctype is a global variable exported from CRT library and therefore has to
be always accessed by the import symbol via __MINGW_IMP_SYMBOL(_wctype).
There is no CRT function which could return pointer to this variable.
_wctype variable is present since msvcr70.dll and also since Windows Server
Global variables _pctype, _pwctype, _wctype and function __pctype_func() are
constant.
See:
*
https://learn.microsoft.com/en-us/cpp/c-runtime-library/pctype-pwctype-wctype-mbctype-mbcasemap
* https://learn.microsoft.com/en-us/cpp/c-runtime-library/pctype-func
---
mingw-w64-headers/crt/ctype.h
Provide fallback ___mb_cur_max_func() implementation via __p___mb_cur_max()
function. __p___mb_cur_max() is available since VC20. For earlier version
import libraries provide fallback __p___mb_cur_max() implementation via
global variable __mb_cur_max.
With this change every CRT import library
__pctype_func is available in msvcrt since VC70. __p__pctype is available
in i386 msvcrt version since VC20. _pctype is available in all versions
except in UCRT.
Define fallback __pctype_func() function implementation via __p__pctype()
function. And define __p__pctype() via _pctype variable.
Both functions __iob_func() and __p__iob() returns same constant value -
pointer to the first member of _iob[] array. Symbol for _iob[] array is
present in every msvcrt DLL library.
Function __p__iob() is provided by every i386 version of msvcrt DLL library
since VC20. But it is not available in
This macro is currently used only for stdcall functions.
Rename it and includes STDCALL into the name to prevent confusion that it
cannot be used for example for fastcall functions (they do not have leading
underscore in name, like stdcall and cdecl).
---
mingw-w64-crt/def-include/func.def.in |
Add once-guard to ensure that the file is processed only once.
Add arch-guard to ensure that DEF_ is always defined to prevent an
issue that symbols defined via F32() macro completely disappeared and which
was fixed in previous change.
This change applied before the previous change cause compile
Symbols @_calloc_crt@8, @_malloc_crt@4 and @_realloc_crt@8 are exported
from msvcr80 DLL libraries with their @suffix decoration. This is not
usual.
Those decorated symbols refers to fastcall function calling convention.
When generating import library, @suffix must not be trimmed (which is done
Having -DDEF_ is required by func.def.in which is used either
directly or indirectly by crt-aliases.def.in in all CRT def.in files.
Some symbols in crt-aliases.def.in are defined via F* macros and these
symbols are currently missing in versioned non-os msvcrt import libraries.
This change is
On Sunday 26 May 2024 02:21:20 Pali Rohár wrote:
> GCC documentation for alias attribute for variables says:
>
> https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html
> Using both the alias and the alias target to access the same object is
> undefined in a t
On Wednesday 29 May 2024 21:52:12 Pali Rohár wrote:
> Ok. Then it means, it is needed to just rewrite commit message.
What about this commit message?
crt: Declare aliased __MINGW_IMP_SYMBOL symbols via __attribute__((alias))
Currently __MINGW_IMP_SYMBOL symbols for aliased functions are defi
On Monday 03 June 2024 14:32:06 Martin Storsjö wrote:
> On Sun, 2 Jun 2024, Pali Rohár wrote:
>
> > msvcr80d.dll is debug version of the msvcr80.dll and provides additional
> > debugging functions.
> > ---
> > mingw-w64-crt/Makefile.am | 13 +
---
mingw-w64-crt/lib32/msvcr100.def.in | 3 ++-
mingw-w64-crt/lib32/msvcr110.def.in | 3 ++-
mingw-w64-crt/lib32/msvcr120.def.in | 3 ++-
mingw-w64-crt/lib32/msvcr120d.def.in | 3 ++-
mingw-w64-crt/lib32/msvcr70.def.in | 3 ++-
mingw-w64-crt/lib32/msvcr70d.def.in | 3 ++-
msvcr80d.dll is debug version of the msvcr80.dll and provides additional
debugging functions.
---
mingw-w64-crt/Makefile.am | 13 +-
mingw-w64-crt/lib-common/msvcr80d.mri |6 +
mingw-w64-crt/lib32/msvcr80d.def.in | 1633 +
WinMain() entry point provided by the application is called by mingw-w64
startup code, more precisely by function main() from crtexewin.c file.
mingw-w64 startup code in file crtexewin.c calls _ismbblead() function.
Function _ismbblead() is not available in some versions of crtdll.dll
and is
On Wednesday 29 May 2024 22:15:06 Pali Rohár wrote:
> On Wednesday 29 May 2024 16:21:33 Martin Storsjö wrote:
> > On Sun, 26 May 2024, Pali Rohár wrote:
> >
> > > WinMain() entry point defined by the application is called by mingw-w64
> > > startup code, more
On Wednesday 29 May 2024 15:38:19 Martin Storsjö wrote:
> On Mon, 27 May 2024, Pali Rohár wrote:
>
> > On Monday 27 May 2024 13:04:56 LIU Hao wrote:
> > > 在 2024-05-26 20:39, Pali Rohár 写道:
> > > > ---
> > > > mingw-w64-crt/misc/mbrtowc.c | 3 +
On Wednesday 29 May 2024 23:53:26 Martin Storsjö wrote:
> On Sun, 26 May 2024, Pali Rohár wrote:
>
> > msvcr71d.dll is debug version of the msvcr71.dll and provides additional
> > debugging functions.
> > ---
> > mingw-w64-crt/Makefile.am | 6 +-
> >
On Wednesday 29 May 2024 16:21:33 Martin Storsjö wrote:
> On Sun, 26 May 2024, Pali Rohár wrote:
>
> > WinMain() entry point defined by the application is called by mingw-w64
> > startup code, more precisely by function main() from crtexewin.c file.
> >
> >
On Wednesday 29 May 2024 16:00:06 Martin Storsjö wrote:
> On Sun, 26 May 2024, Pali Rohár wrote:
>
> > GCC documentation for alias attribute for variables says:
> >
> > https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html
> > Using both the alias
getopt* functions receive also argv[0] argument. So use it for printing
program name instead of the global __argv[0] variable.
This avoids using and importing of the __argv[] DATA symbol from the linked
CRT library, as it is not needed.
---
mingw-w64-crt/misc/getopt.c | 28
---
mingw-w64-crt/misc/mbrtowc.c | 3 +++
mingw-w64-crt/misc/wcrtomb.c | 5 -
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/mingw-w64-crt/misc/mbrtowc.c b/mingw-w64-crt/misc/mbrtowc.c
index 2eb480749f76..3c01156755ad 100644
--- a/mingw-w64-crt/misc/mbrtowc.c
+++
msvcr70d.dll is debug version of the msvcr70.dll and provides additional
debugging functions.
---
mingw-w64-crt/Makefile.am | 6 +-
mingw-w64-crt/lib32/msvcr70d.def.in | 951
mingw-w64-crt/lib32/msvcr70d.mri| 6 +
3 files changed, 962 insertions(+),
msvcr71d.dll is debug version of the msvcr71.dll and provides additional
debugging functions.
---
mingw-w64-crt/Makefile.am | 6 +-
mingw-w64-crt/lib32/msvcr71d.def.in | 945
mingw-w64-crt/lib32/msvcr71d.mri| 6 +
3 files changed, 956 insertions(+),
Filename crtdll_getmainargs.c better describe which function it provides.
---
mingw-w64-crt/Makefile.am | 2 +-
mingw-w64-crt/crt/{crtdll_compat.c => crtdll_getmainargs.c} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename
msvcrtd.dll is debug version of the Visual C++ 4.2, 5.x and 6.x msvcrt.dll
library and provides additional debugging functions.
---
mingw-w64-crt/Makefile.am | 7 +-
mingw-w64-crt/lib32/msvcrtd.def.in | 864 +
mingw-w64-crt/lib32/msvcrtd.mri| 6 +
3
API for __getmainargs() function in msvcrt10.dll is same as __GetMainArgs()
function in crtdll.dll. It is slightly different than in any other msvcrt
versions. It returns void and does not the pointer to the _startupinfo
structure as a last argument.
So for compatibility with mingw-w64 startup
For 32-bit time_t (detected by _USE_32BIT_TIME_T), functions _fstat32(),
_fstat() and fstat() are same. So fstat() can be defined as simple alias
in def file.
Same applies for functions _fstat64i32(), _fstat() and fstat() when time_t
is 64-bit.
Simplify fstat() function, remove it from
All CRT import libraries provides UCRT-compatible *stat* symbols since
commit b4638756158e947ce3ddde9e1b3b6f1f63d2ba03.
So define all stat* macros consistently with definitions of aliases in def
files based on UCRT. There is no need to have ifdef for non-UCRT version
anymore.
---
On Monday 27 May 2024 13:04:56 LIU Hao wrote:
> 在 2024-05-26 20:39, Pali Rohár 写道:
> > ---
> > mingw-w64-crt/misc/mbrtowc.c | 3 +++
> > mingw-w64-crt/misc/wcrtomb.c | 5 -
> > 2 files changed, 7 insertions(+), 1 deletion(-)
> >
>
> This patch seem
GCC documentation for alias attribute for variables says:
https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html
Using both the alias and the alias target to access the same object is
undefined in a translation unit without a declaration of the alias with
the attribute.
So
msvcr40d.dll is debug version of the msvcrt40.dll and provides additional
debugging functions.
msvcr40d.def.in def file was generated by gendef from the original
msvcr40d.dll library version and modified with same changes (mostly
documentation) which were done to the msvcrt40.def.in def file.
---
WinMain() entry point defined by the application is called by mingw-w64
startup code, more precisely by function main() from crtexewin.c file.
mingw-w64 startup code in file crtexewin.c calls _ismbblead() function.
Function _ismbblead() is not available in earlier versions of crtdll.dll
and is
API for __getmainargs() and __wgetmainargs() functions in msvcrt20.dll is
slightly different than in new msvcrt versions. In msvcrt20.dll these
functions return void and take new_mode parameter instead of the pointer to
the _startupinfo structure.
So for compatibility with mingw-w64 startup code,
---
mingw-w64-crt/def-include/crt-aliases.def.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mingw-w64-crt/def-include/crt-aliases.def.in
b/mingw-w64-crt/def-include/crt-aliases.def.in
index 62744a54ab54..aca031d4b027 100644
---
---
mingw-w64-crt/crt/crtdll_compat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mingw-w64-crt/crt/crtdll_compat.c
b/mingw-w64-crt/crt/crtdll_compat.c
index 7ab3a82984e0..81e37aad 100644
--- a/mingw-w64-crt/crt/crtdll_compat.c
+++ b/mingw-w64-crt/crt/crtdll_compat.c
On Monday 20 May 2024 13:07:29 Martin Storsjö wrote:
> On Thu, 9 May 2024, Pali Rohár wrote:
>
> > crtdll.dll library has some DATA symbols with _dll suffix.
> > Fix generating aliases for these symbols.
> > ---
> > .../def-include/msvcrt-common.def.in | 23
On Monday 20 May 2024 13:04:33 Martin Storsjö wrote:
> On Thu, 9 May 2024, Pali Rohár wrote:
>
> > File msvcrt-common.def.in adds just symbol aliases, so include it in CRT
> > def files after having all symbols declared.
> >
> > Note that some def files u
Hello, have you looked at this and other changes?
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Change library name to uppercase CRTDLL.dll and remove DATA keyword for all
time function symbols. This is how the original crtdll.dll library is defined.
---
mingw-w64-crt/lib32/crtdll.def.in | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git
Symbol _fstat64i32 is available in all 64-bit CRT import libraries as an
alias. For 32-bit CRT import libraries it is present as native import
symbol since msvcr80.
MinGW-w64 fallback implementation of _fstat64i32() function uses _fstat64()
call which in 32-bit versions is available since msvcr70
Some find, stat and time aliases are missing in UCRT def files:
api-ms-win-crt-filesystem-l1-1-0.def.in api-ms-win-crt-time-l1-1-0.def.in
They are already present in ucrtbase.def.in file after change from the
commit b4638756158e947ce3ddde9e1b3b6f1f63d2ba03.
Add those aliases which are missing.
Symbols __p___argv, __p__acmdln, __p__commode, __p__fmode, and __p__wcmdln
are available in X64 version of msvcr80.dll. This was clarified and fixed
in commit e0426704cce399a7517e4ec71360bbd1d5f880e3. So remove duplicated
definitions of fallback functions.
---
mingw-w64-crt/Makefile.am | 9
So comments unrelated to processing architecture would be dropped by
preprocessor.
---
mingw-w64-crt/lib-common/msvcrt.def.in | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in
b/mingw-w64-crt/lib-common/msvcrt.def.in
index
Both symbols refers to global variable, not the function. So mark them with
DATA for all platforms. gendef detects that _mbcasemap is DATA for all I386
versions of msvcrt.dll (Visual C++ 5.0, 6.0, Win9x, 2000, XP, ... up to 10).
But gendef since Windows XP version of msvcrt.dll cannot autodetect
---
mingw-w64-crt/lib-common/msvcrt.def.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in
b/mingw-w64-crt/lib-common/msvcrt.def.in
index 70b67a7bbd66..9043e9fb53c5 100644
--- a/mingw-w64-crt/lib-common/msvcrt.def.in
+++
For reference these patches changes final def files.
There is no change in ucrtbase.def and msvcrt.def.
--- lib32/crtdll.def.in
+++ lib32/crtdll.def.in
-daylight DATA == _daylight
+daylight DATA == _daylight_dll
-timezone DATA == _timezone
+timezone DATA == _timezone_dll
--- lib32/msvcr100.def.in
crtdll.dll library has some DATA symbols with _dll suffix.
Fix generating aliases for these symbols.
---
.../def-include/msvcrt-common.def.in | 23 +++
mingw-w64-crt/lib32/crtdll.def.in | 1 +
2 files changed, 24 insertions(+)
diff --git
This file contains definitions of symbol aliases for any CRT library. It is
already used by msvcrt, crtdll and ucrt. So rename msvcrt-common.def.in to
crt-aliases.def.in as new name better match the purpose of the file.
---
.../def-include/{msvcrt-common.def.in => crt-aliases.def.in} | 0
1 - 100 of 373 matches
Mail list logo