mingw: Update sources to dcd7fefc703fb4b12187235386900d34cc13fdc5.

This commit is contained in:
Alex Rønne Petersen 2024-11-30 13:13:08 +01:00
parent 87083e8e7e
commit 45fff0a511
No known key found for this signature in database
132 changed files with 12551 additions and 3597 deletions

View file

@ -204,6 +204,8 @@ i__leave:
int __cdecl atexit (_PVFV func)
{
/* Do not use msvcrt's atexit() or UCRT's _crt_atexit() function as it
* cannot be called from DLL library which may be unloaded at runtime. */
return _register_onexit_function(&atexit_table, (_onexit_t)func);
}

View file

@ -20,21 +20,12 @@
#include <tchar.h>
#include <sect_attribs.h>
#include <locale.h>
#include <corecrt_startup.h>
#if defined(__SEH__) && (!defined(__clang__) || __clang_major__ >= 7)
#define SEH_INLINE_ASM
#endif
#ifndef __winitenv
extern wchar_t *** __MINGW_IMP_SYMBOL(__winitenv);
#define __winitenv (* __MINGW_IMP_SYMBOL(__winitenv))
#endif
#if !defined(__initenv)
extern char *** __MINGW_IMP_SYMBOL(__initenv);
#define __initenv (* __MINGW_IMP_SYMBOL(__initenv))
#endif
extern IMAGE_DOS_HEADER __ImageBase;
extern void _fpreset (void);
@ -43,6 +34,7 @@ int *__cdecl __p__commode(void);
#undef _fmode
extern int _fmode;
#undef _commode
extern int _commode;
extern int _dowildcard;
@ -334,7 +326,12 @@ static void duplicate_ppstrings (int ac, _TCHAR ***av)
int __cdecl atexit (_PVFV func)
{
return _onexit((_onexit_t)func) ? 0 : -1;
/*
* msvcrt def file renames the real atexit() function to _crt_atexit().
* UCRT provides atexit() function only under name _crt_atexit().
* So redirect call to _crt_atexit() function.
*/
return _crt_atexit(func);
}
char __mingw_module_is_dll = 0;

View file

@ -169,4 +169,4 @@ static void WINAPI tls_callback(HANDLE hDllHandle, DWORD dwReason, LPVOID __UNUS
}
}
_CRTALLOC(".CRT$XLB") PIMAGE_TLS_CALLBACK __xl_b = (PIMAGE_TLS_CALLBACK) tls_callback;
_CRTALLOC(".CRT$XLB") PIMAGE_TLS_CALLBACK __xl_b = tls_callback;

View file

