add clang

This commit is contained in:
Dawid Sobczak 2025-04-18 12:38:54 +01:00
parent 4715742aa8
commit 9a4b261179
890 changed files with 229323 additions and 20 deletions

View file

@ -0,0 +1,189 @@
@rem ------------------------------------------------------
@rem batch file to build tcc using mingw, msvc or tcc itself
@rem ------------------------------------------------------
@echo off
setlocal
if (%1)==(-clean) goto :cleanup
set CC=gcc
set /p VERSION= < ..\VERSION
set INST=
set BIN=
set DOC=no
set EXES_ONLY=no
goto :a0
:a2
shift
:a3
shift
:a0
if not (%1)==(-c) goto :a1
set CC=%~2
if (%2)==(cl) set CC=@call :cl
goto :a2
:a1
if (%1)==(-t) set T=%2&& goto :a2
if (%1)==(-v) set VERSION=%~2&& goto :a2
if (%1)==(-i) set INST=%2&& goto :a2
if (%1)==(-b) set BIN=%2&& goto :a2
if (%1)==(-d) set DOC=yes&& goto :a3
if (%1)==(-x) set EXES_ONLY=yes&& goto :a3
if (%1)==() goto :p1
:usage
echo usage: build-tcc.bat [ options ... ]
echo options:
echo -c prog use prog (gcc/tcc/cl) to compile tcc
echo -c "prog options" use prog with options to compile tcc
echo -t 32/64 force 32/64 bit default target
echo -v "version" set tcc version
echo -i tccdir install tcc into tccdir
echo -b bindir optionally install binaries into bindir elsewhere
echo -d create tcc-doc.html too (needs makeinfo)
echo -x just create the executables
echo -clean delete all previously produced files and directories
exit /B 1
@rem ------------------------------------------------------
@rem sub-routines
:cleanup
set LOG=echo
%LOG% removing files:
for %%f in (*tcc.exe libtcc.dll lib\*.a) do call :del_file %%f
for %%f in (..\config.h ..\config.texi) do call :del_file %%f
for %%f in (include\*.h) do @if exist ..\%%f call :del_file %%f
for %%f in (include\tcclib.h examples\libtcc_test.c) do call :del_file %%f
for %%f in (*.o *.obj *.def *.pdb *.lib *.exp *.ilk) do call :del_file %%f
%LOG% removing directories:
for %%f in (doc libtcc) do call :del_dir %%f
%LOG% done.
exit /B 0
:del_file
if exist %1 del %1 && %LOG% %1
exit /B 0
:del_dir
if exist %1 rmdir /Q/S %1 && %LOG% %1
exit /B 0
:cl
@echo off
set CMD=cl
:c0
set ARG=%1
set ARG=%ARG:.dll=.lib%
if (%1)==(-shared) set ARG=-LD
if (%1)==(-o) shift && set ARG=-Fe%2
set CMD=%CMD% %ARG%
shift
if not (%1)==() goto :c0
echo on
%CMD% -O1 -W2 -Zi -MT -GS- -nologo -link -opt:ref,icf
@exit /B %ERRORLEVEL%
@rem ------------------------------------------------------
@rem main program
:p1
if not %T%_==_ goto :p2
set T=32
if %PROCESSOR_ARCHITECTURE%_==AMD64_ set T=64
if %PROCESSOR_ARCHITEW6432%_==AMD64_ set T=64
:p2
if "%CC:~-3%"=="gcc" set CC=%CC% -Os -s -static
set D32=-DTCC_TARGET_PE -DTCC_TARGET_I386
set D64=-DTCC_TARGET_PE -DTCC_TARGET_X86_64
set P32=i386-win32
set P64=x86_64-win32
if %T%==64 goto :t64
set D=%D32%
set DX=%D64%
set PX=%P64%
goto :p3
:t64
set D=%D64%
set DX=%D32%
set PX=%P32%
goto :p3
:p3
@echo on
:config.h
echo>..\config.h #define TCC_VERSION "%VERSION%"
echo>> ..\config.h #ifdef TCC_TARGET_X86_64
echo>> ..\config.h #define TCC_LIBTCC1 "libtcc1-64.a"
echo>> ..\config.h #else
echo>> ..\config.h #define TCC_LIBTCC1 "libtcc1-32.a"
echo>> ..\config.h #endif
for %%f in (*tcc.exe *tcc.dll) do @del %%f
:compiler
%CC% -o libtcc.dll -shared ..\libtcc.c %D% -DLIBTCC_AS_DLL
@if errorlevel 1 goto :the_end
%CC% -o tcc.exe ..\tcc.c libtcc.dll %D% -DONE_SOURCE"=0"
%CC% -o %PX%-tcc.exe ..\tcc.c %DX%
@if (%EXES_ONLY%)==(yes) goto :files-done
if not exist libtcc mkdir libtcc
if not exist doc mkdir doc
copy>nul ..\include\*.h include
copy>nul ..\tcclib.h include
copy>nul ..\libtcc.h libtcc
copy>nul ..\tests\libtcc_test.c examples
copy>nul tcc-win32.txt doc
.\tcc -impdef libtcc.dll -o libtcc\libtcc.def
@if errorlevel 1 goto :the_end
:libtcc1.a
@set O1=libtcc1.o crt1.o crt1w.o wincrt1.o wincrt1w.o dllcrt1.o dllmain.o chkstk.o bcheck.o
.\tcc -m32 -c ../lib/libtcc1.c
.\tcc -m32 -c lib/crt1.c
.\tcc -m32 -c lib/crt1w.c
.\tcc -m32 -c lib/wincrt1.c
.\tcc -m32 -c lib/wincrt1w.c
.\tcc -m32 -c lib/dllcrt1.c
.\tcc -m32 -c lib/dllmain.c
.\tcc -m32 -c lib/chkstk.S
.\tcc -m32 -w -c ../lib/bcheck.c
.\tcc -m32 -c ../lib/alloca86.S
.\tcc -m32 -c ../lib/alloca86-bt.S
.\tcc -m32 -ar lib/libtcc1-32.a %O1% alloca86.o alloca86-bt.o
@if errorlevel 1 goto :the_end
.\tcc -m64 -c ../lib/libtcc1.c
.\tcc -m64 -c lib/crt1.c
.\tcc -m64 -c lib/crt1w.c
.\tcc -m64 -c lib/wincrt1.c
.\tcc -m64 -c lib/wincrt1w.c
.\tcc -m64 -c lib/dllcrt1.c
.\tcc -m64 -c lib/dllmain.c
.\tcc -m64 -c lib/chkstk.S
.\tcc -m64 -w -c ../lib/bcheck.c
.\tcc -m64 -c ../lib/alloca86_64.S
.\tcc -m64 -c ../lib/alloca86_64-bt.S
.\tcc -m64 -ar lib/libtcc1-64.a %O1% alloca86_64.o alloca86_64-bt.o
@if errorlevel 1 goto :the_end
:tcc-doc.html
@if not (%DOC%)==(yes) goto :doc-done
echo>..\config.texi @set VERSION %VERSION%
cmd /c makeinfo --html --no-split ../tcc-doc.texi -o doc/tcc-doc.html
:doc-done
:files-done
for %%f in (*.o *.def) do @del %%f
:copy-install
@if (%INST%)==() goto :the_end
if not exist %INST% mkdir %INST%
@if (%BIN%)==() set BIN=%INST%
if not exist %BIN% mkdir %BIN%
for %%f in (*tcc.exe *tcc.dll) do @copy>nul %%f %BIN%\%%f
@if not exist %INST%\lib mkdir %INST%\lib
for %%f in (lib\*.a lib\*.def) do @copy>nul %%f %INST%\%%f
for %%f in (include examples libtcc doc) do @xcopy>nul /s/i/q/y %%f %INST%\%%f
:the_end
exit /B %ERRORLEVEL%

View file

@ -0,0 +1,13 @@
//+---------------------------------------------------------------------------
//
// dll.c - Windows DLL example - dynamically linked part
//
#include <windows.h>
__declspec(dllexport) const char *hello_data = "(not set)";
__declspec(dllexport) void hello_func (void)
{
MessageBox (0, hello_data, "From DLL", MB_ICONINFORMATION);
}

View file

@ -0,0 +1,24 @@
#include <stdio.h>
#include <stdlib.h> // atoi()
int fib(n)
{
if (n <= 2)
return 1;
else
return fib(n-1) + fib(n-2);
}
int main(int argc, char **argv)
{
int n;
if (argc < 2) {
printf("usage: fib n\n"
"Compute nth Fibonacci number\n");
return 1;
}
n = atoi(argv[1]);
printf("fib(%d) = %d\n", n, fib(n));
return 0;
}

View file

@ -0,0 +1,20 @@
//+---------------------------------------------------------------------------
//
// HELLO_DLL.C - Windows DLL example - main application part
//
#include <windows.h>
void hello_func (void);
__declspec(dllimport) extern const char *hello_data;
int WINAPI WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
hello_data = "Hello World!";
hello_func();
return 0;
}

View file

@ -0,0 +1,163 @@
//+---------------------------------------------------------------------------
//
// HELLO_WIN.C - Windows GUI 'Hello World!' Example
//
//+---------------------------------------------------------------------------
#include <windows.h>
#define APPNAME "HELLO_WIN"
char szAppName[] = APPNAME; // The name of this application
char szTitle[] = APPNAME; // The title bar text
const char *pWindowText;
void CenterWindow(HWND hWnd);
//+---------------------------------------------------------------------------
//
// Function: WndProc
//
// Synopsis: very unusual type of function - gets called by system to
// process windows messages.
//
// Arguments: same as always.
//----------------------------------------------------------------------------
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
// ----------------------- first and last
case WM_CREATE:
CenterWindow(hwnd);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
// ----------------------- get out of it...
case WM_RBUTTONUP:
DestroyWindow(hwnd);
break;
case WM_KEYDOWN:
if (VK_ESCAPE == wParam)
DestroyWindow(hwnd);
break;
// ----------------------- display our minimal info
case WM_PAINT:
{
PAINTSTRUCT ps;
HDC hdc;
RECT rc;
hdc = BeginPaint(hwnd, &ps);
GetClientRect(hwnd, &rc);
SetTextColor(hdc, RGB(240,240,96));
SetBkMode(hdc, TRANSPARENT);
DrawText(hdc, pWindowText, -1, &rc, DT_CENTER|DT_SINGLELINE|DT_VCENTER);
EndPaint(hwnd, &ps);
break;
}
// ----------------------- let windows do all other stuff
default:
return DefWindowProc(hwnd, message, wParam, lParam);
}
return 0;
}
//+---------------------------------------------------------------------------
//
// Function: WinMain
//
// Synopsis: standard entrypoint for GUI Win32 apps
//
//----------------------------------------------------------------------------
int APIENTRY WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow
)
{
MSG msg;
WNDCLASS wc;
HWND hwnd;
pWindowText = lpCmdLine[0] ? lpCmdLine : "Hello Windows!";
// Fill in window class structure with parameters that describe
// the main window.
ZeroMemory(&wc, sizeof wc);
wc.hInstance = hInstance;
wc.lpszClassName = szAppName;
wc.lpfnWndProc = (WNDPROC)WndProc;
wc.style = CS_DBLCLKS|CS_VREDRAW|CS_HREDRAW;
wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
if (FALSE == RegisterClass(&wc))
return 0;
// create the browser
hwnd = CreateWindow(
szAppName,
szTitle,
WS_OVERLAPPEDWINDOW|WS_VISIBLE,
CW_USEDEFAULT,
CW_USEDEFAULT,
360,//CW_USEDEFAULT,
240,//CW_USEDEFAULT,
0,
0,
hInstance,
0);
if (NULL == hwnd)
return 0;
// Main message loop:
while (GetMessage(&msg, NULL, 0, 0) > 0) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
//+---------------------------------------------------------------------------
//+---------------------------------------------------------------------------
void CenterWindow(HWND hwnd_self)
{
HWND hwnd_parent;
RECT rw_self, rc_parent, rw_parent;
int xpos, ypos;
hwnd_parent = GetParent(hwnd_self);
if (NULL == hwnd_parent)
hwnd_parent = GetDesktopWindow();
GetWindowRect(hwnd_parent, &rw_parent);
GetClientRect(hwnd_parent, &rc_parent);
GetWindowRect(hwnd_self, &rw_self);
xpos = rw_parent.left + (rc_parent.right + rw_self.left - rw_self.right) / 2;
ypos = rw_parent.top + (rc_parent.bottom + rw_self.top - rw_self.bottom) / 2;
SetWindowPos(
hwnd_self, NULL,
xpos, ypos, 0, 0,
SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE
);
}
//+---------------------------------------------------------------------------

View file

@ -0,0 +1,170 @@
/*
* _mingw.h
*
* This file is for TinyCC and not part of the Mingw32 package.
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#ifndef __MINGW_H
#define __MINGW_H
/* some winapi files define these before including _mingw.h --> */
#undef __cdecl
#undef _X86_
#undef WIN32
/* <-- */
#include <stddef.h>
#include <stdarg.h>
#define __int8 char
#define __int16 short
#define __int32 int
#define __int64 long long
#define _HAVE_INT64
#define __cdecl
#define __declspec(x) __attribute__((x))
#define __unaligned __attribute__((packed))
#define __fastcall __attribute__((fastcall))
#define __MSVCRT__ 1
#undef _MSVCRT_
#define __MINGW_IMPORT extern __declspec(dllimport)
#define __MINGW_ATTRIB_NORETURN
#define __MINGW_ATTRIB_CONST
#define __MINGW_ATTRIB_DEPRECATED
#define __MINGW_ATTRIB_MALLOC
#define __MINGW_ATTRIB_PURE
#define __MINGW_ATTRIB_NONNULL(arg)
#define __MINGW_NOTHROW
#define __GNUC_VA_LIST
#define _CRTIMP extern
#define __CRT_INLINE extern __inline__
#define _CRT_ALIGN(x) __attribute__((aligned(x)))
#define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))
#define _CRT_PACKING 8
#define __CRT_UNALIGNED
#define _CONST_RETURN
#ifndef _TRUNCATE
#define _TRUNCATE ((size_t)-1)
#endif
#define __CRT_STRINGIZE(_Value) #_Value
#define _CRT_STRINGIZE(_Value) __CRT_STRINGIZE(_Value)
#define __CRT_WIDE(_String) L ## _String
#define _CRT_WIDE(_String) __CRT_WIDE(_String)
#ifdef _WIN64
#define __stdcall
#define _AMD64_ 1
#define __x86_64 1
#define _M_X64 100 /* Visual Studio */
#define _M_AMD64 100 /* Visual Studio */
#define USE_MINGW_SETJMP_TWO_ARGS
#define mingw_getsp tinyc_getbp
#define __TRY__
#else
#define __stdcall __attribute__((__stdcall__))
#define _X86_ 1
#define _M_IX86 300 /* Visual Studio */
#define WIN32 1
#define _USE_32BIT_TIME_T
#ifdef __arm__
#define __TRY__
#else
#define __TRY__ void __try__(void**), *_sehrec[6]; __try__(_sehrec);
#endif
#endif
/* in stddef.h */
#define _SIZE_T_DEFINED
#define _SSIZE_T_DEFINED
#define _PTRDIFF_T_DEFINED
#define _WCHAR_T_DEFINED
#define _UINTPTR_T_DEFINED
#define _INTPTR_T_DEFINED
#define _INTEGRAL_MAX_BITS 64
#ifndef _TIME32_T_DEFINED
#define _TIME32_T_DEFINED
typedef long __time32_t;
#endif
#ifndef _TIME64_T_DEFINED
#define _TIME64_T_DEFINED
typedef long long __time64_t;
#endif
#ifndef _TIME_T_DEFINED
#define _TIME_T_DEFINED
#ifdef _USE_32BIT_TIME_T
typedef __time32_t time_t;
#else
typedef __time64_t time_t;
#endif
#endif
#ifndef _WCTYPE_T_DEFINED
#define _WCTYPE_T_DEFINED
typedef wchar_t wctype_t;
#endif
#ifndef _WINT_T
#define _WINT_T
typedef __WINT_TYPE__ wint_t;
#endif
typedef int errno_t;
#define _ERRCODE_DEFINED
typedef struct threadlocaleinfostruct *pthreadlocinfo;
typedef struct threadmbcinfostruct *pthreadmbcinfo;
typedef struct localeinfo_struct _locale_tstruct,*_locale_t;
/* for winapi */
#define _ANONYMOUS_UNION
#define _ANONYMOUS_STRUCT
#define DECLSPEC_NORETURN
#define DECLARE_STDCALL_P(type) __stdcall type
#define NOSERVICE 1
#define NOMCX 1
#define NOIME 1
#define __INTRIN_H_
#ifndef DUMMYUNIONNAME
# define DUMMYUNIONNAME
# define DUMMYUNIONNAME1
# define DUMMYUNIONNAME2
# define DUMMYUNIONNAME3
# define DUMMYUNIONNAME4
# define DUMMYUNIONNAME5
#endif
#ifndef DUMMYSTRUCTNAME
# define DUMMYSTRUCTNAME
#endif
#ifndef WINVER
# define WINVER 0x0502
#endif
#ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x502
#endif
#define __C89_NAMELESS
#define __MINGW_EXTENSION
#define WINAPI_FAMILY_PARTITION(X) 1
#define MINGW_HAS_SECURE_API
#endif /* __MINGW_H */

View file

@ -0,0 +1,57 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef __ASSERT_H_
#define __ASSERT_H_
#include <_mingw.h>
#ifdef __cplusplus
#include <stdlib.h>
#endif
#ifdef NDEBUG
#ifndef assert
#define assert(_Expression) ((void)0)
#endif
#else
#ifndef _CRT_TERMINATE_DEFINED
#define _CRT_TERMINATE_DEFINED
void __cdecl __MINGW_NOTHROW exit(int _Code) __MINGW_ATTRIB_NORETURN;
_CRTIMP void __cdecl __MINGW_NOTHROW _exit(int _Code) __MINGW_ATTRIB_NORETURN;
#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
/* C99 function name */
void __cdecl _Exit(int) __MINGW_ATTRIB_NORETURN;
__CRT_INLINE __MINGW_ATTRIB_NORETURN void __cdecl _Exit(int status)
{ _exit(status); }
#endif
#pragma push_macro("abort")
#undef abort
void __cdecl __declspec(noreturn) abort(void);
#pragma pop_macro("abort")
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern void __cdecl _wassert(const wchar_t *_Message,const wchar_t *_File,unsigned _Line);
extern void __cdecl _assert(const char *, const char *, unsigned);
#ifdef __cplusplus
}
#endif
#ifndef assert
//#define assert(_Expression) (void)((!!(_Expression)) || (_wassert(_CRT_WIDE(#_Expression),_CRT_WIDE(__FILE__),__LINE__),0))
#define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
#endif
#endif
#endif

View file

@ -0,0 +1,409 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_CONIO
#define _INC_CONIO
#include <_mingw.h>
#ifdef __cplusplus
extern "C" {
#endif
_CRTIMP char *_cgets(char *_Buffer);
_CRTIMP int __cdecl _cprintf(const char *_Format,...);
_CRTIMP int __cdecl _cputs(const char *_Str);
_CRTIMP int __cdecl _cscanf(const char *_Format,...);
_CRTIMP int __cdecl _cscanf_l(const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _getch(void);
_CRTIMP int __cdecl _getche(void);
_CRTIMP int __cdecl _vcprintf(const char *_Format,va_list _ArgList);
_CRTIMP int __cdecl _cprintf_p(const char *_Format,...);
_CRTIMP int __cdecl _vcprintf_p(const char *_Format,va_list _ArgList);
_CRTIMP int __cdecl _cprintf_l(const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vcprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _cprintf_p_l(const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vcprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _kbhit(void);
#if defined(_X86_) && !defined(__x86_64)
int __cdecl _inp(unsigned short);
unsigned short __cdecl _inpw(unsigned short);
unsigned long __cdecl _inpd(unsigned short);
int __cdecl _outp(unsigned short,int);
unsigned short __cdecl _outpw(unsigned short,unsigned short);
unsigned long __cdecl _outpd(unsigned short,unsigned long);
#endif
_CRTIMP int __cdecl _putch(int _Ch);
_CRTIMP int __cdecl _ungetch(int _Ch);
_CRTIMP int __cdecl _getch_nolock(void);
_CRTIMP int __cdecl _getche_nolock(void);
_CRTIMP int __cdecl _putch_nolock(int _Ch);
_CRTIMP int __cdecl _ungetch_nolock(int _Ch);
#ifndef _WCONIO_DEFINED
#define _WCONIO_DEFINED
#ifndef WEOF
#define WEOF (wint_t)(0xFFFF)
#endif
_CRTIMP wchar_t *_cgetws(wchar_t *_Buffer);
_CRTIMP wint_t __cdecl _getwch(void);
_CRTIMP wint_t __cdecl _getwche(void);
_CRTIMP wint_t __cdecl _putwch(wchar_t _WCh);
_CRTIMP wint_t __cdecl _ungetwch(wint_t _WCh);
_CRTIMP int __cdecl _cputws(const wchar_t *_String);
_CRTIMP int __cdecl _cwprintf(const wchar_t *_Format,...);
_CRTIMP int __cdecl _cwscanf(const wchar_t *_Format,...);
_CRTIMP int __cdecl _cwscanf_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vcwprintf(const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _cwprintf_p(const wchar_t *_Format,...);
_CRTIMP int __cdecl _vcwprintf_p(const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _cwprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vcwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _cwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vcwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP wint_t __cdecl _putwch_nolock(wchar_t _WCh);
_CRTIMP wint_t __cdecl _getwch_nolock(void);
_CRTIMP wint_t __cdecl _getwche_nolock(void);
_CRTIMP wint_t __cdecl _ungetwch_nolock(wint_t _WCh);
#endif
#ifndef NO_OLDNAMES
char *__cdecl cgets(char *_Buffer);
int __cdecl cprintf(const char *_Format,...);
int __cdecl cputs(const char *_Str);
int __cdecl cscanf(const char *_Format,...);
int __cdecl getch(void);
int __cdecl getche(void);
int __cdecl kbhit(void);
int __cdecl putch(int _Ch);
int __cdecl ungetch(int _Ch);
#if (defined(_X86_) && !defined(__x86_64))
int __cdecl inp(unsigned short);
unsigned short __cdecl inpw(unsigned short);
int __cdecl outp(unsigned short,int);
unsigned short __cdecl outpw(unsigned short,unsigned short);
#endif
/* I/O intrin functions. */
__CRT_INLINE unsigned char __inbyte(unsigned short Port)
{
unsigned char value;
__asm__ __volatile__ ("inb %w1,%b0"
: "=a" (value)
: "Nd" (Port));
return value;
}
__CRT_INLINE unsigned short __inword(unsigned short Port)
{
unsigned short value;
__asm__ __volatile__ ("inw %w1,%w0"
: "=a" (value)
: "Nd" (Port));
return value;
}
__CRT_INLINE unsigned long __indword(unsigned short Port)
{
unsigned long value;
__asm__ __volatile__ ("inl %w1,%0"
: "=a" (value)
: "Nd" (Port));
return value;
}
__CRT_INLINE void __outbyte(unsigned short Port,unsigned char Data)
{
__asm__ __volatile__ ("outb %b0,%w1"
:
: "a" (Data), "Nd" (Port));
}
__CRT_INLINE void __outword(unsigned short Port,unsigned short Data)
{
__asm__ __volatile__ ("outw %w0,%w1"
:
: "a" (Data), "Nd" (Port));
}
__CRT_INLINE void __outdword(unsigned short Port,unsigned long Data)
{
__asm__ __volatile__ ("outl %0,%w1"
:
: "a" (Data), "Nd" (Port));
}
__CRT_INLINE void __inbytestring(unsigned short Port,unsigned char *Buffer,unsigned long Count)
{
__asm__ __volatile__ (
"cld ; rep ; insb "
: "=D" (Buffer), "=c" (Count)
: "d"(Port), "0"(Buffer), "1" (Count)
);
}
__CRT_INLINE void __inwordstring(unsigned short Port,unsigned short *Buffer,unsigned long Count)
{
__asm__ __volatile__ (
"cld ; rep ; insw "
: "=D" (Buffer), "=c" (Count)
: "d"(Port), "0"(Buffer), "1" (Count)
);
}
__CRT_INLINE void __indwordstring(unsigned short Port,unsigned long *Buffer,unsigned long Count)
{
__asm__ __volatile__ (
"cld ; rep ; insl "
: "=D" (Buffer), "=c" (Count)
: "d"(Port), "0"(Buffer), "1" (Count)
);
}
__CRT_INLINE void __outbytestring(unsigned short Port,unsigned char *Buffer,unsigned long Count)
{
__asm__ __volatile__ (
"cld ; rep ; outsb "
: "=S" (Buffer), "=c" (Count)
: "d"(Port), "0"(Buffer), "1" (Count)
);
}
__CRT_INLINE void __outwordstring(unsigned short Port,unsigned short *Buffer,unsigned long Count)
{
__asm__ __volatile__ (
"cld ; rep ; outsw "
: "=S" (Buffer), "=c" (Count)
: "d"(Port), "0"(Buffer), "1" (Count)
);
}
__CRT_INLINE void __outdwordstring(unsigned short Port,unsigned long *Buffer,unsigned long Count)
{
__asm__ __volatile__ (
"cld ; rep ; outsl "
: "=S" (Buffer), "=c" (Count)
: "d"(Port), "0"(Buffer), "1" (Count)
);
}
__CRT_INLINE unsigned __int64 __readcr0(void)
{
unsigned __int64 value;
__asm__ __volatile__ (
"mov %%cr0, %[value]"
: [value] "=q" (value));
return value;
}
/* Register sizes are different between 32/64 bit mode. So we have to do this for _WIN64 and _WIN32
separately. */
#ifdef _WIN64
__CRT_INLINE void __writecr0(unsigned __int64 Data)
{
__asm__ __volatile__ (
"mov %[Data], %%cr0"
:
: [Data] "q" (Data)
: "memory");
}
__CRT_INLINE unsigned __int64 __readcr2(void)
{
unsigned __int64 value;
__asm__ __volatile__ (
"mov %%cr2, %[value]"
: [value] "=q" (value));
return value;
}
__CRT_INLINE void __writecr2(unsigned __int64 Data)
{
__asm__ __volatile__ (
"mov %[Data], %%cr2"
:
: [Data] "q" (Data)
: "memory");
}
__CRT_INLINE unsigned __int64 __readcr3(void)
{
unsigned __int64 value;
__asm__ __volatile__ (
"mov %%cr3, %[value]"
: [value] "=q" (value));
return value;
}
__CRT_INLINE void __writecr3(unsigned __int64 Data)
{
__asm__ __volatile__ (
"mov %[Data], %%cr3"
:
: [Data] "q" (Data)
: "memory");
}
__CRT_INLINE unsigned __int64 __readcr4(void)
{
unsigned __int64 value;
__asm__ __volatile__ (
"mov %%cr4, %[value]"
: [value] "=q" (value));
return value;
}
__CRT_INLINE void __writecr4(unsigned __int64 Data)
{
__asm__ __volatile__ (
"mov %[Data], %%cr4"
:
: [Data] "q" (Data)
: "memory");
}
__CRT_INLINE unsigned __int64 __readcr8(void)
{
unsigned __int64 value;
__asm__ __volatile__ (
"mov %%cr8, %[value]"
: [value] "=q" (value));
return value;
}
__CRT_INLINE void __writecr8(unsigned __int64 Data)
{
__asm__ __volatile__ (
"mov %[Data], %%cr8"
:
: [Data] "q" (Data)
: "memory");
}
#elif defined(_WIN32)
__CRT_INLINE void __writecr0(unsigned Data)
{
__asm__ __volatile__ (
"mov %[Data], %%cr0"
:
: [Data] "q" (Data)
: "memory");
}
__CRT_INLINE unsigned long __readcr2(void)
{
unsigned long value;
__asm__ __volatile__ (
"mov %%cr2, %[value]"
: [value] "=q" (value));
return value;
}
__CRT_INLINE void __writecr2(unsigned Data)
{
__asm__ __volatile__ (
"mov %[Data], %%cr2"
:
: [Data] "q" (Data)
: "memory");
}
__CRT_INLINE unsigned long __readcr3(void)
{
unsigned long value;
__asm__ __volatile__ (
"mov %%cr3, %[value]"
: [value] "=q" (value));
return value;
}
__CRT_INLINE void __writecr3(unsigned Data)
{
__asm__ __volatile__ (
"mov %[Data], %%cr3"
:
: [Data] "q" (Data)
: "memory");
}
__CRT_INLINE unsigned long __readcr4(void)
{
unsigned long value;
__asm__ __volatile__ (
"mov %%cr4, %[value]"
: [value] "=q" (value));
return value;
}
__CRT_INLINE void __writecr4(unsigned Data)
{
__asm__ __volatile__ (
"mov %[Data], %%cr4"
:
: [Data] "q" (Data)
: "memory");
}
__CRT_INLINE unsigned long __readcr8(void)
{
unsigned long value; __asm__ __volatile__ (
"mov %%cr8, %[value]"
: [value] "=q" (value));
return value;
}
__CRT_INLINE void __writecr8(unsigned Data)
{
__asm__ __volatile__ (
"mov %[Data], %%cr8"
:
: [Data] "q" (Data)
: "memory");
}
#endif
__CRT_INLINE unsigned __int64 __readmsr(unsigned long msr)
{
unsigned __int64 val1, val2;
__asm__ __volatile__(
"rdmsr"
: "=a" (val1), "=d" (val2)
: "c" (msr));
return val1 | (val2 << 32);
}
__CRT_INLINE void __writemsr (unsigned long msr, unsigned __int64 Value)
{
unsigned long val1 = Value, val2 = Value >> 32;
__asm__ __volatile__ (
"wrmsr"
:
: "c" (msr), "a" (val1), "d" (val2));
}
__CRT_INLINE unsigned __int64 __rdtsc(void)
{
unsigned __int64 val1, val2;
__asm__ __volatile__ (
"rdtsc"
: "=a" (val1), "=d" (val2));
return val1 | (val2 << 32);
}
__CRT_INLINE void __cpuid(int CPUInfo[4], int InfoType)
{
__asm__ __volatile__ (
"cpuid"
: "=a" (CPUInfo [0]), "=b" (CPUInfo [1]), "=c" (CPUInfo [2]), "=d" (CPUInfo [3])
: "a" (InfoType));
}
#endif
#ifdef __cplusplus
}
#endif
#include <sec_api/conio_s.h>
#endif

View file

@ -0,0 +1,281 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_CTYPE
#define _INC_CTYPE
#include <_mingw.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef WEOF
#define WEOF (wint_t)(0xFFFF)
#endif
#ifndef _CRT_CTYPEDATA_DEFINED
#define _CRT_CTYPEDATA_DEFINED
#ifndef _CTYPE_DISABLE_MACROS
#ifndef __PCTYPE_FUNC
#define __PCTYPE_FUNC __pctype_func()
#ifdef _MSVCRT_
#define __pctype_func() (_pctype)
#else
#define __pctype_func() (*_imp___pctype)
#endif
#endif
#ifndef _pctype
#ifdef _MSVCRT_
extern unsigned short *_pctype;
#else
extern unsigned short **_imp___pctype;
#define _pctype (*_imp___pctype)
#endif
#endif
#endif
#endif
#ifndef _CRT_WCTYPEDATA_DEFINED
#define _CRT_WCTYPEDATA_DEFINED
#ifndef _CTYPE_DISABLE_MACROS
#ifndef _wctype
#ifdef _MSVCRT_
extern unsigned short *_wctype;
#else
extern unsigned short **_imp___wctype;
#define _wctype (*_imp___wctype)
#endif
#endif
#ifdef _MSVCRT_
#define __pwctype_func() (_pwctype)
#ifndef _pwctype
extern unsigned short *_pwctype;
#endif
#else
#define __pwctype_func() (*_imp___pwctype)
#ifndef _pwctype
extern unsigned short **_imp___pwctype;
#define _pwctype (*_imp___pwctype)
#endif
#endif
#endif
#endif
/* CRT stuff */
#if 1
extern const unsigned char __newclmap[];
extern const unsigned char __newcumap[];
extern pthreadlocinfo __ptlocinfo;
extern pthreadmbcinfo __ptmbcinfo;
extern int __globallocalestatus;
extern int __locale_changed;
extern struct threadlocaleinfostruct __initiallocinfo;
extern _locale_tstruct __initiallocalestructinfo;
pthreadlocinfo __cdecl __updatetlocinfo(void);
pthreadmbcinfo __cdecl __updatetmbcinfo(void);
#endif
#define _UPPER 0x1
#define _LOWER 0x2
#define _DIGIT 0x4
#define _SPACE 0x8
#define _PUNCT 0x10
#define _CONTROL 0x20
#define _BLANK 0x40
#define _HEX 0x80
#define _LEADBYTE 0x8000
#define _ALPHA (0x0100|_UPPER|_LOWER)
#ifndef _CTYPE_DEFINED
#define _CTYPE_DEFINED
_CRTIMP int __cdecl _isctype(int _C,int _Type);
_CRTIMP int __cdecl _isctype_l(int _C,int _Type,_locale_t _Locale);
_CRTIMP int __cdecl isalpha(int _C);
_CRTIMP int __cdecl _isalpha_l(int _C,_locale_t _Locale);
_CRTIMP int __cdecl isupper(int _C);
_CRTIMP int __cdecl _isupper_l(int _C,_locale_t _Locale);
_CRTIMP int __cdecl islower(int _C);
_CRTIMP int __cdecl _islower_l(int _C,_locale_t _Locale);
_CRTIMP int __cdecl isdigit(int _C);
_CRTIMP int __cdecl _isdigit_l(int _C,_locale_t _Locale);
_CRTIMP int __cdecl isxdigit(int _C);
_CRTIMP int __cdecl _isxdigit_l(int _C,_locale_t _Locale);
_CRTIMP int __cdecl isspace(int _C);
_CRTIMP int __cdecl _isspace_l(int _C,_locale_t _Locale);
_CRTIMP int __cdecl ispunct(int _C);
_CRTIMP int __cdecl _ispunct_l(int _C,_locale_t _Locale);
_CRTIMP int __cdecl isalnum(int _C);
_CRTIMP int __cdecl _isalnum_l(int _C,_locale_t _Locale);
_CRTIMP int __cdecl isprint(int _C);
_CRTIMP int __cdecl _isprint_l(int _C,_locale_t _Locale);
_CRTIMP int __cdecl isgraph(int _C);
_CRTIMP int __cdecl _isgraph_l(int _C,_locale_t _Locale);
_CRTIMP int __cdecl iscntrl(int _C);
_CRTIMP int __cdecl _iscntrl_l(int _C,_locale_t _Locale);
_CRTIMP int __cdecl toupper(int _C);
_CRTIMP int __cdecl tolower(int _C);
_CRTIMP int __cdecl _tolower(int _C);
_CRTIMP int __cdecl _tolower_l(int _C,_locale_t _Locale);
_CRTIMP int __cdecl _toupper(int _C);
_CRTIMP int __cdecl _toupper_l(int _C,_locale_t _Locale);
_CRTIMP int __cdecl __isascii(int _C);
_CRTIMP int __cdecl __toascii(int _C);
_CRTIMP int __cdecl __iscsymf(int _C);
_CRTIMP int __cdecl __iscsym(int _C);
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES)
int __cdecl isblank(int _C);
#endif
#endif
#ifndef _WCTYPE_DEFINED
#define _WCTYPE_DEFINED
int __cdecl iswalpha(wint_t _C);
_CRTIMP int __cdecl _iswalpha_l(wint_t _C,_locale_t _Locale);
int __cdecl iswupper(wint_t _C);
_CRTIMP int __cdecl _iswupper_l(wint_t _C,_locale_t _Locale);
int __cdecl iswlower(wint_t _C);
_CRTIMP int __cdecl _iswlower_l(wint_t _C,_locale_t _Locale);
int __cdecl iswdigit(wint_t _C);
_CRTIMP int __cdecl _iswdigit_l(wint_t _C,_locale_t _Locale);
int __cdecl iswxdigit(wint_t _C);
_CRTIMP int __cdecl _iswxdigit_l(wint_t _C,_locale_t _Locale);
int __cdecl iswspace(wint_t _C);
_CRTIMP int __cdecl _iswspace_l(wint_t _C,_locale_t _Locale);
int __cdecl iswpunct(wint_t _C);
_CRTIMP int __cdecl _iswpunct_l(wint_t _C,_locale_t _Locale);
int __cdecl iswalnum(wint_t _C);
_CRTIMP int __cdecl _iswalnum_l(wint_t _C,_locale_t _Locale);
int __cdecl iswprint(wint_t _C);
_CRTIMP int __cdecl _iswprint_l(wint_t _C,_locale_t _Locale);
int __cdecl iswgraph(wint_t _C);
_CRTIMP int __cdecl _iswgraph_l(wint_t _C,_locale_t _Locale);
int __cdecl iswcntrl(wint_t _C);
_CRTIMP int __cdecl _iswcntrl_l(wint_t _C,_locale_t _Locale);
int __cdecl iswascii(wint_t _C);
int __cdecl isleadbyte(int _C);
_CRTIMP int __cdecl _isleadbyte_l(int _C,_locale_t _Locale);
wint_t __cdecl towupper(wint_t _C);
_CRTIMP wint_t __cdecl _towupper_l(wint_t _C,_locale_t _Locale);
wint_t __cdecl towlower(wint_t _C);
_CRTIMP wint_t __cdecl _towlower_l(wint_t _C,_locale_t _Locale);
int __cdecl iswctype(wint_t _C,wctype_t _Type);
_CRTIMP int __cdecl _iswctype_l(wint_t _C,wctype_t _Type,_locale_t _Locale);
_CRTIMP int __cdecl __iswcsymf(wint_t _C);
_CRTIMP int __cdecl _iswcsymf_l(wint_t _C,_locale_t _Locale);
_CRTIMP int __cdecl __iswcsym(wint_t _C);
_CRTIMP int __cdecl _iswcsym_l(wint_t _C,_locale_t _Locale);
int __cdecl is_wctype(wint_t _C,wctype_t _Type);
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES)
int __cdecl iswblank(wint_t _C);
#endif
#endif
#ifndef _CTYPE_DISABLE_MACROS
#ifndef MB_CUR_MAX
#define MB_CUR_MAX ___mb_cur_max_func()
#ifndef __mb_cur_max
#ifdef _MSVCRT_
extern int __mb_cur_max;
#else
#define __mb_cur_max (*_imp____mb_cur_max)
extern int *_imp____mb_cur_max;
#endif
#endif
#ifdef _MSVCRT_
#define ___mb_cur_max_func() (__mb_cur_max)
#else
#define ___mb_cur_max_func() (*_imp____mb_cur_max)
#endif
#endif
#define __chvalidchk(a,b) (__PCTYPE_FUNC[(a)] & (b))
#define _chvalidchk_l(_Char,_Flag,_Locale) (!_Locale ? __chvalidchk(_Char,_Flag) : ((_locale_t)_Locale)->locinfo->pctype[_Char] & (_Flag))
#define _ischartype_l(_Char,_Flag,_Locale) (((_Locale)!=NULL && (((_locale_t)(_Locale))->locinfo->mb_cur_max) > 1) ? _isctype_l(_Char,(_Flag),_Locale) : _chvalidchk_l(_Char,_Flag,_Locale))
#define _isalpha_l(_Char,_Locale) _ischartype_l(_Char,_ALPHA,_Locale)
#define _isupper_l(_Char,_Locale) _ischartype_l(_Char,_UPPER,_Locale)
#define _islower_l(_Char,_Locale) _ischartype_l(_Char,_LOWER,_Locale)
#define _isdigit_l(_Char,_Locale) _ischartype_l(_Char,_DIGIT,_Locale)
#define _isxdigit_l(_Char,_Locale) _ischartype_l(_Char,_HEX,_Locale)
#define _isspace_l(_Char,_Locale) _ischartype_l(_Char,_SPACE,_Locale)
#define _ispunct_l(_Char,_Locale) _ischartype_l(_Char,_PUNCT,_Locale)
#define _isalnum_l(_Char,_Locale) _ischartype_l(_Char,_ALPHA|_DIGIT,_Locale)
#define _isprint_l(_Char,_Locale) _ischartype_l(_Char,_BLANK|_PUNCT|_ALPHA|_DIGIT,_Locale)
#define _isgraph_l(_Char,_Locale) _ischartype_l(_Char,_PUNCT|_ALPHA|_DIGIT,_Locale)
#define _iscntrl_l(_Char,_Locale) _ischartype_l(_Char,_CONTROL,_Locale)
#define _tolower(_Char) ((_Char)-'A'+'a')
#define _toupper(_Char) ((_Char)-'a'+'A')
#define __isascii(_Char) ((unsigned)(_Char) < 0x80)
#define __toascii(_Char) ((_Char) & 0x7f)
#ifndef _WCTYPE_INLINE_DEFINED
#define _WCTYPE_INLINE_DEFINED
#undef _CRT_WCTYPE_NOINLINE
#ifndef __cplusplus
#define iswalpha(_c) (iswctype(_c,_ALPHA))
#define iswupper(_c) (iswctype(_c,_UPPER))
#define iswlower(_c) (iswctype(_c,_LOWER))
#define iswdigit(_c) (iswctype(_c,_DIGIT))
#define iswxdigit(_c) (iswctype(_c,_HEX))
#define iswspace(_c) (iswctype(_c,_SPACE))
#define iswpunct(_c) (iswctype(_c,_PUNCT))
#define iswalnum(_c) (iswctype(_c,_ALPHA|_DIGIT))
#define iswprint(_c) (iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT))
#define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT))
#define iswcntrl(_c) (iswctype(_c,_CONTROL))
#define iswascii(_c) ((unsigned)(_c) < 0x80)
#define _iswalpha_l(_c,_p) (_iswctype_l(_c,_ALPHA,_p))
#define _iswupper_l(_c,_p) (_iswctype_l(_c,_UPPER,_p))
#define _iswlower_l(_c,_p) (_iswctype_l(_c,_LOWER,_p))
#define _iswdigit_l(_c,_p) (_iswctype_l(_c,_DIGIT,_p))
#define _iswxdigit_l(_c,_p) (_iswctype_l(_c,_HEX,_p))
#define _iswspace_l(_c,_p) (_iswctype_l(_c,_SPACE,_p))
#define _iswpunct_l(_c,_p) (_iswctype_l(_c,_PUNCT,_p))
#define _iswalnum_l(_c,_p) (_iswctype_l(_c,_ALPHA|_DIGIT,_p))
#define _iswprint_l(_c,_p) (_iswctype_l(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT,_p))
#define _iswgraph_l(_c,_p) (_iswctype_l(_c,_PUNCT|_ALPHA|_DIGIT,_p))
#define _iswcntrl_l(_c,_p) (_iswctype_l(_c,_CONTROL,_p))
#endif
#endif
#define __iscsymf(_c) (isalpha(_c) || ((_c)=='_'))
#define __iscsym(_c) (isalnum(_c) || ((_c)=='_'))
#define __iswcsymf(_c) (iswalpha(_c) || ((_c)=='_'))
#define __iswcsym(_c) (iswalnum(_c) || ((_c)=='_'))
#define _iscsymf_l(_c,_p) (_isalpha_l(_c,_p) || ((_c)=='_'))
#define _iscsym_l(_c,_p) (_isalnum_l(_c,_p) || ((_c)=='_'))
#define _iswcsymf_l(_c,_p) (_iswalpha_l(_c,_p) || ((_c)=='_'))
#define _iswcsym_l(_c,_p) (_iswalnum_l(_c,_p) || ((_c)=='_'))
#endif
#ifndef NO_OLDNAMES
#ifndef _CTYPE_DEFINED
int __cdecl isascii(int _C);
int __cdecl toascii(int _C);
int __cdecl iscsymf(int _C);
int __cdecl iscsym(int _C);
#else
#define isascii __isascii
#define toascii __toascii
#define iscsymf __iscsymf
#define iscsym __iscsym
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,31 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
/*
* dir.h
*
* This file OBSOLESCENT and only provided for backward compatibility.
* Please use io.h instead.
*
* This file is part of the Mingw32 package.
*
* Contributors:
* Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
* Mumit Khan <khan@xraylith.wisc.edu>
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
#include <io.h>

View file

@ -0,0 +1,68 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_DIRECT
#define _INC_DIRECT
#include <_mingw.h>
#include <io.h>
#pragma pack(push,_CRT_PACKING)
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _DISKFREE_T_DEFINED
#define _DISKFREE_T_DEFINED
struct _diskfree_t {
unsigned total_clusters;
unsigned avail_clusters;
unsigned sectors_per_cluster;
unsigned bytes_per_sector;
};
#endif
_CRTIMP char *__cdecl _getcwd(char *_DstBuf,int _SizeInBytes);
_CRTIMP char *__cdecl _getdcwd(int _Drive,char *_DstBuf,int _SizeInBytes);
char *__cdecl _getdcwd_nolock(int _Drive,char *_DstBuf,int _SizeInBytes);
_CRTIMP int __cdecl _chdir(const char *_Path);
_CRTIMP int __cdecl _mkdir(const char *_Path);
_CRTIMP int __cdecl _rmdir(const char *_Path);
_CRTIMP int __cdecl _chdrive(int _Drive);
_CRTIMP int __cdecl _getdrive(void);
_CRTIMP unsigned long __cdecl _getdrives(void);
#ifndef _GETDISKFREE_DEFINED
#define _GETDISKFREE_DEFINED
_CRTIMP unsigned __cdecl _getdiskfree(unsigned _Drive,struct _diskfree_t *_DiskFree);
#endif
#ifndef _WDIRECT_DEFINED
#define _WDIRECT_DEFINED
_CRTIMP wchar_t *__cdecl _wgetcwd(wchar_t *_DstBuf,int _SizeInWords);
_CRTIMP wchar_t *__cdecl _wgetdcwd(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
wchar_t *__cdecl _wgetdcwd_nolock(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
_CRTIMP int __cdecl _wchdir(const wchar_t *_Path);
_CRTIMP int __cdecl _wmkdir(const wchar_t *_Path);
_CRTIMP int __cdecl _wrmdir(const wchar_t *_Path);
#endif
#ifndef NO_OLDNAMES
#define diskfree_t _diskfree_t
char *__cdecl getcwd(char *_DstBuf,int _SizeInBytes);
int __cdecl chdir(const char *_Path);
int __cdecl mkdir(const char *_Path);
int __cdecl rmdir(const char *_Path);
#endif
#ifdef __cplusplus
}
#endif
#pragma pack(pop)
#endif

View file

@ -0,0 +1,135 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
/* All the headers include this file. */
#include <_mingw.h>
#ifndef __STRICT_ANSI__
#ifndef _DIRENT_H_
#define _DIRENT_H_
#pragma pack(push,_CRT_PACKING)
#include <io.h>
#ifndef RC_INVOKED
#ifdef __cplusplus
extern "C" {
#endif
struct dirent
{
long d_ino; /* Always zero. */
unsigned short d_reclen; /* Always zero. */
unsigned short d_namlen; /* Length of name in d_name. */
char* d_name; /* File name. */
/* NOTE: The name in the dirent structure points to the name in the
* finddata_t structure in the DIR. */
};
/*
* This is an internal data structure. Good programmers will not use it
* except as an argument to one of the functions below.
* dd_stat field is now int (was short in older versions).
*/
typedef struct
{
/* disk transfer area for this dir */
struct _finddata_t dd_dta;
/* dirent struct to return from dir (NOTE: this makes this thread
* safe as long as only one thread uses a particular DIR struct at
* a time) */
struct dirent dd_dir;
/* _findnext handle */
long dd_handle;
/*
* Status of search:
* 0 = not started yet (next entry to read is first entry)
* -1 = off the end
* positive = 0 based index of next entry
*/
int dd_stat;
/* given path for dir with search pattern (struct is extended) */
char dd_name[1];
} DIR;
DIR* __cdecl opendir (const char*);
struct dirent* __cdecl readdir (DIR*);
int __cdecl closedir (DIR*);
void __cdecl rewinddir (DIR*);
long __cdecl telldir (DIR*);
void __cdecl seekdir (DIR*, long);
/* wide char versions */
struct _wdirent
{
long d_ino; /* Always zero. */
unsigned short d_reclen; /* Always zero. */
unsigned short d_namlen; /* Length of name in d_name. */
wchar_t* d_name; /* File name. */
/* NOTE: The name in the dirent structure points to the name in the * wfinddata_t structure in the _WDIR. */
};
/*
* This is an internal data structure. Good programmers will not use it
* except as an argument to one of the functions below.
*/
typedef struct
{
/* disk transfer area for this dir */
struct _wfinddata_t dd_dta;
/* dirent struct to return from dir (NOTE: this makes this thread
* safe as long as only one thread uses a particular DIR struct at
* a time) */
struct _wdirent dd_dir;
/* _findnext handle */
long dd_handle;
/*
* Status of search:
* 0 = not started yet (next entry to read is first entry)
* -1 = off the end
* positive = 0 based index of next entry
*/
int dd_stat;
/* given path for dir with search pattern (struct is extended) */
wchar_t dd_name[1];
} _WDIR;
_WDIR* __cdecl _wopendir (const wchar_t*);
struct _wdirent* __cdecl _wreaddir (_WDIR*);
int __cdecl _wclosedir (_WDIR*);
void __cdecl _wrewinddir (_WDIR*);
long __cdecl _wtelldir (_WDIR*);
void __cdecl _wseekdir (_WDIR*, long);
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#pragma pack(pop)
#endif /* Not _DIRENT_H_ */
#endif /* Not __STRICT_ANSI__ */

View file

@ -0,0 +1,55 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_DOS
#define _INC_DOS
#include <_mingw.h>
#include <io.h>
#pragma pack(push,_CRT_PACKING)
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _DISKFREE_T_DEFINED
#define _DISKFREE_T_DEFINED
struct _diskfree_t {
unsigned total_clusters;
unsigned avail_clusters;
unsigned sectors_per_cluster;
unsigned bytes_per_sector;
};
#endif
#define _A_NORMAL 0x00
#define _A_RDONLY 0x01
#define _A_HIDDEN 0x02
#define _A_SYSTEM 0x04
#define _A_SUBDIR 0x10
#define _A_ARCH 0x20
#ifndef _GETDISKFREE_DEFINED
#define _GETDISKFREE_DEFINED
_CRTIMP unsigned __cdecl _getdiskfree(unsigned _Drive,struct _diskfree_t *_DiskFree);
#endif
#if (defined(_X86_) && !defined(__x86_64))
void __cdecl _disable(void);
void __cdecl _enable(void);
#endif
#ifndef NO_OLDNAMES
#define diskfree_t _diskfree_t
#endif
#ifdef __cplusplus
}
#endif
#pragma pack(pop)
#endif

View file

@ -0,0 +1,75 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_ERRNO
#define _INC_ERRNO
#include <_mingw.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _CRT_ERRNO_DEFINED
#define _CRT_ERRNO_DEFINED
_CRTIMP extern int *__cdecl _errno(void);
#define errno (*_errno())
errno_t __cdecl _set_errno(int _Value);
errno_t __cdecl _get_errno(int *_Value);
#endif
#define EPERM 1
#define ENOENT 2
#define ESRCH 3
#define EINTR 4
#define EIO 5
#define ENXIO 6
#define E2BIG 7
#define ENOEXEC 8
#define EBADF 9
#define ECHILD 10
#define EAGAIN 11
#define ENOMEM 12
#define EACCES 13
#define EFAULT 14
#define EBUSY 16
#define EEXIST 17
#define EXDEV 18
#define ENODEV 19
#define ENOTDIR 20
#define EISDIR 21
#define ENFILE 23
#define EMFILE 24
#define ENOTTY 25
#define EFBIG 27
#define ENOSPC 28
#define ESPIPE 29
#define EROFS 30
#define EMLINK 31
#define EPIPE 32
#define EDOM 33
#define EDEADLK 36
#define ENAMETOOLONG 38
#define ENOLCK 39
#define ENOSYS 40
#define ENOTEMPTY 41
#ifndef RC_INVOKED
#if !defined(_SECURECRT_ERRCODE_VALUES_DEFINED)
#define _SECURECRT_ERRCODE_VALUES_DEFINED
#define EINVAL 22
#define ERANGE 34
#define EILSEQ 42
#define STRUNCATE 80
#endif
#endif
#define EDEADLOCK EDEADLK
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,123 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_EXCPT
#define _INC_EXCPT
#include <_mingw.h>
#pragma pack(push,_CRT_PACKING)
#ifdef __cplusplus
extern "C" {
#endif
struct _EXCEPTION_POINTERS;
#ifndef EXCEPTION_DISPOSITION
#define EXCEPTION_DISPOSITION int
#endif
#define ExceptionContinueExecution 0
#define ExceptionContinueSearch 1
#define ExceptionNestedException 2
#define ExceptionCollidedUnwind 3
#if (defined(_X86_) && !defined(__x86_64))
struct _EXCEPTION_RECORD;
struct _CONTEXT;
EXCEPTION_DISPOSITION __cdecl _except_handler(struct _EXCEPTION_RECORD *_ExceptionRecord,void *_EstablisherFrame,struct _CONTEXT *_ContextRecord,void *_DispatcherContext);
#elif defined(__ia64__)
typedef struct _EXCEPTION_POINTERS *Exception_info_ptr;
struct _EXCEPTION_RECORD;
struct _CONTEXT;
struct _DISPATCHER_CONTEXT;
_CRTIMP EXCEPTION_DISPOSITION __cdecl __C_specific_handler (struct _EXCEPTION_RECORD *_ExceptionRecord,unsigned __int64 _MemoryStackFp,unsigned __int64 _BackingStoreFp,struct _CONTEXT *_ContextRecord,struct _DISPATCHER_CONTEXT *_DispatcherContext,unsigned __int64 _GlobalPointer);
#elif defined(__x86_64)
struct _EXCEPTION_RECORD;
struct _CONTEXT;
#endif
#define GetExceptionCode _exception_code
#define exception_code _exception_code
#define GetExceptionInformation (struct _EXCEPTION_POINTERS *)_exception_info
#define exception_info (struct _EXCEPTION_POINTERS *)_exception_info
#define AbnormalTermination _abnormal_termination
#define abnormal_termination _abnormal_termination
unsigned long __cdecl _exception_code(void);
void *__cdecl _exception_info(void);
int __cdecl _abnormal_termination(void);
#define EXCEPTION_EXECUTE_HANDLER 1
#define EXCEPTION_CONTINUE_SEARCH 0
#define EXCEPTION_CONTINUE_EXECUTION -1
/* CRT stuff */
typedef void (__cdecl * _PHNDLR)(int);
struct _XCPT_ACTION {
unsigned long XcptNum;
int SigNum;
_PHNDLR XcptAction;
};
extern struct _XCPT_ACTION _XcptActTab[];
extern int _XcptActTabCount;
extern int _XcptActTabSize;
extern int _First_FPE_Indx;
extern int _Num_FPE;
int __cdecl __CppXcptFilter(unsigned long _ExceptionNum,struct _EXCEPTION_POINTERS * _ExceptionPtr);
int __cdecl _XcptFilter(unsigned long _ExceptionNum,struct _EXCEPTION_POINTERS * _ExceptionPtr);
/*
* The type of function that is expected as an exception handler to be
* installed with _try1.
*/
typedef EXCEPTION_DISPOSITION (*PEXCEPTION_HANDLER)(struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);
#ifndef HAVE_NO_SEH
/*
* This is not entirely necessary, but it is the structure installed by
* the _try1 primitive below.
*/
typedef struct _EXCEPTION_REGISTRATION {
struct _EXCEPTION_REGISTRATION *prev;
EXCEPTION_DISPOSITION (*handler)(struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);
} EXCEPTION_REGISTRATION, *PEXCEPTION_REGISTRATION;
typedef EXCEPTION_REGISTRATION EXCEPTION_REGISTRATION_RECORD;
typedef PEXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION_RECORD;
#endif
#if (defined(_X86_) && !defined(__x86_64))
#define __try1(pHandler) \
__asm__ ("pushl %0;pushl %%fs:0;movl %%esp,%%fs:0;" : : "g" (pHandler));
#define __except1 \
__asm__ ("movl (%%esp),%%eax;movl %%eax,%%fs:0;addl $8,%%esp;" \
: : : "%eax");
#elif defined(__x86_64)
#define __try1(pHandler) \
__asm__ ("pushq %0;pushq %%gs:0;movq %%rsp,%%gs:0;" : : "g" (pHandler));
#define __except1 \
__asm__ ("movq (%%rsp),%%rax;movq %%rax,%%gs:0;addq $16,%%rsp;" \
: : : "%rax");
#else
#define __try1(pHandler)
#define __except1
#endif
#ifdef __cplusplus
}
#endif
#pragma pack(pop)
#endif

View file

@ -0,0 +1,52 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#include <_mingw.h>
#include <io.h>
#ifndef _INC_FCNTL
#define _INC_FCNTL
#define _O_RDONLY 0x0000
#define _O_WRONLY 0x0001
#define _O_RDWR 0x0002
#define _O_APPEND 0x0008
#define _O_CREAT 0x0100
#define _O_TRUNC 0x0200
#define _O_EXCL 0x0400
#define _O_TEXT 0x4000
#define _O_BINARY 0x8000
#define _O_WTEXT 0x10000
#define _O_U16TEXT 0x20000
#define _O_U8TEXT 0x40000
#define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR)
#define _O_RAW _O_BINARY
#define _O_NOINHERIT 0x0080
#define _O_TEMPORARY 0x0040
#define _O_SHORT_LIVED 0x1000
#define _O_SEQUENTIAL 0x0020
#define _O_RANDOM 0x0010
#if !defined(NO_OLDNAMES) || defined(_POSIX)
#define O_RDONLY _O_RDONLY
#define O_WRONLY _O_WRONLY
#define O_RDWR _O_RDWR
#define O_APPEND _O_APPEND
#define O_CREAT _O_CREAT
#define O_TRUNC _O_TRUNC
#define O_EXCL _O_EXCL
#define O_TEXT _O_TEXT
#define O_BINARY _O_BINARY
#define O_RAW _O_BINARY
#define O_TEMPORARY _O_TEMPORARY
#define O_NOINHERIT _O_NOINHERIT
#define O_SEQUENTIAL _O_SEQUENTIAL
#define O_RANDOM _O_RANDOM
#define O_ACCMODE _O_ACCMODE
#endif
#endif

View file

@ -0,0 +1,108 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _FENV_H_
#define _FENV_H_
#include <_mingw.h>
/* FPU status word exception flags */
#define FE_INVALID 0x01
#define FE_DENORMAL 0x02
#define FE_DIVBYZERO 0x04
#define FE_OVERFLOW 0x08
#define FE_UNDERFLOW 0x10
#define FE_INEXACT 0x20
#define FE_ALL_EXCEPT (FE_INVALID | FE_DENORMAL | FE_DIVBYZERO \
| FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
/* FPU control word rounding flags */
#define FE_TONEAREST 0x0000
#define FE_DOWNWARD 0x0400
#define FE_UPWARD 0x0800
#define FE_TOWARDZERO 0x0c00
/* The MXCSR exception flags are the same as the
FE flags. */
#define __MXCSR_EXCEPT_FLAG_SHIFT 0
/* How much to shift FE status word exception flags
to get MXCSR rounding flags, */
#define __MXCSR_ROUND_FLAG_SHIFT 3
#ifndef RC_INVOKED
/*
For now, support only for the basic abstraction of flags that are
either set or clear. fexcept_t could be structure that holds more
info about the fp environment.
*/
typedef unsigned short fexcept_t;
/* This 32-byte struct represents the entire floating point
environment as stored by fnstenv or fstenv, augmented by
the contents of the MXCSR register, as stored by stmxcsr
(if CPU supports it). */
typedef struct
{
unsigned short __control_word;
unsigned short __unused0;
unsigned short __status_word;
unsigned short __unused1;
unsigned short __tag_word;
unsigned short __unused2;
unsigned int __ip_offset; /* instruction pointer offset */
unsigned short __ip_selector;
unsigned short __opcode;
unsigned int __data_offset;
unsigned short __data_selector;
unsigned short __unused3;
unsigned int __mxcsr; /* contents of the MXCSR register */
} fenv_t;
/*The C99 standard (7.6.9) allows us to define implementation-specific macros for
different fp environments */
/* The default Intel x87 floating point environment (64-bit mantissa) */
#define FE_PC64_ENV ((const fenv_t *)-1)
/* The floating point environment set by MSVCRT _fpreset (53-bit mantissa) */
#define FE_PC53_ENV ((const fenv_t *)-2)
/* The FE_DFL_ENV macro is required by standard.
fesetenv will use the environment set at app startup.*/
#define FE_DFL_ENV ((const fenv_t *) 0)
#ifdef __cplusplus
extern "C" {
#endif
/*TODO: Some of these could be inlined */
/* 7.6.2 Exception */
extern int __cdecl feclearexcept (int);
extern int __cdecl fegetexceptflag (fexcept_t * flagp, int excepts);
extern int __cdecl feraiseexcept (int excepts );
extern int __cdecl fesetexceptflag (const fexcept_t *, int);
extern int __cdecl fetestexcept (int excepts);
/* 7.6.3 Rounding */
extern int __cdecl fegetround (void);
extern int __cdecl fesetround (int mode);
/* 7.6.4 Environment */
extern int __cdecl fegetenv(fenv_t * envp);
extern int __cdecl fesetenv(const fenv_t * );
extern int __cdecl feupdateenv(const fenv_t *);
extern int __cdecl feholdexcept(fenv_t *);
#ifdef __cplusplus
}
#endif
#endif /* Not RC_INVOKED */
#endif /* ndef _FENV_H */

View file

@ -0,0 +1,297 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
/* 7.8 Format conversion of integer types <inttypes.h> */
#ifndef _INTTYPES_H_
#define _INTTYPES_H_
#include <_mingw.h>
#include <stdint.h>
#define __need_wchar_t
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
intmax_t quot;
intmax_t rem;
} imaxdiv_t;
#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)
/* 7.8.1 Macros for format specifiers
*
* MS runtime does not yet understand C9x standard "ll"
* length specifier. It appears to treat "ll" as "l".
* The non-standard I64 length specifier causes warning in GCC,
* but understood by MS runtime functions.
*/
/* fprintf macros for signed types */
#define PRId8 "d"
#define PRId16 "d"
#define PRId32 "d"
#define PRId64 "I64d"
#define PRIdLEAST8 "d"
#define PRIdLEAST16 "d"
#define PRIdLEAST32 "d"
#define PRIdLEAST64 "I64d"
#define PRIdFAST8 "d"
#define PRIdFAST16 "d"
#define PRIdFAST32 "d"
#define PRIdFAST64 "I64d"
#define PRIdMAX "I64d"
#define PRIi8 "i"
#define PRIi16 "i"
#define PRIi32 "i"
#define PRIi64 "I64i"
#define PRIiLEAST8 "i"
#define PRIiLEAST16 "i"
#define PRIiLEAST32 "i"
#define PRIiLEAST64 "I64i"
#define PRIiFAST8 "i"
#define PRIiFAST16 "i"
#define PRIiFAST32 "i"
#define PRIiFAST64 "I64i"
#define PRIiMAX "I64i"
#define PRIo8 "o"
#define PRIo16 "o"
#define PRIo32 "o"
#define PRIo64 "I64o"
#define PRIoLEAST8 "o"
#define PRIoLEAST16 "o"
#define PRIoLEAST32 "o"
#define PRIoLEAST64 "I64o"
#define PRIoFAST8 "o"
#define PRIoFAST16 "o"
#define PRIoFAST32 "o"
#define PRIoFAST64 "I64o"
#define PRIoMAX "I64o"
/* fprintf macros for unsigned types */
#define PRIu8 "u"
#define PRIu16 "u"
#define PRIu32 "u"
#define PRIu64 "I64u"
#define PRIuLEAST8 "u"
#define PRIuLEAST16 "u"
#define PRIuLEAST32 "u"
#define PRIuLEAST64 "I64u"
#define PRIuFAST8 "u"
#define PRIuFAST16 "u"
#define PRIuFAST32 "u"
#define PRIuFAST64 "I64u"
#define PRIuMAX "I64u"
#define PRIx8 "x"
#define PRIx16 "x"
#define PRIx32 "x"
#define PRIx64 "I64x"
#define PRIxLEAST8 "x"
#define PRIxLEAST16 "x"
#define PRIxLEAST32 "x"
#define PRIxLEAST64 "I64x"
#define PRIxFAST8 "x"
#define PRIxFAST16 "x"
#define PRIxFAST32 "x"
#define PRIxFAST64 "I64x"
#define PRIxMAX "I64x"
#define PRIX8 "X"
#define PRIX16 "X"
#define PRIX32 "X"
#define PRIX64 "I64X"
#define PRIXLEAST8 "X"
#define PRIXLEAST16 "X"
#define PRIXLEAST32 "X"
#define PRIXLEAST64 "I64X"
#define PRIXFAST8 "X"
#define PRIXFAST16 "X"
#define PRIXFAST32 "X"
#define PRIXFAST64 "I64X"
#define PRIXMAX "I64X"
/*
* fscanf macros for signed int types
* NOTE: if 32-bit int is used for int_fast8_t and int_fast16_t
* (see stdint.h, 7.18.1.3), FAST8 and FAST16 should have
* no length identifiers
*/
#define SCNd16 "hd"
#define SCNd32 "d"
#define SCNd64 "I64d"
#define SCNdLEAST16 "hd"
#define SCNdLEAST32 "d"
#define SCNdLEAST64 "I64d"
#define SCNdFAST16 "hd"
#define SCNdFAST32 "d"
#define SCNdFAST64 "I64d"
#define SCNdMAX "I64d"
#define SCNi16 "hi"
#define SCNi32 "i"
#define SCNi64 "I64i"
#define SCNiLEAST16 "hi"
#define SCNiLEAST32 "i"
#define SCNiLEAST64 "I64i"
#define SCNiFAST16 "hi"
#define SCNiFAST32 "i"
#define SCNiFAST64 "I64i"
#define SCNiMAX "I64i"
#define SCNo16 "ho"
#define SCNo32 "o"
#define SCNo64 "I64o"
#define SCNoLEAST16 "ho"
#define SCNoLEAST32 "o"
#define SCNoLEAST64 "I64o"
#define SCNoFAST16 "ho"
#define SCNoFAST32 "o"
#define SCNoFAST64 "I64o"
#define SCNoMAX "I64o"
#define SCNx16 "hx"
#define SCNx32 "x"
#define SCNx64 "I64x"
#define SCNxLEAST16 "hx"
#define SCNxLEAST32 "x"
#define SCNxLEAST64 "I64x"
#define SCNxFAST16 "hx"
#define SCNxFAST32 "x"
#define SCNxFAST64 "I64x"
#define SCNxMAX "I64x"
/* fscanf macros for unsigned int types */
#define SCNu16 "hu"
#define SCNu32 "u"
#define SCNu64 "I64u"
#define SCNuLEAST16 "hu"
#define SCNuLEAST32 "u"
#define SCNuLEAST64 "I64u"
#define SCNuFAST16 "hu"
#define SCNuFAST32 "u"
#define SCNuFAST64 "I64u"
#define SCNuMAX "I64u"
#ifdef _WIN64
#define PRIdPTR "I64d"
#define PRIiPTR "I64i"
#define PRIoPTR "I64o"
#define PRIuPTR "I64u"
#define PRIxPTR "I64x"
#define PRIXPTR "I64X"
#define SCNdPTR "I64d"
#define SCNiPTR "I64i"
#define SCNoPTR "I64o"
#define SCNxPTR "I64x"
#define SCNuPTR "I64u"
#else
#define PRIdPTR "d"
#define PRIiPTR "i"
#define PRIoPTR "o"
#define PRIuPTR "u"
#define PRIxPTR "x"
#define PRIXPTR "X"
#define SCNdPTR "d"
#define SCNiPTR "i"
#define SCNoPTR "o"
#define SCNxPTR "x"
#define SCNuPTR "u"
#endif
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/*
* no length modifier for char types prior to C9x
* MS runtime scanf appears to treat "hh" as "h"
*/
/* signed char */
#define SCNd8 "hhd"
#define SCNdLEAST8 "hhd"
#define SCNdFAST8 "hhd"
#define SCNi8 "hhi"
#define SCNiLEAST8 "hhi"
#define SCNiFAST8 "hhi"
#define SCNo8 "hho"
#define SCNoLEAST8 "hho"
#define SCNoFAST8 "hho"
#define SCNx8 "hhx"
#define SCNxLEAST8 "hhx"
#define SCNxFAST8 "hhx"
/* unsigned char */
#define SCNu8 "hhu"
#define SCNuLEAST8 "hhu"
#define SCNuFAST8 "hhu"
#endif /* __STDC_VERSION__ >= 199901 */
#endif /* !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) */
intmax_t __cdecl imaxabs (intmax_t j);
__CRT_INLINE intmax_t __cdecl imaxabs (intmax_t j)
{return (j >= 0 ? j : -j);}
imaxdiv_t __cdecl imaxdiv (intmax_t numer, intmax_t denom);
/* 7.8.2 Conversion functions for greatest-width integer types */
intmax_t __cdecl strtoimax (const char* __restrict__ nptr,
char** __restrict__ endptr, int base);
uintmax_t __cdecl strtoumax (const char* __restrict__ nptr,
char** __restrict__ endptr, int base);
intmax_t __cdecl wcstoimax (const wchar_t* __restrict__ nptr,
wchar_t** __restrict__ endptr, int base);
uintmax_t __cdecl wcstoumax (const wchar_t* __restrict__ nptr,
wchar_t** __restrict__ endptr, int base);
#ifdef __cplusplus
}
#endif
#endif /* ndef _INTTYPES_H */

View file

@ -0,0 +1,418 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _IO_H_
#define _IO_H_
#include <_mingw.h>
#include <string.h>
#pragma pack(push,_CRT_PACKING)
#ifndef _POSIX_
#ifdef __cplusplus
extern "C" {
#endif
_CRTIMP char* __cdecl _getcwd (char*, int);
#ifndef _FSIZE_T_DEFINED
typedef unsigned long _fsize_t;
#define _FSIZE_T_DEFINED
#endif
#ifndef _FINDDATA_T_DEFINED
struct _finddata32_t {
unsigned attrib;
__time32_t time_create;
__time32_t time_access;
__time32_t time_write;
_fsize_t size;
char name[260];
};
/*#if _INTEGRAL_MAX_BITS >= 64*/
struct _finddata32i64_t {
unsigned attrib;
__time32_t time_create;
__time32_t time_access;
__time32_t time_write;
__int64 size;
char name[260];
};
struct _finddata64i32_t {
unsigned attrib;
__time64_t time_create;
__time64_t time_access;
__time64_t time_write;
_fsize_t size;
char name[260];
};
struct __finddata64_t {
unsigned attrib;
__time64_t time_create;
__time64_t time_access;
__time64_t time_write;
__int64 size;
char name[260];
};
/* #endif */
#ifdef _USE_32BIT_TIME_T
#define _finddata_t _finddata32_t
#define _finddatai64_t _finddata32i64_t
#ifdef _WIN64
#define _findfirst _findfirst32
#define _findnext _findnext32
#else
#define _findfirst32 _findfirst
#define _findnext32 _findnext
#endif
#define _findfirsti64 _findfirst32i64
#define _findnexti64 _findnext32i64
#else
#define _finddata_t _finddata64i32_t
#define _finddatai64_t __finddata64_t
#define _findfirst _findfirst64i32
#define _findnext _findnext64i32
#define _findfirsti64 _findfirst64
#define _findnexti64 _findnext64
#endif
#define _FINDDATA_T_DEFINED
#endif
#ifndef _WFINDDATA_T_DEFINED
struct _wfinddata32_t {
unsigned attrib;
__time32_t time_create;
__time32_t time_access;
__time32_t time_write;
_fsize_t size;
wchar_t name[260];
};
/* #if _INTEGRAL_MAX_BITS >= 64 */
struct _wfinddata32i64_t {
unsigned attrib;
__time32_t time_create;
__time32_t time_access;
__time32_t time_write;
__int64 size;
wchar_t name[260];
};
struct _wfinddata64i32_t {
unsigned attrib;
__time64_t time_create;
__time64_t time_access;
__time64_t time_write;
_fsize_t size;
wchar_t name[260];
};
struct _wfinddata64_t {
unsigned attrib;
__time64_t time_create;
__time64_t time_access;
__time64_t time_write;
__int64 size;
wchar_t name[260];
};
/* #endif */
#ifdef _USE_32BIT_TIME_T
#define _wfinddata_t _wfinddata32_t
#define _wfinddatai64_t _wfinddata32i64_t
#define _wfindfirst _wfindfirst32
#define _wfindnext _wfindnext32
#define _wfindfirsti64 _wfindfirst32i64
#define _wfindnexti64 _wfindnext32i64
#else
#define _wfinddata_t _wfinddata64i32_t
#define _wfinddatai64_t _wfinddata64_t
#define _wfindfirst _wfindfirst64i32
#define _wfindnext _wfindnext64i32
#define _wfindfirsti64 _wfindfirst64
#define _wfindnexti64 _wfindnext64
#endif
#define _WFINDDATA_T_DEFINED
#endif
#define _A_NORMAL 0x00
#define _A_RDONLY 0x01
#define _A_HIDDEN 0x02
#define _A_SYSTEM 0x04
#define _A_SUBDIR 0x10
#define _A_ARCH 0x20
#ifndef _SIZE_T_DEFINED
#define _SIZE_T_DEFINED
#undef size_t
#ifdef _WIN64
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
typedef unsigned int size_t __attribute__ ((mode (DI)));
#else
typedef unsigned __int64 size_t;
#endif
#else
typedef unsigned int size_t;
#endif
#endif
#ifndef _SSIZE_T_DEFINED
#define _SSIZE_T_DEFINED
#undef ssize_t
#ifdef _WIN64
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
typedef int ssize_t __attribute__ ((mode (DI)));
#else
typedef __int64 ssize_t;
#endif
#else
typedef int ssize_t;
#endif
#endif
#ifndef _OFF_T_DEFINED
#define _OFF_T_DEFINED
#ifndef _OFF_T_
#define _OFF_T_
typedef long _off_t;
#if !defined(NO_OLDNAMES) || defined(_POSIX)
typedef long off_t;
#endif
#endif
#endif
#ifndef _OFF64_T_DEFINED
#define _OFF64_T_DEFINED
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
typedef int _off64_t __attribute__ ((mode (DI)));
#if !defined(NO_OLDNAMES) || defined(_POSIX)
typedef int off64_t __attribute__ ((mode (DI)));
#endif
#else
typedef long long _off64_t;
#if !defined(NO_OLDNAMES) || defined(_POSIX)
typedef long long off64_t;
#endif
#endif
#endif
/* Some defines for _access nAccessMode (MS doesn't define them, but
* it doesn't seem to hurt to add them). */
#define F_OK 0 /* Check for file existence */
#define X_OK 1 /* Check for execute permission. */
#define W_OK 2 /* Check for write permission */
#define R_OK 4 /* Check for read permission */
_CRTIMP int __cdecl _access(const char *_Filename,int _AccessMode);
_CRTIMP int __cdecl _chmod(const char *_Filename,int _Mode);
_CRTIMP int __cdecl _chsize(int _FileHandle,long _Size);
_CRTIMP int __cdecl _close(int _FileHandle);
_CRTIMP int __cdecl _commit(int _FileHandle);
_CRTIMP int __cdecl _creat(const char *_Filename,int _PermissionMode);
_CRTIMP int __cdecl _dup(int _FileHandle);
_CRTIMP int __cdecl _dup2(int _FileHandleSrc,int _FileHandleDst);
_CRTIMP int __cdecl _eof(int _FileHandle);
_CRTIMP long __cdecl _filelength(int _FileHandle);
_CRTIMP intptr_t __cdecl _findfirst32(const char *_Filename,struct _finddata32_t *_FindData);
_CRTIMP int __cdecl _findnext32(intptr_t _FindHandle,struct _finddata32_t *_FindData);
_CRTIMP int __cdecl _findclose(intptr_t _FindHandle);
_CRTIMP int __cdecl _isatty(int _FileHandle);
_CRTIMP int __cdecl _locking(int _FileHandle,int _LockMode,long _NumOfBytes);
_CRTIMP long __cdecl _lseek(int _FileHandle,long _Offset,int _Origin);
_off64_t lseek64(int fd,_off64_t offset, int whence);
_CRTIMP char *__cdecl _mktemp(char *_TemplateName);
_CRTIMP int __cdecl _pipe(int *_PtHandles,unsigned int _PipeSize,int _TextMode);
_CRTIMP int __cdecl _read(int _FileHandle,void *_DstBuf,unsigned int _MaxCharCount);
#ifndef _CRT_DIRECTORY_DEFINED
#define _CRT_DIRECTORY_DEFINED
int __cdecl remove(const char *_Filename);
int __cdecl rename(const char *_OldFilename,const char *_NewFilename);
_CRTIMP int __cdecl _unlink(const char *_Filename);
#ifndef NO_OLDNAMES
int __cdecl unlink(const char *_Filename);
#endif
#endif
_CRTIMP int __cdecl _setmode(int _FileHandle,int _Mode);
_CRTIMP long __cdecl _tell(int _FileHandle);
_CRTIMP int __cdecl _umask(int _Mode);
_CRTIMP int __cdecl _write(int _FileHandle,const void *_Buf,unsigned int _MaxCharCount);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP __int64 __cdecl _filelengthi64(int _FileHandle);
_CRTIMP intptr_t __cdecl _findfirst32i64(const char *_Filename,struct _finddata32i64_t *_FindData);
_CRTIMP intptr_t __cdecl _findfirst64(const char *_Filename,struct __finddata64_t *_FindData);
#ifdef __cplusplus
#include <string.h>
#endif
intptr_t __cdecl _findfirst64i32(const char *_Filename,struct _finddata64i32_t *_FindData);
__CRT_INLINE intptr_t __cdecl _findfirst64i32(const char *_Filename,struct _finddata64i32_t *_FindData)
{
struct __finddata64_t fd;
intptr_t ret = _findfirst64(_Filename,&fd);
_FindData->attrib=fd.attrib;
_FindData->time_create=fd.time_create;
_FindData->time_access=fd.time_access;
_FindData->time_write=fd.time_write;
_FindData->size=(_fsize_t) fd.size;
strncpy(_FindData->name,fd.name,260);
return ret;
}
_CRTIMP int __cdecl _findnext32i64(intptr_t _FindHandle,struct _finddata32i64_t *_FindData);
_CRTIMP int __cdecl _findnext64(intptr_t _FindHandle,struct __finddata64_t *_FindData);
int __cdecl _findnext64i32(intptr_t _FindHandle,struct _finddata64i32_t *_FindData);
__CRT_INLINE int __cdecl _findnext64i32(intptr_t _FindHandle,struct _finddata64i32_t *_FindData)
{
struct __finddata64_t fd;
int ret = _findnext64(_FindHandle,&fd);
_FindData->attrib=fd.attrib;
_FindData->time_create=fd.time_create;
_FindData->time_access=fd.time_access;
_FindData->time_write=fd.time_write;
_FindData->size=(_fsize_t) fd.size;
strncpy(_FindData->name,fd.name,260);
return ret;
}
__int64 __cdecl _lseeki64(int _FileHandle,__int64 _Offset,int _Origin);
__int64 __cdecl _telli64(int _FileHandle);
#endif
#ifndef NO_OLDNAMES
#ifndef _UWIN
int __cdecl chdir (const char *);
char *__cdecl getcwd (char *, int);
int __cdecl mkdir (const char *);
char *__cdecl mktemp(char *);
int __cdecl rmdir (const char*);
int __cdecl chmod (const char *, int);
#endif /* _UWIN */
#endif /* Not NO_OLDNAMES */
_CRTIMP errno_t __cdecl _sopen_s(int *_FileHandle,const char *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode);
#ifndef __cplusplus
_CRTIMP int __cdecl _open(const char *_Filename,int _OpenFlag,...);
_CRTIMP int __cdecl _sopen(const char *_Filename,int _OpenFlag,int _ShareFlag,...);
#else
extern "C++" _CRTIMP int __cdecl _open(const char *_Filename,int _Openflag,int _PermissionMode = 0);
extern "C++" _CRTIMP int __cdecl _sopen(const char *_Filename,int _Openflag,int _ShareFlag,int _PermissionMode = 0);
#endif
#ifndef _WIO_DEFINED
#define _WIO_DEFINED
_CRTIMP int __cdecl _waccess(const wchar_t *_Filename,int _AccessMode);
_CRTIMP int __cdecl _wchmod(const wchar_t *_Filename,int _Mode);
_CRTIMP int __cdecl _wcreat(const wchar_t *_Filename,int _PermissionMode);
_CRTIMP intptr_t __cdecl _wfindfirst32(const wchar_t *_Filename,struct _wfinddata32_t *_FindData);
_CRTIMP int __cdecl _wfindnext32(intptr_t _FindHandle,struct _wfinddata32_t *_FindData);
_CRTIMP int __cdecl _wunlink(const wchar_t *_Filename);
_CRTIMP int __cdecl _wrename(const wchar_t *_NewFilename,const wchar_t *_OldFilename);
_CRTIMP wchar_t *__cdecl _wmktemp(wchar_t *_TemplateName);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP intptr_t __cdecl _wfindfirst32i64(const wchar_t *_Filename,struct _wfinddata32i64_t *_FindData);
intptr_t __cdecl _wfindfirst64i32(const wchar_t *_Filename,struct _wfinddata64i32_t *_FindData);
_CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t *_Filename,struct _wfinddata64_t *_FindData);
_CRTIMP int __cdecl _wfindnext32i64(intptr_t _FindHandle,struct _wfinddata32i64_t *_FindData);
int __cdecl _wfindnext64i32(intptr_t _FindHandle,struct _wfinddata64i32_t *_FindData);
_CRTIMP int __cdecl _wfindnext64(intptr_t _FindHandle,struct _wfinddata64_t *_FindData);
#endif
_CRTIMP errno_t __cdecl _wsopen_s(int *_FileHandle,const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionFlag);
#if !defined(__cplusplus) || !(defined(_X86_) && !defined(__x86_64))
_CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,...);
_CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,...);
#else
extern "C++" _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,int _PermissionMode = 0);
extern "C++" _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode = 0);
#endif
#endif
int __cdecl __lock_fhandle(int _Filehandle);
void __cdecl _unlock_fhandle(int _Filehandle);
_CRTIMP intptr_t __cdecl _get_osfhandle(int _FileHandle);
_CRTIMP int __cdecl _open_osfhandle(intptr_t _OSFileHandle,int _Flags);
#ifndef NO_OLDNAMES
int __cdecl access(const char *_Filename,int _AccessMode);
int __cdecl chmod(const char *_Filename,int _AccessMode);
int __cdecl chsize(int _FileHandle,long _Size);
int __cdecl close(int _FileHandle);
int __cdecl creat(const char *_Filename,int _PermissionMode);
int __cdecl dup(int _FileHandle);
int __cdecl dup2(int _FileHandleSrc,int _FileHandleDst);
int __cdecl eof(int _FileHandle);
long __cdecl filelength(int _FileHandle);
int __cdecl isatty(int _FileHandle);
int __cdecl locking(int _FileHandle,int _LockMode,long _NumOfBytes);
long __cdecl lseek(int _FileHandle,long _Offset,int _Origin);
char *__cdecl mktemp(char *_TemplateName);
int __cdecl open(const char *_Filename,int _OpenFlag,...);
int __cdecl read(int _FileHandle,void *_DstBuf,unsigned int _MaxCharCount);
int __cdecl setmode(int _FileHandle,int _Mode);
int __cdecl sopen(const char *_Filename,int _OpenFlag,int _ShareFlag,...);
long __cdecl tell(int _FileHandle);
int __cdecl umask(int _Mode);
int __cdecl write(int _Filehandle,const void *_Buf,unsigned int _MaxCharCount);
#endif
#ifdef __cplusplus
}
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Misc stuff */
char *getlogin(void);
#ifdef __USE_MINGW_ALARM
unsigned int alarm(unsigned int seconds);
#endif
#ifdef __USE_MINGW_ACCESS
/* Old versions of MSVCRT access() just ignored X_OK, while the version
shipped with Vista, returns an error code. This will restore the
old behaviour */
static inline int __mingw_access (const char *__fname, int __mode) {
return _access (__fname, __mode & ~X_OK);
}
#define access(__f,__m) __mingw_access (__f, __m)
#endif
#ifdef __cplusplus
}
#endif
#pragma pack(pop)
#include <sec_api/io_s.h>
#endif /* End _IO_H_ */

View file

@ -0,0 +1,111 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#include <_mingw.h>
#ifndef _INC_LIMITS
#define _INC_LIMITS
/*
* File system limits
*
* TODO: NAME_MAX and OPEN_MAX are file system limits or not? Are they the
* same as FILENAME_MAX and FOPEN_MAX from stdio.h?
* NOTE: Apparently the actual size of PATH_MAX is 260, but a space is
* required for the NUL. TODO: Test?
*/
#define PATH_MAX (259)
#define CHAR_BIT 8
#define SCHAR_MIN (-128)
#define SCHAR_MAX 127
#define UCHAR_MAX 0xff
#define CHAR_MIN SCHAR_MIN
#define CHAR_MAX SCHAR_MAX
#define MB_LEN_MAX 5
#define SHRT_MIN (-32768)
#define SHRT_MAX 32767
#define USHRT_MAX 0xffff
#define INT_MIN (-2147483647 - 1)
#define INT_MAX 2147483647
#define UINT_MAX 0xffffffff
#define LONG_MIN (-2147483647L - 1)
#define LONG_MAX 2147483647L
#define ULONG_MAX 0xffffffffUL
#define LLONG_MAX 9223372036854775807ll
#define LLONG_MIN (-9223372036854775807ll - 1)
#define ULLONG_MAX 0xffffffffffffffffull
#if _INTEGRAL_MAX_BITS >= 8
#define _I8_MIN (-127 - 1)
#define _I8_MAX 127i8
#define _UI8_MAX 0xffu
#endif
#if _INTEGRAL_MAX_BITS >= 16
#define _I16_MIN (-32767 - 1)
#define _I16_MAX 32767i16
#define _UI16_MAX 0xffffu
#endif
#if _INTEGRAL_MAX_BITS >= 32
#define _I32_MIN (-2147483647 - 1)
#define _I32_MAX 2147483647
#define _UI32_MAX 0xffffffffu
#endif
#if defined(__GNUC__)
#undef LONG_LONG_MAX
#define LONG_LONG_MAX 9223372036854775807ll
#undef LONG_LONG_MIN
#define LONG_LONG_MIN (-LONG_LONG_MAX-1)
#undef ULONG_LONG_MAX
#define ULONG_LONG_MAX (2ull * LONG_LONG_MAX + 1ull)
#endif
#if _INTEGRAL_MAX_BITS >= 64
#define _I64_MIN (-9223372036854775807ll - 1)
#define _I64_MAX 9223372036854775807ll
#define _UI64_MAX 0xffffffffffffffffull
#endif
#ifndef SIZE_MAX
#ifdef _WIN64
#define SIZE_MAX _UI64_MAX
#else
#define SIZE_MAX UINT_MAX
#endif
#endif
#ifdef _POSIX_
#define _POSIX_ARG_MAX 4096
#define _POSIX_CHILD_MAX 6
#define _POSIX_LINK_MAX 8
#define _POSIX_MAX_CANON 255
#define _POSIX_MAX_INPUT 255
#define _POSIX_NAME_MAX 14
#define _POSIX_NGROUPS_MAX 0
#define _POSIX_OPEN_MAX 16
#define _POSIX_PATH_MAX 255
#define _POSIX_PIPE_BUF 512
#define _POSIX_SSIZE_MAX 32767
#define _POSIX_STREAM_MAX 8
#define _POSIX_TZNAME_MAX 3
#define ARG_MAX 14500
#define LINK_MAX 1024
#define MAX_CANON _POSIX_MAX_CANON
#define MAX_INPUT _POSIX_MAX_INPUT
#define NAME_MAX 255
#define NGROUPS_MAX 16
#define OPEN_MAX 32
#define PATH_MAX 512
#define PIPE_BUF _POSIX_PIPE_BUF
#define SSIZE_MAX _POSIX_SSIZE_MAX
#define STREAM_MAX 20
#define TZNAME_MAX 10
#endif
#endif

View file

@ -0,0 +1,91 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_LOCALE
#define _INC_LOCALE
#include <_mingw.h>
#pragma pack(push,_CRT_PACKING)
#ifdef __cplusplus
extern "C" {
#endif
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#define LC_ALL 0
#define LC_COLLATE 1
#define LC_CTYPE 2
#define LC_MONETARY 3
#define LC_NUMERIC 4
#define LC_TIME 5
#define LC_MIN LC_ALL
#define LC_MAX LC_TIME
#ifndef _LCONV_DEFINED
#define _LCONV_DEFINED
struct lconv {
char *decimal_point;
char *thousands_sep;
char *grouping;
char *int_curr_symbol;
char *currency_symbol;
char *mon_decimal_point;
char *mon_thousands_sep;
char *mon_grouping;
char *positive_sign;
char *negative_sign;
char int_frac_digits;
char frac_digits;
char p_cs_precedes;
char p_sep_by_space;
char n_cs_precedes;
char n_sep_by_space;
char p_sign_posn;
char n_sign_posn;
};
#endif
#ifndef _CONFIG_LOCALE_SWT
#define _CONFIG_LOCALE_SWT
#define _ENABLE_PER_THREAD_LOCALE 0x1
#define _DISABLE_PER_THREAD_LOCALE 0x2
#define _ENABLE_PER_THREAD_LOCALE_GLOBAL 0x10
#define _DISABLE_PER_THREAD_LOCALE_GLOBAL 0x20
#define _ENABLE_PER_THREAD_LOCALE_NEW 0x100
#define _DISABLE_PER_THREAD_LOCALE_NEW 0x200
#endif
int __cdecl _configthreadlocale(int _Flag);
char *__cdecl setlocale(int _Category,const char *_Locale);
_CRTIMP struct lconv *__cdecl localeconv(void);
_locale_t __cdecl _get_current_locale(void);
_locale_t __cdecl _create_locale(int _Category,const char *_Locale);
void __cdecl _free_locale(_locale_t _Locale);
_locale_t __cdecl __get_current_locale(void);
_locale_t __cdecl __create_locale(int _Category,const char *_Locale);
void __cdecl __free_locale(_locale_t _Locale);
#ifndef _WLOCALE_DEFINED
#define _WLOCALE_DEFINED
_CRTIMP wchar_t *__cdecl _wsetlocale(int _Category,const wchar_t *_Locale);
#endif
#ifdef __cplusplus
}
#endif
#pragma pack(pop)
#endif

View file

@ -0,0 +1,181 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _MALLOC_H_
#define _MALLOC_H_
#include <_mingw.h>
#pragma pack(push,_CRT_PACKING)
#ifndef _MM_MALLOC_H_INCLUDED
#define _MM_MALLOC_H_INCLUDED
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _WIN64
#define _HEAP_MAXREQ 0xFFFFFFFFFFFFFFE0
#else
#define _HEAP_MAXREQ 0xFFFFFFE0
#endif
#ifndef _STATIC_ASSERT
#define _STATIC_ASSERT(expr) extern void __static_assert_t(int [(expr)?1:-1])
#endif
/* Return codes for _heapwalk() */
#define _HEAPEMPTY (-1)
#define _HEAPOK (-2)
#define _HEAPBADBEGIN (-3)
#define _HEAPBADNODE (-4)
#define _HEAPEND (-5)
#define _HEAPBADPTR (-6)
/* Values for _heapinfo.useflag */
#define _FREEENTRY 0
#define _USEDENTRY 1
#ifndef _HEAPINFO_DEFINED
#define _HEAPINFO_DEFINED
/* The structure used to walk through the heap with _heapwalk. */
typedef struct _heapinfo {
int *_pentry;
size_t _size;
int _useflag;
} _HEAPINFO;
#endif
extern unsigned int _amblksiz;
#define _mm_free(a) _aligned_free(a)
#define _mm_malloc(a,b) _aligned_malloc(a,b)
#ifndef _CRT_ALLOCATION_DEFINED
#define _CRT_ALLOCATION_DEFINED
void *__cdecl calloc(size_t _NumOfElements,size_t _SizeOfElements);
void __cdecl free(void *_Memory);
void *__cdecl malloc(size_t _Size);
void *__cdecl realloc(void *_Memory,size_t _NewSize);
_CRTIMP void *__cdecl _recalloc(void *_Memory,size_t _Count,size_t _Size);
/* _CRTIMP void __cdecl _aligned_free(void *_Memory);
_CRTIMP void *__cdecl _aligned_malloc(size_t _Size,size_t _Alignment); */
_CRTIMP void *__cdecl _aligned_offset_malloc(size_t _Size,size_t _Alignment,size_t _Offset);
_CRTIMP void *__cdecl _aligned_realloc(void *_Memory,size_t _Size,size_t _Alignment);
_CRTIMP void *__cdecl _aligned_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment);
_CRTIMP void *__cdecl _aligned_offset_realloc(void *_Memory,size_t _Size,size_t _Alignment,size_t _Offset);
_CRTIMP void *__cdecl _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset);
#endif
#define _MAX_WAIT_MALLOC_CRT 60000
_CRTIMP int __cdecl _resetstkoflw (void);
_CRTIMP unsigned long __cdecl _set_malloc_crt_max_wait(unsigned long _NewValue);
_CRTIMP void *__cdecl _expand(void *_Memory,size_t _NewSize);
_CRTIMP size_t __cdecl _msize(void *_Memory);
#ifdef __GNUC__
#undef _alloca
#define _alloca(x) __builtin_alloca((x))
#else
/* tcc implements alloca internally and exposes it (since commit d778bde7).
/* alloca is declared at include/stddef.h (which is distributed with tcc).
*/
#ifdef _alloca
#undef _alloca
#endif
#define _alloca(x) alloca((x))
#endif
_CRTIMP size_t __cdecl _get_sbh_threshold(void);
_CRTIMP int __cdecl _set_sbh_threshold(size_t _NewValue);
_CRTIMP errno_t __cdecl _set_amblksiz(size_t _Value);
_CRTIMP errno_t __cdecl _get_amblksiz(size_t *_Value);
_CRTIMP int __cdecl _heapadd(void *_Memory,size_t _Size);
_CRTIMP int __cdecl _heapchk(void);
_CRTIMP int __cdecl _heapmin(void);
_CRTIMP int __cdecl _heapset(unsigned int _Fill);
_CRTIMP int __cdecl _heapwalk(_HEAPINFO *_EntryInfo);
_CRTIMP size_t __cdecl _heapused(size_t *_Used,size_t *_Commit);
_CRTIMP intptr_t __cdecl _get_heap_handle(void);
#define _ALLOCA_S_THRESHOLD 1024
#define _ALLOCA_S_STACK_MARKER 0xCCCC
#define _ALLOCA_S_HEAP_MARKER 0xDDDD
#if(defined(_X86_) && !defined(__x86_64))
#define _ALLOCA_S_MARKER_SIZE 8
#elif defined(__ia64__) || defined(__x86_64)
#define _ALLOCA_S_MARKER_SIZE 16
#endif
#if !defined(RC_INVOKED)
static __inline void *_MarkAllocaS(void *_Ptr,unsigned int _Marker) {
if(_Ptr) {
*((unsigned int*)_Ptr) = _Marker;
_Ptr = (char*)_Ptr + _ALLOCA_S_MARKER_SIZE;
}
return _Ptr;
}
#endif
#undef _malloca
#define _malloca(size) \
((((size) + _ALLOCA_S_MARKER_SIZE) <= _ALLOCA_S_THRESHOLD) ? \
_MarkAllocaS(_alloca((size) + _ALLOCA_S_MARKER_SIZE),_ALLOCA_S_STACK_MARKER) : \
_MarkAllocaS(malloc((size) + _ALLOCA_S_MARKER_SIZE),_ALLOCA_S_HEAP_MARKER))
#undef _FREEA_INLINE
#define _FREEA_INLINE
#ifndef RC_INVOKED
#undef _freea
static __inline void __cdecl _freea(void *_Memory) {
unsigned int _Marker;
if(_Memory) {
_Memory = (char*)_Memory - _ALLOCA_S_MARKER_SIZE;
_Marker = *(unsigned int *)_Memory;
if(_Marker==_ALLOCA_S_HEAP_MARKER) {
free(_Memory);
}
#ifdef _ASSERTE
else if(_Marker!=_ALLOCA_S_STACK_MARKER) {
_ASSERTE(("Corrupted pointer passed to _freea",0));
}
#endif
}
}
#endif /* RC_INVOKED */
#ifndef NO_OLDNAMES
#ifdef __GNUC__
#undef alloca
#define alloca(x) __builtin_alloca((x))
#endif
#endif
#ifdef HEAPHOOK
#ifndef _HEAPHOOK_DEFINED
#define _HEAPHOOK_DEFINED
typedef int (__cdecl *_HEAPHOOK)(int,size_t,void *,void **);
#endif
_CRTIMP _HEAPHOOK __cdecl _setheaphook(_HEAPHOOK _NewHook);
#define _HEAP_MALLOC 1
#define _HEAP_CALLOC 2
#define _HEAP_FREE 3
#define _HEAP_REALLOC 4
#define _HEAP_MSIZE 5
#define _HEAP_EXPAND 6
#endif
#ifdef __cplusplus
}
#endif
#pragma pack(pop)
#endif /* _MALLOC_H_ */

View file

@ -0,0 +1,737 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _MATH_H_
#define _MATH_H_
#if __GNUC__ >= 3
#pragma GCC system_header
#endif
#include <_mingw.h>
struct exception;
#pragma pack(push,_CRT_PACKING)
#define _DOMAIN 1
#define _SING 2
#define _OVERFLOW 3
#define _UNDERFLOW 4
#define _TLOSS 5
#define _PLOSS 6
#ifndef __STRICT_ANSI__
#ifndef NO_OLDNAMES
#define DOMAIN _DOMAIN
#define SING _SING
#define OVERFLOW _OVERFLOW
#define UNDERFLOW _UNDERFLOW
#define TLOSS _TLOSS
#define PLOSS _PLOSS
#endif
#endif
#ifndef __STRICT_ANSI__
#define M_E 2.71828182845904523536
#define M_LOG2E 1.44269504088896340736
#define M_LOG10E 0.434294481903251827651
#define M_LN2 0.693147180559945309417
#define M_LN10 2.30258509299404568402
#define M_PI 3.14159265358979323846
#define M_PI_2 1.57079632679489661923
#define M_PI_4 0.785398163397448309616
#define M_1_PI 0.318309886183790671538
#define M_2_PI 0.636619772367581343076
#define M_2_SQRTPI 1.12837916709551257390
#define M_SQRT2 1.41421356237309504880
#define M_SQRT1_2 0.707106781186547524401
#endif
#ifndef __STRICT_ANSI__
/* See also float.h */
#ifndef __MINGW_FPCLASS_DEFINED
#define __MINGW_FPCLASS_DEFINED 1
#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
#define _FPCLASS_NINF 0x0004 /* Negative Infinity */
#define _FPCLASS_NN 0x0008 /* Negative Normal */
#define _FPCLASS_ND 0x0010 /* Negative Denormal */
#define _FPCLASS_NZ 0x0020 /* Negative Zero */
#define _FPCLASS_PZ 0x0040 /* Positive Zero */
#define _FPCLASS_PD 0x0080 /* Positive Denormal */
#define _FPCLASS_PN 0x0100 /* Positive Normal */
#define _FPCLASS_PINF 0x0200 /* Positive Infinity */
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _EXCEPTION_DEFINED
#define _EXCEPTION_DEFINED
struct _exception {
int type;
char *name;
double arg1;
double arg2;
double retval;
};
#endif
#ifndef _COMPLEX_DEFINED
#define _COMPLEX_DEFINED
struct _complex {
double x,y;
};
#endif
#define EDOM 33
#define ERANGE 34
#ifndef _HUGE
#ifdef _MSVCRT_
extern double *_HUGE;
#else
extern double *_imp___HUGE;
#define _HUGE (*_imp___HUGE)
#endif
#endif
#define HUGE_VAL _HUGE
#ifndef _CRT_ABS_DEFINED
#define _CRT_ABS_DEFINED
int __cdecl abs(int _X);
long __cdecl labs(long _X);
#endif
double __cdecl acos(double _X);
double __cdecl asin(double _X);
double __cdecl atan(double _X);
double __cdecl atan2(double _Y,double _X);
#ifndef _SIGN_DEFINED
#define _SIGN_DEFINED
_CRTIMP double __cdecl _copysign (double _Number,double _Sign);
_CRTIMP double __cdecl _chgsign (double _X);
#endif
double __cdecl cos(double _X);
double __cdecl cosh(double _X);
double __cdecl exp(double _X);
double __cdecl expm1(double _X);
double __cdecl fabs(double _X);
double __cdecl fmod(double _X,double _Y);
double __cdecl log(double _X);
double __cdecl log10(double _X);
double __cdecl pow(double _X,double _Y);
double __cdecl sin(double _X);
double __cdecl sinh(double _X);
double __cdecl tan(double _X);
double __cdecl tanh(double _X);
double __cdecl sqrt(double _X);
#ifndef _CRT_ATOF_DEFINED
#define _CRT_ATOF_DEFINED
double __cdecl atof(const char *_String);
double __cdecl _atof_l(const char *_String,_locale_t _Locale);
#endif
_CRTIMP double __cdecl _cabs(struct _complex _ComplexA);
double __cdecl ceil(double _X);
double __cdecl floor(double _X);
double __cdecl frexp(double _X,int *_Y);
double __cdecl _hypot(double _X,double _Y);
_CRTIMP double __cdecl _j0(double _X);
_CRTIMP double __cdecl _j1(double _X);
_CRTIMP double __cdecl _jn(int _X,double _Y);
double __cdecl ldexp(double _X,int _Y);
#ifndef _CRT_MATHERR_DEFINED
#define _CRT_MATHERR_DEFINED
int __cdecl _matherr(struct _exception *_Except);
#endif
double __cdecl modf(double _X,double *_Y);
_CRTIMP double __cdecl _y0(double _X);
_CRTIMP double __cdecl _y1(double _X);
_CRTIMP double __cdecl _yn(int _X,double _Y);
#if(defined(_X86_) && !defined(__x86_64))
_CRTIMP int __cdecl _set_SSE2_enable(int _Flag);
/* from libmingwex */
float __cdecl _hypotf(float _X,float _Y);
#endif
float frexpf(float _X,int *_Y);
float __cdecl ldexpf(float _X,int _Y);
long double __cdecl ldexpl(long double _X,int _Y);
float __cdecl acosf(float _X);
float __cdecl asinf(float _X);
float __cdecl atanf(float _X);
float __cdecl atan2f(float _X,float _Y);
float __cdecl cosf(float _X);
float __cdecl sinf(float _X);
float __cdecl tanf(float _X);
float __cdecl coshf(float _X);
float __cdecl sinhf(float _X);
float __cdecl tanhf(float _X);
float __cdecl expf(float _X);
float __cdecl expm1f(float _X);
float __cdecl logf(float _X);
float __cdecl log10f(float _X);
float __cdecl modff(float _X,float *_Y);
float __cdecl powf(float _X,float _Y);
float __cdecl sqrtf(float _X);
float __cdecl ceilf(float _X);
float __cdecl floorf(float _X);
float __cdecl fmodf(float _X,float _Y);
float __cdecl _hypotf(float _X,float _Y);
float __cdecl fabsf(float _X);
#if !defined(__ia64__)
/* from libmingwex */
float __cdecl _copysignf (float _Number,float _Sign);
float __cdecl _chgsignf (float _X);
float __cdecl _logbf(float _X);
float __cdecl _nextafterf(float _X,float _Y);
int __cdecl _finitef(float _X);
int __cdecl _isnanf(float _X);
int __cdecl _fpclassf(float _X);
#endif
#ifndef __cplusplus
__CRT_INLINE long double __cdecl fabsl (long double x)
{
long double res;
__asm__ ("fabs;" : "=t" (res) : "0" (x));
return res;
}
#define _hypotl(x,y) ((long double)_hypot((double)(x),(double)(y)))
#define _matherrl _matherr
__CRT_INLINE long double _chgsignl(long double _Number) { return _chgsign((double)(_Number)); }
__CRT_INLINE long double _copysignl(long double _Number,long double _Sign) { return _copysign((double)(_Number),(double)(_Sign)); }
__CRT_INLINE float frexpf(float _X,int *_Y) { return ((float)frexp((double)_X,_Y)); }
#if !defined (__ia64__)
__CRT_INLINE float __cdecl fabsf (float x)
{
float res;
__asm__ ("fabs;" : "=t" (res) : "0" (x));
return res;
}
__CRT_INLINE float __cdecl ldexpf (float x, int expn) { return (float) ldexp (x, expn); }
#endif
#else
// cplusplus
__CRT_INLINE long double __cdecl fabsl (long double x)
{
long double res;
__asm__ ("fabs;" : "=t" (res) : "0" (x));
return res;
}
__CRT_INLINE long double modfl(long double _X,long double *_Y) {
double _Di,_Df = modf((double)_X,&_Di);
*_Y = (long double)_Di;
return (_Df);
}
__CRT_INLINE long double _chgsignl(long double _Number) { return _chgsign(static_cast<double>(_Number)); }
__CRT_INLINE long double _copysignl(long double _Number,long double _Sign) { return _copysign(static_cast<double>(_Number),static_cast<double>(_Sign)); }
__CRT_INLINE float frexpf(float _X,int *_Y) { return ((float)frexp((double)_X,_Y)); }
#ifndef __ia64__
__CRT_INLINE float __cdecl fabsf (float x)
{
float res;
__asm__ ("fabs;" : "=t" (res) : "0" (x));
return res;
}
__CRT_INLINE float __cdecl ldexpf (float x, int expn) { return (float) ldexp (x, expn); }
#ifndef __x86_64
__CRT_INLINE float acosf(float _X) { return ((float)acos((double)_X)); }
__CRT_INLINE float asinf(float _X) { return ((float)asin((double)_X)); }
__CRT_INLINE float atanf(float _X) { return ((float)atan((double)_X)); }
__CRT_INLINE float atan2f(float _X,float _Y) { return ((float)atan2((double)_X,(double)_Y)); }
__CRT_INLINE float ceilf(float _X) { return ((float)ceil((double)_X)); }
__CRT_INLINE float cosf(float _X) { return ((float)cos((double)_X)); }
__CRT_INLINE float coshf(float _X) { return ((float)cosh((double)_X)); }
__CRT_INLINE float expf(float _X) { return ((float)exp((double)_X)); }
__CRT_INLINE float floorf(float _X) { return ((float)floor((double)_X)); }
__CRT_INLINE float fmodf(float _X,float _Y) { return ((float)fmod((double)_X,(double)_Y)); }
__CRT_INLINE float logf(float _X) { return ((float)log((double)_X)); }
__CRT_INLINE float log10f(float _X) { return ((float)log10((double)_X)); }
__CRT_INLINE float modff(float _X,float *_Y) {
double _Di,_Df = modf((double)_X,&_Di);
*_Y = (float)_Di;
return ((float)_Df);
}
__CRT_INLINE float powf(float _X,float _Y) { return ((float)pow((double)_X,(double)_Y)); }
__CRT_INLINE float sinf(float _X) { return ((float)sin((double)_X)); }
__CRT_INLINE float sinhf(float _X) { return ((float)sinh((double)_X)); }
__CRT_INLINE float sqrtf(float _X) { return ((float)sqrt((double)_X)); }
__CRT_INLINE float tanf(float _X) { return ((float)tan((double)_X)); }
__CRT_INLINE float tanhf(float _X) { return ((float)tanh((double)_X)); }
#endif
#endif
#endif
#ifndef NO_OLDNAMES
#define matherr _matherr
#define HUGE _HUGE
/* double __cdecl cabs(struct _complex _X); */
double __cdecl hypot(double _X,double _Y);
_CRTIMP double __cdecl j0(double _X);
_CRTIMP double __cdecl j1(double _X);
_CRTIMP double __cdecl jn(int _X,double _Y);
_CRTIMP double __cdecl y0(double _X);
_CRTIMP double __cdecl y1(double _X);
_CRTIMP double __cdecl yn(int _X,double _Y);
#endif
#ifndef __NO_ISOCEXT
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
|| !defined __STRICT_ANSI__ || defined __GLIBCPP__
#define NAN (0.0F/0.0F)
#define HUGE_VALF (1.0F/0.0F)
#define HUGE_VALL (1.0L/0.0L)
#define INFINITY (1.0F/0.0F)
#define FP_NAN 0x0100
#define FP_NORMAL 0x0400
#define FP_INFINITE (FP_NAN | FP_NORMAL)
#define FP_ZERO 0x4000
#define FP_SUBNORMAL (FP_NORMAL | FP_ZERO)
/* 0x0200 is signbit mask */
/*
We can't __CRT_INLINE float or double, because we want to ensure truncation
to semantic type before classification.
(A normal long double value might become subnormal when
converted to double, and zero when converted to float.)
*/
extern int __cdecl __fpclassifyf (float);
extern int __cdecl __fpclassify (double);
extern int __cdecl __fpclassifyl (long double);
/* Implemented at tcc/tcc_libm.h */
#define fpclassify(x) (sizeof (x) == sizeof (float) ? __fpclassifyf (x) \
: sizeof (x) == sizeof (double) ? __fpclassify (x) \
: __fpclassifyl (x))
/* 7.12.3.2 */
#define isfinite(x) ((fpclassify(x) & FP_NAN) == 0)
/* 7.12.3.3 */
#define isinf(x) (fpclassify(x) == FP_INFINITE)
/* 7.12.3.4 */
/* We don't need to worry about truncation here:
A NaN stays a NaN. */
#define isnan(x) (fpclassify(x) == FP_NAN)
/* 7.12.3.5 */
#define isnormal(x) (fpclassify(x) == FP_NORMAL)
/* 7.12.3.6 The signbit macro */
extern int __cdecl __signbitf (float);
extern int __cdecl __signbit (double);
extern int __cdecl __signbitl (long double);
/* Implemented at tcc/tcc_libm.h */
#define signbit(x) (sizeof (x) == sizeof (float) ? __signbitf (x) \
: sizeof (x) == sizeof (double) ? __signbit (x) \
: __signbitl (x))
extern double __cdecl exp2(double);
extern float __cdecl exp2f(float);
extern long double __cdecl exp2l(long double);
#define FP_ILOGB0 ((int)0x80000000)
#define FP_ILOGBNAN ((int)0x80000000)
extern int __cdecl ilogb (double);
extern int __cdecl ilogbf (float);
extern int __cdecl ilogbl (long double);
extern double __cdecl log1p(double);
extern float __cdecl log1pf(float);
extern long double __cdecl log1pl(long double);
extern double __cdecl log2 (double);
extern float __cdecl log2f (float);
extern long double __cdecl log2l (long double);
extern double __cdecl logb (double);
extern float __cdecl logbf (float);
extern long double __cdecl logbl (long double);
__CRT_INLINE double __cdecl logb (double x)
{
double res;
__asm__ ("fxtract\n\t"
"fstp %%st" : "=t" (res) : "0" (x));
return res;
}
__CRT_INLINE float __cdecl logbf (float x)
{
float res;
__asm__ ("fxtract\n\t"
"fstp %%st" : "=t" (res) : "0" (x));
return res;
}
__CRT_INLINE long double __cdecl logbl (long double x)
{
long double res;
__asm__ ("fxtract\n\t"
"fstp %%st" : "=t" (res) : "0" (x));
return res;
}
extern long double __cdecl modfl (long double, long double*);
/* 7.12.6.13 */
extern double __cdecl scalbn (double, int);
extern float __cdecl scalbnf (float, int);
extern long double __cdecl scalbnl (long double, int);
extern double __cdecl scalbln (double, long);
extern float __cdecl scalblnf (float, long);
extern long double __cdecl scalblnl (long double, long);
/* 7.12.7.1 */
/* Implementations adapted from Cephes versions */
extern double __cdecl cbrt (double);
extern float __cdecl cbrtf (float);
extern long double __cdecl cbrtl (long double);
__CRT_INLINE float __cdecl hypotf (float x, float y)
{ return (float) hypot (x, y);}
extern long double __cdecl hypotl (long double, long double);
extern long double __cdecl powl (long double, long double);
extern long double __cdecl expl(long double);
extern long double __cdecl expm1l(long double);
extern long double __cdecl coshl(long double);
extern long double __cdecl fabsl (long double);
extern long double __cdecl acosl(long double);
extern long double __cdecl asinl(long double);
extern long double __cdecl atanl(long double);
extern long double __cdecl atan2l(long double,long double);
extern long double __cdecl sinhl(long double);
extern long double __cdecl tanhl(long double);
/* 7.12.8.1 The erf functions */
extern double __cdecl erf (double);
extern float __cdecl erff (float);
/* TODO
extern long double __cdecl erfl (long double);
*/
/* 7.12.8.2 The erfc functions */
extern double __cdecl erfc (double);
extern float __cdecl erfcf (float);
/* TODO
extern long double __cdecl erfcl (long double);
*/
/* 7.12.8.3 The lgamma functions */
extern double __cdecl lgamma (double);
extern float __cdecl lgammaf (float);
extern long double __cdecl lgammal (long double);
/* 7.12.8.4 The tgamma functions */
extern double __cdecl tgamma (double);
extern float __cdecl tgammaf (float);
extern long double __cdecl tgammal (long double);
extern long double __cdecl ceill (long double);
extern long double __cdecl floorl (long double);
extern long double __cdecl frexpl(long double,int *);
extern long double __cdecl log10l(long double);
extern long double __cdecl logl(long double);
extern long double __cdecl cosl(long double);
extern long double __cdecl sinl(long double);
extern long double __cdecl tanl(long double);
extern long double sqrtl(long double);
/* 7.12.9.3 */
extern double __cdecl nearbyint ( double);
extern float __cdecl nearbyintf (float);
extern long double __cdecl nearbyintl (long double);
/* 7.12.9.4 */
/* round, using fpu control word settings */
__CRT_INLINE double __cdecl rint (double x)
{
double retval;
__asm__ (
"fldl %1\n"
"frndint \n"
"fstl %0\n" : "=m" (retval) : "m" (x));
return retval;
}
__CRT_INLINE float __cdecl rintf (float x)
{
float retval;
__asm__ (
"flds %1\n"
"frndint \n"
"fsts %0\n" : "=m" (retval) : "m" (x));
return retval;
}
__CRT_INLINE long double __cdecl rintl (long double x)
{
long double retval;
__asm__ (
"fldt %1\n"
"frndint \n"
"fstt %0\n" : "=m" (retval) : "m" (x));
return retval;
}
/* 7.12.9.5 */
__CRT_INLINE long __cdecl lrint (double x)
{
long retval;
__asm__ __volatile__ \
("fldl %1\n" \
"fistpl %0" : "=m" (retval) : "m" (x)); \
return retval;
}
__CRT_INLINE long __cdecl lrintf (float x)
{
long retval;
__asm__ __volatile__ \
("flds %1\n" \
"fistpl %0" : "=m" (retval) : "m" (x)); \
return retval;
}
__CRT_INLINE long __cdecl lrintl (long double x)
{
long retval;
__asm__ __volatile__ \
("fldt %1\n" \
"fistpl %0" : "=m" (retval) : "m" (x)); \
return retval;
}
__CRT_INLINE long long __cdecl llrint (double x)
{
long long retval;
__asm__ __volatile__ \
("fldl %1\n" \
"fistpll %0" : "=m" (retval) : "m" (x)); \
return retval;
}
__CRT_INLINE long long __cdecl llrintf (float x)
{
long long retval;
__asm__ __volatile__ \
("flds %1\n" \
"fistpll %0" : "=m" (retval) : "m" (x)); \
return retval;
}
__CRT_INLINE long long __cdecl llrintl (long double x)
{
long long retval;
__asm__ __volatile__ \
("fldt %1\n" \
"fistpll %0" : "=m" (retval) : "m" (x)); \
return retval;
}
#define FE_TONEAREST 0x0000
#define FE_DOWNWARD 0x0400
#define FE_UPWARD 0x0800
#define FE_TOWARDZERO 0x0c00
__CRT_INLINE double trunc (double _x)
{
double retval;
unsigned short saved_cw;
unsigned short tmp_cw;
__asm__ ("fnstcw %0;" : "=m" (saved_cw)); /* save FPU control word */
tmp_cw = (saved_cw & ~(FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO))
| FE_TOWARDZERO;
__asm__ ("fldcw %0;" : : "m" (tmp_cw));
__asm__ ("fldl %1;"
"frndint;"
"fstl %0;" : "=m" (retval) : "m" (_x)); /* round towards zero */
__asm__ ("fldcw %0;" : : "m" (saved_cw) ); /* restore saved control word */
return retval;
}
/* 7.12.9.6 */
/* round away from zero, regardless of fpu control word settings */
extern double __cdecl round (double);
extern float __cdecl roundf (float);
extern long double __cdecl roundl (long double);
/* 7.12.9.7 */
extern long __cdecl lround (double);
extern long __cdecl lroundf (float);
extern long __cdecl lroundl (long double);
extern long long __cdecl llround (double);
extern long long __cdecl llroundf (float);
extern long long __cdecl llroundl (long double);
/* 7.12.9.8 */
/* round towards zero, regardless of fpu control word settings */
extern double __cdecl trunc (double);
extern float __cdecl truncf (float);
extern long double __cdecl truncl (long double);
extern long double __cdecl fmodl (long double, long double);
/* 7.12.10.2 */
extern double __cdecl remainder (double, double);
extern float __cdecl remainderf (float, float);
extern long double __cdecl remainderl (long double, long double);
/* 7.12.10.3 */
extern double __cdecl remquo(double, double, int *);
extern float __cdecl remquof(float, float, int *);
extern long double __cdecl remquol(long double, long double, int *);
/* 7.12.11.1 */
extern double __cdecl copysign (double, double); /* in libmoldname.a */
extern float __cdecl copysignf (float, float);
extern long double __cdecl copysignl (long double, long double);
/* 7.12.11.2 Return a NaN */
extern double __cdecl nan(const char *tagp);
extern float __cdecl nanf(const char *tagp);
extern long double __cdecl nanl(const char *tagp);
#ifndef __STRICT_ANSI__
#define _nan() nan("")
#define _nanf() nanf("")
#define _nanl() nanl("")
#endif
/* 7.12.11.3 */
extern double __cdecl nextafter (double, double); /* in libmoldname.a */
extern float __cdecl nextafterf (float, float);
extern long double __cdecl nextafterl (long double, long double);
/* 7.12.11.4 The nexttoward functions: TODO */
/* 7.12.12.1 */
/* x > y ? (x - y) : 0.0 */
extern double __cdecl fdim (double x, double y);
extern float __cdecl fdimf (float x, float y);
extern long double __cdecl fdiml (long double x, long double y);
/* fmax and fmin.
NaN arguments are treated as missing data: if one argument is a NaN
and the other numeric, then these functions choose the numeric
value. */
/* 7.12.12.2 */
extern double __cdecl fmax (double, double);
extern float __cdecl fmaxf (float, float);
extern long double __cdecl fmaxl (long double, long double);
/* 7.12.12.3 */
extern double __cdecl fmin (double, double);
extern float __cdecl fminf (float, float);
extern long double __cdecl fminl (long double, long double);
/* 7.12.13.1 */
/* return x * y + z as a ternary op */
extern double __cdecl fma (double, double, double);
extern float __cdecl fmaf (float, float, float);
extern long double __cdecl fmal (long double, long double, long double);
#if 0 // gr: duplicate, see below
/* 7.12.14 */
/*
* With these functions, comparisons involving quiet NaNs set the FP
* condition code to "unordered". The IEEE floating-point spec
* dictates that the result of floating-point comparisons should be
* false whenever a NaN is involved, with the exception of the != op,
* which always returns true: yes, (NaN != NaN) is true).
*/
#if __GNUC__ >= 3
#define isgreater(x, y) __builtin_isgreater(x, y)
#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
#define isless(x, y) __builtin_isless(x, y)
#define islessequal(x, y) __builtin_islessequal(x, y)
#define islessgreater(x, y) __builtin_islessgreater(x, y)
#define isunordered(x, y) __builtin_isunordered(x, y)
#else
/* helper */
__CRT_INLINE int __cdecl
__fp_unordered_compare (long double x, long double y){
unsigned short retval;
__asm__ ("fucom %%st(1);"
"fnstsw;": "=a" (retval) : "t" (x), "u" (y));
return retval;
}
#define isgreater(x, y) ((__fp_unordered_compare(x, y) \
& 0x4500) == 0)
#define isless(x, y) ((__fp_unordered_compare (y, x) \
& 0x4500) == 0)
#define isgreaterequal(x, y) ((__fp_unordered_compare (x, y) \
& FP_INFINITE) == 0)
#define islessequal(x, y) ((__fp_unordered_compare(y, x) \
& FP_INFINITE) == 0)
#define islessgreater(x, y) ((__fp_unordered_compare(x, y) \
& FP_SUBNORMAL) == 0)
#define isunordered(x, y) ((__fp_unordered_compare(x, y) \
& 0x4500) == 0x4500)
#endif
#endif //0
#endif /* __STDC_VERSION__ >= 199901L */
#endif /* __NO_ISOCEXT */
#ifdef __cplusplus
}
extern "C++" {
template<class _Ty> inline _Ty _Pow_int(_Ty _X,int _Y) {
unsigned int _N;
if(_Y >= 0) _N = (unsigned int)_Y;
else _N = (unsigned int)(-_Y);
for(_Ty _Z = _Ty(1);;_X *= _X) {
if((_N & 1)!=0) _Z *= _X;
if((_N >>= 1)==0) return (_Y < 0 ? _Ty(1) / _Z : _Z);
}
}
}
#endif
#pragma pack(pop)
/* 7.12.14 */
/*
* With these functions, comparisons involving quiet NaNs set the FP
* condition code to "unordered". The IEEE floating-point spec
* dictates that the result of floating-point comparisons should be
* false whenever a NaN is involved, with the exception of the != op,
* which always returns true: yes, (NaN != NaN) is true).
*/
/* Mini libm (inline __fpclassify*, __signbit* and variants) */
#include "tcc/tcc_libm.h"
#endif /* End _MATH_H_ */

View file

@ -0,0 +1,13 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
/*
* This file is part of the Mingw32 package.
*
* mem.h maps to string.h
*/
#ifndef __STRICT_ANSI__
#include <string.h>
#endif

View file

@ -0,0 +1,40 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_MEMORY
#define _INC_MEMORY
#include <_mingw.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _CONST_RETURN
#define _CONST_RETURN
#endif
#define _WConst_return _CONST_RETURN
#ifndef _CRT_MEMORY_DEFINED
#define _CRT_MEMORY_DEFINED
_CRTIMP void *__cdecl _memccpy(void *_Dst,const void *_Src,int _Val,size_t _MaxCount);
_CONST_RETURN void *__cdecl memchr(const void *_Buf ,int _Val,size_t _MaxCount);
_CRTIMP int __cdecl _memicmp(const void *_Buf1,const void *_Buf2,size_t _Size);
_CRTIMP int __cdecl _memicmp_l(const void *_Buf1,const void *_Buf2,size_t _Size,_locale_t _Locale);
int __cdecl memcmp(const void *_Buf1,const void *_Buf2,size_t _Size);
void *__cdecl memcpy(void *_Dst,const void *_Src,size_t _Size);
void *__cdecl memset(void *_Dst,int _Val,size_t _Size);
#ifndef NO_OLDNAMES
void *__cdecl memccpy(void *_Dst,const void *_Src,int _Val,size_t _Size);
int __cdecl memicmp(const void *_Buf1,const void *_Buf2,size_t _Size);
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,176 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_PROCESS
#define _INC_PROCESS
#include <_mingw.h>
/* Includes a definition of _pid_t and pid_t */
#include <sys/types.h>
#ifndef _POSIX_
#ifdef __cplusplus
extern "C" {
#endif
#define _P_WAIT 0
#define _P_NOWAIT 1
#define _OLD_P_OVERLAY 2
#define _P_NOWAITO 3
#define _P_DETACH 4
#define _P_OVERLAY 2
#define _WAIT_CHILD 0
#define _WAIT_GRANDCHILD 1
_CRTIMP uintptr_t __cdecl _beginthread(void (__cdecl *_StartAddress) (void *),unsigned _StackSize,void *_ArgList);
_CRTIMP void __cdecl _endthread(void);
_CRTIMP uintptr_t __cdecl _beginthreadex(void *_Security,unsigned _StackSize,unsigned (__stdcall *_StartAddress) (void *),void *_ArgList,unsigned _InitFlag,unsigned *_ThrdAddr);
_CRTIMP void __cdecl _endthreadex(unsigned _Retval);
#ifndef _CRT_TERMINATE_DEFINED
#define _CRT_TERMINATE_DEFINED
void __cdecl __MINGW_NOTHROW exit(int _Code) __MINGW_ATTRIB_NORETURN;
_CRTIMP void __cdecl __MINGW_NOTHROW _exit(int _Code) __MINGW_ATTRIB_NORETURN;
#pragma push_macro("abort")
#undef abort
void __cdecl __declspec(noreturn) abort(void);
#pragma pop_macro("abort")
#endif
_CRTIMP void __cdecl __MINGW_NOTHROW _cexit(void);
_CRTIMP void __cdecl __MINGW_NOTHROW _c_exit(void);
_CRTIMP int __cdecl _getpid(void);
_CRTIMP intptr_t __cdecl _cwait(int *_TermStat,intptr_t _ProcHandle,int _Action);
_CRTIMP intptr_t __cdecl _execl(const char *_Filename,const char *_ArgList,...);
_CRTIMP intptr_t __cdecl _execle(const char *_Filename,const char *_ArgList,...);
_CRTIMP intptr_t __cdecl _execlp(const char *_Filename,const char *_ArgList,...);
_CRTIMP intptr_t __cdecl _execlpe(const char *_Filename,const char *_ArgList,...);
_CRTIMP intptr_t __cdecl _execv(const char *_Filename,const char *const *_ArgList);
_CRTIMP intptr_t __cdecl _execve(const char *_Filename,const char *const *_ArgList,const char *const *_Env);
_CRTIMP intptr_t __cdecl _execvp(const char *_Filename,const char *const *_ArgList);
_CRTIMP intptr_t __cdecl _execvpe(const char *_Filename,const char *const *_ArgList,const char *const *_Env);
_CRTIMP intptr_t __cdecl _spawnl(int _Mode,const char *_Filename,const char *_ArgList,...);
_CRTIMP intptr_t __cdecl _spawnle(int _Mode,const char *_Filename,const char *_ArgList,...);
_CRTIMP intptr_t __cdecl _spawnlp(int _Mode,const char *_Filename,const char *_ArgList,...);
_CRTIMP intptr_t __cdecl _spawnlpe(int _Mode,const char *_Filename,const char *_ArgList,...);
_CRTIMP intptr_t __cdecl _spawnv(int _Mode,const char *_Filename,const char *const *_ArgList);
_CRTIMP intptr_t __cdecl _spawnve(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env);
_CRTIMP intptr_t __cdecl _spawnvp(int _Mode,const char *_Filename,const char *const *_ArgList);
_CRTIMP intptr_t __cdecl _spawnvpe(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env);
#ifndef _CRT_SYSTEM_DEFINED
#define _CRT_SYSTEM_DEFINED
int __cdecl system(const char *_Command);
#endif
#ifndef _WPROCESS_DEFINED
#define _WPROCESS_DEFINED
_CRTIMP intptr_t __cdecl _wexecl(const wchar_t *_Filename,const wchar_t *_ArgList,...);
_CRTIMP intptr_t __cdecl _wexecle(const wchar_t *_Filename,const wchar_t *_ArgList,...);
_CRTIMP intptr_t __cdecl _wexeclp(const wchar_t *_Filename,const wchar_t *_ArgList,...);
_CRTIMP intptr_t __cdecl _wexeclpe(const wchar_t *_Filename,const wchar_t *_ArgList,...);
_CRTIMP intptr_t __cdecl _wexecv(const wchar_t *_Filename,const wchar_t *const *_ArgList);
_CRTIMP intptr_t __cdecl _wexecve(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
_CRTIMP intptr_t __cdecl _wexecvp(const wchar_t *_Filename,const wchar_t *const *_ArgList);
_CRTIMP intptr_t __cdecl _wexecvpe(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
_CRTIMP intptr_t __cdecl _wspawnl(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
_CRTIMP intptr_t __cdecl _wspawnle(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
_CRTIMP intptr_t __cdecl _wspawnlp(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
_CRTIMP intptr_t __cdecl _wspawnlpe(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
_CRTIMP intptr_t __cdecl _wspawnv(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
_CRTIMP intptr_t __cdecl _wspawnve(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
_CRTIMP intptr_t __cdecl _wspawnvp(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
_CRTIMP intptr_t __cdecl _wspawnvpe(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
#ifndef _CRT_WSYSTEM_DEFINED
#define _CRT_WSYSTEM_DEFINED
_CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
#endif
#endif
void __cdecl __security_init_cookie(void);
#if (defined(_X86_) && !defined(__x86_64))
void __fastcall __security_check_cookie(uintptr_t _StackCookie);
__declspec(noreturn) void __cdecl __report_gsfailure(void);
#else
void __cdecl __security_check_cookie(uintptr_t _StackCookie);
__declspec(noreturn) void __cdecl __report_gsfailure(uintptr_t _StackCookie);
#endif
extern uintptr_t __security_cookie;
intptr_t __cdecl _loaddll(char *_Filename);
int __cdecl _unloaddll(intptr_t _Handle);
int (__cdecl *__cdecl _getdllprocaddr(intptr_t _Handle,char *_ProcedureName,intptr_t _Ordinal))(void);
#ifdef _DECL_DLLMAIN
#ifdef _WINDOWS_
WINBOOL WINAPI DllMain(HANDLE _HDllHandle,DWORD _Reason,LPVOID _Reserved);
WINBOOL WINAPI _CRT_INIT(HANDLE _HDllHandle,DWORD _Reason,LPVOID _Reserved);
WINBOOL WINAPI _wCRT_INIT(HANDLE _HDllHandle,DWORD _Reason,LPVOID _Reserved);
extern WINBOOL (WINAPI *const _pRawDllMain)(HANDLE,DWORD,LPVOID);
#else
int __stdcall DllMain(void *_HDllHandle,unsigned _Reason,void *_Reserved);
int __stdcall _CRT_INIT(void *_HDllHandle,unsigned _Reason,void *_Reserved);
int __stdcall _wCRT_INIT(void *_HDllHandle,unsigned _Reason,void *_Reserved);
extern int (__stdcall *const _pRawDllMain)(void *,unsigned,void *);
#endif
#endif
#ifndef NO_OLDNAMES
#define P_WAIT _P_WAIT
#define P_NOWAIT _P_NOWAIT
#define P_OVERLAY _P_OVERLAY
#define OLD_P_OVERLAY _OLD_P_OVERLAY
#define P_NOWAITO _P_NOWAITO
#define P_DETACH _P_DETACH
#define WAIT_CHILD _WAIT_CHILD
#define WAIT_GRANDCHILD _WAIT_GRANDCHILD
intptr_t __cdecl cwait(int *_TermStat,intptr_t _ProcHandle,int _Action);
#ifdef __GNUC__
int __cdecl execl(const char *_Filename,const char *_ArgList,...);
int __cdecl execle(const char *_Filename,const char *_ArgList,...);
int __cdecl execlp(const char *_Filename,const char *_ArgList,...);
int __cdecl execlpe(const char *_Filename,const char *_ArgList,...);
#else
intptr_t __cdecl execl(const char *_Filename,const char *_ArgList,...);
intptr_t __cdecl execle(const char *_Filename,const char *_ArgList,...);
intptr_t __cdecl execlp(const char *_Filename,const char *_ArgList,...);
intptr_t __cdecl execlpe(const char *_Filename,const char *_ArgList,...);
#endif
intptr_t __cdecl spawnl(int,const char *_Filename,const char *_ArgList,...);
intptr_t __cdecl spawnle(int,const char *_Filename,const char *_ArgList,...);
intptr_t __cdecl spawnlp(int,const char *_Filename,const char *_ArgList,...);
intptr_t __cdecl spawnlpe(int,const char *_Filename,const char *_ArgList,...);
int __cdecl getpid(void);
#ifdef __GNUC__
/* Those methods are predefined by gcc builtins to return int. So to prevent
stupid warnings, define them in POSIX way. This is save, because those
methods do not return in success case, so that the return value is not
really dependent to its scalar width. */
int __cdecl execv(const char *_Filename,const char *const _ArgList[]);
int __cdecl execve(const char *_Filename,const char *const _ArgList[],const char *const _Env[]);
int __cdecl execvp(const char *_Filename,const char *const _ArgList[]);
int __cdecl execvpe(const char *_Filename,const char *const _ArgList[],const char *const _Env[]);
#else
intptr_t __cdecl execv(const char *_Filename,const char *const _ArgList[]);
intptr_t __cdecl execve(const char *_Filename,const char *const _ArgList[],const char *const _Env[]);
intptr_t __cdecl execvp(const char *_Filename,const char *const _ArgList[]);
intptr_t __cdecl execvpe(const char *_Filename,const char *const _ArgList[],const char *const _Env[]);
#endif
intptr_t __cdecl spawnv(int,const char *_Filename,const char *const _ArgList[]);
intptr_t __cdecl spawnve(int,const char *_Filename,const char *const _ArgList[],const char *const _Env[]);
intptr_t __cdecl spawnvp(int,const char *_Filename,const char *const _ArgList[]);
intptr_t __cdecl spawnvpe(int,const char *_Filename,const char *const _ArgList[],char *const _Env[]);
#endif
#ifdef __cplusplus
}
#endif
#endif
#endif

View file

@ -0,0 +1,42 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_CONIO_S
#define _INC_CONIO_S
#include <conio.h>
#if defined(MINGW_HAS_SECURE_API)
#ifdef __cplusplus
extern "C" {
#endif
_CRTIMP errno_t __cdecl _cgets_s(char *_Buffer,size_t _Size,size_t *_SizeRead);
_CRTIMP int __cdecl _cprintf_s(const char *_Format,...);
_CRTIMP int __cdecl _cscanf_s(const char *_Format,...);
_CRTIMP int __cdecl _cscanf_s_l(const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vcprintf_s(const char *_Format,va_list _ArgList);
_CRTIMP int __cdecl _cprintf_s_l(const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vcprintf_s_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
#ifndef _WCONIO_DEFINED_S
#define _WCONIO_DEFINED_S
_CRTIMP errno_t __cdecl _cgetws_s(wchar_t *_Buffer,size_t _SizeInWords,size_t *_SizeRead);
_CRTIMP int __cdecl _cwprintf_s(const wchar_t *_Format,...);
_CRTIMP int __cdecl _cwscanf_s(const wchar_t *_Format,...);
_CRTIMP int __cdecl _cwscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vcwprintf_s(const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _cwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vcwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
#endif
#ifdef __cplusplus
}
#endif
#endif
#endif

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 w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_CRTDBG_S
#define _INC_CRTDBG_S
#include <crtdbg.h>
#if defined(MINGW_HAS_SECURE_API)
#define _dupenv_s_dbg(ps1,size,s2,t,f,l) _dupenv_s(ps1,size,s2)
#define _wdupenv_s_dbg(ps1,size,s2,t,f,l) _wdupenv_s(ps1,size,s2)
#endif
#endif

View file

@ -0,0 +1,33 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_IO_S
#define _INC_IO_S
#include <io.h>
#if defined(MINGW_HAS_SECURE_API)
#ifdef __cplusplus
extern "C" {
#endif
_CRTIMP errno_t __cdecl _access_s(const char *_Filename,int _AccessMode);
_CRTIMP errno_t __cdecl _chsize_s(int _FileHandle,__int64 _Size);
_CRTIMP errno_t __cdecl _mktemp_s(char *_TemplateName,size_t _Size);
_CRTIMP errno_t __cdecl _umask_s(int _NewMode,int *_OldMode);
#ifndef _WIO_S_DEFINED
#define _WIO_S_DEFINED
_CRTIMP errno_t __cdecl _waccess_s(const wchar_t *_Filename,int _AccessMode);
_CRTIMP errno_t __cdecl _wmktemp_s(wchar_t *_TemplateName,size_t _SizeInWords);
#endif
#ifdef __cplusplus
}
#endif
#endif
#endif

View file

@ -0,0 +1,52 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_MBSTRING_S
#define _INC_MBSTRING_S
#include <mbstring.h>
#if defined(MINGW_HAS_SECURE_API)
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _MBSTRING_S_DEFINED
#define _MBSTRING_S_DEFINED
_CRTIMP errno_t __cdecl _mbscat_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src);
_CRTIMP errno_t __cdecl _mbscat_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,_locale_t _Locale);
_CRTIMP errno_t __cdecl _mbscpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src);
_CRTIMP errno_t __cdecl _mbscpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,_locale_t _Locale);
_CRTIMP errno_t __cdecl _mbslwr_s(unsigned char *_Str,size_t _SizeInBytes);
_CRTIMP errno_t __cdecl _mbslwr_s_l(unsigned char *_Str,size_t _SizeInBytes,_locale_t _Locale);
_CRTIMP errno_t __cdecl _mbsnbcat_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount);
_CRTIMP errno_t __cdecl _mbsnbcat_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale);
_CRTIMP errno_t __cdecl _mbsnbcpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount);
_CRTIMP errno_t __cdecl _mbsnbcpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale);
_CRTIMP errno_t __cdecl _mbsnbset_s(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Ch,size_t _MaxCount);
_CRTIMP errno_t __cdecl _mbsnbset_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Ch,size_t _MaxCount,_locale_t _Locale);
_CRTIMP errno_t __cdecl _mbsncat_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount);
_CRTIMP errno_t __cdecl _mbsncat_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale);
_CRTIMP errno_t __cdecl _mbsncpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount);
_CRTIMP errno_t __cdecl _mbsncpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,const unsigned char *_Src,size_t _MaxCount,_locale_t _Locale);
_CRTIMP errno_t __cdecl _mbsnset_s(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val,size_t _MaxCount);
_CRTIMP errno_t __cdecl _mbsnset_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val,size_t _MaxCount,_locale_t _Locale);
_CRTIMP errno_t __cdecl _mbsset_s(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val);
_CRTIMP errno_t __cdecl _mbsset_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,unsigned int _Val,_locale_t _Locale);
_CRTIMP unsigned char *__cdecl _mbstok_s(unsigned char *_Str,const unsigned char *_Delim,unsigned char **_Context);
_CRTIMP unsigned char *__cdecl _mbstok_s_l(unsigned char *_Str,const unsigned char *_Delim,unsigned char **_Context,_locale_t _Locale);
_CRTIMP errno_t __cdecl _mbsupr_s(unsigned char *_Str,size_t _SizeInBytes);
_CRTIMP errno_t __cdecl _mbsupr_s_l(unsigned char *_Str,size_t _SizeInBytes,_locale_t _Locale);
_CRTIMP errno_t __cdecl _mbccpy_s(unsigned char *_Dst,size_t _DstSizeInBytes,int *_PCopied,const unsigned char *_Src);
_CRTIMP errno_t __cdecl _mbccpy_s_l(unsigned char *_Dst,size_t _DstSizeInBytes,int *_PCopied,const unsigned char *_Src,_locale_t _Locale);
#endif
#ifdef __cplusplus
}
#endif
#endif
#endif

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 w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_SEARCH_S
#define _INC_SEARCH_S
#include <search.h>
#if defined(MINGW_HAS_SECURE_API)
#ifdef __cplusplus
extern "C" {
#endif
_CRTIMP void *__cdecl _lfind_s(const void *_Key,const void *_Base,unsigned int *_NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(void *,const void *,const void *),void *_Context);
_CRTIMP void *__cdecl _lsearch_s(const void *_Key,void *_Base,unsigned int *_NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(void *,const void *,const void *),void *_Context);
#ifdef __cplusplus
}
#endif
#endif
#endif

View file

@ -0,0 +1,145 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_STDIO_S
#define _INC_STDIO_S
#include <stdio.h>
#if defined(MINGW_HAS_SECURE_API)
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _STDIO_S_DEFINED
#define _STDIO_S_DEFINED
_CRTIMP errno_t __cdecl clearerr_s(FILE *_File);
int __cdecl fprintf_s(FILE *_File,const char *_Format,...);
size_t __cdecl fread_s(void *_DstBuf,size_t _DstSize,size_t _ElementSize,size_t _Count,FILE *_File);
_CRTIMP int __cdecl _fscanf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,...);
int __cdecl printf_s(const char *_Format,...);
_CRTIMP int __cdecl _scanf_l(const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _scanf_s_l(const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _snprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,...);
_CRTIMP int __cdecl _snprintf_c(char *_DstBuf,size_t _MaxCount,const char *_Format,...);
_CRTIMP int __cdecl _vsnprintf_c(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList);
int __cdecl sprintf_s(char *_DstBuf,size_t _DstSize,const char *_Format,...);
_CRTIMP int __cdecl _fscanf_l(FILE *_File,const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _sscanf_l(const char *_Src,const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _sscanf_s_l(const char *_Src,const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _snscanf_s(const char *_Src,size_t _MaxCount,const char *_Format,...);
_CRTIMP int __cdecl _snscanf_l(const char *_Src,size_t _MaxCount,const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _snscanf_s_l(const char *_Src,size_t _MaxCount,const char *_Format,_locale_t _Locale,...);
int __cdecl vfprintf_s(FILE *_File,const char *_Format,va_list _ArgList);
int __cdecl vprintf_s(const char *_Format,va_list _ArgList);
int __cdecl vsnprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,va_list _ArgList);
_CRTIMP int __cdecl _vsnprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,va_list _ArgList);
int __cdecl vsprintf_s(char *_DstBuf,size_t _Size,const char *_Format,va_list _ArgList);
_CRTIMP int __cdecl _fprintf_p(FILE *_File,const char *_Format,...);
_CRTIMP int __cdecl _printf_p(const char *_Format,...);
_CRTIMP int __cdecl _sprintf_p(char *_Dst,size_t _MaxCount,const char *_Format,...);
_CRTIMP int __cdecl _vfprintf_p(FILE *_File,const char *_Format,va_list _ArgList);
_CRTIMP int __cdecl _vprintf_p(const char *_Format,va_list _ArgList);
_CRTIMP int __cdecl _vsprintf_p(char *_Dst,size_t _MaxCount,const char *_Format,va_list _ArgList);
_CRTIMP int __cdecl _scprintf_p(const char *_Format,...);
_CRTIMP int __cdecl _vscprintf_p(const char *_Format,va_list _ArgList);
_CRTIMP int __cdecl _printf_l(const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _printf_p_l(const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _vprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _fprintf_l(FILE *_File,const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _fprintf_p_l(FILE *_File,const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vfprintf_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _vfprintf_p_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _sprintf_l(char *_DstBuf,const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _sprintf_p_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vsprintf_l(char *_DstBuf,const char *_Format,_locale_t,va_list _ArgList);
_CRTIMP int __cdecl _vsprintf_p_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _scprintf_l(const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _scprintf_p_l(const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vscprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _vscprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _printf_s_l(const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vprintf_s_l(const char *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _fprintf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vfprintf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _sprintf_s_l(char *_DstBuf,size_t _DstSize,const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vsprintf_s_l(char *_DstBuf,size_t _DstSize,const char *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _snprintf_s_l(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vsnprintf_s_l(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _snprintf_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _snprintf_c_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vsnprintf_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _vsnprintf_c_l(char *_DstBuf,size_t _MaxCount,const char *,_locale_t _Locale,va_list _ArgList);
#ifndef _WSTDIO_S_DEFINED
#define _WSTDIO_S_DEFINED
_CRTIMP wchar_t *__cdecl _getws_s(wchar_t *_Str,size_t _SizeInWords);
int __cdecl fwprintf_s(FILE *_File,const wchar_t *_Format,...);
int __cdecl wprintf_s(const wchar_t *_Format,...);
int __cdecl vwprintf_s(const wchar_t *_Format,va_list _ArgList);
int __cdecl swprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,...);
int __cdecl vswprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _snwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,...);
_CRTIMP int __cdecl _vsnwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _wprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _fwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vfwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _swprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vswprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _snwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vsnwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _fwscanf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _swscanf_s_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _snwscanf_s(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...);
_CRTIMP int __cdecl _snwscanf_s_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _wscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP errno_t __cdecl _wfopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode);
_CRTIMP errno_t __cdecl _wfreopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile);
_CRTIMP errno_t __cdecl _wtmpnam_s(wchar_t *_DstBuf,size_t _SizeInWords);
_CRTIMP int __cdecl _fwprintf_p(FILE *_File,const wchar_t *_Format,...);
_CRTIMP int __cdecl _wprintf_p(const wchar_t *_Format,...);
_CRTIMP int __cdecl _vfwprintf_p(FILE *_File,const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _vwprintf_p(const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _swprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,...);
_CRTIMP int __cdecl _vswprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _scwprintf_p(const wchar_t *_Format,...);
_CRTIMP int __cdecl _vscwprintf_p(const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _wprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _wprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _vwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _fwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _fwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vfwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _vfwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _swprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _swprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vswprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _vswprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _scwprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _scwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vscwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _snwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vsnwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl __swprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,...);
_CRTIMP int __cdecl __vswprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,va_list _Args);
_CRTIMP int __cdecl _vscwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _fwscanf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _swscanf_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _snwscanf_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _wscanf_l(const wchar_t *_Format,_locale_t _Locale,...);
#endif
#endif
_CRTIMP size_t __cdecl _fread_nolock_s(void *_DstBuf,size_t _DstSize,size_t _ElementSize,size_t _Count,FILE *_File);
#ifdef __cplusplus
}
#endif
#endif
#endif

View file

@ -0,0 +1,67 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_STDLIB_S
#define _INC_STDLIB_S
#include <stdlib.h>
#if defined(MINGW_HAS_SECURE_API)
#ifdef __cplusplus
extern "C" {
#endif
_CRTIMP errno_t __cdecl _dupenv_s(char **_PBuffer,size_t *_PBufferSizeInBytes,const char *_VarName);
_CRTIMP errno_t __cdecl _itoa_s(int _Value,char *_DstBuf,size_t _Size,int _Radix);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP errno_t __cdecl _i64toa_s(__int64 _Val,char *_DstBuf,size_t _Size,int _Radix);
_CRTIMP errno_t __cdecl _ui64toa_s(unsigned __int64 _Val,char *_DstBuf,size_t _Size,int _Radix);
#endif
_CRTIMP errno_t __cdecl _ltoa_s(long _Val,char *_DstBuf,size_t _Size,int _Radix);
_CRTIMP errno_t __cdecl mbstowcs_s(size_t *_PtNumOfCharConverted,wchar_t *_DstBuf,size_t _SizeInWords,const char *_SrcBuf,size_t _MaxCount);
_CRTIMP errno_t __cdecl _mbstowcs_s_l(size_t *_PtNumOfCharConverted,wchar_t *_DstBuf,size_t _SizeInWords,const char *_SrcBuf,size_t _MaxCount,_locale_t _Locale);
_CRTIMP errno_t __cdecl _ultoa_s(unsigned long _Val,char *_DstBuf,size_t _Size,int _Radix);
_CRTIMP errno_t __cdecl _wctomb_s_l(int *_SizeConverted,char *_MbCh,size_t _SizeInBytes,wchar_t _WCh,_locale_t _Locale);
_CRTIMP errno_t __cdecl wcstombs_s(size_t *_PtNumOfCharConverted,char *_Dst,size_t _DstSizeInBytes,const wchar_t *_Src,size_t _MaxCountInBytes);
_CRTIMP errno_t __cdecl _wcstombs_s_l(size_t *_PtNumOfCharConverted,char *_Dst,size_t _DstSizeInBytes,const wchar_t *_Src,size_t _MaxCountInBytes,_locale_t _Locale);
#ifndef _WSTDLIB_S_DEFINED
#define _WSTDLIB_S_DEFINED
_CRTIMP errno_t __cdecl _itow_s (int _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
_CRTIMP errno_t __cdecl _ltow_s (long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
_CRTIMP errno_t __cdecl _ultow_s (unsigned long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
_CRTIMP errno_t __cdecl _wgetenv_s(size_t *_ReturnSize,wchar_t *_DstBuf,size_t _DstSizeInWords,const wchar_t *_VarName);
_CRTIMP errno_t __cdecl _wdupenv_s(wchar_t **_Buffer,size_t *_BufferSizeInWords,const wchar_t *_VarName);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP errno_t __cdecl _i64tow_s(__int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
_CRTIMP errno_t __cdecl _ui64tow_s(unsigned __int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
#endif
#endif
#ifndef _POSIX_
_CRTIMP errno_t __cdecl _ecvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDights,int *_PtDec,int *_PtSign);
_CRTIMP errno_t __cdecl _fcvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDec,int *_PtDec,int *_PtSign);
_CRTIMP errno_t __cdecl _gcvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDigits);
_CRTIMP errno_t __cdecl _makepath_s(char *_PathResult,size_t _Size,const char *_Drive,const char *_Dir,const char *_Filename,const char *_Ext);
_CRTIMP errno_t __cdecl _putenv_s(const char *_Name,const char *_Value);
_CRTIMP errno_t __cdecl _searchenv_s(const char *_Filename,const char *_EnvVar,char *_ResultPath,size_t _SizeInBytes);
_CRTIMP errno_t __cdecl _splitpath_s(const char *_FullPath,char *_Drive,size_t _DriveSize,char *_Dir,size_t _DirSize,char *_Filename,size_t _FilenameSize,char *_Ext,size_t _ExtSize);
#ifndef _WSTDLIBP_S_DEFINED
#define _WSTDLIBP_S_DEFINED
_CRTIMP errno_t __cdecl _wmakepath_s(wchar_t *_PathResult,size_t _SizeInWords,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext);
_CRTIMP errno_t __cdecl _wputenv_s(const wchar_t *_Name,const wchar_t *_Value);
_CRTIMP errno_t __cdecl _wsearchenv_s(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath,size_t _SizeInWords);
_CRTIMP errno_t __cdecl _wsplitpath_s(const wchar_t *_FullPath,wchar_t *_Drive,size_t _DriveSizeInWords,wchar_t *_Dir,size_t _DirSizeInWords,wchar_t *_Filename,size_t _FilenameSizeInWords,wchar_t *_Ext,size_t _ExtSizeInWords);
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif
#endif

View file

@ -0,0 +1,30 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef __STRALIGN_H_S_
#define __STRALIGN_H_S_
#include <stralign.h>
#if defined(MINGW_HAS_SECURE_API)
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(I_X86_) && defined(_WSTRING_S_DEFINED)
#if defined(__cplusplus) && defined(_WConst_Return)
static __inline PUWSTR ua_wcscpy_s(PUWSTR Destination,size_t DestinationSize,PCUWSTR Source) {
if(WSTR_ALIGNED(Source) && WSTR_ALIGNED(Destination)) return (wcscpy_s((PWSTR)Destination,DestinationSize,(PCWSTR)Source)==0 ? Destination : NULL);
return uaw_wcscpy((PCUWSTR)String,Character);
}
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif
#endif

View file

@ -0,0 +1,41 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_STRING_S
#define _INC_STRING_S
#include <string.h>
#if defined(MINGW_HAS_SECURE_API)
#ifdef __cplusplus
extern "C" {
#endif
_CRTIMP errno_t __cdecl _strset_s(char *_Dst,size_t _DstSize,int _Value);
_CRTIMP errno_t __cdecl _strerror_s(char *_Buf,size_t _SizeInBytes,const char *_ErrMsg);
_CRTIMP errno_t __cdecl _strlwr_s(char *_Str,size_t _Size);
_CRTIMP errno_t __cdecl _strlwr_s_l(char *_Str,size_t _Size,_locale_t _Locale);
_CRTIMP errno_t __cdecl _strnset_s(char *_Str,size_t _Size,int _Val,size_t _MaxCount);
_CRTIMP errno_t __cdecl _strupr_s(char *_Str,size_t _Size);
_CRTIMP errno_t __cdecl _strupr_s_l(char *_Str,size_t _Size,_locale_t _Locale);
#ifndef _WSTRING_S_DEFINED
#define _WSTRING_S_DEFINED
_CRTIMP wchar_t *__cdecl wcstok_s(wchar_t *_Str,const wchar_t *_Delim,wchar_t **_Context);
_CRTIMP errno_t __cdecl _wcserror_s(wchar_t *_Buf,size_t _SizeInWords,int _ErrNum);
_CRTIMP errno_t __cdecl __wcserror_s(wchar_t *_Buffer,size_t _SizeInWords,const wchar_t *_ErrMsg);
_CRTIMP errno_t __cdecl _wcsnset_s(wchar_t *_Dst,size_t _DstSizeInWords,wchar_t _Val,size_t _MaxCount);
_CRTIMP errno_t __cdecl _wcsset_s(wchar_t *_Str,size_t _SizeInWords,wchar_t _Val);
_CRTIMP errno_t __cdecl _wcslwr_s(wchar_t *_Str,size_t _SizeInWords);
_CRTIMP errno_t __cdecl _wcslwr_s_l(wchar_t *_Str,size_t _SizeInWords,_locale_t _Locale);
_CRTIMP errno_t __cdecl _wcsupr_s(wchar_t *_Str,size_t _Size);
_CRTIMP errno_t __cdecl _wcsupr_s_l(wchar_t *_Str,size_t _Size,_locale_t _Locale);
#endif
#ifdef __cplusplus
}
#endif
#endif
#endif

View file

@ -0,0 +1,34 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _TIMEB_H_S
#define _TIMEB_H_S
#include <sys/timeb.h>
#ifdef __cplusplus
extern "C" {
#endif
#if defined(MINGW_HAS_SECURE_API)
#ifdef _USE_32BIT_TIME_T
#define _ftime_s _ftime32_s
#else
#define _ftime_s _ftime64_s
#endif
_CRTIMP errno_t __cdecl _ftime32_s(struct __timeb32 *_Time);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP errno_t __cdecl _ftime64_s(struct __timeb64 *_Time);
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,266 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_TCHAR_S
#define _INC_TCHAR_S
#include <tchar.h>
#if defined(MINGW_HAS_SECURE_API)
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _UNICODE
#define _tprintf_s wprintf_s
#define _tprintf_s_l _wprintf_s_l
#define _tcprintf_s _cwprintf_s
#define _tcprintf_s_l _cwprintf_s_l
#define _vtcprintf_s _vcwprintf_s
#define _vtcprintf_s_l _vcwprintf_s_l
#define _ftprintf_s fwprintf_s
#define _ftprintf_s_l _fwprintf_s_l
#define _stprintf_s swprintf_s
#define _stprintf_s_l _swprintf_s_l
#define _sntprintf_s _snwprintf_s
#define _sntprintf_s_l _snwprintf_s_l
#define _vtprintf_s vwprintf_s
#define _vtprintf_s_l _vwprintf_s_l
#define _vftprintf_s vfwprintf_s
#define _vftprintf_s_l _vfwprintf_s_l
#define _vstprintf_s vswprintf_s
#define _vstprintf_s_l _vswprintf_s_l
#define _vsntprintf_s _vsnwprintf_s
#define _vsntprintf_s_l _vsnwprintf_s_l
#define _tscanf_s wscanf_s
#define _tscanf_s_l _wscanf_s_l
#define _tcscanf_s _cwscanf_s
#define _tcscanf_s_l _cwscanf_s_l
#define _ftscanf_s fwscanf_s
#define _ftscanf_s_l _fwscanf_s_l
#define _stscanf_s swscanf_s
#define _stscanf_s_l _swscanf_s_l
#define _sntscanf_s _snwscanf_s
#define _sntscanf_s_l _snwscanf_s_l
#define _cgetts_s _cgetws_s
#define _getts_s _getws_s
#define _itot_s _itow_s
#define _ltot_s _ltow_s
#define _ultot_s _ultow_s
#define _i64tot_s _i64tow_s
#define _ui64tot_s _ui64tow_s
#define _tcscat_s wcscat_s
#define _tcscpy_s wcscpy_s
#define _tcsncat_s wcsncat_s
#define _tcsncat_s_l _wcsncat_s_l
#define _tcsncpy_s wcsncpy_s
#define _tcsncpy_s_l _wcsncpy_s_l
#define _tcstok_s wcstok_s
#define _tcstok_s_l _wcstok_s_l
#define _tcserror_s _wcserror_s
#define __tcserror_s __wcserror_s
#define _tcsnset_s _wcsnset_s
#define _tcsnset_s_l _wcsnset_s_l
#define _tcsset_s _wcsset_s
#define _tcsset_s_l _wcsset_s_l
#define _tasctime_s _wasctime_s
#define _tctime_s _wctime_s
#define _tctime32_s _wctime32_s
#define _tctime64_s _wctime64_s
#define _tstrdate_s _wstrdate_s
#define _tstrtime_s _wstrtime_s
#define _tgetenv_s _wgetenv_s
#define _tdupenv_s _wdupenv_s
#define _tmakepath_s _wmakepath_s
#define _tputenv_s _wputenv_s
#define _tsearchenv_s _wsearchenv_s
#define _tsplitpath_s _wsplitpath_s
#define _tfopen_s _wfopen_s
#define _tfreopen_s _wfreopen_s
#define _ttmpnam_s _wtmpnam_s
#define _taccess_s _waccess_s
#define _tmktemp_s _wmktemp_s
#define _tcsnccat_s wcsncat_s
#define _tcsnccat_s_l _wcsncat_s_l
#define _tcsnccpy_s wcsncpy_s
#define _tcsnccpy_s_l _wcsncpy_s_l
#define _tcslwr_s _wcslwr_s
#define _tcslwr_s_l _wcslwr_s_l
#define _tcsupr_s _wcsupr_s
#define _tcsupr_s_l _wcsupr_s_l
#define _wcstok_s_l(_String,_Delimiters,_Current_position,_Locale) (wcstok_s(_String,_Delimiters,_Current_position))
#define _wcsnset_s_l(_Destination,_Destination_size_chars,_Value,_Count,_Locale) (_wcsnset_s(_Destination,_Destination_size_chars,_Value,_Count))
#define _wcsset_s_l(_Destination,_Destination_size_chars,_Value,_Locale) (_wcsset_s(_Destination,_Destination_size_chars,_Value))
#else
#define _tprintf_s printf_s
#define _tprintf_s_l _printf_s_l
#define _tcprintf_s _cprintf_s
#define _tcprintf_s_l _cprintf_s_l
#define _vtcprintf_s _vcprintf_s
#define _vtcprintf_s_l _vcprintf_s_l
#define _ftprintf_s fprintf_s
#define _ftprintf_s_l _fprintf_s_l
#define _stprintf_s sprintf_s
#define _stprintf_s_l _sprintf_s_l
#define _sntprintf_s _snprintf_s
#define _sntprintf_s_l _snprintf_s_l
#define _vtprintf_s vprintf_s
#define _vtprintf_s_l _vprintf_s_l
#define _vftprintf_s vfprintf_s
#define _vftprintf_s_l _vfprintf_s_l
#define _vstprintf_s vsprintf_s
#define _vstprintf_s_l _vsprintf_s_l
#define _vsntprintf_s _vsnprintf_s
#define _vsntprintf_s_l _vsnprintf_s_l
#define _tscanf_s scanf_s
#define _tscanf_s_l _scanf_s_l
#define _tcscanf_s _cscanf_s
#define _tcscanf_s_l _cscanf_s_l
#define _ftscanf_s fscanf_s
#define _ftscanf_s_l _fscanf_s_l
#define _stscanf_s sscanf_s
#define _stscanf_s_l _sscanf_s_l
#define _sntscanf_s _snscanf_s
#define _sntscanf_s_l _snscanf_s_l
#define _getts_s gets_s
#define _cgetts_s _cgets_s
#define _itot_s _itoa_s
#define _ltot_s _ltoa_s
#define _ultot_s _ultoa_s
#define _i64tot_s _i64toa_s
#define _ui64tot_s _ui64toa_s
#define _tcscat_s strcat_s
#define _tcscpy_s strcpy_s
#define _tcserror_s strerror_s
#define __tcserror_s _strerror_s
#define _tasctime_s asctime_s
#define _tctime_s ctime_s
#define _tctime32_s _ctime32_s
#define _tctime64_s _ctime64_s
#define _tstrdate_s _strdate_s
#define _tstrtime_s _strtime_s
#define _tgetenv_s getenv_s
#define _tdupenv_s _dupenv_s
#define _tmakepath_s _makepath_s
#define _tputenv_s _putenv_s
#define _tsearchenv_s _searchenv_s
#define _tsplitpath_s _splitpath_s
#define _tfopen_s fopen_s
#define _tfreopen_s freopen_s
#define _ttmpnam_s tmpnam_s
#define _tmktemp_s _mktemp_s
#ifndef _POSIX_
#define _taccess_s _access_s
#endif
#define _tsopen_s _sopen_s
#ifdef _MBCS
#ifdef _MB_MAP_DIRECT
#define _tcsncat_s _mbsnbcat_s
#define _tcsncat_s_l _mbsnbcat_s_l
#define _tcsncpy_s _mbsnbcpy_s
#define _tcsncpy_s_l _mbsnbcpy_s_l
#define _tcstok_s _mbstok_s
#define _tcstok_s_l _mbstok_s_l
#define _tcsnset_s _mbsnbset_s
#define _tcsnset_s_l _mbsnbset_s_l
#define _tcsset_s _mbsset_s
#define _tcsset_s_l _mbsset_s_l
#define _tcsnccat_s _mbsncat_s
#define _tcsnccat_s_l _mbsncat_s_l
#define _tcsnccpy_s _mbsncpy_s
#define _tcsnccpy_s_l _mbsncpy_s_l
#define _tcsncset_s _mbsnset_s
#define _tcsncset_s_l _mbsnset_s_l
#define _tcslwr_s _mbslwr_s
#define _tcslwr_s_l _mbslwr_s_l
#define _tcsupr_s _mbsupr_s
#define _tcsupr_s_l _mbsupr_s_l
#define _tccpy_s _mbccpy_s
#define _tccpy_s_l _mbccpy_s_l
#else
_CRTIMP char *__cdecl _tcsncat_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount);
_CRTIMP char *__cdecl _tcsncat_s_l(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount,_locale_t _Locale);
_CRTIMP char *__cdecl _tcsncpy_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount);
_CRTIMP char *__cdecl _tcsncpy_s_l(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount,_locale_t _Locale);
_CRTIMP char *__cdecl _tcstok_s(char *_Str,const char *_Delim,char **_Context);
_CRTIMP char *__cdecl _tcstok_s_l(char *_Str,const char *_Delim,char **_Context,_locale_t _Locale);
_CRTIMP errno_t __cdecl _tcsset_s(char *_Str,size_t _SizeInChars,unsigned int _Val);
_CRTIMP errno_t __cdecl _tcsset_s_l(char *_Str,size_t _SizeInChars,unsigned int,_locale_t _Locale);
_CRTIMP char *__cdecl _tcsnccat_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount);
_CRTIMP char *__cdecl _tcsnccat_s_l(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount,_locale_t _Locale);
_CRTIMP char *__cdecl _tcsnccpy_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount);
_CRTIMP char *__cdecl _tcsnccpy_s_l(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount,_locale_t _Locale);
_CRTIMP char *__cdecl _tcslwr_s(char *_Str,size_t _SizeInChars);
_CRTIMP char *__cdecl _tcslwr_s_l(char *_Str,size_t _SizeInChars,_locale_t _Locale);
_CRTIMP char *__cdecl _tcsupr_s(char *_Str,size_t _SizeInChars);
_CRTIMP char *__cdecl _tcsupr_s_l(char *_Str,size_t _SizeInChars,_locale_t _Locale);
#endif
#else
#define _tcsncat_s strncat_s
#define _tcsncat_s_l _strncat_s_l
#define _tcsncpy_s strncpy_s
#define _tcsncpy_s_l _strncpy_s_l
#define _tcstok_s strtok_s
#define _tcstok_s_l _strtok_s_l
#define _tcsnset_s _strnset_s
#define _tcsnset_s_l _strnset_s_l
#define _tcsset_s _strset_s
#define _tcsset_s _strset_s
#define _tcsset_s_l _strset_s_l
#define _tcsnccat_s strncat_s
#define _tcsnccat_s_l _strncat_s_l
#define _tcsnccpy_s strncpy_s
#define _tcsnccpy_s_l _strncpy_s_l
#define _tcslwr_s _strlwr_s
#define _tcslwr_s_l _strlwr_s_l
#define _tcsupr_s _strupr_s
#define _tcsupr_s_l _strupr_s_l
#define _strnset_s_l(_Destination,_Destination_size_chars,_Value,_Count,_Locale) (_strnset_s(_Destination,_Destination_size_chars,_Value,_Count))
#define _strset_s_l(_Destination,_Destination_size_chars,_Value,_Locale) (_strset_s(_Destination,_Destination_size_chars,_Value))
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif
#endif

View file

@ -0,0 +1,61 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _TIME_H__S
#define _TIME_H__S
#include <time.h>
#if defined(MINGW_HAS_SECURE_API)
#ifdef __cplusplus
extern "C" {
#endif
_CRTIMP errno_t __cdecl _ctime32_s(char *_Buf,size_t _SizeInBytes,const __time32_t *_Time);
_CRTIMP errno_t __cdecl _gmtime32_s(struct tm *_Tm,const __time32_t *_Time);
_CRTIMP errno_t __cdecl _localtime32_s(struct tm *_Tm,const __time32_t *_Time);
_CRTIMP errno_t __cdecl _strdate_s(char *_Buf,size_t _SizeInBytes);
_CRTIMP errno_t __cdecl _strtime_s(char *_Buf ,size_t _SizeInBytes);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP errno_t __cdecl _ctime64_s(char *_Buf,size_t _SizeInBytes,const __time64_t *_Time);
_CRTIMP errno_t __cdecl _gmtime64_s(struct tm *_Tm,const __time64_t *_Time);
_CRTIMP errno_t __cdecl _localtime64_s(struct tm *_Tm,const __time64_t *_Time);
#endif
#ifndef _WTIME_S_DEFINED
#define _WTIME_S_DEFINED
_CRTIMP errno_t __cdecl _wasctime_s(wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm);
_CRTIMP errno_t __cdecl _wctime32_s(wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time);
_CRTIMP errno_t __cdecl _wstrdate_s(wchar_t *_Buf,size_t _SizeInWords);
_CRTIMP errno_t __cdecl _wstrtime_s(wchar_t *_Buf,size_t _SizeInWords);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP errno_t __cdecl _wctime64_s(wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time);
#endif
#if !defined (RC_INVOKED) && !defined (_INC_WTIME_S_INL)
#define _INC_WTIME_S_INL
#ifdef _USE_32BIT_TIME_T
__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime32_s(_Buffer,_SizeInWords,_Time); }
#else
__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime64_s(_Buffer,_SizeInWords,_Time); }
#endif
#endif
#endif
#ifndef RC_INVOKED
#ifdef _USE_32BIT_TIME_T
__CRT_INLINE errno_t __cdecl localtime_s(struct tm *_Tm,const time_t *_Time) { return _localtime32_s(_Tm,_Time); }
#else
__CRT_INLINE errno_t __cdecl localtime_s(struct tm *_Tm,const time_t *_Time) { return _localtime64_s(_Tm,_Time); }
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif
#endif

View file

@ -0,0 +1,128 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_WCHAR_S
#define _INC_WCHAR_S
#include <wchar.h>
#if defined(MINGW_HAS_SECURE_API)
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _WIO_S_DEFINED
#define _WIO_S_DEFINED
_CRTIMP errno_t __cdecl _waccess_s(const wchar_t *_Filename,int _AccessMode);
_CRTIMP errno_t __cdecl _wmktemp_s(wchar_t *_TemplateName,size_t _SizeInWords);
#endif
#ifndef _WCONIO_S_DEFINED
#define _WCONIO_S_DEFINED
_CRTIMP errno_t __cdecl _cgetws_s(wchar_t *_Buffer,size_t _SizeInWords,size_t *_SizeRead);
_CRTIMP int __cdecl _cwprintf_s(const wchar_t *_Format,...);
_CRTIMP int __cdecl _cwscanf_s(const wchar_t *_Format,...);
_CRTIMP int __cdecl _cwscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vcwprintf_s(const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _cwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vcwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
#endif
#ifndef _WSTDIO_S_DEFINED
#define _WSTDIO_S_DEFINED
_CRTIMP wchar_t *__cdecl _getws_s(wchar_t *_Str,size_t _SizeInWords);
int __cdecl fwprintf_s(FILE *_File,const wchar_t *_Format,...);
int __cdecl wprintf_s(const wchar_t *_Format,...);
int __cdecl vfwprintf_s(FILE *_File,const wchar_t *_Format,va_list _ArgList);
int __cdecl vwprintf_s(const wchar_t *_Format,va_list _ArgList);
int __cdecl swprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,...);
int __cdecl vswprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _snwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,...);
_CRTIMP int __cdecl _vsnwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _wprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _fwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vfwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _swprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vswprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _snwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vsnwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _fwscanf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _swscanf_s_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _snwscanf_s(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...);
_CRTIMP int __cdecl _snwscanf_s_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _wscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP errno_t __cdecl _wfopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode);
_CRTIMP errno_t __cdecl _wfreopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile);
_CRTIMP errno_t __cdecl _wtmpnam_s(wchar_t *_DstBuf,size_t _SizeInWords);
#endif
#ifndef _WSTDLIB_S_DEFINED
#define _WSTDLIB_S_DEFINED
_CRTIMP errno_t __cdecl _itow_s (int _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
_CRTIMP errno_t __cdecl _ltow_s (long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
_CRTIMP errno_t __cdecl _ultow_s (unsigned long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
_CRTIMP errno_t __cdecl _wgetenv_s(size_t *_ReturnSize,wchar_t *_DstBuf,size_t _DstSizeInWords,const wchar_t *_VarName);
_CRTIMP errno_t __cdecl _wdupenv_s(wchar_t **_Buffer,size_t *_BufferSizeInWords,const wchar_t *_VarName);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP errno_t __cdecl _i64tow_s(__int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
_CRTIMP errno_t __cdecl _ui64tow_s(unsigned __int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix);
#endif
#endif
#ifndef _POSIX_
#ifndef _WSTDLIBP_S_DEFINED
#define _WSTDLIBP_S_DEFINED
_CRTIMP errno_t __cdecl _wmakepath_s(wchar_t *_PathResult,size_t _SizeInWords,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext);
_CRTIMP errno_t __cdecl _wputenv_s(const wchar_t *_Name,const wchar_t *_Value);
_CRTIMP errno_t __cdecl _wsearchenv_s(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath,size_t _SizeInWords);
_CRTIMP errno_t __cdecl _wsplitpath_s(const wchar_t *_FullPath,wchar_t *_Drive,size_t _DriveSizeInWords,wchar_t *_Dir,size_t _DirSizeInWords,wchar_t *_Filename,size_t _FilenameSizeInWords,wchar_t *_Ext,size_t _ExtSizeInWords);
#endif
#endif
#ifndef _WSTRING_S_DEFINED
#define _WSTRING_S_DEFINED
_CRTIMP wchar_t *__cdecl wcstok_s(wchar_t *_Str,const wchar_t *_Delim,wchar_t **_Context);
_CRTIMP errno_t __cdecl _wcserror_s(wchar_t *_Buf,size_t _SizeInWords,int _ErrNum);
_CRTIMP errno_t __cdecl __wcserror_s(wchar_t *_Buffer,size_t _SizeInWords,const wchar_t *_ErrMsg);
_CRTIMP errno_t __cdecl _wcsnset_s(wchar_t *_Dst,size_t _DstSizeInWords,wchar_t _Val,size_t _MaxCount);
_CRTIMP errno_t __cdecl _wcsset_s(wchar_t *_Str,size_t _SizeInWords,wchar_t _Val);
_CRTIMP errno_t __cdecl _wcslwr_s(wchar_t *_Str,size_t _SizeInWords);
_CRTIMP errno_t __cdecl _wcslwr_s_l(wchar_t *_Str,size_t _SizeInWords,_locale_t _Locale);
_CRTIMP errno_t __cdecl _wcsupr_s(wchar_t *_Str,size_t _Size);
_CRTIMP errno_t __cdecl _wcsupr_s_l(wchar_t *_Str,size_t _Size,_locale_t _Locale);
#endif
#ifndef _WTIME_S_DEFINED
#define _WTIME_S_DEFINED
_CRTIMP errno_t __cdecl _wasctime_s(wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm);
_CRTIMP errno_t __cdecl _wctime32_s(wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time);
_CRTIMP errno_t __cdecl _wstrdate_s(wchar_t *_Buf,size_t _SizeInWords);
_CRTIMP errno_t __cdecl _wstrtime_s(wchar_t *_Buf,size_t _SizeInWords);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP errno_t __cdecl _wctime64_s(wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time);
#endif
#if !defined (RC_INVOKED) && !defined (_INC_WTIME_S_INL)
#define _INC_WTIME_S_INL
#ifdef _USE_32BIT_TIME_T
__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime32_s(_Buffer,_SizeInWords,_Time); }
#else
__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime64_s(_Buffer,_SizeInWords,_Time); }
#endif
#endif
#endif
_CRTIMP errno_t __cdecl mbsrtowcs_s(size_t *_Retval,wchar_t *_Dst,size_t _SizeInWords,const char **_PSrc,size_t _N,mbstate_t *_State);
_CRTIMP errno_t __cdecl wcrtomb_s(size_t *_Retval,char *_Dst,size_t _SizeInBytes,wchar_t _Ch,mbstate_t *_State);
_CRTIMP errno_t __cdecl wcsrtombs_s(size_t *_Retval,char *_Dst,size_t _SizeInBytes,const wchar_t **_Src,size_t _Size,mbstate_t *_State);
#ifdef __cplusplus
}
#endif
#endif
#endif

View file

@ -0,0 +1,160 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_SETJMP
#define _INC_SETJMP
#include <_mingw.h>
#pragma pack(push,_CRT_PACKING)
#ifdef __cplusplus
extern "C" {
#endif
#if (defined(_X86_) && !defined(__x86_64))
#define _JBLEN 16
#define _JBTYPE int
typedef struct __JUMP_BUFFER {
unsigned long Ebp;
unsigned long Ebx;
unsigned long Edi;
unsigned long Esi;
unsigned long Esp;
unsigned long Eip;
unsigned long Registration;
unsigned long TryLevel;
unsigned long Cookie;
unsigned long UnwindFunc;
unsigned long UnwindData[6];
} _JUMP_BUFFER;
#elif defined(__ia64__)
typedef _CRT_ALIGN(16) struct _SETJMP_FLOAT128 {
__int64 LowPart;
__int64 HighPart;
} SETJMP_FLOAT128;
#define _JBLEN 33
typedef SETJMP_FLOAT128 _JBTYPE;
typedef struct __JUMP_BUFFER {
unsigned long iAReserved[6];
unsigned long Registration;
unsigned long TryLevel;
unsigned long Cookie;
unsigned long UnwindFunc;
unsigned long UnwindData[6];
SETJMP_FLOAT128 FltS0;
SETJMP_FLOAT128 FltS1;
SETJMP_FLOAT128 FltS2;
SETJMP_FLOAT128 FltS3;
SETJMP_FLOAT128 FltS4;
SETJMP_FLOAT128 FltS5;
SETJMP_FLOAT128 FltS6;
SETJMP_FLOAT128 FltS7;
SETJMP_FLOAT128 FltS8;
SETJMP_FLOAT128 FltS9;
SETJMP_FLOAT128 FltS10;
SETJMP_FLOAT128 FltS11;
SETJMP_FLOAT128 FltS12;
SETJMP_FLOAT128 FltS13;
SETJMP_FLOAT128 FltS14;
SETJMP_FLOAT128 FltS15;
SETJMP_FLOAT128 FltS16;
SETJMP_FLOAT128 FltS17;
SETJMP_FLOAT128 FltS18;
SETJMP_FLOAT128 FltS19;
__int64 FPSR;
__int64 StIIP;
__int64 BrS0;
__int64 BrS1;
__int64 BrS2;
__int64 BrS3;
__int64 BrS4;
__int64 IntS0;
__int64 IntS1;
__int64 IntS2;
__int64 IntS3;
__int64 RsBSP;
__int64 RsPFS;
__int64 ApUNAT;
__int64 ApLC;
__int64 IntSp;
__int64 IntNats;
__int64 Preds;
} _JUMP_BUFFER;
#elif defined(__x86_64)
typedef _CRT_ALIGN(16) struct _SETJMP_FLOAT128 {
unsigned __int64 Part[2];
} SETJMP_FLOAT128;
#define _JBLEN 16
typedef SETJMP_FLOAT128 _JBTYPE;
typedef struct _JUMP_BUFFER {
unsigned __int64 Frame;
unsigned __int64 Rbx;
unsigned __int64 Rsp;
unsigned __int64 Rbp;
unsigned __int64 Rsi;
unsigned __int64 Rdi;
unsigned __int64 R12;
unsigned __int64 R13;
unsigned __int64 R14;
unsigned __int64 R15;
unsigned __int64 Rip;
unsigned __int64 Spare;
SETJMP_FLOAT128 Xmm6;
SETJMP_FLOAT128 Xmm7;
SETJMP_FLOAT128 Xmm8;
SETJMP_FLOAT128 Xmm9;
SETJMP_FLOAT128 Xmm10;
SETJMP_FLOAT128 Xmm11;
SETJMP_FLOAT128 Xmm12;
SETJMP_FLOAT128 Xmm13;
SETJMP_FLOAT128 Xmm14;
SETJMP_FLOAT128 Xmm15;
} _JUMP_BUFFER;
#endif
#ifndef _JMP_BUF_DEFINED
typedef _JBTYPE jmp_buf[_JBLEN];
#define _JMP_BUF_DEFINED
#endif
void * __cdecl __attribute__ ((__nothrow__)) mingw_getsp(void);
#ifdef USE_MINGW_SETJMP_TWO_ARGS
#ifndef _INC_SETJMPEX
#define setjmp(BUF) _setjmp((BUF),mingw_getsp())
int __cdecl __attribute__ ((__nothrow__)) _setjmp(jmp_buf _Buf,void *_Ctx);
#else
#undef setjmp
#define setjmp(BUF) _setjmpex((BUF),mingw_getsp())
#define setjmpex(BUF) _setjmpex((BUF),mingw_getsp())
int __cdecl __attribute__ ((__nothrow__)) _setjmpex(jmp_buf _Buf,void *_Ctx);
#endif
#else
#ifndef _INC_SETJMPEX
#define setjmp _setjmp
#endif
int __cdecl __attribute__ ((__nothrow__)) setjmp(jmp_buf _Buf);
#endif
__declspec(noreturn) __attribute__ ((__nothrow__)) void __cdecl ms_longjmp(jmp_buf _Buf,int _Value)/* throw(...)*/;
__declspec(noreturn) __attribute__ ((__nothrow__)) void __cdecl longjmp(jmp_buf _Buf,int _Value);
#ifdef __cplusplus
}
#endif
#pragma pack(pop)
#endif

View file

@ -0,0 +1,28 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_SHARE
#define _INC_SHARE
#ifndef _WIN32
#error Only Win32 target is supported!
#endif
#define _SH_COMPAT 0x00
#define _SH_DENYRW 0x10
#define _SH_DENYWR 0x20
#define _SH_DENYRD 0x30
#define _SH_DENYNO 0x40
#define _SH_SECURE 0x80
#ifndef NO_OLDNAMES
#define SH_COMPAT _SH_COMPAT
#define SH_DENYRW _SH_DENYRW
#define SH_DENYWR _SH_DENYWR
#define SH_DENYRD _SH_DENYRD
#define SH_DENYNO _SH_DENYNO
#endif
#endif

View file

@ -0,0 +1,63 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_SIGNAL
#define _INC_SIGNAL
#include <_mingw.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _SIG_ATOMIC_T_DEFINED
#define _SIG_ATOMIC_T_DEFINED
typedef int sig_atomic_t;
#endif
#define NSIG 23
#define SIGHUP 1 /* hangup */
#define SIGINT 2
#define SIGQUIT 3 /* quit */
#define SIGILL 4
#define SIGTRAP 5 /* trace trap (not reset when caught) */
#define SIGIOT 6 /* IOT instruction */
#define SIGABRT 6 /* used by abort, replace SIGIOT in the future */
#define SIGEMT 7 /* EMT instruction */
#define SIGFPE 8
#define SIGKILL 9 /* kill (cannot be caught or ignored) */
#define SIGBUS 10 /* bus error */
#define SIGSEGV 11
#define SIGSYS 12 /* bad argument to system call */
#define SIGPIPE 13 /* write on a pipe with no one to read it */
#ifdef __USE_MINGW_ALARM
#define SIGALRM 14 /* alarm clock */
#endif
#define SIGTERM 15
#define SIGBREAK 21
#define SIGABRT2 22
#define SIGABRT_COMPAT 6
typedef void (*__p_sig_fn_t)(int);
#define SIG_DFL (__p_sig_fn_t)0
#define SIG_IGN (__p_sig_fn_t)1
#define SIG_GET (__p_sig_fn_t)2
#define SIG_SGE (__p_sig_fn_t)3
#define SIG_ACK (__p_sig_fn_t)4
#define SIG_ERR (__p_sig_fn_t)-1
extern void **__cdecl __pxcptinfoptrs(void);
#define _pxcptinfoptrs (*__pxcptinfoptrs())
__p_sig_fn_t __cdecl signal(int _SigNum,__p_sig_fn_t _Func);
int __cdecl raise(int _SigNum);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,212 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
/* ISO C9x 7.18 Integer types <stdint.h>
* Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794)
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* Contributor: Danny Smith <danny_r_smith_2001@yahoo.co.nz>
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
* DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Date: 2000-12-02
*/
#ifndef _STDINT_H
#define _STDINT_H
#include <_mingw.h>
#define __need_wint_t
#define __need_wchar_t
#include "stddef.h"
#ifndef __int8_t_defined
#define __int8_t_defined
/* 7.18.1.1 Exact-width integer types */
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef int int32_t;
typedef unsigned uint32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;
#endif
/* 7.18.1.2 Minimum-width integer types */
typedef signed char int_least8_t;
typedef unsigned char uint_least8_t;
typedef short int_least16_t;
typedef unsigned short uint_least16_t;
typedef int int_least32_t;
typedef unsigned uint_least32_t;
typedef long long int_least64_t;
typedef unsigned long long uint_least64_t;
/* 7.18.1.3 Fastest minimum-width integer types
* Not actually guaranteed to be fastest for all purposes
* Here we use the exact-width types for 8 and 16-bit ints.
*/
typedef char int_fast8_t;
typedef unsigned char uint_fast8_t;
typedef short int_fast16_t;
typedef unsigned short uint_fast16_t;
typedef int int_fast32_t;
typedef unsigned int uint_fast32_t;
typedef long long int_fast64_t;
typedef unsigned long long uint_fast64_t;
/* 7.18.1.5 Greatest-width integer types */
typedef long long intmax_t;
typedef unsigned long long uintmax_t;
/* 7.18.2 Limits of specified-width integer types */
#if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS)
/* 7.18.2.1 Limits of exact-width integer types */
#define INT8_MIN (-128)
#define INT16_MIN (-32768)
#define INT32_MIN (-2147483647 - 1)
#define INT64_MIN (-9223372036854775807LL - 1)
#define INT8_MAX 127
#define INT16_MAX 32767
#define INT32_MAX 2147483647
#define INT64_MAX 9223372036854775807LL
#define UINT8_MAX 0xff /* 255U */
#define UINT16_MAX 0xffff /* 65535U */
#define UINT32_MAX 0xffffffff /* 4294967295U */
#define UINT64_MAX 0xffffffffffffffffULL /* 18446744073709551615ULL */
/* 7.18.2.2 Limits of minimum-width integer types */
#define INT_LEAST8_MIN INT8_MIN
#define INT_LEAST16_MIN INT16_MIN
#define INT_LEAST32_MIN INT32_MIN
#define INT_LEAST64_MIN INT64_MIN
#define INT_LEAST8_MAX INT8_MAX
#define INT_LEAST16_MAX INT16_MAX
#define INT_LEAST32_MAX INT32_MAX
#define INT_LEAST64_MAX INT64_MAX
#define UINT_LEAST8_MAX UINT8_MAX
#define UINT_LEAST16_MAX UINT16_MAX
#define UINT_LEAST32_MAX UINT32_MAX
#define UINT_LEAST64_MAX UINT64_MAX
/* 7.18.2.3 Limits of fastest minimum-width integer types */
#define INT_FAST8_MIN INT8_MIN
#define INT_FAST16_MIN INT16_MIN
#define INT_FAST32_MIN INT32_MIN
#define INT_FAST64_MIN INT64_MIN
#define INT_FAST8_MAX INT8_MAX
#define INT_FAST16_MAX INT16_MAX
#define INT_FAST32_MAX INT32_MAX
#define INT_FAST64_MAX INT64_MAX
#define UINT_FAST8_MAX UINT8_MAX
#define UINT_FAST16_MAX UINT16_MAX
#define UINT_FAST32_MAX UINT32_MAX
#define UINT_FAST64_MAX UINT64_MAX
/* 7.18.2.4 Limits of integer types capable of holding
object pointers */
#ifdef _WIN64
#define INTPTR_MIN INT64_MIN
#define INTPTR_MAX INT64_MAX
#define UINTPTR_MAX UINT64_MAX
#else
#define INTPTR_MIN INT32_MIN
#define INTPTR_MAX INT32_MAX
#define UINTPTR_MAX UINT32_MAX
#endif
/* 7.18.2.5 Limits of greatest-width integer types */
#define INTMAX_MIN INT64_MIN
#define INTMAX_MAX INT64_MAX
#define UINTMAX_MAX UINT64_MAX
/* 7.18.3 Limits of other integer types */
#ifdef _WIN64
#define PTRDIFF_MIN INT64_MIN
#define PTRDIFF_MAX INT64_MAX
#else
#define PTRDIFF_MIN INT32_MIN
#define PTRDIFF_MAX INT32_MAX
#endif
#define SIG_ATOMIC_MIN INT32_MIN
#define SIG_ATOMIC_MAX INT32_MAX
#ifndef SIZE_MAX
#ifdef _WIN64
#define SIZE_MAX UINT64_MAX
#else
#define SIZE_MAX UINT32_MAX
#endif
#endif
#ifndef WCHAR_MIN /* also in wchar.h */
#define WCHAR_MIN 0
#define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */
#endif
/*
* wint_t is unsigned short for compatibility with MS runtime
*/
#define WINT_MIN 0
#define WINT_MAX ((wint_t)-1) /* UINT16_MAX */
#endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */
/* 7.18.4 Macros for integer constants */
#if !defined ( __cplusplus) || defined (__STDC_CONSTANT_MACROS)
/* 7.18.4.1 Macros for minimum-width integer constants
According to Douglas Gwyn <gwyn@arl.mil>:
"This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC
9899:1999 as initially published, the expansion was required
to be an integer constant of precisely matching type, which
is impossible to accomplish for the shorter types on most
platforms, because C99 provides no standard way to designate
an integer constant with width less than that of type int.
TC1 changed this to require just an integer constant
*expression* with *promoted* type."
The trick used here is from Clive D W Feather.
*/
#define INT8_C(val) (INT_LEAST8_MAX-INT_LEAST8_MAX+(val))
#define INT16_C(val) (INT_LEAST16_MAX-INT_LEAST16_MAX+(val))
#define INT32_C(val) (INT_LEAST32_MAX-INT_LEAST32_MAX+(val))
/* The 'trick' doesn't work in C89 for long long because, without
suffix, (val) will be evaluated as int, not intmax_t */
#define INT64_C(val) val##LL
#define UINT8_C(val) (UINT_LEAST8_MAX-UINT_LEAST8_MAX+(val))
#define UINT16_C(val) (UINT_LEAST16_MAX-UINT_LEAST16_MAX+(val))
#define UINT32_C(val) (UINT_LEAST32_MAX-UINT_LEAST32_MAX+(val))
#define UINT64_C(val) val##ULL
/* 7.18.4.2 Macros for greatest-width integer constants */
#define INTMAX_C(val) val##LL
#define UINTMAX_C(val) val##ULL
#endif /* !defined ( __cplusplus) || defined __STDC_CONSTANT_MACROS */
#endif

View file

@ -0,0 +1,429 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_STDIO
#define _INC_STDIO
#include <_mingw.h>
#pragma pack(push,_CRT_PACKING)
#ifdef __cplusplus
extern "C" {
#endif
#define BUFSIZ 512
#define _NFILE _NSTREAM_
#define _NSTREAM_ 512
#define _IOB_ENTRIES 20
#define EOF (-1)
#ifndef _FILE_DEFINED
struct _iobuf {
char *_ptr;
int _cnt;
char *_base;
int _flag;
int _file;
int _charbuf;
int _bufsiz;
char *_tmpfname;
};
typedef struct _iobuf FILE;
#define _FILE_DEFINED
#endif
#ifdef _POSIX_
#define _P_tmpdir "/"
#define _wP_tmpdir L"/"
#else
#define _P_tmpdir "\\"
#define _wP_tmpdir L"\\"
#endif
#define L_tmpnam (sizeof(_P_tmpdir) + 12)
#ifdef _POSIX_
#define L_ctermid 9
#define L_cuserid 32
#endif
#define SEEK_CUR 1
#define SEEK_END 2
#define SEEK_SET 0
#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
#define FILENAME_MAX 260
#define FOPEN_MAX 20
#define _SYS_OPEN 20
#define TMP_MAX 32767
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#ifndef _OFF_T_DEFINED
#define _OFF_T_DEFINED
#ifndef _OFF_T_
#define _OFF_T_
typedef long _off_t;
#if !defined(NO_OLDNAMES) || defined(_POSIX)
typedef long off_t;
#endif
#endif
#endif
#ifndef _OFF64_T_DEFINED
#define _OFF64_T_DEFINED
typedef long long _off64_t;
#if !defined(NO_OLDNAMES) || defined(_POSIX)
typedef long long off64_t;
#endif
#endif
#ifndef _STDIO_DEFINED
#ifdef _WIN64
_CRTIMP FILE *__cdecl __iob_func(void);
#else
#ifdef _MSVCRT_
extern FILE _iob[]; /* A pointer to an array of FILE */
#define __iob_func() (_iob)
#else
extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */
#define __iob_func() (*_imp___iob)
#define _iob __iob_func()
#endif
#endif
#endif
#ifndef _FPOS_T_DEFINED
#define _FPOS_T_DEFINED
#undef _FPOSOFF
#if (!defined(NO_OLDNAMES) || defined(__GNUC__)) && _INTEGRAL_MAX_BITS >= 64
typedef __int64 fpos_t;
#define _FPOSOFF(fp) ((long)(fp))
#else
typedef long long fpos_t;
#define _FPOSOFF(fp) ((long)(fp))
#endif
#endif
#ifndef _STDSTREAM_DEFINED
#define _STDSTREAM_DEFINED
#define stdin (&__iob_func()[0])
#define stdout (&__iob_func()[1])
#define stderr (&__iob_func()[2])
#endif
#define _IOREAD 0x0001
#define _IOWRT 0x0002
#define _IOFBF 0x0000
#define _IOLBF 0x0040
#define _IONBF 0x0004
#define _IOMYBUF 0x0008
#define _IOEOF 0x0010
#define _IOERR 0x0020
#define _IOSTRG 0x0040
#define _IORW 0x0080
#ifdef _POSIX_
#define _IOAPPEND 0x0200
#endif
#define _TWO_DIGIT_EXPONENT 0x1
#ifndef _STDIO_DEFINED
_CRTIMP int __cdecl _filbuf(FILE *_File);
_CRTIMP int __cdecl _flsbuf(int _Ch,FILE *_File);
#ifdef _POSIX_
_CRTIMP FILE *__cdecl _fsopen(const char *_Filename,const char *_Mode);
#else
_CRTIMP FILE *__cdecl _fsopen(const char *_Filename,const char *_Mode,int _ShFlag);
#endif
void __cdecl clearerr(FILE *_File);
int __cdecl fclose(FILE *_File);
_CRTIMP int __cdecl _fcloseall(void);
#ifdef _POSIX_
FILE *__cdecl fdopen(int _FileHandle,const char *_Mode);
#else
_CRTIMP FILE *__cdecl _fdopen(int _FileHandle,const char *_Mode);
#endif
int __cdecl feof(FILE *_File);
int __cdecl ferror(FILE *_File);
int __cdecl fflush(FILE *_File);
int __cdecl fgetc(FILE *_File);
_CRTIMP int __cdecl _fgetchar(void);
int __cdecl fgetpos(FILE *_File ,fpos_t *_Pos);
char *__cdecl fgets(char *_Buf,int _MaxCount,FILE *_File);
#ifdef _POSIX_
int __cdecl fileno(FILE *_File);
#else
_CRTIMP int __cdecl _fileno(FILE *_File);
#endif
_CRTIMP char *__cdecl _tempnam(const char *_DirName,const char *_FilePrefix);
_CRTIMP int __cdecl _flushall(void);
FILE *__cdecl fopen(const char *_Filename,const char *_Mode);
FILE *fopen64(const char *filename,const char *mode);
int __cdecl fprintf(FILE *_File,const char *_Format,...);
int __cdecl fputc(int _Ch,FILE *_File);
_CRTIMP int __cdecl _fputchar(int _Ch);
int __cdecl fputs(const char *_Str,FILE *_File);
size_t __cdecl fread(void *_DstBuf,size_t _ElementSize,size_t _Count,FILE *_File);
FILE *__cdecl freopen(const char *_Filename,const char *_Mode,FILE *_File);
int __cdecl fscanf(FILE *_File,const char *_Format,...);
int __cdecl fsetpos(FILE *_File,const fpos_t *_Pos);
int __cdecl fseek(FILE *_File,long _Offset,int _Origin);
int fseeko64(FILE* stream, _off64_t offset, int whence);
long __cdecl ftell(FILE *_File);
_off64_t ftello64(FILE * stream);
int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int _Origin);
__int64 __cdecl _ftelli64(FILE *_File);
size_t __cdecl fwrite(const void *_Str,size_t _Size,size_t _Count,FILE *_File);
int __cdecl getc(FILE *_File);
int __cdecl getchar(void);
_CRTIMP int __cdecl _getmaxstdio(void);
char *__cdecl gets(char *_Buffer);
int __cdecl _getw(FILE *_File);
#ifndef _CRT_PERROR_DEFINED
#define _CRT_PERROR_DEFINED
void __cdecl perror(const char *_ErrMsg);
#endif
_CRTIMP int __cdecl _pclose(FILE *_File);
_CRTIMP FILE *__cdecl _popen(const char *_Command,const char *_Mode);
#if !defined(NO_OLDNAMES) && !defined(popen)
#define popen _popen
#define pclose _pclose
#endif
int __cdecl printf(const char *_Format,...);
int __cdecl putc(int _Ch,FILE *_File);
int __cdecl putchar(int _Ch);
int __cdecl puts(const char *_Str);
_CRTIMP int __cdecl _putw(int _Word,FILE *_File);
#ifndef _CRT_DIRECTORY_DEFINED
#define _CRT_DIRECTORY_DEFINED
int __cdecl remove(const char *_Filename);
int __cdecl rename(const char *_OldFilename,const char *_NewFilename);
_CRTIMP int __cdecl _unlink(const char *_Filename);
#ifndef NO_OLDNAMES
int __cdecl unlink(const char *_Filename);
#endif
#endif
void __cdecl rewind(FILE *_File);
_CRTIMP int __cdecl _rmtmp(void);
int __cdecl scanf(const char *_Format,...);
void __cdecl setbuf(FILE *_File,char *_Buffer);
_CRTIMP int __cdecl _setmaxstdio(int _Max);
_CRTIMP unsigned int __cdecl _set_output_format(unsigned int _Format);
_CRTIMP unsigned int __cdecl _get_output_format(void);
int __cdecl setvbuf(FILE *_File,char *_Buf,int _Mode,size_t _Size);
_CRTIMP int __cdecl _scprintf(const char *_Format,...);
int __cdecl sscanf(const char *_Src,const char *_Format,...);
_CRTIMP int __cdecl _snscanf(const char *_Src,size_t _MaxCount,const char *_Format,...);
FILE *__cdecl tmpfile(void);
char *__cdecl tmpnam(char *_Buffer);
int __cdecl ungetc(int _Ch,FILE *_File);
int __cdecl vfprintf(FILE *_File,const char *_Format,va_list _ArgList);
int __cdecl vprintf(const char *_Format,va_list _ArgList);
/* Make sure macros are not defined. */
#pragma push_macro("vsnprintf")
#pragma push_macro("snprintf")
# undef vsnprintf
# undef snprintf
extern
__attribute__((format(gnu_printf, 3, 0))) __attribute__((nonnull (3)))
int __mingw_vsnprintf(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList);
extern
__attribute__((format(gnu_printf, 3, 4))) __attribute__((nonnull (3)))
int __mingw_snprintf(char* s, size_t n, const char* format, ...);
int __cdecl vsnprintf(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList);
_CRTIMP int __cdecl _snprintf(char *_Dest,size_t _Count,const char *_Format,...);
_CRTIMP int __cdecl _vsnprintf(char *_Dest,size_t _Count,const char *_Format,va_list _Args);
int __cdecl sprintf(char *_Dest,const char *_Format,...);
int __cdecl vsprintf(char *_Dest,const char *_Format,va_list _Args);
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
int __cdecl snprintf(char* s, size_t n, const char* format, ...);
__CRT_INLINE int __cdecl vsnprintf (char* s, size_t n, const char* format,va_list arg) {
return _vsnprintf ( s, n, format, arg);
}
int __cdecl vscanf(const char * Format, va_list argp);
int __cdecl vfscanf (FILE * fp, const char * Format,va_list argp);
int __cdecl vsscanf (const char * _Str,const char * Format,va_list argp);
#endif
/* Restore may prior defined macros snprintf/vsnprintf. */
#pragma pop_macro("snprintf")
#pragma pop_macro("vsnprintf")
/* Check if vsnprintf and snprintf are defaulting to gnu-style. */
# if defined(USE_MINGW_GNU_SNPRINTF) && USE_MINGW_GNU_SNPRINTF
# ifndef vsnprint
# define vsnprintf __mingw_vsnprintf
# endif
# ifndef snprintf
# define snprintf __mingw_snprintf
# endif
# endif
_CRTIMP int __cdecl _vscprintf(const char *_Format,va_list _ArgList);
_CRTIMP int __cdecl _set_printf_count_output(int _Value);
_CRTIMP int __cdecl _get_printf_count_output(void);
#ifndef _WSTDIO_DEFINED
#ifndef WEOF
#define WEOF (wint_t)(0xFFFF)
#endif
#ifdef _POSIX_
_CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode);
#else
_CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag);
#endif
wint_t __cdecl fgetwc(FILE *_File);
_CRTIMP wint_t __cdecl _fgetwchar(void);
wint_t __cdecl fputwc(wchar_t _Ch,FILE *_File);
_CRTIMP wint_t __cdecl _fputwchar(wchar_t _Ch);
wint_t __cdecl getwc(FILE *_File);
wint_t __cdecl getwchar(void);
wint_t __cdecl putwc(wchar_t _Ch,FILE *_File);
wint_t __cdecl putwchar(wchar_t _Ch);
wint_t __cdecl ungetwc(wint_t _Ch,FILE *_File);
wchar_t *__cdecl fgetws(wchar_t *_Dst,int _SizeInWords,FILE *_File);
int __cdecl fputws(const wchar_t *_Str,FILE *_File);
_CRTIMP wchar_t *__cdecl _getws(wchar_t *_String);
_CRTIMP int __cdecl _putws(const wchar_t *_Str);
int __cdecl fwprintf(FILE *_File,const wchar_t *_Format,...);
int __cdecl wprintf(const wchar_t *_Format,...);
_CRTIMP int __cdecl _scwprintf(const wchar_t *_Format,...);
int __cdecl vfwprintf(FILE *_File,const wchar_t *_Format,va_list _ArgList);
int __cdecl vwprintf(const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl swprintf(wchar_t*, const wchar_t*, ...);
_CRTIMP int __cdecl vswprintf(wchar_t*, const wchar_t*,va_list);
_CRTIMP int __cdecl _swprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,...);
_CRTIMP int __cdecl _vswprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _snwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,...);
_CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,va_list _Args);
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
int __cdecl snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...);
__CRT_INLINE int __cdecl vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, va_list arg) { return _vsnwprintf(s,n,format,arg); }
int __cdecl vwscanf (const wchar_t *, va_list);
int __cdecl vfwscanf (FILE *,const wchar_t *,va_list);
int __cdecl vswscanf (const wchar_t *,const wchar_t *,va_list);
#endif
_CRTIMP int __cdecl _swprintf(wchar_t *_Dest,const wchar_t *_Format,...);
_CRTIMP int __cdecl _vswprintf(wchar_t *_Dest,const wchar_t *_Format,va_list _Args);
#ifndef RC_INVOKED
#include <vadefs.h>
#endif
#ifdef _CRT_NON_CONFORMING_SWPRINTFS
#ifndef __cplusplus
#define swprintf _swprintf
#define vswprintf _vswprintf
#define _swprintf_l __swprintf_l
#define _vswprintf_l __vswprintf_l
#endif
#endif
_CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix);
_CRTIMP int __cdecl _vscwprintf(const wchar_t *_Format,va_list _ArgList);
int __cdecl fwscanf(FILE *_File,const wchar_t *_Format,...);
int __cdecl swscanf(const wchar_t *_Src,const wchar_t *_Format,...);
_CRTIMP int __cdecl _snwscanf(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...);
int __cdecl wscanf(const wchar_t *_Format,...);
_CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode);
_CRTIMP FILE *__cdecl _wfopen(const wchar_t *_Filename,const wchar_t *_Mode);
_CRTIMP FILE *__cdecl _wfreopen(const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile);
#ifndef _CRT_WPERROR_DEFINED
#define _CRT_WPERROR_DEFINED
_CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
#endif
_CRTIMP FILE *__cdecl _wpopen(const wchar_t *_Command,const wchar_t *_Mode);
#if !defined(NO_OLDNAMES) && !defined(wpopen)
#define wpopen _wpopen
#endif
_CRTIMP int __cdecl _wremove(const wchar_t *_Filename);
_CRTIMP wchar_t *__cdecl _wtmpnam(wchar_t *_Buffer);
_CRTIMP wint_t __cdecl _fgetwc_nolock(FILE *_File);
_CRTIMP wint_t __cdecl _fputwc_nolock(wchar_t _Ch,FILE *_File);
_CRTIMP wint_t __cdecl _ungetwc_nolock(wint_t _Ch,FILE *_File);
#undef _CRT_GETPUTWCHAR_NOINLINE
#if !defined(__cplusplus) || defined(_CRT_GETPUTWCHAR_NOINLINE)
#define getwchar() fgetwc(stdin)
#define putwchar(_c) fputwc((_c),stdout)
#else
__CRT_INLINE wint_t __cdecl getwchar() { return (fgetwc(stdin)); }
__CRT_INLINE wint_t __cdecl putwchar(wchar_t _C) { return (fputwc(_C,stdout)); }
#endif
#define getwc(_stm) fgetwc(_stm)
#define putwc(_c,_stm) fputwc(_c,_stm)
#define _putwc_nolock(_c,_stm) _fputwc_nolock(_c,_stm)
#define _getwc_nolock(_stm) _fgetwc_nolock(_stm)
#define _WSTDIO_DEFINED
#endif
#define _STDIO_DEFINED
#endif
#define _fgetc_nolock(_stream) (--(_stream)->_cnt >= 0 ? 0xff & *(_stream)->_ptr++ : _filbuf(_stream))
#define _fputc_nolock(_c,_stream) (--(_stream)->_cnt >= 0 ? 0xff & (*(_stream)->_ptr++ = (char)(_c)) : _flsbuf((_c),(_stream)))
#define _getc_nolock(_stream) _fgetc_nolock(_stream)
#define _putc_nolock(_c,_stream) _fputc_nolock(_c,_stream)
#define _getchar_nolock() _getc_nolock(stdin)
#define _putchar_nolock(_c) _putc_nolock((_c),stdout)
#define _getwchar_nolock() _getwc_nolock(stdin)
#define _putwchar_nolock(_c) _putwc_nolock((_c),stdout)
_CRTIMP void __cdecl _lock_file(FILE *_File);
_CRTIMP void __cdecl _unlock_file(FILE *_File);
_CRTIMP int __cdecl _fclose_nolock(FILE *_File);
_CRTIMP int __cdecl _fflush_nolock(FILE *_File);
_CRTIMP size_t __cdecl _fread_nolock(void *_DstBuf,size_t _ElementSize,size_t _Count,FILE *_File);
_CRTIMP int __cdecl _fseek_nolock(FILE *_File,long _Offset,int _Origin);
_CRTIMP long __cdecl _ftell_nolock(FILE *_File);
_CRTIMP int __cdecl _fseeki64_nolock(FILE *_File,__int64 _Offset,int _Origin);
_CRTIMP __int64 __cdecl _ftelli64_nolock(FILE *_File);
_CRTIMP size_t __cdecl _fwrite_nolock(const void *_DstBuf,size_t _Size,size_t _Count,FILE *_File);
_CRTIMP int __cdecl _ungetc_nolock(int _Ch,FILE *_File);
#if !defined(NO_OLDNAMES) || !defined(_POSIX)
#define P_tmpdir _P_tmpdir
#define SYS_OPEN _SYS_OPEN
char *__cdecl tempnam(const char *_Directory,const char *_FilePrefix);
int __cdecl fcloseall(void);
FILE *__cdecl fdopen(int _FileHandle,const char *_Format);
int __cdecl fgetchar(void);
int __cdecl fileno(FILE *_File);
int __cdecl flushall(void);
int __cdecl fputchar(int _Ch);
int __cdecl getw(FILE *_File);
int __cdecl putw(int _Ch,FILE *_File);
int __cdecl rmtmp(void);
#endif
#ifdef __cplusplus
}
#endif
#pragma pack(pop)
#include <sec_api/stdio_s.h>
#endif

View file

@ -0,0 +1,580 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_STDLIB
#define _INC_STDLIB
#include <_mingw.h>
#include <limits.h>
#pragma pack(push,_CRT_PACKING)
#ifdef __cplusplus
extern "C" {
#endif
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1
#ifndef _ONEXIT_T_DEFINED
#define _ONEXIT_T_DEFINED
typedef int (__cdecl *_onexit_t)(void);
#ifndef NO_OLDNAMES
#define onexit_t _onexit_t
#endif
#endif
#ifndef _DIV_T_DEFINED
#define _DIV_T_DEFINED
typedef struct _div_t {
int quot;
int rem;
} div_t;
typedef struct _ldiv_t {
long quot;
long rem;
} ldiv_t;
#endif
#ifndef _CRT_DOUBLE_DEC
#define _CRT_DOUBLE_DEC
#pragma pack(4)
typedef struct {
unsigned char ld[10];
} _LDOUBLE;
#pragma pack()
#define _PTR_LD(x) ((unsigned char *)(&(x)->ld))
typedef struct {
double x;
} _CRT_DOUBLE;
typedef struct {
float f;
} _CRT_FLOAT;
#pragma push_macro("long")
#undef long
typedef struct {
long double x;
} _LONGDOUBLE;
#pragma pop_macro("long")
#pragma pack(4)
typedef struct {
unsigned char ld12[12];
} _LDBL12;
#pragma pack()
#endif
#define RAND_MAX 0x7fff
#ifndef MB_CUR_MAX
#define MB_CUR_MAX ___mb_cur_max_func()
#ifndef __mb_cur_max
#ifdef _MSVCRT_
extern int __mb_cur_max;
#else
#define __mb_cur_max (*_imp____mb_cur_max)
extern int *_imp____mb_cur_max;
#endif
#endif
#ifdef _MSVCRT_
extern int __mbcur_max;
#define ___mb_cur_max_func() (__mb_cur_max)
#else
extern int* _imp____mbcur_max;
#define ___mb_cur_max_func() (*_imp____mb_cur_max)
#endif
#endif
#define __max(a,b) (((a) > (b)) ? (a) : (b))
#define __min(a,b) (((a) < (b)) ? (a) : (b))
#define _MAX_PATH 260
#define _MAX_DRIVE 3
#define _MAX_DIR 256
#define _MAX_FNAME 256
#define _MAX_EXT 256
#define _OUT_TO_DEFAULT 0
#define _OUT_TO_STDERR 1
#define _OUT_TO_MSGBOX 2
#define _REPORT_ERRMODE 3
#define _WRITE_ABORT_MSG 0x1
#define _CALL_REPORTFAULT 0x2
#define _MAX_ENV 32767
typedef void (__cdecl *_purecall_handler)(void);
_CRTIMP _purecall_handler __cdecl _set_purecall_handler(_purecall_handler _Handler);
_CRTIMP _purecall_handler __cdecl _get_purecall_handler(void);
typedef void (__cdecl *_invalid_parameter_handler)(const wchar_t *,const wchar_t *,const wchar_t *,unsigned int,uintptr_t);
_invalid_parameter_handler __cdecl _set_invalid_parameter_handler(_invalid_parameter_handler _Handler);
_invalid_parameter_handler __cdecl _get_invalid_parameter_handler(void);
#ifndef _CRT_ERRNO_DEFINED
#define _CRT_ERRNO_DEFINED
_CRTIMP extern int *__cdecl _errno(void);
#define errno (*_errno())
errno_t __cdecl _set_errno(int _Value);
errno_t __cdecl _get_errno(int *_Value);
#endif
_CRTIMP unsigned long *__cdecl __doserrno(void);
#define _doserrno (*__doserrno())
errno_t __cdecl _set_doserrno(unsigned long _Value);
errno_t __cdecl _get_doserrno(unsigned long *_Value);
#ifdef _MSVCRT_
extern char *_sys_errlist[];
extern int _sys_nerr;
#else
_CRTIMP char *_sys_errlist[1];
_CRTIMP int _sys_nerr;
#endif
#if (defined(_X86_) && !defined(__x86_64))
_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 char **__cdecl __p__pgmptr(void);
_CRTIMP wchar_t **__cdecl __p__wpgmptr(void);
#endif
#ifndef __argc
#ifdef _MSVCRT_
extern int __argc;
#else
#define __argc (*_imp____argc)
extern int *_imp____argc;
#endif
#endif
#ifndef __argv
#ifdef _MSVCRT_
extern char **__argv;
#else
#define __argv (*_imp____argv)
extern char ***_imp____argv;
#endif
#endif
#ifndef __wargv
#ifdef _MSVCRT_
extern wchar_t **__wargv;
#else
#define __wargv (*_imp____wargv)
extern wchar_t ***_imp____wargv;
#endif
#endif
#ifdef _POSIX_
extern char **environ;
#else
#ifndef _environ
#ifdef _MSVCRT_
extern char **_environ;
#else
#define _environ (*_imp___environ)
extern char ***_imp___environ;
#endif
#endif
#ifndef _wenviron
#ifdef _MSVCRT_
extern wchar_t **_wenviron;
#else
#define _wenviron (*_imp___wenviron)
extern wchar_t ***_imp___wenviron;
#endif
#endif
#endif
#ifndef _pgmptr
#ifdef _MSVCRT_
extern char *_pgmptr;
#else
#define _pgmptr (*_imp___pgmptr)
extern char **_imp___pgmptr;
#endif
#endif
#ifndef _wpgmptr
#ifdef _MSVCRT_
extern wchar_t *_wpgmptr;
#else
#define _wpgmptr (*_imp___wpgmptr)
extern wchar_t **_imp___wpgmptr;
#endif
#endif
errno_t __cdecl _get_pgmptr(char **_Value);
errno_t __cdecl _get_wpgmptr(wchar_t **_Value);
#ifndef _fmode
#ifdef _MSVCRT_
extern int _fmode;
#else
#define _fmode (*_imp___fmode)
extern int *_imp___fmode;
#endif
#endif
_CRTIMP errno_t __cdecl _set_fmode(int _Mode);
_CRTIMP errno_t __cdecl _get_fmode(int *_PMode);
#ifndef _osplatform
#ifdef _MSVCRT_
extern unsigned int _osplatform;
#else
#define _osplatform (*_imp___osplatform)
extern unsigned int *_imp___osplatform;
#endif
#endif
#ifndef _osver
#ifdef _MSVCRT_
extern unsigned int _osver;
#else
#define _osver (*_imp___osver)
extern unsigned int *_imp___osver;
#endif
#endif
#ifndef _winver
#ifdef _MSVCRT_
extern unsigned int _winver;
#else
#define _winver (*_imp___winver)
extern unsigned int *_imp___winver;
#endif
#endif
#ifndef _winmajor
#ifdef _MSVCRT_
extern unsigned int _winmajor;
#else
#define _winmajor (*_imp___winmajor)
extern unsigned int *_imp___winmajor;
#endif
#endif
#ifndef _winminor
#ifdef _MSVCRT_
extern unsigned int _winminor;
#else
#define _winminor (*_imp___winminor)
extern unsigned int *_imp___winminor;
#endif
#endif
errno_t __cdecl _get_osplatform(unsigned int *_Value);
errno_t __cdecl _get_osver(unsigned int *_Value);
errno_t __cdecl _get_winver(unsigned int *_Value);
errno_t __cdecl _get_winmajor(unsigned int *_Value);
errno_t __cdecl _get_winminor(unsigned int *_Value);
#ifndef _countof
#ifndef __cplusplus
#define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
#else
extern "C++" {
template <typename _CountofType,size_t _SizeOfArray> char (*__countof_helper(UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
#define _countof(_Array) sizeof(*__countof_helper(_Array))
}
#endif
#endif
#ifndef _CRT_TERMINATE_DEFINED
#define _CRT_TERMINATE_DEFINED
void __cdecl __MINGW_NOTHROW exit(int _Code) __MINGW_ATTRIB_NORETURN;
_CRTIMP void __cdecl __MINGW_NOTHROW _exit(int _Code) __MINGW_ATTRIB_NORETURN;
#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
/* C99 function name */
void __cdecl _Exit(int) __MINGW_ATTRIB_NORETURN;
__CRT_INLINE __MINGW_ATTRIB_NORETURN void __cdecl _Exit(int status)
{ _exit(status); }
#endif
#pragma push_macro("abort")
#undef abort
void __cdecl __declspec(noreturn) abort(void);
#pragma pop_macro("abort")
#endif
_CRTIMP unsigned int __cdecl _set_abort_behavior(unsigned int _Flags,unsigned int _Mask);
#ifndef _CRT_ABS_DEFINED
#define _CRT_ABS_DEFINED
int __cdecl abs(int _X);
long __cdecl labs(long _X);
#endif
#if _INTEGRAL_MAX_BITS >= 64
__int64 __cdecl _abs64(__int64);
#endif
int __cdecl atexit(void (__cdecl *)(void));
#ifndef _CRT_ATOF_DEFINED
#define _CRT_ATOF_DEFINED
double __cdecl atof(const char *_String);
double __cdecl _atof_l(const char *_String,_locale_t _Locale);
#endif
int __cdecl atoi(const char *_Str);
_CRTIMP int __cdecl _atoi_l(const char *_Str,_locale_t _Locale);
long __cdecl atol(const char *_Str);
_CRTIMP long __cdecl _atol_l(const char *_Str,_locale_t _Locale);
#ifndef _CRT_ALGO_DEFINED
#define _CRT_ALGO_DEFINED
void *__cdecl bsearch(const void *_Key,const void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *));
void __cdecl qsort(void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__cdecl *_PtFuncCompare)(const void *,const void *));
#endif
unsigned short __cdecl _byteswap_ushort(unsigned short _Short);
/*unsigned long __cdecl _byteswap_ulong (unsigned long _Long); */
#if _INTEGRAL_MAX_BITS >= 64
unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64 _Int64);
#endif
div_t __cdecl div(int _Numerator,int _Denominator);
char *__cdecl getenv(const char *_VarName);
_CRTIMP char *__cdecl _itoa(int _Value,char *_Dest,int _Radix);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP char *__cdecl _i64toa(__int64 _Val,char *_DstBuf,int _Radix);
_CRTIMP char *__cdecl _ui64toa(unsigned __int64 _Val,char *_DstBuf,int _Radix);
_CRTIMP __int64 __cdecl _atoi64(const char *_String);
_CRTIMP __int64 __cdecl _atoi64_l(const char *_String,_locale_t _Locale);
_CRTIMP __int64 __cdecl _strtoi64(const char *_String,char **_EndPtr,int _Radix);
_CRTIMP __int64 __cdecl _strtoi64_l(const char *_String,char **_EndPtr,int _Radix,_locale_t _Locale);
_CRTIMP unsigned __int64 __cdecl _strtoui64(const char *_String,char **_EndPtr,int _Radix);
_CRTIMP unsigned __int64 __cdecl _strtoui64_l(const char *_String,char **_EndPtr,int _Radix,_locale_t _Locale);
#endif
ldiv_t __cdecl ldiv(long _Numerator,long _Denominator);
_CRTIMP char *__cdecl _ltoa(long _Value,char *_Dest,int _Radix);
int __cdecl mblen(const char *_Ch,size_t _MaxCount);
_CRTIMP int __cdecl _mblen_l(const char *_Ch,size_t _MaxCount,_locale_t _Locale);
_CRTIMP size_t __cdecl _mbstrlen(const char *_Str);
_CRTIMP size_t __cdecl _mbstrlen_l(const char *_Str,_locale_t _Locale);
_CRTIMP size_t __cdecl _mbstrnlen(const char *_Str,size_t _MaxCount);
_CRTIMP size_t __cdecl _mbstrnlen_l(const char *_Str,size_t _MaxCount,_locale_t _Locale);
int __cdecl mbtowc(wchar_t *_DstCh,const char *_SrcCh,size_t _SrcSizeInBytes);
_CRTIMP int __cdecl _mbtowc_l(wchar_t *_DstCh,const char *_SrcCh,size_t _SrcSizeInBytes,_locale_t _Locale);
size_t __cdecl mbstowcs(wchar_t *_Dest,const char *_Source,size_t _MaxCount);
_CRTIMP size_t __cdecl _mbstowcs_l(wchar_t *_Dest,const char *_Source,size_t _MaxCount,_locale_t _Locale);
int __cdecl rand(void);
_CRTIMP int __cdecl _set_error_mode(int _Mode);
void __cdecl srand(unsigned int _Seed);
double __cdecl strtod(const char *_Str,char **_EndPtr);
float __cdecl strtof(const char *nptr, char **endptr);
#if !defined __NO_ISOCEXT /* in libmingwex.a */
float __cdecl strtof (const char * __restrict__, char ** __restrict__);
long double __cdecl strtold(const char * __restrict__, char ** __restrict__);
#endif /* __NO_ISOCEXT */
_CRTIMP double __cdecl _strtod_l(const char *_Str,char **_EndPtr,_locale_t _Locale);
long __cdecl strtol(const char *_Str,char **_EndPtr,int _Radix);
_CRTIMP long __cdecl _strtol_l(const char *_Str,char **_EndPtr,int _Radix,_locale_t _Locale);
unsigned long __cdecl strtoul(const char *_Str,char **_EndPtr,int _Radix);
_CRTIMP unsigned long __cdecl _strtoul_l(const char *_Str,char **_EndPtr,int _Radix,_locale_t _Locale);
#ifndef _CRT_SYSTEM_DEFINED
#define _CRT_SYSTEM_DEFINED
int __cdecl system(const char *_Command);
#endif
_CRTIMP char *__cdecl _ultoa(unsigned long _Value,char *_Dest,int _Radix);
int __cdecl wctomb(char *_MbCh,wchar_t _WCh);
_CRTIMP int __cdecl _wctomb_l(char *_MbCh,wchar_t _WCh,_locale_t _Locale);
size_t __cdecl wcstombs(char *_Dest,const wchar_t *_Source,size_t _MaxCount);
_CRTIMP size_t __cdecl _wcstombs_l(char *_Dest,const wchar_t *_Source,size_t _MaxCount,_locale_t _Locale);
#ifndef _CRT_ALLOCATION_DEFINED
#define _CRT_ALLOCATION_DEFINED
void *__cdecl calloc(size_t _NumOfElements,size_t _SizeOfElements);
void __cdecl free(void *_Memory);
void *__cdecl malloc(size_t _Size);
void *__cdecl realloc(void *_Memory,size_t _NewSize);
_CRTIMP void *__cdecl _recalloc(void *_Memory,size_t _Count,size_t _Size);
//_CRTIMP void __cdecl _aligned_free(void *_Memory);
//_CRTIMP void *__cdecl _aligned_malloc(size_t _Size,size_t _Alignment);
_CRTIMP void *__cdecl _aligned_offset_malloc(size_t _Size,size_t _Alignment,size_t _Offset);
_CRTIMP void *__cdecl _aligned_realloc(void *_Memory,size_t _Size,size_t _Alignment);
_CRTIMP void *__cdecl _aligned_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment);
_CRTIMP void *__cdecl _aligned_offset_realloc(void *_Memory,size_t _Size,size_t _Alignment,size_t _Offset);
_CRTIMP void *__cdecl _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset);
#endif
#ifndef _WSTDLIB_DEFINED
#define _WSTDLIB_DEFINED
_CRTIMP wchar_t *__cdecl _itow(int _Value,wchar_t *_Dest,int _Radix);
_CRTIMP wchar_t *__cdecl _ltow(long _Value,wchar_t *_Dest,int _Radix);
_CRTIMP wchar_t *__cdecl _ultow(unsigned long _Value,wchar_t *_Dest,int _Radix);
double __cdecl wcstod(const wchar_t *_Str,wchar_t **_EndPtr);
float __cdecl wcstof(const wchar_t *nptr, wchar_t **endptr);
#if !defined __NO_ISOCEXT /* in libmingwex.a */
float __cdecl wcstof( const wchar_t * __restrict__, wchar_t ** __restrict__);
long double __cdecl wcstold(const wchar_t * __restrict__, wchar_t ** __restrict__);
#endif /* __NO_ISOCEXT */
_CRTIMP double __cdecl _wcstod_l(const wchar_t *_Str,wchar_t **_EndPtr,_locale_t _Locale);
long __cdecl wcstol(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
_CRTIMP long __cdecl _wcstol_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
unsigned long __cdecl wcstoul(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
_CRTIMP unsigned long __cdecl _wcstoul_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
_CRTIMP wchar_t *__cdecl _wgetenv(const wchar_t *_VarName);
#ifndef _CRT_WSYSTEM_DEFINED
#define _CRT_WSYSTEM_DEFINED
_CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
#endif
_CRTIMP double __cdecl _wtof(const wchar_t *_Str);
_CRTIMP double __cdecl _wtof_l(const wchar_t *_Str,_locale_t _Locale);
_CRTIMP int __cdecl _wtoi(const wchar_t *_Str);
_CRTIMP int __cdecl _wtoi_l(const wchar_t *_Str,_locale_t _Locale);
_CRTIMP long __cdecl _wtol(const wchar_t *_Str);
_CRTIMP long __cdecl _wtol_l(const wchar_t *_Str,_locale_t _Locale);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP wchar_t *__cdecl _i64tow(__int64 _Val,wchar_t *_DstBuf,int _Radix);
_CRTIMP wchar_t *__cdecl _ui64tow(unsigned __int64 _Val,wchar_t *_DstBuf,int _Radix);
_CRTIMP __int64 __cdecl _wtoi64(const wchar_t *_Str);
_CRTIMP __int64 __cdecl _wtoi64_l(const wchar_t *_Str,_locale_t _Locale);
_CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
_CRTIMP __int64 __cdecl _wcstoi64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
_CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
_CRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *_Str ,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
#endif
#endif
#ifndef _POSIX_
#define _CVTBUFSIZE (309+40)
_CRTIMP char *__cdecl _fullpath(char *_FullPath,const char *_Path,size_t _SizeInBytes);
_CRTIMP char *__cdecl _ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign);
_CRTIMP char *__cdecl _fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign);
_CRTIMP char *__cdecl _gcvt(double _Val,int _NumOfDigits,char *_DstBuf);
_CRTIMP int __cdecl _atodbl(_CRT_DOUBLE *_Result,char *_Str);
_CRTIMP int __cdecl _atoldbl(_LDOUBLE *_Result,char *_Str);
_CRTIMP int __cdecl _atoflt(_CRT_FLOAT *_Result,char *_Str);
_CRTIMP int __cdecl _atodbl_l(_CRT_DOUBLE *_Result,char *_Str,_locale_t _Locale);
_CRTIMP int __cdecl _atoldbl_l(_LDOUBLE *_Result,char *_Str,_locale_t _Locale);
_CRTIMP int __cdecl _atoflt_l(_CRT_FLOAT *_Result,char *_Str,_locale_t _Locale);
unsigned long __cdecl _lrotl(unsigned long _Val,int _Shift);
unsigned long __cdecl _lrotr(unsigned long _Val,int _Shift);
_CRTIMP void __cdecl _makepath(char *_Path,const char *_Drive,const char *_Dir,const char *_Filename,const char *_Ext);
_onexit_t __cdecl _onexit(_onexit_t _Func);
#ifndef _CRT_PERROR_DEFINED
#define _CRT_PERROR_DEFINED
void __cdecl perror(const char *_ErrMsg);
#endif
_CRTIMP int __cdecl _putenv(const char *_EnvString);
unsigned int __cdecl _rotl(unsigned int _Val,int _Shift);
#if _INTEGRAL_MAX_BITS >= 64
unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val,int _Shift);
#endif
unsigned int __cdecl _rotr(unsigned int _Val,int _Shift);
#if _INTEGRAL_MAX_BITS >= 64
unsigned __int64 __cdecl _rotr64(unsigned __int64 _Val,int _Shift);
#endif
_CRTIMP void __cdecl _searchenv(const char *_Filename,const char *_EnvVar,char *_ResultPath);
_CRTIMP void __cdecl _splitpath(const char *_FullPath,char *_Drive,char *_Dir,char *_Filename,char *_Ext);
_CRTIMP void __cdecl _swab(char *_Buf1,char *_Buf2,int _SizeInBytes);
#ifndef _WSTDLIBP_DEFINED
#define _WSTDLIBP_DEFINED
_CRTIMP wchar_t *__cdecl _wfullpath(wchar_t *_FullPath,const wchar_t *_Path,size_t _SizeInWords);
_CRTIMP void __cdecl _wmakepath(wchar_t *_ResultPath,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext);
#ifndef _CRT_WPERROR_DEFINED
#define _CRT_WPERROR_DEFINED
_CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
#endif
_CRTIMP int __cdecl _wputenv(const wchar_t *_EnvString);
_CRTIMP void __cdecl _wsearchenv(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath);
_CRTIMP void __cdecl _wsplitpath(const wchar_t *_FullPath,wchar_t *_Drive,wchar_t *_Dir,wchar_t *_Filename,wchar_t *_Ext);
#endif
_CRTIMP void __cdecl _beep(unsigned _Frequency,unsigned _Duration) __MINGW_ATTRIB_DEPRECATED;
/* Not to be confused with _set_error_mode (int). */
_CRTIMP void __cdecl _seterrormode(int _Mode) __MINGW_ATTRIB_DEPRECATED;
_CRTIMP void __cdecl _sleep(unsigned long _Duration) __MINGW_ATTRIB_DEPRECATED;
#endif
#ifndef NO_OLDNAMES
#ifndef _POSIX_
#if 0
#ifndef __cplusplus
#ifndef NOMINMAX
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#endif
#endif
#endif
#define sys_errlist _sys_errlist
#define sys_nerr _sys_nerr
#define environ _environ
char *__cdecl ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign);
char *__cdecl fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign);
char *__cdecl gcvt(double _Val,int _NumOfDigits,char *_DstBuf);
char *__cdecl itoa(int _Val,char *_DstBuf,int _Radix);
char *__cdecl ltoa(long _Val,char *_DstBuf,int _Radix);
int __cdecl putenv(const char *_EnvString);
void __cdecl swab(char *_Buf1,char *_Buf2,int _SizeInBytes);
char *__cdecl ultoa(unsigned long _Val,char *_Dstbuf,int _Radix);
onexit_t __cdecl onexit(onexit_t _Func);
#endif
#endif
#if !defined __NO_ISOCEXT /* externs in static libmingwex.a */
typedef struct { long long quot, rem; } lldiv_t;
lldiv_t __cdecl lldiv(long long, long long);
__CRT_INLINE long long __cdecl llabs(long long _j) { return (_j >= 0 ? _j : -_j); }
long long __cdecl strtoll(const char* __restrict__, char** __restrict, int);
unsigned long long __cdecl strtoull(const char* __restrict__, char** __restrict__, int);
/* these are stubs for MS _i64 versions */
long long __cdecl atoll (const char *);
#ifndef __STRICT_ANSI__
long long __cdecl wtoll (const wchar_t *);
char *__cdecl lltoa (long long, char *, int);
char *__cdecl ulltoa (unsigned long long , char *, int);
wchar_t *__cdecl lltow (long long, wchar_t *, int);
wchar_t *__cdecl ulltow (unsigned long long, wchar_t *, int);
/* __CRT_INLINE using non-ansi functions */
__CRT_INLINE long long __cdecl atoll (const char * _c) { return _atoi64 (_c); }
__CRT_INLINE char *__cdecl lltoa (long long _n, char * _c, int _i) { return _i64toa (_n, _c, _i); }
__CRT_INLINE char *__cdecl ulltoa (unsigned long long _n, char * _c, int _i) { return _ui64toa (_n, _c, _i); }
__CRT_INLINE long long __cdecl wtoll (const wchar_t * _w) { return _wtoi64 (_w); }
__CRT_INLINE wchar_t *__cdecl lltow (long long _n, wchar_t * _w, int _i) { return _i64tow (_n, _w, _i); }
__CRT_INLINE wchar_t *__cdecl ulltow (unsigned long long _n, wchar_t * _w, int _i) { return _ui64tow (_n, _w, _i); }
#endif /* (__STRICT_ANSI__) */
#endif /* !__NO_ISOCEXT */
#ifdef __cplusplus
}
#endif
#pragma pack(pop)
#include <sec_api/stdlib_s.h>
#include <malloc.h>
#endif

View file

@ -0,0 +1,164 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_STRING
#define _INC_STRING
#include <_mingw.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _NLSCMP_DEFINED
#define _NLSCMP_DEFINED
#define _NLSCMPERROR 2147483647
#endif
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#define _WConst_return _CONST_RETURN
#ifndef _CRT_MEMORY_DEFINED
#define _CRT_MEMORY_DEFINED
_CRTIMP void *__cdecl _memccpy(void *_Dst,const void *_Src,int _Val,size_t _MaxCount);
_CONST_RETURN void *__cdecl memchr(const void *_Buf ,int _Val,size_t _MaxCount);
_CRTIMP int __cdecl _memicmp(const void *_Buf1,const void *_Buf2,size_t _Size);
_CRTIMP int __cdecl _memicmp_l(const void *_Buf1,const void *_Buf2,size_t _Size,_locale_t _Locale);
int __cdecl memcmp(const void *_Buf1,const void *_Buf2,size_t _Size);
void *__cdecl memcpy(void *_Dst,const void *_Src,size_t _Size);
void *__cdecl memset(void *_Dst,int _Val,size_t _Size);
#ifndef NO_OLDNAMES
void *__cdecl memccpy(void *_Dst,const void *_Src,int _Val,size_t _Size);
int __cdecl memicmp(const void *_Buf1,const void *_Buf2,size_t _Size);
#endif
#endif
char *__cdecl _strset(char *_Str,int _Val);
char *__cdecl strcpy(char *_Dest,const char *_Source);
char *__cdecl strcat(char *_Dest,const char *_Source);
int __cdecl strcmp(const char *_Str1,const char *_Str2);
size_t __cdecl strlen(const char *_Str);
#if 0
size_t __cdecl strnlen(const char *_Str,size_t _MaxCount);
#endif
void *__cdecl memmove(void *_Dst,const void *_Src,size_t _Size);
_CRTIMP char *__cdecl _strdup(const char *_Src);
_CONST_RETURN char *__cdecl strchr(const char *_Str,int _Val);
_CRTIMP int __cdecl _stricmp(const char *_Str1,const char *_Str2);
_CRTIMP int __cdecl _strcmpi(const char *_Str1,const char *_Str2);
_CRTIMP int __cdecl _stricmp_l(const char *_Str1,const char *_Str2,_locale_t _Locale);
int __cdecl strcoll(const char *_Str1,const char *_Str2);
_CRTIMP int __cdecl _strcoll_l(const char *_Str1,const char *_Str2,_locale_t _Locale);
_CRTIMP int __cdecl _stricoll(const char *_Str1,const char *_Str2);
_CRTIMP int __cdecl _stricoll_l(const char *_Str1,const char *_Str2,_locale_t _Locale);
_CRTIMP int __cdecl _strncoll (const char *_Str1,const char *_Str2,size_t _MaxCount);
_CRTIMP int __cdecl _strncoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
_CRTIMP int __cdecl _strnicoll (const char *_Str1,const char *_Str2,size_t _MaxCount);
_CRTIMP int __cdecl _strnicoll_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
size_t __cdecl strcspn(const char *_Str,const char *_Control);
_CRTIMP char *__cdecl _strerror(const char *_ErrMsg);
char *__cdecl strerror(int);
_CRTIMP char *__cdecl _strlwr(char *_String);
char *strlwr_l(char *_String,_locale_t _Locale);
char *__cdecl strncat(char *_Dest,const char *_Source,size_t _Count);
int __cdecl strncmp(const char *_Str1,const char *_Str2,size_t _MaxCount);
_CRTIMP int __cdecl _strnicmp(const char *_Str1,const char *_Str2,size_t _MaxCount);
_CRTIMP int __cdecl _strnicmp_l(const char *_Str1,const char *_Str2,size_t _MaxCount,_locale_t _Locale);
char *strncpy(char *_Dest,const char *_Source,size_t _Count);
_CRTIMP char *__cdecl _strnset(char *_Str,int _Val,size_t _MaxCount);
_CONST_RETURN char *__cdecl strpbrk(const char *_Str,const char *_Control);
_CONST_RETURN char *__cdecl strrchr(const char *_Str,int _Ch);
_CRTIMP char *__cdecl _strrev(char *_Str);
size_t __cdecl strspn(const char *_Str,const char *_Control);
_CONST_RETURN char *__cdecl strstr(const char *_Str,const char *_SubStr);
char *__cdecl strtok(char *_Str,const char *_Delim);
_CRTIMP char *__cdecl _strupr(char *_String);
_CRTIMP char *_strupr_l(char *_String,_locale_t _Locale);
size_t __cdecl strxfrm(char *_Dst,const char *_Src,size_t _MaxCount);
_CRTIMP size_t __cdecl _strxfrm_l(char *_Dst,const char *_Src,size_t _MaxCount,_locale_t _Locale);
#ifndef NO_OLDNAMES
char *__cdecl strdup(const char *_Src);
int __cdecl strcmpi(const char *_Str1,const char *_Str2);
int __cdecl stricmp(const char *_Str1,const char *_Str2);
char *__cdecl strlwr(char *_Str);
int __cdecl strnicmp(const char *_Str1,const char *_Str,size_t _MaxCount);
__CRT_INLINE int __cdecl strncasecmp (const char *__sz1, const char *__sz2, size_t __sizeMaxCompare) { return _strnicmp (__sz1, __sz2, __sizeMaxCompare); }
__CRT_INLINE int __cdecl strcasecmp (const char *__sz1, const char *__sz2) { return _stricmp (__sz1, __sz2); }
char *__cdecl strnset(char *_Str,int _Val,size_t _MaxCount);
char *__cdecl strrev(char *_Str);
char *__cdecl strset(char *_Str,int _Val);
char *__cdecl strupr(char *_Str);
#endif
#ifndef _WSTRING_DEFINED
#define _WSTRING_DEFINED
_CRTIMP wchar_t *__cdecl _wcsdup(const wchar_t *_Str);
wchar_t *__cdecl wcscat(wchar_t *_Dest,const wchar_t *_Source);
_CONST_RETURN wchar_t *__cdecl wcschr(const wchar_t *_Str,wchar_t _Ch);
int __cdecl wcscmp(const wchar_t *_Str1,const wchar_t *_Str2);
wchar_t *__cdecl wcscpy(wchar_t *_Dest,const wchar_t *_Source);
size_t __cdecl wcscspn(const wchar_t *_Str,const wchar_t *_Control);
size_t __cdecl wcslen(const wchar_t *_Str);
size_t __cdecl wcsnlen(const wchar_t *_Src,size_t _MaxCount);
wchar_t *wcsncat(wchar_t *_Dest,const wchar_t *_Source,size_t _Count);
int __cdecl wcsncmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
wchar_t *wcsncpy(wchar_t *_Dest,const wchar_t *_Source,size_t _Count);
_CONST_RETURN wchar_t *__cdecl wcspbrk(const wchar_t *_Str,const wchar_t *_Control);
_CONST_RETURN wchar_t *__cdecl wcsrchr(const wchar_t *_Str,wchar_t _Ch);
size_t __cdecl wcsspn(const wchar_t *_Str,const wchar_t *_Control);
_CONST_RETURN wchar_t *__cdecl wcsstr(const wchar_t *_Str,const wchar_t *_SubStr);
wchar_t *__cdecl wcstok(wchar_t *_Str,const wchar_t *_Delim);
_CRTIMP wchar_t *__cdecl _wcserror(int _ErrNum);
_CRTIMP wchar_t *__cdecl __wcserror(const wchar_t *_Str);
_CRTIMP int __cdecl _wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
_CRTIMP int __cdecl _wcsicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
_CRTIMP int __cdecl _wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
_CRTIMP int __cdecl _wcsnicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
_CRTIMP wchar_t *__cdecl _wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount);
_CRTIMP wchar_t *__cdecl _wcsrev(wchar_t *_Str);
_CRTIMP wchar_t *__cdecl _wcsset(wchar_t *_Str,wchar_t _Val);
_CRTIMP wchar_t *__cdecl _wcslwr(wchar_t *_String);
_CRTIMP wchar_t *_wcslwr_l(wchar_t *_String,_locale_t _Locale);
_CRTIMP wchar_t *__cdecl _wcsupr(wchar_t *_String);
_CRTIMP wchar_t *_wcsupr_l(wchar_t *_String,_locale_t _Locale);
size_t __cdecl wcsxfrm(wchar_t *_Dst,const wchar_t *_Src,size_t _MaxCount);
_CRTIMP size_t __cdecl _wcsxfrm_l(wchar_t *_Dst,const wchar_t *_Src,size_t _MaxCount,_locale_t _Locale);
int __cdecl wcscoll(const wchar_t *_Str1,const wchar_t *_Str2);
_CRTIMP int __cdecl _wcscoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
_CRTIMP int __cdecl _wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2);
_CRTIMP int __cdecl _wcsicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
_CRTIMP int __cdecl _wcsncoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
_CRTIMP int __cdecl _wcsncoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
_CRTIMP int __cdecl _wcsnicoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
_CRTIMP int __cdecl _wcsnicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
#ifndef NO_OLDNAMES
wchar_t *__cdecl wcsdup(const wchar_t *_Str);
#define wcswcs wcsstr
int __cdecl wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
int __cdecl wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
wchar_t *__cdecl wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount);
wchar_t *__cdecl wcsrev(wchar_t *_Str);
wchar_t *__cdecl wcsset(wchar_t *_Str,wchar_t _Val);
wchar_t *__cdecl wcslwr(wchar_t *_Str);
wchar_t *__cdecl wcsupr(wchar_t *_Str);
int __cdecl wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2);
#endif
#endif
#ifdef __cplusplus
}
#endif
#include <sec_api/string_s.h>
#endif

View file

@ -0,0 +1,13 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
/*
* This file is part of the Mingw32 package.
*
* This fcntl.h maps to the root fcntl.h
*/
#ifndef __STRICT_ANSI__
#include <fcntl.h>
#endif

View file

@ -0,0 +1,14 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
/*
* This file is part of the Mingw32 package.
*
* This file.h maps to the root fcntl.h
* TODO?
*/
#ifndef __STRICT_ANSI__
#include <fcntl.h>
#endif

View file

@ -0,0 +1,30 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_LOCKING
#define _INC_LOCKING
#ifndef _WIN32
#error Only Win32 target is supported!
#endif
/* All the headers include this file. */
#include <_mingw.h>
#define _LK_UNLCK 0
#define _LK_LOCK 1
#define _LK_NBLCK 2
#define _LK_RLCK 3
#define _LK_NBRLCK 4
#ifndef NO_OLDNAMES
#define LK_UNLCK _LK_UNLCK
#define LK_LOCK _LK_LOCK
#define LK_NBLCK _LK_NBLCK
#define LK_RLCK _LK_RLCK
#define LK_NBRLCK _LK_NBRLCK
#endif
#endif

View file

@ -0,0 +1,290 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_STAT
#define _INC_STAT
#ifndef _WIN32
#error Only Win32 target is supported!
#endif
#include <_mingw.h>
#include <io.h>
#pragma pack(push,_CRT_PACKING)
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _CRTIMP
#define _CRTIMP __declspec(dllimport)
#endif
#include <sys/types.h>
#ifndef __TINYC__ /* gr */
#ifdef _USE_32BIT_TIME_T
#ifdef _WIN64
#undef _USE_32BIT_TIME_T
#endif
#else
#if _INTEGRAL_MAX_BITS < 64
#define _USE_32BIT_TIME_T
#endif
#endif
#endif
#ifndef _TIME32_T_DEFINED
typedef long __time32_t;
#define _TIME32_T_DEFINED
#endif
#ifndef _TIME64_T_DEFINED
#if _INTEGRAL_MAX_BITS >= 64
typedef __int64 __time64_t;
#endif
#define _TIME64_T_DEFINED
#endif
#ifndef _TIME_T_DEFINED
#ifdef _USE_32BIT_TIME_T
typedef __time32_t time_t;
#else
typedef __time64_t time_t;
#endif
#define _TIME_T_DEFINED
#endif
#ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
#define _WCHAR_T_DEFINED
#endif
#ifndef _STAT_DEFINED
#ifdef _USE_32BIT_TIME_T
#ifndef _WIN64
#define _fstat32 _fstat
#define _stat32 _stat
#define _wstat32 _wstat
#else
#define _fstat _fstat32
#define _stat _stat32
#define _wstat _wstat32
#endif
#define _fstati64 _fstat32i64
#define _stati64 _stat32i64
#define _wstati64 _wstat32i64
#else
#define _fstat _fstat64i32
#define _fstati64 _fstat64
#define _stat _stat64i32
#define _stati64 _stat64
#define _wstat _wstat64i32
#define _wstati64 _wstat64
#endif
struct _stat32 {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
_off_t st_size;
__time32_t st_atime;
__time32_t st_mtime;
__time32_t st_ctime;
};
#ifndef NO_OLDNAMES
struct stat {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
_off_t st_size;
time_t st_atime;
time_t st_mtime;
time_t st_ctime;
};
#endif
#if _INTEGRAL_MAX_BITS >= 64
struct _stat32i64 {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
__int64 st_size;
__time32_t st_atime;
__time32_t st_mtime;
__time32_t st_ctime;
};
struct _stat64i32 {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
_off_t st_size;
__time64_t st_atime;
__time64_t st_mtime;
__time64_t st_ctime;
};
struct _stat64 {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
__int64 st_size;
__time64_t st_atime;
__time64_t st_mtime;
__time64_t st_ctime;
};
#endif
#define __stat64 _stat64
#define _STAT_DEFINED
#endif
#define _S_IFMT 0xF000
#define _S_IFDIR 0x4000
#define _S_IFCHR 0x2000
#define _S_IFIFO 0x1000
#define _S_IFREG 0x8000
#define _S_IREAD 0x0100
#define _S_IWRITE 0x0080
#define _S_IEXEC 0x0040
_CRTIMP int __cdecl _fstat32(int _FileDes,struct _stat32 *_Stat);
_CRTIMP int __cdecl _stat32(const char *_Name,struct _stat32 *_Stat);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP int __cdecl _fstat64(int _FileDes,struct _stat64 *_Stat);
_CRTIMP int __cdecl _fstat32i64(int _FileDes,struct _stat32i64 *_Stat);
int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat);
__CRT_INLINE int __cdecl _fstat64i32(int _FileDes,struct _stat64i32 *_Stat)
{
struct _stat64 st;
int ret=_fstat64(_FileDes,&st);
_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;
}
_CRTIMP int __cdecl _stat64(const char *_Name,struct _stat64 *_Stat);
_CRTIMP int __cdecl _stat32i64(const char *_Name,struct _stat32i64 *_Stat);
int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat);
__CRT_INLINE int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat)
{
struct _stat64 st;
int ret=_stat64(_Name,&st);
_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
#ifndef _WSTAT_DEFINED
#define _WSTAT_DEFINED
_CRTIMP int __cdecl _wstat32(const wchar_t *_Name,struct _stat32 *_Stat);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP int __cdecl _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat);
int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat);
_CRTIMP int __cdecl _wstat64(const wchar_t *_Name,struct _stat64 *_Stat);
#endif
#endif
#ifndef NO_OLDNAMES
#define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */
#define S_IFMT _S_IFMT
#define S_IFDIR _S_IFDIR
#define S_IFCHR _S_IFCHR
#define S_IFREG _S_IFREG
#define S_IREAD _S_IREAD
#define S_IWRITE _S_IWRITE
#define S_IEXEC _S_IEXEC
#define S_IFIFO _S_IFIFO
#define S_IFBLK _S_IFBLK
#define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
#define _S_IXUSR _S_IEXEC
#define _S_IWUSR _S_IWRITE
#define S_IRWXU _S_IRWXU
#define S_IXUSR _S_IXUSR
#define S_IWUSR _S_IWUSR
#define S_IRUSR _S_IRUSR
#define _S_IRUSR _S_IREAD
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
#if !defined (RC_INVOKED) && !defined (NO_OLDNAMES)
int __cdecl stat(const char *_Filename,struct stat *_Stat);
int __cdecl fstat(int _Desc,struct stat *_Stat);
int __cdecl wstat(const wchar_t *_Filename,struct stat *_Stat);
#ifdef _USE_32BIT_TIME_T
__CRT_INLINE int __cdecl fstat(int _Desc,struct stat *_Stat) {
return _fstat32(_Desc,(struct _stat32 *)_Stat);
}
__CRT_INLINE int __cdecl stat(const char *_Filename,struct stat *_Stat) {
return _stat32(_Filename,(struct _stat32 *)_Stat);
}
#else
__CRT_INLINE int __cdecl fstat(int _Desc,struct stat *_Stat) {
return _fstat64i32(_Desc,(struct _stat64i32 *)_Stat);
}
__CRT_INLINE int __cdecl stat(const char *_Filename,struct stat *_Stat) {
return _stat64i32(_Filename,(struct _stat64i32 *)_Stat);
}
#endif
#endif
#ifdef __cplusplus
}
#endif
#pragma pack(pop)
#endif

View file

@ -0,0 +1,69 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _SYS_TIME_H_
#define _SYS_TIME_H_
#include <time.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __STRICT_ANSI__
#ifndef _TIMEVAL_DEFINED /* also in winsock[2].h */
#define _TIMEVAL_DEFINED
struct timeval {
long tv_sec;
long tv_usec;
};
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
#define timercmp(tvp, uvp, cmp) \
(((tvp)->tv_sec != (uvp)->tv_sec) ? \
((tvp)->tv_sec cmp (uvp)->tv_sec) : \
((tvp)->tv_usec cmp (uvp)->tv_usec))
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
#endif /* _TIMEVAL_DEFINED */
#ifndef _TIMEZONE_DEFINED /* also in sys/time.h */
#define _TIMEZONE_DEFINED
/* Provided for compatibility with code that assumes that
the presence of gettimeofday function implies a definition
of struct timezone. */
struct timezone
{
int tz_minuteswest; /* of Greenwich */
int tz_dsttime; /* type of dst correction to apply */
};
extern int __cdecl mingw_gettimeofday (struct timeval *p, struct timezone *z);
#endif
/*
Implementation as per:
The Open Group Base Specifications, Issue 6
IEEE Std 1003.1, 2004 Edition
The timezone pointer arg is ignored. Errors are ignored.
*/
#ifndef _GETTIMEOFDAY_DEFINED
#define _GETTIMEOFDAY_DEFINED
int __cdecl gettimeofday(struct timeval *__restrict__,
void *__restrict__ /* tzp (unused) */);
#endif
#endif /* __STRICT_ANSI__ */
#ifdef __cplusplus
}
#endif
/* Adding timespec definition. */
#include <sys/timeb.h>
#endif /* _SYS_TIME_H_ */

View file

@ -0,0 +1,133 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _TIMEB_H_
#define _TIMEB_H_
#include <_mingw.h>
#ifndef _WIN32
#error Only Win32 target is supported!
#endif
#pragma pack(push,_CRT_PACKING)
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _CRTIMP
#define _CRTIMP __declspec(dllimport)
#endif
#ifndef __TINYC__ /* gr */
#ifdef _USE_32BIT_TIME_T
#ifdef _WIN64
#undef _USE_32BIT_TIME_T
#endif
#else
#if _INTEGRAL_MAX_BITS < 64
#define _USE_32BIT_TIME_T
#endif
#endif
#endif
#ifndef _TIME32_T_DEFINED
typedef long __time32_t;
#define _TIME32_T_DEFINED
#endif
#ifndef _TIME64_T_DEFINED
#if _INTEGRAL_MAX_BITS >= 64
typedef __int64 __time64_t;
#endif
#define _TIME64_T_DEFINED
#endif
#ifndef _TIME_T_DEFINED
#ifdef _USE_32BIT_TIME_T
typedef __time32_t time_t;
#else
typedef __time64_t time_t;
#endif
#define _TIME_T_DEFINED
#endif
#ifndef _TIMEB_DEFINED
#define _TIMEB_DEFINED
struct __timeb32 {
__time32_t time;
unsigned short millitm;
short timezone;
short dstflag;
};
#ifndef NO_OLDNAMES
struct timeb {
time_t time;
unsigned short millitm;
short timezone;
short dstflag;
};
#endif
#if _INTEGRAL_MAX_BITS >= 64
struct __timeb64 {
__time64_t time;
unsigned short millitm;
short timezone;
short dstflag;
};
#endif
#ifdef _USE_32BIT_TIME_T
#define _timeb __timeb32
//gr #define _ftime _ftime32
#define _ftime32 _ftime
#else
#define _timeb __timeb64
#define _ftime _ftime64
#endif
#endif
_CRTIMP void __cdecl _ftime32(struct __timeb32 *_Time);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP void __cdecl _ftime64(struct __timeb64 *_Time);
#endif
#ifndef _TIMESPEC_DEFINED
#define _TIMESPEC_DEFINED
struct timespec {
time_t tv_sec; /* Seconds */
long tv_nsec; /* Nanoseconds */
};
struct itimerspec {
struct timespec it_interval; /* Timer period */
struct timespec it_value; /* Timer expiration */
};
#endif
#if !defined (RC_INVOKED) && !defined (NO_OLDNAMES)
#ifdef _USE_32BIT_TIME_T
__CRT_INLINE void __cdecl ftime(struct timeb *_Tmb) {
_ftime32((struct __timeb32 *)_Tmb);
}
#else
__CRT_INLINE void __cdecl ftime(struct timeb *_Tmb) {
_ftime64((struct __timeb64 *)_Tmb);
}
#endif
#endif
#ifdef __cplusplus
}
#endif
#pragma pack(pop)
#include <sec_api/sys/timeb_s.h>
#endif

View file

@ -0,0 +1,118 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_TYPES
#define _INC_TYPES
#ifndef _WIN32
#error Only Win32 target is supported!
#endif
#include <_mingw.h>
#ifndef __TINYC__ /* gr */
#ifdef _USE_32BIT_TIME_T
#ifdef _WIN64
#undef _USE_32BIT_TIME_T
#endif
#else
#if _INTEGRAL_MAX_BITS < 64
#define _USE_32BIT_TIME_T
#endif
#endif
#endif
#ifndef _TIME32_T_DEFINED
#define _TIME32_T_DEFINED
typedef long __time32_t;
#endif
#ifndef _TIME64_T_DEFINED
#define _TIME64_T_DEFINED
#if _INTEGRAL_MAX_BITS >= 64
typedef __int64 __time64_t;
#endif
#endif
#ifndef _TIME_T_DEFINED
#define _TIME_T_DEFINED
#ifdef _USE_32BIT_TIME_T
typedef __time32_t time_t;
#else
typedef __time64_t time_t;
#endif
#endif
#ifndef _INO_T_DEFINED
#define _INO_T_DEFINED
typedef unsigned short _ino_t;
#ifndef NO_OLDNAMES
typedef unsigned short ino_t;
#endif
#endif
#ifndef _DEV_T_DEFINED
#define _DEV_T_DEFINED
typedef unsigned int _dev_t;
#ifndef NO_OLDNAMES
typedef unsigned int dev_t;
#endif
#endif
#ifndef _PID_T_
#define _PID_T_
#ifndef _WIN64
typedef int _pid_t;
#else
typedef __int64 _pid_t;
#endif
#ifndef NO_OLDNAMES
typedef _pid_t pid_t;
#endif
#endif /* Not _PID_T_ */
#ifndef _MODE_T_
#define _MODE_T_
typedef unsigned short _mode_t;
#ifndef NO_OLDNAMES
typedef _mode_t mode_t;
#endif
#endif /* Not _MODE_T_ */
#ifndef _OFF_T_DEFINED
#define _OFF_T_DEFINED
#ifndef _OFF_T_
#define _OFF_T_
typedef long _off_t;
#if !defined(NO_OLDNAMES) || defined(_POSIX)
typedef long off_t;
#endif
#endif
#endif
#ifndef _OFF64_T_DEFINED
#define _OFF64_T_DEFINED
typedef long long _off64_t;
#if !defined(NO_OLDNAMES) || defined(_POSIX)
typedef long long off64_t;
#endif
#endif
#ifndef _TIMESPEC_DEFINED
#define _TIMESPEC_DEFINED
struct timespec {
time_t tv_sec; /* Seconds */
long tv_nsec; /* Nanoseconds */
};
struct itimerspec {
struct timespec it_interval; /* Timer period */
struct timespec it_value; /* Timer expiration */
};
#endif
#endif

View file

@ -0,0 +1,14 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
/*
* This file is part of the Mingw32 package.
*
* unistd.h maps (roughly) to io.h
*/
#ifndef __STRICT_ANSI__
#include <io.h>
#endif

View file

@ -0,0 +1,146 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_UTIME
#define _INC_UTIME
#ifndef _WIN32
#error Only Win32 target is supported!
#endif
#include <_mingw.h>
#pragma pack(push,_CRT_PACKING)
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _CRTIMP
#define _CRTIMP __declspec(dllimport)
#endif
#ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
#define _WCHAR_T_DEFINED
#endif
#ifndef __TINYC__ /* gr */
#ifdef _USE_32BIT_TIME_T
#ifdef _WIN64
#undef _USE_32BIT_TIME_T
#endif
#else
#if _INTEGRAL_MAX_BITS < 64
#define _USE_32BIT_TIME_T
#endif
#endif
#endif
#ifndef _TIME32_T_DEFINED
#define _TIME32_T_DEFINED
typedef long __time32_t;
#endif
#ifndef _TIME64_T_DEFINED
#define _TIME64_T_DEFINED
#if _INTEGRAL_MAX_BITS >= 64
typedef __int64 __time64_t;
#endif
#endif
#ifndef _TIME_T_DEFINED
#define _TIME_T_DEFINED
#ifdef _USE_32BIT_TIME_T
typedef __time32_t time_t;
#else
typedef __time64_t time_t;
#endif
#endif
#ifndef _UTIMBUF_DEFINED
#define _UTIMBUF_DEFINED
struct _utimbuf {
time_t actime;
time_t modtime;
};
struct __utimbuf32 {
__time32_t actime;
__time32_t modtime;
};
#if _INTEGRAL_MAX_BITS >= 64
struct __utimbuf64 {
__time64_t actime;
__time64_t modtime;
};
#endif
#ifndef NO_OLDNAMES
struct utimbuf {
time_t actime;
time_t modtime;
};
struct utimbuf32 {
__time32_t actime;
__time32_t modtime;
};
#endif
#endif
_CRTIMP int __cdecl _utime32(const char *_Filename,struct __utimbuf32 *_Time);
_CRTIMP int __cdecl _futime32(int _FileDes,struct __utimbuf32 *_Time);
_CRTIMP int __cdecl _wutime32(const wchar_t *_Filename,struct __utimbuf32 *_Time);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP int __cdecl _utime64(const char *_Filename,struct __utimbuf64 *_Time);
_CRTIMP int __cdecl _futime64(int _FileDes,struct __utimbuf64 *_Time);
_CRTIMP int __cdecl _wutime64(const wchar_t *_Filename,struct __utimbuf64 *_Time);
#endif
#ifndef RC_INVOKED
#ifdef _USE_32BIT_TIME_T
__CRT_INLINE int __cdecl _utime(const char *_Filename,struct _utimbuf *_Utimbuf) {
return _utime32(_Filename,(struct __utimbuf32 *)_Utimbuf);
}
__CRT_INLINE int __cdecl _futime(int _Desc,struct _utimbuf *_Utimbuf) {
return _futime32(_Desc,(struct __utimbuf32 *)_Utimbuf);
}
__CRT_INLINE int __cdecl _wutime(const wchar_t *_Filename,struct _utimbuf *_Utimbuf) {
return _wutime32(_Filename,(struct __utimbuf32 *)_Utimbuf);
}
#else
__CRT_INLINE int __cdecl _utime(const char *_Filename,struct _utimbuf *_Utimbuf) {
return _utime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
}
__CRT_INLINE int __cdecl _futime(int _Desc,struct _utimbuf *_Utimbuf) {
return _futime64(_Desc,(struct __utimbuf64 *)_Utimbuf);
}
__CRT_INLINE int __cdecl _wutime(const wchar_t *_Filename,struct _utimbuf *_Utimbuf) {
return _wutime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
}
#endif
#ifndef NO_OLDNAMES
#ifdef _USE_32BIT_TIME_T
__CRT_INLINE int __cdecl utime(const char *_Filename,struct utimbuf *_Utimbuf) {
return _utime32(_Filename,(struct __utimbuf32 *)_Utimbuf);
}
#else
__CRT_INLINE int __cdecl utime(const char *_Filename,struct utimbuf *_Utimbuf) {
return _utime64(_Filename,(struct __utimbuf64 *)_Utimbuf);
}
#endif
#endif
#endif
#ifdef __cplusplus
}
#endif
#pragma pack(pop)
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,287 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _TIME_H_
#define _TIME_H_
#include <_mingw.h>
#ifndef _WIN32
#error Only Win32 target is supported!
#endif
#pragma pack(push,_CRT_PACKING)
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _CRTIMP
#define _CRTIMP __declspec(dllimport)
#endif
#ifndef _WCHAR_T_DEFINED
#define _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
#endif
#ifndef _TIME32_T_DEFINED
#define _TIME32_T_DEFINED
typedef long __time32_t;
#endif
#ifndef _TIME64_T_DEFINED
#define _TIME64_T_DEFINED
#if _INTEGRAL_MAX_BITS >= 64
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
typedef int _time64_t __attribute__ ((mode (DI)));
#else
typedef __int64 __time64_t;
#endif
#endif
#endif
#ifndef _TIME_T_DEFINED
#define _TIME_T_DEFINED
#ifdef _USE_32BIT_TIME_T
typedef __time32_t time_t;
#else
typedef __time64_t time_t;
#endif
#endif
#ifndef _CLOCK_T_DEFINED
#define _CLOCK_T_DEFINED
typedef long clock_t;
#endif
#ifndef _SIZE_T_DEFINED
#define _SIZE_T_DEFINED
#undef size_t
#ifdef _WIN64
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
typedef unsigned int size_t __attribute__ ((mode (DI)));
#else
typedef unsigned __int64 size_t;
#endif
#else
typedef unsigned int size_t;
#endif
#endif
#ifndef _SSIZE_T_DEFINED
#define _SSIZE_T_DEFINED
#undef ssize_t
#ifdef _WIN64
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
typedef int ssize_t __attribute__ ((mode (DI)));
#else
typedef __int64 ssize_t;
#endif
#else
typedef int ssize_t;
#endif
#endif
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#ifdef _USE_32BIT_TIME_T
#define _localtime32 localtime
#define _difftime32 difftime
#define _ctime32 ctime
#define _gmtime32 gmtime
#define _mktime32 mktime
#define _time32 time
#endif
#ifndef _TM_DEFINED
#define _TM_DEFINED
struct tm {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
};
#endif
#define CLOCKS_PER_SEC 1000
__MINGW_IMPORT int _daylight;
__MINGW_IMPORT long _dstbias;
__MINGW_IMPORT long _timezone;
__MINGW_IMPORT char * _tzname[2];
_CRTIMP errno_t __cdecl _get_daylight(int *_Daylight);
_CRTIMP errno_t __cdecl _get_dstbias(long *_Daylight_savings_bias);
_CRTIMP errno_t __cdecl _get_timezone(long *_Timezone);
_CRTIMP errno_t __cdecl _get_tzname(size_t *_ReturnValue,char *_Buffer,size_t _SizeInBytes,int _Index);
char *__cdecl asctime(const struct tm *_Tm);
_CRTIMP char *__cdecl _ctime32(const __time32_t *_Time);
clock_t __cdecl clock(void);
_CRTIMP double __cdecl _difftime32(__time32_t _Time1,__time32_t _Time2);
_CRTIMP struct tm *__cdecl _gmtime32(const __time32_t *_Time);
_CRTIMP struct tm *__cdecl _localtime32(const __time32_t *_Time);
size_t __cdecl strftime(char *_Buf,size_t _SizeInBytes,const char *_Format,const struct tm *_Tm);
_CRTIMP size_t __cdecl _strftime_l(char *_Buf,size_t _Max_size,const char *_Format,const struct tm *_Tm,_locale_t _Locale);
_CRTIMP char *__cdecl _strdate(char *_Buffer);
_CRTIMP char *__cdecl _strtime(char *_Buffer);
_CRTIMP __time32_t __cdecl _time32(__time32_t *_Time);
_CRTIMP __time32_t __cdecl _mktime32(struct tm *_Tm);
_CRTIMP __time32_t __cdecl _mkgmtime32(struct tm *_Tm);
#if defined (_POSIX_) || defined(__GNUC__)
void __cdecl tzset(void);
#else
_CRTIMP void __cdecl _tzset(void);
#endif
#if _INTEGRAL_MAX_BITS >= 64
double __cdecl _difftime64(__time64_t _Time1,__time64_t _Time2);
_CRTIMP char *__cdecl _ctime64(const __time64_t *_Time);
_CRTIMP struct tm *__cdecl _gmtime64(const __time64_t *_Time);
_CRTIMP struct tm *__cdecl _localtime64(const __time64_t *_Time);
_CRTIMP __time64_t __cdecl _mktime64(struct tm *_Tm);
_CRTIMP __time64_t __cdecl _mkgmtime64(struct tm *_Tm);
_CRTIMP __time64_t __cdecl _time64(__time64_t *_Time);
#endif
unsigned __cdecl _getsystime(struct tm *_Tm);
unsigned __cdecl _setsystime(struct tm *_Tm,unsigned _MilliSec);
#ifndef _SIZE_T_DEFINED
#define _SIZE_T_DEFINED
#ifdef _WIN64
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
typedef unsigned int size_t __attribute__ ((mode (DI)));
#else
typedef unsigned __int64 size_t;
#endif
#else
typedef unsigned long size_t;
#endif
#endif
#ifndef _SSIZE_T_DEFINED
#define _SSIZE_T_DEFINED
#ifdef _WIN64
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
typedef int ssize_t __attribute__ ((mode (DI)));
#else
typedef __int64 ssize_t;
#endif
#else
typedef long ssize_t;
#endif
#endif
#ifndef _WTIME_DEFINED
_CRTIMP wchar_t *__cdecl _wasctime(const struct tm *_Tm);
_CRTIMP wchar_t *__cdecl _wctime32(const __time32_t *_Time);
size_t __cdecl wcsftime(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm);
_CRTIMP size_t __cdecl _wcsftime_l(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm,_locale_t _Locale);
_CRTIMP wchar_t *__cdecl _wstrdate(wchar_t *_Buffer);
_CRTIMP wchar_t *__cdecl _wstrtime(wchar_t *_Buffer);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP wchar_t *__cdecl _wctime64(const __time64_t *_Time);
#endif
#if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL)
#define _INC_WTIME_INL
#ifdef _USE_32BIT_TIME_T
__CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime32(_Time); }
#else
__CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime64(_Time); }
#endif
#endif
#define _WTIME_DEFINED
#endif
#ifndef RC_INVOKED
double __cdecl difftime(time_t _Time1,time_t _Time2);
char *__cdecl ctime(const time_t *_Time);
struct tm *__cdecl gmtime(const time_t *_Time);
struct tm *__cdecl localtime(const time_t *_Time);
struct tm *__cdecl localtime_r(const time_t *_Time,struct tm *);
time_t __cdecl mktime(struct tm *_Tm);
time_t __cdecl _mkgmtime(struct tm *_Tm);
time_t __cdecl time(time_t *_Time);
#ifdef _USE_32BIT_TIME_T
#if 0
__CRT_INLINE double __cdecl difftime(time_t _Time1,time_t _Time2) { return _difftime32(_Time1,_Time2); }
__CRT_INLINE char *__cdecl ctime(const time_t *_Time) { return _ctime32(_Time); }
__CRT_INLINE struct tm *__cdecl gmtime(const time_t *_Time) { return _gmtime32(_Time); }
__CRT_INLINE struct tm *__cdecl localtime(const time_t *_Time) { return _localtime32(_Time); }
__CRT_INLINE time_t __cdecl mktime(struct tm *_Tm) { return _mktime32(_Tm); }
__CRT_INLINE time_t __cdecl _mkgmtime(struct tm *_Tm) { return _mkgmtime32(_Tm); }
__CRT_INLINE time_t __cdecl time(time_t *_Time) { return _time32(_Time); }
#endif
#else
__CRT_INLINE double __cdecl difftime(time_t _Time1,time_t _Time2) { return _difftime64(_Time1,_Time2); }
__CRT_INLINE char *__cdecl ctime(const time_t *_Time) { return _ctime64(_Time); }
__CRT_INLINE struct tm *__cdecl gmtime(const time_t *_Time) { return _gmtime64(_Time); }
__CRT_INLINE struct tm *__cdecl localtime(const time_t *_Time) { return _localtime64(_Time); }
__CRT_INLINE time_t __cdecl mktime(struct tm *_Tm) { return _mktime64(_Tm); }
__CRT_INLINE time_t __cdecl _mkgmtime(struct tm *_Tm) { return _mkgmtime64(_Tm); }
__CRT_INLINE time_t __cdecl time(time_t *_Time) { return _time64(_Time); }
#endif
#endif
#if !defined(NO_OLDNAMES) || defined(_POSIX)
#define CLK_TCK CLOCKS_PER_SEC
__MINGW_IMPORT int daylight;
__MINGW_IMPORT long dstbias;
__MINGW_IMPORT long timezone;
__MINGW_IMPORT char *tzname[2];
void __cdecl tzset(void);
#endif
#ifndef _TIMEVAL_DEFINED /* also in winsock[2].h */
#define _TIMEVAL_DEFINED
struct timeval {
long tv_sec;
long tv_usec;
};
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
#define timercmp(tvp,uvp,cmp) ((tvp)->tv_sec cmp (uvp)->tv_sec || (tvp)->tv_sec==(uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec)
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
#endif /* _TIMEVAL_DEFINED */
#ifndef __STRICT_ANSI__
#ifndef _TIMEZONE_DEFINED /* also in sys/time.h */
#define _TIMEZONE_DEFINED
struct timezone {
int tz_minuteswest;
int tz_dsttime;
};
extern int __cdecl mingw_gettimeofday (struct timeval *p, struct timezone *z);
#endif
#endif /* __STRICT_ANSI__ */
#ifdef __cplusplus
}
#endif
#pragma pack(pop)
#include <sec_api/time_s.h>
/* Adding timespec definition. */
#include <sys/timeb.h>
#endif /* End _TIME_H_ */

View file

@ -0,0 +1,11 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_VADEFS
#define _INC_VADEFS
//!__TINYC__: GNUC specific stuff removed
#endif

View file

@ -0,0 +1,4 @@
/*
* TODO: Nothing here yet. Should provide UNIX compatibility constants
* comparable to those in limits.h and float.h.
*/

View file

@ -0,0 +1,873 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_WCHAR
#define _INC_WCHAR
#include <_mingw.h>
#pragma pack(push,_CRT_PACKING)
#ifdef __cplusplus
extern "C" {
#endif
#ifndef WCHAR_MIN /* also at stdint.h */
#define WCHAR_MIN 0
#define WCHAR_MAX ((wchar_t) -1) /* UINT16_MAX */
#endif
#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST
typedef __builtin_va_list __gnuc_va_list;
#endif
#ifndef _VA_LIST_DEFINED
#define _VA_LIST_DEFINED
typedef __gnuc_va_list va_list;
#endif
#ifndef WEOF
#define WEOF (wint_t)(0xFFFF)
#endif
#ifndef _FILE_DEFINED
struct _iobuf {
char *_ptr;
int _cnt;
char *_base;
int _flag;
int _file;
int _charbuf;
int _bufsiz;
char *_tmpfname;
};
typedef struct _iobuf FILE;
#define _FILE_DEFINED
#endif
#ifndef _STDIO_DEFINED
#ifdef _WIN64
_CRTIMP FILE *__cdecl __iob_func(void);
#else
#ifdef _MSVCRT_
extern FILE _iob[]; /* A pointer to an array of FILE */
#define __iob_func() (_iob)
#else
extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */
#define __iob_func() (*_imp___iob)
#define _iob __iob_func()
#endif
#endif
#define _iob __iob_func()
#endif
#ifndef _STDSTREAM_DEFINED
#define stdin (&__iob_func()[0])
#define stdout (&__iob_func()[1])
#define stderr (&__iob_func()[2])
#define _STDSTREAM_DEFINED
#endif
#ifndef _FSIZE_T_DEFINED
typedef unsigned long _fsize_t;
#define _FSIZE_T_DEFINED
#endif
#ifndef _WFINDDATA_T_DEFINED
struct _wfinddata32_t {
unsigned attrib;
__time32_t time_create;
__time32_t time_access;
__time32_t time_write;
_fsize_t size;
wchar_t name[260];
};
/* #if _INTEGRAL_MAX_BITS >= 64 */
struct _wfinddata32i64_t {
unsigned attrib;
__time32_t time_create;
__time32_t time_access;
__time32_t time_write;
__int64 size;
wchar_t name[260];
};
struct _wfinddata64i32_t {
unsigned attrib;
__time64_t time_create;
__time64_t time_access;
__time64_t time_write;
_fsize_t size;
wchar_t name[260];
};
struct _wfinddata64_t {
unsigned attrib;
__time64_t time_create;
__time64_t time_access;
__time64_t time_write;
__int64 size;
wchar_t name[260];
};
/* #endif */
#ifdef _USE_32BIT_TIME_T
#define _wfinddata_t _wfinddata32_t
#define _wfinddatai64_t _wfinddata32i64_t
#define _wfindfirst _wfindfirst32
#define _wfindnext _wfindnext32
#define _wfindfirsti64 _wfindfirst32i64
#define _wfindnexti64 _wfindnext32i64
#else
#define _wfinddata_t _wfinddata64i32_t
#define _wfinddatai64_t _wfinddata64_t
#define _wfindfirst _wfindfirst64i32
#define _wfindnext _wfindnext64i32
#define _wfindfirsti64 _wfindfirst64
#define _wfindnexti64 _wfindnext64
#endif
#define _WFINDDATA_T_DEFINED
#endif
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#ifndef _CONST_RETURN
#define _CONST_RETURN
#endif
#define _WConst_return _CONST_RETURN
#ifndef _CRT_CTYPEDATA_DEFINED
#define _CRT_CTYPEDATA_DEFINED
#ifndef _CTYPE_DISABLE_MACROS
#ifndef __PCTYPE_FUNC
#define __PCTYPE_FUNC __pctype_func()
#ifdef _MSVCRT_
#define __pctype_func() (_pctype)
#else
#define __pctype_func() (*_imp___pctype)
#endif
#endif
#ifndef _pctype
#ifdef _MSVCRT_
extern unsigned short *_pctype;
#else
extern unsigned short **_imp___pctype;
#define _pctype (*_imp___pctype)
#endif
#endif
#endif
#endif
#ifndef _CRT_WCTYPEDATA_DEFINED
#define _CRT_WCTYPEDATA_DEFINED
#ifndef _CTYPE_DISABLE_MACROS
#ifndef _wctype
#ifdef _MSVCRT_
extern unsigned short *_wctype;
#else
extern unsigned short **_imp___wctype;
#define _wctype (*_imp___wctype)
#endif
#endif
#ifdef _MSVCRT_
#define __pwctype_func() (_pwctype)
#else
#define __pwctype_func() (*_imp___pwctype)
#endif
#ifndef _pwctype
#ifdef _MSVCRT_
extern unsigned short *_pwctype;
#else
extern unsigned short **_imp___pwctype;
#define _pwctype (*_imp___pwctype)
#endif
#endif
#endif
#endif
#define _UPPER 0x1
#define _LOWER 0x2
#define _DIGIT 0x4
#define _SPACE 0x8
#define _PUNCT 0x10
#define _CONTROL 0x20
#define _BLANK 0x40
#define _HEX 0x80
#define _LEADBYTE 0x8000
#define _ALPHA (0x0100|_UPPER|_LOWER)
#ifndef _WCTYPE_DEFINED
#define _WCTYPE_DEFINED
int __cdecl iswalpha(wint_t _C);
_CRTIMP int __cdecl _iswalpha_l(wint_t _C,_locale_t _Locale);
int __cdecl iswupper(wint_t _C);
_CRTIMP int __cdecl _iswupper_l(wint_t _C,_locale_t _Locale);
int __cdecl iswlower(wint_t _C);
_CRTIMP int __cdecl _iswlower_l(wint_t _C,_locale_t _Locale);
int __cdecl iswdigit(wint_t _C);
_CRTIMP int __cdecl _iswdigit_l(wint_t _C,_locale_t _Locale);
int __cdecl iswxdigit(wint_t _C);
_CRTIMP int __cdecl _iswxdigit_l(wint_t _C,_locale_t _Locale);
int __cdecl iswspace(wint_t _C);
_CRTIMP int __cdecl _iswspace_l(wint_t _C,_locale_t _Locale);
int __cdecl iswpunct(wint_t _C);
_CRTIMP int __cdecl _iswpunct_l(wint_t _C,_locale_t _Locale);
int __cdecl iswalnum(wint_t _C);
_CRTIMP int __cdecl _iswalnum_l(wint_t _C,_locale_t _Locale);
int __cdecl iswprint(wint_t _C);
_CRTIMP int __cdecl _iswprint_l(wint_t _C,_locale_t _Locale);
int __cdecl iswgraph(wint_t _C);
_CRTIMP int __cdecl _iswgraph_l(wint_t _C,_locale_t _Locale);
int __cdecl iswcntrl(wint_t _C);
_CRTIMP int __cdecl _iswcntrl_l(wint_t _C,_locale_t _Locale);
int __cdecl iswascii(wint_t _C);
int __cdecl isleadbyte(int _C);
_CRTIMP int __cdecl _isleadbyte_l(int _C,_locale_t _Locale);
wint_t __cdecl towupper(wint_t _C);
_CRTIMP wint_t __cdecl _towupper_l(wint_t _C,_locale_t _Locale);
wint_t __cdecl towlower(wint_t _C);
_CRTIMP wint_t __cdecl _towlower_l(wint_t _C,_locale_t _Locale);
int __cdecl iswctype(wint_t _C,wctype_t _Type);
_CRTIMP int __cdecl _iswctype_l(wint_t _C,wctype_t _Type,_locale_t _Locale);
_CRTIMP int __cdecl __iswcsymf(wint_t _C);
_CRTIMP int __cdecl _iswcsymf_l(wint_t _C,_locale_t _Locale);
_CRTIMP int __cdecl __iswcsym(wint_t _C);
_CRTIMP int __cdecl _iswcsym_l(wint_t _C,_locale_t _Locale);
int __cdecl is_wctype(wint_t _C,wctype_t _Type);
#endif
#ifndef _WDIRECT_DEFINED
#define _WDIRECT_DEFINED
_CRTIMP wchar_t *__cdecl _wgetcwd(wchar_t *_DstBuf,int _SizeInWords);
_CRTIMP wchar_t *__cdecl _wgetdcwd(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
wchar_t *__cdecl _wgetdcwd_nolock(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
_CRTIMP int __cdecl _wchdir(const wchar_t *_Path);
_CRTIMP int __cdecl _wmkdir(const wchar_t *_Path);
_CRTIMP int __cdecl _wrmdir(const wchar_t *_Path);
#endif
#ifndef _WIO_DEFINED
#define _WIO_DEFINED
_CRTIMP int __cdecl _waccess(const wchar_t *_Filename,int _AccessMode);
_CRTIMP int __cdecl _wchmod(const wchar_t *_Filename,int _Mode);
_CRTIMP int __cdecl _wcreat(const wchar_t *_Filename,int _PermissionMode);
_CRTIMP intptr_t __cdecl _wfindfirst32(const wchar_t *_Filename,struct _wfinddata32_t *_FindData);
_CRTIMP int __cdecl _wfindnext32(intptr_t _FindHandle,struct _wfinddata32_t *_FindData);
_CRTIMP int __cdecl _wunlink(const wchar_t *_Filename);
_CRTIMP int __cdecl _wrename(const wchar_t *_NewFilename,const wchar_t *_OldFilename);
_CRTIMP wchar_t *__cdecl _wmktemp(wchar_t *_TemplateName);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP intptr_t __cdecl _wfindfirst32i64(const wchar_t *_Filename,struct _wfinddata32i64_t *_FindData);
intptr_t __cdecl _wfindfirst64i32(const wchar_t *_Filename,struct _wfinddata64i32_t *_FindData);
_CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t *_Filename,struct _wfinddata64_t *_FindData);
_CRTIMP int __cdecl _wfindnext32i64(intptr_t _FindHandle,struct _wfinddata32i64_t *_FindData);
int __cdecl _wfindnext64i32(intptr_t _FindHandle,struct _wfinddata64i32_t *_FindData);
_CRTIMP int __cdecl _wfindnext64(intptr_t _FindHandle,struct _wfinddata64_t *_FindData);
#endif
_CRTIMP errno_t __cdecl _wsopen_s(int *_FileHandle,const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionFlag);
#if !defined(__cplusplus) || !(defined(_X86_) && !defined(__x86_64))
_CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,...);
_CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,...);
#else
extern "C++" _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,int _PermissionMode = 0);
extern "C++" _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode = 0);
#endif
#endif
#ifndef _WLOCALE_DEFINED
#define _WLOCALE_DEFINED
_CRTIMP wchar_t *__cdecl _wsetlocale(int _Category,const wchar_t *_Locale);
#endif
#ifndef _WPROCESS_DEFINED
#define _WPROCESS_DEFINED
_CRTIMP intptr_t __cdecl _wexecl(const wchar_t *_Filename,const wchar_t *_ArgList,...);
_CRTIMP intptr_t __cdecl _wexecle(const wchar_t *_Filename,const wchar_t *_ArgList,...);
_CRTIMP intptr_t __cdecl _wexeclp(const wchar_t *_Filename,const wchar_t *_ArgList,...);
_CRTIMP intptr_t __cdecl _wexeclpe(const wchar_t *_Filename,const wchar_t *_ArgList,...);
_CRTIMP intptr_t __cdecl _wexecv(const wchar_t *_Filename,const wchar_t *const *_ArgList);
_CRTIMP intptr_t __cdecl _wexecve(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
_CRTIMP intptr_t __cdecl _wexecvp(const wchar_t *_Filename,const wchar_t *const *_ArgList);
_CRTIMP intptr_t __cdecl _wexecvpe(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
_CRTIMP intptr_t __cdecl _wspawnl(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
_CRTIMP intptr_t __cdecl _wspawnle(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
_CRTIMP intptr_t __cdecl _wspawnlp(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
_CRTIMP intptr_t __cdecl _wspawnlpe(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
_CRTIMP intptr_t __cdecl _wspawnv(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
_CRTIMP intptr_t __cdecl _wspawnve(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
_CRTIMP intptr_t __cdecl _wspawnvp(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
_CRTIMP intptr_t __cdecl _wspawnvpe(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
#ifndef _CRT_WSYSTEM_DEFINED
#define _CRT_WSYSTEM_DEFINED
_CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
#endif
#endif
#ifndef _WCTYPE_INLINE_DEFINED
#undef _CRT_WCTYPE_NOINLINE
#if !defined(__cplusplus) || defined(_CRT_WCTYPE_NOINLINE)
#define iswalpha(_c) (iswctype(_c,_ALPHA))
#define iswupper(_c) (iswctype(_c,_UPPER))
#define iswlower(_c) (iswctype(_c,_LOWER))
#define iswdigit(_c) (iswctype(_c,_DIGIT))
#define iswxdigit(_c) (iswctype(_c,_HEX))
#define iswspace(_c) (iswctype(_c,_SPACE))
#define iswpunct(_c) (iswctype(_c,_PUNCT))
#define iswalnum(_c) (iswctype(_c,_ALPHA|_DIGIT))
#define iswprint(_c) (iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT))
#define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT))
#define iswcntrl(_c) (iswctype(_c,_CONTROL))
#define iswascii(_c) ((unsigned)(_c) < 0x80)
#define _iswalpha_l(_c,_p) (_iswctype_l(_c,_ALPHA,_p))
#define _iswupper_l(_c,_p) (_iswctype_l(_c,_UPPER,_p))
#define _iswlower_l(_c,_p) (_iswctype_l(_c,_LOWER,_p))
#define _iswdigit_l(_c,_p) (_iswctype_l(_c,_DIGIT,_p))
#define _iswxdigit_l(_c,_p) (_iswctype_l(_c,_HEX,_p))
#define _iswspace_l(_c,_p) (_iswctype_l(_c,_SPACE,_p))
#define _iswpunct_l(_c,_p) (_iswctype_l(_c,_PUNCT,_p))
#define _iswalnum_l(_c,_p) (_iswctype_l(_c,_ALPHA|_DIGIT,_p))
#define _iswprint_l(_c,_p) (_iswctype_l(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT,_p))
#define _iswgraph_l(_c,_p) (_iswctype_l(_c,_PUNCT|_ALPHA|_DIGIT,_p))
#define _iswcntrl_l(_c,_p) (_iswctype_l(_c,_CONTROL,_p))
#ifndef _CTYPE_DISABLE_MACROS
#define isleadbyte(_c) (__PCTYPE_FUNC[(unsigned char)(_c)] & _LEADBYTE)
#endif
#endif
#define _WCTYPE_INLINE_DEFINED
#endif
#if !defined(_POSIX_) || defined(__GNUC__)
#ifndef _INO_T_DEFINED
#define _INO_T_DEFINED
typedef unsigned short _ino_t;
#ifndef NO_OLDNAMES
typedef unsigned short ino_t;
#endif
#endif
#ifndef _DEV_T_DEFINED
#define _DEV_T_DEFINED
typedef unsigned int _dev_t;
#ifndef NO_OLDNAMES
typedef unsigned int dev_t;
#endif
#endif
#ifndef _OFF_T_DEFINED
#define _OFF_T_DEFINED
#ifndef _OFF_T_
#define _OFF_T_
typedef long _off_t;
#if !defined(NO_OLDNAMES) || defined(_POSIX)
typedef long off_t;
#endif
#endif
#endif
#ifndef _OFF64_T_DEFINED
#define _OFF64_T_DEFINED
typedef long long _off64_t;
#if !defined(NO_OLDNAMES) || defined(_POSIX)
typedef long long off64_t;
#endif
#endif
#ifndef _STAT_DEFINED
#define _STAT_DEFINED
#ifdef _USE_32BIT_TIME_T
#ifdef WIN64
#define _fstat _fstat32
#define _stat _stat32
#define _wstat _wstat32
#else
#define _fstat32 _fstat
#define _stat32 _stat
#define _wstat32 _wstat
#endif
#define _fstati64 _fstat32i64
#define _stati64 _stat32i64
#define _wstati64 _wstat32i64
#else
#define _fstat _fstat64i32
#define _fstati64 _fstat64
#define _stat _stat64i32
#define _stati64 _stat64
#define _wstat _wstat64i32
#define _wstati64 _wstat64
#endif
struct _stat32 {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
_off_t st_size;
__time32_t st_atime;
__time32_t st_mtime;
__time32_t st_ctime;
};
#ifndef NO_OLDNAMES
struct stat {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
_off_t st_size;
time_t st_atime;
time_t st_mtime;
time_t st_ctime;
};
#endif
#if _INTEGRAL_MAX_BITS >= 64
struct _stat32i64 {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
__int64 st_size;
__time32_t st_atime;
__time32_t st_mtime;
__time32_t st_ctime;
};
struct _stat64i32 {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
_off_t st_size;
__time64_t st_atime;
__time64_t st_mtime;
__time64_t st_ctime;
};
struct _stat64 {
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
__int64 st_size;
__time64_t st_atime;
__time64_t st_mtime;
__time64_t st_ctime;
};
#endif
#define __stat64 _stat64
#endif
#ifndef _WSTAT_DEFINED
#define _WSTAT_DEFINED
_CRTIMP int __cdecl _wstat32(const wchar_t *_Name,struct _stat32 *_Stat);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP int __cdecl _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat);
int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat);
_CRTIMP int __cdecl _wstat64(const wchar_t *_Name,struct _stat64 *_Stat);
#endif
#endif
#endif
#ifndef _WCONIO_DEFINED
#define _WCONIO_DEFINED
#ifndef WEOF
#define WEOF (wint_t)(0xFFFF)
#endif
_CRTIMP wchar_t *_cgetws(wchar_t *_Buffer);
_CRTIMP wint_t __cdecl _getwch(void);
_CRTIMP wint_t __cdecl _getwche(void);
_CRTIMP wint_t __cdecl _putwch(wchar_t _WCh);
_CRTIMP wint_t __cdecl _ungetwch(wint_t _WCh);
_CRTIMP int __cdecl _cputws(const wchar_t *_String);
_CRTIMP int __cdecl _cwprintf(const wchar_t *_Format,...);
_CRTIMP int __cdecl _cwscanf(const wchar_t *_Format,...);
_CRTIMP int __cdecl _cwscanf_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vcwprintf(const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _cwprintf_p(const wchar_t *_Format,...);
_CRTIMP int __cdecl _vcwprintf_p(const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _cwprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vcwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _cwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vcwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
wint_t __cdecl _putwch_nolock(wchar_t _WCh);
wint_t __cdecl _getwch_nolock(void);
wint_t __cdecl _getwche_nolock(void);
wint_t __cdecl _ungetwch_nolock(wint_t _WCh);
#endif
#ifndef _WSTDIO_DEFINED
#define _WSTDIO_DEFINED
#ifndef WEOF
#define WEOF (wint_t)(0xFFFF)
#endif
#ifdef _POSIX_
_CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode);
#else
_CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag);
#endif
wint_t __cdecl fgetwc(FILE *_File);
_CRTIMP wint_t __cdecl _fgetwchar(void);
wint_t __cdecl fputwc(wchar_t _Ch,FILE *_File);
_CRTIMP wint_t __cdecl _fputwchar(wchar_t _Ch);
wint_t __cdecl getwc(FILE *_File);
wint_t __cdecl getwchar(void);
wint_t __cdecl putwc(wchar_t _Ch,FILE *_File);
wint_t __cdecl putwchar(wchar_t _Ch);
wint_t __cdecl ungetwc(wint_t _Ch,FILE *_File);
wchar_t *__cdecl fgetws(wchar_t *_Dst,int _SizeInWords,FILE *_File);
int __cdecl fputws(const wchar_t *_Str,FILE *_File);
_CRTIMP wchar_t *__cdecl _getws(wchar_t *_String);
_CRTIMP int __cdecl _putws(const wchar_t *_Str);
int __cdecl fwprintf(FILE *_File,const wchar_t *_Format,...);
int __cdecl wprintf(const wchar_t *_Format,...);
_CRTIMP int __cdecl _scwprintf(const wchar_t *_Format,...);
int __cdecl vfwprintf(FILE *_File,const wchar_t *_Format,va_list _ArgList);
int __cdecl vwprintf(const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl swprintf(wchar_t*, const wchar_t*, ...);
_CRTIMP int __cdecl vswprintf(wchar_t*, const wchar_t*,va_list);
_CRTIMP int __cdecl _swprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,...);
_CRTIMP int __cdecl _vswprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _snwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,...);
_CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,va_list _Args);
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
int __cdecl snwprintf (wchar_t *s, size_t n, const wchar_t * format, ...);
__CRT_INLINE int __cdecl vsnwprintf (wchar_t *s, size_t n, const wchar_t *format, va_list arg) { return _vsnwprintf(s,n,format,arg); }
int __cdecl vwscanf (const wchar_t *, va_list);
int __cdecl vfwscanf (FILE *,const wchar_t *,va_list);
int __cdecl vswscanf (const wchar_t *,const wchar_t *,va_list);
#endif
_CRTIMP int __cdecl _fwprintf_p(FILE *_File,const wchar_t *_Format,...);
_CRTIMP int __cdecl _wprintf_p(const wchar_t *_Format,...);
_CRTIMP int __cdecl _vfwprintf_p(FILE *_File,const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _vwprintf_p(const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _swprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,...);
_CRTIMP int __cdecl _vswprintf_p(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _scwprintf_p(const wchar_t *_Format,...);
_CRTIMP int __cdecl _vscwprintf_p(const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _wprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _wprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _vwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _fwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _fwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vfwprintf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _vfwprintf_p_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _swprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _swprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vswprintf_c_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _vswprintf_p_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _scwprintf_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _scwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vscwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _snwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _vsnwprintf_l(wchar_t *_DstBuf,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
_CRTIMP int __cdecl _swprintf(wchar_t *_Dest,const wchar_t *_Format,...);
_CRTIMP int __cdecl _vswprintf(wchar_t *_Dest,const wchar_t *_Format,va_list _Args);
_CRTIMP int __cdecl __swprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,...);
_CRTIMP int __cdecl __vswprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,va_list _Args);
#ifndef RC_INVOKED
#include <vadefs.h>
#endif
#ifdef _CRT_NON_CONFORMING_SWPRINTFS
#ifndef __cplusplus
#define swprintf _swprintf
#define vswprintf _vswprintf
#define _swprintf_l __swprintf_l
#define _vswprintf_l __vswprintf_l
#endif
#endif
_CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix);
_CRTIMP int __cdecl _vscwprintf(const wchar_t *_Format,va_list _ArgList);
_CRTIMP int __cdecl _vscwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList);
int __cdecl fwscanf(FILE *_File,const wchar_t *_Format,...);
_CRTIMP int __cdecl _fwscanf_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...);
int __cdecl swscanf(const wchar_t *_Src,const wchar_t *_Format,...);
_CRTIMP int __cdecl _swscanf_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP int __cdecl _snwscanf(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...);
_CRTIMP int __cdecl _snwscanf_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...);
int __cdecl wscanf(const wchar_t *_Format,...);
_CRTIMP int __cdecl _wscanf_l(const wchar_t *_Format,_locale_t _Locale,...);
_CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode);
_CRTIMP FILE *__cdecl _wfopen(const wchar_t *_Filename,const wchar_t *_Mode);
_CRTIMP FILE *__cdecl _wfreopen(const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile);
#ifndef _CRT_WPERROR_DEFINED
#define _CRT_WPERROR_DEFINED
_CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
#endif
_CRTIMP FILE *__cdecl _wpopen(const wchar_t *_Command,const wchar_t *_Mode);
#if !defined(NO_OLDNAMES) && !defined(wpopen)
#define wpopen _wpopen
#endif
_CRTIMP int __cdecl _wremove(const wchar_t *_Filename);
_CRTIMP wchar_t *__cdecl _wtmpnam(wchar_t *_Buffer);
_CRTIMP wint_t __cdecl _fgetwc_nolock(FILE *_File);
_CRTIMP wint_t __cdecl _fputwc_nolock(wchar_t _Ch,FILE *_File);
_CRTIMP wint_t __cdecl _ungetwc_nolock(wint_t _Ch,FILE *_File);
#undef _CRT_GETPUTWCHAR_NOINLINE
#if !defined(__cplusplus) || defined(_CRT_GETPUTWCHAR_NOINLINE)
#define getwchar() fgetwc(stdin)
#define putwchar(_c) fputwc((_c),stdout)
#else
__CRT_INLINE wint_t __cdecl getwchar() {return (fgetwc(stdin)); }
__CRT_INLINE wint_t __cdecl putwchar(wchar_t _C) {return (fputwc(_C,stdout)); }
#endif
#define getwc(_stm) fgetwc(_stm)
#define putwc(_c,_stm) fputwc(_c,_stm)
#define _putwc_nolock(_c,_stm) _fputwc_nolock(_c,_stm)
#define _getwc_nolock(_c) _fgetwc_nolock(_c)
#endif
#ifndef _WSTDLIB_DEFINED
#define _WSTDLIB_DEFINED
_CRTIMP wchar_t *__cdecl _itow(int _Value,wchar_t *_Dest,int _Radix);
_CRTIMP wchar_t *__cdecl _ltow(long _Value,wchar_t *_Dest,int _Radix);
_CRTIMP wchar_t *__cdecl _ultow(unsigned long _Value,wchar_t *_Dest,int _Radix);
double __cdecl wcstod(const wchar_t *_Str,wchar_t **_EndPtr);
_CRTIMP double __cdecl _wcstod_l(const wchar_t *_Str,wchar_t **_EndPtr,_locale_t _Locale);
float __cdecl wcstof( const wchar_t *nptr, wchar_t **endptr);
#if !defined __NO_ISOCEXT /* in libmingwex.a */
float __cdecl wcstof (const wchar_t * __restrict__, wchar_t ** __restrict__);
long double __cdecl wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__);
#endif /* __NO_ISOCEXT */
long __cdecl wcstol(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
_CRTIMP long __cdecl _wcstol_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
unsigned long __cdecl wcstoul(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
_CRTIMP unsigned long __cdecl _wcstoul_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
_CRTIMP wchar_t *__cdecl _wgetenv(const wchar_t *_VarName);
#ifndef _CRT_WSYSTEM_DEFINED
#define _CRT_WSYSTEM_DEFINED
_CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
#endif
_CRTIMP double __cdecl _wtof(const wchar_t *_Str);
_CRTIMP double __cdecl _wtof_l(const wchar_t *_Str,_locale_t _Locale);
_CRTIMP int __cdecl _wtoi(const wchar_t *_Str);
_CRTIMP int __cdecl _wtoi_l(const wchar_t *_Str,_locale_t _Locale);
_CRTIMP long __cdecl _wtol(const wchar_t *_Str);
_CRTIMP long __cdecl _wtol_l(const wchar_t *_Str,_locale_t _Locale);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP wchar_t *__cdecl _i64tow(__int64 _Val,wchar_t *_DstBuf,int _Radix);
_CRTIMP wchar_t *__cdecl _ui64tow(unsigned __int64 _Val,wchar_t *_DstBuf,int _Radix);
_CRTIMP __int64 __cdecl _wtoi64(const wchar_t *_Str);
_CRTIMP __int64 __cdecl _wtoi64_l(const wchar_t *_Str,_locale_t _Locale);
_CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
_CRTIMP __int64 __cdecl _wcstoi64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
_CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix);
_CRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale);
#endif
#endif
#ifndef _POSIX_
#ifndef _WSTDLIBP_DEFINED
#define _WSTDLIBP_DEFINED
_CRTIMP wchar_t *__cdecl _wfullpath(wchar_t *_FullPath,const wchar_t *_Path,size_t _SizeInWords);
_CRTIMP void __cdecl _wmakepath(wchar_t *_ResultPath,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext);
#ifndef _CRT_WPERROR_DEFINED
#define _CRT_WPERROR_DEFINED
_CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
#endif
_CRTIMP int __cdecl _wputenv(const wchar_t *_EnvString);
_CRTIMP void __cdecl _wsearchenv(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath);
_CRTIMP void __cdecl _wsplitpath(const wchar_t *_FullPath,wchar_t *_Drive,wchar_t *_Dir,wchar_t *_Filename,wchar_t *_Ext);
#endif
#endif
#ifndef _WSTRING_DEFINED
#define _WSTRING_DEFINED
_CRTIMP wchar_t *__cdecl _wcsdup(const wchar_t *_Str);
wchar_t *__cdecl wcscat(wchar_t *_Dest,const wchar_t *_Source);
_CONST_RETURN wchar_t *__cdecl wcschr(const wchar_t *_Str,wchar_t _Ch);
int __cdecl wcscmp(const wchar_t *_Str1,const wchar_t *_Str2);
wchar_t *__cdecl wcscpy(wchar_t *_Dest,const wchar_t *_Source);
size_t __cdecl wcscspn(const wchar_t *_Str,const wchar_t *_Control);
size_t __cdecl wcslen(const wchar_t *_Str);
size_t __cdecl wcsnlen(const wchar_t *_Src,size_t _MaxCount);
wchar_t *__cdecl wcsncat(wchar_t *_Dest,const wchar_t *_Source,size_t _Count);
int __cdecl wcsncmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
wchar_t *__cdecl wcsncpy(wchar_t *_Dest,const wchar_t *_Source,size_t _Count);
_CONST_RETURN wchar_t *__cdecl wcspbrk(const wchar_t *_Str,const wchar_t *_Control);
_CONST_RETURN wchar_t *__cdecl wcsrchr(const wchar_t *_Str,wchar_t _Ch);
size_t __cdecl wcsspn(const wchar_t *_Str,const wchar_t *_Control);
_CONST_RETURN wchar_t *__cdecl wcsstr(const wchar_t *_Str,const wchar_t *_SubStr);
wchar_t *__cdecl wcstok(wchar_t *_Str,const wchar_t *_Delim);
_CRTIMP wchar_t *__cdecl _wcserror(int _ErrNum);
_CRTIMP wchar_t *__cdecl __wcserror(const wchar_t *_Str);
_CRTIMP int __cdecl _wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
_CRTIMP int __cdecl _wcsicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
_CRTIMP int __cdecl _wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
_CRTIMP int __cdecl _wcsnicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
_CRTIMP wchar_t *__cdecl _wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount);
_CRTIMP wchar_t *__cdecl _wcsrev(wchar_t *_Str);
_CRTIMP wchar_t *__cdecl _wcsset(wchar_t *_Str,wchar_t _Val);
_CRTIMP wchar_t *__cdecl _wcslwr(wchar_t *_String);
_CRTIMP wchar_t *_wcslwr_l(wchar_t *_String,_locale_t _Locale);
_CRTIMP wchar_t *__cdecl _wcsupr(wchar_t *_String);
_CRTIMP wchar_t *_wcsupr_l(wchar_t *_String,_locale_t _Locale);
size_t __cdecl wcsxfrm(wchar_t *_Dst,const wchar_t *_Src,size_t _MaxCount);
_CRTIMP size_t __cdecl _wcsxfrm_l(wchar_t *_Dst,const wchar_t *_Src,size_t _MaxCount,_locale_t _Locale);
int __cdecl wcscoll(const wchar_t *_Str1,const wchar_t *_Str2);
_CRTIMP int __cdecl _wcscoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
_CRTIMP int __cdecl _wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2);
_CRTIMP int __cdecl _wcsicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale);
_CRTIMP int __cdecl _wcsncoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
_CRTIMP int __cdecl _wcsncoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
_CRTIMP int __cdecl _wcsnicoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
_CRTIMP int __cdecl _wcsnicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
#ifndef NO_OLDNAMES
wchar_t *__cdecl wcsdup(const wchar_t *_Str);
#define wcswcs wcsstr
int __cdecl wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
int __cdecl wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
wchar_t *__cdecl wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount);
wchar_t *__cdecl wcsrev(wchar_t *_Str);
wchar_t *__cdecl wcsset(wchar_t *_Str,wchar_t _Val);
wchar_t *__cdecl wcslwr(wchar_t *_Str);
wchar_t *__cdecl wcsupr(wchar_t *_Str);
int __cdecl wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2);
#endif
#endif
#ifndef _TM_DEFINED
#define _TM_DEFINED
struct tm {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
};
#endif
#ifndef _WTIME_DEFINED
#define _WTIME_DEFINED
_CRTIMP wchar_t *__cdecl _wasctime(const struct tm *_Tm);
_CRTIMP wchar_t *__cdecl _wctime32(const __time32_t *_Time);
size_t __cdecl wcsftime(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm);
_CRTIMP size_t __cdecl _wcsftime_l(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm,_locale_t _Locale);
_CRTIMP wchar_t *__cdecl _wstrdate(wchar_t *_Buffer);
_CRTIMP wchar_t *__cdecl _wstrtime(wchar_t *_Buffer);
#if _INTEGRAL_MAX_BITS >= 64
_CRTIMP wchar_t *__cdecl _wctime64(const __time64_t *_Time);
#endif
#if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL)
#define _INC_WTIME_INL
#ifdef _USE_32BIT_TIME_T
__CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime32(_Time); }
#else
__CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime64(_Time); }
#endif
#endif
#endif
typedef int mbstate_t;
typedef wchar_t _Wint_t;
wint_t __cdecl btowc(int);
size_t __cdecl mbrlen(const char *_Ch,size_t _SizeInBytes,mbstate_t *_State);
size_t __cdecl mbrtowc(wchar_t *_DstCh,const char *_SrcCh,size_t _SizeInBytes,mbstate_t *_State);
size_t __cdecl mbsrtowcs(wchar_t *_Dest,const char **_PSrc,size_t _Count,mbstate_t *_State);
size_t __cdecl wcrtomb(char *_Dest,wchar_t _Source,mbstate_t *_State);
size_t __cdecl wcsrtombs(char *_Dest,const wchar_t **_PSource,size_t _Count,mbstate_t *_State);
int __cdecl wctob(wint_t _WCh);
#ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */
wchar_t *__cdecl wmemset(wchar_t *s, wchar_t c, size_t n);
_CONST_RETURN wchar_t *__cdecl wmemchr(const wchar_t *s, wchar_t c, size_t n);
int wmemcmp(const wchar_t *s1, const wchar_t *s2,size_t n);
wchar_t *__cdecl wmemcpy(wchar_t *s1,const wchar_t *s2,size_t n);
wchar_t *__cdecl wmemmove(wchar_t *s1, const wchar_t *s2, size_t n);
long long __cdecl wcstoll(const wchar_t *nptr,wchar_t **endptr, int base);
unsigned long long __cdecl wcstoull(const wchar_t *nptr,wchar_t **endptr, int base);
#endif /* __NO_ISOCEXT */
void *__cdecl memmove(void *_Dst,const void *_Src,size_t _MaxCount);
void *__cdecl memcpy(void *_Dst,const void *_Src,size_t _MaxCount);
__CRT_INLINE int __cdecl fwide(FILE *_F,int _M) { (void)_F; return (_M); }
__CRT_INLINE int __cdecl mbsinit(const mbstate_t *_P) { return (!_P || *_P==0); }
__CRT_INLINE _CONST_RETURN wchar_t *__cdecl wmemchr(const wchar_t *_S,wchar_t _C,size_t _N) { for (;0<_N;++_S,--_N) if (*_S==_C) return (_CONST_RETURN wchar_t *)(_S); return (0); }
__CRT_INLINE int __cdecl wmemcmp(const wchar_t *_S1,const wchar_t *_S2,size_t _N) { for (; 0 < _N; ++_S1,++_S2,--_N) if (*_S1!=*_S2) return (*_S1 < *_S2 ? -1 : +1); return (0); }
__CRT_INLINE wchar_t *__cdecl wmemcpy(wchar_t *_S1,const wchar_t *_S2,size_t _N) { return (wchar_t *)memcpy(_S1,_S2,_N*sizeof(wchar_t)); }
__CRT_INLINE wchar_t *__cdecl wmemmove(wchar_t *_S1,const wchar_t *_S2,size_t _N) { return (wchar_t *)memmove(_S1,_S2,_N*sizeof(wchar_t)); }
__CRT_INLINE wchar_t *__cdecl wmemset(wchar_t *_S,wchar_t _C,size_t _N) {
wchar_t *_Su = _S;
for (;0<_N;++_Su,--_N) {
*_Su = _C;
}
return (_S);
}
#ifdef __cplusplus
}
#endif
#pragma pack(pop)
#include <sec_api/wchar_s.h>
#endif

View file

@ -0,0 +1,172 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _INC_WCTYPE
#define _INC_WCTYPE
#ifndef _WIN32
#error Only Win32 target is supported!
#endif
#include <_mingw.h>
#pragma pack(push,_CRT_PACKING)
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _CRTIMP
#define _CRTIMP __declspec(dllimport)
#endif
#ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
#define _WCHAR_T_DEFINED
#endif
#ifndef _WCTYPE_T_DEFINED
typedef unsigned short wint_t;
typedef unsigned short wctype_t;
#define _WCTYPE_T_DEFINED
#endif
#ifndef WEOF
#define WEOF (wint_t)(0xFFFF)
#endif
#ifndef _CRT_CTYPEDATA_DEFINED
#define _CRT_CTYPEDATA_DEFINED
#ifndef _CTYPE_DISABLE_MACROS
#ifndef __PCTYPE_FUNC
#define __PCTYPE_FUNC __pctype_func()
#ifdef _MSVCRT_
#define __pctype_func() (_pctype)
#else
#define __pctype_func() (*_imp___pctype)
#endif
#endif
#ifndef _pctype
#ifdef _MSVCRT_
extern unsigned short *_pctype;
#else
extern unsigned short **_imp___pctype;
#define _pctype (*_imp___pctype)
#endif
#endif
#endif
#endif
#ifndef _CRT_WCTYPEDATA_DEFINED
#define _CRT_WCTYPEDATA_DEFINED
#ifndef _CTYPE_DISABLE_MACROS
#ifndef _wctype
#ifdef _MSVCRT_
extern unsigned short *_wctype;
#else
extern unsigned short **_imp___wctype;
#define _wctype (*_imp___wctype)
#endif
#endif
#ifndef _pwctype
#ifdef _MSVCRT_
extern unsigned short *_pwctype;
#else
extern unsigned short **_imp___pwctype;
#define _pwctype (*_imp___pwctype)
#define __pwctype_func() (*_imp___pwctype)
#endif
#endif
#endif
#endif
#define _UPPER 0x1
#define _LOWER 0x2
#define _DIGIT 0x4
#define _SPACE 0x8
#define _PUNCT 0x10
#define _CONTROL 0x20
#define _BLANK 0x40
#define _HEX 0x80
#define _LEADBYTE 0x8000
#define _ALPHA (0x0100|_UPPER|_LOWER)
#ifndef _WCTYPE_DEFINED
#define _WCTYPE_DEFINED
int __cdecl iswalpha(wint_t);
int __cdecl iswupper(wint_t);
int __cdecl iswlower(wint_t);
int __cdecl iswdigit(wint_t);
int __cdecl iswxdigit(wint_t);
int __cdecl iswspace(wint_t);
int __cdecl iswpunct(wint_t);
int __cdecl iswalnum(wint_t);
int __cdecl iswprint(wint_t);
int __cdecl iswgraph(wint_t);
int __cdecl iswcntrl(wint_t);
int __cdecl iswascii(wint_t);
int __cdecl isleadbyte(int);
wint_t __cdecl towupper(wint_t);
wint_t __cdecl towlower(wint_t);
int __cdecl iswctype(wint_t,wctype_t);
_CRTIMP int __cdecl __iswcsymf(wint_t);
_CRTIMP int __cdecl __iswcsym(wint_t);
int __cdecl is_wctype(wint_t,wctype_t);
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES)
int __cdecl isblank(int _C);
#endif
#endif
#ifndef _WCTYPE_INLINE_DEFINED
#define _WCTYPE_INLINE_DEFINED
#ifndef __cplusplus
#define iswalpha(_c) (iswctype(_c,_ALPHA))
#define iswupper(_c) (iswctype(_c,_UPPER))
#define iswlower(_c) (iswctype(_c,_LOWER))
#define iswdigit(_c) (iswctype(_c,_DIGIT))
#define iswxdigit(_c) (iswctype(_c,_HEX))
#define iswspace(_c) (iswctype(_c,_SPACE))
#define iswpunct(_c) (iswctype(_c,_PUNCT))
#define iswalnum(_c) (iswctype(_c,_ALPHA|_DIGIT))
#define iswprint(_c) (iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT))
#define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT))
#define iswcntrl(_c) (iswctype(_c,_CONTROL))
#define iswascii(_c) ((unsigned)(_c) < 0x80)
#define isleadbyte(c) (__pctype_func()[(unsigned char)(c)] & _LEADBYTE)
#else
__CRT_INLINE int __cdecl iswalpha(wint_t _C) {return (iswctype(_C,_ALPHA)); }
__CRT_INLINE int __cdecl iswupper(wint_t _C) {return (iswctype(_C,_UPPER)); }
__CRT_INLINE int __cdecl iswlower(wint_t _C) {return (iswctype(_C,_LOWER)); }
__CRT_INLINE int __cdecl iswdigit(wint_t _C) {return (iswctype(_C,_DIGIT)); }
__CRT_INLINE int __cdecl iswxdigit(wint_t _C) {return (iswctype(_C,_HEX)); }
__CRT_INLINE int __cdecl iswspace(wint_t _C) {return (iswctype(_C,_SPACE)); }
__CRT_INLINE int __cdecl iswpunct(wint_t _C) {return (iswctype(_C,_PUNCT)); }
__CRT_INLINE int __cdecl iswalnum(wint_t _C) {return (iswctype(_C,_ALPHA|_DIGIT)); }
__CRT_INLINE int __cdecl iswprint(wint_t _C) {return (iswctype(_C,_BLANK|_PUNCT|_ALPHA|_DIGIT)); }
__CRT_INLINE int __cdecl iswgraph(wint_t _C) {return (iswctype(_C,_PUNCT|_ALPHA|_DIGIT)); }
__CRT_INLINE int __cdecl iswcntrl(wint_t _C) {return (iswctype(_C,_CONTROL)); }
__CRT_INLINE int __cdecl iswascii(wint_t _C) {return ((unsigned)(_C) < 0x80); }
__CRT_INLINE int __cdecl isleadbyte(int _C) {return (__pctype_func()[(unsigned char)(_C)] & _LEADBYTE); }
#endif
#endif
typedef wchar_t wctrans_t;
wint_t __cdecl towctrans(wint_t,wctrans_t);
wctrans_t __cdecl wctrans(const char *);
wctype_t __cdecl wctype(const char *);
#ifdef __cplusplus
}
#endif
#pragma pack(pop)
#endif

View file

@ -0,0 +1,149 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _BASETSD_H_
#define _BASETSD_H_
#if (defined(__x86_64) || defined(__ia64__)) && !defined(RC_INVOKED)
typedef unsigned __int64 POINTER_64_INT;
#else
typedef unsigned long POINTER_64_INT;
#endif
#define POINTER_32
#define POINTER_64
#define FIRMWARE_PTR
#ifdef __cplusplus
extern "C" {
#endif
typedef signed char INT8,*PINT8;
typedef signed short INT16,*PINT16;
typedef signed int INT32,*PINT32;
typedef signed __int64 INT64,*PINT64;
typedef unsigned char UINT8,*PUINT8;
typedef unsigned short UINT16,*PUINT16;
typedef unsigned int UINT32,*PUINT32;
typedef unsigned __int64 UINT64,*PUINT64;
typedef signed int LONG32,*PLONG32;
typedef unsigned int ULONG32,*PULONG32;
typedef unsigned int DWORD32,*PDWORD32;
#ifndef _W64
#define _W64
#endif
#ifdef _WIN64
typedef __int64 INT_PTR,*PINT_PTR;
typedef unsigned __int64 UINT_PTR,*PUINT_PTR;
typedef __int64 LONG_PTR,*PLONG_PTR;
typedef unsigned __int64 ULONG_PTR,*PULONG_PTR;
#define __int3264 __int64
#else
typedef int INT_PTR,*PINT_PTR;
typedef unsigned int UINT_PTR,*PUINT_PTR;
typedef long LONG_PTR,*PLONG_PTR;
typedef unsigned long ULONG_PTR,*PULONG_PTR;
#define __int3264 __int32
#endif
#ifdef _WIN64
#define ADDRESS_TAG_BIT 0x40000000000ULL
typedef __int64 SHANDLE_PTR;
typedef unsigned __int64 HANDLE_PTR;
typedef unsigned int UHALF_PTR,*PUHALF_PTR;
typedef int HALF_PTR,*PHALF_PTR;
static __inline unsigned long HandleToULong(const void *h) { return((unsigned long) (ULONG_PTR) h); }
static __inline long HandleToLong(const void *h) { return((long) (LONG_PTR) h); }
static __inline void *ULongToHandle(const unsigned long h) { return((void *) (UINT_PTR) h); }
static __inline void *LongToHandle(const long h) { return((void *) (INT_PTR) h); }
static __inline unsigned long PtrToUlong(const void *p) { return((unsigned long) (ULONG_PTR) p); }
static __inline unsigned int PtrToUint(const void *p) { return((unsigned int) (UINT_PTR) p); }
static __inline unsigned short PtrToUshort(const void *p) { return((unsigned short) (unsigned long) (ULONG_PTR) p); }
static __inline long PtrToLong(const void *p) { return((long) (LONG_PTR) p); }
static __inline int PtrToInt(const void *p) { return((int) (INT_PTR) p); }
static __inline short PtrToShort(const void *p) { return((short) (long) (LONG_PTR) p); }
static __inline void *IntToPtr(const int i) { return((void *)(INT_PTR)i); }
static __inline void *UIntToPtr(const unsigned int ui) { return((void *)(UINT_PTR)ui); }
static __inline void *LongToPtr(const long l) { return((void *)(LONG_PTR)l); }
static __inline void *ULongToPtr(const unsigned long ul) { return((void *)(ULONG_PTR)ul); }
#define PtrToPtr64(p) ((void *) p)
#define Ptr64ToPtr(p) ((void *) p)
#define HandleToHandle64(h) (PtrToPtr64(h))
#define Handle64ToHandle(h) (Ptr64ToPtr(h))
static __inline void *Ptr32ToPtr(const void *p) { return (void *)p; }
static __inline void *Handle32ToHandle(const void *h) { return((void *) h); }
static __inline void *PtrToPtr32(const void *p) { return((void *) (ULONG_PTR) p); }
#define HandleToHandle32(h) (PtrToPtr32(h))
#else
#define ADDRESS_TAG_BIT 0x80000000UL
typedef unsigned short UHALF_PTR,*PUHALF_PTR;
typedef short HALF_PTR,*PHALF_PTR;
typedef long SHANDLE_PTR;
typedef unsigned long HANDLE_PTR;
#define HandleToULong(h) ((ULONG)(ULONG_PTR)(h))
#define HandleToLong(h) ((LONG)(LONG_PTR) (h))
#define ULongToHandle(ul) ((HANDLE)(ULONG_PTR) (ul))
#define LongToHandle(h) ((HANDLE)(LONG_PTR) (h))
#define PtrToUlong(p) ((ULONG)(ULONG_PTR) (p))
#define PtrToLong(p) ((LONG)(LONG_PTR) (p))
#define PtrToUint(p) ((UINT)(UINT_PTR) (p))
#define PtrToInt(p) ((INT)(INT_PTR) (p))
#define PtrToUshort(p) ((unsigned short)(ULONG_PTR)(p))
#define PtrToShort(p) ((short)(LONG_PTR)(p))
#define IntToPtr(i) ((VOID *)(INT_PTR)((int)i))
#define UIntToPtr(ui) ((VOID *)(UINT_PTR)((unsigned int)ui))
#define LongToPtr(l) ((VOID *)(LONG_PTR)((long)l))
#define ULongToPtr(ul) ((VOID *)(ULONG_PTR)((unsigned long)ul))
static __inline void *PtrToPtr64(const void *p) { return((void *) (ULONG_PTR)p); }
static __inline void *Ptr64ToPtr(const void *p) { return((void *) (ULONG_PTR) p); }
static __inline void *HandleToHandle64(const void *h) { return((void *) h); }
static __inline void *Handle64ToHandle(const void *h) { return((void *) (ULONG_PTR) h); }
#define Ptr32ToPtr(p) ((void *) p)
#define Handle32ToHandle(h) (Ptr32ToPtr(h))
#define PtrToPtr32(p) ((void *) p)
#define HandleToHandle32(h) (PtrToPtr32(h))
#endif
#define HandleToUlong(h) HandleToULong(h)
#define UlongToHandle(ul) ULongToHandle(ul)
#define UlongToPtr(ul) ULongToPtr(ul)
#define UintToPtr(ui) UIntToPtr(ui)
#define MAXUINT_PTR (~((UINT_PTR)0))
#define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
#define MININT_PTR (~MAXINT_PTR)
#define MAXULONG_PTR (~((ULONG_PTR)0))
#define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
#define MINLONG_PTR (~MAXLONG_PTR)
#define MAXUHALF_PTR ((UHALF_PTR)~0)
#define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
#define MINHALF_PTR (~MAXHALF_PTR)
typedef ULONG_PTR SIZE_T,*PSIZE_T;
typedef LONG_PTR SSIZE_T,*PSSIZE_T;
typedef ULONG_PTR DWORD_PTR,*PDWORD_PTR;
typedef __int64 LONG64,*PLONG64;
typedef unsigned __int64 ULONG64,*PULONG64;
typedef unsigned __int64 DWORD64,*PDWORD64;
typedef ULONG_PTR KAFFINITY;
typedef KAFFINITY *PKAFFINITY;
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,85 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#if !defined(_BASETYPS_H_)
#define _BASETYPS_H_
#ifdef __cplusplus
#define EXTERN_C extern "C"
#else
#define EXTERN_C extern
#endif
#define STDMETHODCALLTYPE WINAPI
#define STDMETHODVCALLTYPE __cdecl
#define STDAPICALLTYPE WINAPI
#define STDAPIVCALLTYPE __cdecl
#define STDAPI EXTERN_C HRESULT WINAPI
#define STDAPI_(type) EXTERN_C type WINAPI
#define STDMETHODIMP HRESULT WINAPI
#define STDMETHODIMP_(type) type WINAPI
#define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
#define STDAPIV_(type) EXTERN_C type STDAPIVCALLTYPE
#define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
#define STDMETHODIMPV_(type) type STDMETHODVCALLTYPE
#if defined(__cplusplus) && !defined(CINTERFACE)
#define __STRUCT__ struct
#define STDMETHOD(method) virtual HRESULT WINAPI method
#define STDMETHOD_(type,method) virtual type WINAPI method
#define STDMETHODV(method) virtual HRESULT STDMETHODVCALLTYPE method
#define STDMETHODV_(type,method) virtual type STDMETHODVCALLTYPE method
#define PURE = 0
#define THIS_
#define THIS void
#define DECLARE_INTERFACE(iface) __STRUCT__ iface
#define DECLARE_INTERFACE_(iface,baseiface) __STRUCT__ iface : public baseiface
#else
#ifndef __OBJC__
#define interface struct
#endif
#define STDMETHOD(method) HRESULT (WINAPI *method)
#define STDMETHOD_(type,method) type (WINAPI *method)
#define STDMETHODV(method) HRESULT (STDMETHODVCALLTYPE *method)
#define STDMETHODV_(type,method) type (STDMETHODVCALLTYPE *method)
#define PURE
#define THIS_ INTERFACE *This,
#define THIS INTERFACE *This
#ifdef CONST_VTABLE
#define DECLARE_INTERFACE(iface) typedef struct iface { \
const struct iface##Vtbl *lpVtbl; } iface; \
typedef const struct iface##Vtbl iface##Vtbl; \
const struct iface##Vtbl
#else
#define DECLARE_INTERFACE(iface) typedef struct iface { \
struct iface##Vtbl *lpVtbl; \
} iface; \
typedef struct iface##Vtbl iface##Vtbl; \
struct iface##Vtbl
#endif
#define DECLARE_INTERFACE_(iface,baseiface) DECLARE_INTERFACE(iface)
#endif
#include <guiddef.h>
#ifndef _ERROR_STATUS_T_DEFINED
#define _ERROR_STATUS_T_DEFINED
typedef unsigned long error_status_t;
#endif
#ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
#define _WCHAR_T_DEFINED
#endif
#endif

View file

@ -0,0 +1,156 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef GUID_DEFINED
#define GUID_DEFINED
typedef struct _GUID {
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8 ];
} GUID;
#endif
#ifndef UUID_DEFINED
#define UUID_DEFINED
typedef GUID UUID;
#endif
#ifndef FAR
#define FAR
#endif
#ifndef DECLSPEC_SELECTANY
#define DECLSPEC_SELECTANY __declspec(selectany)
#endif
#ifndef EXTERN_C
#ifdef __cplusplus
#define EXTERN_C extern "C"
#else
#define EXTERN_C extern
#endif
#endif
#ifdef DEFINE_GUID
#undef DEFINE_GUID
#endif
#ifdef INITGUID
#ifdef __cplusplus
#define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) EXTERN_C const GUID DECLSPEC_SELECTANY name = { l,w1,w2,{ b1,b2,b3,b4,b5,b6,b7,b8 } }
#else
#define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID DECLSPEC_SELECTANY name = { l,w1,w2,{ b1,b2,b3,b4,b5,b6,b7,b8 } }
#endif
#else
#define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) EXTERN_C const GUID name
#endif
#define DEFINE_OLEGUID(name,l,w1,w2) DEFINE_GUID(name,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
#ifndef _GUIDDEF_H_
#define _GUIDDEF_H_
#ifndef __LPGUID_DEFINED__
#define __LPGUID_DEFINED__
typedef GUID *LPGUID;
#endif
#ifndef __LPCGUID_DEFINED__
#define __LPCGUID_DEFINED__
typedef const GUID *LPCGUID;
#endif
#ifndef __IID_DEFINED__
#define __IID_DEFINED__
typedef GUID IID;
typedef IID *LPIID;
#define IID_NULL GUID_NULL
#define IsEqualIID(riid1,riid2) IsEqualGUID(riid1,riid2)
typedef GUID CLSID;
typedef CLSID *LPCLSID;
#define CLSID_NULL GUID_NULL
#define IsEqualCLSID(rclsid1,rclsid2) IsEqualGUID(rclsid1,rclsid2)
typedef GUID FMTID;
typedef FMTID *LPFMTID;
#define FMTID_NULL GUID_NULL
#define IsEqualFMTID(rfmtid1,rfmtid2) IsEqualGUID(rfmtid1,rfmtid2)
#ifdef __midl_proxy
#define __MIDL_CONST
#else
#define __MIDL_CONST const
#endif
#ifndef _REFGUID_DEFINED
#define _REFGUID_DEFINED
#ifdef __cplusplus
#define REFGUID const GUID &
#else
#define REFGUID const GUID *__MIDL_CONST
#endif
#endif
#ifndef _REFIID_DEFINED
#define _REFIID_DEFINED
#ifdef __cplusplus
#define REFIID const IID &
#else
#define REFIID const IID *__MIDL_CONST
#endif
#endif
#ifndef _REFCLSID_DEFINED
#define _REFCLSID_DEFINED
#ifdef __cplusplus
#define REFCLSID const IID &
#else
#define REFCLSID const IID *__MIDL_CONST
#endif
#endif
#ifndef _REFFMTID_DEFINED
#define _REFFMTID_DEFINED
#ifdef __cplusplus
#define REFFMTID const IID &
#else
#define REFFMTID const IID *__MIDL_CONST
#endif
#endif
#endif
#ifndef _SYS_GUID_OPERATORS_
#define _SYS_GUID_OPERATORS_
#include <string.h>
#ifdef __cplusplus
__inline int InlineIsEqualGUID(REFGUID rguid1,REFGUID rguid2) {
return (((unsigned long *) &rguid1)[0]==((unsigned long *) &rguid2)[0] && ((unsigned long *) &rguid1)[1]==((unsigned long *) &rguid2)[1] &&
((unsigned long *) &rguid1)[2]==((unsigned long *) &rguid2)[2] && ((unsigned long *) &rguid1)[3]==((unsigned long *) &rguid2)[3]);
}
__inline int IsEqualGUID(REFGUID rguid1,REFGUID rguid2) { return !memcmp(&rguid1,&rguid2,sizeof(GUID)); }
#else
#define InlineIsEqualGUID(rguid1,rguid2) (((unsigned long *) rguid1)[0]==((unsigned long *) rguid2)[0] && ((unsigned long *) rguid1)[1]==((unsigned long *) rguid2)[1] && ((unsigned long *) rguid1)[2]==((unsigned long *) rguid2)[2] && ((unsigned long *) rguid1)[3]==((unsigned long *) rguid2)[3])
#define IsEqualGUID(rguid1,rguid2) (!memcmp(rguid1,rguid2,sizeof(GUID)))
#endif
#ifdef __INLINE_ISEQUAL_GUID
#undef IsEqualGUID
#define IsEqualGUID(rguid1,rguid2) InlineIsEqualGUID(rguid1,rguid2)
#endif
#define IsEqualIID(riid1,riid2) IsEqualGUID(riid1,riid2)
#define IsEqualCLSID(rclsid1,rclsid2) IsEqualGUID(rclsid1,rclsid2)
#if !defined _SYS_GUID_OPERATOR_EQ_ && !defined _NO_SYS_GUID_OPERATOR_EQ_
#define _SYS_GUID_OPERATOR_EQ_
#ifdef __cplusplus
__inline int operator==(REFGUID guidOne,REFGUID guidOther) { return IsEqualGUID(guidOne,guidOther); }
__inline int operator!=(REFGUID guidOne,REFGUID guidOther) { return !(guidOne==guidOther); }
#endif
#endif
#endif
#endif

View file

@ -0,0 +1,8 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#if !(defined(lint) || defined(RC_INVOKED))
#pragma pack(pop)
#endif

View file

@ -0,0 +1,8 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#if !(defined(lint) || defined(RC_INVOKED))
#pragma pack(push,1)
#endif

View file

@ -0,0 +1,8 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#if !(defined(lint) || defined(RC_INVOKED))
#pragma pack(push,2)
#endif

View file

@ -0,0 +1,8 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#if !(defined(lint) || defined(RC_INVOKED))
#pragma pack(push,4)
#endif

View file

@ -0,0 +1,8 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#if !(defined(lint) || defined(RC_INVOKED))
#pragma pack(push,8)
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,301 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _WINCON_
#define _WINCON_
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _COORD {
SHORT X;
SHORT Y;
} COORD,*PCOORD;
typedef struct _SMALL_RECT {
SHORT Left;
SHORT Top;
SHORT Right;
SHORT Bottom;
} SMALL_RECT,*PSMALL_RECT;
typedef struct _KEY_EVENT_RECORD {
WINBOOL bKeyDown;
WORD wRepeatCount;
WORD wVirtualKeyCode;
WORD wVirtualScanCode;
union {
WCHAR UnicodeChar;
CHAR AsciiChar;
} uChar;
DWORD dwControlKeyState;
} KEY_EVENT_RECORD,*PKEY_EVENT_RECORD;
#define RIGHT_ALT_PRESSED 0x1
#define LEFT_ALT_PRESSED 0x2
#define RIGHT_CTRL_PRESSED 0x4
#define LEFT_CTRL_PRESSED 0x8
#define SHIFT_PRESSED 0x10
#define NUMLOCK_ON 0x20
#define SCROLLLOCK_ON 0x40
#define CAPSLOCK_ON 0x80
#define ENHANCED_KEY 0x100
#define NLS_DBCSCHAR 0x10000
#define NLS_ALPHANUMERIC 0x0
#define NLS_KATAKANA 0x20000
#define NLS_HIRAGANA 0x40000
#define NLS_ROMAN 0x400000
#define NLS_IME_CONVERSION 0x800000
#define NLS_IME_DISABLE 0x20000000
typedef struct _MOUSE_EVENT_RECORD {
COORD dwMousePosition;
DWORD dwButtonState;
DWORD dwControlKeyState;
DWORD dwEventFlags;
} MOUSE_EVENT_RECORD,*PMOUSE_EVENT_RECORD;
#define FROM_LEFT_1ST_BUTTON_PRESSED 0x1
#define RIGHTMOST_BUTTON_PRESSED 0x2
#define FROM_LEFT_2ND_BUTTON_PRESSED 0x4
#define FROM_LEFT_3RD_BUTTON_PRESSED 0x8
#define FROM_LEFT_4TH_BUTTON_PRESSED 0x10
#define MOUSE_MOVED 0x1
#define DOUBLE_CLICK 0x2
#define MOUSE_WHEELED 0x4
typedef struct _WINDOW_BUFFER_SIZE_RECORD {
COORD dwSize;
} WINDOW_BUFFER_SIZE_RECORD,*PWINDOW_BUFFER_SIZE_RECORD;
typedef struct _MENU_EVENT_RECORD {
UINT dwCommandId;
} MENU_EVENT_RECORD,*PMENU_EVENT_RECORD;
typedef struct _FOCUS_EVENT_RECORD {
WINBOOL bSetFocus;
} FOCUS_EVENT_RECORD,*PFOCUS_EVENT_RECORD;
typedef struct _INPUT_RECORD {
WORD EventType;
union {
KEY_EVENT_RECORD KeyEvent;
MOUSE_EVENT_RECORD MouseEvent;
WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
MENU_EVENT_RECORD MenuEvent;
FOCUS_EVENT_RECORD FocusEvent;
} Event;
} INPUT_RECORD,*PINPUT_RECORD;
#define KEY_EVENT 0x1
#define MOUSE_EVENT 0x2
#define WINDOW_BUFFER_SIZE_EVENT 0x4
#define MENU_EVENT 0x8
#define FOCUS_EVENT 0x10
typedef struct _CHAR_INFO {
union {
WCHAR UnicodeChar;
CHAR AsciiChar;
} Char;
WORD Attributes;
} CHAR_INFO,*PCHAR_INFO;
#define FOREGROUND_BLUE 0x1
#define FOREGROUND_GREEN 0x2
#define FOREGROUND_RED 0x4
#define FOREGROUND_INTENSITY 0x8
#define BACKGROUND_BLUE 0x10
#define BACKGROUND_GREEN 0x20
#define BACKGROUND_RED 0x40
#define BACKGROUND_INTENSITY 0x80
#define COMMON_LVB_LEADING_BYTE 0x100
#define COMMON_LVB_TRAILING_BYTE 0x200
#define COMMON_LVB_GRID_HORIZONTAL 0x400
#define COMMON_LVB_GRID_LVERTICAL 0x800
#define COMMON_LVB_GRID_RVERTICAL 0x1000
#define COMMON_LVB_REVERSE_VIDEO 0x4000
#define COMMON_LVB_UNDERSCORE 0x8000
#define COMMON_LVB_SBCSDBCS 0x300
typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
COORD dwSize;
COORD dwCursorPosition;
WORD wAttributes;
SMALL_RECT srWindow;
COORD dwMaximumWindowSize;
} CONSOLE_SCREEN_BUFFER_INFO,*PCONSOLE_SCREEN_BUFFER_INFO;
typedef struct _CONSOLE_CURSOR_INFO {
DWORD dwSize;
WINBOOL bVisible;
} CONSOLE_CURSOR_INFO,*PCONSOLE_CURSOR_INFO;
typedef struct _CONSOLE_FONT_INFO {
DWORD nFont;
COORD dwFontSize;
} CONSOLE_FONT_INFO,*PCONSOLE_FONT_INFO;
typedef struct _CONSOLE_SELECTION_INFO {
DWORD dwFlags;
COORD dwSelectionAnchor;
SMALL_RECT srSelection;
} CONSOLE_SELECTION_INFO,*PCONSOLE_SELECTION_INFO;
#define CONSOLE_NO_SELECTION 0x0
#define CONSOLE_SELECTION_IN_PROGRESS 0x1
#define CONSOLE_SELECTION_NOT_EMPTY 0x2
#define CONSOLE_MOUSE_SELECTION 0x4
#define CONSOLE_MOUSE_DOWN 0x8
typedef WINBOOL (WINAPI *PHANDLER_ROUTINE)(DWORD CtrlType);
#define CTRL_C_EVENT 0
#define CTRL_BREAK_EVENT 1
#define CTRL_CLOSE_EVENT 2
#define CTRL_LOGOFF_EVENT 5
#define CTRL_SHUTDOWN_EVENT 6
#define ENABLE_PROCESSED_INPUT 0x1
#define ENABLE_LINE_INPUT 0x2
#define ENABLE_ECHO_INPUT 0x4
#define ENABLE_WINDOW_INPUT 0x8
#define ENABLE_MOUSE_INPUT 0x10
#define ENABLE_PROCESSED_OUTPUT 0x1
#define ENABLE_WRAP_AT_EOL_OUTPUT 0x2
#ifdef UNICODE
#define PeekConsoleInput PeekConsoleInputW
#define ReadConsoleInput ReadConsoleInputW
#define WriteConsoleInput WriteConsoleInputW
#define ReadConsoleOutput ReadConsoleOutputW
#define WriteConsoleOutput WriteConsoleOutputW
#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterW
#define WriteConsoleOutputCharacter WriteConsoleOutputCharacterW
#define FillConsoleOutputCharacter FillConsoleOutputCharacterW
#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferW
#define GetConsoleTitle GetConsoleTitleW
#define SetConsoleTitle SetConsoleTitleW
#define ReadConsole ReadConsoleW
#define WriteConsole WriteConsoleW
#define AddConsoleAlias AddConsoleAliasW
#define GetConsoleAlias GetConsoleAliasW
#define GetConsoleAliasesLength GetConsoleAliasesLengthW
#define GetConsoleAliasExesLength GetConsoleAliasExesLengthW
#define GetConsoleAliases GetConsoleAliasesW
#define GetConsoleAliasExes GetConsoleAliasExesW
#else
#define PeekConsoleInput PeekConsoleInputA
#define ReadConsoleInput ReadConsoleInputA
#define WriteConsoleInput WriteConsoleInputA
#define ReadConsoleOutput ReadConsoleOutputA
#define WriteConsoleOutput WriteConsoleOutputA
#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterA
#define WriteConsoleOutputCharacter WriteConsoleOutputCharacterA
#define FillConsoleOutputCharacter FillConsoleOutputCharacterA
#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferA
#define GetConsoleTitle GetConsoleTitleA
#define SetConsoleTitle SetConsoleTitleA
#define ReadConsole ReadConsoleA
#define WriteConsole WriteConsoleA
#define AddConsoleAlias AddConsoleAliasA
#define GetConsoleAlias GetConsoleAliasA
#define GetConsoleAliasesLength GetConsoleAliasesLengthA
#define GetConsoleAliasExesLength GetConsoleAliasExesLengthA
#define GetConsoleAliases GetConsoleAliasesA
#define GetConsoleAliasExes GetConsoleAliasExesA
#endif
WINBASEAPI WINBOOL WINAPI PeekConsoleInputA(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead);
WINBASEAPI WINBOOL WINAPI PeekConsoleInputW(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead);
WINBASEAPI WINBOOL WINAPI ReadConsoleInputA(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead);
WINBASEAPI WINBOOL WINAPI ReadConsoleInputW(HANDLE hConsoleInput,PINPUT_RECORD lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsRead);
WINBASEAPI WINBOOL WINAPI WriteConsoleInputA(HANDLE hConsoleInput,CONST INPUT_RECORD *lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsWritten);
WINBASEAPI WINBOOL WINAPI WriteConsoleInputW(HANDLE hConsoleInput,CONST INPUT_RECORD *lpBuffer,DWORD nLength,LPDWORD lpNumberOfEventsWritten);
WINBASEAPI WINBOOL WINAPI ReadConsoleOutputA(HANDLE hConsoleOutput,PCHAR_INFO lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpReadRegion);
WINBASEAPI WINBOOL WINAPI ReadConsoleOutputW(HANDLE hConsoleOutput,PCHAR_INFO lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpReadRegion);
WINBASEAPI WINBOOL WINAPI WriteConsoleOutputA(HANDLE hConsoleOutput,CONST CHAR_INFO *lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpWriteRegion);
WINBASEAPI WINBOOL WINAPI WriteConsoleOutputW(HANDLE hConsoleOutput,CONST CHAR_INFO *lpBuffer,COORD dwBufferSize,COORD dwBufferCoord,PSMALL_RECT lpWriteRegion);
WINBASEAPI WINBOOL WINAPI ReadConsoleOutputCharacterA(HANDLE hConsoleOutput,LPSTR lpCharacter,DWORD nLength,COORD dwReadCoord,LPDWORD lpNumberOfCharsRead);
WINBASEAPI WINBOOL WINAPI ReadConsoleOutputCharacterW(HANDLE hConsoleOutput,LPWSTR lpCharacter,DWORD nLength,COORD dwReadCoord,LPDWORD lpNumberOfCharsRead);
WINBASEAPI WINBOOL WINAPI ReadConsoleOutputAttribute(HANDLE hConsoleOutput,LPWORD lpAttribute,DWORD nLength,COORD dwReadCoord,LPDWORD lpNumberOfAttrsRead);
WINBASEAPI WINBOOL WINAPI WriteConsoleOutputCharacterA(HANDLE hConsoleOutput,LPCSTR lpCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten);
WINBASEAPI WINBOOL WINAPI WriteConsoleOutputCharacterW(HANDLE hConsoleOutput,LPCWSTR lpCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten);
WINBASEAPI WINBOOL WINAPI WriteConsoleOutputAttribute(HANDLE hConsoleOutput,CONST WORD *lpAttribute,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfAttrsWritten);
WINBASEAPI WINBOOL WINAPI FillConsoleOutputCharacterA(HANDLE hConsoleOutput,CHAR cCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten);
WINBASEAPI WINBOOL WINAPI FillConsoleOutputCharacterW(HANDLE hConsoleOutput,WCHAR cCharacter,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfCharsWritten);
WINBASEAPI WINBOOL WINAPI FillConsoleOutputAttribute(HANDLE hConsoleOutput,WORD wAttribute,DWORD nLength,COORD dwWriteCoord,LPDWORD lpNumberOfAttrsWritten);
WINBASEAPI WINBOOL WINAPI GetConsoleMode(HANDLE hConsoleHandle,LPDWORD lpMode);
WINBASEAPI WINBOOL WINAPI GetNumberOfConsoleInputEvents(HANDLE hConsoleInput,LPDWORD lpNumberOfEvents);
WINBASEAPI WINBOOL WINAPI GetConsoleScreenBufferInfo(HANDLE hConsoleOutput,PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo);
WINBASEAPI COORD WINAPI GetLargestConsoleWindowSize(HANDLE hConsoleOutput);
WINBASEAPI WINBOOL WINAPI GetConsoleCursorInfo(HANDLE hConsoleOutput,PCONSOLE_CURSOR_INFO lpConsoleCursorInfo);
WINBASEAPI WINBOOL WINAPI GetCurrentConsoleFont(HANDLE hConsoleOutput,WINBOOL bMaximumWindow,PCONSOLE_FONT_INFO lpConsoleCurrentFont);
WINBASEAPI COORD WINAPI GetConsoleFontSize(HANDLE hConsoleOutput,DWORD nFont);
WINBASEAPI WINBOOL WINAPI GetConsoleSelectionInfo(PCONSOLE_SELECTION_INFO lpConsoleSelectionInfo);
WINBASEAPI WINBOOL WINAPI GetNumberOfConsoleMouseButtons(LPDWORD lpNumberOfMouseButtons);
WINBASEAPI WINBOOL WINAPI SetConsoleMode(HANDLE hConsoleHandle,DWORD dwMode);
WINBASEAPI WINBOOL WINAPI SetConsoleActiveScreenBuffer(HANDLE hConsoleOutput);
WINBASEAPI WINBOOL WINAPI FlushConsoleInputBuffer(HANDLE hConsoleInput);
WINBASEAPI WINBOOL WINAPI SetConsoleScreenBufferSize(HANDLE hConsoleOutput,COORD dwSize);
WINBASEAPI WINBOOL WINAPI SetConsoleCursorPosition(HANDLE hConsoleOutput,COORD dwCursorPosition);
WINBASEAPI WINBOOL WINAPI SetConsoleCursorInfo(HANDLE hConsoleOutput,CONST CONSOLE_CURSOR_INFO *lpConsoleCursorInfo);
WINBASEAPI WINBOOL WINAPI ScrollConsoleScreenBufferA(HANDLE hConsoleOutput,CONST SMALL_RECT *lpScrollRectangle,CONST SMALL_RECT *lpClipRectangle,COORD dwDestinationOrigin,CONST CHAR_INFO *lpFill);
WINBASEAPI WINBOOL WINAPI ScrollConsoleScreenBufferW(HANDLE hConsoleOutput,CONST SMALL_RECT *lpScrollRectangle,CONST SMALL_RECT *lpClipRectangle,COORD dwDestinationOrigin,CONST CHAR_INFO *lpFill);
WINBASEAPI WINBOOL WINAPI SetConsoleWindowInfo(HANDLE hConsoleOutput,WINBOOL bAbsolute,CONST SMALL_RECT *lpConsoleWindow);
WINBASEAPI WINBOOL WINAPI SetConsoleTextAttribute(HANDLE hConsoleOutput,WORD wAttributes);
WINBASEAPI WINBOOL WINAPI SetConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine,WINBOOL Add);
WINBASEAPI WINBOOL WINAPI GenerateConsoleCtrlEvent(DWORD dwCtrlEvent,DWORD dwProcessGroupId);
WINBASEAPI WINBOOL WINAPI AllocConsole(VOID);
WINBASEAPI WINBOOL WINAPI FreeConsole(VOID);
WINBASEAPI WINBOOL WINAPI AttachConsole(DWORD dwProcessId);
#define ATTACH_PARENT_PROCESS ((DWORD)-1)
WINBASEAPI DWORD WINAPI GetConsoleTitleA(LPSTR lpConsoleTitle,DWORD nSize);
WINBASEAPI DWORD WINAPI GetConsoleTitleW(LPWSTR lpConsoleTitle,DWORD nSize);
WINBASEAPI WINBOOL WINAPI SetConsoleTitleA(LPCSTR lpConsoleTitle);
WINBASEAPI WINBOOL WINAPI SetConsoleTitleW(LPCWSTR lpConsoleTitle);
WINBASEAPI WINBOOL WINAPI ReadConsoleA(HANDLE hConsoleInput,LPVOID lpBuffer,DWORD nNumberOfCharsToRead,LPDWORD lpNumberOfCharsRead,LPVOID lpReserved);
WINBASEAPI WINBOOL WINAPI ReadConsoleW(HANDLE hConsoleInput,LPVOID lpBuffer,DWORD nNumberOfCharsToRead,LPDWORD lpNumberOfCharsRead,LPVOID lpReserved);
WINBASEAPI WINBOOL WINAPI WriteConsoleA(HANDLE hConsoleOutput,CONST VOID *lpBuffer,DWORD nNumberOfCharsToWrite,LPDWORD lpNumberOfCharsWritten,LPVOID lpReserved);
WINBASEAPI WINBOOL WINAPI WriteConsoleW(HANDLE hConsoleOutput,CONST VOID *lpBuffer,DWORD nNumberOfCharsToWrite,LPDWORD lpNumberOfCharsWritten,LPVOID lpReserved);
#define CONSOLE_TEXTMODE_BUFFER 1
WINBASEAPI HANDLE WINAPI CreateConsoleScreenBuffer(DWORD dwDesiredAccess,DWORD dwShareMode,CONST SECURITY_ATTRIBUTES *lpSecurityAttributes,DWORD dwFlags,LPVOID lpScreenBufferData);
WINBASEAPI UINT WINAPI GetConsoleCP(VOID);
WINBASEAPI WINBOOL WINAPI SetConsoleCP(UINT wCodePageID);
WINBASEAPI UINT WINAPI GetConsoleOutputCP(VOID);
WINBASEAPI WINBOOL WINAPI SetConsoleOutputCP(UINT wCodePageID);
#define CONSOLE_FULLSCREEN 1
#define CONSOLE_FULLSCREEN_HARDWARE 2
WINBASEAPI WINBOOL WINAPI GetConsoleDisplayMode(LPDWORD lpModeFlags);
WINBASEAPI HWND WINAPI GetConsoleWindow(VOID);
WINBASEAPI DWORD WINAPI GetConsoleProcessList(LPDWORD lpdwProcessList,DWORD dwProcessCount);
WINBASEAPI WINBOOL WINAPI AddConsoleAliasA(LPSTR Source,LPSTR Target,LPSTR ExeName);
WINBASEAPI WINBOOL WINAPI AddConsoleAliasW(LPWSTR Source,LPWSTR Target,LPWSTR ExeName);
WINBASEAPI DWORD WINAPI GetConsoleAliasA(LPSTR Source,LPSTR TargetBuffer,DWORD TargetBufferLength,LPSTR ExeName);
WINBASEAPI DWORD WINAPI GetConsoleAliasW(LPWSTR Source,LPWSTR TargetBuffer,DWORD TargetBufferLength,LPWSTR ExeName);
WINBASEAPI DWORD WINAPI GetConsoleAliasesLengthA(LPSTR ExeName);
WINBASEAPI DWORD WINAPI GetConsoleAliasesLengthW(LPWSTR ExeName);
WINBASEAPI DWORD WINAPI GetConsoleAliasExesLengthA(VOID);
WINBASEAPI DWORD WINAPI GetConsoleAliasExesLengthW(VOID);
WINBASEAPI DWORD WINAPI GetConsoleAliasesA(LPSTR AliasBuffer,DWORD AliasBufferLength,LPSTR ExeName);
WINBASEAPI DWORD WINAPI GetConsoleAliasesW(LPWSTR AliasBuffer,DWORD AliasBufferLength,LPWSTR ExeName);
WINBASEAPI DWORD WINAPI GetConsoleAliasExesA(LPSTR ExeNameBuffer,DWORD ExeNameBufferLength);
WINBASEAPI DWORD WINAPI GetConsoleAliasExesW(LPWSTR ExeNameBuffer,DWORD ExeNameBufferLength);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,293 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _WINDEF_
#define _WINDEF_
#ifndef STRICT
#define STRICT 1
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifndef WINVER
#define WINVER 0x0502
#endif
#ifndef BASETYPES
#define BASETYPES
typedef unsigned long ULONG;
typedef ULONG *PULONG;
typedef unsigned short USHORT;
typedef USHORT *PUSHORT;
typedef unsigned char UCHAR;
typedef UCHAR *PUCHAR;
typedef char *PSZ;
#endif
#define MAX_PATH 260
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef IN
#define IN
#endif
#ifndef OUT
#define OUT
#endif
#ifndef OPTIONAL
#define OPTIONAL
#endif
#undef far
#undef near
#undef pascal
#define far
#define near
#define pascal __stdcall
#define cdecl
#ifndef CDECL
#define CDECL
#endif
#ifndef CALLBACK
#define CALLBACK __stdcall
#endif
#ifndef WINAPI
#define WINAPI __stdcall
#endif
#define WINAPIV __cdecl
#define APIENTRY WINAPI
#define APIPRIVATE WINAPI
#define PASCAL WINAPI
#define WINAPI_INLINE WINAPI
#undef FAR
#undef NEAR
#define FAR
#define NEAR
#ifndef CONST
#define CONST const
#endif
typedef unsigned long DWORD;
typedef int WINBOOL;
#define BOOL WINBOOL
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef float FLOAT;
typedef FLOAT *PFLOAT;
typedef WINBOOL *PBOOL;
typedef WINBOOL *LPBOOL;
typedef BYTE *PBYTE;
typedef BYTE *LPBYTE;
typedef int *PINT;
typedef int *LPINT;
typedef WORD *PWORD;
typedef WORD *LPWORD;
typedef long *LPLONG;
typedef DWORD *PDWORD;
typedef DWORD *LPDWORD;
typedef void *LPVOID;
# ifndef _LPCVOID_DEFINED
#define _LPCVOID_DEFINED
typedef CONST void *LPCVOID;
#endif
typedef int INT;
typedef unsigned int UINT;
typedef unsigned int *PUINT;
#ifndef NT_INCLUDED
#include <winnt.h>
#endif
//gr #include <specstrings.h>
typedef UINT_PTR WPARAM;
typedef LONG_PTR LPARAM;
typedef LONG_PTR LRESULT;
#ifndef __cplusplus
#ifndef NOMINMAX
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#endif
#endif
#define MAKEWORD(a,b) ((WORD)(((BYTE)((DWORD_PTR)(a) & 0xff)) | ((WORD)((BYTE)((DWORD_PTR)(b) & 0xff))) << 8))
#define MAKELONG(a,b) ((LONG)(((WORD)((DWORD_PTR)(a) & 0xffff)) | ((DWORD)((WORD)((DWORD_PTR)(b) & 0xffff))) << 16))
#define LOWORD(l) ((WORD)((DWORD_PTR)(l) & 0xffff))
#define HIWORD(l) ((WORD)((DWORD_PTR)(l) >> 16))
#define LOBYTE(w) ((BYTE)((DWORD_PTR)(w) & 0xff))
#define HIBYTE(w) ((BYTE)((DWORD_PTR)(w) >> 8))
#ifndef WIN_INTERNAL
DECLARE_HANDLE (HWND);
DECLARE_HANDLE (HHOOK);
#ifdef WINABLE
DECLARE_HANDLE (HEVENT);
#endif
#endif
typedef WORD ATOM;
typedef HANDLE *SPHANDLE;
typedef HANDLE *LPHANDLE;
typedef HANDLE HGLOBAL;
typedef HANDLE HLOCAL;
typedef HANDLE GLOBALHANDLE;
typedef HANDLE LOCALHANDLE;
#ifdef _WIN64
typedef INT_PTR (WINAPI *FARPROC)();
typedef INT_PTR (WINAPI *NEARPROC)();
typedef INT_PTR (WINAPI *PROC)();
#else
typedef int (WINAPI *FARPROC)();
typedef int (WINAPI *NEARPROC)();
typedef int (WINAPI *PROC)();
#endif
typedef void *HGDIOBJ;
DECLARE_HANDLE(HKEY);
typedef HKEY *PHKEY;
DECLARE_HANDLE(HACCEL);
DECLARE_HANDLE(HBITMAP);
DECLARE_HANDLE(HBRUSH);
DECLARE_HANDLE(HCOLORSPACE);
DECLARE_HANDLE(HDC);
DECLARE_HANDLE(HGLRC);
DECLARE_HANDLE(HDESK);
DECLARE_HANDLE(HENHMETAFILE);
DECLARE_HANDLE(HFONT);
DECLARE_HANDLE(HICON);
DECLARE_HANDLE(HMENU);
DECLARE_HANDLE(HMETAFILE);
DECLARE_HANDLE(HINSTANCE);
typedef HINSTANCE HMODULE;
DECLARE_HANDLE(HPALETTE);
DECLARE_HANDLE(HPEN);
DECLARE_HANDLE(HRGN);
DECLARE_HANDLE(HRSRC);
DECLARE_HANDLE(HSTR);
DECLARE_HANDLE(HTASK);
DECLARE_HANDLE(HWINSTA);
DECLARE_HANDLE(HKL);
DECLARE_HANDLE(HMONITOR);
DECLARE_HANDLE(HWINEVENTHOOK);
DECLARE_HANDLE(HUMPD);
typedef int HFILE;
typedef HICON HCURSOR;
typedef DWORD COLORREF;
typedef DWORD *LPCOLORREF;
#define HFILE_ERROR ((HFILE)-1)
typedef struct tagRECT {
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECT,*PRECT,*NPRECT,*LPRECT;
typedef const RECT *LPCRECT;
typedef struct _RECTL {
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECTL,*PRECTL,*LPRECTL;
typedef const RECTL *LPCRECTL;
typedef struct tagPOINT {
LONG x;
LONG y;
} POINT,*PPOINT,*NPPOINT,*LPPOINT;
typedef struct _POINTL {
LONG x;
LONG y;
} POINTL,*PPOINTL;
typedef struct tagSIZE {
LONG cx;
LONG cy;
} SIZE,*PSIZE,*LPSIZE;
typedef SIZE SIZEL;
typedef SIZE *PSIZEL,*LPSIZEL;
typedef struct tagPOINTS {
SHORT x;
SHORT y;
} POINTS,*PPOINTS,*LPPOINTS;
typedef struct _FILETIME {
DWORD dwLowDateTime;
DWORD dwHighDateTime;
} FILETIME,*PFILETIME,*LPFILETIME;
#define _FILETIME_
#define DM_UPDATE 1
#define DM_COPY 2
#define DM_PROMPT 4
#define DM_MODIFY 8
#define DM_IN_BUFFER DM_MODIFY
#define DM_IN_PROMPT DM_PROMPT
#define DM_OUT_BUFFER DM_COPY
#define DM_OUT_DEFAULT DM_UPDATE
#define DC_FIELDS 1
#define DC_PAPERS 2
#define DC_PAPERSIZE 3
#define DC_MINEXTENT 4
#define DC_MAXEXTENT 5
#define DC_BINS 6
#define DC_DUPLEX 7
#define DC_SIZE 8
#define DC_EXTRA 9
#define DC_VERSION 10
#define DC_DRIVER 11
#define DC_BINNAMES 12
#define DC_ENUMRESOLUTIONS 13
#define DC_FILEDEPENDENCIES 14
#define DC_TRUETYPE 15
#define DC_PAPERNAMES 16
#define DC_ORIENTATION 17
#define DC_COPIES 18
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,127 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _WINDOWS_
#define _WINDOWS_
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
#ifndef WINVER
#define WINVER 0x0502
#endif
#include <_mingw.h>
#ifndef _INC_WINDOWS
#define _INC_WINDOWS
#if defined(RC_INVOKED) && !defined(NOWINRES)
#include <winresrc.h>
#else
#ifdef RC_INVOKED
#define NOATOM
#define NOGDI
#define NOGDICAPMASKS
#define NOMETAFILE
#define NOMINMAX
#define NOMSG
#define NOOPENFILE
#define NORASTEROPS
#define NOSCROLL
#define NOSOUND
#define NOSYSMETRICS
#define NOTEXTMETRIC
#define NOWH
#define NOCOMM
#define NOKANJI
#define NOCRYPT
#define NOMCX
#endif
#if !defined(I_X86_) && !defined(_IA64_) && !defined(_AMD64_) && (defined(_X86_) && !defined(__x86_64))
#define I_X86_
#endif
#if !defined(I_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(__x86_64)
#define _AMD64_
#endif
#if !defined(I_X86_) && !(defined(_X86_) && !defined(__x86_64)) && !defined(_AMD64_) && defined(__ia64__)
#if !defined(_IA64_)
#define _IA64_
#endif
#endif
#ifndef RC_INVOKED
#include <excpt.h>
#include <stdarg.h>
#endif
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
//gr #include <winnls.h>
#include <wincon.h>
#include <winver.h>
#include <winreg.h>
//gr #include <winnetwk.h>
#ifndef WIN32_LEAN_AND_MEAN
#include <cderr.h>
#include <dde.h>
#include <ddeml.h>
#include <dlgs.h>
#include <lzexpand.h>
#include <mmsystem.h>
#include <nb30.h>
#include <rpc.h>
#include <shellapi.h>
#include <winperf.h>
#include <winsock.h>
#ifndef NOCRYPT
#include <wincrypt.h>
#include <winefs.h>
#include <winscard.h>
#endif
#ifndef NOUSER
#ifndef NOGDI
#include <winspool.h>
#ifdef INC_OLE1
#include <ole.h>
#else
#include <ole2.h>
#endif
#include <commdlg.h>
#endif
#endif
#endif
//gr #include <stralign.h>
#ifdef INC_OLE2
#include <ole2.h>
#endif
#ifndef NOSERVICE
#include <winsvc.h>
#endif
#ifndef NOMCX
#include <mcx.h>
#endif
#ifndef NOIME
#include <imm.h>
#endif
#endif
#endif
#endif

File diff suppressed because it is too large Load diff

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,272 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _WINREG_
#define _WINREG_
#ifdef __cplusplus
extern "C" {
#endif
#ifndef WINVER
#define WINVER 0x0502
#endif
#define RRF_RT_REG_NONE 0x00000001
#define RRF_RT_REG_SZ 0x00000002
#define RRF_RT_REG_EXPAND_SZ 0x00000004
#define RRF_RT_REG_BINARY 0x00000008
#define RRF_RT_REG_DWORD 0x00000010
#define RRF_RT_REG_MULTI_SZ 0x00000020
#define RRF_RT_REG_QWORD 0x00000040
#define RRF_RT_DWORD (RRF_RT_REG_BINARY | RRF_RT_REG_DWORD)
#define RRF_RT_QWORD (RRF_RT_REG_BINARY | RRF_RT_REG_QWORD)
#define RRF_RT_ANY 0x0000ffff
#define RRF_NOEXPAND 0x10000000
#define RRF_ZEROONFAILURE 0x20000000
typedef ACCESS_MASK REGSAM;
#define HKEY_CLASSES_ROOT ((HKEY) (ULONG_PTR)((LONG)0x80000000))
#define HKEY_CURRENT_USER ((HKEY) (ULONG_PTR)((LONG)0x80000001))
#define HKEY_LOCAL_MACHINE ((HKEY) (ULONG_PTR)((LONG)0x80000002))
#define HKEY_USERS ((HKEY) (ULONG_PTR)((LONG)0x80000003))
#define HKEY_PERFORMANCE_DATA ((HKEY) (ULONG_PTR)((LONG)0x80000004))
#define HKEY_PERFORMANCE_TEXT ((HKEY) (ULONG_PTR)((LONG)0x80000050))
#define HKEY_PERFORMANCE_NLSTEXT ((HKEY) (ULONG_PTR)((LONG)0x80000060))
#define HKEY_CURRENT_CONFIG ((HKEY) (ULONG_PTR)((LONG)0x80000005))
#define HKEY_DYN_DATA ((HKEY) (ULONG_PTR)((LONG)0x80000006))
#define REG_SECURE_CONNECTION 1
#ifndef _PROVIDER_STRUCTS_DEFINED
#define _PROVIDER_STRUCTS_DEFINED
#define PROVIDER_KEEPS_VALUE_LENGTH 0x1
struct val_context {
int valuelen;
LPVOID value_context;
LPVOID val_buff_ptr;
};
typedef struct val_context *PVALCONTEXT;
typedef struct pvalueA {
LPSTR pv_valuename;
int pv_valuelen;
LPVOID pv_value_context;
DWORD pv_type;
}PVALUEA,*PPVALUEA;
typedef struct pvalueW {
LPWSTR pv_valuename;
int pv_valuelen;
LPVOID pv_value_context;
DWORD pv_type;
}PVALUEW,*PPVALUEW;
#ifdef UNICODE
typedef PVALUEW PVALUE;
typedef PPVALUEW PPVALUE;
#else
typedef PVALUEA PVALUE;
typedef PPVALUEA PPVALUE;
#endif
typedef DWORD __cdecl QUERYHANDLER(LPVOID keycontext,PVALCONTEXT val_list,DWORD num_vals,LPVOID outputbuffer,DWORD *total_outlen,DWORD input_blen);
typedef QUERYHANDLER *PQUERYHANDLER;
typedef struct provider_info {
PQUERYHANDLER pi_R0_1val;
PQUERYHANDLER pi_R0_allvals;
PQUERYHANDLER pi_R3_1val;
PQUERYHANDLER pi_R3_allvals;
DWORD pi_flags;
LPVOID pi_key_context;
} REG_PROVIDER;
typedef struct provider_info *PPROVIDER;
typedef struct value_entA {
LPSTR ve_valuename;
DWORD ve_valuelen;
DWORD_PTR ve_valueptr;
DWORD ve_type;
} VALENTA,*PVALENTA;
typedef struct value_entW {
LPWSTR ve_valuename;
DWORD ve_valuelen;
DWORD_PTR ve_valueptr;
DWORD ve_type;
} VALENTW,*PVALENTW;
#ifdef UNICODE
typedef VALENTW VALENT;
typedef PVALENTW PVALENT;
#else
typedef VALENTA VALENT;
typedef PVALENTA PVALENT;
#endif
#endif
#define WIN31_CLASS NULL
#ifdef UNICODE
#define RegConnectRegistry RegConnectRegistryW
#define RegConnectRegistryEx RegConnectRegistryExW
#define RegCreateKey RegCreateKeyW
#define RegCreateKeyEx RegCreateKeyExW
#define RegDeleteKey RegDeleteKeyW
#define RegDeleteKeyEx RegDeleteKeyExW
#define RegDeleteValue RegDeleteValueW
#define RegEnumKey RegEnumKeyW
#define RegEnumKeyEx RegEnumKeyExW
#define RegEnumValue RegEnumValueW
#define RegLoadKey RegLoadKeyW
#define RegOpenKey RegOpenKeyW
#define RegOpenKeyEx RegOpenKeyExW
#define RegQueryInfoKey RegQueryInfoKeyW
#define RegQueryValue RegQueryValueW
#define RegQueryMultipleValues RegQueryMultipleValuesW
#define RegQueryValueEx RegQueryValueExW
#define RegReplaceKey RegReplaceKeyW
#define RegRestoreKey RegRestoreKeyW
#define RegSaveKey RegSaveKeyW
#define RegSetValue RegSetValueW
#define RegSetValueEx RegSetValueExW
#define RegUnLoadKey RegUnLoadKeyW
#define RegGetValue RegGetValueW
#define InitiateSystemShutdown InitiateSystemShutdownW
#define AbortSystemShutdown AbortSystemShutdownW
#else
#define RegConnectRegistry RegConnectRegistryA
#define RegConnectRegistryEx RegConnectRegistryExA
#define RegCreateKey RegCreateKeyA
#define RegCreateKeyEx RegCreateKeyExA
#define RegDeleteKey RegDeleteKeyA
#define RegDeleteKeyEx RegDeleteKeyExA
#define RegDeleteValue RegDeleteValueA
#define RegEnumKey RegEnumKeyA
#define RegEnumKeyEx RegEnumKeyExA
#define RegEnumValue RegEnumValueA
#define RegLoadKey RegLoadKeyA
#define RegOpenKey RegOpenKeyA
#define RegOpenKeyEx RegOpenKeyExA
#define RegQueryInfoKey RegQueryInfoKeyA
#define RegQueryValue RegQueryValueA
#define RegQueryMultipleValues RegQueryMultipleValuesA
#define RegQueryValueEx RegQueryValueExA
#define RegReplaceKey RegReplaceKeyA
#define RegRestoreKey RegRestoreKeyA
#define RegSaveKey RegSaveKeyA
#define RegSetValue RegSetValueA
#define RegSetValueEx RegSetValueExA
#define RegUnLoadKey RegUnLoadKeyA
#define RegGetValue RegGetValueA
#define InitiateSystemShutdown InitiateSystemShutdownA
#define AbortSystemShutdown AbortSystemShutdownA
#endif
WINADVAPI LONG WINAPI RegCloseKey(HKEY hKey);
WINADVAPI LONG WINAPI RegOverridePredefKey(HKEY hKey,HKEY hNewHKey);
WINADVAPI LONG WINAPI RegOpenUserClassesRoot(HANDLE hToken,DWORD dwOptions,REGSAM samDesired,PHKEY phkResult);
WINADVAPI LONG WINAPI RegOpenCurrentUser(REGSAM samDesired,PHKEY phkResult);
WINADVAPI LONG WINAPI RegDisablePredefinedCache();
WINADVAPI LONG WINAPI RegConnectRegistryA(LPCSTR lpMachineName,HKEY hKey,PHKEY phkResult);
WINADVAPI LONG WINAPI RegConnectRegistryW(LPCWSTR lpMachineName,HKEY hKey,PHKEY phkResult);
WINADVAPI LONG WINAPI RegConnectRegistryExA(LPCSTR lpMachineName,HKEY hKey,ULONG Flags,PHKEY phkResult);
WINADVAPI LONG WINAPI RegConnectRegistryExW(LPCWSTR lpMachineName,HKEY hKey,ULONG Flags,PHKEY phkResult);
WINADVAPI LONG WINAPI RegCreateKeyA(HKEY hKey,LPCSTR lpSubKey,PHKEY phkResult);
WINADVAPI LONG WINAPI RegCreateKeyW(HKEY hKey,LPCWSTR lpSubKey,PHKEY phkResult);
WINADVAPI LONG WINAPI RegCreateKeyExA(HKEY hKey,LPCSTR lpSubKey,DWORD Reserved,LPSTR lpClass,DWORD dwOptions,REGSAM samDesired,LPSECURITY_ATTRIBUTES lpSecurityAttributes,PHKEY phkResult,LPDWORD lpdwDisposition);
WINADVAPI LONG WINAPI RegCreateKeyExW(HKEY hKey,LPCWSTR lpSubKey,DWORD Reserved,LPWSTR lpClass,DWORD dwOptions,REGSAM samDesired,LPSECURITY_ATTRIBUTES lpSecurityAttributes,PHKEY phkResult,LPDWORD lpdwDisposition);
WINADVAPI LONG WINAPI RegDeleteKeyA(HKEY hKey,LPCSTR lpSubKey);
WINADVAPI LONG WINAPI RegDeleteKeyW(HKEY hKey,LPCWSTR lpSubKey);
WINADVAPI LONG WINAPI RegDeleteKeyExA(HKEY hKey,LPCSTR lpSubKey,REGSAM samDesired,DWORD Reserved);
WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY hKey,LPCWSTR lpSubKey,REGSAM samDesired,DWORD Reserved);
WINADVAPI LONG WINAPI RegDisableReflectionKey(HKEY hBase);
WINADVAPI LONG WINAPI RegEnableReflectionKey(HKEY hBase);
WINADVAPI LONG WINAPI RegQueryReflectionKey(HKEY hBase,WINBOOL *bIsReflectionDisabled);
WINADVAPI LONG WINAPI RegDeleteValueA(HKEY hKey,LPCSTR lpValueName);
WINADVAPI LONG WINAPI RegDeleteValueW(HKEY hKey,LPCWSTR lpValueName);
WINADVAPI LONG WINAPI RegEnumKeyA(HKEY hKey,DWORD dwIndex,LPSTR lpName,DWORD cchName);
WINADVAPI LONG WINAPI RegEnumKeyW(HKEY hKey,DWORD dwIndex,LPWSTR lpName,DWORD cchName);
WINADVAPI LONG WINAPI RegEnumKeyExA(HKEY hKey,DWORD dwIndex,LPSTR lpName,LPDWORD lpcchName,LPDWORD lpReserved,LPSTR lpClass,LPDWORD lpcchClass,PFILETIME lpftLastWriteTime);
WINADVAPI LONG WINAPI RegEnumKeyExW(HKEY hKey,DWORD dwIndex,LPWSTR lpName,LPDWORD lpcchName,LPDWORD lpReserved,LPWSTR lpClass,LPDWORD lpcchClass,PFILETIME lpftLastWriteTime);
WINADVAPI LONG WINAPI RegEnumValueA(HKEY hKey,DWORD dwIndex,LPSTR lpValueName,LPDWORD lpcchValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData);
WINADVAPI LONG WINAPI RegEnumValueW(HKEY hKey,DWORD dwIndex,LPWSTR lpValueName,LPDWORD lpcchValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData);
WINADVAPI LONG WINAPI RegFlushKey(HKEY hKey);
WINADVAPI LONG WINAPI RegGetKeySecurity(HKEY hKey,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor,LPDWORD lpcbSecurityDescriptor);
WINADVAPI LONG WINAPI RegLoadKeyA(HKEY hKey,LPCSTR lpSubKey,LPCSTR lpFile);
WINADVAPI LONG WINAPI RegLoadKeyW(HKEY hKey,LPCWSTR lpSubKey,LPCWSTR lpFile);
WINADVAPI LONG WINAPI RegNotifyChangeKeyValue(HKEY hKey,WINBOOL bWatchSubtree,DWORD dwNotifyFilter,HANDLE hEvent,WINBOOL fAsynchronous);
WINADVAPI LONG WINAPI RegOpenKeyA(HKEY hKey,LPCSTR lpSubKey,PHKEY phkResult);
WINADVAPI LONG WINAPI RegOpenKeyW(HKEY hKey,LPCWSTR lpSubKey,PHKEY phkResult);
WINADVAPI LONG WINAPI RegOpenKeyExA(HKEY hKey,LPCSTR lpSubKey,DWORD ulOptions,REGSAM samDesired,PHKEY phkResult);
WINADVAPI LONG WINAPI RegOpenKeyExW(HKEY hKey,LPCWSTR lpSubKey,DWORD ulOptions,REGSAM samDesired,PHKEY phkResult);
WINADVAPI LONG WINAPI RegQueryInfoKeyA(HKEY hKey,LPSTR lpClass,LPDWORD lpcchClass,LPDWORD lpReserved,LPDWORD lpcSubKeys,LPDWORD lpcbMaxSubKeyLen,LPDWORD lpcbMaxClassLen,LPDWORD lpcValues,LPDWORD lpcbMaxValueNameLen,LPDWORD lpcbMaxValueLen,LPDWORD lpcbSecurityDescriptor,PFILETIME lpftLastWriteTime);
WINADVAPI LONG WINAPI RegQueryInfoKeyW(HKEY hKey,LPWSTR lpClass,LPDWORD lpcchClass,LPDWORD lpReserved,LPDWORD lpcSubKeys,LPDWORD lpcbMaxSubKeyLen,LPDWORD lpcbMaxClassLen,LPDWORD lpcValues,LPDWORD lpcbMaxValueNameLen,LPDWORD lpcbMaxValueLen,LPDWORD lpcbSecurityDescriptor,PFILETIME lpftLastWriteTime);
WINADVAPI LONG WINAPI RegQueryValueA(HKEY hKey,LPCSTR lpSubKey,LPSTR lpData,PLONG lpcbData);
WINADVAPI LONG WINAPI RegQueryValueW(HKEY hKey,LPCWSTR lpSubKey,LPWSTR lpData,PLONG lpcbData);
WINADVAPI LONG WINAPI RegQueryMultipleValuesA(HKEY hKey,PVALENTA val_list,DWORD num_vals,LPSTR lpValueBuf,LPDWORD ldwTotsize);
WINADVAPI LONG WINAPI RegQueryMultipleValuesW(HKEY hKey,PVALENTW val_list,DWORD num_vals,LPWSTR lpValueBuf,LPDWORD ldwTotsize);
WINADVAPI LONG WINAPI RegQueryValueExA(HKEY hKey,LPCSTR lpValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData);
WINADVAPI LONG WINAPI RegQueryValueExW(HKEY hKey,LPCWSTR lpValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData);
WINADVAPI LONG WINAPI RegReplaceKeyA(HKEY hKey,LPCSTR lpSubKey,LPCSTR lpNewFile,LPCSTR lpOldFile);
WINADVAPI LONG WINAPI RegReplaceKeyW(HKEY hKey,LPCWSTR lpSubKey,LPCWSTR lpNewFile,LPCWSTR lpOldFile);
WINADVAPI LONG WINAPI RegRestoreKeyA(HKEY hKey,LPCSTR lpFile,DWORD dwFlags);
WINADVAPI LONG WINAPI RegRestoreKeyW(HKEY hKey,LPCWSTR lpFile,DWORD dwFlags);
WINADVAPI LONG WINAPI RegSaveKeyA(HKEY hKey,LPCSTR lpFile,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
WINADVAPI LONG WINAPI RegSaveKeyW(HKEY hKey,LPCWSTR lpFile,LPSECURITY_ATTRIBUTES lpSecurityAttributes);
WINADVAPI LONG WINAPI RegSetKeySecurity(HKEY hKey,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor);
WINADVAPI LONG WINAPI RegSetValueA(HKEY hKey,LPCSTR lpSubKey,DWORD dwType,LPCSTR lpData,DWORD cbData);
WINADVAPI LONG WINAPI RegSetValueW(HKEY hKey,LPCWSTR lpSubKey,DWORD dwType,LPCWSTR lpData,DWORD cbData);
WINADVAPI LONG WINAPI RegSetValueExA(HKEY hKey,LPCSTR lpValueName,DWORD Reserved,DWORD dwType,CONST BYTE *lpData,DWORD cbData);
WINADVAPI LONG WINAPI RegSetValueExW(HKEY hKey,LPCWSTR lpValueName,DWORD Reserved,DWORD dwType,CONST BYTE *lpData,DWORD cbData);
WINADVAPI LONG WINAPI RegUnLoadKeyA(HKEY hKey,LPCSTR lpSubKey);
WINADVAPI LONG WINAPI RegUnLoadKeyW(HKEY hKey,LPCWSTR lpSubKey);
WINADVAPI LONG WINAPI RegGetValueA(HKEY hkey,LPCSTR lpSubKey,LPCSTR lpValue,DWORD dwFlags,LPDWORD pdwType,PVOID pvData,LPDWORD pcbData);
WINADVAPI LONG WINAPI RegGetValueW(HKEY hkey,LPCWSTR lpSubKey,LPCWSTR lpValue,DWORD dwFlags,LPDWORD pdwType,PVOID pvData,LPDWORD pcbData);
WINADVAPI WINBOOL WINAPI InitiateSystemShutdownA(LPSTR lpMachineName,LPSTR lpMessage,DWORD dwTimeout,WINBOOL bForceAppsClosed,WINBOOL bRebootAfterShutdown);
WINADVAPI WINBOOL WINAPI InitiateSystemShutdownW(LPWSTR lpMachineName,LPWSTR lpMessage,DWORD dwTimeout,WINBOOL bForceAppsClosed,WINBOOL bRebootAfterShutdown);
WINADVAPI WINBOOL WINAPI AbortSystemShutdownA(LPSTR lpMachineName);
WINADVAPI WINBOOL WINAPI AbortSystemShutdownW(LPWSTR lpMachineName);
//gr #include <reason.h>
#define REASON_SWINSTALL SHTDN_REASON_MAJOR_SOFTWARE|SHTDN_REASON_MINOR_INSTALLATION
#define REASON_HWINSTALL SHTDN_REASON_MAJOR_HARDWARE|SHTDN_REASON_MINOR_INSTALLATION
#define REASON_SERVICEHANG SHTDN_REASON_MAJOR_SOFTWARE|SHTDN_REASON_MINOR_HUNG
#define REASON_UNSTABLE SHTDN_REASON_MAJOR_SYSTEM|SHTDN_REASON_MINOR_UNSTABLE
#define REASON_SWHWRECONF SHTDN_REASON_MAJOR_SOFTWARE|SHTDN_REASON_MINOR_RECONFIG
#define REASON_OTHER SHTDN_REASON_MAJOR_OTHER|SHTDN_REASON_MINOR_OTHER
#define REASON_UNKNOWN SHTDN_REASON_UNKNOWN
#define REASON_LEGACY_API SHTDN_REASON_LEGACY_API
#define REASON_PLANNED_FLAG SHTDN_REASON_FLAG_PLANNED
#define MAX_SHUTDOWN_TIMEOUT (10*365*24*60*60)
#ifdef UNICODE
#define InitiateSystemShutdownEx InitiateSystemShutdownExW
#define RegSaveKeyEx RegSaveKeyExW
#else
#define InitiateSystemShutdownEx InitiateSystemShutdownExA
#define RegSaveKeyEx RegSaveKeyExA
#endif
WINADVAPI WINBOOL WINAPI InitiateSystemShutdownExA(LPSTR lpMachineName,LPSTR lpMessage,DWORD dwTimeout,WINBOOL bForceAppsClosed,WINBOOL bRebootAfterShutdown,DWORD dwReason);
WINADVAPI WINBOOL WINAPI InitiateSystemShutdownExW(LPWSTR lpMachineName,LPWSTR lpMessage,DWORD dwTimeout,WINBOOL bForceAppsClosed,WINBOOL bRebootAfterShutdown,DWORD dwReason);
WINADVAPI LONG WINAPI RegSaveKeyExA(HKEY hKey,LPCSTR lpFile,LPSECURITY_ATTRIBUTES lpSecurityAttributes,DWORD Flags);
WINADVAPI LONG WINAPI RegSaveKeyExW(HKEY hKey,LPCWSTR lpFile,LPSECURITY_ATTRIBUTES lpSecurityAttributes,DWORD Flags);
WINADVAPI LONG WINAPI Wow64Win32ApiEntry (DWORD dwFuncNumber,DWORD dwFlag,DWORD dwRes);
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,160 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef VER_H
#define VER_H
#ifdef __cplusplus
extern "C" {
#endif
#define VS_FILE_INFO RT_VERSION
#define VS_VERSION_INFO 1
#define VS_USER_DEFINED 100
#define VS_FFI_SIGNATURE 0xFEEF04BDL
#define VS_FFI_STRUCVERSION 0x00010000L
#define VS_FFI_FILEFLAGSMASK 0x0000003FL
#define VS_FF_DEBUG 0x00000001L
#define VS_FF_PRERELEASE 0x00000002L
#define VS_FF_PATCHED 0x00000004L
#define VS_FF_PRIVATEBUILD 0x00000008L
#define VS_FF_INFOINFERRED 0x00000010L
#define VS_FF_SPECIALBUILD 0x00000020L
#define VOS_UNKNOWN 0x00000000L
#define VOS_DOS 0x00010000L
#define VOS_OS216 0x00020000L
#define VOS_OS232 0x00030000L
#define VOS_NT 0x00040000L
#define VOS_WINCE 0x00050000L
#define VOS__BASE 0x00000000L
#define VOS__WINDOWS16 0x00000001L
#define VOS__PM16 0x00000002L
#define VOS__PM32 0x00000003L
#define VOS__WINDOWS32 0x00000004L
#define VOS_DOS_WINDOWS16 0x00010001L
#define VOS_DOS_WINDOWS32 0x00010004L
#define VOS_OS216_PM16 0x00020002L
#define VOS_OS232_PM32 0x00030003L
#define VOS_NT_WINDOWS32 0x00040004L
#define VFT_UNKNOWN 0x00000000L
#define VFT_APP 0x00000001L
#define VFT_DLL 0x00000002L
#define VFT_DRV 0x00000003L
#define VFT_FONT 0x00000004L
#define VFT_VXD 0x00000005L
#define VFT_STATIC_LIB 0x00000007L
#define VFT2_UNKNOWN 0x00000000L
#define VFT2_DRV_PRINTER 0x00000001L
#define VFT2_DRV_KEYBOARD 0x00000002L
#define VFT2_DRV_LANGUAGE 0x00000003L
#define VFT2_DRV_DISPLAY 0x00000004L
#define VFT2_DRV_MOUSE 0x00000005L
#define VFT2_DRV_NETWORK 0x00000006L
#define VFT2_DRV_SYSTEM 0x00000007L
#define VFT2_DRV_INSTALLABLE 0x00000008L
#define VFT2_DRV_SOUND 0x00000009L
#define VFT2_DRV_COMM 0x0000000AL
#define VFT2_DRV_INPUTMETHOD 0x0000000BL
#define VFT2_DRV_VERSIONED_PRINTER 0x0000000CL
#define VFT2_FONT_RASTER 0x00000001L
#define VFT2_FONT_VECTOR 0x00000002L
#define VFT2_FONT_TRUETYPE 0x00000003L
#define VFFF_ISSHAREDFILE 0x0001
#define VFF_CURNEDEST 0x0001
#define VFF_FILEINUSE 0x0002
#define VFF_BUFFTOOSMALL 0x0004
#define VIFF_FORCEINSTALL 0x0001
#define VIFF_DONTDELETEOLD 0x0002
#define VIF_TEMPFILE 0x00000001L
#define VIF_MISMATCH 0x00000002L
#define VIF_SRCOLD 0x00000004L
#define VIF_DIFFLANG 0x00000008L
#define VIF_DIFFCODEPG 0x00000010L
#define VIF_DIFFTYPE 0x00000020L
#define VIF_WRITEPROT 0x00000040L
#define VIF_FILEINUSE 0x00000080L
#define VIF_OUTOFSPACE 0x00000100L
#define VIF_ACCESSVIOLATION 0x00000200L
#define VIF_SHARINGVIOLATION 0x00000400L
#define VIF_CANNOTCREATE 0x00000800L
#define VIF_CANNOTDELETE 0x00001000L
#define VIF_CANNOTRENAME 0x00002000L
#define VIF_CANNOTDELETECUR 0x00004000L
#define VIF_OUTOFMEMORY 0x00008000L
#define VIF_CANNOTREADSRC 0x00010000L
#define VIF_CANNOTREADDST 0x00020000L
#define VIF_BUFFTOOSMALL 0x00040000L
#define VIF_CANNOTLOADLZ32 0x00080000L
#define VIF_CANNOTLOADCABINET 0x00100000L
#ifndef RC_INVOKED
typedef struct tagVS_FIXEDFILEINFO
{
DWORD dwSignature;
DWORD dwStrucVersion;
DWORD dwFileVersionMS;
DWORD dwFileVersionLS;
DWORD dwProductVersionMS;
DWORD dwProductVersionLS;
DWORD dwFileFlagsMask;
DWORD dwFileFlags;
DWORD dwFileOS;
DWORD dwFileType;
DWORD dwFileSubtype;
DWORD dwFileDateMS;
DWORD dwFileDateLS;
} VS_FIXEDFILEINFO;
#ifdef UNICODE
#define VerFindFile VerFindFileW
#define VerInstallFile VerInstallFileW
#define GetFileVersionInfoSize GetFileVersionInfoSizeW
#define GetFileVersionInfo GetFileVersionInfoW
#define VerLanguageName VerLanguageNameW
#define VerQueryValue VerQueryValueW
#else
#define VerFindFile VerFindFileA
#define VerInstallFile VerInstallFileA
#define GetFileVersionInfoSize GetFileVersionInfoSizeA
#define GetFileVersionInfo GetFileVersionInfoA
#define VerLanguageName VerLanguageNameA
#define VerQueryValue VerQueryValueA
#endif
DWORD WINAPI VerFindFileA(DWORD uFlags,LPSTR szFileName,LPSTR szWinDir,LPSTR szAppDir,LPSTR szCurDir,PUINT lpuCurDirLen,LPSTR szDestDir,PUINT lpuDestDirLen);
DWORD WINAPI VerFindFileW(DWORD uFlags,LPWSTR szFileName,LPWSTR szWinDir,LPWSTR szAppDir,LPWSTR szCurDir,PUINT lpuCurDirLen,LPWSTR szDestDir,PUINT lpuDestDirLen);
DWORD WINAPI VerInstallFileA(DWORD uFlags,LPSTR szSrcFileName,LPSTR szDestFileName,LPSTR szSrcDir,LPSTR szDestDir,LPSTR szCurDir,LPSTR szTmpFile,PUINT lpuTmpFileLen);
DWORD WINAPI VerInstallFileW(DWORD uFlags,LPWSTR szSrcFileName,LPWSTR szDestFileName,LPWSTR szSrcDir,LPWSTR szDestDir,LPWSTR szCurDir,LPWSTR szTmpFile,PUINT lpuTmpFileLen);
DWORD WINAPI GetFileVersionInfoSizeA(LPCSTR lptstrFilename,LPDWORD lpdwHandle);
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR lptstrFilename,LPDWORD lpdwHandle);
WINBOOL WINAPI GetFileVersionInfoA(LPCSTR lptstrFilename,DWORD dwHandle,DWORD dwLen,LPVOID lpData);
WINBOOL WINAPI GetFileVersionInfoW(LPCWSTR lptstrFilename,DWORD dwHandle,DWORD dwLen,LPVOID lpData);
DWORD WINAPI VerLanguageNameA(DWORD wLang,LPSTR szLang,DWORD nSize);
DWORD WINAPI VerLanguageNameW(DWORD wLang,LPWSTR szLang,DWORD nSize);
WINBOOL WINAPI VerQueryValueA(const LPVOID pBlock,LPSTR lpSubBlock,LPVOID *lplpBuffer,PUINT puLen);
WINBOOL WINAPI VerQueryValueW(const LPVOID pBlock,LPWSTR lpSubBlock,LPVOID *lplpBuffer,PUINT puLen);
#endif
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,191 @@
/* ---------------------------------------------- */
/* chkstk86.s */
/* ---------------------------------------------- */
#ifndef __x86_64__
/* ---------------------------------------------- */
.globl __chkstk
__chkstk:
xchg (%esp),%ebp /* store ebp, get ret.addr */
push %ebp /* push ret.addr */
lea 4(%esp),%ebp /* setup frame ptr */
push %ecx /* save ecx */
mov %ebp,%ecx
P0:
sub $4096,%ecx
test %eax,(%ecx)
sub $4096,%eax
cmp $4096,%eax
jge P0
sub %eax,%ecx
test %eax,(%ecx)
mov %esp,%eax
mov %ecx,%esp
mov (%eax),%ecx /* restore ecx */
jmp *4(%eax)
/* ---------------------------------------------- */
#else
/* ---------------------------------------------- */
.globl __chkstk
__chkstk:
xchg (%rsp),%rbp /* store ebp, get ret.addr */
push %rbp /* push ret.addr */
lea 8(%rsp),%rbp /* setup frame ptr */
push %rcx /* save ecx */
mov %rbp,%rcx
movslq %eax,%rax
P0:
sub $4096,%rcx
test %rax,(%rcx)
sub $4096,%rax
cmp $4096,%rax
jge P0
sub %rax,%rcx
test %rax,(%rcx)
mov %rsp,%rax
mov %rcx,%rsp
mov (%rax),%rcx /* restore ecx */
jmp *8(%rax)
/* ---------------------------------------------- */
/* setjmp/longjmp support */
.globl tinyc_getbp
tinyc_getbp:
mov %rbp,%rax
ret
/* ---------------------------------------------- */
#endif
/* ---------------------------------------------- */
/* ---------------------------------------------- */
#ifndef __x86_64__
/* ---------------------------------------------- */
/*
int _except_handler3(
PEXCEPTION_RECORD exception_record,
PEXCEPTION_REGISTRATION registration,
PCONTEXT context,
PEXCEPTION_REGISTRATION dispatcher
);
int __cdecl _XcptFilter(
unsigned long xcptnum,
PEXCEPTION_POINTERS pxcptinfoptrs
);
struct _sehrec {
void *esp; // 0
void *exception_pointers; // 1
void *prev; // 2
void *handler; // 3
void *scopetable; // 4
int trylevel; // 5
void *ebp // 6
};
// this is what the assembler code below means:
__try
{
// ...
}
__except (_XcptFilter(GetExceptionCode(), GetExceptionInformation()))
{
exit(GetExceptionCode());
}
*/
.globl _exception_info
_exception_info:
mov 1*4-24(%ebp),%eax
ret
.globl _exception_code
_exception_code:
call _exception_info
mov (%eax),%eax
mov (%eax),%eax
ret
seh_filter:
call _exception_info
push %eax
call _exception_code
push %eax
call _XcptFilter
add $ 8,%esp
ret
seh_except:
mov 0*4-24(%ebp),%esp
call _exception_code
push %eax
call _exit
// msvcrt wants scopetables aligned and in read-only segment (using .text)
.align 4
seh_scopetable:
.long -1
.long seh_filter
.long seh_except
seh_handler:
jmp _except_handler3
.globl ___try__
___try__:
.globl __try__
__try__:
push %ebp
mov 8(%esp),%ebp
// void *esp;
lea 12(%esp),%eax
mov %eax,0*4(%ebp)
// void *exception_pointers;
xor %eax,%eax
mov %eax,1*4(%ebp)
// void *prev;
mov %fs:0,%eax
mov %eax,2*4(%ebp)
// void *handler;
mov $ seh_handler,%eax
mov %eax,3*4(%ebp)
// void *scopetable;
mov $ seh_scopetable,%eax
mov %eax,4*4(%ebp)
// int trylevel;
xor %eax,%eax
mov %eax,5*4(%ebp)
// register new SEH
lea 2*4(%ebp),%eax
mov %eax,%fs:0
pop %ebp
ret
/* ---------------------------------------------- */
#else
/* ---------------------------------------------- */
/* SEH on x86-64 not implemented */
/* ---------------------------------------------- */
#endif
/* ---------------------------------------------- */

View file

@ -0,0 +1,79 @@
// =============================================
// crt1.c
// _UNICODE for tchar.h, UNICODE for API
#include <tchar.h>
#include <stdio.h>
#include <stdlib.h>
#define _UNKNOWN_APP 0
#define _CONSOLE_APP 1
#define _GUI_APP 2
#define _MCW_PC 0x00030000 // Precision Control
#define _PC_24 0x00020000 // 24 bits
#define _PC_53 0x00010000 // 53 bits
#define _PC_64 0x00000000 // 64 bits
#ifdef _UNICODE
#define __tgetmainargs __wgetmainargs
#define _tstart _wstart
#define _tmain wmain
#define _runtmain _runwmain
#else
#define __tgetmainargs __getmainargs
#define _tstart _start
#define _tmain main
#define _runtmain _runmain
#endif
typedef struct { int newmode; } _startupinfo;
int __cdecl __tgetmainargs(int *pargc, _TCHAR ***pargv, _TCHAR ***penv, int globb, _startupinfo*);
void __cdecl __set_app_type(int apptype);
unsigned int __cdecl _controlfp(unsigned int new_value, unsigned int mask);
extern int _tmain(int argc, _TCHAR * argv[], _TCHAR * env[]);
/* Allow command-line globbing with "int _dowildcard = 1;" in the user source */
int _dowildcard;
void _tstart(void)
{
__TRY__
_startupinfo start_info = {0};
// Sets the current application type
__set_app_type(_CONSOLE_APP);
// Set default FP precision to 53 bits (8-byte double)
// _MCW_PC (Precision control) is not supported on ARM
#if defined __i386__ || defined __x86_64__
_controlfp(_PC_53, _MCW_PC);
#endif
__tgetmainargs( &__argc, &__targv, &_tenviron, _dowildcard, &start_info);
exit(_tmain(__argc, __targv, _tenviron));
}
int _runtmain(int argc, /* as tcc passed in */ char **argv)
{
#ifdef UNICODE
_startupinfo start_info = {0};
__tgetmainargs(&__argc, &__targv, &_tenviron, _dowildcard, &start_info);
/* may be wrong when tcc has received wildcards (*.c) */
if (argc < __argc) {
__targv += __argc - argc;
__argc = argc;
}
#else
__argc = argc;
__targv = argv;
#endif
#if defined __i386__ || defined __x86_64__
_controlfp(_PC_53, _MCW_PC);
#endif
return _tmain(__argc, __targv, _tenviron);
}
// =============================================

View file

@ -0,0 +1,3 @@
#define _UNICODE 1
#define UNICODE 1
#include "crt1.c"

View file

@ -0,0 +1,13 @@
//+---------------------------------------------------------------------------
#include <windows.h>
BOOL WINAPI DllMain (HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved);
BOOL WINAPI _dllstart(HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved)
{
BOOL bRet;
bRet = DllMain (hDll, dwReason, lpReserved);
return bRet;
}

View file

@ -0,0 +1,9 @@
//+---------------------------------------------------------------------------
#include <windows.h>
BOOL WINAPI DllMain (HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved)
{
return TRUE;
}

View file

@ -0,0 +1,337 @@
LIBRARY gdi32.dll
EXPORTS
AbortDoc
AbortPath
AddFontResourceA
AddFontResourceW
AngleArc
AnimatePalette
Arc
ArcTo
BeginPath
BitBlt
ByeByeGDI
CancelDC
CheckColorsInGamut
ChoosePixelFormat
Chord
CloseEnhMetaFile
CloseFigure
CloseMetaFile
ColorCorrectPalette
ColorMatchToTarget
CombineRgn
CombineTransform
CopyEnhMetaFileA
CopyEnhMetaFileW
CopyMetaFileA
CopyMetaFileW
CreateBitmap
CreateBitmapIndirect
CreateBrushIndirect
CreateColorSpaceA
CreateColorSpaceW
CreateCompatibleBitmap
CreateCompatibleDC
CreateDCA
CreateDCW
CreateDIBPatternBrush
CreateDIBPatternBrushPt
CreateDIBSection
CreateDIBitmap
CreateDiscardableBitmap
CreateEllipticRgn
CreateEllipticRgnIndirect
CreateEnhMetaFileA
CreateEnhMetaFileW
CreateFontA
CreateFontIndirectA
CreateFontIndirectW
CreateFontW
CreateHalftonePalette
CreateHatchBrush
CreateICA
CreateICW
CreateMetaFileA
CreateMetaFileW
CreatePalette
CreatePatternBrush
CreatePen
CreatePenIndirect
CreatePolyPolygonRgn
CreatePolygonRgn
CreateRectRgn
CreateRectRgnIndirect
CreateRoundRectRgn
CreateScalableFontResourceA
CreateScalableFontResourceW
CreateSolidBrush
DPtoLP
DeleteColorSpace
DeleteDC
DeleteEnhMetaFile
DeleteMetaFile
DeleteObject
DescribePixelFormat
DeviceCapabilitiesEx
DeviceCapabilitiesExA
DeviceCapabilitiesExW
DrawEscape
Ellipse
EnableEUDC
EndDoc
EndPage
EndPath
EnumEnhMetaFile
EnumFontFamiliesA
EnumFontFamiliesExA
EnumFontFamiliesExW
EnumFontFamiliesW
EnumFontsA
EnumFontsW
EnumICMProfilesA
EnumICMProfilesW
EnumMetaFile
EnumObjects
EqualRgn
Escape
ExcludeClipRect
ExtCreatePen
ExtCreateRegion
ExtEscape
ExtFloodFill
ExtSelectClipRgn
ExtTextOutA
ExtTextOutW
FillPath
FillRgn
FixBrushOrgEx
FlattenPath
FloodFill
FrameRgn
GdiComment
GdiFlush
GdiGetBatchLimit
GdiPlayDCScript
GdiPlayJournal
GdiPlayScript
GdiSetBatchLimit
GetArcDirection
GetAspectRatioFilterEx
GetBitmapBits
GetBitmapDimensionEx
GetBkColor
GetBkMode
GetBoundsRect
GetBrushOrgEx
GetCharABCWidthsA
GetCharABCWidthsFloatA
GetCharABCWidthsFloatW
GetCharABCWidthsW
GetCharWidth32A
GetCharWidth32W
GetCharWidthA
GetCharWidthFloatA
GetCharWidthFloatW
GetCharWidthW
GetCharacterPlacementA
GetCharacterPlacementW
GetClipBox
GetClipRgn
GetColorAdjustment
GetColorSpace
GetCurrentObject
GetCurrentPositionEx
GetDCOrgEx
GetDIBColorTable
GetDIBits
GetDeviceCaps
GetDeviceGammaRamp
GetEnhMetaFileA
GetEnhMetaFileBits
GetEnhMetaFileDescriptionA
GetEnhMetaFileDescriptionW
GetEnhMetaFileHeader
GetEnhMetaFilePaletteEntries
GetEnhMetaFileW
GetFontData
GetFontLanguageInfo
GetFontResourceInfo
GetGlyphOutline
GetGlyphOutlineA
GetGlyphOutlineW
GetGraphicsMode
GetICMProfileA
GetICMProfileW
GetKerningPairs
GetKerningPairsA
GetKerningPairsW
GetLayout
GetLogColorSpaceA
GetLogColorSpaceW
GetMapMode
GetMetaFileA
GetMetaFileBitsEx
GetMetaFileW
GetMetaRgn
GetMiterLimit
GetNearestColor
GetNearestPaletteIndex
GetObjectA
GetObjectType
GetObjectW
GetOutlineTextMetricsA
GetOutlineTextMetricsW
GetPaletteEntries
GetPath
GetPixel
GetPixelFormat
GetPolyFillMode
GetROP2
GetRandomRgn
GetRasterizerCaps
GetRegionData
GetRgnBox
GetStockObject
GetStretchBltMode
GetSystemPaletteEntries
GetSystemPaletteUse
GetTextAlign
GetTextCharacterExtra
GetTextCharset
GetTextCharsetInfo
GetTextColor
GetTextExtentExPointA
GetTextExtentExPointW
GetTextExtentPoint32A
GetTextExtentPoint32W
GetTextExtentPointA
GetTextExtentPointW
GetTextFaceA
GetTextFaceW
GetTextMetricsA
GetTextMetricsW
GetViewportExtEx
GetViewportOrgEx
GetWinMetaFileBits
GetWindowExtEx
GetWindowOrgEx
GetWorldTransform
IntersectClipRect
InvertRgn
LPtoDP
LineDDA
LineTo
MaskBlt
ModifyWorldTransform
MoveToEx
OffsetClipRgn
OffsetRgn
OffsetViewportOrgEx
OffsetWindowOrgEx
PaintRgn
PatBlt
PathToRegion
Pie
PlayEnhMetaFile
PlayEnhMetaFileRecord
PlayMetaFile
PlayMetaFileRecord
PlgBlt
PolyBezier
PolyBezierTo
PolyDraw
PolyPolygon
PolyPolyline
PolyTextOutA
PolyTextOutW
Polygon
Polyline
PolylineTo
PtInRegion
PtVisible
RealizePalette
RectInRegion
RectVisible
Rectangle
RemoveFontResourceA
RemoveFontResourceW
ResetDCA
ResetDCW
ResizePalette
RestoreDC
RoundRect
SaveDC
ScaleViewportExtEx
ScaleWindowExtEx
SelectClipPath
SelectClipRgn
SelectObject
SelectPalette
SetAbortProc
SetArcDirection
SetBitmapBits
SetBitmapDimensionEx
SetBkColor
SetBkMode
SetBoundsRect
SetBrushOrgEx
SetColorAdjustment
SetColorSpace
SetDIBColorTable
SetDIBits
SetDIBitsToDevice
SetDeviceGammaRamp
SetEnhMetaFileBits
SetFontEnumeration
SetGraphicsMode
SetICMMode
SetICMProfileA
SetICMProfileW
SetLayout
SetMagicColors
SetMapMode
SetMapperFlags
SetMetaFileBitsEx
SetMetaRgn
SetMiterLimit
SetObjectOwner
SetPaletteEntries
SetPixel
SetPixelFormat
SetPixelV
SetPolyFillMode
SetROP2
SetRectRgn
SetStretchBltMode
SetSystemPaletteUse
SetTextAlign
SetTextCharacterExtra
SetTextColor
SetTextJustification
SetViewportExtEx
SetViewportOrgEx
SetWinMetaFileBits
SetWindowExtEx
SetWindowOrgEx
SetWorldTransform
StartDocA
StartDocW
StartPage
StretchBlt
StretchDIBits
StrokeAndFillPath
StrokePath
SwapBuffers
TextOutA
TextOutW
TranslateCharsetInfo
UnrealizeObject
UpdateColors
UpdateICMRegKeyA
UpdateICMRegKeyW
WidenPath
gdiPlaySpoolStream
pfnRealizePalette
pfnSelectPalette

View file

@ -0,0 +1,770 @@
LIBRARY kernel32.dll
EXPORTS
AddAtomA
AddAtomW
AllocConsole
AllocLSCallback
AllocSLCallback
AreFileApisANSI
BackupRead
BackupSeek
BackupWrite
Beep
BeginUpdateResourceA
BeginUpdateResourceW
BuildCommDCBA
BuildCommDCBAndTimeoutsA
BuildCommDCBAndTimeoutsW
BuildCommDCBW
CallNamedPipeA
CallNamedPipeW
Callback12
Callback16
Callback20
Callback24
Callback28
Callback32
Callback36
Callback4
Callback40
Callback44
Callback48
Callback52
Callback56
Callback60
Callback64
Callback8
CancelDeviceWakeupRequest
CancelIo
CancelWaitableTimer
ClearCommBreak
ClearCommError
CloseHandle
CloseProfileUserMapping
CloseSystemHandle
CommConfigDialogA
CommConfigDialogW
CompareFileTime
CompareStringA
CompareStringW
ConnectNamedPipe
ContinueDebugEvent
ConvertDefaultLocale
ConvertThreadToFiber
ConvertToGlobalHandle
CopyFileA
CopyFileExA
CopyFileExW
CopyFileW
CreateConsoleScreenBuffer
CreateDirectoryA
CreateDirectoryExA
CreateDirectoryExW
CreateDirectoryW
CreateEventA
CreateEventW
CreateFiber
CreateFileA
CreateFileMappingA
CreateFileMappingW
CreateFileW
CreateIoCompletionPort
CreateKernelThread
CreateMailslotA
CreateMailslotW
CreateMutexA
CreateMutexW
CreateNamedPipeA
CreateNamedPipeW
CreatePipe
CreateProcessA
CreateProcessW
CreateRemoteThread
CreateSemaphoreA
CreateSemaphoreW
CreateSocketHandle
CreateTapePartition
CreateThread
CreateToolhelp32Snapshot
CreateWaitableTimerA
CreateWaitableTimerW
DebugActiveProcess
DebugBreak
DefineDosDeviceA
DefineDosDeviceW
DeleteAtom
DeleteCriticalSection
DeleteFiber
DeleteFileA
DeleteFileW
DeviceIoControl
DisableThreadLibraryCalls
DisconnectNamedPipe
DosDateTimeToFileTime
DuplicateHandle
EndUpdateResourceA
EndUpdateResourceW
EnterCriticalSection
EnumCalendarInfoA
EnumCalendarInfoExA
EnumCalendarInfoExW
EnumCalendarInfoW
EnumDateFormatsA
EnumDateFormatsExA
EnumDateFormatsExW
EnumDateFormatsW
EnumLanguageGroupLocalesA
EnumLanguageGroupLocalesW
EnumResourceLanguagesA
EnumResourceLanguagesW
EnumResourceNamesA
EnumResourceNamesW
EnumResourceTypesA
EnumResourceTypesW
EnumSystemCodePagesA
EnumSystemCodePagesW
EnumSystemGeoID
EnumSystemLanguageGroupsA
EnumSystemLanguageGroupsW
EnumSystemLocalesA
EnumSystemLocalesW
EnumTimeFormatsA
EnumTimeFormatsW
EnumUILanguagesA
EnumUILanguagesW
EraseTape
EscapeCommFunction
ExitProcess
ExitThread
ExpandEnvironmentStringsA
ExpandEnvironmentStringsW
FT_Exit0
FT_Exit12
FT_Exit16
FT_Exit20
FT_Exit24
FT_Exit28
FT_Exit32
FT_Exit36
FT_Exit4
FT_Exit40
FT_Exit44
FT_Exit48
FT_Exit52
FT_Exit56
FT_Exit8
FT_Prolog
FT_Thunk
FatalAppExitA
FatalAppExitW
FatalExit
FileTimeToDosDateTime
FileTimeToLocalFileTime
FileTimeToSystemTime
FillConsoleOutputAttribute
FillConsoleOutputCharacterA
FillConsoleOutputCharacterW
FindAtomA
FindAtomW
FindClose
FindCloseChangeNotification
FindFirstChangeNotificationA
FindFirstChangeNotificationW
FindFirstFileA
FindFirstFileExA
FindFirstFileExW
FindFirstFileW
FindNextChangeNotification
FindNextFileA
FindNextFileW
FindResourceA
FindResourceExA
FindResourceExW
FindResourceW
FlushConsoleInputBuffer
FlushFileBuffers
FlushInstructionCache
FlushViewOfFile
FoldStringA
FoldStringW
FormatMessageA
FormatMessageW
FreeConsole
FreeEnvironmentStringsA
FreeEnvironmentStringsW
FreeLSCallback
FreeLibrary
FreeLibraryAndExitThread
FreeResource
FreeSLCallback
GenerateConsoleCtrlEvent
GetACP
GetAtomNameA
GetAtomNameW
GetBinaryType
GetBinaryTypeA
GetBinaryTypeW
GetCPInfo
GetCPInfoExA
GetCPInfoExW
GetCalendarInfoA
GetCalendarInfoW
GetCommConfig
GetCommMask
GetCommModemStatus
GetCommProperties
GetCommState
GetCommTimeouts
GetCommandLineA
GetCommandLineW
GetCompressedFileSizeA
GetCompressedFileSizeW
GetComputerNameA
GetComputerNameW
GetConsoleCP
GetConsoleCursorInfo
GetConsoleMode
GetConsoleOutputCP
GetConsoleScreenBufferInfo
GetConsoleTitleA
GetConsoleTitleW
GetCurrencyFormatA
GetCurrencyFormatW
GetCurrentDirectoryA
GetCurrentDirectoryW
GetCurrentProcess
GetCurrentProcessId
GetCurrentThread
GetCurrentThreadId
GetDateFormatA
GetDateFormatW
GetDaylightFlag
GetDefaultCommConfigA
GetDefaultCommConfigW
GetDevicePowerState
GetDiskFreeSpaceA
GetDiskFreeSpaceExA
GetDiskFreeSpaceExW
GetDiskFreeSpaceW
GetDriveTypeA
GetDriveTypeW
GetEnvironmentStrings
GetEnvironmentStringsA
GetEnvironmentStringsW
GetEnvironmentVariableA
GetEnvironmentVariableW
GetErrorMode
GetExitCodeProcess
GetExitCodeThread
GetFileAttributesA
GetFileAttributesExA
GetFileAttributesExW
GetFileAttributesW
GetFileInformationByHandle
GetFileSize
GetFileTime
GetFileType
GetFullPathNameA
GetFullPathNameW
GetGeoInfoA
GetGeoInfoW
GetHandleContext
GetHandleInformation
GetLSCallbackTarget
GetLSCallbackTemplate
GetLargestConsoleWindowSize
GetLastError
GetLocalTime
GetLocaleInfoA
GetLocaleInfoW
GetLogicalDriveStringsA
GetLogicalDriveStringsW
GetLogicalDrives
GetLongPathNameA
GetLongPathNameW
GetMailslotInfo
GetModuleFileNameA
GetModuleFileNameW
GetModuleHandleA
GetModuleHandleW
GetModuleHandleExA
GetModuleHandleExW
GetNamedPipeHandleStateA
GetNamedPipeHandleStateW
GetNamedPipeInfo
GetNumberFormatA
GetNumberFormatW
GetNumberOfConsoleInputEvents
GetNumberOfConsoleMouseButtons
GetOEMCP
GetOverlappedResult
GetPriorityClass
GetPrivateProfileIntA
GetPrivateProfileIntW
GetPrivateProfileSectionA
GetPrivateProfileSectionNamesA
GetPrivateProfileSectionNamesW
GetPrivateProfileSectionW
GetPrivateProfileStringA
GetPrivateProfileStringW
GetPrivateProfileStructA
GetPrivateProfileStructW
GetProcAddress
GetProcessAffinityMask
GetProcessFlags
GetProcessHeap
GetProcessHeaps
GetProcessPriorityBoost
GetProcessShutdownParameters
GetProcessTimes
GetProcessVersion
GetProcessWorkingSetSize
GetProductName
GetProfileIntA
GetProfileIntW
GetProfileSectionA
GetProfileSectionW
GetProfileStringA
GetProfileStringW
GetQueuedCompletionStatus
GetSLCallbackTarget
GetSLCallbackTemplate
GetShortPathNameA
GetShortPathNameW
GetStartupInfoA
GetStartupInfoW
GetStdHandle
GetStringTypeA
GetStringTypeExA
GetStringTypeExW
GetStringTypeW
GetSystemDefaultLCID
GetSystemDefaultLangID
GetSystemDefaultUILanguage
GetSystemDirectoryA
GetSystemDirectoryW
GetSystemInfo
GetSystemPowerStatus
GetSystemTime
GetSystemTimeAdjustment
GetSystemTimeAsFileTime
GetTapeParameters
GetTapePosition
GetTapeStatus
GetTempFileNameA
GetTempFileNameW
GetTempPathA
GetTempPathW
GetThreadContext
GetThreadLocale
GetThreadPriority
GetThreadPriorityBoost
GetThreadSelectorEntry
GetThreadTimes
GetTickCount
GetTimeFormatA
GetTimeFormatW
GetTimeZoneInformation
GetUserDefaultLCID
GetUserDefaultLangID
GetUserDefaultUILanguage
GetUserGeoID
GetVersion
GetVersionExA
GetVersionExW
GetVolumeInformationA
GetVolumeInformationW
GetWindowsDirectoryA
GetWindowsDirectoryW
GetWriteWatch
GlobalAddAtomA
GlobalAddAtomW
GlobalAlloc
GlobalCompact
GlobalDeleteAtom
GlobalFindAtomA
GlobalFindAtomW
GlobalFix
GlobalFlags
GlobalFree
GlobalGetAtomNameA
GlobalGetAtomNameW
GlobalHandle
GlobalLock
GlobalMemoryStatus
GlobalReAlloc
GlobalSize
GlobalUnWire
GlobalUnfix
GlobalUnlock
GlobalWire
Heap32First
Heap32ListFirst
Heap32ListNext
Heap32Next
HeapAlloc
HeapCompact
HeapCreate
HeapDestroy
HeapFree
HeapLock
HeapReAlloc
HeapSetFlags
HeapSize
HeapUnlock
HeapValidate
HeapWalk
InitAtomTable
InitializeCriticalSection
InitializeCriticalSectionAndSpinCount
InterlockedCompareExchange
InterlockedDecrement
InterlockedExchange
InterlockedExchangeAdd
InterlockedIncrement
InvalidateNLSCache
IsBadCodePtr
IsBadHugeReadPtr
IsBadHugeWritePtr
IsBadReadPtr
IsBadStringPtrA
IsBadStringPtrW
IsBadWritePtr
IsDBCSLeadByte
IsDBCSLeadByteEx
IsDebuggerPresent
IsLSCallback
IsProcessorFeaturePresent
IsSLCallback
IsSystemResumeAutomatic
IsValidCodePage
IsValidLanguageGroup
IsValidLocale
K32Thk1632Epilog
K32Thk1632Prolog
K32_NtCreateFile
K32_RtlNtStatusToDosError
LCMapStringA
LCMapStringW
LeaveCriticalSection
LoadLibraryA
LoadLibraryExA
LoadLibraryExW
LoadLibraryW
LoadModule
LoadResource
LocalAlloc
LocalCompact
LocalFileTimeToFileTime
LocalFlags
LocalFree
LocalHandle
LocalLock
LocalReAlloc
LocalShrink
LocalSize
LocalUnlock
LockFile
LockFileEx
LockResource
MakeCriticalSectionGlobal
MapHInstLS
MapHInstLS_PN
MapHInstSL
MapHInstSL_PN
MapHModuleLS
MapHModuleSL
MapLS
MapSL
MapSLFix
MapViewOfFile
MapViewOfFileEx
Module32First
Module32Next
MoveFileA
MoveFileExA
MoveFileExW
MoveFileW
MulDiv
MultiByteToWideChar
NotifyNLSUserCache
OpenEventA
OpenEventW
OpenFile
OpenFileMappingA
OpenFileMappingW
OpenMutexA
OpenMutexW
OpenProcess
OpenProfileUserMapping
OpenSemaphoreA
OpenSemaphoreW
OpenThread
OpenVxDHandle
OpenWaitableTimerA
OpenWaitableTimerW
OutputDebugStringA
OutputDebugStringW
PeekConsoleInputA
PeekConsoleInputW
PeekNamedPipe
PostQueuedCompletionStatus
PrepareTape
Process32First
Process32Next
PulseEvent
PurgeComm
QT_Thunk
QueryDosDeviceA
QueryDosDeviceW
QueryNumberOfEventLogRecords
QueryOldestEventLogRecord
QueryPerformanceCounter
QueryPerformanceFrequency
QueueUserAPC
RaiseException
ReadConsoleA
ReadConsoleInputA
ReadConsoleInputW
ReadConsoleOutputA
ReadConsoleOutputAttribute
ReadConsoleOutputCharacterA
ReadConsoleOutputCharacterW
ReadConsoleOutputW
ReadConsoleW
ReadDirectoryChangesW
ReadFile
ReadFileEx
ReadFileScatter
ReadProcessMemory
RegisterServiceProcess
RegisterSysMsgHandler
ReinitializeCriticalSection
ReleaseMutex
ReleaseSemaphore
RemoveDirectoryA
RemoveDirectoryW
RequestDeviceWakeup
RequestWakeupLatency
ResetEvent
ResetNLSUserInfoCache
ResetWriteWatch
ResumeThread
RtlAddFunctionTable
RtlDeleteFunctionTable
RtlFillMemory
RtlInstallFunctionTableCallback
RtlMoveMemory
RtlUnwind
RtlUnwindEx
RtlZeroMemory
SMapLS
SMapLS_IP_EBP_12
SMapLS_IP_EBP_16
SMapLS_IP_EBP_20
SMapLS_IP_EBP_24
SMapLS_IP_EBP_28
SMapLS_IP_EBP_32
SMapLS_IP_EBP_36
SMapLS_IP_EBP_40
SMapLS_IP_EBP_8
SUnMapLS
SUnMapLS_IP_EBP_12
SUnMapLS_IP_EBP_16
SUnMapLS_IP_EBP_20
SUnMapLS_IP_EBP_24
SUnMapLS_IP_EBP_28
SUnMapLS_IP_EBP_32
SUnMapLS_IP_EBP_36
SUnMapLS_IP_EBP_40
SUnMapLS_IP_EBP_8
ScrollConsoleScreenBufferA
ScrollConsoleScreenBufferW
SearchPathA
SearchPathW
SetCalendarInfoA
SetCalendarInfoW
SetCommBreak
SetCommConfig
SetCommMask
SetCommState
SetCommTimeouts
SetComputerNameA
SetComputerNameW
SetConsoleActiveScreenBuffer
SetConsoleCP
SetConsoleCtrlHandler
SetConsoleCursorInfo
SetConsoleCursorPosition
SetConsoleMode
SetConsoleOutputCP
SetConsoleScreenBufferSize
SetConsoleTextAttribute
SetConsoleTitleA
SetConsoleTitleW
SetConsoleWindowInfo
SetCriticalSectionSpinCount
SetCurrentDirectoryA
SetCurrentDirectoryW
SetDaylightFlag
SetDefaultCommConfigA
SetDefaultCommConfigW
SetEndOfFile
SetEnvironmentVariableA
SetEnvironmentVariableW
SetErrorMode
SetEvent
SetFileApisToANSI
SetFileApisToOEM
SetFileAttributesA
SetFileAttributesW
SetFilePointer
SetFilePointerEx
SetFileTime
SetHandleContext
SetHandleCount
SetHandleInformation
SetLastError
SetLocalTime
SetLocaleInfoA
SetLocaleInfoW
SetMailslotInfo
SetMessageWaitingIndicator
SetNamedPipeHandleState
SetPriorityClass
SetProcessAffinityMask
SetProcessPriorityBoost
SetProcessShutdownParameters
SetProcessWorkingSetSize
SetStdHandle
SetSystemPowerState
SetSystemTime
SetSystemTimeAdjustment
SetTapeParameters
SetTapePosition
SetThreadAffinityMask
SetThreadContext
SetThreadExecutionState
SetThreadIdealProcessor
SetThreadLocale
SetThreadPriority
SetThreadPriorityBoost
SetTimeZoneInformation
SetUnhandledExceptionFilter
SetUserGeoID
SetVolumeLabelA
SetVolumeLabelW
SetWaitableTimer
SetupComm
SignalObjectAndWait
SignalSysMsgHandlers
SizeofResource
Sleep
SleepEx
SuspendThread
SwitchToFiber
SwitchToThread
SystemTimeToFileTime
SystemTimeToTzSpecificLocalTime
TerminateProcess
TerminateThread
Thread32First
Thread32Next
ThunkConnect32
TlsAlloc
TlsAllocInternal
TlsFree
TlsFreeInternal
TlsGetValue
TlsSetValue
Toolhelp32ReadProcessMemory
TransactNamedPipe
TransmitCommChar
TryEnterCriticalSection
UTRegister
UTUnRegister
UnMapLS
UnMapSLFixArray
UnhandledExceptionFilter
UninitializeCriticalSection
UnlockFile
UnlockFileEx
UnmapViewOfFile
UpdateResourceA
UpdateResourceW
VerLanguageNameA
VerLanguageNameW
VirtualAlloc
VirtualAllocEx
VirtualFree
VirtualFreeEx
VirtualLock
VirtualProtect
VirtualProtectEx
VirtualQuery
VirtualQueryEx
VirtualUnlock
WaitCommEvent
WaitForDebugEvent
WaitForMultipleObjects
WaitForMultipleObjectsEx
WaitForSingleObject
WaitForSingleObjectEx
WaitNamedPipeA
WaitNamedPipeW
WideCharToMultiByte
WinExec
WriteConsoleA
WriteConsoleInputA
WriteConsoleInputW
WriteConsoleOutputA
WriteConsoleOutputAttribute
WriteConsoleOutputCharacterA
WriteConsoleOutputCharacterW
WriteConsoleOutputW
WriteConsoleW
WriteFile
WriteFileEx
WriteFileGather
WritePrivateProfileSectionA
WritePrivateProfileSectionW
WritePrivateProfileStringA
WritePrivateProfileStringW
WritePrivateProfileStructA
WritePrivateProfileStructW
WriteProcessMemory
WriteProfileSectionA
WriteProfileSectionW
WriteProfileStringA
WriteProfileStringW
WriteTapemark
_DebugOut
_DebugPrintf
_hread
_hwrite
_lclose
_lcreat
_llseek
_lopen
_lread
_lwrite
dprintf
lstrcat
lstrcatA
lstrcatW
lstrcmp
lstrcmpA
lstrcmpW
lstrcmpi
lstrcmpiA
lstrcmpiW
lstrcpy
lstrcpyA
lstrcpyW
lstrcpyn
lstrcpynA
lstrcpynW
lstrlen
lstrlenA
lstrlenW

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,658 @@
LIBRARY user32.dll
EXPORTS
ActivateKeyboardLayout
AdjustWindowRect
AdjustWindowRectEx
AlignRects
AllowSetForegroundWindow
AnimateWindow
AnyPopup
AppendMenuA
AppendMenuW
ArrangeIconicWindows
AttachThreadInput
BeginDeferWindowPos
BeginPaint
BlockInput
BringWindowToTop
BroadcastSystemMessage
BroadcastSystemMessageA
BroadcastSystemMessageW
CalcChildScroll
CallMsgFilter
CallMsgFilterA
CallMsgFilterW
CallNextHookEx
CallWindowProcA
CallWindowProcW
CascadeChildWindows
CascadeWindows
ChangeClipboardChain
ChangeDisplaySettingsA
ChangeDisplaySettingsExA
ChangeDisplaySettingsExW
ChangeDisplaySettingsW
ChangeMenuA
ChangeMenuW
CharLowerA
CharLowerBuffA
CharLowerBuffW
CharLowerW
CharNextA
CharNextExA
CharNextExW
CharNextW
CharPrevA
CharPrevExA
CharPrevExW
CharPrevW
CharToOemA
CharToOemBuffA
CharToOemBuffW
CharToOemW
CharUpperA
CharUpperBuffA
CharUpperBuffW
CharUpperW
CheckDlgButton
CheckMenuItem
CheckMenuRadioItem
CheckRadioButton
ChildWindowFromPoint
ChildWindowFromPointEx
ClientThreadConnect
ClientToScreen
ClipCursor
CloseClipboard
CloseDesktop
CloseWindow
CloseWindowStation
CopyAcceleratorTableA
CopyAcceleratorTableW
CopyIcon
CopyImage
CopyRect
CountClipboardFormats
CreateAcceleratorTableA
CreateAcceleratorTableW
CreateCaret
CreateCursor
CreateDesktopA
CreateDesktopW
CreateDialogIndirectParamA
CreateDialogIndirectParamW
CreateDialogParamA
CreateDialogParamW
CreateIcon
CreateIconFromResource
CreateIconFromResourceEx
CreateIconIndirect
CreateMDIWindowA
CreateMDIWindowW
CreateMenu
CreatePopupMenu
CreateWindowExA
CreateWindowExW
CreateWindowStationA
CreateWindowStationW
DdeAbandonTransaction
DdeAccessData
DdeAddData
DdeClientTransaction
DdeCmpStringHandles
DdeConnect
DdeConnectList
DdeCreateDataHandle
DdeCreateStringHandleA
DdeCreateStringHandleW
DdeDisconnect
DdeDisconnectList
DdeEnableCallback
DdeFreeDataHandle
DdeFreeStringHandle
DdeGetData
DdeGetLastError
DdeImpersonateClient
DdeInitializeA
DdeInitializeW
DdeKeepStringHandle
DdeNameService
DdePostAdvise
DdeQueryConvInfo
DdeQueryNextServer
DdeQueryStringA
DdeQueryStringW
DdeReconnect
DdeSetQualityOfService
DdeSetUserHandle
DdeUnaccessData
DdeUninitialize
DefDlgProcA
DefDlgProcW
DefFrameProcA
DefFrameProcW
DefMDIChildProcA
DefMDIChildProcW
DefWindowProcA
DefWindowProcW
DeferWindowPos
DeleteMenu
DestroyAcceleratorTable
DestroyCaret
DestroyCursor
DestroyIcon
DestroyMenu
DestroyWindow
DialogBoxIndirectParamA
DialogBoxIndirectParamW
DialogBoxParamA
DialogBoxParamW
DispatchMessageA
DispatchMessageW
DlgDirListA
DlgDirListComboBoxA
DlgDirListComboBoxW
DlgDirListW
DlgDirSelectComboBoxExA
DlgDirSelectComboBoxExW
DlgDirSelectExA
DlgDirSelectExW
DragDetect
DragObject
DrawAnimatedRects
DrawCaption
DrawCaptionTempA
DrawCaptionTempW
DrawEdge
DrawFocusRect
DrawFrame
DrawFrameControl
DrawIcon
DrawIconEx
DrawMenuBar
DrawMenuBarTemp
DrawStateA
DrawStateW
DrawTextA
DrawTextExA
DrawTextExW
DrawTextW
EditWndProc
EmptyClipboard
EnableMenuItem
EnableScrollBar
EnableWindow
EndDeferWindowPos
EndDialog
EndMenu
EndPaint
EndTask
EnumChildWindows
EnumClipboardFormats
EnumDesktopWindows
EnumDesktopsA
EnumDesktopsW
EnumDisplayDevicesA
EnumDisplayDevicesW
EnumDisplayMonitors
EnumDisplaySettingsA
EnumDisplaySettingsExA
EnumDisplaySettingsExW
EnumDisplaySettingsW
EnumPropsA
EnumPropsExA
EnumPropsExW
EnumPropsW
EnumThreadWindows
EnumWindowStationsA
EnumWindowStationsW
EnumWindows
EqualRect
ExcludeUpdateRgn
ExitWindowsEx
FillRect
FindWindowA
FindWindowExA
FindWindowExW
FindWindowW
FlashWindow
FlashWindowEx
FrameRect
FreeDDElParam
GetActiveWindow
GetAltTabInfo
GetAncestor
GetAsyncKeyState
GetCapture
GetCaretBlinkTime
GetCaretPos
GetClassInfoA
GetClassInfoExA
GetClassInfoExW
GetClassInfoW
GetClassLongA
GetClassLongW
GetClassNameA
GetClassNameW
GetClassWord
GetClientRect
GetClipCursor
GetClipboardData
GetClipboardFormatNameA
GetClipboardFormatNameW
GetClipboardOwner
GetClipboardSequenceNumber
GetClipboardViewer
GetComboBoxInfo
GetCursor
GetCursorInfo
GetCursorPos
GetDC
GetDCEx
GetDesktopWindow
GetDialogBaseUnits
GetDlgCtrlID
GetDlgItem
GetDlgItemInt
GetDlgItemTextA
GetDlgItemTextW
GetDoubleClickTime
GetFocus
GetForegroundWindow
GetGUIThreadInfo
GetGuiResources
GetIconInfo
GetInputDesktop
GetInputState
GetInternalWindowPos
GetKBCodePage
GetKeyNameTextA
GetKeyNameTextW
GetKeyState
GetKeyboardLayout
GetKeyboardLayoutList
GetKeyboardLayoutNameA
GetKeyboardLayoutNameW
GetKeyboardState
GetKeyboardType
GetLastActivePopup
GetListBoxInfo
GetMenu
GetMenuBarInfo
GetMenuCheckMarkDimensions
GetMenuContextHelpId
GetMenuDefaultItem
GetMenuInfo
GetMenuItemCount
GetMenuItemID
GetMenuItemInfoA
GetMenuItemInfoW
GetMenuItemRect
GetMenuState
GetMenuStringA
GetMenuStringW
GetMessageA
GetMessageExtraInfo
GetMessagePos
GetMessageTime
GetMessageW
GetMonitorInfoA
GetMonitorInfoW
GetMouseMovePoints
GetMouseMovePointsEx
GetNextDlgGroupItem
GetNextDlgTabItem
GetNextQueueWindow
GetOpenClipboardWindow
GetParent
GetPriorityClipboardFormat
GetProcessDefaultLayout
GetProcessWindowStation
GetPropA
GetPropW
GetQueueStatus
GetScrollBarInfo
GetScrollInfo
GetScrollPos
GetScrollRange
GetShellWindow
GetSubMenu
GetSysColor
GetSysColorBrush
GetSystemMenu
GetSystemMetrics
GetTabbedTextExtentA
GetTabbedTextExtentW
GetThreadDesktop
GetTitleBarInfo
GetTopWindow
GetUpdateRect
GetUpdateRgn
GetUserObjectInformationA
GetUserObjectInformationW
GetUserObjectSecurity
GetWindow
GetWindowContextHelpId
GetWindowDC
GetWindowInfo
GetWindowLongPtrA
GetWindowLongPtrW
SetWindowLongPtrA
SetWindowLongPtrW
GetWindowLongA
GetWindowLongW
GetWindowModuleFileNameA
GetWindowModuleFileNameW
GetWindowPlacement
GetWindowRect
GetWindowRgn
GetWindowTextA
GetWindowTextLengthA
GetWindowTextLengthW
GetWindowTextW
GetWindowThreadProcessId
GetWindowWord
GrayStringA
GrayStringW
HasSystemSleepStarted
HideCaret
HiliteMenuItem
IMPGetIMEA
IMPGetIMEW
IMPQueryIMEA
IMPQueryIMEW
IMPSetIMEA
IMPSetIMEW
ImpersonateDdeClientWindow
InSendMessage
InSendMessageEx
InflateRect
InitSharedTable
InitTask
InsertMenuA
InsertMenuItemA
InsertMenuItemW
InsertMenuW
InternalGetWindowText
IntersectRect
InvalidateRect
InvalidateRgn
InvertRect
IsCharAlphaA
IsCharAlphaNumericA
IsCharAlphaNumericW
IsCharAlphaW
IsCharLowerA
IsCharLowerW
IsCharUpperA
IsCharUpperW
IsChild
IsClipboardFormatAvailable
IsDialogMessage
IsDialogMessageA
IsDialogMessageW
IsDlgButtonChecked
IsHungThread
IsIconic
IsMenu
IsRectEmpty
IsWindow
IsWindowEnabled
IsWindowUnicode
IsWindowVisible
IsZoomed
KillTimer
LoadAcceleratorsA
LoadAcceleratorsW
LoadBitmapA
LoadBitmapW
LoadCursorA
LoadCursorFromFileA
LoadCursorFromFileW
LoadCursorW
LoadIconA
LoadIconW
LoadImageA
LoadImageW
LoadKeyboardLayoutA
LoadKeyboardLayoutW
LoadMenuA
LoadMenuIndirectA
LoadMenuIndirectW
LoadMenuW
LoadStringA
LoadStringW
LockSetForegroundWindow
LockWindowStation
LockWindowUpdate
LookupIconIdFromDirectory
LookupIconIdFromDirectoryEx
MapDialogRect
MapVirtualKeyA
MapVirtualKeyExA
MapVirtualKeyExW
MapVirtualKeyW
MapWindowPoints
MenuItemFromPoint
MessageBeep
MessageBoxA
MessageBoxExA
MessageBoxExW
MessageBoxIndirectA
MessageBoxIndirectW
MessageBoxW
ModifyAccess
ModifyMenuA
ModifyMenuW
MonitorFromPoint
MonitorFromRect
MonitorFromWindow
MoveWindow
MsgWaitForMultipleObjects
MsgWaitForMultipleObjectsEx
NotifyWinEvent
OemKeyScan
OemToCharA
OemToCharBuffA
OemToCharBuffW
OemToCharW
OffsetRect
OpenClipboard
OpenDesktopA
OpenDesktopW
OpenIcon
OpenInputDesktop
OpenWindowStationA
OpenWindowStationW
PackDDElParam
PaintDesktop
PeekMessageA
PeekMessageW
PlaySoundEvent
PostMessageA
PostMessageW
PostQuitMessage
PostThreadMessageA
PostThreadMessageW
PtInRect
RealChildWindowFromPoint
RealGetWindowClass
RedrawWindow
RegisterClassA
RegisterClassExA
RegisterClassExW
RegisterClassW
RegisterClipboardFormatA
RegisterClipboardFormatW
RegisterDeviceNotificationA
RegisterDeviceNotificationW
RegisterHotKey
RegisterLogonProcess
RegisterNetworkCapabilities
RegisterSystemThread
RegisterTasklist
RegisterWindowMessageA
RegisterWindowMessageW
ReleaseCapture
ReleaseDC
RemoveMenu
RemovePropA
RemovePropW
ReplyMessage
ReuseDDElParam
ScreenToClient
ScrollDC
ScrollWindow
ScrollWindowEx
SendDlgItemMessageA
SendDlgItemMessageW
SendIMEMessageExA
SendIMEMessageExW
SendInput
SendMessageA
SendMessageCallbackA
SendMessageCallbackW
SendMessageTimeoutA
SendMessageTimeoutW
SendMessageW
SendNotifyMessageA
SendNotifyMessageW
SetActiveWindow
SetCapture
SetCaretBlinkTime
SetCaretPos
SetClassLongA
SetClassLongW
SetClassWord
SetClipboardData
SetClipboardViewer
SetCursor
SetCursorPos
SetDebugErrorLevel
SetDeskWallpaper
SetDesktopBitmap
SetDlgItemInt
SetDlgItemTextA
SetDlgItemTextW
SetDoubleClickTime
SetFocus
SetForegroundWindow
SetInternalWindowPos
SetKeyboardState
SetLastErrorEx
SetLogonNotifyWindow
SetMenu
SetMenuContextHelpId
SetMenuDefaultItem
SetMenuInfo
SetMenuItemBitmaps
SetMenuItemInfoA
SetMenuItemInfoW
SetMessageExtraInfo
SetMessageQueue
SetParent
SetProcessDefaultLayout
SetProcessWindowStation
SetPropA
SetPropW
SetRect
SetRectEmpty
SetScrollInfo
SetScrollPos
SetScrollRange
SetShellWindow
SetSysColors
SetSysColorsTemp
SetSystemCursor
SetThreadDesktop
SetTimer
SetUserObjectInformationA
SetUserObjectInformationW
SetUserObjectSecurity
SetWinEventHook
SetWindowContextHelpId
SetWindowFullScreenState
SetWindowLongA
SetWindowLongW
SetWindowPlacement
SetWindowPos
SetWindowRgn
SetWindowTextA
SetWindowTextW
SetWindowWord
SetWindowsHookA
SetWindowsHookExA
SetWindowsHookExW
SetWindowsHookW
ShowCaret
ShowCursor
ShowOwnedPopups
ShowScrollBar
ShowWindow
ShowWindowAsync
SubtractRect
SwapMouseButton
SwitchDesktop
SwitchToThisWindow
SysErrorBox
SystemParametersInfoA
SystemParametersInfoW
TabbedTextOutA
TabbedTextOutW
TileChildWindows
TileWindows
ToAscii
ToAsciiEx
ToUnicode
ToUnicodeEx
TrackMouseEvent
TrackPopupMenu
TrackPopupMenuEx
TranslateAccelerator
TranslateAcceleratorA
TranslateAcceleratorW
TranslateMDISysAccel
TranslateMessage
UnhookWinEvent
UnhookWindowsHook
UnhookWindowsHookEx
UnionRect
UnloadKeyboardLayout
UnlockWindowStation
UnpackDDElParam
UnregisterClassA
UnregisterClassW
UnregisterDeviceNotification
UnregisterHotKey
UpdateWindow
UserClientDllInitialize
UserIsSystemResumeAutomatic
UserSetDeviceHoldState
UserSignalProc
UserTickleTimer
ValidateRect
ValidateRgn
VkKeyScanA
VkKeyScanExA
VkKeyScanExW
VkKeyScanW
WINNLSEnableIME
WINNLSGetEnableStatus
WINNLSGetIMEHotkey
WNDPROC_CALLBACK
WaitForInputIdle
WaitMessage
WinHelpA
WinHelpW
WinOldAppHackoMatic
WindowFromDC
WindowFromPoint
YieldTask
_SetProcessDefaultLayout
keybd_event
mouse_event
wsprintfA
wsprintfW
wvsprintfA
wvsprintfW

View file

@ -0,0 +1,75 @@
//+---------------------------------------------------------------------------
// _UNICODE for tchar.h, UNICODE for API
#include <tchar.h>
#include <windows.h>
#include <stdlib.h>
#define __UNKNOWN_APP 0
#define __CONSOLE_APP 1
#define __GUI_APP 2
void __set_app_type(int);
void _controlfp(unsigned a, unsigned b);
#ifdef _UNICODE
#define __tgetmainargs __wgetmainargs
#define _twinstart _wwinstart
#define _runtwinmain _runwwinmain
int APIENTRY wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int);
#else
#define __tgetmainargs __getmainargs
#define _twinstart _winstart
#define _runtwinmain _runwinmain
#endif
typedef struct { int newmode; } _startupinfo;
int __cdecl __tgetmainargs(int *pargc, _TCHAR ***pargv, _TCHAR ***penv, int globb, _startupinfo*);
static int go_winmain(TCHAR *arg1)
{
STARTUPINFO si;
_TCHAR *szCmd, *p;
int fShow;
GetStartupInfo(&si);
if (si.dwFlags & STARTF_USESHOWWINDOW)
fShow = si.wShowWindow;
else
fShow = SW_SHOWDEFAULT;
szCmd = NULL, p = GetCommandLine();
if (arg1)
szCmd = _tcsstr(p, arg1);
if (NULL == szCmd)
szCmd = _tcsdup(__T(""));
else if (szCmd > p && szCmd[-1] == __T('"'))
--szCmd;
#if defined __i386__ || defined __x86_64__
_controlfp(0x10000, 0x30000);
#endif
return _tWinMain(GetModuleHandle(NULL), NULL, szCmd, fShow);
}
int _twinstart(void)
{
__TRY__
_startupinfo start_info_con = {0};
__set_app_type(__GUI_APP);
__tgetmainargs(&__argc, &__targv, &_tenviron, 0, &start_info_con);
exit(go_winmain(__argc > 1 ? __targv[1] : NULL));
}
int _runtwinmain(int argc, /* as tcc passed in */ char **argv)
{
#ifdef UNICODE
_startupinfo start_info = {0};
__tgetmainargs(&__argc, &__targv, &_tenviron, 0, &start_info);
/* may be wrong when tcc has received wildcards (*.c) */
if (argc < __argc)
__targv += __argc - argc, __argc = argc;
#else
__argc = argc, __targv = argv;
#endif
return go_winmain(__argc > 1 ? __targv[1] : NULL);
}

View file

@ -0,0 +1,3 @@
#define _UNICODE 1
#define UNICODE 1
#include "wincrt1.c"

View file

@ -0,0 +1,168 @@
TinyCC
======
This file contains specific information for usage of TinyCC
under MS-Windows. See tcc-doc.html to have all the features.
Installation from the binary ZIP package:
-----------------------------------------
Unzip the package to a directory of your choice.
Set the system PATH:
--------------------
To be able to invoke the compiler from everywhere on your computer by
just typing "tcc", please add the directory containing tcc.exe to your
system PATH.
Include and library search paths
--------------------------------
On windows, the standard "include" and "lib" directories are searched
relatively from the location of the executables (tcc.exe, libtcc.dll).
Examples:
---------
Open a console window (DOS box) and 'cd' to the examples directory.
For the 'Fibonacci' example type:
tcc fib.c
For the 'Hello Windows' GUI example type:
tcc hello_win.c
For the 'Hello DLL' example type
tcc -shared dll.c
tcc -impdef dll.dll (optional)
tcc hello_dll.c dll.def
Using libtcc as JIT compiler in your program
--------------------------------------------
Check out the 'libtcc_test' example:
- Running it from source:
tcc -I libtcc libtcc/libtcc.def -run examples/libtcc_test.c
- Compiling with TCC:
tcc examples/libtcc_test.c -I libtcc libtcc/libtcc.def
- Compiling with MinGW:
gcc examples/libtcc_test.c -I libtcc libtcc.dll -o libtcc_test.exe
- Compiling with MSVC:
lib /def:libtcc\libtcc.def /out:libtcc.lib
cl /MD examples/libtcc_test.c -I libtcc libtcc.lib
Import Definition Files:
------------------------
To link with Windows system DLLs, TCC uses import definition
files (.def) instead of libraries.
The now built-in 'tiny_impdef' program may be used to make
additional .def files for any DLL. For example
tcc -impdef [-v] opengl32.dll [-o opengl32.def]
Put opengl32.def into the tcc/lib directory. Specify -lopengl32 at
the TCC commandline to link a program that uses opengl32.dll.
Header Files:
-------------
The system header files (except _mingw.h) are from the MinGW
distribution:
http://www.mingw.org/
From the windows headers, only a minimal set is included. If you need
more, get MinGW's "w32api" package. Extract the files from "include"
into your "tcc/include/winapi" directory.
Resource Files:
---------------
TCC can link windows resources in coff format as generated by MinGW's
windres.exe. For example:
windres -O coff app.rc -o appres.o
tcc app.c appres.o -o app.exe
Tiny Libmaker:
--------------
The now built-in tiny_libmaker tool by Timovj Lahde can be used as
'ar' replacement to make a library from several object files:
tcc -ar [rcsv] library objectfiles ...
Compilation from source:
------------------------
* You can use the MinGW and MSYS tools available at
http://www.mingw.org
http://www.mingw-w64.org
http://www.msys2.org
Untar the TCC archive and type in the MSYS shell:
./configure [--prefix installpath]
make
make install
The default install location is c:\Program Files\tcc
Cygwin can be used too with its mingw cross-compiler installed:
./configure --cross-prefix=i686-w64-mingw32-
(the prefix may vary)
* Alternatively you can compile TCC with just GCC from MinGW using
> build-tcc.bat (from the win32 directory)
Also MSVC can be used with the "VSTools Developer Command Prompt":
> build-tcc.bat -c cl
or with an existing tcc (needs to be in a different directory)
> build-tcc.bat -c some-tcc-dir\tcc.exe
Also you can copy/install everything into another directory:
> build-tcc.bat -i <dir>
Limitations:
------------
- On the object file level, currently TCC supports only the ELF format,
not COFF as used by MinGW and MSVC. It is not possible to exchange
object files or libraries between TCC and these compilers.
However libraries for TCC from objects by TCC can be made using
tcc -ar lib.a files.o ,,,
- No leading underscore is generated in the ELF symbols.
Documentation and License:
--------------------------
TCC is distributed under the GNU Lesser General Public License. (See
COPYING file or http://www.gnu.org/licenses/lgpl-2.1.html)
TinyCC homepage is at:
http://fabrice.bellard.free.fr/tcc/
WinAPI Help and 3rd-party tools:
--------------------------------
The Windows API documentation (Win95) in a single .hlp file is
available on the lcc-win32 site as "win32hlp.exe" or from other
locations as "win32hlp_big.zip".
A nice RAD tool to create windows resources (dialog boxes etc.) is
"ResEd", available at the RadASM website.
--- grischka