This reverts parts of 52c98b1273.
While powf indeed is available in UCRT on i386 too, it's missing
in Wine's i386 ucrtbase.dll (as of Wine 9.15). This probably stems
from the same mistake originally. (Most of the float math functions,
suffixed with -f, are unavailable in the i386 UCRT, but powf is
available.)
This was fixed in upstream Wine in commit
5393ba55464f3346bad7b98e11733348f2b64c6f, which will be part of
the upcoming Wine 9.16.
Thus, to allow built executables to run on current Wine versions,
avoid linking against this function, as a temporary workaround.
After a grace period, to let fixed versions of Wine become more
widely available, we can revert this, to link against powf
on i386 too.
At that point, we can stop including math/powf.c in src_ucrtbase32
in Makefile.am too.
Signed-off-by: Martin Storsjö <martin@martin.st>
List of symbols in ucrtbase.def.in and ucrtbased.def.in are very similar.
So move them into one common file ucrtbase-common.def.in and based on
DEF_DEBUG definition choose if the symbol list is for debug ucrtbased.dll
or release ucrtbase.dll library.
Signed-off-by: Martin Storsjö <martin@martin.st>
ucrtbased.dll is debug version of the ucrtbase.dll and provides additional
debugging functions.
Specify symbols for all 4 platforms: x86, x64, arm32, arm64.
All symbols in ucrtbase.dll are available also in ucrtbased.dll with one
exception for ARM64 version of ucrtbased.dll. It does not provide
__unDName, __unDNameEx and _is_exception_typeof symbols which are available
in non-debug version ucrtbase.dll.
Signed-off-by: Martin Storsjö <martin@martin.st>
This change just split symbols into two sections, it does not add or delete
any symbol.
It looks like that all newer versions of ucrtbase.dll do not change set of
symbols, they do not add any new or remove any existing.
Signed-off-by: Martin Storsjö <martin@martin.st>
profile/profil.c:140:36: warning: cast between incompatible function types from ‘void (__attribute__((stdcall)) *)(void *)’ to ‘DWORD (__attribute__((stdcall)) *)(void *)’ [-Wcast-function-type]
Callback thread function must return DWORD, not void.
Signed-off-by: LIU Hao <lh_mouse@126.com>
On inclusion of the header `comutil.h` on Cygwin platforms errors such
as:
include/comutil.h:413:3: error: '_variant_t::_variant_t(unsigned int)' cannot be overloaded with '_variant_t::_variant_t(unsigned int)'
, are produced because on Cygwin some methods are duplicates via a type
alias.
Disable these methods under `__CYGWIN__`.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
Every executable references only one of those functions. So if functions
are split into separate files, linker includes only the one which is used.
Replace magic numbers 2 and 1 for DoWildCard by the named enum values.
Remove check for NULL value of StartInfo because StartInfo cannot be NULL.
MS implementation of _(w)getmainargs() requires StartInfo to be valid
pointer and mingw-w64 startup code always calls _(w)getmainargs() with
non-NULL StartInfo.
Signed-off-by: Martin Storsjö <martin@martin.st>
UCRT <new.h> header file exports C functions not only in C++ mode, but also
in C mode. Do same in mingw-w64 <new.h> header file.
Signed-off-by: Martin Storsjö <martin@martin.st>
If the user has hardcoded WINVER to a version number less than
0x0602, while _WIN32_WINNT is set to 0xA00, and NTDDI_VERSION
is larger than NTDDI_WIN10_RS3, we would earlier hide the
definition of POINTER_INPUT_TYPE, but include the declarations
of functions that take a POINTER_INPUT_TYPE parameter,
leading to errors.
Since 6cfc1fd2ca, we would set
NTDDI_VERSION to a higher version, if _WIN32_WINNT is set to 0xA00,
exposing this issue.
Change the nesting of ifdefs; include the block for checking
NTDDI_VERSION in the outer scope checking for WINVER >= 0x602.
That way, if they are set inconsistently, we'd skip the
declaration of the SyntheticPointer functions.
This matches how the ifdefs around these declarations are nested
in WinSDK.
Signed-off-by: Martin Storsjö <martin@martin.st>
mingw-w64-crt/crt/ contains mostly startup files which are part of the
libmingw32.a library or crtX.o object files. But there are also few files
which are either part of libmingwex.a or some CRT import library.
Do cleanup of these few files which are not in libmingw32.a or crtX.o and
move them from mingw-w64-crt/crt/ to mingw-w64-crt/misc/ directory.
So after this change mingw-w64-crt/crt/ will contain only source code for
startup files which are part of the libmingw32.a library or crtX.o object
files.
Signed-off-by: Martin Storsjö <martin@martin.st>
List of symbols is generated from I386, X64, ARM32 and ARM64 versions
of vcruntime140.dll library by gendef and merged to one def.in file.
All versions 14.00 - 14.40 of vcruntime140.dll for specific architecture
contains same set of symbols.
Signed-off-by: Martin Storsjö <martin@martin.st>
Functions _get_errno() and _set_errno() are not available before msvcr80.
mingw-w64 provides emulations of these functions for older msvcr libraries.
But there is no reason to use emulations, just access errno directly which
is implemented as dereferncing return value of _errno() function (which is
available in all CRT libraries).
Signed-off-by: Martin Storsjö <martin@martin.st>
Before this change linker had to statically bundle both _get_errno and
_set_errno functions when only one of them was used. With this change
linker includes only one function if just one is used.
Signed-off-by: Martin Storsjö <martin@martin.st>
There is no global variable named _amblksiz. There is only __p__amblksiz()
function which returns pointer to _amblksiz variable.
Signed-off-by: Martin Storsjö <martin@martin.st>
DATA for symbol assert was removed in commit 713a108e4c ("crt: Use
importlib for _assert."). Remove it from comment too.
Signed-off-by: Martin Storsjö <martin@martin.st>
This matches what WinSDK headers do these days. We always have
_WIN32_WINNT set to a default value of our choice, and there's
no value we can set _WIN32_WINNT to, that would set NTDDI_VERSION
to include the features from newer versions of Windows 10/11,
such as e.g. NTDDI_WIN10_RS1.
Signed-off-by: Martin Storsjö <martin@martin.st>