@ -71,9 +71,10 @@ static __CRT_THREAD TlsDtorNode dtor_list_head;
extern int _CRT_MT;
BOOL WINAPI __dyn_tls_init (HANDLE, DWORD, LPVOID);
void WINAPI __dyn_tls_init (HANDLE, DWORD, LPVOID);
void WINAPI __dyn_tls_dtor (HANDLE, DWORD, LPVOID);
BOOL WINAPI
void WINAPI
__dyn_tls_init (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
{
_PVFV *pfunc;
@ -87,7 +88,7 @@ __dyn_tls_init (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
{
if (dwReason == DLL_PROCESS_ATTACH)
__mingw_TLScallback (hDllHandle, dwReason, lpreserved);
return TRUE;
return;
}
ps = (uintptr_t) &__xd_a;
@ -98,11 +99,10 @@ __dyn_tls_init (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
if (*pfunc != NULL)
(*pfunc)();
}
return TRUE;
}
const PIMAGE_TLS_CALLBACK __dyn_tls_init_callback = (const PIMAGE_TLS_CALLBACK) __dyn_tls_init;
_CRTALLOC(".CRT$XLC") PIMAGE_TLS_CALLBACK __xl_c = (PIMAGE_TLS_CALLBACK) __dyn_tls_init;
const PIMAGE_TLS_CALLBACK __dyn_tls_init_callback = __dyn_tls_init;
_CRTALLOC(".CRT$XLC") PIMAGE_TLS_CALLBACK __xl_c = __dyn_tls_init;
int __cdecl __tlregdtor (_PVFV);
@ -133,7 +133,7 @@ __tlregdtor (_PVFV func)
return 0;
}
static BOOL WINAPI
void WINAPI
__dyn_tls_dtor (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
{
#if !defined (DISABLE_MS_TLS)
@ -142,7 +142,7 @@ __dyn_tls_dtor (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
#endif
if (dwReason != DLL_THREAD_DETACH && dwReason != DLL_PROCESS_DETACH)
return TRUE;
return;
/* As TLS variables are detroyed already by DLL_THREAD_DETACH
call, we have to avoid access on the possible DLL_PROCESS_DETACH
call the already destroyed TLS vars.
@ -165,10 +165,9 @@ __dyn_tls_dtor (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
}
#endif
__mingw_TLScallback (hDllHandle, dwReason, lpreserved);
return TRUE;
}
_CRTALLOC(".CRT$XLD") PIMAGE_TLS_CALLBACK __xl_d = (PIMAGE_TLS_CALLBACK) __dyn_tls_dtor;
_CRTALLOC(".CRT$XLD") PIMAGE_TLS_CALLBACK __xl_d = __dyn_tls_dtor;
int __mingw_initltsdrot_force = 0;

View file

@ -1,169 +0,0 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Winline"
#endif
#undef __MSVCRT_VERSION__
#define _UCRT
#define __getmainargs crtimp___getmainargs
#define __wgetmainargs crtimp___wgetmainargs
#define _amsg_exit crtimp__amsg_exit
#define _get_output_format crtimp__get_output_format
#include <internal.h>
#include <sect_attribs.h>
#include <stdio.h>
#include <time.h>
#include <corecrt_startup.h>
#undef __getmainargs
#undef __wgetmainargs
#undef _amsg_exit
#undef _get_output_format
// Declarations of non-static functions implemented within this file (that aren't
// declared in any of the included headers, and that isn't mapped away with a define
// to get rid of the _CRTIMP in headers).
int __cdecl __getmainargs(int * _Argc, char *** _Argv, char ***_Env, int _DoWildCard, _startupinfo *_StartInfo);
int __cdecl __wgetmainargs(int * _Argc, wchar_t *** _Argv, wchar_t ***_Env, int _DoWildCard, _startupinfo *_StartInfo);
void __cdecl __MINGW_ATTRIB_NORETURN _amsg_exit(int ret);
unsigned int __cdecl _get_output_format(void);
int __cdecl __ms_fwprintf(FILE *, const wchar_t *, ...);
// Declarations of functions from ucrtbase.dll that we use below
_CRTIMP int* __cdecl __p___argc(void);
_CRTIMP char*** __cdecl __p___argv(void);
_CRTIMP wchar_t*** __cdecl __p___wargv(void);
_CRTIMP char*** __cdecl __p__environ(void);
_CRTIMP wchar_t*** __cdecl __p__wenviron(void);
_CRTIMP int __cdecl _initialize_narrow_environment(void);
_CRTIMP int __cdecl _initialize_wide_environment(void);
_CRTIMP int __cdecl _configure_narrow_argv(int mode);
_CRTIMP int __cdecl _configure_wide_argv(int mode);
// Declared in new.h, but only visible to C++
_CRTIMP int __cdecl _set_new_mode(int _NewMode);
extern char __mingw_module_is_dll;
// Wrappers with legacy msvcrt.dll style API, based on the new ucrtbase.dll functions.
int __cdecl __getmainargs(int * _Argc, char *** _Argv, char ***_Env, int _DoWildCard, _startupinfo *_StartInfo)
{
_initialize_narrow_environment();
_configure_narrow_argv(_DoWildCard ? 2 : 1);
*_Argc = *__p___argc();
*_Argv = *__p___argv();
*_Env = *__p__environ();
if (_StartInfo)
_set_new_mode(_StartInfo->newmode);
return 0;
}
int __cdecl __wgetmainargs(int * _Argc, wchar_t *** _Argv, wchar_t ***_Env, int _DoWildCard, _startupinfo *_StartInfo)
{
_initialize_wide_environment();
_configure_wide_argv(_DoWildCard ? 2 : 1);
*_Argc = *__p___argc();
*_Argv = *__p___wargv();
*_Env = *__p__wenviron();
if (_StartInfo)
_set_new_mode(_StartInfo->newmode);
return 0;
}
_onexit_t __cdecl _onexit(_onexit_t func)
{
return _crt_atexit((_PVFV)func) == 0 ? func : NULL;
}
_onexit_t __cdecl (*__MINGW_IMP_SYMBOL(_onexit))(_onexit_t func) = _onexit;
int __cdecl at_quick_exit(void (__cdecl *func)(void))
{
// In a DLL, we can't register a function with _crt_at_quick_exit, because
// we can't unregister it when the DLL is unloaded. This matches how
// at_quick_exit/quick_exit work with MSVC with a dynamically linked CRT.
if (__mingw_module_is_dll)
return 0;
return _crt_at_quick_exit(func);
}
int __cdecl (*__MINGW_IMP_SYMBOL(at_quick_exit))(void (__cdecl *)(void)) = at_quick_exit;
void __cdecl __MINGW_ATTRIB_NORETURN _amsg_exit(int ret) {
fprintf(stderr, "runtime error %d\n", ret);
_exit(255);
}
unsigned int __cdecl _get_output_format(void)
{
return 0;
}
// These are required to provide the unrepfixed data symbols "timezone"
// and "tzname"; we can't remap "timezone" via a define due to clashes
// with e.g. "struct timezone".
typedef void __cdecl (*_tzset_func)(void);
extern _tzset_func __MINGW_IMP_SYMBOL(_tzset);
// Default initial values until _tzset has been called; these are the same
// as the initial values in msvcrt/ucrtbase.
static char initial_tzname0[] = "PST";
static char initial_tzname1[] = "PDT";
static char *initial_tznames[] = { initial_tzname0, initial_tzname1 };
static long initial_timezone = 28800;
static int initial_daylight = 1;
char** __MINGW_IMP_SYMBOL(tzname) = initial_tznames;
long * __MINGW_IMP_SYMBOL(timezone) = &initial_timezone;
int * __MINGW_IMP_SYMBOL(daylight) = &initial_daylight;
void __cdecl _tzset(void)
{
__MINGW_IMP_SYMBOL(_tzset)();
// Redirect the __imp_ pointers to the actual data provided by the UCRT.
// From this point, the exposed values should stay in sync.
__MINGW_IMP_SYMBOL(tzname) = _tzname;
__MINGW_IMP_SYMBOL(timezone) = __timezone();
__MINGW_IMP_SYMBOL(daylight) = __daylight();
}
void __cdecl tzset(void)
{
_tzset();
}
// This is called for wchar cases with __USE_MINGW_ANSI_STDIO enabled (where the
// char case just uses fputc).
int __cdecl __ms_fwprintf(FILE *file, const wchar_t *fmt, ...)
{
va_list ap;
int ret;
va_start(ap, fmt);
ret = __stdio_common_vfwprintf(_CRT_INTERNAL_PRINTF_LEGACY_WIDE_SPECIFIERS, file, fmt, NULL, ap);
va_end(ap);
return ret;
}
// Dummy/unused __imp_ wrappers, to make GNU ld not autoexport these symbols.
int __cdecl (*__MINGW_IMP_SYMBOL(__getmainargs))(int *, char ***, char ***, int, _startupinfo *) = __getmainargs;
int __cdecl (*__MINGW_IMP_SYMBOL(__wgetmainargs))(int *, wchar_t ***, wchar_t ***, int, _startupinfo *) = __wgetmainargs;
void __cdecl (*__MINGW_IMP_SYMBOL(_amsg_exit))(int) = _amsg_exit;
unsigned int __cdecl (*__MINGW_IMP_SYMBOL(_get_output_format))(void) = _get_output_format;
void __cdecl (*__MINGW_IMP_SYMBOL(tzset))(void) = tzset;
int __cdecl (*__MINGW_IMP_SYMBOL(__ms_fwprintf))(FILE *, const wchar_t *, ...) = __ms_fwprintf;
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

View file

@ -0,0 +1,585 @@
#include "func.def.in"
#define ADD_UNDERSCORE(symbol) symbol == _ ## symbol
#define ADD_UNDERSCORE_DATA(symbol) symbol DATA == _ ## symbol
#define ADD_UNDERSCORE_DATA_DLL(symbol) symbol DATA == _ ## symbol ## _dll
#define ADD_DOUBLE_UNDERSCORE(symbol) symbol == __ ## symbol
; This is list of symbol aliases from the Visual C++ 1.0 oldnames.lib library
; FIXME: some of these symbol aliases are commented, check and document why
#ifdef UCRTBASE
; access is provided as an alias for __mingw_access
#else
ADD_UNDERSCORE(access)
#endif
#ifndef CRTAPP
; ADD_UNDERSCORE(cgets)
ADD_UNDERSCORE(chdir)
#endif
ADD_UNDERSCORE(chmod)
ADD_UNDERSCORE(chsize)
ADD_UNDERSCORE(close)
#ifndef CRTAPP
; ADD_UNDERSCORE(cprintf)
; ADD_UNDERSCORE(cputs)
#endif
ADD_UNDERSCORE(creat)
#ifndef CRTAPP
; ADD_UNDERSCORE(cscanf)
ADD_UNDERSCORE(cwait)
#endif
#if defined(UCRTBASE)
; daylight variable is provided by misc/ucrt_tzset.c
#elif defined(CRTDLL)
ADD_UNDERSCORE_DATA_DLL(daylight)
#else
ADD_UNDERSCORE_DATA(daylight)
#endif
ADD_UNDERSCORE(dup)
ADD_UNDERSCORE(dup2)
ADD_UNDERSCORE(ecvt)
#if defined(UCRTBASE)
; _environ variable is not available in ucrtbase.dll and there is no replacement for it
#elif defined(CRTDLL)
; ADD_UNDERSCORE_DATA_DLL(environ)
#else
; ADD_UNDERSCORE_DATA(environ)
#endif
ADD_UNDERSCORE(eof)
#ifndef CRTAPP
ADD_UNDERSCORE(execl)
ADD_UNDERSCORE(execle)
ADD_UNDERSCORE(execlp)
ADD_UNDERSCORE(execlpe)
ADD_UNDERSCORE(execv)
ADD_UNDERSCORE(execve)
ADD_UNDERSCORE(execvp)
ADD_UNDERSCORE(execvpe)
#endif
ADD_UNDERSCORE(fcloseall)
ADD_UNDERSCORE(fcvt)
ADD_UNDERSCORE(fdopen)
ADD_UNDERSCORE(fgetchar)
ADD_UNDERSCORE(filelength)
ADD_UNDERSCORE(fileno)
; ADD_UNDERSCORE(flushall)
ADD_UNDERSCORE(fputchar)
#ifdef FIXED_SIZE_SYMBOLS
#ifndef CRTDLL
ADD_UNDERSCORE(fstat)
#endif
#else
F32(fstat == _fstat32)
F64(fstat == _fstat64i32)
#endif
#ifdef FIXED_SIZE_SYMBOLS
ADD_UNDERSCORE(ftime)
#else
F32(ftime == _ftime32)
F64(ftime == _ftime64)
#endif
#if defined(UCRTBASE)
; HUGE alias and _HUGE variable are provided by math/_huge.c
#elif defined(CRTDLL)
ADD_UNDERSCORE_DATA_DLL(HUGE)
#else
ADD_UNDERSCORE_DATA(HUGE)
#endif
ADD_UNDERSCORE(gcvt)
#ifndef CRTAPP
ADD_UNDERSCORE(getch)
ADD_UNDERSCORE(getche)
ADD_UNDERSCORE(getcwd)
#endif
#ifdef UCRTBASE
; ucrtbase.dll has got _getpid for all archs
ADD_UNDERSCORE(getpid)
#elif !defined(CRTAPP)
; msvcrt.dll for arm/arm64 lacks _getpid
F_X86_ANY(ADD_UNDERSCORE(getpid))
#endif
#ifndef CRTAPP
ADD_UNDERSCORE(getw)
#endif
ADD_UNDERSCORE(isatty)
ADD_UNDERSCORE(itoa)
#ifndef CRTAPP
ADD_UNDERSCORE(kbhit)
#endif
ADD_UNDERSCORE(lfind)
; ADD_UNDERSCORE(locking)
ADD_UNDERSCORE(lsearch)
ADD_UNDERSCORE(lseek)
ADD_UNDERSCORE(ltoa)
ADD_UNDERSCORE(memccpy)
ADD_UNDERSCORE(memicmp)
ADD_UNDERSCORE(mkdir)
ADD_UNDERSCORE(mktemp)
; onexit function alias is provided by misc/_onexit.c
ADD_UNDERSCORE(open)
#ifndef CRTAPP
ADD_UNDERSCORE(putch)
ADD_UNDERSCORE(putenv)
#endif
ADD_UNDERSCORE(putw)
ADD_UNDERSCORE(read)
ADD_UNDERSCORE(rmdir)
ADD_UNDERSCORE(rmtmp)
ADD_UNDERSCORE(setmode)
ADD_UNDERSCORE(sopen)
#ifndef CRTAPP
ADD_UNDERSCORE(spawnl)
ADD_UNDERSCORE(spawnle)
ADD_UNDERSCORE(spawnlp)
ADD_UNDERSCORE(spawnlpe)
ADD_UNDERSCORE(spawnv)
ADD_UNDERSCORE(spawnve)
ADD_UNDERSCORE(spawnvp)
ADD_UNDERSCORE(spawnvpe)
#endif
#ifndef CRTDLL
; stat is provided by mingw to workaround trailing slash issue in _stat
#endif
#ifdef NO_STRCMPI_ALIAS
; Symbol _strcmpi is natively present and defined in the library def file
; So define strcmpi as an alias to _strcmpi
ADD_UNDERSCORE(strcmpi)
#else
; Symbol _strcmpi is not present in the library, it provides only _stricmp symbol
; So define strcmpi as an alias to _stricmp
strcmpi == _stricmp
#endif
ADD_UNDERSCORE(strdup)
ADD_UNDERSCORE(stricmp)
ADD_UNDERSCORE(strlwr)
ADD_UNDERSCORE(strnicmp)
ADD_UNDERSCORE(strnset)
ADD_UNDERSCORE(strrev)
ADD_UNDERSCORE(strset)
ADD_UNDERSCORE(strupr)
ADD_UNDERSCORE(swab)
#if defined(UCRTBASE)
; _sys_errlist variable is not available in ucrtbase.dll and there is no replacement for it
#else
// sys_errlist variable is without _dll suffix in crtdll.dll
; ADD_UNDERSCORE_DATA(sys_errlist)
#endif
#if defined(UCRTBASE)
; _sys_nerr variable is not available in ucrtbase.dll and there is no replacement for it
#elif defined(CRTDLL)
; ADD_UNDERSCORE_DATA_DLL(sys_nerr)
#else
; ADD_UNDERSCORE_DATA(sys_nerr)
#endif
ADD_UNDERSCORE(tell)
ADD_UNDERSCORE(tempnam)
#if defined(UCRTBASE)
; timezone variable is provided by misc/ucrt_tzset.c
#elif defined(CRTDLL)
ADD_UNDERSCORE_DATA_DLL(timezone)
#else
ADD_UNDERSCORE_DATA(timezone)
#endif
#if defined(UCRTBASE)
; tzname variable is provided by misc/ucrt_tzset.c
#else
// tzname variable is without _dll suffix in crtdll.dll
ADD_UNDERSCORE_DATA(tzname)
#endif
#if defined(UCRTBASE)
; tzset function is provided by misc/ucrt_tzset.c
#else
ADD_UNDERSCORE(tzset)
#endif
; ADD_UNDERSCORE(ultoa)
ADD_UNDERSCORE(umask)
#ifndef CRTAPP
ADD_UNDERSCORE(ungetch)
#endif
ADD_UNDERSCORE(unlink)
#ifdef FIXED_SIZE_SYMBOLS
ADD_UNDERSCORE(utime)
#else
F32(utime == _utime32)
F64(utime == _utime64)
#endif
ADD_UNDERSCORE(write)
; This is list of symbol aliases added in the Visual C++ 2.0 oldnames.lib library
; All these symbols with leading underscore are present also in pre-2.0 CRT versions: crtdll.dll and msvcrt10.dll
; ADD_UNDERSCORE(control87)
; ADD_UNDERSCORE(fpreset) ; Alias fpreset is set in CRT_fp10.c and CRT_fp8.c
ADD_UNDERSCORE(wcsdup)
ADD_UNDERSCORE(wcsicmp)
ADD_UNDERSCORE(wcsicoll)
ADD_UNDERSCORE(wcslwr)
ADD_UNDERSCORE(wcsnicmp)
ADD_UNDERSCORE(wcsnset)
ADD_UNDERSCORE(wcsrev)
ADD_UNDERSCORE(wcsset)
ADD_UNDERSCORE(wcsupr)
; This is list of symbol aliases added in the Visual C++ 4.0 oldnames.lib library
; All these symbols with leading underscore are present also in pre-4.0 CRT versions: crtdll.dll, msvcrt10.dll and msvcrt20.dll
; ADD_UNDERSCORE(cabs)
ADD_UNDERSCORE(hypot)
ADD_UNDERSCORE(j0)
ADD_UNDERSCORE(j1)
ADD_UNDERSCORE(jn)
ADD_UNDERSCORE(y0)
ADD_UNDERSCORE(y1)
ADD_UNDERSCORE(yn)
; This is list of symbol aliases for C95 functions
#ifdef USE_WCSTOK_S_FOR_WCSTOK
wcstok == wcstok_s
#endif
; This is list of symbol aliases for C99 functions
; ADD_UNDERSCORE(logb)
#ifdef WITH_NEXTAFTER_ALIAS
ADD_UNDERSCORE(nextafter)
#endif
#if defined(DEF_ARM32) || defined(DEF_ARM64)
; This is list of symbol aliases for C99 ARM long double functions
; They are defined as aliases to regular double symbols as on ARM, long double is equal to regular double
acosl == acos
asinl == asin
atan2l == atan2
atanl == atan
ceill == ceil
cosl == cos
expl == exp
floorl == floor
fmodl == fmod
log10l == log10
logl == log
; FIXME: Why is powl alias defined only for UCRT?
#ifdef UCRTBASE
powl == pow
#endif
sinl == sin
tanl == tan
#endif
; This is list of symbol aliases for C11 functions
#ifdef UCRTBASE
F32(timespec_get == _timespec32_get)
F64(timespec_get == _timespec64_get)
#endif
; This is list of symbol aliases for POSIX functions
ADD_DOUBLE_UNDERSCORE(isascii)
ADD_DOUBLE_UNDERSCORE(toascii)
#ifndef CRTAPP
ADD_UNDERSCORE(pclose)
ADD_UNDERSCORE(popen)
#endif
; ADD_UNDERSCORE(scalb)
; This is list of symbol aliases for Large File Specification (extension to Single UNIX Specification)
#ifndef NO_FPOS64_ALIASES
; fgetpos and fsetpos are already 64-bit
fgetpos64 == fgetpos
fsetpos64 == fsetpos
#endif
; This is list of symbol aliases for GNU functions which are not part of POSIX or ISO C
strcasecmp == _stricmp
strncasecmp == _strnicmp
; This is list of various symbol aliases which are needed for compatibility
; Some symbols in some version of CRT library were added and some other symbols were removed or renamed
; This list provides some level of backward and forward compatibility
#ifndef NO_STRCMPI_ALIAS
_strcmpi == _stricmp
#endif
#ifdef WITH_IOB_FUNC_ALIAS
__iob_func == __p__iob
#endif
#ifdef WITH_TZ_ALIASES
__daylight == __p__daylight
#ifndef NO_DSTBIAS
__dstbias == __p__dstbias
#endif
__timezone == __p__timezone
__tzname == __p__tzname
#endif
#ifdef WITH_ATOLL_ALIAS
atoll == _atoi64
_wtoll == _wtoi64
#endif
#ifdef WITH_ATOLL_L_ALIAS
_atoll_l == _atoi64_l
_wtoll_l == _wtoi64_l
#endif
#ifdef WITH_LLABS_ALIAS
llabs == _abs64
imaxabs == _abs64
#elif defined(WITH_IMAXABS_ALIAS)
imaxabs == llabs
#endif
#ifdef WITH_IMAXDIV_ALIAS
imaxdiv == lldiv
#endif
#ifdef WITH_STRTO64_ALIAS
strtoll == _strtoi64
strtoull == _strtoui64
strtoimax == _strtoi64
strtoumax == _strtoui64
wcstoll == _wcstoi64
wcstoull == _wcstoui64
wcstoimax == _wcstoi64
wcstoumax == _wcstoui64
#endif
#ifdef WITH_STRTO64_L_ALIAS
_strtoll_l == _strtoi64_l
_strtoull_l == _strtoui64_l
_strtoimax_l == _strtoi64_l
_strtoumax_l == _strtoui64_l
_wcstoll_l == _wcstoi64_l
_wcstoull_l == _wcstoui64_l
_wcstoimax_l == _wcstoi64_l
_wcstoumax_l == _wcstoui64_l
#endif
; This is list of find symbol aliases, every CRT library has either find symbols with SIZE suffix or without them
#ifdef FIXED_SIZE_SYMBOLS
F32(_findfirst32 == _findfirst)
F64(_findfirst64i32 == _findfirst)
#ifndef NO_I64_FIXED_SIZE
F32(_findfirst32i64 == _findfirsti64)
#ifndef NO_FIXED_SIZE_64_ALIAS
F64(_findfirst64 == _findfirsti64)
#endif
#endif
F32(_findnext32 == _findnext)
F64(_findnext64i32 == _findnext)
#ifndef NO_I64_FIXED_SIZE
F32(_findnext32i64 == _findnexti64)
#ifndef NO_FIXED_SIZE_64_ALIAS
F64(_findnext64 == _findnexti64)
#endif
#endif
#ifndef NO_WIDE_FIXED_SIZE
F32(_wfindfirst32 == _wfindfirst)
F64(_wfindfirst64i32 == _wfindfirst)
#ifndef NO_I64_FIXED_SIZE
F32(_wfindfirst32i64 == _wfindfirsti64)
#ifndef NO_FIXED_SIZE_64_ALIAS
F64(_wfindfirst64 == _wfindfirsti64)
#endif
#endif
F32(_wfindnext32 == _wfindnext)
F64(_wfindnext64i32 == _wfindnext)
#ifndef NO_I64_FIXED_SIZE
F32(_wfindnext32i64 == _wfindnexti64)
#ifndef NO_FIXED_SIZE_64_ALIAS
F64(_wfindnext64 == _wfindnexti64)
#endif
#endif
#endif
#else
F32(_findfirst == _findfirst32)
F64(_findfirst == _findfirst64i32)
F32(_findfirsti64 == _findfirst32i64)
F64(_findfirsti64 == _findfirst64)
F32(_findnext == _findnext32)
F64(_findnext == _findnext64i32)
F32(_findnexti64 == _findnext32i64)
F64(_findnexti64 == _findnext64)
F32(_wfindfirst == _wfindfirst32)
F64(_wfindfirst == _wfindfirst64i32)
F32(_wfindfirsti64 == _wfindfirst32i64)
F64(_wfindfirsti64 == _wfindfirst64)
F32(_wfindnext == _wfindnext32)
F64(_wfindnext == _wfindnext64i32)
F32(_wfindnexti64 == _wfindnext32i64)
F64(_wfindnexti64 == _wfindnext64)
#endif
; This is list of stat symbol aliases, every CRT library has either stat symbols with SIZE suffix or without them
#ifdef FIXED_SIZE_SYMBOLS
#ifndef CRTDLL
F32(_fstat32 == _fstat)
#endif
F64(_fstat64i32 == _fstat)
#ifndef NO_I64_FIXED_SIZE
F32(_fstat32i64 == _fstati64)
#ifndef NO_FIXED_SIZE_64_ALIAS
F64(_fstat64 == _fstati64)
#endif
#endif
#ifndef CRTDLL
F32(_stat32 == _stat)
#endif
F64(_stat64i32 == _stat)
#ifndef NO_I64_FIXED_SIZE
F32(_stat32i64 == _stati64)
#ifndef NO_FIXED_SIZE_64_ALIAS
F64(_stat64 == _stati64)
#endif
#endif
#ifndef NO_WIDE_FIXED_SIZE
F32(_wstat32 == _wstat)
F64(_wstat64i32 == _wstat)
#ifndef NO_I64_FIXED_SIZE
F32(_wstat32i64 == _wstati64)
#ifndef NO_FIXED_SIZE_64_ALIAS
F64(_wstat64 == _wstati64)
#endif
#endif
#endif
#else
F32(_fstat == _fstat32)
F64(_fstat == _fstat64i32)
F32(_fstati64 == _fstat32i64)
F64(_fstati64 == _fstat64)
F32(_stat == _stat32)
F64(_stat == _stat64i32)
F32(_stati64 == _stat32i64)
F64(_stati64 == _stat64)
F32(_wstat == _wstat32)
F64(_wstat == _wstat64i32)
F32(_wstati64 == _wstat32i64)
F64(_wstati64 == _wstat64)
#endif
; This is list of time symbol aliases, every CRT library except msvcrt.dll has either time symbols with SIZE suffix or without them
#ifndef NO_TIME_ALIAS
#ifdef FIXED_SIZE_SYMBOLS
F32(_ctime32 == ctime)
F64(_ctime64 == ctime)
F32(_difftime32 == difftime)
F64(_difftime64 == difftime)
F32(_ftime32 == _ftime)
F64(_ftime64 == _ftime)
F32(_futime32 == _futime)
F64(_futime64 == _futime)
F32(_gmtime32 == gmtime)
F64(_gmtime64 == gmtime)
F32(_localtime32 == localtime)
F64(_localtime64 == localtime)
; Skip _mkgmtime as it is present only in msvcrt.dll
F32(_mktime32 == mktime)
F64(_mktime64 == mktime)
F32(_time32 == time)
F64(_time64 == time)
F32(_utime32 == _utime)
F64(_utime64 == _utime)
#ifndef NO_WIDE_FIXED_SIZE
F32(_wctime32 == _wctime)
F64(_wctime64 == _wctime)
F32(_wutime32 == _wutime)
F64(_wutime64 == _wutime)
#endif
#else
F32(ctime == _ctime32)
F64(ctime == _ctime64)
F32(difftime == _difftime32)
F64(difftime == _difftime64)
F32(_ftime == _ftime32)
F64(_ftime == _ftime64)
F32(_futime == _futime32)
F64(_futime == _futime64)
F32(gmtime == _gmtime32)
F64(gmtime == _gmtime64)
F32(localtime == _localtime32)
F64(localtime == _localtime64)
F32(_mkgmtime == _mkgmtime32)
F64(_mkgmtime == _mkgmtime64)
F32(mktime == _mktime32)
F64(mktime == _mktime64)
F32(time == _time32)
F64(time == _time64)
F32(_utime == _utime32)
F64(_utime == _utime64)
F32(_wctime == _wctime32)
F64(_wctime == _wctime64)
F32(_wutime == _wutime32)
F64(_wutime == _wutime64)
#endif
#endif
; This is list of symbols which are present in msvcrt but not in UCRT
#ifdef UCRTBASE
__lconv_init == __initialize_lconv_for_unsigned_char
__set_app_type == _set_app_type
__p__daylight == __daylight
__p__dstbias == __dstbias
__p__timezone == __timezone
__p__tzname == __tzname
#endif
; This is list of printf/scanf symbol aliases with __ms_ prefix
#ifndef UCRTBASE
__ms_fprintf == fprintf
__ms_fscanf == fscanf
__ms_fwprintf == fwprintf
__ms_fwscanf == fwscanf
__ms_printf == printf
__ms_scanf == scanf
__ms_sprintf == sprintf
__ms_sscanf == sscanf
#ifdef PRE_C95_SWPRINTF
__ms_swprintf == swprintf
#else
__ms_swprintf == _swprintf
#endif
__ms_swscanf == swscanf
__ms_vfprintf == vfprintf
__ms_vfwprintf == vfwprintf
__ms_vprintf == vprintf
__ms_vsprintf == vsprintf
#ifdef PRE_C95_SWPRINTF
__ms_vswprintf == vswprintf
#else
__ms_vswprintf == _vswprintf
#endif
__ms_vwprintf == vwprintf
__ms_wprintf == wprintf
__ms_wscanf == wscanf
#endif
; This is list of additional symbol aliases not available in any library as neither native symbols nor aliases
; FIXME: check if these really are needed
; Origin of the symbol wcscmpi is unknown. This symbol is not present in
; crtdll.dll and neither in any msvcr* version. The only source of wcscmpi is
; wcstr.h header file from the Microsoft Visual C++ 1.0 (32-bit for NT) and
; Microsoft Windows NT 3.1 SDK where wcscmpi and _wcscmpi are defined as
; macros which expand to _wcsicmp. So the raw wcscmpi is not linkable symbol
; even in the old Visual C++ versions.
wcscmpi == _wcsicmp
; Origin of these symbols is unknown too.
ADD_UNDERSCORE(chgsign)
ADD_UNDERSCORE(fgetwchar)
ADD_UNDERSCORE(finite)
ADD_UNDERSCORE(fpclass)
ADD_UNDERSCORE(fputwchar)
#ifndef CRTAPP
ADD_UNDERSCORE(heapwalk)
#endif
ADD_DOUBLE_UNDERSCORE(iscsymf)
ADD_DOUBLE_UNDERSCORE(iscsym)
#ifndef CRTAPP
ADD_UNDERSCORE(searchenv)
#endif
ADD_UNDERSCORE(stricoll)
#ifndef UCRTBASE
ADD_UNDERSCORE(vsnprintf_s)
#endif
#ifndef CRTAPP
ADD_UNDERSCORE(wpopen)
#endif

View file

@ -1,3 +1,6 @@
#ifndef FUNC_DEF_IN
#define FUNC_DEF_IN
// F32 - function available on all 32 bit architectures
// F64 - function available on all 64 bit architectures
// F_X86_ANY - function available on i386 and x86_64
@ -7,25 +10,35 @@
// F_ARM64 - function available only on arm64
// F_ARM_ANY - function available on 32 and 64 bit arm
// F_NON_I386 - function available on everything but i386
// F_NON_X64 - function available on everything but x86_64
// F_NON_ARM64 - function available on everything but arm64
#if defined(DEF_X64)
#define F64(x) x
#define F_X64(x) x
#define F_X86_ANY(x) x
#define F_NON_I386(x) x
#define F_NON_ARM64(x) x
#elif defined(DEF_I386)
#define F32(x) x
#define F_I386(x) x
#define F_X86_ANY(x) x
#define F_NON_X64(x) x
#define F_NON_ARM64(x) x
#elif defined(DEF_ARM32)
#define F32(x) x
#define F_ARM32(x) x
#define F_ARM_ANY(x) x
#define F_NON_I386(x) x
#define F_NON_X64(x) x
#define F_NON_ARM64(x) x
#elif defined(DEF_ARM64)
#define F64(x) x
#define F_ARM64(x) x
#define F_ARM_ANY(x) x
#define F_NON_I386(x) x
#define F_NON_X64(x) x
#else
#error No DEF_<ARCH> is defined
#endif
#ifndef F32
@ -55,3 +68,16 @@
#ifndef F_NON_I386
#define F_NON_I386(x)
#endif
#ifndef F_NON_X64
#define F_NON_X64(x)
#endif
#ifndef F_NON_ARM64
#define F_NON_ARM64(x)
#endif
#if defined(DEF_I386)
#define STDCALL_DECORATED_EXPORT(symbol) symbol == _ ## symbol
#define FASTCALL_DECORATED_EXPORT(symbol) symbol == symbol
#endif
#endif // FUNC_DEF_IN

View file

@ -1,154 +0,0 @@
#include "func.def.in"
#define ADD_UNDERSCORE(symbol) symbol == _ ## symbol
#define ADD_DOUBLE_UNDERSCORE(symbol) symbol == __ ## symbol
ADD_DOUBLE_UNDERSCORE(iscsymf)
ADD_DOUBLE_UNDERSCORE(iscsym)
ADD_DOUBLE_UNDERSCORE(isascii)
ADD_DOUBLE_UNDERSCORE(toascii)
wcscmpi == _wcsicmp
strcasecmp == _stricmp
strncasecmp == _strnicmp
#ifdef UCRTBASE
; access is provided as an alias for __mingw_access
#else
ADD_UNDERSCORE(access)
#endif
ADD_UNDERSCORE(chdir)
ADD_UNDERSCORE(chmod)
ADD_UNDERSCORE(chsize)
ADD_UNDERSCORE(close)
ADD_UNDERSCORE(creat)
ADD_UNDERSCORE(cwait)
ADD_UNDERSCORE(dup)
ADD_UNDERSCORE(dup2)
ADD_UNDERSCORE(ecvt)
ADD_UNDERSCORE(eof)
ADD_UNDERSCORE(execl)
ADD_UNDERSCORE(execle)
ADD_UNDERSCORE(execlp)
ADD_UNDERSCORE(execlpe)
ADD_UNDERSCORE(execv)
ADD_UNDERSCORE(execve)
ADD_UNDERSCORE(execvp)
ADD_UNDERSCORE(execvpe)
ADD_UNDERSCORE(fcloseall)
ADD_UNDERSCORE(fcvt)
ADD_UNDERSCORE(fdopen)
ADD_UNDERSCORE(fgetchar)
ADD_UNDERSCORE(fgetwchar)
ADD_UNDERSCORE(filelength)
ADD_UNDERSCORE(fileno)
; Alias fpreset is set in CRT_fp10.c and CRT_fp8.c.
; ADD_UNDERSCORE(fpreset)
ADD_UNDERSCORE(fputchar)
ADD_UNDERSCORE(fputwchar)
; ADD_UNDERSCORE(fstat)
; ADD_UNDERSCORE(ftime)
ADD_UNDERSCORE(gcvt)
ADD_UNDERSCORE(getch)
ADD_UNDERSCORE(getche)
ADD_UNDERSCORE(getcwd)
#ifdef UCRTBASE
; ucrtbase.dll has got _getpid for all archs
ADD_UNDERSCORE(getpid)
#elif !defined(NO_GETPID_ALIAS)
; msvcrt.dll for arm/arm64 lacks _getpid
F_X86_ANY(ADD_UNDERSCORE(getpid))
#endif
ADD_UNDERSCORE(getw)
ADD_UNDERSCORE(heapwalk)
ADD_UNDERSCORE(isatty)
ADD_UNDERSCORE(itoa)
ADD_UNDERSCORE(kbhit)
ADD_UNDERSCORE(lfind)
ADD_UNDERSCORE(lsearch)
ADD_UNDERSCORE(lseek)
ADD_UNDERSCORE(ltoa)
ADD_UNDERSCORE(memccpy)
ADD_UNDERSCORE(memicmp)
ADD_UNDERSCORE(mkdir)
ADD_UNDERSCORE(mktemp)
ADD_UNDERSCORE(open)
ADD_UNDERSCORE(pclose)
ADD_UNDERSCORE(popen)
ADD_UNDERSCORE(putch)
ADD_UNDERSCORE(putenv)
ADD_UNDERSCORE(putw)
ADD_UNDERSCORE(read)
ADD_UNDERSCORE(rmdir)
ADD_UNDERSCORE(rmtmp)
ADD_UNDERSCORE(searchenv)
ADD_UNDERSCORE(setmode)
ADD_UNDERSCORE(sopen)
ADD_UNDERSCORE(spawnl)
ADD_UNDERSCORE(spawnle)
ADD_UNDERSCORE(spawnlp)
ADD_UNDERSCORE(spawnlpe)
ADD_UNDERSCORE(spawnv)
ADD_UNDERSCORE(spawnve)
ADD_UNDERSCORE(spawnvp)
ADD_UNDERSCORE(spawnvpe)
; ADD_UNDERSCORE(stat)
#ifndef UCRTBASE
ADD_UNDERSCORE(strcmpi)
#endif
ADD_UNDERSCORE(strdup)
ADD_UNDERSCORE(stricmp)
ADD_UNDERSCORE(stricoll)
ADD_UNDERSCORE(strlwr)
ADD_UNDERSCORE(strnicmp)
ADD_UNDERSCORE(strnset)
ADD_UNDERSCORE(strrev)
ADD_UNDERSCORE(strset)
ADD_UNDERSCORE(strupr)
ADD_UNDERSCORE(swab)
ADD_UNDERSCORE(tell)
ADD_UNDERSCORE(tempnam)
#ifndef UCRTBASE
ADD_UNDERSCORE(tzset)
#endif
ADD_UNDERSCORE(umask)
ADD_UNDERSCORE(ungetch)
ADD_UNDERSCORE(unlink)
#ifndef UCRTBASE
ADD_UNDERSCORE(utime)
#endif
ADD_UNDERSCORE(wcsdup)
ADD_UNDERSCORE(wcsicmp)
ADD_UNDERSCORE(wcsicoll)
ADD_UNDERSCORE(wcslwr)
ADD_UNDERSCORE(wcsnicmp)
ADD_UNDERSCORE(wcsnset)
ADD_UNDERSCORE(wcsrev)
ADD_UNDERSCORE(wcsset)
ADD_UNDERSCORE(wcsupr)
ADD_UNDERSCORE(wpopen)
ADD_UNDERSCORE(write)
; non-ANSI functions declared in math.h
ADD_UNDERSCORE(j0)
ADD_UNDERSCORE(j1)
ADD_UNDERSCORE(jn)
ADD_UNDERSCORE(y0)
ADD_UNDERSCORE(y1)
ADD_UNDERSCORE(yn)
ADD_UNDERSCORE(chgsign)
; ADD_UNDERSCORE(scalb)
ADD_UNDERSCORE(finite)
ADD_UNDERSCORE(fpclass)
; C99 functions
; ADD_UNDERSCORE(cabs)
ADD_UNDERSCORE(hypot)
; ADD_UNDERSCORE(logb)
ADD_UNDERSCORE(nextafter)
#ifndef UCRTBASE
daylight DATA == _daylight
timezone DATA == _timezone
tzname DATA == _tzname
ADD_UNDERSCORE(vsnprintf_s)
#endif

View file

@ -59,7 +59,7 @@ extern "C" {
#define _tm_unicode_safe(i) (_pioinfo_safe(i)->unicode)
#ifndef __badioinfo
extern ioinfo ** __MINGW_IMP_SYMBOL(__badioinfo)[];
extern ioinfo * __MINGW_IMP_SYMBOL(__badioinfo);
#define __badioinfo (* __MINGW_IMP_SYMBOL(__badioinfo))
#endif
@ -96,17 +96,13 @@ extern "C" {
extern int _dowildcard;
extern int _newmode;
#ifndef __winitenv
extern wchar_t *** __MINGW_IMP_SYMBOL(__winitenv);
#define __winitenv (* __MINGW_IMP_SYMBOL(__winitenv))
#endif
_CRTIMP wchar_t *** __cdecl __p___winitenv(void);
#define __winitenv (*__p___winitenv())
#if !defined(__initenv)
extern char *** __MINGW_IMP_SYMBOL(__initenv);
#define __initenv (* __MINGW_IMP_SYMBOL(__initenv))
#endif
_CRTIMP char *** __cdecl __p___initenv(void);
#define __initenv (*__p___initenv())
_CRTIMP void __cdecl _amsg_exit(int);
_CRTIMP void __cdecl _amsg_exit(int) __MINGW_ATTRIB_NORETURN;
int __CRTDECL _setargv(void);
int __CRTDECL __setargv(void);
@ -150,6 +146,14 @@ extern char *** __MINGW_IMP_SYMBOL(__initenv);
PIMAGE_SECTION_HEADER __cdecl _FindPESection (PBYTE pImageBase, DWORD_PTR rva);
BOOL __cdecl _IsNonwritableInCurrentImage (PBYTE pTarget);
#if defined(__SSE__)
# define __mingw_has_sse() 1
#elif defined(__i386__)
int __mingw_has_sse(void);
#else
# define __mingw_has_sse() 0
#endif
#ifdef __cplusplus
}
#endif

View file

@ -47,7 +47,7 @@ _strtoi64
_strtoi64_l
_strtoimax_l
_strtol_l
_strtold_l
F_ARM_ANY(_strtold_l) ; Can't use long double functions from the CRT on x86
_strtoll_l
_strtoui64
_strtoui64_l
@ -68,7 +68,7 @@ _wcstoi64
_wcstoi64_l
_wcstoimax_l
_wcstol_l
_wcstold_l
F_ARM_ANY(_wcstold_l) ; Can't use long double functions from the CRT on x86
_wcstoll_l
_wcstombs_l
_wcstombs_s_l
@ -108,8 +108,7 @@ strtod
strtof
strtoimax
strtol
; Can't use long double functions from the CRT on x86
F_ARM_ANY(strtold)
F_ARM_ANY(strtold) ; Can't use long double functions from the CRT on x86
strtoll
strtoul
strtoull
@ -122,8 +121,7 @@ wcstod
wcstof
wcstoimax
wcstol
; Can't use long double functions from the CRT on x86
F_ARM_ANY(wcstold)
F_ARM_ANY(wcstold) ; Can't use long double functions from the CRT on x86
wcstoll
wcstombs
wcstombs_s

View file

@ -1,79 +0,0 @@
LIBRARY api-ms-win-crt-filesystem-l1-1-0
EXPORTS
_access
; access is provided as an alias for __mingw_access
; access == _access
_access_s
_chdir
chdir == _chdir
_chdrive
_chmod
chmod == _chmod
_findclose
_findfirst == _findfirst64
_findfirst32
_findfirst32i64
_findfirst64
_findfirst64i32
_findnext == _findnext64
_findnext32
_findnext32i64
_findnext64
_findnext64i32
_fstat32
_fstat32i64
_fstat64
_fstat64i32
_fullpath
_getdiskfree
_getdrive
_getdrives
_lock_file
_makepath
_makepath_s
_mkdir
mkdir == _mkdir
_rmdir
rmdir == _rmdir
_splitpath
_splitpath_s
_stat32
_stat32i64
_stat64
_stat64i32
_umask
umask == _umask
_umask_s
_unlink
unlink == _unlink
_unlock_file
_waccess
_waccess_s
_wchdir
_wchmod
_wfindfirst32
_wfindfirst32i64
_wfindfirst64
_wfindfirst64i32
_wfindnext32
_wfindnext32i64
_wfindnext64
_wfindnext64i32
_wfullpath
_wmakepath
_wmakepath_s
_wmkdir
_wremove
_wrename
_wrmdir
_wsplitpath
_wsplitpath_s
_wstat32
_wstat32i64
_wstat64
_wstat64i32
_wunlink
remove
rename

View file

@ -0,0 +1,109 @@
LIBRARY api-ms-win-crt-filesystem-l1-1-0
EXPORTS
#include "func.def.in"
_access
; access is provided as an alias for __mingw_access
; access == _access
_access_s
_chdir
chdir == _chdir
_chdrive
_chmod
chmod == _chmod
_findclose
F32(_findfirst == _findfirst32)
F64(_findfirst == _findfirst64i32)
F32(_findfirsti64 == _findfirst32i64)
F64(_findfirsti64 == _findfirst64)
_findfirst32
_findfirst32i64
_findfirst64
_findfirst64i32
F32(_findnext == _findnext32)
F64(_findnext == _findnext64i32)
F32(_findnexti64 == _findnext32i64)
F64(_findnexti64 == _findnext64)
_findnext32
_findnext32i64
_findnext64
_findnext64i32
F32(fstat == _fstat32)
F64(fstat == _fstat64i32)
F32(_fstat == _fstat32)
F64(_fstat == _fstat64i32)
F32(_fstati64 == _fstat32i64)
F64(_fstati64 == _fstat64)
_fstat32
_fstat32i64
_fstat64
_fstat64i32
_fullpath
_getdiskfree
_getdrive
_getdrives
_lock_file
_makepath
_makepath_s
_mkdir
mkdir == _mkdir
_rmdir
rmdir == _rmdir
_splitpath
_splitpath_s
F32(_stat == _stat32)
F64(_stat == _stat64i32)
F32(_stati64 == _stat32i64)
F64(_stati64 == _stat64)
_stat32
_stat32i64
_stat64
_stat64i32
_umask
umask == _umask
_umask_s
_unlink
unlink == _unlink
_unlock_file
_waccess
_waccess_s
_wchdir
_wchmod
F32(_wfindfirst == _wfindfirst32)
F64(_wfindfirst == _wfindfirst64i32)
F32(_wfindfirsti64 == _wfindfirst32i64)
F64(_wfindfirsti64 == _wfindfirst64)
_wfindfirst32
_wfindfirst32i64
_wfindfirst64
_wfindfirst64i32
F32(_wfindnext == _wfindnext32)
F64(_wfindnext == _wfindnext64i32)
F32(_wfindnexti64 == _wfindnext32i64)
F64(_wfindnexti64 == _wfindnext64)
_wfindnext32
_wfindnext32i64
_wfindnext64
_wfindnext64i32
_wfullpath
_wmakepath
_wmakepath_s
_wmkdir
_wremove
_wrename
_wrmdir
_wsplitpath
_wsplitpath_s
F32(_wstat == _wstat32)
F64(_wstat == _wstat64i32)
F32(_wstati64 == _wstat32i64)
F64(_wstati64 == _wstat64)
_wstat32
_wstat32i64
_wstat64
_wstat64i32
_wunlink
remove
rename

View file

@ -150,13 +150,13 @@ F_NON_I386(acosf)
F_ARM_ANY(acosl == acos)
acosh
acoshf
acoshl F_X86_ANY(DATA)
F_ARM_ANY(acoshl) ; Can't use long double functions from the CRT on x86
asin
F_NON_I386(asinf)
F_ARM_ANY(asinl == asin)
asinh
asinhf
asinhl F_X86_ANY(DATA)
F_ARM_ANY(asinhl) ; Can't use long double functions from the CRT on x86
atan
atan2
F_NON_I386(atan2f)
@ -165,61 +165,61 @@ F_NON_I386(atanf)
F_ARM_ANY(atanl == atan)
atanh
atanhf
atanhl F_X86_ANY(DATA)
F_ARM_ANY(atanhl) ; Can't use long double functions from the CRT on x86
cabs
cabsf
cabsl
F_ARM_ANY(cabsl) ; Can't use long double functions from the CRT on x86
cacos
cacosf
cacosh
cacoshf
cacoshl
cacosl
F_ARM_ANY(cacoshl) ; Can't use long double functions from the CRT on x86
F_ARM_ANY(cacosl) ; Can't use long double functions from the CRT on x86
carg
cargf
cargl
F_ARM_ANY(cargl) ; Can't use long double functions from the CRT on x86
casin
casinf
casinh
casinhf
casinhl
casinl
F_ARM_ANY(casinhl) ; Can't use long double functions from the CRT on x86
F_ARM_ANY(casinl) ; Can't use long double functions from the CRT on x86
catan
catanf
catanh
catanhf
catanhl
catanl
F_ARM_ANY(catanhl) ; Can't use long double functions from the CRT on x86
F_ARM_ANY(catanl) ; Can't use long double functions from the CRT on x86
cbrt
cbrtf
cbrtl F_X86_ANY(DATA)
F_ARM_ANY(cbrtl) ; Can't use long double functions from the CRT on x86
ccos
ccosf
ccosh
ccoshf
ccoshl
ccosl
F_ARM_ANY(ccoshl) ; Can't use long double functions from the CRT on x86
F_ARM_ANY(ccosl) ; Can't use long double functions from the CRT on x86
ceil
F_NON_I386(ceilf)
F_ARM_ANY(ceill == ceil)
cexp
cexpf
cexpl
F_ARM_ANY(cexpl) ; Can't use long double functions from the CRT on x86
cimag
cimagf
cimagl
F_ARM_ANY(cimagl) ; Can't use long double functions from the CRT on x86
clog
clog10
clog10f
clog10l
F_ARM_ANY(clog10l) ; Can't use long double functions from the CRT on x86
clogf
clogl
F_ARM_ANY(clogl) ; Can't use long double functions from the CRT on x86
conj
conjf
conjl
F_ARM_ANY(conjl) ; Can't use long double functions from the CRT on x86
copysign
copysignf
copysignl F_X86_ANY(DATA)
F_ARM_ANY(copysignl) ; Can't use long double functions from the CRT on x86
cos
F_NON_I386(cosf)
F_ARM_ANY(cosl == cos)
@ -227,60 +227,60 @@ cosh
F_NON_I386(coshf)
cpow
cpowf
cpowl
F_ARM_ANY(cpowl) ; Can't use long double functions from the CRT on x86
cproj
cprojf
cprojl
F_ARM_ANY(cprojl) ; Can't use long double functions from the CRT on x86
creal
crealf
creall
F_ARM_ANY(creall) ; Can't use long double functions from the CRT on x86
csin
csinf
csinh
csinhf
csinhl
csinl
F_ARM_ANY(csinhl) ; Can't use long double functions from the CRT on x86
F_ARM_ANY(csinl) ; Can't use long double functions from the CRT on x86
csqrt
csqrtf
csqrtl
F_ARM_ANY(csqrtl) ; Can't use long double functions from the CRT on x86
ctan
ctanf
ctanh
ctanhf
ctanhl
ctanl
F_ARM_ANY(ctanhl) ; Can't use long double functions from the CRT on x86
F_ARM_ANY(ctanl) ; Can't use long double functions from the CRT on x86
erf
erfc
erfcf
erfcl F_X86_ANY(DATA)
F_ARM_ANY(erfcl) ; Can't use long double functions from the CRT on x86
erff
erfl F_X86_ANY(DATA)
F_ARM_ANY(erfl) ; Can't use long double functions from the CRT on x86
exp
exp2
exp2f
exp2l F_X86_ANY(DATA)
F_ARM_ANY(exp2l) ; Can't use long double functions from the CRT on x86
F_NON_I386(expf)
F_ARM_ANY(expl == exp)
expm1
expm1f
expm1l F_X86_ANY(DATA)
F_ARM_ANY(expm1l) ; Can't use long double functions from the CRT on x86
fabs
F_ARM_ANY(fabsf)
fdim
fdimf
fdiml F_X86_ANY(DATA)
F_ARM_ANY(fdiml) ; Can't use long double functions from the CRT on x86
floor
F_NON_I386(floorf)
F_ARM_ANY(floorl == floor)
fma
fmaf
fmal F_X86_ANY(DATA)
F_ARM_ANY(fmal) ; Can't use long double functions from the CRT on x86
fmax
fmaxf
fmaxl F_X86_ANY(DATA)
F_ARM_ANY(fmaxl) ; Can't use long double functions from the CRT on x86
fmin
fminf
fminl F_X86_ANY(DATA)
F_ARM_ANY(fminl) ; Can't use long double functions from the CRT on x86
fmod
F_NON_I386(fmodf)
F_ARM_ANY(fmodl == fmod)
@ -288,80 +288,80 @@ frexp
hypot
ilogb
ilogbf
ilogbl F_X86_ANY(DATA)
F_ARM_ANY(ilogbl) ; Can't use long double functions from the CRT on x86
ldexp
; The UCRT lgamma functions don't set/provide the signgam variable like
; the mingw ones do. Therefore prefer the libmingwex version instead.
lgamma DATA
lgammaf DATA
lgammal DATA
F_ARM_ANY(lgammal DATA) ; Can't use long double functions from the CRT on x86
llrint
llrintf
llrintl F_X86_ANY(DATA)
F_ARM_ANY(llrintl) ; Can't use long double functions from the CRT on x86
llround
llroundf
llroundl F_X86_ANY(DATA)
F_ARM_ANY(llroundl) ; Can't use long double functions from the CRT on x86
log
log10
F_NON_I386(log10f)
F_ARM_ANY(log10l == log10)
log1p
log1pf
log1pl F_X86_ANY(DATA)
F_ARM_ANY(log1pl) ; Can't use long double functions from the CRT on x86
log2
log2f
log2l F_X86_ANY(DATA)
F_ARM_ANY(log2l) ; Can't use long double functions from the CRT on x86
logb
logbf
logbl F_X86_ANY(DATA)
F_ARM_ANY(logbl) ; Can't use long double functions from the CRT on x86
F_NON_I386(logf)
F_ARM_ANY(logl == log)
lrint
lrintf
lrintl F_X86_ANY(DATA)
F_ARM_ANY(lrintl) ; Can't use long double functions from the CRT on x86
lround
lroundf
lroundl F_X86_ANY(DATA)
F_ARM_ANY(lroundl) ; Can't use long double functions from the CRT on x86
modf
F_NON_I386(modff)
nan
nanf
nanl F_X86_ANY(DATA)
F_ARM_ANY(nanl) ; Can't use long double functions from the CRT on x86
nearbyint
nearbyintf
nearbyintl F_X86_ANY(DATA)
F_ARM_ANY(nearbyintl) ; Can't use long double functions from the CRT on x86
nextafter
nextafterf
nextafterl F_X86_ANY(DATA)
; All of the nexttoward functions take the second parameter as long doubke,
F_ARM_ANY(nextafterl) ; Can't use long double functions from the CRT on x86
; All of the nexttoward functions take the second parameter as long double,
; making them unusable for x86.
nexttoward F_X86_ANY(DATA)
nexttowardf F_X86_ANY(DATA)
nexttowardl F_X86_ANY(DATA)
F_ARM_ANY(nexttoward) ; Can't use long double functions from the CRT on x86
F_ARM_ANY(nexttowardf) ; Can't use long double functions from the CRT on x86
F_ARM_ANY(nexttowardl) ; Can't use long double functions from the CRT on x86
norm
normf
norml
pow
F_NON_I386(powf)
F_NON_I386(powf) ; Missing in Wine's ucrtbase.dll for i386 in Wine 9.15 and older
F_ARM_ANY(powl == pow)
remainder
remainderf
remainderl F_X86_ANY(DATA)
F_ARM_ANY(remainderl) ; Can't use long double functions from the CRT on x86
remquo
remquof
remquol F_X86_ANY(DATA)
F_ARM_ANY(remquol) ; Can't use long double functions from the CRT on x86
rint
rintf
rintl F_X86_ANY(DATA)
F_ARM_ANY(rintl) ; Can't use long double functions from the CRT on x86
round
roundf
roundl F_X86_ANY(DATA)
F_ARM_ANY(roundl) ; Can't use long double functions from the CRT on x86
scalbln
scalblnf
scalblnl F_X86_ANY(DATA)
F_ARM_ANY(scalblnl) ; Can't use long double functions from the CRT on x86
scalbn
scalbnf
scalbnl F_X86_ANY(DATA)
F_ARM_ANY(scalbnl) ; Can't use long double functions from the CRT on x86
sin
F_NON_I386(sinf)
F_ARM_ANY(sinl == sin)
@ -378,7 +378,7 @@ tanh
F_NON_I386(tanhf)
tgamma
tgammaf
tgammal F_X86_ANY(DATA)
F_ARM_ANY(tgammal) ; Can't use long double functions from the CRT on x86
trunc
truncf
truncl F_X86_ANY(DATA)
F_ARM_ANY(truncl) ; Can't use long double functions from the CRT on x86

View file

@ -43,7 +43,7 @@ __TypeMatch
__current_exception
__current_exception_context
__dcrt_get_wide_environment_from_os
__dcrt_initial_narrow_environment
__dcrt_initial_narrow_environment DATA
__intrinsic_abnormal_termination
__intrinsic_setjmp
F64(__intrinsic_setjmpex)

View file

@ -155,6 +155,7 @@ ferror
fflush
fgetc
fgetpos
fgetpos64 == fgetpos
fgets
fgetwc
fgetws
@ -170,6 +171,7 @@ freopen
freopen_s
fseek
fsetpos
fsetpos64 == fsetpos
ftell
fwrite
getc

View file

@ -128,7 +128,7 @@ _wcsupr_l
_wcsupr_s
_wcsupr_s_l
_wcsxfrm_l
_wctype
_wctype DATA
is_wctype
isalnum
isalpha
@ -175,7 +175,7 @@ strncat_s
strncmp
strncpy
strncpy_s
; strnlen replaced by emu
strnlen
strpbrk
strspn
strtok
@ -199,8 +199,7 @@ wcsncat_s
wcsncmp
wcsncpy
wcsncpy_s
; We provide replacement implementation in libmingwex
wcsnlen DATA
wcsnlen
wcspbrk
wcsspn
wcstok

View file

@ -2,6 +2,8 @@ LIBRARY api-ms-win-crt-time-l1-1-0
EXPORTS
#include "func.def.in"
__daylight
__dstbias
__timezone
@ -10,14 +12,18 @@ _ctime32
_ctime32_s
_ctime64
_ctime64_s
F32(difftime == _difftime32)
F64(difftime == _difftime64)
_difftime32
_difftime64
_ftime == _ftime64
F32(_ftime == _ftime32)
F64(_ftime == _ftime64)
_ftime32
_ftime32_s
_ftime64
_ftime64_s
_futime == _futime64
F32(_futime == _futime32)
F64(_futime == _futime64)
_futime32
_futime64
_get_daylight
@ -36,6 +42,8 @@ _localtime32
_localtime32_s
_localtime64
_localtime64_s
F32(_mkgmtime == _mkgmtime32)
F64(_mkgmtime == _mkgmtime64)
_mkgmtime32
_mkgmtime64
_mktime32
@ -53,8 +61,10 @@ _timespec32_get
_timespec64_get
; This is wrapped in the compat code.
_tzset DATA
_utime == _utime64
utime == _utime64
F32(_utime == _utime32)
F64(_utime == _utime64)
F32(utime == _utime32)
F64(utime == _utime64)
_utime32
_utime64
_W_Getdays
@ -64,6 +74,8 @@ _wasctime
_wasctime_s
_Wcsftime
_wcsftime_l
F32(_wctime == _wctime32)
F64(_wctime == _wctime64)
_wctime32
_wctime32_s
_wctime64
@ -72,7 +84,8 @@ _wstrdate
_wstrdate_s
_wstrtime
_wstrtime_s
_wutime == _wutime64
F32(_wutime == _wutime32)
F64(_wutime == _wutime64)
_wutime32
_wutime64
asctime
@ -81,9 +94,15 @@ clock
strftime
wcsftime
; These functions may satisfy configure scripts.
ctime == _ctime64
gmtime == _gmtime64
localtime == _localtime64
mktime == _mktime64
time == _time64
timespec_get == _timespec64_get
F32(ctime == _ctime32)
F64(ctime == _ctime64)
F32(gmtime == _gmtime32)
F64(gmtime == _gmtime64)
F32(localtime == _localtime32)
F64(localtime == _localtime64)
F32(mktime == _mktime32)
F64(mktime == _mktime64)
F32(time == _time32)
F64(time == _time64)
F32(timespec_get == _timespec32_get)
F64(timespec_get == _timespec64_get)

View file

@ -1,7 +1,8 @@
;
; Definition file of bcryptPrimitives.dll
; Automatic generated by gendef
; written by Kai Tietz 2008-2014
; Automatic generated by gendef 1.1
; written by Kai Tietz 2008
; The def file has to be processed by --kill-at (-k) option of dlltool or ld
;
LIBRARY "bcryptPrimitives.dll"
EXPORTS
@ -12,4 +13,6 @@ GetKeyDerivationInterface
GetRngInterface
GetSecretAgreementInterface
GetSignatureInterface
MSCryptConvertRsaPrivateBlobToFullRsaBlob
ProcessPrng
ProcessPrngGuid

View file

@ -7,12 +7,12 @@ LIBRARY "CFGMGR32.dll"
EXPORTS
CMP_GetBlockedDriverInfo
CMP_GetServerSideDeviceInstallFlags
CMP_Get_Device_ID_List
CMP_Get_Device_ID_List_Size
CMP_Init_Detection
CMP_RegisterNotification
CMP_RegisterServiceNotification
CMP_Register_Notification
CMP_Report_LogOn
CMP_UnregisterNotification
CMP_WaitNoPendingInstallEvents
CMP_WaitServicesAvailable
CM_Add_Driver_PackageW
@ -61,6 +61,7 @@ CM_Enumerate_EnumeratorsA
CM_Enumerate_EnumeratorsW
CM_Enumerate_Enumerators_ExA
CM_Enumerate_Enumerators_ExW
CM_Export_Pnp_StateW
CM_Find_Range
CM_First_Range
CM_Free_Log_Conf
@ -167,6 +168,7 @@ CM_Get_Version_Ex
CM_Import_PowerScheme
CM_Install_DevNodeW
CM_Install_DevNode_ExW
CM_Install_DriverW
CM_Intersect_Range_List
CM_Invert_Range_List
CM_Is_Dock_Station_Present
@ -253,6 +255,7 @@ CM_Setup_DevNode_Ex
CM_Test_Range_Available
CM_Uninstall_DevNode
CM_Uninstall_DevNode_Ex
CM_Uninstall_DriverW
CM_Unregister_Device_InterfaceA
CM_Unregister_Device_InterfaceW
CM_Unregister_Device_Interface_ExA

View file

@ -9,6 +9,7 @@ HcsEnumerateVmWorkerProcesses
HcsFindVmWorkerProcesses
HcsGetWorkerProcessJob
HcsStartVmWorkerProcess
HcsAbortSystemPreservation
HcsAddResourceToOperation
HcsCancelOperation
HcsCloseComputeSystem
@ -24,6 +25,8 @@ HcsCreateOperationWithNotifications
HcsCreateProcess
HcsEnumerateComputeSystems
HcsEnumerateComputeSystemsInNamespace
HcsFinalizeLiveMigration
HcsFinalizeSystemPreservation
HcsGetComputeSystemFromOperation
HcsGetComputeSystemProperties
HcsGetOperationContext
@ -39,6 +42,7 @@ HcsGetProcessorCompatibilityFromSavedState
HcsGetServiceProperties
HcsGrantVmAccess
HcsGrantVmGroupAccess
HcsInitializeLiveMigrationOnSource
HcsModifyComputeSystem
HcsModifyProcess
HcsModifyServiceSettings
@ -57,6 +61,9 @@ HcsSetProcessCallback
HcsShutDownComputeSystem
HcsSignalProcess
HcsStartComputeSystem
HcsStartLiveMigrationOnSource
HcsStartLiveMigrationTransfer
HcsStartSystemPreservation
HcsSubmitWerReport
HcsSystemControl
HcsTerminateComputeSystem

View file

@ -18,6 +18,7 @@ HcnModifySdnRoute
HcnOpenGuestNetworkService
HcnOpenSdnRoute
HcnQueryGuestNetworkServiceProperties
HcnQueryMetrics
HcnQuerySdnRouteProperties
HcnRegisterGuestNetworkServiceCallback
HcnRegisterNetworkCallback

View file

@ -6,8 +6,10 @@
LIBRARY "computestorage.dll"
EXPORTS
HcsAttachLayerStorageFilter
HcsAttachOverlayFilter
HcsDestroyLayer
HcsDetachLayerStorageFilter
HcsDetachOverlayFilter
HcsExportLayer
HcsExportLegacyWritableLayer
HcsFormatWritableLayerVhd

View file

@ -121,9 +121,11 @@ BuildCommDCBW
BuildIoRingCancelRequest
BuildIoRingFlushFile
BuildIoRingReadFile
BuildIoRingReadFileScatter
BuildIoRingRegisterBuffers
BuildIoRingRegisterFileHandles
BuildIoRingWriteFile
BuildIoRingWriteFileGather
CallNamedPipeA
CallNamedPipeW
CallbackMayRunLong

View file

@ -1,37 +1,37 @@
;
; Definition file of NInput.dll
; Definition file of ninput.dll
; Automatic generated by gendef
; written by Kai Tietz 2008-2014
;
LIBRARY "NInput.dll"
LIBRARY "ninput.dll"
EXPORTS
DefaultInputHandler
AddPointerInteractionContext
BufferPointerPacketsInteractionContext
CreateInteractionContext
DestroyInteractionContext
GetCrossSlideParameterInteractionContext
GetHoldParameterInteractionContext
GetInertiaParameterInteractionContext
GetInteractionConfigurationInteractionContext
GetMouseWheelParameterInteractionContext
GetPropertyInteractionContext
GetStateInteractionContext
GetTapParameterInteractionContext
GetTranslationParameterInteractionContext
ProcessBufferedPacketsInteractionContext
ProcessInertiaInteractionContext
ProcessPointerFramesInteractionContext
RegisterOutputCallbackInteractionContext
RegisterOutputCallbackInteractionContext2
RemovePointerInteractionContext
ResetInteractionContext
SetCrossSlideParametersInteractionContext
SetHoldParameterInteractionContext
SetInertiaParameterInteractionContext
SetInteractionConfigurationInteractionContext
SetMouseWheelParameterInteractionContext
SetPivotInteractionContext
SetPropertyInteractionContext
SetTapParameterInteractionContext
SetTranslationParameterInteractionContext
StopInteractionContext
ord_2500 @2500
ord_2501 @2501
ord_2502 @2502
ord_2503 @2503
ord_2504 @2504
ord_2505 @2505

View file

@ -17,6 +17,7 @@ Tbsi_GetDeviceInfo
Tbsi_Get_OwnerAuth
Tbsi_Get_TCG_Log
Tbsi_Get_TCG_Log_Ex
Tbsi_Is_Tpm_Present
Tbsi_Physical_Presence_Command
Tbsi_Revoke_Attestation
Tbsi_ShaHash

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,12 @@
LIBRARY "ucrtbased.dll"
EXPORTS
#include "func.def.in"
; Include common ucrtbase symbols for debug build ucrtbased.dll
#define DEF_DEBUG
#include "ucrtbase-common.def.in"
; Include symbol aliases for compatibility with msvcrt.dll
#define UCRTBASE
#include "crt-aliases.def.in"

View file

@ -115,6 +115,7 @@ CreateMDIWindowA
CreateMDIWindowW
CreateMenu
CreatePopupMenu
CreateSyntheticPointerDevice
CreateSystemThreads
CreateWindowExA
CreateWindowExW
@ -178,6 +179,7 @@ DestroyDCompositionHwndTarget
DestroyIcon
DestroyMenu
DestroyReasons
DestroySyntheticPointerDevice
DestroyWindow
DeviceEventWorker
DialogBoxIndirectParamA
@ -325,6 +327,8 @@ GetDCEx
GetDesktopID
GetDesktopWindow
GetDialogBaseUnits
GetDialogControlDpiChangeBehavior
GetDialogDpiChangeBehavior
GetDisplayAutoRotationPreferences
GetDisplayConfigBufferSizes
GetDlgCtrlID
@ -333,9 +337,12 @@ GetDlgItemInt
GetDlgItemTextA
GetDlgItemTextW
GetDoubleClickTime
GetDpiAwarenessContextForProcess
GetDpiForMonitorInternal
GetDpiForSystem
GetDpiForWindow
GetDpiFromDpiAwarenessContext
GetExtendedPointerDeviceProperty
GetFocus
GetForegroundWindow
GetGestureConfig
@ -440,6 +447,7 @@ GetShellWindow
GetSubMenu
GetSysColor
GetSysColorBrush
GetSystemDpiForProcess
GetSystemMenu
GetSystemMetrics
GetSystemMetricsForDpi
@ -448,6 +456,7 @@ GetTabbedTextExtentW
GetTaskmanWindow
GetThreadDesktop
GetThreadDpiAwarenessContext
GetThreadDpiHostingBehavior
GetTitleBarInfo
GetTopLevelWindow
GetTopWindow
@ -468,6 +477,7 @@ GetWindowContextHelpId
GetWindowDC
GetWindowDisplayAffinity
GetWindowDpiAwarenessContext
GetWindowDpiHostingBehavior
GetWindowFeedbackSetting
GetWindowInfo
GetWindowLongA
@ -515,6 +525,7 @@ InjectDeviceInput
InjectKeyboardInput
InjectMouseInput
InjectPointerInput
InjectSyntheticPointerInput
InjectTouchInput
InsertMenuA
InsertMenuItemA
@ -672,6 +683,7 @@ QuerySendMessage
RIMAddInputObserver
RIMAreSiblingDevices
RIMDeviceIoControl
RIMEnableMonitorMappingForDevice
RIMFreeInputBuffer
RIMGetDevicePreparsedData
RIMGetDevicePreparsedDataLockfree
@ -706,6 +718,7 @@ RegisterDManipHook
RegisterDeviceNotificationA
RegisterDeviceNotificationW
RegisterErrorReportingDialog
RegisterForTooltipDismissNotification
RegisterFrostWindow
RegisterGhostWindow
RegisterHotKey
@ -758,6 +771,7 @@ SendMessageW
SendNotifyMessageA
SendNotifyMessageW
SetActiveWindow
SetAdditionalForegroundBoostProcesses
SetCapture
SetCaretBlinkTime
SetCaretPos
@ -775,6 +789,8 @@ SetCursorContents
SetCursorPos
SetDebugErrorLevel
SetDeskWallpaper
SetDialogControlDpiChangeBehavior
SetDialogDpiChangeBehavior
SetDisplayAutoRotationPreferences
SetDisplayConfig
SetDlgItemInt
@ -811,6 +827,7 @@ SetProcessDPIAware
SetProcessDefaultLayout
SetProcessDpiAwarenessContext
SetProcessDpiAwarenessInternal
SetProcessLaunchForegroundPolicy
SetProcessRestrictionExemption
SetProcessWindowStation
SetProgmanWindow
@ -831,6 +848,7 @@ SetSystemTimer
SetTaskmanWindow
SetThreadDesktop
SetThreadDpiAwarenessContext
SetThreadDpiHostingBehavior
SetThreadInputBlocked
SetTimer
SetUserObjectInformationA
@ -859,6 +877,8 @@ SetWindowsHookA
SetWindowsHookExA
SetWindowsHookExW
SetWindowsHookW
ShellMigrateWindow
ShellSetWindowPos
ShowCaret
ShowCursor
ShowOwnedPopups

View file

@ -0,0 +1,94 @@
LIBRARY "VCRUNTIME140.dll"
EXPORTS
#include "func.def.in"
_CreateFrameInfo
F_I386(_CxxThrowException@8)
F_NON_I386(_CxxThrowException)
F_I386(_EH_prolog)
_FindAndUnlinkFrame
_IsExceptionObjectToBeDestroyed
F_I386(_NLG_Dispatch2@4)
F_I386(_NLG_Return@12)
F_I386(_NLG_Return2)
_SetWinRTOutOfMemoryExceptionCallback
__AdjustPointer
__BuildCatchObject
__BuildCatchObjectHelper
F_NON_I386(__C_specific_handler)
F_NON_I386(__C_specific_handler_noexcept)
__CxxDetectRethrow
__CxxExceptionFilter
__CxxFrameHandler
__CxxFrameHandler2
__CxxFrameHandler3
F_I386(__CxxLongjmpUnwind@4)
__CxxQueryExceptionSize
__CxxRegisterExceptionObject
__CxxUnregisterExceptionObject
__DestructExceptionObject
__FrameUnwindFilter
__GetPlatformExceptionInfo
F_NON_I386(__NLG_Dispatch2)
F_NON_I386(__NLG_Return2)
__RTCastToVoid
__RTDynamicCast
__RTtypeid
__TypeMatch
__current_exception
__current_exception_context
F_NON_ARM64(__intrinsic_setjmp)
F_NON_I386(__intrinsic_setjmpex)
F_ARM32(__jump_unwind)
__processing_throw
__report_gsfailure
__std_exception_copy
__std_exception_destroy
__std_terminate
__std_type_info_compare
__std_type_info_destroy_list
__std_type_info_hash
__std_type_info_name
__telemetry_main_invoke_trigger
__telemetry_main_return_trigger
__unDName
__unDNameEx
__uncaught_exception
__uncaught_exceptions
__vcrt_GetModuleFileNameW
__vcrt_GetModuleHandleW
__vcrt_InitializeCriticalSectionEx
__vcrt_LoadLibraryExW
F_I386(_chkesp)
F_I386(_except_handler2)
F_I386(_except_handler3)
F_I386(_except_handler4_common)
_get_purecall_handler
_get_unexpected
F_I386(_global_unwind2)
_is_exception_typeof
F64(_local_unwind)
F_I386(_local_unwind2)
F_I386(_local_unwind4)
F_I386(_longjmpex)
_purecall
F_I386(_seh_longjmp_unwind4@4)
F_I386(_seh_longjmp_unwind@4)
_set_purecall_handler
_set_se_translator
F_I386(_setjmp3)
longjmp
memchr
memcmp
memcpy
memmove
memset
set_unexpected
strchr
strrchr
strstr
unexpected
wcschr
wcsrchr
wcsstr

View file

@ -39,8 +39,7 @@ __RTtypeid
__TypeMatch
__current_exception
__current_exception_context
F_X86_ANY(__intrinsic_setjmp)
F_ARM32(__intrinsic_setjmp)
F_NON_ARM64(__intrinsic_setjmp)
F_NON_I386(__intrinsic_setjmpex)
F_ARM32(__jump_unwind)
__processing_throw

View file

@ -0,0 +1,94 @@
LIBRARY "VCRUNTIME140D.dll"
EXPORTS
#include "func.def.in"
_CreateFrameInfo
F_I386(_CxxThrowException@8)
F_NON_I386(_CxxThrowException)
F_I386(_EH_prolog)
_FindAndUnlinkFrame
_IsExceptionObjectToBeDestroyed
F_I386(_NLG_Dispatch2@4)
F_I386(_NLG_Return@12)
F_I386(_NLG_Return2)
_SetWinRTOutOfMemoryExceptionCallback
__AdjustPointer
__BuildCatchObject
__BuildCatchObjectHelper
F_NON_I386(__C_specific_handler)
F_NON_I386(__C_specific_handler_noexcept)
__CxxDetectRethrow
__CxxExceptionFilter
__CxxFrameHandler
__CxxFrameHandler2
__CxxFrameHandler3
F_I386(__CxxLongjmpUnwind@4)
__CxxQueryExceptionSize
__CxxRegisterExceptionObject
__CxxUnregisterExceptionObject
__DestructExceptionObject
__FrameUnwindFilter
__GetPlatformExceptionInfo
F_NON_I386(__NLG_Dispatch2)
F_NON_I386(__NLG_Return2)
__RTCastToVoid
__RTDynamicCast
__RTtypeid
__TypeMatch
__current_exception
__current_exception_context
F_NON_ARM64(__intrinsic_setjmp)
F_NON_I386(__intrinsic_setjmpex)
F_ARM32(__jump_unwind)
__processing_throw
__report_gsfailure
__std_exception_copy
__std_exception_destroy
__std_terminate
__std_type_info_compare
__std_type_info_destroy_list
__std_type_info_hash
__std_type_info_name
__telemetry_main_invoke_trigger
__telemetry_main_return_trigger
__unDName
__unDNameEx
__uncaught_exception
__uncaught_exceptions
__vcrt_GetModuleFileNameW
__vcrt_GetModuleHandleW
__vcrt_InitializeCriticalSectionEx
__vcrt_LoadLibraryExW
F_I386(_chkesp)
F_I386(_except_handler2)
F_I386(_except_handler3)
F_I386(_except_handler4_common)
_get_purecall_handler
_get_unexpected
F_I386(_global_unwind2)
_is_exception_typeof
F64(_local_unwind)
F_I386(_local_unwind2)
F_I386(_local_unwind4)
F_I386(_longjmpex)
_purecall
F_I386(_seh_longjmp_unwind4@4)
F_I386(_seh_longjmp_unwind@4)
_set_purecall_handler
_set_se_translator
F_I386(_setjmp3)
longjmp
memchr
memcmp
memcpy
memmove
memset
set_unexpected
strchr
strrchr
strstr
unexpected
wcschr
wcsrchr
wcsstr

View file

@ -6,13 +6,17 @@
LIBRARY "WINBRAND.dll"
EXPORTS
BrandingFormatString
BrandingFormatStringForEdition
BrandingLoadBitmap
BrandingLoadCursor
BrandingLoadIcon
BrandingLoadImage
BrandingLoadNeutralStringForEdition
BrandingLoadString
BrandingLoadStringForEdition
EulaFreeBuffer
GetEULAFile
GetEULAFileEx
GetEULAInCurrentUILanguage
GetHinstanceByNameSpace
GetInstalledEULAPath

View file

@ -1,3 +1,5 @@
#include "func.def.in"
LIBRARY "winhvplatform.dll"
EXPORTS
WHvAcceptPartitionMigration
@ -18,16 +20,16 @@ WHvDeleteTrigger
WHvDeleteVirtualProcessor
WHvDeleteVpciDevice
WHvGetCapability
WHvGetInterruptTargetVpSet
F_X64(WHvGetInterruptTargetVpSet)
WHvGetPartitionCounters
WHvGetPartitionProperty
WHvGetVirtualProcessorCounters
WHvGetVirtualProcessorCpuidOutput
WHvGetVirtualProcessorInterruptControllerState
WHvGetVirtualProcessorInterruptControllerState2
F_X64(WHvGetVirtualProcessorCpuidOutput)
F_X64(WHvGetVirtualProcessorInterruptControllerState)
F_X64(WHvGetVirtualProcessorInterruptControllerState2)
WHvGetVirtualProcessorRegisters
WHvGetVirtualProcessorState
WHvGetVirtualProcessorXsaveState
F_X64(WHvGetVirtualProcessorXsaveState)
WHvGetVpciDeviceInterruptTarget
WHvGetVpciDeviceNotification
WHvGetVpciDeviceProperty
@ -48,11 +50,11 @@ WHvRetargetVpciDeviceInterrupt
WHvRunVirtualProcessor
WHvSetNotificationPortProperty
WHvSetPartitionProperty
WHvSetVirtualProcessorInterruptControllerState
WHvSetVirtualProcessorInterruptControllerState2
F_X64(WHvSetVirtualProcessorInterruptControllerState)
F_X64(WHvSetVirtualProcessorInterruptControllerState2)
WHvSetVirtualProcessorRegisters
WHvSetVirtualProcessorState
WHvSetVirtualProcessorXsaveState
F_X64(WHvSetVirtualProcessorXsaveState)
WHvSetVpciDevicePowerState
WHvSetupPartition
WHvSignalVirtualProcessorSynicEvent

View file

@ -5,23 +5,28 @@
;
LIBRARY "WINTRUST.dll"
EXPORTS
ComputeFirstPageHash
CryptCATVerifyMember
CryptSIPGetInfo
CryptSIPGetRegWorkingFlags
GenericChainCertificateTrust
GenericChainFinalProv
HTTPSCertificateTrust
SetMessageDigestInfo
SoftpubDefCertInit
SoftpubFreeDefUsageCallData
SoftpubLoadDefUsageCallData
WTHelperCertFindIssuerCertificate
AddPersonalTrustDBPages
CatalogCompactHashDatabase
ConfigCiFinalPolicy
ConfigCiPackageFamilyNameCheck
CryptCATAdminAcquireContext
CryptCATAdminAcquireContext2
CryptCATAdminAddCatalog
CryptCATAdminCalcHashFromFileHandle
CryptCATAdminCalcHashFromFileHandle2
CryptCATAdminCalcHashFromFileHandle3
CryptCATAdminEnumCatalogFromHash
CryptCATAdminPauseServiceForBackup
CryptCATAdminReleaseCatalogContext
@ -60,10 +65,13 @@ CryptSIPGetSignedDataMsg
CryptSIPPutSignedDataMsg
CryptSIPRemoveSignedDataMsg
CryptSIPVerifyIndirectData
; DllRegisterServer
; DllUnregisterServer
DriverCleanupPolicy
DriverFinalPolicy
DriverInitializePolicy
FindCertsByIssuer
GetAuthenticodeSha256Hash
HTTPSFinalProv
IsCatalogFile
MsCatConstructHashTag
@ -81,11 +89,15 @@ SoftpubDumpStructure
SoftpubInitialize
SoftpubLoadMessage
SoftpubLoadSignature
SrpCheckSmartlockerEAandProcessToken
TrustDecode
TrustFindIssuerCertificate
TrustFreeDecode
TrustIsCertificateSelfSigned
TrustOpenStores
WTConvertCertCtxToChainInfo
WTGetBioSignatureInfo
WTGetPluginSignatureInfo
WTGetSignatureInfo
WTHelperCertCheckValidSignature
WTHelperCertIsSelfSigned
@ -103,6 +115,10 @@ WTHelperIsChainedToMicrosoftFromStateData
WTHelperIsInRootStore
WTHelperOpenKnownStores
WTHelperProvDataFromStateData
WTIsFirstConfigCiResultPreferred
WTLogConfigCiScriptEvent
WTLogConfigCiSignerEvent
WTValidateBioSignaturePolicy
WVTAsn1CatMemberInfo2Decode
WVTAsn1CatMemberInfo2Encode
WVTAsn1CatMemberInfoDecode
@ -144,6 +160,7 @@ WintrustLoadFunctionPointers
WintrustRemoveActionID
WintrustSetDefaultIncludePEPageHashes
WintrustSetRegPolicyFlags
WintrustUserWriteabilityCheck
mscat32DllRegisterServer
mscat32DllUnregisterServer
mssip32DllRegisterServer

View file

@ -5,11 +5,16 @@
;
LIBRARY "WSCAPI.dll"
EXPORTS
wscLaunchAdminMakeDefaultUI
wscShowAMSCN
CLSID_WSCProductList
IID_IWSCProductList
IID_IWscProduct
LIBID_wscAPILib
CLSID_WSCDefaultProduct DATA
CLSID_WSCProductList DATA
; DllCanUnloadNow
; DllGetClassObject
IID_IWSCDefaultProduct DATA
IID_IWSCProductList DATA
IID_IWscProduct DATA
LIBID_wscAPILib DATA
WscGetAntiMalwareUri
WscGetSecurityProviderHealth
WscQueryAntiMalwareUri
@ -26,13 +31,18 @@ wscGeneralSecurityGetStatus
wscGetAlertStatus
wscIcfEnable
wscIeSettingsFix
wscInitiateOfflineCleaning
wscIsDefenderAntivirusSupported
wscLuaSettingsFix
wscMakeDefaultProductRequest
wscNotifyUserForNearExpiration
wscOverrideComponentStatus
wscPing
wscProductInfoFree
wscRegisterChangeNotification
wscRegisterSecurityProduct
wscSetDefaultProduct
wscUnRegisterChangeNotification
wscUnregisterSecurityProduct
wscUpdateProductStatus
wscUpdateProductSubStatus

View file

@ -0,0 +1,18 @@
;
; Definition file of bcryptPrimitives.dll
; Automatic generated by gendef 1.1
; written by Kai Tietz 2008
; The def file has to be processed by --kill-at (-k) option of dlltool or ld
;
LIBRARY "bcryptPrimitives.dll"
EXPORTS
GetAsymmetricEncryptionInterface@16
GetCipherInterface@16
GetHashInterface@16
GetKeyDerivationInterface@16
GetRngInterface@12
GetSecretAgreementInterface@16
GetSignatureInterface@16
MSCryptConvertRsaPrivateBlobToFullRsaBlob@20
ProcessPrng@8
ProcessPrngGuid@4

View file

@ -7,10 +7,12 @@ LIBRARY "CFGMGR32.dll"
EXPORTS
CMP_GetBlockedDriverInfo@16
CMP_GetServerSideDeviceInstallFlags@12
CMP_Get_Device_ID_List@16
CMP_Get_Device_ID_List_Size@12
CMP_Init_Detection@4
CMP_RegisterNotification@24
CMP_RegisterServiceNotification@16
CMP_Register_Notification@20
CMP_Report_LogOn@8
CMP_UnregisterNotification@4
CMP_WaitNoPendingInstallEvents@4
CMP_WaitServicesAvailable@4
CM_Add_Driver_PackageW@40
@ -165,6 +167,7 @@ CM_Get_Version_Ex@4
CM_Import_PowerScheme@12
CM_Install_DevNodeW@32
CM_Install_DevNode_ExW@36
CM_Install_DriverW@28
CM_Intersect_Range_List@16
CM_Invert_Range_List@20
CM_Is_Dock_Station_Present@4
@ -212,6 +215,7 @@ CM_Register_Device_InterfaceA@24
CM_Register_Device_InterfaceW@24
CM_Register_Device_Interface_ExA@28
CM_Register_Device_Interface_ExW@28
CM_Register_Notification@16
CM_Remove_SubTree@8
CM_Remove_SubTree_Ex@12
CM_Request_Device_EjectA@20
@ -250,8 +254,34 @@ CM_Setup_DevNode_Ex@12
CM_Test_Range_Available@24
CM_Uninstall_DevNode@8
CM_Uninstall_DevNode_Ex@12
CM_Uninstall_DriverW@28
CM_Unregister_Device_InterfaceA@8
CM_Unregister_Device_InterfaceW@8
CM_Unregister_Device_Interface_ExA@12
CM_Unregister_Device_Interface_ExW@12
CM_Unregister_Notification@4
CM_Write_UserPowerKey@32
DevCloseObjectQuery@4
DevCreateObjectQuery@36
DevCreateObjectQueryEx@44
DevCreateObjectQueryFromId@40
DevCreateObjectQueryFromIdEx@48
DevCreateObjectQueryFromIds@40
DevCreateObjectQueryFromIdsEx@48
DevFindProperty@20
DevFreeObjectProperties@8
DevFreeObjects@8
DevGetObjectProperties@28
DevGetObjectPropertiesEx@36
DevGetObjects@32
DevGetObjectsEx@40
DevSetObjectProperties@16
SwDeviceClose@4
SwDeviceCreate@32
SwDeviceGetLifetime@8
SwDeviceInterfacePropertySet@16
SwDeviceInterfaceRegister@28
SwDeviceInterfaceSetState@12
SwDevicePropertySet@12
SwDeviceSetLifetime@8
SwMemFree@4

View file

@ -121,9 +121,11 @@ BuildCommDCBW@8
BuildIoRingCancelRequest@20
BuildIoRingFlushFile@24
BuildIoRingReadFile@44
BuildIoRingReadFileScatter@40
BuildIoRingRegisterBuffers@16
BuildIoRingRegisterFileHandles@16
BuildIoRingWriteFile@48
BuildIoRingWriteFileGather@44
CallNamedPipeA@28
CallNamedPipeW@28
CallbackMayRunLong@4

View file

@ -18,16 +18,3 @@ SAGetNSAccountInformation@12
SASetAccountInformation@20
SASetNSAccountInformation@12
SetNetScheduleAccountInformation@12
_ConvertAtJobsToTasks@0@0
_DllCanUnloadNow@0@0
_DllGetClassObject@12@12
_GetNetScheduleAccountInformation@12@12
_NetrJobAdd@12@12
_NetrJobDel@12@12
_NetrJobEnum@20@20
_NetrJobGetInfo@12@12
_SAGetAccountInformation@16@16
_SAGetNSAccountInformation@12@12
_SASetAccountInformation@20@20
_SASetNSAccountInformation@12@12
_SetNetScheduleAccountInformation@12@12

37
lib/libc/mingw/lib32/ninput.def vendored Normal file
View file

@ -0,0 +1,37 @@
;
; Definition file of ninput.dll
; Automatic generated by gendef
; written by Kai Tietz 2008-2014
;
LIBRARY "ninput.dll"
EXPORTS
AddPointerInteractionContext@8
BufferPointerPacketsInteractionContext@12
CreateInteractionContext@4
DestroyInteractionContext@4
GetCrossSlideParameterInteractionContext@12
GetHoldParameterInteractionContext@12
GetInertiaParameterInteractionContext@12
GetInteractionConfigurationInteractionContext@12
GetMouseWheelParameterInteractionContext@12
GetPropertyInteractionContext@12
GetStateInteractionContext@12
GetTapParameterInteractionContext@12
GetTranslationParameterInteractionContext@12
ProcessBufferedPacketsInteractionContext@4
ProcessInertiaInteractionContext@4
ProcessPointerFramesInteractionContext@16
RegisterOutputCallbackInteractionContext2@12
RegisterOutputCallbackInteractionContext@12
RemovePointerInteractionContext@8
ResetInteractionContext@4
SetCrossSlideParametersInteractionContext@12
SetHoldParameterInteractionContext@12
SetInertiaParameterInteractionContext@12
SetInteractionConfigurationInteractionContext@12
SetMouseWheelParameterInteractionContext@12
SetPivotInteractionContext@16
SetPropertyInteractionContext@12
SetTapParameterInteractionContext@12
SetTranslationParameterInteractionContext@12
StopInteractionContext@4

View file

@ -11,17 +11,6 @@ TTIsEmbeddingEnabled@8
TTIsEmbeddingEnabledForFacename@8
TTLoadEmbeddedFont@40
TTRunValidationTests@8
_TTCharToUnicode@24@24
_TTDeleteEmbeddedFont@12@12
_TTEmbedFont@44@44
_TTEmbedFontFromFileA@52@52
_TTEnableEmbeddingForFacename@8@8
_TTGetEmbeddedFontInfo@28@28
_TTGetEmbeddingType@8@8
_TTIsEmbeddingEnabled@8@8
_TTIsEmbeddingEnabledForFacename@8@8
_TTLoadEmbeddedFont@40@40
_TTRunValidationTests@8@8
TTEmbedFontEx@44
TTRunValidationTestsEx@8
TTGetNewFontName@20

View file

@ -17,6 +17,7 @@ Tbsi_GetDeviceInfo@8
Tbsi_Get_OwnerAuth@16
Tbsi_Get_TCG_Log@12
Tbsi_Get_TCG_Log_Ex@12
Tbsi_Is_Tpm_Present@0
Tbsi_Physical_Presence_Command@20
Tbsi_Revoke_Attestation@0
Tbsi_ShaHash@32

View file

@ -5,16 +5,15 @@
;
LIBRARY "USBD.SYS"
EXPORTS
; USBD_CreateConfigurationRequestEx@8
; USBD_ParseConfigurationDescriptorEx@28
; USBD_ParseDescriptors@16
USBD_CreateConfigurationRequestEx@8
USBD_ParseConfigurationDescriptorEx@28
USBD_ParseDescriptors@16
DllInitialize@4
DllUnload@0
USBD_AllocateDeviceName@4
USBD_CalculateUsbBandwidth@12
USBD_CompleteRequest@8
USBD_CreateConfigurationRequest@8
; _USBD_CreateConfigurationRequestEx@8@8
USBD_CreateDevice@20
USBD_Debug_GetHeap@16
USBD_Debug_LogEntry@16
@ -30,8 +29,6 @@ USBD_GetUSBDIVersion@4
USBD_InitializeDevice@24
USBD_MakePdoName@8
USBD_ParseConfigurationDescriptor@12
; _USBD_ParseConfigurationDescriptorEx@28@28
; _USBD_ParseDescriptors@16@16
USBD_QueryBusTime@8
USBD_RegisterHcDeviceCapabilities@12
USBD_RegisterHcFilter@8
@ -40,6 +37,3 @@ USBD_RemoveDevice@12
USBD_RestoreDevice@12
USBD_SetSuspendPowerState@8
USBD_WaitDeviceMutex@4
USBD_CreateConfigurationRequestEx@8==_USBD_CreateConfigurationRequestEx@8
USBD_ParseConfigurationDescriptorEx@28==_USBD_ParseConfigurationDescriptorEx@28
USBD_ParseDescriptors@16==_USBD_ParseDescriptors@16

View file

@ -747,6 +747,7 @@ RegisterDeviceNotificationA@12
RegisterDeviceNotificationW@12
RegisterErrorReportingDialog@8
RegisterFrostWindow@8
RegisterForTooltipDismissNotification@8
RegisterGhostWindow@8
RegisterHotKey@16
RegisterLogonProcess@8
@ -799,6 +800,7 @@ SendMessageW@16
SendNotifyMessageA@16
SendNotifyMessageW@16
SetActiveWindow@4
SetAdditionalForegroundBoostProcesses@12
SetCapture@4
SetCaretBlinkTime@4
SetCaretPos@8
@ -856,6 +858,7 @@ SetProcessDPIAware@0
SetProcessDefaultLayout@4
SetProcessDpiAwarenessContext@4
SetProcessDpiAwarenessInternal@4
SetProcessLaunchForegroundPolicy@8
SetProcessRestrictionExemption@4
SetProcessWindowStation@4
SetProgmanWindow@4
@ -913,6 +916,8 @@ SfmDxReleaseSwapChain@8
SfmDxReportPendingBindingsToDwm@0
SfmDxSetSwapChainBindingStatus@8
SfmDxSetSwapChainStats@8
ShellMigrateWindow@12
ShellSetWindowPos@24
ShowCaret@4
ShowCursor@4
ShowOwnedPopups@8

23
lib/libc/mingw/lib32/winbrand.def vendored Normal file
View file

@ -0,0 +1,23 @@
;
; Definition file of WINBRAND.dll
; Automatic generated by gendef
; written by Kai Tietz 2008-2014
;
LIBRARY "WINBRAND.dll"
EXPORTS
BrandingFormatString@4
BrandingFormatStringForEdition@12
BrandingLoadBitmap@8
BrandingLoadCursor@8
BrandingLoadIcon@8
BrandingLoadImage@24
BrandingLoadNeutralStringForEdition@20
BrandingLoadString@16
BrandingLoadStringForEdition@24
EulaFreeBuffer@4
GetEULAFile@20
GetEULAFileEx@24
GetEULAInCurrentUILanguage@4
GetHinstanceByNameSpace@4
GetInstalledEULAPath@4
InstallEULA@16

View file

@ -5,6 +5,7 @@
;
LIBRARY "WINTRUST.dll"
EXPORTS
ComputeFirstPageHash@16
CryptCATVerifyMember@12
CryptSIPGetInfo@4
CryptSIPGetRegWorkingFlags@4
@ -17,8 +18,13 @@ SoftpubLoadDefUsageCallData@8
WTHelperCertFindIssuerCertificate@28
AddPersonalTrustDBPages@12
CatalogCompactHashDatabase@16
ConfigCiFinalPolicy@4
ConfigCiPackageFamilyNameCheck@12
CryptCATAdminAcquireContext2@20
CryptCATAdminAcquireContext@12
CryptCATAdminAddCatalog@16
CryptCATAdminCalcHashFromFileHandle2@20
CryptCATAdminCalcHashFromFileHandle3@20
CryptCATAdminCalcHashFromFileHandle@16
CryptCATAdminEnumCatalogFromHash@20
CryptCATAdminPauseServiceForBackup@8
@ -52,16 +58,19 @@ CryptCATPutCatAttrInfo@20
CryptCATPutMemberInfo@28
CryptCATStoreFromHandle@4
CryptSIPCreateIndirectData@12
CryptSIPGetCaps@8
CryptSIPGetSealedDigest@20
CryptSIPGetSignedDataMsg@20
CryptSIPPutSignedDataMsg@20
CryptSIPRemoveSignedDataMsg@8
CryptSIPVerifyIndirectData@8
DllRegisterServer
DllUnregisterServer
; DllRegisterServer
; DllUnregisterServer
DriverCleanupPolicy@4
DriverFinalPolicy@4
DriverInitializePolicy@4
FindCertsByIssuer@28
GetAuthenticodeSha256Hash@12
HTTPSFinalProv@4
IsCatalogFile@8
MsCatConstructHashTag@12
@ -73,17 +82,22 @@ OpenPersonalTrustDBDialogEx@12
SoftpubAuthenticode@4
SoftpubCheckCert@16
SoftpubCleanup@4
SoftpubDllRegisterServer
SoftpubDllUnregisterServer
SoftpubDllRegisterServer@0
SoftpubDllUnregisterServer@0
SoftpubDumpStructure@4
SoftpubInitialize@4
SoftpubLoadMessage@4
SoftpubLoadSignature@4
SrpCheckSmartlockerEAandProcessToken@12
TrustDecode@36
TrustFindIssuerCertificate@32
TrustFreeDecode@8
TrustIsCertificateSelfSigned@12
TrustOpenStores@16
WTConvertCertCtxToChainInfo@12
WTGetBioSignatureInfo@24
WTGetPluginSignatureInfo@24
WTGetSignatureInfo@24
WTHelperCertCheckValidSignature@4
WTHelperCertIsSelfSigned@8
WTHelperCheckCertUsage@8
@ -95,13 +109,27 @@ WTHelperGetKnownUsages@8
WTHelperGetProvCertFromChain@8
WTHelperGetProvPrivateDataFromChain@8
WTHelperGetProvSignerFromChain@16
WTHelperIsChainedToMicrosoft@12
WTHelperIsChainedToMicrosoftFromStateData@8
WTHelperIsInRootStore@8
WTHelperOpenKnownStores@4
WTHelperProvDataFromStateData@4
WTIsFirstConfigCiResultPreferred@12
WTLogConfigCiScriptEvent@20
WTLogConfigCiSignerEvent@16
WTValidateBioSignaturePolicy@8
WVTAsn1CatMemberInfo2Decode@28
WVTAsn1CatMemberInfo2Encode@20
WVTAsn1CatMemberInfoDecode@28
WVTAsn1CatMemberInfoEncode@20
WVTAsn1CatNameValueDecode@28
WVTAsn1CatNameValueEncode@20
WVTAsn1IntentToSealAttributeDecode@28
WVTAsn1IntentToSealAttributeEncode@20
WVTAsn1SealingSignatureAttributeDecode@28
WVTAsn1SealingSignatureAttributeEncode@20
WVTAsn1SealingTimestampAttributeDecode@28
WVTAsn1SealingTimestampAttributeEncode@20
WVTAsn1SpcFinancialCriteriaInfoDecode@28
WVTAsn1SpcFinancialCriteriaInfoEncode@20
WVTAsn1SpcIndirectDataContentDecode@28
@ -131,7 +159,8 @@ WintrustLoadFunctionPointers@8
WintrustRemoveActionID@4
WintrustSetDefaultIncludePEPageHashes@4
WintrustSetRegPolicyFlags@4
mscat32DllRegisterServer
mscat32DllUnregisterServer
mssip32DllRegisterServer
mssip32DllUnregisterServer
WintrustUserWriteabilityCheck@4
mscat32DllRegisterServer@0
mscat32DllUnregisterServer@0
mssip32DllRegisterServer@0
mssip32DllUnregisterServer@0

48
lib/libc/mingw/lib32/wscapi.def vendored Normal file
View file

@ -0,0 +1,48 @@
;
; Definition file of WSCAPI.dll
; Automatic generated by gendef
; written by Kai Tietz 2008-2014
;
LIBRARY "WSCAPI.dll"
EXPORTS
wscLaunchAdminMakeDefaultUI@4
wscShowAMSCN@8
CLSID_WSCDefaultProduct DATA
CLSID_WSCProductList DATA
; DllCanUnloadNow@0
; DllGetClassObject@12
IID_IWSCDefaultProduct DATA
IID_IWSCProductList DATA
IID_IWscProduct DATA
LIBID_wscAPILib DATA
WscGetAntiMalwareUri@4
WscGetSecurityProviderHealth@8
WscQueryAntiMalwareUri@0
WscRegisterForChanges@16
WscRegisterForUserNotifications@0
WscUnRegisterChanges@4
wscAntiSpywareGetStatus@8
wscAntiVirusExpiredBeyondThreshold@12
wscAntiVirusGetStatus@8
wscAutoUpdatesEnableScheduledMode@0
wscAutoUpdatesGetStatus@4
wscFirewallGetStatus@8
wscGeneralSecurityGetStatus@8
wscGetAlertStatus@8
wscIcfEnable@0
wscIeSettingsFix@0
wscInitiateOfflineCleaning@8
wscIsDefenderAntivirusSupported@4
wscLuaSettingsFix@4
wscMakeDefaultProductRequest@4
wscNotifyUserForNearExpiration@4
wscOverrideComponentStatus@8
wscPing@0
wscProductInfoFree@8
wscRegisterChangeNotification@8
wscRegisterSecurityProduct@20
wscSetDefaultProduct@8
wscUnRegisterChangeNotification@4
wscUnregisterSecurityProduct@4
wscUpdateProductStatus@12
wscUpdateProductSubStatus@8

View file

@ -5,7 +5,5 @@
;
LIBRARY "X3DAudio1_2.dll"
EXPORTS
;_X3DAudioCalculate@20@20
;_X3DAudioInitialize@12@12
_X3DAudioCalculate@20 == _X3DAudioCalculate@20
_X3DAudioInitialize@12 == _X3DAudioInitialize@12
X3DAudioCalculate@20 == _X3DAudioCalculate@20
X3DAudioInitialize@12 == _X3DAudioInitialize@12

View file

@ -9,8 +9,8 @@ XAudio2Create@12
CreateAudioReverb@4
CreateAudioVolumeMeter@4
CreateFX@0
X3DAudioCalculate@0
X3DAudioInitialize@0
X3DAudioCalculate
X3DAudioInitialize
CreateAudioReverbV2_8@4
XAudio2CreateV2_9@12
XAudio2CreateWithVersionInfo@16

1740
lib/libc/mingw/lib64/kernel32.def vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,136 +0,0 @@
;
; Exports of file WINTRUST.dll
;
; Autogenerated by gen_exportdef
; Written by Kai Tietz, 2007
;
LIBRARY WINTRUST.dll
EXPORTS
CryptCATVerifyMember
CryptSIPGetInfo
CryptSIPGetRegWorkingFlags
GenericChainCertificateTrust
GenericChainFinalProv
HTTPSCertificateTrust
SoftpubDefCertInit
SoftpubFreeDefUsageCallData
SoftpubLoadDefUsageCallData
WTHelperCertFindIssuerCertificate
AddPersonalTrustDBPages
CatalogCompactHashDatabase
CryptCATAdminAcquireContext
CryptCATAdminAddCatalog
CryptCATAdminCalcHashFromFileHandle
CryptCATAdminEnumCatalogFromHash
CryptCATAdminPauseServiceForBackup
CryptCATAdminReleaseCatalogContext
CryptCATAdminReleaseContext
CryptCATAdminRemoveCatalog
CryptCATAdminResolveCatalogPath
CryptCATCDFClose
CryptCATCDFEnumAttributes
CryptCATCDFEnumAttributesWithCDFTag
CryptCATCDFEnumCatAttributes
CryptCATCDFEnumMembers
CryptCATCDFEnumMembersByCDFTag
CryptCATCDFEnumMembersByCDFTagEx
CryptCATCDFOpen
CryptCATCatalogInfoFromContext
CryptCATClose
CryptCATEnumerateAttr
CryptCATEnumerateCatAttr
CryptCATEnumerateMember
CryptCATGetAttrInfo
CryptCATGetCatAttrInfo
CryptCATGetMemberInfo
CryptCATHandleFromStore
CryptCATOpen
CryptCATPersistStore
CryptCATPutAttrInfo
CryptCATPutCatAttrInfo
CryptCATPutMemberInfo
CryptCATStoreFromHandle
CryptSIPCreateIndirectData
CryptSIPGetSignedDataMsg
CryptSIPPutSignedDataMsg
CryptSIPRemoveSignedDataMsg
CryptSIPVerifyIndirectData
DllRegisterServer
DllUnregisterServer
DriverCleanupPolicy
DriverFinalPolicy
DriverInitializePolicy
FindCertsByIssuer
HTTPSFinalProv
I_CryptCatAdminMigrateToNewCatDB
IsCatalogFile
MsCatConstructHashTag
MsCatFreeHashTag
OfficeCleanupPolicy
OfficeInitializePolicy
OpenPersonalTrustDBDialog
OpenPersonalTrustDBDialogEx
SoftpubAuthenticode
SoftpubCheckCert
SoftpubCleanup
SoftpubDllRegisterServer
SoftpubDllUnregisterServer
SoftpubDumpStructure
SoftpubInitialize
SoftpubLoadMessage
SoftpubLoadSignature
TrustDecode
TrustFindIssuerCertificate
TrustFreeDecode
TrustIsCertificateSelfSigned
TrustOpenStores
WTHelperCertCheckValidSignature
WTHelperCertIsSelfSigned
WTHelperCheckCertUsage
WTHelperGetAgencyInfo
WTHelperGetFileHandle
WTHelperGetFileHash
WTHelperGetFileName
WTHelperGetKnownUsages
WTHelperGetProvCertFromChain
WTHelperGetProvPrivateDataFromChain
WTHelperGetProvSignerFromChain
WTHelperIsInRootStore
WTHelperOpenKnownStores
WTHelperProvDataFromStateData
WVTAsn1CatMemberInfoDecode
WVTAsn1CatMemberInfoEncode
WVTAsn1CatNameValueDecode
WVTAsn1CatNameValueEncode
WVTAsn1SpcFinancialCriteriaInfoDecode
WVTAsn1SpcFinancialCriteriaInfoEncode
WVTAsn1SpcIndirectDataContentDecode
WVTAsn1SpcIndirectDataContentEncode
WVTAsn1SpcLinkDecode
WVTAsn1SpcLinkEncode
WVTAsn1SpcMinimalCriteriaInfoDecode
WVTAsn1SpcMinimalCriteriaInfoEncode
WVTAsn1SpcPeImageDataDecode
WVTAsn1SpcPeImageDataEncode
WVTAsn1SpcSigInfoDecode
WVTAsn1SpcSigInfoEncode
WVTAsn1SpcSpAgencyInfoDecode
WVTAsn1SpcSpAgencyInfoEncode
WVTAsn1SpcSpOpusInfoDecode
WVTAsn1SpcSpOpusInfoEncode
WVTAsn1SpcStatementTypeDecode
WVTAsn1SpcStatementTypeEncode
WinVerifyTrust
WinVerifyTrustEx
WintrustAddActionID
WintrustAddDefaultForUsage
WintrustCertificateTrust
WintrustGetDefaultForUsage
WintrustGetRegPolicyFlags
WintrustLoadFunctionPointers
WintrustRemoveActionID
WintrustSetRegPolicyFlags
mscat32DllRegisterServer
mscat32DllUnregisterServer
mssip32DllRegisterServer
mssip32DllUnregisterServer

200
lib/libc/mingw/lib64/ws2_32.def vendored Normal file
View file

@ -0,0 +1,200 @@
LIBRARY "WS2_32.dll"
EXPORTS
accept
bind
closesocket
connect
getpeername
getsockname
getsockopt
htonl
htons
ioctlsocket
inet_addr
inet_ntoa
listen
ntohl
ntohs
recv
recvfrom
select
send
sendto
setsockopt
shutdown
socket
WSApSetPostRoutine
FreeAddrInfoEx
FreeAddrInfoExW
FreeAddrInfoW
GetAddrInfoExA
GetAddrInfoExCancel
GetAddrInfoExOverlappedResult
GetAddrInfoExW
GetAddrInfoW
GetHostNameW
GetNameInfoW
InetNtopW
InetPtonW
ProcessSocketNotifications
SetAddrInfoExA
SetAddrInfoExW
WPUCompleteOverlappedRequest
WPUGetProviderPathEx
WSAAccept
WSAAddressToStringA
WSAAddressToStringW
WSAAdvertiseProvider
WSACloseEvent
WSAConnect
WSAConnectByList
WSAConnectByNameA
WSAConnectByNameW
WSACreateEvent
gethostbyaddr
gethostbyname
getprotobyname
getprotobynumber
getservbyname
getservbyport
gethostname
WSADuplicateSocketA
WSADuplicateSocketW
WSAEnumNameSpaceProvidersA
WSAEnumNameSpaceProvidersExA
WSAEnumNameSpaceProvidersExW
WSAEnumNameSpaceProvidersW
WSAEnumNetworkEvents
WSAEnumProtocolsA
WSAEnumProtocolsW
WSAEventSelect
WSAGetOverlappedResult
WSAGetQOSByName
WSAGetServiceClassInfoA
WSAGetServiceClassInfoW
WSAGetServiceClassNameByClassIdA
WSAGetServiceClassNameByClassIdW
WSAHtonl
WSAHtons
WSAInstallServiceClassA
WSAInstallServiceClassW
WSAIoctl
WSAJoinLeaf
WSALookupServiceBeginA
WSALookupServiceBeginW
WSALookupServiceEnd
WSALookupServiceNextA
WSALookupServiceNextW
WSANSPIoctl
WSANtohl
WSANtohs
WSAPoll
WSAProviderCompleteAsyncCall
WSAProviderConfigChange
WSARecv
WSARecvDisconnect
WSARecvFrom
WSARemoveServiceClass
WSAResetEvent
WSASend
WSASendDisconnect
WSASendMsg
WSASendTo
WSASetEvent
WSAAsyncSelect
WSAAsyncGetHostByAddr
WSAAsyncGetHostByName
WSAAsyncGetProtoByNumber
WSAAsyncGetProtoByName
WSAAsyncGetServByPort
WSAAsyncGetServByName
WSACancelAsyncRequest
WSASetBlockingHook
WSAUnhookBlockingHook
WSAGetLastError
WSASetLastError
WSACancelBlockingCall
WSAIsBlocking
WSAStartup
WSACleanup
WSASetServiceA
WSASetServiceW
WSASocketA
WSASocketW
WSAStringToAddressA
WSAStringToAddressW
WSAUnadvertiseProvider
WSAWaitForMultipleEvents
WSCDeinstallProvider
WSCDeinstallProvider32
WSCDeinstallProviderEx
WSCEnableNSProvider
WSCEnableNSProvider32
WSCEnumNameSpaceProviders32
WSCEnumNameSpaceProvidersEx32
WSCEnumProtocols
WSCEnumProtocolsEx
WSCEnumProtocols32
WSCGetApplicationCategory
WSCGetApplicationCategoryEx
WSCGetProviderInfo
WSCGetProviderInfo32
WSCGetProviderPath
WSCGetProviderPath32
WSCInstallNameSpace
WSCInstallNameSpace32
WSCInstallNameSpaceEx
WSCInstallNameSpaceEx2
WSCInstallNameSpaceEx32
WSCInstallProvider
WSCInstallProvider64_32
WSCInstallProviderAndChains
WSCInstallProviderAndChains64_32
WSCInstallProviderEx
WSCSetApplicationCategory
WSCSetApplicationCategoryEx
WSCSetProviderInfo
WSCSetProviderInfo32
WSCUnInstallNameSpace
WSCUnInstallNameSpace32
WSCUnInstallNameSpaceEx2
WSCUpdateProvider
WSCUpdateProvider32
WSCUpdateProviderEx
WSCWriteNameSpaceOrder
WSCWriteNameSpaceOrder32
WSCWriteProviderOrder
WSCWriteProviderOrder32
WSCWriteProviderOrderEx
WahCloseApcHelper
__WSAFDIsSet
WahCloseHandleHelper
WahCloseNotificationHandleHelper
WahCloseSocketHandle
WahCloseThread
WahCompleteRequest
WahCreateHandleContextTable
WahCreateNotificationHandle
WahCreateSocketHandle
WahDestroyHandleContextTable
WahDisableNonIFSHandleSupport
WahEnableNonIFSHandleSupport
WahEnumerateHandleContexts
WahInsertHandleContext
WahNotifyAllProcesses
WahOpenApcHelper
WahOpenCurrentThread
WahOpenHandleHelper
WahOpenNotificationHandleHelper
WahQueueUserApc
WahReferenceContextByHandle
WahRemoveHandleContext
WahWaitForNotification
WahWriteLSPEvent
freeaddrinfo
getaddrinfo
getnameinfo
inet_ntop
inet_pton
WEP

View file

@ -1886,10 +1886,10 @@ _exit
_initterm
_initterm_e
_invalid_parameter
_onexit
; _onexit ; disable _onexit for compatibility with DLL builds, real _onexit function provided by mingw-w64
_purecall
_time64
atexit
_crt_atexit == atexit ; rename atexit to _crt_atexit for compatibility with UCRT, real atexit function provided by mingw-w64
exit
hgets
hwprintf

121
lib/libc/mingw/libsrc/largeint.c vendored Normal file
View file

@ -0,0 +1,121 @@
#if 0
/*
largeint.c
Large (64 bits) integer arithmetics library
Written by Anders Norlander <anorland@hem2.passagen.se>
This file is part of a free library for the Win32 API.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#define __COMPILING_LARGEINT
#include <largeint.h>
__int64 WINAPI
LargeIntegerAdd (__int64 i1, __int64 i2)
{
return i1 + i2;
}
__int64 WINAPI
LargeIntegerSubtract (__int64 i1, __int64 i2)
{
return i1 - i2;
}
__int64 WINAPI
LargeIntegerArithmeticShift (__int64 i, int n)
{
return i >> n;
}
__int64 WINAPI
LargeIntegerShiftLeft (__int64 i, int n)
{
return i << n;
}
__int64 WINAPI
LargeIntegerShiftRight (__int64 i, int n)
{
return i >> n;
}
__int64 WINAPI
LargeIntegerNegate (__int64 i)
{
return -i;
}
__int64 WINAPI
ConvertLongToLargeInteger (LONG l)
{
return (__int64) l;
}
__int64 WINAPI
ConvertUlongToLargeInteger (ULONG ul)
{
return _toi(_toui(ul));
}
__int64 WINAPI
EnlargedIntegerMultiply (LONG l1, LONG l2)
{
return _toi(l1) * _toi(l2);
}
__int64 WINAPI
EnlargedUnsignedMultiply (ULONG ul1, ULONG ul2)
{
return _toi(_toui(ul1) * _toui(ul2));
}
__int64 WINAPI
ExtendedIntegerMultiply (__int64 i, LONG l)
{
return i * _toi(l);
}
__int64 WINAPI
LargeIntegerMultiply (__int64 i1, __int64 i2)
{
return i1 * i2;
}
__int64 WINAPI LargeIntegerDivide (__int64 i1, __int64 i2, __int64 *remainder)
{
if (remainder)
*remainder = i1 % i2;
return i1 / i2;
}
ULONG WINAPI
EnlargedUnsignedDivide (unsigned __int64 i1, ULONG i2, PULONG remainder)
{
if (remainder)
*remainder = i1 % _toi(i2);
return i1 / _toi(i2);
}
__int64 WINAPI
ExtendedLargeIntegerDivide (__int64 i1, ULONG i2, PULONG remainder)
{
if (remainder)
*remainder = i1 % _toi(i2);
return i1 / _toi(i2);
}
/* FIXME: what is this function supposed to do? */
__int64 WINAPI ExtendedMagicDivide (__int64 i1, __int64 i2, int n)
{
return 0;
}
#endif

View file

@ -1,4 +1,3 @@
#include <windows.h>
#include <propsys.h>
#include <mediaobj.h>
@ -9,4 +8,5 @@
#include <mfd3d12.h>
#include <mfidl.h>
#include <mfmediacapture.h>
#include <mfmediaengine.h>
#include <mfreadwrite.h>

5
lib/libc/mingw/libsrc/mingwthrd_mt.c vendored Normal file
View file

@ -0,0 +1,5 @@
/* As _CRT_MT is getting defined in libgcc when using shared version, or it is getting defined by startup code itself,
this library is a dummy version for supporting the link library for gcc's option -mthreads. As we support TLS-cleanup
even without specifying this library, this library is deprecated and just kept for compatibility. */
int _CRT_MT_OLD = 1;

415
lib/libc/mingw/libsrc/scrnsave.c vendored Normal file
View file

@ -0,0 +1,415 @@
/*
Screen saver library by Anders Norlander <anorland@hem2.passagen.se>
This library is (hopefully) compatible with Microsoft's
screen saver library.
This is public domain software.
*/
#include <windows.h>
#include <scrnsave.h>
#include <regstr.h>
/* screen saver window class */
#define CLASS_SCRNSAVE TEXT("WindowsScreenSaverClass")
/* globals */
HWND hMainWindow = NULL;
BOOL fChildPreview = FALSE;
HINSTANCE hMainInstance;
TCHAR szName[TITLEBARNAMELEN];
TCHAR szAppName[APPNAMEBUFFERLEN];
TCHAR szIniFile[MAXFILELEN];
TCHAR szScreenSaver[22];
TCHAR szHelpFile[MAXFILELEN];
TCHAR szNoHelpMemory[BUFFLEN];
UINT MyHelpMessage;
/* local house keeping */
static HINSTANCE hPwdLib = NULL;
static POINT pt_orig;
static BOOL checking_pwd = FALSE;
static BOOL closing = FALSE;
static BOOL w95 = FALSE;
typedef void (*PVFV)(void);
typedef BOOL (WINAPI *VERIFYPWDPROC)(HWND);
typedef DWORD (WINAPI *CHPWDPROC)(LPCTSTR, HWND, DWORD, PVOID);
static VERIFYPWDPROC VerifyScreenSavePwd = NULL;
/* function names */
#define szVerifyPassword "VerifyScreenSavePwd"
#ifdef UNICODE
#define szPwdChangePassword "PwdChangePasswordW"
#else
#define szPwdChangePassword "PwdChangePasswordA"
#endif
static void TerminateScreenSaver(HWND hWnd);
static BOOL RegisterClasses(void);
static LRESULT WINAPI SysScreenSaverProc(HWND,UINT,WPARAM,LPARAM);
static int LaunchScreenSaver(HWND hParent);
static void LaunchConfig(void);
static int ISSPACE(char c)
{
return (c == ' ' || c == '\t');
}
static ULONG_PTR parse_ulptr(const char *s)
{
ULONG_PTR res, n;
const char *p;
for (p = s; *p; p++)
if (*p < '0' || *p > '9')
break;
p--;
res = 0;
for (n = 1; p >= s; p--, n *= 10)
res += (*p - '0') * n;
return res;
}
/* screen saver entry point */
int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrevInst,
LPSTR CmdLine, int nCmdShow)
{
LPSTR p;
OSVERSIONINFO vi;
UNREFERENCED_PARAMETER(hPrevInst);
UNREFERENCED_PARAMETER(nCmdShow);
/* initialize */
hMainInstance = hInst;
vi.dwOSVersionInfoSize = sizeof(vi);
GetVersionEx(&vi);
/* check if we are going to check for passwords */
if (vi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
{
HKEY hKey;
/* we are using windows 95 */
w95 = TRUE;
if (RegOpenKey(HKEY_CURRENT_USER, REGSTR_PATH_SCREENSAVE ,&hKey) ==
ERROR_SUCCESS)
{
DWORD check_pwd;
DWORD size = sizeof(DWORD);
DWORD type;
LONG res;
res = RegQueryValueEx(hKey, REGSTR_VALUE_USESCRPASSWORD,
NULL, &type, (PBYTE) &check_pwd, &size);
if (check_pwd && res == ERROR_SUCCESS)
{
hPwdLib = LoadLibrary(TEXT("PASSWORD.CPL"));
if (hPwdLib)
VerifyScreenSavePwd = (VERIFYPWDPROC)(PVFV) GetProcAddress(hPwdLib, szVerifyPassword);
}
RegCloseKey(hKey);
}
}
/* parse arguments */
for (p = CmdLine; *p; p++)
{
switch (*p)
{
case 'S':
case 's':
/* start screen saver */
return LaunchScreenSaver(NULL);
case 'P':
case 'p':
{
/* start screen saver in preview window */
HWND hParent;
fChildPreview = TRUE;
while (ISSPACE(*++p));
hParent = (HWND) parse_ulptr(p);
if (hParent && IsWindow(hParent))
return LaunchScreenSaver(hParent);
}
return 0;
case 'C':
case 'c':
/* display configure dialog */
LaunchConfig();
return 0;
case 'A':
case 'a':
{
/* change screen saver password */
HWND hParent;
while (ISSPACE(*++p));
hParent = (HWND) parse_ulptr(p);
if (!hParent || !IsWindow(hParent))
hParent = GetForegroundWindow();
ScreenSaverChangePassword(hParent);
}
return 0;
case '-':
case '/':
case ' ':
default:
break;
}
}
LaunchConfig();
return 0;
}
static void LaunchConfig(void)
{
/* FIXME: should this be called */
RegisterDialogClasses(hMainInstance);
/* display configure dialog */
DialogBox(hMainInstance, MAKEINTRESOURCE(DLG_SCRNSAVECONFIGURE),
GetForegroundWindow(), (DLGPROC)(PVFV) ScreenSaverConfigureDialog);
}
static int LaunchScreenSaver(HWND hParent)
{
BOOL foo;
UINT style;
RECT rc;
MSG msg;
/* don't allow other tasks to get into the foreground */
if (w95 && !fChildPreview)
SystemParametersInfo(SPI_SCREENSAVERRUNNING, TRUE, &foo, 0);
msg.wParam = 0;
/* register classes, both user defined and classes used by screen saver
library */
if (!RegisterClasses())
{
MessageBox(NULL, TEXT("RegisterClasses() failed"), NULL, MB_ICONHAND);
goto restore;
}
/* a slightly different approach needs to be used when displaying
in a preview window */
if (hParent)
{
style = WS_CHILD;
GetClientRect(hParent, &rc);
}
else
{
style = WS_POPUP;
rc.left = GetSystemMetrics(SM_XVIRTUALSCREEN);
rc.top = GetSystemMetrics(SM_YVIRTUALSCREEN);
rc.right = GetSystemMetrics(SM_CXVIRTUALSCREEN);
rc.bottom = GetSystemMetrics(SM_CYVIRTUALSCREEN);
style |= WS_VISIBLE;
}
/* create main screen saver window */
hMainWindow = CreateWindowEx(hParent ? 0 : WS_EX_TOPMOST, CLASS_SCRNSAVE,
TEXT("SCREENSAVER"), style,
rc.left, rc.top, rc.right, rc.bottom, hParent, NULL,
hMainInstance, NULL);
/* display window and start pumping messages */
if (hMainWindow)
{
UpdateWindow(hMainWindow);
ShowWindow(hMainWindow, SW_SHOW);
while (GetMessage(&msg, NULL, 0, 0) == TRUE)
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
restore:
/* restore system */
if (w95 && !fChildPreview)
SystemParametersInfo(SPI_SCREENSAVERRUNNING, FALSE, &foo, 0);
FreeLibrary(hPwdLib);
return msg.wParam;
}
/* this function takes care of *must* do tasks, like terminating
screen saver */
static LRESULT WINAPI SysScreenSaverProc(HWND hWnd, UINT msg,
WPARAM wParam, LPARAM lParam)
{
switch (msg)
{
case WM_CREATE:
if (!fChildPreview)
SetCursor(NULL);
/* mouse is not supposed to move from this position */
GetCursorPos(&pt_orig);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_TIMER:
if (closing)
return 0;
break;
case WM_PAINT:
if (closing)
return DefWindowProc(hWnd, msg, wParam, lParam);
break;
case WM_SYSCOMMAND:
if (!fChildPreview)
switch (wParam)
{
case SC_CLOSE:
case SC_SCREENSAVE:
case SC_NEXTWINDOW:
case SC_PREVWINDOW:
return FALSE;
}
break;
case WM_MOUSEMOVE:
case WM_LBUTTONDOWN:
case WM_RBUTTONDOWN:
case WM_MBUTTONDOWN:
case WM_KEYDOWN:
case WM_SYSKEYDOWN:
case WM_NCACTIVATE:
case WM_ACTIVATE:
case WM_ACTIVATEAPP:
if (closing)
return DefWindowProc(hWnd, msg, wParam, lParam);
break;
}
return ScreenSaverProc(hWnd, msg, wParam, lParam);
}
LRESULT WINAPI DefScreenSaverProc(HWND hWnd, UINT msg,
WPARAM wParam, LPARAM lParam)
{
/* don't do any special processing when in preview mode */
if (fChildPreview || closing)
return DefWindowProc(hWnd, msg, wParam, lParam);
switch (msg)
{
case WM_CLOSE:
TerminateScreenSaver(hWnd);
/* do NOT pass this to DefWindowProc; it will terminate even if
an invalid password was given.
*/
return 0;
case SCRM_VERIFYPW:
/* verify password or return TRUE if password checking is turned off */
if (VerifyScreenSavePwd)
return VerifyScreenSavePwd(hWnd);
else
return TRUE;
case WM_SETCURSOR:
if (checking_pwd)
break;
SetCursor(NULL);
return TRUE;
case WM_NCACTIVATE:
case WM_ACTIVATE:
case WM_ACTIVATEAPP:
/* if wParam is FALSE then I am losing focus */
if (wParam == FALSE && !checking_pwd)
PostMessage(hWnd, WM_CLOSE, 0, 0);
break;
case WM_MOUSEMOVE:
{
POINT pt;
GetCursorPos(&pt);
if (pt.x == pt_orig.x && pt.y == pt_orig.y)
break;
/* mouse moved */
}
/* fallthrough */
case WM_LBUTTONDOWN:
case WM_RBUTTONDOWN:
case WM_MBUTTONDOWN:
case WM_KEYDOWN:
case WM_SYSKEYDOWN:
/* try to terminate screen saver */
if (!checking_pwd)
PostMessage(hWnd, WM_CLOSE, 0, 0);
break;
}
return DefWindowProc(hWnd, msg, wParam, lParam);
}
static void TerminateScreenSaver(HWND hWnd)
{
/* don't allow recursion */
if (checking_pwd || closing)
return;
/* verify password */
if (VerifyScreenSavePwd)
{
checking_pwd = TRUE;
closing = SendMessage(hWnd, SCRM_VERIFYPW, 0, 0);
checking_pwd = FALSE;
}
else
closing = TRUE;
/* are we closing? */
if (closing)
{
DestroyWindow(hWnd);
}
else
GetCursorPos(&pt_orig); /* if not: get new mouse position */
}
/*
Register screen saver window class and call user
supplied hook.
*/
static BOOL RegisterClasses(void)
{
WNDCLASS cls;
cls.hCursor = NULL;
cls.hIcon = LoadIcon(hMainInstance, MAKEINTATOM(ID_APP));
cls.lpszMenuName = NULL;
cls.lpszClassName = CLASS_SCRNSAVE;
cls.hbrBackground = GetStockObject(BLACK_BRUSH);
cls.hInstance = hMainInstance;
cls.style = CS_VREDRAW | CS_HREDRAW | CS_SAVEBITS | CS_PARENTDC;
cls.lpfnWndProc = SysScreenSaverProc;
cls.cbWndExtra = 0;
cls.cbClsExtra = 0;
if (!RegisterClass(&cls))
return FALSE;
return RegisterDialogClasses(hMainInstance);
}
void WINAPI ScreenSaverChangePassword(HWND hParent)
{
/* load Master Password Router (MPR) */
HINSTANCE hMpr = LoadLibrary(TEXT("MPR.DLL"));
if (hMpr)
{
CHPWDPROC ChangePassword;
ChangePassword = (CHPWDPROC)(PVFV) GetProcAddress(hMpr, szPwdChangePassword);
/* change password for screen saver provider */
if (ChangePassword)
ChangePassword(TEXT("SCRSAVE"), hParent, 0, NULL);
FreeLibrary(hMpr);
}
}

View file

@ -15,6 +15,7 @@
#include <basetyps.h>
#include <credentialprovider.h>
#include <functiondiscoverykeys.h>
#include <textstor.h>
#include <shobjidl.h>
#include <propkey.h>

View file

@ -12,6 +12,6 @@ WspiapiFreeAddrInfo (struct addrinfo *ai)
static WSPIAPI_PFREEADDRINFO pfFreeAddrInfo = NULL;
if (!pfFreeAddrInfo)
pfFreeAddrInfo = (WSPIAPI_PFREEADDRINFO) WspiapiLoad(2);
pfFreeAddrInfo = (WSPIAPI_PFREEADDRINFO)(void(*)(void)) WspiapiLoad(2);
(*pfFreeAddrInfo) (ai);
}

View file

@ -14,7 +14,7 @@ WspiapiGetAddrInfo(const char *nodename, const char *servname,
int err;
if (!pfGetAddrInfo)
pfGetAddrInfo = (WSPIAPI_PGETADDRINFO) WspiapiLoad (0);
pfGetAddrInfo = (void*) WspiapiLoad (0);
err = (*pfGetAddrInfo) (nodename, servname, hints, res);
WSASetLastError (err);
return err;

View file

@ -15,7 +15,7 @@ WspiapiGetNameInfo (const struct sockaddr *sa, socklen_t salen,
int err;
if (!pfGetNameInfo)
pfGetNameInfo = (WSPIAPI_PGETNAMEINFO) WspiapiLoad(1);
pfGetNameInfo = (void*) WspiapiLoad(1);
err = (*pfGetNameInfo) (sa, salen, host, hostlen, serv, servlen, flags);
WSASetLastError (err);
return err;

View file

@ -1,2 +1,7 @@
/* For UCRT, positive infinity */
double const _HUGE = __builtin_huge_val();
#include <_mingw.h>
#undef _HUGE
static double _HUGE = __builtin_huge_val();
double * __MINGW_IMP_SYMBOL(_HUGE) = &_HUGE;
#undef HUGE
extern double * __attribute__ ((alias (__MINGW64_STRINGIFY(__MINGW_IMP_SYMBOL(_HUGE))))) __MINGW_IMP_SYMBOL(HUGE);

21
lib/libc/mingw/math/copysign.c vendored Normal file
View file

@ -0,0 +1,21 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#include <math.h>
typedef union U
{
unsigned int u[2];
double d;
} U;
double copysign(double x, double y)
{
U h,j;
h.d = x;
j.d = y;
h.u[1] = (h.u[1] & 0x7fffffff) | (j.u[1] & 0x80000000);
return h.d;
}

19
lib/libc/mingw/math/copysignf.c vendored Normal file
View file

@ -0,0 +1,19 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#include <math.h>
typedef union ui_f {
float f;
unsigned int ui;
} ui_f;
float copysignf(float aX, float aY)
{
ui_f x,y;
x.f=aX; y.f=aY;
x.ui= (x.ui & 0x7fffffff) | (y.ui & 0x80000000);
return x.f;
}

View file

@ -4,9 +4,7 @@
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#include <internal.h>
#include <_mingw.h>
static char ** local__initenv;
static wchar_t ** local__winitenv;
char *** __MINGW_IMP_SYMBOL(__initenv) = &local__initenv;
wchar_t *** __MINGW_IMP_SYMBOL(__winitenv) = &local__winitenv;

16
lib/libc/mingw/misc/__p___initenv.c vendored Normal file
View file

@ -0,0 +1,16 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#include <_mingw.h>
extern char*** __MINGW_IMP_SYMBOL(__initenv);
char*** __cdecl __p___initenv(void);
char*** __cdecl __p___initenv(void)
{
return __MINGW_IMP_SYMBOL(__initenv);
}
char*** (__cdecl *__MINGW_IMP_SYMBOL(__p___initenv))(void) = __p___initenv;

17
lib/libc/mingw/misc/__p___winitenv.c vendored Normal file
View file

@ -0,0 +1,17 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#include <_mingw.h>
#include <stddef.h>
extern wchar_t*** __MINGW_IMP_SYMBOL(__winitenv);
wchar_t*** __cdecl __p___winitenv(void);
wchar_t*** __cdecl __p___winitenv(void)
{
return __MINGW_IMP_SYMBOL(__winitenv);
}
wchar_t*** (__cdecl *__MINGW_IMP_SYMBOL(__p___winitenv))(void) = __p___winitenv;

View file

@ -4,9 +4,8 @@
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#include <wchar.h>
#include <_mingw.h>
#include <stddef.h>
static char ** local__initenv;
static wchar_t ** local__winitenv;
char *** __MINGW_IMP_SYMBOL(__initenv) = &local__initenv;
wchar_t *** __MINGW_IMP_SYMBOL(__winitenv) = &local__winitenv;

16
lib/libc/mingw/misc/_onexit.c vendored Normal file
View file

@ -0,0 +1,16 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#include <stdlib.h>
_onexit_t __cdecl _onexit(_onexit_t func)
{
return atexit((void (__cdecl *)(void))func) == 0 ? func : NULL;
}
_onexit_t __cdecl (*__MINGW_IMP_SYMBOL(_onexit))(_onexit_t func) = _onexit;
_onexit_t __attribute__ ((alias ("_onexit"))) __cdecl onexit(_onexit_t);
extern _onexit_t (__cdecl * __attribute__ ((alias (__MINGW64_STRINGIFY(__MINGW_IMP_SYMBOL(_onexit))))) __MINGW_IMP_SYMBOL(onexit))(_onexit_t);

View file

@ -177,7 +177,7 @@ FARPROC WINAPI __delayLoadHelper2(PCImgDelayDescr pidd,FARPROC *ppfnIATEntry)
if(hmod==0) {
if(__pfnDliNotifyHook2)
hmod = (HMODULE) (((*__pfnDliNotifyHook2)(dliNotePreLoadLibrary,&dli)));
if(hmod==0) hmod = LoadLibrary(dli.szDll);
if(hmod==0) hmod = LoadLibraryA(dli.szDll);
if(hmod==0) {
dli.dwLastError = GetLastError();
if(__pfnDliFailureHook2)

View file

@ -3,36 +3,9 @@
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#include <fenv.h>
#if !(defined(_ARM_) || defined(__arm__) || defined(_ARM64_) || defined(__aarch64__))
int __mingw_has_sse (void);
int __mingw_has_sse(void)
{
int cpuInfo[4],infoType = 1;
#ifndef _WIN64
int o_flag, n_flag;
__asm__ volatile ("pushfl\n\tpopl %0" : "=mr" (o_flag));
n_flag = o_flag ^ 0x200000;
__asm__ volatile ("pushl %0\n\tpopfl" : : "g" (n_flag));
__asm__ volatile ("pushfl\n\tpopl %0" : "=mr" (n_flag));
if (n_flag == o_flag)
return 0;
#endif
__asm__ __volatile__ (
"cpuid"
: "=a" (cpuInfo[0]), "=b" (cpuInfo[1]), "=c" (cpuInfo[2]),
"=d" (cpuInfo[3])
: "a" (infoType));
if (cpuInfo[3] & 0x2000000)
return 1;
return 0;
}
#endif /* !(defined(_ARM_) || defined(__arm__) || defined(_ARM64_) || defined(__aarch64__)) */
#include <internal.h>
/* 7.6.2.1
The feclearexcept function clears the supported exceptions

View file

@ -3,11 +3,9 @@
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#include <fenv.h>
#if !(defined(_ARM_) || defined(__arm__) || defined(_ARM64_) || defined(__aarch64__))
int __mingw_has_sse (void);
#endif /* !(defined(_ARM_) || defined(__arm__) || defined(_ARM64_) || defined(__aarch64__)) */
#include <fenv.h>
#include <internal.h>
/* 7.6.4.1
The fegetenv function stores the current floating-point environment

View file

@ -3,13 +3,11 @@
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#include <fenv.h>
#include <internal.h>
#if !(defined(_ARM_) || defined(__arm__) || defined(_ARM64_) || defined(__aarch64__))
extern int __mingw_has_sse (void);
#endif /* !(defined(_ARM_) || defined(__arm__) || defined(_ARM64_) || defined(__aarch64__)) */
/* 7.6.2.2
/* 7.6.2.2
The fegetexceptflag function stores an implementation-defined
representation of the exception flags indicated by the argument
excepts in the object pointed to by the argument flagp. */
@ -32,7 +30,7 @@ int fegetexceptflag (fexcept_t * flagp, int excepts)
_mxcsr = 0;
if (__mingw_has_sse ())
__asm__ volatile ("stmxcsr %0" : "=m" (_mxcsr));
*flagp = (_mxcsr | _status) & excepts & FE_ALL_EXCEPT;
#endif /* defined(_ARM_) || defined(__arm__) || defined(_ARM64_) || defined(__aarch64__) */
return 0;

View file

@ -3,13 +3,11 @@
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#include <_mingw.h>
#include <fenv.h>
#include <float.h>
#if !(defined(_ARM_) || defined(__arm__) || defined(_ARM64_) || defined(__aarch64__))
extern int __mingw_has_sse (void);
#endif /* !(defined(_ARM_) || defined(__arm__) || defined(_ARM64_) || defined(__aarch64__)) */
#include <internal.h>
/* 7.6.4.3
The fesetenv function establishes the floating-point environment
@ -28,7 +26,7 @@ int fesetenv (const fenv_t * envp)
{
#if defined(_ARM_) || defined(__arm__)
if (envp == FE_DFL_ENV)
/* Use the choice made at app startup */
/* Use the choice made at app startup */
_fpreset();
else
__asm__ volatile ("fmxr FPSCR, %0" : : "r" (*envp));
@ -59,7 +57,7 @@ int fesetenv (const fenv_t * envp)
(* __MINGW_IMP_SYMBOL(_fpreset))();
else if (envp == FE_DFL_ENV)
/* Use the choice made at app startup */
/* Use the choice made at app startup */
_fpreset();
else

View file

@ -3,11 +3,9 @@
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#include <fenv.h>
#if !(defined(_ARM_) || defined(__arm__) || defined(_ARM64_) || defined(__aarch64__))
extern int __mingw_has_sse (void);
#endif /* !(defined(_ARM_) || defined(__arm__) || defined(_ARM64_) || defined(__aarch64__)) */
#include <fenv.h>
#include <internal.h>
/* 7.6.2.4
The fesetexceptflag function sets the complete status for those
@ -16,9 +14,9 @@ extern int __mingw_has_sse (void);
*flagp shall have been set by a previous call to fegetexceptflag
whose second argument represented at least those exceptions
represented by the argument excepts. This function does not raise
exceptions, but only sets the state of the flags. */
exceptions, but only sets the state of the flags. */
int fesetexceptflag (const fexcept_t * flagp, int excepts)
int fesetexceptflag (const fexcept_t * flagp, int excepts)
{
fenv_t _env;

View file

@ -3,11 +3,9 @@
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#include <fenv.h>
#if !(defined(_ARM_) || defined(__arm__) || defined(_ARM64_) || defined(__aarch64__))
int __mingw_has_sse (void);
#endif /* !(defined(_ARM_) || defined(__arm__) || defined(_ARM64_) || defined(__aarch64__)) */
#include <fenv.h>
#include <internal.h>
/* 7.6.3.2
The fesetround function establishes the rounding direction
@ -42,7 +40,7 @@ int fesetround (int mode)
_cw &= ~0xc00;
_cw |= mode;
__asm__ volatile ("fldcw %0;" : : "m" (*&_cw));
if (__mingw_has_sse ())
{
int mxcsr;

View file

@ -4,13 +4,10 @@
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#include <fenv.h>
#include <fenv.h>
#include <internal.h>
#if !(defined(_ARM_) || defined(__arm__) || defined(_ARM64_) || defined(__aarch64__))
extern int __mingw_has_sse (void);
#endif /* !(defined(_ARM_) || defined(__arm__) || defined(_ARM64_) || defined(__aarch64__)) */
/* 7.6.2.5
/* 7.6.2.5
The fetestexcept function determines which of a specified subset of
the exception flags are currently set. The excepts argument
specifies the exception flags to be queried.

View file

@ -80,12 +80,6 @@ char *optarg; /* argument associated with option */
#define BADARG ((*options == ':') ? (int)':' : (int)'?')
#define INORDER (int)1
#ifndef __CYGWIN__
#define __progname __argv[0]
#else
extern char __declspec(dllimport) *__progname;
#endif
#ifdef __CYGWIN__
static char EMSG[] = "";
#else
@ -114,20 +108,20 @@ static const char illoptchar[] = "unknown option -- %c";
static const char illoptstring[] = "unknown option -- %s";
static void
_vwarnx(const char *fmt,va_list ap)
_vwarnx(const char *argv0,const char *fmt,va_list ap)
{
(void)fprintf(stderr,"%s: ",__progname);
(void)fprintf(stderr,"%s: ",argv0);
if (fmt != NULL)
(void)vfprintf(stderr,fmt,ap);
(void)fprintf(stderr,"\n");
}
static void
warnx(const char *fmt,...)
warnx(const char *argv0,const char *fmt,...)
{
va_list ap;
va_start(ap,fmt);
_vwarnx(fmt,ap);
_vwarnx(argv0,fmt,ap);
va_end(ap);
}
@ -244,7 +238,7 @@ parse_long_options(char * const *nargv, const char *options,
if (ambiguous) {
/* ambiguous abbreviation */
if (PRINT_ERROR)
warnx(ambig, (int)current_argv_len,
warnx(nargv[0], ambig, (int)current_argv_len,
current_argv);
optopt = 0;
return (BADCH);
@ -253,7 +247,7 @@ parse_long_options(char * const *nargv, const char *options,
if (long_options[match].has_arg == no_argument
&& has_equal) {
if (PRINT_ERROR)
warnx(noarg, (int)current_argv_len,
warnx(nargv[0], noarg, (int)current_argv_len,
current_argv);
/*
* XXX: GNU sets optopt to val regardless of flag
@ -283,7 +277,7 @@ parse_long_options(char * const *nargv, const char *options,
* should be generated.
*/
if (PRINT_ERROR)
warnx(recargstring,
warnx(nargv[0], recargstring,
current_argv);
/*
* XXX: GNU sets optopt to val regardless of flag
@ -301,7 +295,7 @@ parse_long_options(char * const *nargv, const char *options,
return (-1);
}
if (PRINT_ERROR)
warnx(illoptstring, current_argv);
warnx(nargv[0], illoptstring, current_argv);
optopt = 0;
return (BADCH);
}
@ -467,7 +461,7 @@ start:
if (!*place)
++optind;
if (PRINT_ERROR)
warnx(illoptchar, optchar);
warnx(nargv[0], illoptchar, optchar);
optopt = optchar;
return (BADCH);
}
@ -478,7 +472,7 @@ start:
else if (++optind >= nargc) { /* no arg */
place = EMSG;
if (PRINT_ERROR)
warnx(recargchar, optchar);
warnx(nargv[0], recargchar, optchar);
optopt = optchar;
return (BADARG);
} else /* white space */
@ -499,7 +493,7 @@ start:
if (++optind >= nargc) { /* no arg */
place = EMSG;
if (PRINT_ERROR)
warnx(recargchar, optchar);
warnx(nargv[0], recargchar, optchar);
optopt = optchar;
return (BADARG);
} else

View file

@ -7,6 +7,7 @@
#include <share.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <limits.h>
/*
The mkstemp() function generates a unique temporary filename from template,
@ -25,8 +26,8 @@
*/
int __cdecl mkstemp (char *template_name)
{
int i, j, fd, len, index;
unsigned int r;
int j, fd, len, index;
unsigned int i, r;
/* These are the (62) characters used in temporary filenames. */
static const char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
@ -41,11 +42,8 @@ int __cdecl mkstemp (char *template_name)
/* User may supply more than six trailing Xs */
for (index = len - 6; index > 0 && template_name[index - 1] == 'X'; index--);
/*
Like OpenBSD, mkstemp() will try at least 2 ** 31 combinations before
giving up.
*/
for (i = 0; i >= 0; i++) {
/* Like OpenBSD, mkstemp() will try 2 ** 31 combinations before giving up. */
for (i = 0; i <= INT_MAX; i++) {
for(j = index; j < len; j++) {
if (rand_s(&r))
r = rand();

25
lib/libc/mingw/misc/ucrt__getmainargs.c vendored Normal file
View file

@ -0,0 +1,25 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#undef __MSVCRT_VERSION__
#define _UCRT
#include <corecrt_startup.h>
#include <internal.h>
#include <stdlib.h>
#include <new.h>
int __cdecl __getmainargs(int *argc, char ***argv, char ***env, int DoWildCard, _startupinfo *StartInfo)
{
_initialize_narrow_environment();
_configure_narrow_argv(DoWildCard ? _crt_argv_expanded_arguments : _crt_argv_unexpanded_arguments);
*argc = *__p___argc();
*argv = *__p___argv();
*env = *__p__environ();
_set_new_mode(StartInfo->newmode);
return 0;
}
int __cdecl (*__MINGW_IMP_SYMBOL(__getmainargs))(int *, char ***, char ***, int, _startupinfo *) = __getmainargs;

View file

@ -0,0 +1,25 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#undef __MSVCRT_VERSION__
#define _UCRT
#include <corecrt_startup.h>
#include <internal.h>
#include <stdlib.h>
#include <new.h>
int __cdecl __wgetmainargs(int *argc, wchar_t ***argv, wchar_t ***env, int DoWildCard, _startupinfo *StartInfo)
{
_initialize_wide_environment();
_configure_wide_argv(DoWildCard ? _crt_argv_expanded_arguments : _crt_argv_unexpanded_arguments);
*argc = *__p___argc();
*argv = *__p___wargv();
*env = *__p__wenviron();
_set_new_mode(StartInfo->newmode);
return 0;
}
int __cdecl (*__MINGW_IMP_SYMBOL(__wgetmainargs))(int *, wchar_t ***, wchar_t ***, int, _startupinfo *) = __wgetmainargs;

19
lib/libc/mingw/misc/ucrt_amsg_exit.c vendored Normal file
View file

@ -0,0 +1,19 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#undef __MSVCRT_VERSION__
#define _UCRT
#include <stdio.h>
#include <stdlib.h>
#include <internal.h>
void __cdecl __MINGW_ATTRIB_NORETURN _amsg_exit(int ret)
{
fprintf(stderr, "runtime error %d\n", ret);
_exit(255);
}
void __cdecl (*__MINGW_IMP_SYMBOL(_amsg_exit))(int) = _amsg_exit;

View file

@ -0,0 +1,24 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#undef __MSVCRT_VERSION__
#define _UCRT
#include <stdlib.h>
#include <corecrt_startup.h>
extern char __mingw_module_is_dll;
int __cdecl at_quick_exit(void (__cdecl *func)(void))
{
// In a DLL, we can't register a function with _crt_at_quick_exit, because
// we can't unregister it when the DLL is unloaded. This matches how
// at_quick_exit/quick_exit work with MSVC with a dynamically linked CRT.
if (__mingw_module_is_dll)
return 0;
return _crt_at_quick_exit(func);
}
int __cdecl (*__MINGW_IMP_SYMBOL(at_quick_exit))(void (__cdecl *)(void)) = at_quick_exit;

45
lib/libc/mingw/misc/ucrt_tzset.c vendored Normal file
View file

@ -0,0 +1,45 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#undef __MSVCRT_VERSION__
#define _UCRT
#include <time.h>
// These are required to provide the unrepfixed data symbols "timezone"
// and "tzname"; we can't remap "timezone" via a define due to clashes
// with e.g. "struct timezone".
typedef void __cdecl (*_tzset_func)(void);
extern _tzset_func __MINGW_IMP_SYMBOL(_tzset);
// Default initial values until _tzset has been called; these are the same
// as the initial values in msvcrt/ucrtbase.
static char initial_tzname0[] = "PST";
static char initial_tzname1[] = "PDT";
static char *initial_tznames[] = { initial_tzname0, initial_tzname1 };
static long initial_timezone = 28800;
static int initial_daylight = 1;
char** __MINGW_IMP_SYMBOL(tzname) = initial_tznames;
long * __MINGW_IMP_SYMBOL(timezone) = &initial_timezone;
int * __MINGW_IMP_SYMBOL(daylight) = &initial_daylight;
void __cdecl _tzset(void)
{
__MINGW_IMP_SYMBOL(_tzset)();
// Redirect the __imp_ pointers to the actual data provided by the UCRT.
// From this point, the exposed values should stay in sync.
__MINGW_IMP_SYMBOL(tzname) = _tzname;
__MINGW_IMP_SYMBOL(timezone) = __timezone();
__MINGW_IMP_SYMBOL(daylight) = __daylight();
}
void __cdecl tzset(void)
{
_tzset();
}
// Dummy/unused __imp_ wrappers, to make GNU ld not autoexport these symbols.
void __cdecl (*__MINGW_IMP_SYMBOL(tzset))(void) = tzset;

View file

@ -33,6 +33,7 @@
#define valid(n, b) ((n) >= 0 && (n) < (b))
intmax_t
__cdecl
wcstoimax(const wchar_t * __restrict__ nptr, wchar_t ** __restrict__ endptr, int base)
{
register uintmax_t accum; /* accumulates converted value */
@ -116,6 +117,16 @@ wcstoimax(const wchar_t * __restrict__ nptr, wchar_t ** __restrict__ endptr, int
else
return (intmax_t)(minus ? -accum : accum);
}
intmax_t (__cdecl *__MINGW_IMP_SYMBOL(wcstoimax))(const wchar_t * __restrict__, wchar_t ** __restrict__, int) = wcstoimax;
long long __attribute__ ((alias ("wcstoimax")))
__cdecl
wcstoll (const wchar_t* __restrict__ nptr, wchar_t ** __restrict__ endptr, int base);
extern long long __attribute__ ((alias (__MINGW64_STRINGIFY(__MINGW_IMP_SYMBOL(wcstoimax)))))
(__cdecl *__MINGW_IMP_SYMBOL(wcstoll))(const wchar_t * __restrict__, wchar_t ** __restrict__, int);
long long __attribute__ ((alias ("wcstoimax")))
__cdecl
_wcstoi64 (const wchar_t* __restrict__ nptr, wchar_t ** __restrict__ endptr, int base);
extern long long __attribute__ ((alias (__MINGW64_STRINGIFY(__MINGW_IMP_SYMBOL(wcstoimax)))))
(__cdecl *__MINGW_IMP_SYMBOL(_wcstoi64))(const wchar_t * __restrict__, wchar_t ** __restrict__, int);

View file

@ -33,6 +33,7 @@
#define valid(n, b) ((n) >= 0 && (n) < (b))
uintmax_t
__cdecl
wcstoumax(const wchar_t * __restrict__ nptr, wchar_t ** __restrict__ endptr, int base)
{
register uintmax_t accum; /* accumulates converted value */
@ -110,6 +111,16 @@ wcstoumax(const wchar_t * __restrict__ nptr, wchar_t ** __restrict__ endptr, int
else
return minus ? -accum : accum; /* (yes!) */
}
uintmax_t (__cdecl *__MINGW_IMP_SYMBOL(wcstoumax))(const wchar_t * __restrict__, wchar_t ** __restrict__, int) = wcstoumax;
unsigned long long __attribute__ ((alias ("wcstoumax")))
__cdecl
wcstoull (const wchar_t* __restrict__ nptr, wchar_t ** __restrict__ endptr, int base);
extern unsigned long long __attribute__ ((alias (__MINGW64_STRINGIFY(__MINGW_IMP_SYMBOL(wcstoumax)))))
(__cdecl *__MINGW_IMP_SYMBOL(wcstoull))(const wchar_t * __restrict__, wchar_t ** __restrict__, int);
unsigned long long __attribute__ ((alias ("wcstoumax")))
__cdecl
_wcstoui64 (const wchar_t* __restrict__ nptr, wchar_t ** __restrict__ endptr, int base);
extern unsigned long long __attribute__ ((alias (__MINGW64_STRINGIFY(__MINGW_IMP_SYMBOL(wcstoumax)))))
(__cdecl *__MINGW_IMP_SYMBOL(_wcstoui64))(const wchar_t * __restrict__, wchar_t ** __restrict__, int);

View file

@ -1,52 +0,0 @@
#define __CRT__NO_INLINE
#include <sys/stat.h>
/* FIXME: Relying on _USE_32BIT_TIME_T, which is a user-macro,
during CRT compilation is plainly broken. Need an appropriate
implementation to provide users the ability of compiling the
CRT only with 32-bit time_t behavior. */
#if defined(_USE_32BIT_TIME_T)
int __cdecl
fstat(int _Desc,struct stat *_Stat)
{
struct _stat32 st;
int ret=_fstat32(_Desc,&st);
if (ret == -1) {
memset(_Stat,0,sizeof(struct stat));
return -1;
}
/* struct stat and struct _stat32
are the same for this case. */
memcpy(_Stat, &st, sizeof(struct _stat32));
return ret;
}
#else
int __cdecl
fstat(int _Desc,struct stat *_Stat)
{
struct _stat64 st;
int ret=_fstat64(_Desc,&st);
if (ret == -1) {
memset(_Stat,0,sizeof(struct stat));
return -1;
}
/* struct stat and struct _stat64i32
are the same for this case. */
_Stat->st_dev=st.st_dev;
_Stat->st_ino=st.st_ino;
_Stat->st_mode=st.st_mode;
_Stat->st_nlink=st.st_nlink;
_Stat->st_uid=st.st_uid;
_Stat->st_gid=st.st_gid;
_Stat->st_rdev=st.st_rdev;
_Stat->st_size=(_off_t) st.st_size;
_Stat->st_atime=st.st_atime;
_Stat->st_mtime=st.st_mtime;
_Stat->st_ctime=st.st_ctime;
return ret;
}
#endif
/* Add __imp__fstat and __imp__stat symbols. */
int (*__MINGW_IMP_SYMBOL(fstat))(int, struct stat *) = &fstat;

View file

@ -1,19 +0,0 @@
#define __CRT__NO_INLINE
#include <sys/stat.h>
#include <sys/timeb.h>
/* FIXME: Relying on _USE_32BIT_TIME_T, which is a user-macro,
during CRT compilation is plainly broken. Need an appropriate
implementation to provide users the ability of compiling the
CRT only with 32-bit time_t behavior. */
#if defined(_USE_32BIT_TIME_T)
void __cdecl ftime (struct timeb *b)
{
return _ftime ((struct __timeb32 *)b);
}
#else
void __cdecl ftime (struct timeb *b)
{
_ftime64((struct __timeb64 *)b);
}
#endif

View file

@ -1,5 +0,0 @@
#include <stdio.h>
int __cdecl fgetpos64(FILE * __restrict__ _File ,fpos_t * __restrict__ _Pos){
return fgetpos(_File, _Pos);
}

View file

@ -1,5 +0,0 @@
#include <stdio.h>
int __cdecl fsetpos64(FILE *_File,const fpos_t *_Pos){ /* fsetpos already 64bit */
return fsetpos(_File,_Pos);
}

View file

@ -123,7 +123,7 @@ static LPWSTR xp_getfilepath(const HANDLE f, const LARGE_INTEGER fsize){
if (temp) free(temp);
if (pMem) UnmapViewOfFile(pMem);
if (hFileMap) CloseHandle(hFileMap);
_set_errno(EBADF);
errno = EBADF;
return NULL;
}
#endif /* _CHECK_SPACE_BY_PSAPI_METHOD_ */
@ -142,7 +142,7 @@ checkfreespace (const HANDLE f, const ULONGLONG requiredspace)
check = GetFileSizeEx (f, &currentsize);
if (!check)
{
_set_errno(EBADF);
errno = EBADF;
return -1; /* Error checking file size */
}
@ -159,19 +159,19 @@ checkfreespace (const HANDLE f, const ULONGLONG requiredspace)
check = GetFinalPathNameByHandleW(f,filepath,0,FILE_NAME_NORMALIZED|VOLUME_NAME_GUID);
err = GetLastError();
if (err == ERROR_PATH_NOT_FOUND || err == ERROR_INVALID_PARAMETER) {
_set_errno(EINVAL);
errno = EINVAL;
return -1; /* IO error */
}
filepath = calloc(check + 1,sizeof(wchar_t));
if (!filepath) {
_set_errno(EBADF);
errno = EBADF;
return -1; /* Out of memory */
}
check = GetFinalPathNameByHandleW(f,filepath,check,FILE_NAME_NORMALIZED|VOLUME_NAME_GUID);
/* FIXME: last error was set to error 87 (0x57)
"The parameter is incorrect." for some reason but works out */
if (!check) {
_set_errno(EBADF);
errno = EBADF;
return -1; /* Error resolving filename */
}
#endif /* _CHECK_SPACE_BY_VISTA_METHOD_ */
@ -185,21 +185,21 @@ checkfreespace (const HANDLE f, const ULONGLONG requiredspace)
free(filepath);
filepath = NULL;
if (!dirpath) {
_set_errno(EBADF);
errno = EBADF;
return -1; /* Out of memory */
}
#endif /* _CHECK_SPACE_BY_PSAPI_METHOD_ */
#if _CHECK_SPACE_BY_VOLUME_METHOD_
if(!GetFileInformationByHandle(f,&fileinfo)) {
_set_errno(EINVAL);
errno = EINVAL;
return -1; /* Resolution failure */
}
volumeid = calloc(51,sizeof(wchar_t));
volumepath = calloc(MAX_PATH+2,sizeof(wchar_t));
if(!volumeid || !volumepath) {
_set_errno(EBADF);
errno = EBADF;
return -1; /* Out of memory */
}
@ -226,14 +226,14 @@ checkfreespace (const HANDLE f, const ULONGLONG requiredspace)
//wprintf(L"freespace %I64u\n",freespace);
free(dirpath);
if(!check) {
_set_errno(EFBIG);
errno = EFBIG;
return -1; /* Error getting free space */
}
/* Check space requirements */
if ((requiredspace - currentsize.QuadPart) > freespace.QuadPart)
{
_set_errno(EFBIG); /* File too big for disk */
errno = EFBIG; /* File too big for disk */
return -1;
} /* We have enough space to truncate/expand */
return 0;
@ -258,7 +258,7 @@ int ftruncate64(int __fd, _off64_t __length) {
f = (HANDLE)_get_osfhandle(__fd);
if (f == INVALID_HANDLE_VALUE || (GetFileType(f) != FILE_TYPE_DISK)) {
_set_errno(EBADF);
errno = EBADF;
return -1;
}
@ -279,13 +279,13 @@ int ftruncate64(int __fd, _off64_t __length) {
if (check == INVALID_SET_FILE_POINTER && quad.LowPart != INVALID_SET_FILE_POINTER) {
switch (GetLastError()) {
case ERROR_NEGATIVE_SEEK:
_set_errno(EFBIG); /* file too big? */
errno = EFBIG; /* file too big? */
return -1;
case INVALID_SET_FILE_POINTER:
_set_errno(EINVAL); /* shouldn't happen */
errno = EINVAL; /* shouldn't happen */
return -1;
default:
_set_errno(EINVAL); /* shouldn't happen */
errno = EINVAL; /* shouldn't happen */
return -1;
}
}
@ -302,7 +302,7 @@ int ftruncate64(int __fd, _off64_t __length) {
return ret;
errorout:
_set_errno(EINVAL);
errno = EINVAL;
return -1;
}

View file

@ -7,9 +7,9 @@ int truncate(const char *pathname, _off_t len){
int fd = _open(pathname,_O_BINARY|_O_RDWR);
if (fd == -1) return fd;
ret = ftruncate(fd,len);
_get_errno(&err);
err = errno;
_close(fd);
_set_errno(err);
errno = err;
return ret;
}
@ -18,8 +18,8 @@ int truncate64(const char *pathname, _off64_t len){
int fd = _open(pathname,_O_BINARY|_O_RDWR);
if (fd == -1) return fd;
ret = ftruncate64(fd,len);
_get_errno(&err);
err = errno;
_close(fd);
_set_errno(err);
errno = err;
return ret;
}

21
lib/libc/mingw/stdio/ucrt__scprintf.c vendored Normal file
View file

@ -0,0 +1,21 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#undef __MSVCRT_VERSION__
#define _UCRT
#include <stdio.h>
#include <stdarg.h>
int __cdecl _scprintf(const char * __restrict__ _Format, ...)
{
int ret;
va_list _ArgList;
va_start(_ArgList, _Format);
ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, NULL, 0, _Format, NULL, _ArgList);
va_end(_ArgList);
return ret;
}
int __cdecl (*__MINGW_IMP_SYMBOL(_scprintf))(const char *__restrict__, ...) = _scprintf;

21
lib/libc/mingw/stdio/ucrt__snprintf.c vendored Normal file
View file

@ -0,0 +1,21 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#undef __MSVCRT_VERSION__
#define _UCRT
#include <stdio.h>
#include <stdarg.h>
int __cdecl _snprintf(char * __restrict__ _Dest, size_t _Count, const char * __restrict__ _Format, ...)
{
int ret;
va_list _Args;
va_start(_Args, _Format);
ret = __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, _Dest, _Count, _Format, NULL, _Args);
va_end(_Args);
return ret;
}
int __cdecl (*__MINGW_IMP_SYMBOL(_snprintf))(char *__restrict__, size_t, const char *__restrict__, ...) = _snprintf;

21
lib/libc/mingw/stdio/ucrt__snscanf.c vendored Normal file
View file

@ -0,0 +1,21 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#undef __MSVCRT_VERSION__
#define _UCRT
#include <stdio.h>
#include <stdarg.h>
int __cdecl _snscanf(const char * __restrict__ _Src, size_t _MaxCount, const char * __restrict__ _Format, ...)
{
int ret;
va_list _ArgList;
va_start(_ArgList, _Format);
ret = __stdio_common_vsscanf(0, _Src, _MaxCount, _Format, NULL, _ArgList);
va_end(_ArgList);
return ret;
}
int __cdecl (*__MINGW_IMP_SYMBOL(_snscanf))(const char *__restrict__, size_t, const char * __restrict__, ...) = _snscanf;

View file

@ -30,7 +30,7 @@ int __cdecl _snwprintf(wchar_t * restrict _Dest, size_t _Count, const wchar_t *
va_list ap;
int ret;
va_start(ap, _Format);
ret = vsnwprintf(_Dest, _Count, _Format, ap);
ret = __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, _Dest, _Count, _Format, NULL, ap);
va_end(ap);
return ret;
}

View file

@ -10,6 +10,6 @@
int __cdecl _vscprintf(const char * __restrict__ _Format, va_list _ArgList)
{
return __stdio_common_vsprintf(_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, NULL, 0, _Format, NULL, _ArgList);
return __stdio_common_vsprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, NULL, 0, _Format, NULL, _ArgList);
}
int __cdecl (*__MINGW_IMP_SYMBOL(_vscprintf))(const char *__restrict__, va_list) = _vscprintf;

Some files were not shown because too many files have changed in this diff Show more