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>
Warning is:
In file included from misc/delay-f.c:11:
mingw-w64-headers/include/delayimp.h:64: warning: "FACILITY_VISUALCPP" redefined
#define FACILITY_VISUALCPP ((LONG)0x6d)
In file included from mingw-w64-headers/include/winbase.h:2817,
from mingw-w64-headers/include/windows.h:70,
from misc/delay-f.c:10:
mingw-w64-headers/include/winerror.h:88: note: this is the location of the previous definition
#define FACILITY_VISUALCPP 109
This same header from Visual Studio has such a definition commented out,
suggesting that it should be defined in winerror.h. We notice that delayimp.h
can't be used without including Windows SDK headers first, so don't redefine
`FACILITY_VISUALCPP` if one has already been defined.
Signed-off-by: LIU Hao <lh_mouse@126.com>
Warning is:
In file included from mingw-w64-headers/include/windows.h:70,
from libsrc/dxerr.c:15,
from libsrc/dxerr8w.c:20:
mingw-w64-headers/include/winbase.h:2171: warning: "FindResource" redefined
#define FindResource __MINGW_NAME_AW(FindResource)
In file included from mingw-w64-headers/include/winbase.h:24,
from mingw-w64-headers/include/windows.h:70,
from libsrc/dxerr.c:15,
from libsrc/dxerr8w.c:20:
mingw-w64-headers/include/libloaderapi.h:62: note: this is the location of the previous definition
#define FindResource FindResourceW
Fix it by conditionally defining FindResource in winbase.h directly as
FindResourceA for non-UNICODE builds and let libloaderapi.h to define
FindResource as FindResourceW for UNICODE builds.
Signed-off-by: LIU Hao <lh_mouse@126.com>
Warning is:
In file included from mingw-w64-headers/include/windows.h:70,
from crt/crtexewin.c:6,
from crt/ucrtexewin.c:14:
mingw-w64-headers/include/winbase.h:2084: warning: "EnumResourceNames" redefined
#define EnumResourceNames __MINGW_NAME_AW(EnumResourceNames)
In file included from mingw-w64-headers/include/winbase.h:24,
from mingw-w64-headers/include/windows.h:70,
from crt/crtexewin.c:6,
from crt/ucrtexewin.c:14:
mingw-w64-headers/include/libloaderapi.h:80: note: this is the location of the previous definition
#define EnumResourceNames EnumResourceNamesW
Fix it by conditionally defining EnumResourceNames in winbase.h directly as
EnumResourceNamesA for non-UNICODE builds and let libloaderapi.h to define
EnumResourceNames as EnumResourceNamesW for UNICODE builds.
libloaderapi.h is automatically included in winbase.h, so caller of
winbase.h would have definition of EnumResourceNames for both UNICODE and
non-UNICODE builds.
Caller of libloaderapi.h would have only UNICODE definition of
EnumResourceNames because api-ms-win-core-libraryloader-l1-2-2.def and
kernel32_onecore.def do not provide non-UNICODE EnumResourceNamesA symbol.
Signed-off-by: LIU Hao <lh_mouse@126.com>
Warning is:
In file included from mingw-w64-headers/include/winerror.h:4920,
from mingw-w64-headers/include/winbase.h:2817,
from mingw-w64-headers/include/windows.h:70,
from intrincs/RtlSecureZeroMemory.c:2:
mingw-w64-headers/include/fltwinerror.h:12: warning: "FACILITY_USERMODE_FILTER_MANAGER" redefined
#define FACILITY_USERMODE_FILTER_MANAGER 0x1f
In file included from mingw-w64-headers/include/winbase.h:2817,
from mingw-w64-headers/include/windows.h:70,
from intrincs/RtlSecureZeroMemory.c:2:
mingw-w64-headers/include/winerror.h:38: note: this is the location of the previous definition
#define FACILITY_USERMODE_FILTER_MANAGER 31
WinSDK10 header file fltWinError.h contains #ifndef guard. Do same.
Signed-off-by: LIU Hao <lh_mouse@126.com>