mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
sync to trunk r38300
svn path=/branches/ros-amd64-bringup/; revision=38498
This commit is contained in:
@@ -110,7 +110,9 @@
|
||||
</directory>
|
||||
<directory name="ntoskrnl">
|
||||
<xi:include href="ntoskrnl/ntoskrnl.rbuild" />
|
||||
<xi:include href="ntoskrnl/ntkrnlmp.rbuild" />
|
||||
<if property="BUILD_MP" value="1">
|
||||
<xi:include href="ntoskrnl/ntkrnlmp.rbuild" />
|
||||
</if>
|
||||
</directory>
|
||||
<directory name="subsystems">
|
||||
<xi:include href="subsystems/subsystems.rbuild" />
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
#define getwd getcwd
|
||||
|
||||
#define strcasecmp strcmp
|
||||
#define strncasecmp strnicmp
|
||||
#define strcasecmp _stricmp
|
||||
#define strncasecmp _strnicmp
|
||||
|
||||
struct timezone {
|
||||
int tz_minuteswest; /* minutes W of Greenwich */
|
||||
|
||||
@@ -20,91 +20,91 @@ int main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (stricmp(argv[1],"ACCOUNTS")==0)
|
||||
if (_stricmp(argv[1],"ACCOUNTS")==0)
|
||||
{
|
||||
return unimplement();
|
||||
return unimplemented();
|
||||
}
|
||||
if (stricmp(argv[1],"COMPUTER")==0)
|
||||
if (_stricmp(argv[1],"COMPUTER")==0)
|
||||
{
|
||||
return unimplement();
|
||||
return unimplemented();
|
||||
}
|
||||
if (stricmp(argv[1],"CONFIG")==0)
|
||||
if (_stricmp(argv[1],"CONFIG")==0)
|
||||
{
|
||||
return unimplement();
|
||||
return unimplemented();
|
||||
}
|
||||
if (stricmp(argv[1],"CONTINUE")==0)
|
||||
if (_stricmp(argv[1],"CONTINUE")==0)
|
||||
{
|
||||
return unimplement();
|
||||
return unimplemented();
|
||||
}
|
||||
|
||||
if (stricmp(argv[1],"FILE")==0)
|
||||
if (_stricmp(argv[1],"FILE")==0)
|
||||
{
|
||||
return unimplement();
|
||||
return unimplemented();
|
||||
}
|
||||
if (stricmp(argv[1],"GROUP")==0)
|
||||
if (_stricmp(argv[1],"GROUP")==0)
|
||||
{
|
||||
return unimplement();
|
||||
return unimplemented();
|
||||
}
|
||||
if (stricmp(argv[1],"HELP")==0)
|
||||
if (_stricmp(argv[1],"HELP")==0)
|
||||
{
|
||||
return cmdHelp(argc,&argv[1]);
|
||||
}
|
||||
if (stricmp(argv[1],"HELPMSG")==0)
|
||||
if (_stricmp(argv[1],"HELPMSG")==0)
|
||||
{
|
||||
return unimplement();
|
||||
return unimplemented();
|
||||
}
|
||||
if (stricmp(argv[1],"LOCALGROUP")==0)
|
||||
if (_stricmp(argv[1],"LOCALGROUP")==0)
|
||||
{
|
||||
return unimplement();
|
||||
return unimplemented();
|
||||
}
|
||||
if (stricmp(argv[1],"NAME")==0)
|
||||
if (_stricmp(argv[1],"NAME")==0)
|
||||
{
|
||||
return unimplement();
|
||||
return unimplemented();
|
||||
}
|
||||
if (stricmp(argv[1],"PRINT")==0)
|
||||
if (_stricmp(argv[1],"PRINT")==0)
|
||||
{
|
||||
return unimplement();
|
||||
return unimplemented();
|
||||
}
|
||||
if (stricmp(argv[1],"SEND")==0)
|
||||
if (_stricmp(argv[1],"SEND")==0)
|
||||
{
|
||||
return unimplement();
|
||||
return unimplemented();
|
||||
}
|
||||
if (stricmp(argv[1],"SESSION")==0)
|
||||
if (_stricmp(argv[1],"SESSION")==0)
|
||||
{
|
||||
return unimplement();
|
||||
return unimplemented();
|
||||
}
|
||||
if (stricmp(argv[1],"SHARE")==0)
|
||||
if (_stricmp(argv[1],"SHARE")==0)
|
||||
{
|
||||
return unimplement();
|
||||
return unimplemented();
|
||||
}
|
||||
|
||||
if (stricmp(argv[1],"START")==0)
|
||||
if (_stricmp(argv[1],"START")==0)
|
||||
{
|
||||
return cmdStart(argc, &argv[1]);
|
||||
}
|
||||
if (stricmp(argv[1],"STATISTICS")==0)
|
||||
if (_stricmp(argv[1],"STATISTICS")==0)
|
||||
{
|
||||
return unimplement();
|
||||
return unimplemented();
|
||||
}
|
||||
if (stricmp(argv[1],"STOP")==0)
|
||||
if (_stricmp(argv[1],"STOP")==0)
|
||||
{
|
||||
return cmdStop(argc, &argv[1]);
|
||||
}
|
||||
if (stricmp(argv[1],"TIME")==0)
|
||||
if (_stricmp(argv[1],"TIME")==0)
|
||||
{
|
||||
return unimplement();
|
||||
return unimplemented();
|
||||
}
|
||||
if (stricmp(argv[1],"USE")==0)
|
||||
if (_stricmp(argv[1],"USE")==0)
|
||||
{
|
||||
return unimplement();
|
||||
return unimplemented();
|
||||
}
|
||||
if (stricmp(argv[1],"USER")==0)
|
||||
if (_stricmp(argv[1],"USER")==0)
|
||||
{
|
||||
return unimplement();
|
||||
return unimplemented();
|
||||
}
|
||||
if (stricmp(argv[1],"VIEW")==0)
|
||||
if (_stricmp(argv[1],"VIEW")==0)
|
||||
{
|
||||
return unimplement();
|
||||
return unimplemented();
|
||||
}
|
||||
|
||||
help();
|
||||
@@ -112,9 +112,9 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
|
||||
int unimplement()
|
||||
int unimplemented()
|
||||
{
|
||||
puts("This command is not implement yet");
|
||||
puts("This command is not implemented yet");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <windows.h>
|
||||
|
||||
void help();
|
||||
int unimplement();
|
||||
int unimplemented();
|
||||
|
||||
|
||||
INT cmdHelp(INT argc, CHAR **argv);
|
||||
|
||||
@@ -208,7 +208,7 @@ INT row_scanner_service(CHAR *buffer, LONG* pos, LONG size,
|
||||
}
|
||||
|
||||
/* Compare now */
|
||||
if (strnicmp(name,&buffer[t],strlen(&buffer[t]))==0)
|
||||
if (_strnicmp(name,&buffer[t],strlen(&buffer[t]))==0)
|
||||
{
|
||||
if (save != NULL)
|
||||
{
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
|
||||
<module name="telnet" type="win32cui" installbase="system32" installname="telnet.exe" allowwarnings ="true">
|
||||
<module name="telnet" type="win32cui" installbase="system32" installname="telnet.exe" >
|
||||
<include base="telnet">.</include>
|
||||
<library>kernel32</library>
|
||||
<library>ws2_32</library>
|
||||
<library>user32</library>
|
||||
<define name="_CRT_NONSTDC_NO_DEPRECATE" />
|
||||
<directory name="src">
|
||||
<file>ansiprsr.cpp</file>
|
||||
<file>keytrans.cpp</file>
|
||||
|
||||
@@ -28,6 +28,20 @@
|
||||
#define _PATH_DHCLIENT_PID "\\systemroot\\system32\\drivers\\etc\\dhclient.pid"
|
||||
typedef void *VOIDPTR;
|
||||
|
||||
#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
|
||||
|
||||
typedef u_int32_t uintTIME;
|
||||
#define TIME uintTIME
|
||||
#include "dhcpd.h"
|
||||
|
||||
@@ -2062,7 +2062,7 @@ IsConsoleBoot(VOID)
|
||||
NextOption = wcschr(CurrentOption, L' ');
|
||||
if (NextOption)
|
||||
*NextOption = L'\0';
|
||||
if (wcsicmp(CurrentOption, L"CONSOLE") == 0)
|
||||
if (_wcsicmp(CurrentOption, L"CONSOLE") == 0)
|
||||
{
|
||||
DPRINT("Found %S. Switching to console boot\n", CurrentOption);
|
||||
ConsoleBoot = TRUE;
|
||||
|
||||
@@ -269,7 +269,6 @@ BOOL Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param, BOOL forcenew)
|
||||
SetFilePointer (bc->hBatchFile, 0, NULL, FILE_BEGIN);
|
||||
bc->bEcho = bEcho; /* Preserve echo across batch calls */
|
||||
bc->shiftlevel = 0;
|
||||
bc->bCmdBlock = -1;
|
||||
|
||||
bc->ffind = NULL;
|
||||
bc->forvar = _T('\0');
|
||||
@@ -445,39 +444,6 @@ LPTSTR ReadBatchLine ()
|
||||
|
||||
first = textline;
|
||||
|
||||
/* cmd block over multiple lines (..) */
|
||||
if (bc->bCmdBlock >= 0)
|
||||
{
|
||||
if (*first == _T(')'))
|
||||
{
|
||||
first++;
|
||||
/* Strip leading spaces and trailing space/control chars */
|
||||
while(_istspace (*first))
|
||||
first++;
|
||||
if ((_tcsncicmp (first, _T("else"), 4) == 0) && (_tcschr(first, _T('('))))
|
||||
{
|
||||
bc->bExecuteBlock[bc->bCmdBlock] = !bc->bExecuteBlock[bc->bCmdBlock];
|
||||
}
|
||||
else
|
||||
{
|
||||
bc->bCmdBlock--;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (bc->bCmdBlock < MAX_PATH)
|
||||
if (!bc->bExecuteBlock[bc->bCmdBlock])
|
||||
{
|
||||
/* increase the bCmdBlock count when there is another conditon which opens a new bracket */
|
||||
if ((_tcsncicmp (first, _T("if"), 2) == 0) && _tcschr(first, _T('(')))
|
||||
{
|
||||
bc->bCmdBlock++;
|
||||
if ((bc->bCmdBlock > 0) && (bc->bCmdBlock < MAX_PATH))
|
||||
bc->bExecuteBlock[bc->bCmdBlock] = bc->bExecuteBlock[bc->bCmdBlock - 1];
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@ typedef struct tagBATCHCONTEXT
|
||||
HANDLE hFind; /* Preserve find handle when doing a for */
|
||||
REDIRECTION *RedirList;
|
||||
TCHAR forvar;
|
||||
INT bCmdBlock;
|
||||
BOOL bExecuteBlock[MAX_PATH];
|
||||
} BATCH_CONTEXT, *LPBATCH_CONTEXT;
|
||||
|
||||
|
||||
|
||||
@@ -879,7 +879,7 @@ ExecuteCommand(PARSED_COMMAND *Cmd)
|
||||
if(bc)
|
||||
bNewBatch = FALSE;
|
||||
|
||||
Success = DoCommand(Cmd->CommandLine);
|
||||
Success = DoCommand(Cmd->Command.CommandLine);
|
||||
|
||||
if(bNewBatch && bc)
|
||||
AddBatchRedirection(&Cmd->Redirections);
|
||||
@@ -903,6 +903,9 @@ ExecuteCommand(PARSED_COMMAND *Cmd)
|
||||
case C_PIPE:
|
||||
ExecutePipeline(Cmd);
|
||||
break;
|
||||
case C_IF:
|
||||
Success = ExecuteIf(Cmd);
|
||||
break;
|
||||
}
|
||||
|
||||
UndoRedirection(Cmd->Redirections, NULL);
|
||||
|
||||
@@ -258,6 +258,15 @@ INT CommandHistory (LPTSTR param);
|
||||
#endif
|
||||
|
||||
|
||||
/* Prototypes for IF.C */
|
||||
#define IFFLAG_NEGATE 1 /* NOT */
|
||||
#define IFFLAG_IGNORECASE 2 /* /I */
|
||||
enum { IF_CMDEXTVERSION, IF_DEFINED, IF_ERRORLEVEL, IF_EXIST,
|
||||
IF_STRINGEQ, /* == */
|
||||
IF_EQU, IF_GTR, IF_GEQ, IF_LSS, IF_LEQ, IF_NEQ };
|
||||
BOOL ExecuteIf(struct _PARSED_COMMAND *Cmd);
|
||||
|
||||
|
||||
/* Prototypes for INTERNAL.C */
|
||||
VOID InitLastPath (VOID);
|
||||
VOID FreeLastPath (VOID);
|
||||
@@ -330,15 +339,28 @@ INT CommandMsgbox (LPTSTR);
|
||||
|
||||
|
||||
/* Prototypes from PARSER.C */
|
||||
enum { C_COMMAND, C_QUIET, C_BLOCK, C_MULTI, C_IFFAILURE, C_IFSUCCESS, C_PIPE };
|
||||
enum { C_COMMAND, C_QUIET, C_BLOCK, C_MULTI, C_IFFAILURE, C_IFSUCCESS, C_PIPE, C_IF };
|
||||
typedef struct _PARSED_COMMAND
|
||||
{
|
||||
struct _PARSED_COMMAND *Subcommands;
|
||||
struct _PARSED_COMMAND *Next;
|
||||
struct _REDIRECTION *Redirections;
|
||||
TCHAR *Tail;
|
||||
BYTE Type;
|
||||
TCHAR CommandLine[];
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
TCHAR *Tail;
|
||||
TCHAR CommandLine[];
|
||||
} Command;
|
||||
struct
|
||||
{
|
||||
BYTE Flags;
|
||||
BYTE Operator;
|
||||
TCHAR *LeftArg;
|
||||
TCHAR *RightArg;
|
||||
} If;
|
||||
};
|
||||
} PARSED_COMMAND;
|
||||
PARSED_COMMAND *ParseCommand(LPTSTR Line);
|
||||
VOID EchoCommand(PARSED_COMMAND *Cmd);
|
||||
|
||||
@@ -120,7 +120,7 @@ COMMAND cmds[] =
|
||||
{_T("history"), 0, CommandHistory},
|
||||
#endif
|
||||
|
||||
{_T("if"), 0, cmd_if},
|
||||
// {_T("if"), 0, cmd_if},
|
||||
|
||||
#ifdef INCLUDE_CMD_LABEL
|
||||
{_T("label"), 0, cmd_label},
|
||||
|
||||
+81
-155
@@ -32,15 +32,30 @@
|
||||
|
||||
#include <precomp.h>
|
||||
|
||||
|
||||
#define X_EXEC 1
|
||||
#define X_EMPTY 0x80
|
||||
|
||||
INT cmd_if (LPTSTR param)
|
||||
static INT GenericCmp(INT (*StringCmp)(LPCTSTR, LPCTSTR),
|
||||
LPCTSTR Left, LPCTSTR Right)
|
||||
{
|
||||
INT x_flag = 0; /* when set cause 'then' clause to be executed */
|
||||
LPTSTR pp;
|
||||
TCHAR *end;
|
||||
INT nLeft = _tcstol(Left, &end, 0);
|
||||
if (*end == _T('\0'))
|
||||
{
|
||||
INT nRight = _tcstol(Right, &end, 0);
|
||||
if (*end == _T('\0'))
|
||||
{
|
||||
/* both arguments are numeric */
|
||||
return (nLeft < nRight) ? -1 : (nLeft > nRight);
|
||||
}
|
||||
}
|
||||
return StringCmp(Left, Right);
|
||||
}
|
||||
|
||||
BOOL ExecuteIf(PARSED_COMMAND *Cmd)
|
||||
{
|
||||
INT result = FALSE; /* when set cause 'then' clause to be executed */
|
||||
LPTSTR param;
|
||||
|
||||
#if 0
|
||||
/* FIXME: need to handle IF /?; will require special parsing */
|
||||
TRACE ("cmd_if: (\'%s\')\n", debugstr_aw(param));
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
@@ -48,178 +63,89 @@ INT cmd_if (LPTSTR param)
|
||||
ConOutResPaging(TRUE,STRING_IF_HELP1);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* First check if param string begins with 'not' */
|
||||
if (!_tcsnicmp (param, _T("not"), 3) && _istspace (*(param + 3)))
|
||||
if (Cmd->If.Operator == IF_CMDEXTVERSION)
|
||||
{
|
||||
x_flag = X_EXEC; /* Remember 'NOT' */
|
||||
param += 3; /* Step over 'NOT' */
|
||||
while (_istspace (*param)) /* And subsequent spaces */
|
||||
param++;
|
||||
/* IF CMDEXTVERSION n: check if Command Extensions version
|
||||
* is greater or equal to n */
|
||||
DWORD n = _tcstoul(Cmd->If.RightArg, ¶m, 10);
|
||||
if (*param != _T('\0'))
|
||||
{
|
||||
error_syntax(Cmd->If.RightArg);
|
||||
return FALSE;
|
||||
}
|
||||
result = (2 >= n);
|
||||
}
|
||||
|
||||
/* Check for 'exist' form */
|
||||
if (!_tcsnicmp (param, _T("exist"), 5) && _istspace (*(param + 5)))
|
||||
else if (Cmd->If.Operator == IF_DEFINED)
|
||||
{
|
||||
UINT i;
|
||||
BOOL bInside = FALSE;
|
||||
|
||||
param += 5;
|
||||
while (_istspace (*param))
|
||||
param++;
|
||||
|
||||
pp = param;
|
||||
|
||||
/* find the whole path to the file */
|
||||
for(i = 0; i < _tcslen(param); i++)
|
||||
{
|
||||
if(param[i] == _T('\"'))
|
||||
bInside = !bInside;
|
||||
if((param[i] == _T(' ')) && !bInside)
|
||||
{
|
||||
break;
|
||||
}
|
||||
pp++;
|
||||
}
|
||||
*pp++ = _T('\0');
|
||||
i = 0;
|
||||
/* remove quotes */
|
||||
while(i < _tcslen(param))
|
||||
{
|
||||
if(param[i] == _T('\"'))
|
||||
memmove(¶m[i],¶m[i + 1], _tcslen(¶m[i]) * sizeof(TCHAR));
|
||||
else
|
||||
i++;
|
||||
}
|
||||
|
||||
if (*pp)
|
||||
{
|
||||
WIN32_FIND_DATA f;
|
||||
HANDLE hFind;
|
||||
|
||||
hFind = FindFirstFile (param, &f);
|
||||
x_flag ^= (hFind == INVALID_HANDLE_VALUE) ? 0 : X_EXEC;
|
||||
if (hFind != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
FindClose (hFind);
|
||||
}
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
/* IF DEFINED var: check if environment variable exists */
|
||||
result = (GetEnvVarOrSpecial(Cmd->If.RightArg) != NULL);
|
||||
}
|
||||
else if (!_tcsnicmp (param, _T("defined"), 7) && _istspace (*(param + 7)))
|
||||
else if (Cmd->If.Operator == IF_ERRORLEVEL)
|
||||
{
|
||||
/* Check for 'defined' form */
|
||||
TCHAR Value [1];
|
||||
INT ValueSize = 0;
|
||||
|
||||
param += 7;
|
||||
/* IF [NOT] DEFINED var COMMAND */
|
||||
/* ^ */
|
||||
while (_istspace (*param))
|
||||
param++;
|
||||
/* IF [NOT] DEFINED var COMMAND */
|
||||
/* ^ */
|
||||
pp = param;
|
||||
while (*pp && !_istspace (*pp))
|
||||
pp++;
|
||||
/* IF [NOT] DEFINED var COMMAND */
|
||||
/* ^ */
|
||||
if (*pp)
|
||||
/* IF ERRORLEVEL n: check if last exit code is greater or equal to n */
|
||||
INT n = _tcstol(Cmd->If.RightArg, ¶m, 10);
|
||||
if (*param != _T('\0'))
|
||||
{
|
||||
*pp++ = _T('\0');
|
||||
ValueSize = GetEnvironmentVariable(param, Value, sizeof(Value) / sizeof(Value[0]));
|
||||
x_flag ^= (0 == ValueSize)
|
||||
? 0
|
||||
: X_EXEC;
|
||||
x_flag |= X_EMPTY;
|
||||
error_syntax(Cmd->If.RightArg);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
result = (nErrorLevel >= n);
|
||||
}
|
||||
else if (!_tcsnicmp (param, _T("errorlevel"), 10) && _istspace (*(param + 10)))
|
||||
else if (Cmd->If.Operator == IF_EXIST)
|
||||
{
|
||||
/* Check for 'errorlevel' form */
|
||||
INT n = 0;
|
||||
/* IF EXIST filename: check if file exists (wildcards allowed) */
|
||||
WIN32_FIND_DATA f;
|
||||
HANDLE hFind;
|
||||
|
||||
pp = param + 10;
|
||||
while (_istspace (*pp))
|
||||
pp++;
|
||||
StripQuotes(Cmd->If.RightArg);
|
||||
|
||||
while (_istdigit (*pp))
|
||||
n = n * 10 + (*pp++ - _T('0'));
|
||||
|
||||
x_flag ^= (nErrorLevel != n) ? 0 : X_EXEC;
|
||||
|
||||
x_flag |= X_EMPTY; /* Syntax error if comd empty */
|
||||
hFind = FindFirstFile(Cmd->If.RightArg, &f);
|
||||
if (hFind != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
result = TRUE;
|
||||
FindClose(hFind);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOL bInQuote = FALSE;
|
||||
INT p1len;
|
||||
pp = param;
|
||||
while ( *pp && ( bInQuote || *pp != _T('=') ) )
|
||||
{
|
||||
if ( *pp == _T('\"') )
|
||||
bInQuote = !bInQuote;
|
||||
++pp;
|
||||
}
|
||||
p1len = pp-param;
|
||||
/* check for "==" */
|
||||
if ( *pp++ != _T('=') || *pp++ != _T('=') )
|
||||
{
|
||||
error_syntax ( NULL );
|
||||
return 1;
|
||||
}
|
||||
while (_istspace (*pp)) /* Skip subsequent spaces */
|
||||
pp++;
|
||||
/* Do case-insensitive string comparisons if /I specified */
|
||||
INT (*StringCmp)(LPCTSTR, LPCTSTR) =
|
||||
(Cmd->If.Flags & IFFLAG_IGNORECASE) ? _tcsicmp : _tcscmp;
|
||||
|
||||
/* are the two sides equal*/
|
||||
if ( !_tcsncmp(param,pp,p1len))
|
||||
x_flag ^= X_EXEC;
|
||||
pp += p1len;
|
||||
|
||||
if ( x_flag )
|
||||
if (Cmd->If.Operator == IF_STRINGEQ)
|
||||
{
|
||||
x_flag |= X_EMPTY;
|
||||
/* IF str1 == str2 */
|
||||
result = StringCmp(Cmd->If.LeftArg, Cmd->If.RightArg) == 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = GenericCmp(StringCmp, Cmd->If.LeftArg, Cmd->If.RightArg);
|
||||
switch (Cmd->If.Operator)
|
||||
{
|
||||
case IF_EQU: result = (result == 0); break;
|
||||
case IF_NEQ: result = (result != 0); break;
|
||||
case IF_LSS: result = (result < 0); break;
|
||||
case IF_LEQ: result = (result <= 0); break;
|
||||
case IF_GTR: result = (result > 0); break;
|
||||
case IF_GEQ: result = (result >= 0); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while (_istspace (*pp)) /* skip spaces */
|
||||
pp++;
|
||||
|
||||
if (*pp == _T('('))
|
||||
if (result ^ ((Cmd->If.Flags & IFFLAG_NEGATE) != 0))
|
||||
{
|
||||
if (bc)
|
||||
{
|
||||
pp++;
|
||||
bc->bCmdBlock++;
|
||||
if ((bc->bCmdBlock >= 0) && (bc->bCmdBlock < MAX_PATH))
|
||||
bc->bExecuteBlock[bc->bCmdBlock] = x_flag & X_EXEC;
|
||||
/* commands are in the next lines */
|
||||
if (*pp == _T('\0'))
|
||||
return 0;
|
||||
}
|
||||
/* full condition was true, do the command */
|
||||
return ExecuteCommand(Cmd->Subcommands);
|
||||
}
|
||||
|
||||
if (x_flag & X_EMPTY)
|
||||
else
|
||||
{
|
||||
while (_istspace (*pp)) /* Then skip spaces */
|
||||
pp++;
|
||||
|
||||
if (*pp == _T('\0')) /* If nothing left then syntax err */
|
||||
{
|
||||
error_syntax (NULL);
|
||||
return 1;
|
||||
}
|
||||
/* full condition was false, do the "else" command if there is one */
|
||||
if (Cmd->Subcommands->Next)
|
||||
return ExecuteCommand(Cmd->Subcommands->Next);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (x_flag & X_EXEC)
|
||||
{
|
||||
ParseCommandLine (pp);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
||||
@@ -431,6 +431,12 @@ MakeFullPath(TCHAR * DirPath)
|
||||
TCHAR *p = DirPath;
|
||||
INT n;
|
||||
|
||||
if (CreateDirectory(DirPath, NULL))
|
||||
return TRUE;
|
||||
else if (GetLastError() != ERROR_PATH_NOT_FOUND)
|
||||
return FALSE;
|
||||
|
||||
/* got ERROR_PATH_NOT_FOUND, so try building it up one component at a time */
|
||||
if (p[0] && p[1] == _T(':'))
|
||||
p += 2;
|
||||
while (*p == _T('\\'))
|
||||
@@ -445,8 +451,6 @@ MakeFullPath(TCHAR * DirPath)
|
||||
(GetLastError() != ERROR_ALREADY_EXISTS))
|
||||
return FALSE;
|
||||
} while (p != NULL);
|
||||
if (GetLastError() == ERROR_ALREADY_EXISTS)
|
||||
SetLastError(ERROR_SUCCESS);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -457,55 +461,42 @@ MakeFullPath(TCHAR * DirPath)
|
||||
*/
|
||||
INT cmd_mkdir (LPTSTR param)
|
||||
{
|
||||
LPTSTR dir; /* pointer to the directory to change to */
|
||||
LPTSTR *p = NULL;
|
||||
INT argc;
|
||||
nErrorLevel = 0;
|
||||
LPTSTR *p;
|
||||
INT argc, i;
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_MKDIR_HELP);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
p = split (param, &argc, FALSE);
|
||||
if (argc > 1)
|
||||
{
|
||||
/*JPP 20-Jul-1998 use standard error message */
|
||||
error_too_many_parameters (param);
|
||||
freep (p);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
dir = p[0];
|
||||
|
||||
if (!dir)
|
||||
p = split (param, &argc, FALSE);
|
||||
if (argc == 0)
|
||||
{
|
||||
ConErrResPuts (STRING_ERROR_REQ_PARAM_MISSING);
|
||||
ConErrResPuts(STRING_ERROR_REQ_PARAM_MISSING);
|
||||
nErrorLevel = 1;
|
||||
if(p != NULL)
|
||||
freep (p);
|
||||
freep(p);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!MakeFullPath(dir))
|
||||
{
|
||||
if(GetLastError() == ERROR_PATH_NOT_FOUND)
|
||||
{
|
||||
ConErrResPuts(STRING_MD_ERROR2);
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorMessage (GetLastError(), _T("MD"));
|
||||
}
|
||||
nErrorLevel = 1;
|
||||
freep (p);
|
||||
return 1;
|
||||
}
|
||||
nErrorLevel = 0;
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
if (!MakeFullPath(p[i]))
|
||||
{
|
||||
if(GetLastError() == ERROR_PATH_NOT_FOUND)
|
||||
{
|
||||
ConErrResPuts(STRING_MD_ERROR2);
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorMessage (GetLastError(), _T("MD"));
|
||||
}
|
||||
nErrorLevel = 1;
|
||||
}
|
||||
}
|
||||
|
||||
freep (p);
|
||||
|
||||
return 0;
|
||||
return nErrorLevel;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+178
-28
@@ -1,3 +1,8 @@
|
||||
/*
|
||||
* PARSER.C - command parsing.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <precomp.h>
|
||||
|
||||
#define C_OP_LOWEST C_MULTI
|
||||
@@ -6,10 +11,28 @@ static const TCHAR OpString[][3] = { _T("&"), _T("||"), _T("&&"), _T("|") };
|
||||
|
||||
static const TCHAR RedirString[][3] = { _T("<"), _T(">"), _T(">>") };
|
||||
|
||||
static const TCHAR *const IfOperatorString[] = {
|
||||
_T("cmdextversion"),
|
||||
_T("defined"),
|
||||
_T("errorlevel"),
|
||||
_T("exist"),
|
||||
#define IF_MAX_UNARY IF_EXIST
|
||||
_T("=="),
|
||||
_T("equ"),
|
||||
_T("gtr"),
|
||||
_T("geq"),
|
||||
_T("lss"),
|
||||
_T("leq"),
|
||||
_T("neq"),
|
||||
#define IF_MAX_COMPARISON IF_NEQ
|
||||
};
|
||||
|
||||
/* These three characters act like spaces to the parser in most contexts */
|
||||
#define STANDARD_SEPS _T(",;=")
|
||||
|
||||
static BOOL IsSeparator(TCHAR Char)
|
||||
{
|
||||
/* These three characters act like spaces to the parser */
|
||||
return _istspace(Char) || (Char && _tcschr(_T(",;="), Char));
|
||||
return _istspace(Char) || (Char && _tcschr(STANDARD_SEPS, Char));
|
||||
}
|
||||
|
||||
enum { TOK_END, TOK_NORMAL, TOK_OPERATOR, TOK_REDIRECTION,
|
||||
@@ -70,36 +93,44 @@ static void ParseError()
|
||||
|
||||
/* Yes, cmd has a Lexical Analyzer. Whenever the parser gives an "xxx was
|
||||
* unexpected at this time." message, it shows what the last token read was */
|
||||
static int ParseToken(TCHAR ExtraEnd, BOOL PreserveSpace)
|
||||
static int ParseToken(TCHAR ExtraEnd, TCHAR *Separators)
|
||||
{
|
||||
TCHAR *Out = CurrentToken;
|
||||
TCHAR Char = CurChar;
|
||||
TCHAR Char;
|
||||
int Type;
|
||||
BOOL bInQuote = FALSE;
|
||||
|
||||
if (!PreserveSpace)
|
||||
{
|
||||
while (Char != _T('\n') && IsSeparator(Char))
|
||||
Char = ParseChar();
|
||||
}
|
||||
|
||||
while (Char && Char != _T('\n'))
|
||||
for (Char = CurChar; Char && Char != _T('\n'); Char = ParseChar())
|
||||
{
|
||||
bInQuote ^= (Char == _T('"'));
|
||||
if (!bInQuote)
|
||||
{
|
||||
/* Check for all the myriad ways in which this token
|
||||
* may be brought to an untimely end. */
|
||||
if (Separators != NULL)
|
||||
{
|
||||
if (_istspace(Char) || _tcschr(Separators, Char))
|
||||
{
|
||||
/* Skip leading separators */
|
||||
if (Out == CurrentToken)
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for numbered redirection */
|
||||
if ((Char >= _T('0') && Char <= _T('9') &&
|
||||
(ParsePos == &ParseLine[1] || IsSeparator(ParsePos[-2]))
|
||||
&& (*ParsePos == _T('<') || *ParsePos == _T('>')))
|
||||
|| _tcschr(_T(")&|<>") + (InsideBlock ? 0 : 1), Char)
|
||||
|| (!PreserveSpace && IsSeparator(Char))
|
||||
|| (Char == ExtraEnd))
|
||||
&& (*ParsePos == _T('<') || *ParsePos == _T('>'))))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (Char == ExtraEnd)
|
||||
break;
|
||||
if (InsideBlock && Char == _T(')'))
|
||||
break;
|
||||
if (_tcschr(_T("&|<>"), Char))
|
||||
break;
|
||||
|
||||
if (Char == _T('^'))
|
||||
{
|
||||
Char = ParseChar();
|
||||
@@ -112,7 +143,6 @@ static int ParseToken(TCHAR ExtraEnd, BOOL PreserveSpace)
|
||||
if (Out == &CurrentToken[CMDLINE_LENGTH - 1])
|
||||
break;
|
||||
*Out++ = Char;
|
||||
Char = ParseChar();
|
||||
}
|
||||
|
||||
/* Check if we got at least one character before reaching a special one.
|
||||
@@ -214,7 +244,7 @@ static BOOL ParseRedirection(REDIRECTION **List)
|
||||
if (!*Tok)
|
||||
{
|
||||
/* The file name was not part of this token, so it'll be the next one */
|
||||
if (ParseToken(0, FALSE) != TOK_NORMAL)
|
||||
if (ParseToken(0, STANDARD_SEPS) != TOK_NORMAL)
|
||||
goto fail;
|
||||
Tok = CurrentToken;
|
||||
}
|
||||
@@ -284,7 +314,7 @@ static PARSED_COMMAND *ParseBlock(REDIRECTION *RedirList)
|
||||
InsideBlock--;
|
||||
|
||||
/* Process any trailing redirections */
|
||||
while (ParseToken(0, FALSE) == TOK_REDIRECTION)
|
||||
while (ParseToken(0, STANDARD_SEPS) == TOK_REDIRECTION)
|
||||
{
|
||||
if (!ParseRedirection(&Cmd->Redirections))
|
||||
{
|
||||
@@ -295,6 +325,94 @@ static PARSED_COMMAND *ParseBlock(REDIRECTION *RedirList)
|
||||
return Cmd;
|
||||
}
|
||||
|
||||
/* Parse an IF statement */
|
||||
static PARSED_COMMAND *ParseIf(void)
|
||||
{
|
||||
PARSED_COMMAND *Cmd = cmd_alloc(sizeof(PARSED_COMMAND));
|
||||
memset(Cmd, 0, sizeof(PARSED_COMMAND));
|
||||
Cmd->Type = C_IF;
|
||||
|
||||
int Type = ParseToken(0, STANDARD_SEPS);
|
||||
if (_tcsicmp(CurrentToken, _T("/I")) == 0)
|
||||
{
|
||||
Cmd->If.Flags |= IFFLAG_IGNORECASE;
|
||||
Type = ParseToken(0, STANDARD_SEPS);
|
||||
}
|
||||
if (_tcsicmp(CurrentToken, _T("not")) == 0)
|
||||
{
|
||||
Cmd->If.Flags |= IFFLAG_NEGATE;
|
||||
Type = ParseToken(0, STANDARD_SEPS);
|
||||
}
|
||||
|
||||
if (Type != TOK_NORMAL)
|
||||
{
|
||||
FreeCommand(Cmd);
|
||||
ParseError();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Check for unary operators */
|
||||
for (; Cmd->If.Operator <= IF_MAX_UNARY; Cmd->If.Operator++)
|
||||
{
|
||||
if (_tcsicmp(CurrentToken, IfOperatorString[Cmd->If.Operator]) == 0)
|
||||
{
|
||||
if (ParseToken(0, STANDARD_SEPS) != TOK_NORMAL)
|
||||
{
|
||||
FreeCommand(Cmd);
|
||||
ParseError();
|
||||
return NULL;
|
||||
}
|
||||
Cmd->If.RightArg = cmd_dup(CurrentToken);
|
||||
goto condition_done;
|
||||
}
|
||||
}
|
||||
|
||||
/* It must be a two-argument (comparison) operator. It could be ==, so
|
||||
* the equals sign can't be treated as whitespace here. */
|
||||
Cmd->If.LeftArg = cmd_dup(CurrentToken);
|
||||
ParseToken(0, _T(",;"));
|
||||
|
||||
/* The right argument can come immediately after == */
|
||||
if (_tcsnicmp(CurrentToken, _T("=="), 2) == 0 && CurrentToken[2])
|
||||
{
|
||||
Cmd->If.RightArg = cmd_dup(&CurrentToken[2]);
|
||||
goto condition_done;
|
||||
}
|
||||
|
||||
for (; Cmd->If.Operator <= IF_MAX_COMPARISON; Cmd->If.Operator++)
|
||||
{
|
||||
if (_tcsicmp(CurrentToken, IfOperatorString[Cmd->If.Operator]) == 0)
|
||||
{
|
||||
if (ParseToken(0, STANDARD_SEPS) != TOK_NORMAL)
|
||||
break;
|
||||
Cmd->If.RightArg = cmd_dup(CurrentToken);
|
||||
goto condition_done;
|
||||
}
|
||||
}
|
||||
FreeCommand(Cmd);
|
||||
ParseError();
|
||||
return NULL;
|
||||
|
||||
condition_done:
|
||||
Cmd->Subcommands = ParseCommandOp(C_OP_LOWEST);
|
||||
if (Cmd->Subcommands == NULL)
|
||||
{
|
||||
FreeCommand(Cmd);
|
||||
return NULL;
|
||||
}
|
||||
if (_tcsicmp(CurrentToken, _T("else")) == 0)
|
||||
{
|
||||
Cmd->Subcommands->Next = ParseCommandOp(C_OP_LOWEST);
|
||||
if (Cmd->Subcommands->Next == NULL)
|
||||
{
|
||||
FreeCommand(Cmd);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return Cmd;
|
||||
}
|
||||
|
||||
static PARSED_COMMAND *ParseCommandPart(void)
|
||||
{
|
||||
TCHAR ParsedLine[CMDLINE_LENGTH];
|
||||
@@ -318,7 +436,7 @@ static PARSED_COMMAND *ParseCommandPart(void)
|
||||
{
|
||||
/* "Ignore" the rest of the line.
|
||||
* (Line continuations will still be parsed, though.) */
|
||||
while (ParseToken(0, TRUE) != TOK_END)
|
||||
while (ParseToken(0, NULL) != TOK_END)
|
||||
;
|
||||
return NULL;
|
||||
}
|
||||
@@ -339,7 +457,7 @@ static PARSED_COMMAND *ParseCommandPart(void)
|
||||
/* Get the head of the command */
|
||||
while (1)
|
||||
{
|
||||
Type = ParseToken(_T('('), FALSE);
|
||||
Type = ParseToken(_T('('), STANDARD_SEPS);
|
||||
if (Type == TOK_NORMAL)
|
||||
{
|
||||
Pos = _stpcpy(ParsedLine, CurrentToken);
|
||||
@@ -367,12 +485,22 @@ static PARSED_COMMAND *ParseCommandPart(void)
|
||||
}
|
||||
TailOffset = Pos - ParsedLine;
|
||||
|
||||
/* FIXME: FOR, IF, and REM need special processing by the parser. */
|
||||
/* Check for special forms */
|
||||
if (_tcsicmp(ParsedLine, _T("if")) == 0)
|
||||
{
|
||||
if (RedirList)
|
||||
{
|
||||
ParseError();
|
||||
FreeRedirection(RedirList);
|
||||
return NULL;
|
||||
}
|
||||
return ParseIf();
|
||||
}
|
||||
|
||||
/* Now get the tail */
|
||||
while (1)
|
||||
{
|
||||
Type = ParseToken(0, TRUE);
|
||||
Type = ParseToken(0, NULL);
|
||||
if (Type == TOK_NORMAL)
|
||||
{
|
||||
if (Pos + _tcslen(CurrentToken) >= &ParsedLine[CMDLINE_LENGTH])
|
||||
@@ -394,13 +522,13 @@ static PARSED_COMMAND *ParseCommandPart(void)
|
||||
}
|
||||
}
|
||||
|
||||
Cmd = cmd_alloc(FIELD_OFFSET(PARSED_COMMAND, CommandLine[Pos + 1 - ParsedLine]));
|
||||
Cmd = cmd_alloc(FIELD_OFFSET(PARSED_COMMAND, Command.CommandLine[Pos + 1 - ParsedLine]));
|
||||
Cmd->Type = C_COMMAND;
|
||||
Cmd->Next = NULL;
|
||||
Cmd->Subcommands = NULL;
|
||||
Cmd->Redirections = RedirList;
|
||||
_tcscpy(Cmd->CommandLine, ParsedLine);
|
||||
Cmd->Tail = Cmd->CommandLine + TailOffset;
|
||||
_tcscpy(Cmd->Command.CommandLine, ParsedLine);
|
||||
Cmd->Command.Tail = Cmd->Command.CommandLine + TailOffset;
|
||||
return Cmd;
|
||||
}
|
||||
|
||||
@@ -487,7 +615,7 @@ EchoCommand(PARSED_COMMAND *Cmd)
|
||||
switch (Cmd->Type)
|
||||
{
|
||||
case C_COMMAND:
|
||||
ConOutPrintf(_T("%s"), Cmd->CommandLine);
|
||||
ConOutPrintf(_T("%s"), Cmd->Command.CommandLine);
|
||||
break;
|
||||
case C_QUIET:
|
||||
return;
|
||||
@@ -509,6 +637,23 @@ EchoCommand(PARSED_COMMAND *Cmd)
|
||||
ConOutPrintf(_T(" %s "), OpString[Cmd->Type - C_OP_LOWEST]);
|
||||
EchoCommand(Sub->Next);
|
||||
break;
|
||||
case C_IF:
|
||||
ConOutPrintf(_T("if"));
|
||||
if (Cmd->If.Flags & IFFLAG_IGNORECASE)
|
||||
ConOutPrintf(_T(" /I"));
|
||||
if (Cmd->If.Flags & IFFLAG_NEGATE)
|
||||
ConOutPrintf(_T(" not"));
|
||||
if (Cmd->If.LeftArg)
|
||||
ConOutPrintf(_T(" %s"), Cmd->If.LeftArg);
|
||||
ConOutPrintf(_T(" %s %s "), IfOperatorString[Cmd->If.Operator], Cmd->If.RightArg);
|
||||
Sub = Cmd->Subcommands;
|
||||
EchoCommand(Sub);
|
||||
if (Sub->Next)
|
||||
{
|
||||
ConOutPrintf(_T(" else "));
|
||||
EchoCommand(Sub->Next);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
for (Redir = Cmd->Redirections; Redir; Redir = Redir->Next)
|
||||
@@ -526,5 +671,10 @@ FreeCommand(PARSED_COMMAND *Cmd)
|
||||
if (Cmd->Next)
|
||||
FreeCommand(Cmd->Next);
|
||||
FreeRedirection(Cmd->Redirections);
|
||||
if (Cmd->Type == C_IF)
|
||||
{
|
||||
cmd_free(Cmd->If.LeftArg);
|
||||
cmd_free(Cmd->If.RightArg);
|
||||
}
|
||||
cmd_free(Cmd);
|
||||
}
|
||||
|
||||
@@ -151,12 +151,12 @@ ScmCreateManagerHandle(LPWSTR lpDatabaseName,
|
||||
if (lpDatabaseName == NULL)
|
||||
lpDatabaseName = SERVICES_ACTIVE_DATABASEW;
|
||||
|
||||
if (wcsicmp(lpDatabaseName,SERVICES_FAILED_DATABASEW)==0)
|
||||
if (_wcsicmp(lpDatabaseName,SERVICES_FAILED_DATABASEW)==0)
|
||||
{
|
||||
DPRINT1("Database %S, does not exist\n",lpDatabaseName);
|
||||
return ERROR_DATABASE_DOES_NOT_EXIST;
|
||||
}
|
||||
else if (wcsicmp(lpDatabaseName, SERVICES_ACTIVE_DATABASEW) != 0)
|
||||
else if (_wcsicmp(lpDatabaseName, SERVICES_ACTIVE_DATABASEW) != 0)
|
||||
{
|
||||
DPRINT1("Invalid Database name %S.\n",lpDatabaseName);
|
||||
return ERROR_INVALID_NAME;
|
||||
@@ -332,7 +332,7 @@ Int_EnumDependentServicesW(HKEY hServicesKey,
|
||||
/* Can be more than one Dependencies in the DependOnService string */
|
||||
while (wcslen(lpszValueBuf + dwDependServiceStrPtr) > 0)
|
||||
{
|
||||
if (wcsicmp(lpszValueBuf + dwDependServiceStrPtr, lpService->lpServiceName) == 0)
|
||||
if (_wcsicmp(lpszValueBuf + dwDependServiceStrPtr, lpService->lpServiceName) == 0)
|
||||
{
|
||||
/* Get the current enumed service pointer */
|
||||
lpCurrentService = ScmGetServiceEntryByName(lpszNameBuf);
|
||||
@@ -1344,7 +1344,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
|
||||
|
||||
/* First check, if it's already good */
|
||||
if (ServiceNameLen > 12 &&
|
||||
!wcsnicmp(L"\\SystemRoot\\", CanonName, 12))
|
||||
!_wcsnicmp(L"\\SystemRoot\\", CanonName, 12))
|
||||
{
|
||||
*RelativeName = LocalAlloc(LMEM_ZEROINIT, ServiceNameLen * sizeof(WCHAR) + sizeof(WCHAR));
|
||||
if (*RelativeName == NULL)
|
||||
@@ -1362,7 +1362,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
|
||||
|
||||
/* If it has %SystemRoot% prefix, substitute it to \System*/
|
||||
if (ServiceNameLen > 13 &&
|
||||
!wcsnicmp(L"%SystemRoot%\\", CanonName, 13))
|
||||
!_wcsnicmp(L"%SystemRoot%\\", CanonName, 13))
|
||||
{
|
||||
/* There is no +sizeof(wchar_t) because the name is less by 1 wchar */
|
||||
*RelativeName = LocalAlloc(LMEM_ZEROINIT, ServiceNameLen * sizeof(WCHAR));
|
||||
@@ -1432,7 +1432,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
|
||||
Expanded[ExpandedLen] = 0;
|
||||
|
||||
if (ServiceNameLen > ExpandedLen &&
|
||||
!wcsnicmp(Expanded, CanonName, ExpandedLen))
|
||||
!_wcsnicmp(Expanded, CanonName, ExpandedLen))
|
||||
{
|
||||
/* Only \SystemRoot\ is missing */
|
||||
*RelativeName = LocalAlloc(LMEM_ZEROINIT,
|
||||
@@ -1504,7 +1504,7 @@ ScmConvertToBootPathName(wchar_t *CanonName, wchar_t **RelativeName)
|
||||
|
||||
ExpandedLen = LinkTarget.Length / sizeof(WCHAR);
|
||||
if ((ServiceNameLen > ExpandedLen) &&
|
||||
!wcsnicmp(LinkTarget.Buffer, CanonName, ExpandedLen))
|
||||
!_wcsnicmp(LinkTarget.Buffer, CanonName, ExpandedLen))
|
||||
{
|
||||
*RelativeName = LocalAlloc(LMEM_ZEROINIT,
|
||||
(ServiceNameLen - ExpandedLen) * sizeof(WCHAR) + 13*sizeof(WCHAR));
|
||||
@@ -1584,7 +1584,7 @@ ScmCanonDriverImagePath(DWORD dwStartType,
|
||||
|
||||
/* 12 is wcslen(L"\\SystemRoot\\") */
|
||||
if (ServiceNameLen > 12 &&
|
||||
!wcsnicmp(L"\\SystemRoot\\", lpServiceName, 12))
|
||||
!_wcsnicmp(L"\\SystemRoot\\", lpServiceName, 12))
|
||||
{
|
||||
/* SystemRoot prefix is already included */
|
||||
|
||||
@@ -1609,7 +1609,7 @@ ScmCanonDriverImagePath(DWORD dwStartType,
|
||||
|
||||
/* Check if it has %SystemRoot% (len=13) */
|
||||
if (ServiceNameLen > 13 &&
|
||||
!wcsnicmp(L"%%SystemRoot%%\\", lpServiceName, 13))
|
||||
!_wcsnicmp(L"%%SystemRoot%%\\", lpServiceName, 13))
|
||||
{
|
||||
/* Substitute %SystemRoot% with \\SystemRoot\\ */
|
||||
*lpCanonName = LocalAlloc(LMEM_ZEROINIT, ServiceNameLen * sizeof(WCHAR) + sizeof(WCHAR));
|
||||
@@ -1828,7 +1828,7 @@ DWORD RCreateServiceW(
|
||||
/* Fill the display name */
|
||||
if (lpDisplayName != NULL &&
|
||||
*lpDisplayName != 0 &&
|
||||
wcsicmp(lpService->lpDisplayName, lpDisplayName) != 0)
|
||||
_wcsicmp(lpService->lpDisplayName, lpDisplayName) != 0)
|
||||
{
|
||||
lpService->lpDisplayName = (WCHAR*) HeapAlloc(GetProcessHeap(), 0,
|
||||
(wcslen(lpDisplayName) + 1) * sizeof(WCHAR));
|
||||
|
||||
@@ -120,7 +120,7 @@ BOOL IsConsoleShell(VOID)
|
||||
NextOption = wcschr(CurrentOption, L' ');
|
||||
if (NextOption)
|
||||
*NextOption = L'\0';
|
||||
if (wcsicmp(CurrentOption, L"CONSOLE") == 0)
|
||||
if (_wcsicmp(CurrentOption, L"CONSOLE") == 0)
|
||||
{
|
||||
TRACE("Found 'CONSOLE' boot option\n");
|
||||
ret = TRUE;
|
||||
|
||||
@@ -85,4 +85,9 @@
|
||||
-->
|
||||
<property name="_ELF_" value="0" />
|
||||
|
||||
<!--
|
||||
Whether to compile the multi processor versions for ntoskrnl and hal.
|
||||
-->
|
||||
<property name="BUILD_MP" value="1" />
|
||||
|
||||
</group>
|
||||
|
||||
@@ -697,7 +697,7 @@ LoadSoundFiles(HWND hwndDlg)
|
||||
if (lResult != CB_ERR)
|
||||
{
|
||||
wcscpy(&szPath[length-1], FileData.cFileName);
|
||||
SendDlgItemMessageW(hwndDlg, IDC_SOUND_LIST, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)wcsdup(szPath));
|
||||
SendDlgItemMessageW(hwndDlg, IDC_SOUND_LIST, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)_wcsdup(szPath));
|
||||
}
|
||||
}while(FindNextFileW(hFile, &FileData) != 0);
|
||||
|
||||
|
||||
@@ -140,9 +140,9 @@ ReadFreeldrSection(HINF hInf, WCHAR *szSectionName)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!wcsnicmp(szName, L"BootType", 8))
|
||||
if (!_wcsnicmp(szName, L"BootType", 8))
|
||||
{
|
||||
if (!wcsnicmp(szValue, L"ReactOS", 7))
|
||||
if (!_wcsnicmp(szValue, L"ReactOS", 7))
|
||||
{
|
||||
//FIXME store as enum
|
||||
pRecord->BootType = 1;
|
||||
@@ -152,11 +152,11 @@ ReadFreeldrSection(HINF hInf, WCHAR *szSectionName)
|
||||
pRecord->BootType = 0;
|
||||
}
|
||||
}
|
||||
else if (!wcsnicmp(szName, L"SystemPath", 10))
|
||||
else if (!_wcsnicmp(szName, L"SystemPath", 10))
|
||||
{
|
||||
wcscpy(pRecord->szBootPath, szValue);
|
||||
}
|
||||
else if (!wcsnicmp(szName, L"Options", 7))
|
||||
else if (!_wcsnicmp(szName, L"Options", 7))
|
||||
{
|
||||
//FIXME store flags as values
|
||||
wcscpy(pRecord->szOptions, szValue);
|
||||
@@ -329,12 +329,12 @@ LoadBootSettings(HINF hInf, HWND hwndDlg)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!wcsnicmp(szName, L"timeout", 7))
|
||||
if (!_wcsnicmp(szName, L"timeout", 7))
|
||||
{
|
||||
TimeOut = _wtoi(szValue);
|
||||
}
|
||||
|
||||
if (!wcsnicmp(szName, L"default", 7))
|
||||
if (!_wcsnicmp(szName, L"default", 7))
|
||||
{
|
||||
wcscpy(szDefaultOS, szValue);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<importlibrary definition="msgina.spec" />
|
||||
<include base="msgina">.</include>
|
||||
<include base="msgina">include</include>
|
||||
<include base="ReactOS">include/reactos/wine</include>
|
||||
<library>ntdll</library>
|
||||
<library>wine</library>
|
||||
<library>kernel32</library>
|
||||
|
||||
@@ -430,7 +430,7 @@ FindNetworkComponent(
|
||||
{
|
||||
while(pHead)
|
||||
{
|
||||
if (!wcsicmp(pHead->szId, pszwComponentId))
|
||||
if (!_wcsicmp(pHead->szId, pszwComponentId))
|
||||
{
|
||||
return INetCfgComponent_Constructor(NULL, &IID_INetCfgComponent, (LPVOID*)pComponent, pHead, iface);
|
||||
}
|
||||
|
||||
@@ -2812,7 +2812,7 @@ Initialize(TcpipConfNotifyImpl * This)
|
||||
{
|
||||
szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0';
|
||||
}
|
||||
if (!wcsicmp(szBuffer, pStr))
|
||||
if (!_wcsicmp(szBuffer, pStr))
|
||||
{
|
||||
bFound = TRUE;
|
||||
break;
|
||||
|
||||
@@ -527,7 +527,7 @@ GetAdapterIndexFromNetCfgInstanceId(PIP_ADAPTER_INFO pAdapterInfo, LPWSTR szNetC
|
||||
{
|
||||
szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0';
|
||||
}
|
||||
if (!wcsicmp(szBuffer, szNetCfg))
|
||||
if (!_wcsicmp(szBuffer, szNetCfg))
|
||||
{
|
||||
*pIndex = pCurrentAdapter->Index;
|
||||
return TRUE;
|
||||
|
||||
@@ -97,7 +97,7 @@ GetINetCfgComponent(INetCfg * pNCfg, INetConnectionPropertyUiImpl * This, INetCf
|
||||
hr = INetCfgComponent_GetDisplayName(pNCg, &pName);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
if (!wcsicmp(pName, This->pProperties->pszwDeviceName))
|
||||
if (!_wcsicmp(pName, This->pProperties->pszwDeviceName))
|
||||
{
|
||||
*pOut = pNCg;
|
||||
IEnumNetCfgComponent_Release(pEnumCfg);
|
||||
|
||||
@@ -591,7 +591,7 @@ FindNetworkAdapter(HDEVINFO hInfo, SP_DEVINFO_DATA *pDevInfo, LPWSTR pGuid)
|
||||
break;
|
||||
}
|
||||
RegCloseKey(hSubKey);
|
||||
if (!wcsicmp(pGuid, szNetCfg))
|
||||
if (!_wcsicmp(pGuid, szNetCfg))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ SearchDriverRecursive(
|
||||
{
|
||||
LPCWSTR pszExtension = GetFileExt(FileName);
|
||||
|
||||
if ((wcsicmp(pszExtension, L".inf") == 0) && (wcscmp(LastDirPath, DirPath) != 0))
|
||||
if ((_wcsicmp(pszExtension, L".inf") == 0) && (wcscmp(LastDirPath, DirPath) != 0))
|
||||
{
|
||||
wcscpy(LastDirPath, DirPath);
|
||||
|
||||
|
||||
@@ -365,7 +365,7 @@ SaveCustomPath(
|
||||
TRACE("ComboBox_GetLBText() failed\n");
|
||||
goto cleanup;
|
||||
}
|
||||
else if (UseCustomPath && wcsicmp(CustomPath, pBuffer) == 0)
|
||||
else if (UseCustomPath && _wcsicmp(CustomPath, pBuffer) == 0)
|
||||
UseCustomPath = FALSE;
|
||||
pBuffer += 1 + Length;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<module name="ntmarta" type="win32dll" baseaddress="${BASEADDRESS_NTMARTA}" installbase="system32" installname="ntmarta.dll" unicode="yes">
|
||||
<importlibrary definition="ntmarta.spec" />
|
||||
<include base="ntmarta">.</include>
|
||||
<define name="__WINESRC__" />
|
||||
<define name="_WIN32_WINNT">0x600</define>
|
||||
<library>ntdll</library>
|
||||
<library>kernel32</library>
|
||||
|
||||
@@ -2261,7 +2261,7 @@ void _ILGetFileType(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
|
||||
}
|
||||
/* display Ext-file as description */
|
||||
strcpy(pOut, sType);
|
||||
strupr(pOut);
|
||||
_strupr(pOut);
|
||||
/* load localized file string */
|
||||
sTemp[0] = '\0';
|
||||
if(LoadStringA(shell32_hInstance, IDS_SHV_COLUMN1, sTemp, 64))
|
||||
|
||||
@@ -2637,7 +2637,7 @@ SH_ShellLinkDlgProc(
|
||||
return TRUE;
|
||||
}
|
||||
ptr = wcsrchr(szBuffer, L'.');
|
||||
if (ptr && !wcsnicmp(ptr, L".lnk", 4))
|
||||
if (ptr && !_wcsnicmp(ptr, L".lnk", 4))
|
||||
{
|
||||
// FIXME load localized error msg
|
||||
MessageBoxW( hwndDlg, L"You cannot create a link to a shortcut", L"Error", MB_ICONERROR );
|
||||
|
||||
@@ -360,7 +360,7 @@ static void *SHELL_BuildEnvW( const WCHAR *path )
|
||||
while (*p)
|
||||
{
|
||||
int len = wcslen(p) + 1;
|
||||
if (!wcsnicmp( p, wPath, 5 )) got_path = TRUE;
|
||||
if (!_wcsnicmp( p, wPath, 5 )) got_path = TRUE;
|
||||
total += len;
|
||||
p += len;
|
||||
}
|
||||
@@ -378,7 +378,7 @@ static void *SHELL_BuildEnvW( const WCHAR *path )
|
||||
{
|
||||
int len = wcslen(p) + 1;
|
||||
memcpy( p2, p, len * sizeof(WCHAR) );
|
||||
if (!wcsnicmp( p, wPath, 5 ))
|
||||
if (!_wcsnicmp( p, wPath, 5 ))
|
||||
{
|
||||
p2[len - 1] = ';';
|
||||
wcscpy( p2 + len, path );
|
||||
@@ -1627,7 +1627,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
|
||||
|
||||
/* Remove File Protocol from lpFile */
|
||||
/* In the case file://path/file */
|
||||
if (!wcsnicmp(lpFile, wFile, iSize))
|
||||
if (!_wcsnicmp(lpFile, wFile, iSize))
|
||||
{
|
||||
lpFile += iSize;
|
||||
while (*lpFile == ':') lpFile++;
|
||||
@@ -1635,7 +1635,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
|
||||
retval = execute_from_key(lpstrProtocol, lpFile, NULL, sei_tmp.lpParameters, wcmd, execfunc, &sei_tmp, sei);
|
||||
}
|
||||
/* Check if file specified is in the form www.??????.*** */
|
||||
else if (!wcsnicmp(lpFile, wWww, 3))
|
||||
else if (!_wcsnicmp(lpFile, wWww, 3))
|
||||
{
|
||||
/* if so, append lpFile http:// and call ShellExecute */
|
||||
WCHAR lpstrTmpFile[256];
|
||||
|
||||
@@ -161,13 +161,13 @@ PSHELLNEW_ITEM LoadItem(LPWSTR szKeyName)
|
||||
pNewItem = HeapAlloc(GetProcessHeap(), 0, sizeof(SHELLNEW_ITEM));
|
||||
pNewItem->Type = type;
|
||||
if (szTarget)
|
||||
pNewItem->szTarget = wcsdup(szTarget);
|
||||
pNewItem->szTarget = _wcsdup(szTarget);
|
||||
else
|
||||
pNewItem->szTarget = NULL;
|
||||
|
||||
pNewItem->szDesc = wcsdup(szDesc);
|
||||
pNewItem->szIcon = wcsdup(szIcon);
|
||||
pNewItem->szExt = wcsdup(szKeyName);
|
||||
pNewItem->szDesc = _wcsdup(szDesc);
|
||||
pNewItem->szIcon = _wcsdup(szIcon);
|
||||
pNewItem->szExt = _wcsdup(szKeyName);
|
||||
pNewItem->Next = NULL;
|
||||
break;
|
||||
}
|
||||
@@ -388,7 +388,7 @@ DoShellNewCmd(INewMenuImpl * This, LPCMINVOKECOMMANDINFO lpcmi)
|
||||
|
||||
ZeroMemory(&sInfo, sizeof(sInfo));
|
||||
sInfo.cb = sizeof(sizeof(sInfo));
|
||||
szCmd = wcsdup(ptr);
|
||||
szCmd = _wcsdup(ptr);
|
||||
if (!szCmd)
|
||||
break;
|
||||
if (CreateProcessW(NULL, szCmd, NULL, NULL,FALSE,0,NULL,NULL,&sInfo, &pi))
|
||||
|
||||
@@ -670,13 +670,13 @@ LookupIconIdFromDirectoryEx(PBYTE xdir,
|
||||
{
|
||||
ColorBits = 1;
|
||||
}
|
||||
else if (g_psi->SystemMetrics[SM_SAMEDISPLAYFORMAT] || (cFlag & LR_VGACOLOR) )
|
||||
else if (cFlag & LR_VGACOLOR)
|
||||
{
|
||||
ColorBits = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
ColorBits = 0;
|
||||
ColorBits = g_psi->BitsPixel;
|
||||
}
|
||||
|
||||
if(bIcon)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<module name="winspool" type="win32dll" extension=".drv" baseaddress="${BASEADDRESS_WINSPOOL}" installbase="system32" installname="winspool.drv" allowwarnings="true" unicode="yes">
|
||||
<importlibrary definition="winspool.spec" />
|
||||
<include base="winspool">.</include>
|
||||
<include base="ReactOS">include/reactos/wine</include>
|
||||
<define name="_DISABLE_TIDENTS" />
|
||||
<library>ntdll</library>
|
||||
<library>kernel32</library>
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
<xi:include href="halx86/hal_generic_up.rbuild" />
|
||||
<xi:include href="halx86/hal_generic_pc.rbuild" />
|
||||
<xi:include href="halx86/halup.rbuild" />
|
||||
<xi:include href="halx86/halmp.rbuild" />
|
||||
<if property="BUILD_MP" value="1">
|
||||
<xi:include href="halx86/halmp.rbuild" />
|
||||
</if>
|
||||
<xi:include href="halx86/halxbox.rbuild" />
|
||||
</directory>
|
||||
</if>
|
||||
|
||||
+58
-398
@@ -4,11 +4,12 @@
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
|
||||
#ifndef _INC_CRTDEFS
|
||||
#define _INC_CRTDEFS
|
||||
#ifndef _INC_MINGW
|
||||
#define _INC_MINGW
|
||||
|
||||
#define _INTEGRAL_MAX_BITS 64
|
||||
|
||||
// ROS HACK!
|
||||
#ifndef _WIN64
|
||||
#ifndef _USE_32BIT_TIME_T
|
||||
#define _USE_32BIT_TIME_T
|
||||
@@ -30,69 +31,14 @@
|
||||
#define __stdcall
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# ifdef _DLL
|
||||
# ifndef __MINGW_IMPORT
|
||||
# define __MINGW_IMPORT __declspec(dllimport)
|
||||
# endif
|
||||
# ifndef _CRTIMP
|
||||
# define _CRTIMP __declspec(dllimport)
|
||||
# endif
|
||||
# else
|
||||
# ifndef __MINGW_IMPORT
|
||||
# define __MINGW_IMPORT
|
||||
# endif
|
||||
# ifndef _CRTIMP
|
||||
# define _CRTIMP
|
||||
# endif
|
||||
#ifdef __GNUC__
|
||||
/* These compilers do support __declspec */
|
||||
# if !defined(__MINGW32__) && !defined(__MINGW64__) && !defined(__CYGWIN32__)
|
||||
# define __declspec(x) __attribute__((x))
|
||||
# endif
|
||||
# define __DECLSPEC_SUPPORTED
|
||||
# define __attribute__(x) /* nothing */
|
||||
# define __restrict__ /* nothing */
|
||||
#elif defined(__GNUC__)
|
||||
# ifdef __declspec
|
||||
# ifndef __MINGW_IMPORT
|
||||
# ifdef _DLL
|
||||
/* Note the extern. This is needed to work around GCC's
|
||||
limitations in handling dllimport attribute. */
|
||||
# define __MINGW_IMPORT extern __attribute__ ((__dllimport__))
|
||||
# else
|
||||
# define __MINGW_IMPORT extern
|
||||
# endif
|
||||
# endif
|
||||
# ifndef _CRTIMP
|
||||
# undef __USE_CRTIMP
|
||||
# if !defined (_CRTBLD) && !defined (_SYSCRT)
|
||||
# define __USE_CRTIMP 1
|
||||
# endif
|
||||
# ifdef __USE_CRTIMP
|
||||
# ifdef _DLL
|
||||
# define _CRTIMP __attribute__ ((dllimport))
|
||||
# else
|
||||
# define _CRTIMP
|
||||
# endif
|
||||
# else
|
||||
# define _CRTIMP
|
||||
# endif
|
||||
# endif
|
||||
# define __DECLSPEC_SUPPORTED
|
||||
# else /* __declspec */
|
||||
# undef __DECLSPEC_SUPPORTED
|
||||
# undef __MINGW_IMPORT
|
||||
# ifndef _CRTIMP
|
||||
# define _CRTIMP
|
||||
# endif
|
||||
# endif /* __declspec */
|
||||
#else
|
||||
# ifndef __MINGW_IMPORT
|
||||
# define __MINGW_IMPORT __declspec(dllimport)
|
||||
# endif
|
||||
# ifndef _CRTIMP
|
||||
# define _CRTIMP __declspec(dllimport)
|
||||
# endif
|
||||
# define __DECLSPEC_SUPPORTED
|
||||
# define __attribute__(x) /* nothing */
|
||||
#endif /* __GNUC__ */
|
||||
#endif
|
||||
|
||||
#if defined (__GNUC__) && defined (__GNUC_MINOR__)
|
||||
#define __MINGW_GNUC_PREREQ(major, minor) \
|
||||
@@ -102,12 +48,8 @@ limitations in handling dllimport attribute. */
|
||||
#define __MINGW_GNUC_PREREQ(major, minor) 0
|
||||
#endif
|
||||
|
||||
#if defined (_MSC_VER)
|
||||
#define __MINGW_MSC_PREREQ(major,minor) \
|
||||
((_MSC_VER /100) > (major) \
|
||||
|| ((_MSC)VER /100) == (major) && (_MSC_VER) % 100) >=(minor)))
|
||||
#else
|
||||
#define __MINGW_MSC_PREREQ(major, minor) 0
|
||||
#if !defined (_MSC_VER)
|
||||
#define __MINGW_MSC_PREREQ(major, minor) 0
|
||||
#endif
|
||||
|
||||
#define USE___UUIDOF 0
|
||||
@@ -115,9 +57,7 @@ limitations in handling dllimport attribute. */
|
||||
#ifdef __cplusplus
|
||||
# define __CRT_INLINE inline
|
||||
#else
|
||||
# if defined(_MSC_VER)
|
||||
# define __CRT_INLINE __inline
|
||||
# elif __GNUC_STDC_INLINE__
|
||||
# if ( __MINGW_GNUC_PREREQ(4, 3) && __STDC_VERSION__ >= 199901L)
|
||||
# define __CRT_INLINE extern inline __attribute__((__gnu_inline__))
|
||||
# else
|
||||
# define __CRT_INLINE extern __inline__
|
||||
@@ -134,6 +74,16 @@ limitations in handling dllimport attribute. */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
# define __unaligned
|
||||
#else
|
||||
# ifdef __GNUC__
|
||||
# define __unaligned __attribute((packed))
|
||||
# else
|
||||
# define __UNUSED_PARAM(x) x
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define __MINGW_ATTRIB_NORETURN __attribute__ ((__noreturn__))
|
||||
#define __MINGW_ATTRIB_CONST __attribute__ ((__const__))
|
||||
@@ -186,48 +136,25 @@ allow GCC to optimize away some EH unwind code, at least in DW2 case. */
|
||||
# define __MSVCRT_VERSION__ 0x0700
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define __mingw_va_start(v,l) __builtin_va_start(v,l)
|
||||
#define __mingw_va_end(v) __builtin_va_end(v)
|
||||
#define __mingw_va_arg(v,l) __builtin_va_arg(v,l)
|
||||
#define __mingw_va_copy(d,s) __builtin_va_copy(d,s)
|
||||
#elif defined(_MSC_VER)
|
||||
#define __mingw_va_start(v,l) __msc_va_start(v,l)
|
||||
#define __mingw_va_end(v) __msc_va_end(v)
|
||||
#define __mingw_va_arg(v,l) __msc_va_arg(v,l)
|
||||
#define __mingw_va_copy(d,s) __msc_va_copy(d,s)
|
||||
#endif
|
||||
|
||||
//#ifndef WINVER
|
||||
//#define WINVER 0x0502
|
||||
//#endif
|
||||
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x502
|
||||
#endif
|
||||
//#ifndef _WIN32_WINNT
|
||||
//#define _WIN32_WINNT 0x502
|
||||
//#endif
|
||||
|
||||
#ifndef _INT128_DEFINED
|
||||
#define _INT128_DEFINED
|
||||
#ifdef __GNUC__
|
||||
#define __int8 char
|
||||
#define __int16 short
|
||||
#define __int32 int
|
||||
#define __int64 long long
|
||||
#ifdef _WIN64
|
||||
|
||||
typedef int __int128 __attribute__ ((mode (TI)));
|
||||
|
||||
#endif
|
||||
|
||||
#define __ptr32
|
||||
#define __ptr64
|
||||
#define __unaligned __attribute ((packed))
|
||||
#define __forceinline extern __inline
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
#error Only Win32 target is supported!
|
||||
typedef int __int128 __attribute__ ((mode (TI)));
|
||||
# endif
|
||||
# define __ptr32
|
||||
# define __ptr64
|
||||
# define __forceinline extern __inline __attribute((always_inline))
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -240,190 +167,15 @@ typedef int __int128 __attribute__ ((mode (TI)));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#undef _CRT_PACKING
|
||||
#define _CRT_PACKING 8
|
||||
|
||||
#ifdef _WIN64
|
||||
#undef USE_MINGW_SETJMP_TWO_ARGS
|
||||
#define USE_MINGW_SETJMP_TWO_ARGS
|
||||
#endif
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
#include <vadefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _CRT_STRINGIZE
|
||||
#define __CRT_STRINGIZE(_Value) #_Value
|
||||
#define _CRT_STRINGIZE(_Value) __CRT_STRINGIZE(_Value)
|
||||
#endif
|
||||
|
||||
#ifndef _CRT_WIDE
|
||||
#define __CRT_WIDE(_String) L ## _String
|
||||
#define _CRT_WIDE(_String) __CRT_WIDE(_String)
|
||||
#endif
|
||||
#ifndef _W64
|
||||
#define _W64
|
||||
#endif
|
||||
|
||||
#ifndef _CRTIMP_NOIA64
|
||||
#ifdef __ia64__
|
||||
#define _CRTIMP_NOIA64
|
||||
#else
|
||||
#define _CRTIMP_NOIA64 _CRTIMP
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _CRTIMP2
|
||||
#define _CRTIMP2 _CRTIMP
|
||||
#endif
|
||||
|
||||
#ifndef _CRTIMP_ALTERNATIVE
|
||||
#define _CRTIMP_ALTERNATIVE _CRTIMP
|
||||
#define _CRT_ALTERNATIVE_IMPORTED
|
||||
#endif
|
||||
|
||||
#ifndef _MRTIMP2
|
||||
#define _MRTIMP2 _CRTIMP
|
||||
#endif
|
||||
|
||||
#ifndef _DLL
|
||||
#define _DLL
|
||||
#endif
|
||||
|
||||
#ifndef _MT
|
||||
#define _MT
|
||||
#endif
|
||||
|
||||
#ifndef _MCRTIMP
|
||||
#define _MCRTIMP _CRTIMP
|
||||
#endif
|
||||
|
||||
#ifndef _CRTIMP_PURE
|
||||
#define _CRTIMP_PURE _CRTIMP
|
||||
#endif
|
||||
|
||||
#ifndef _PGLOBAL
|
||||
#define _PGLOBAL
|
||||
#endif
|
||||
|
||||
#ifndef _AGLOBAL
|
||||
#define _AGLOBAL
|
||||
#endif
|
||||
|
||||
#define __STDC_SECURE_LIB__ 200411L
|
||||
#define __GOT_SECURE_LIB__ __STDC_SECURE_LIB__
|
||||
#define _SECURECRT_FILL_BUFFER_PATTERN 0xFD
|
||||
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated)
|
||||
|
||||
#ifndef _CRT_INSECURE_DEPRECATE_MEMORY
|
||||
#define _CRT_INSECURE_DEPRECATE_MEMORY(_Replacement)
|
||||
#endif
|
||||
#ifndef _CRT_INSECURE_DEPRECATE_GLOBALS
|
||||
#define _CRT_INSECURE_DEPRECATE_GLOBALS(_Replacement)
|
||||
#endif
|
||||
#ifndef _CRT_MANAGED_HEAP_DEPRECATE
|
||||
#define _CRT_MANAGED_HEAP_DEPRECATE
|
||||
#endif
|
||||
|
||||
#ifndef _CRT_OBSOLETE
|
||||
#define _CRT_OBSOLETE(_NewItem)
|
||||
#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 _INTPTR_T_DEFINED
|
||||
#define _INTPTR_T_DEFINED
|
||||
#ifndef __intptr_t_defined
|
||||
#define __intptr_t_defined
|
||||
#undef intptr_t
|
||||
#ifdef _WIN64
|
||||
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
||||
typedef int intptr_t __attribute__ ((mode (DI)));
|
||||
#else
|
||||
typedef __int64 intptr_t;
|
||||
#endif
|
||||
#else
|
||||
typedef int intptr_t;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _UINTPTR_T_DEFINED
|
||||
#define _UINTPTR_T_DEFINED
|
||||
#ifndef __uintptr_t_defined
|
||||
#define __uintptr_t_defined
|
||||
#undef uintptr_t
|
||||
#ifdef _WIN64
|
||||
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
||||
typedef unsigned int uintptr_t __attribute__ ((mode (DI)));
|
||||
#else
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
#endif
|
||||
#else
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _PTRDIFF_T_DEFINED
|
||||
#define _PTRDIFF_T_DEFINED
|
||||
#ifndef _PTRDIFF_T_
|
||||
#undef ptrdiff_t
|
||||
#ifdef _WIN64
|
||||
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
||||
typedef int ptrdiff_t __attribute__ ((mode (DI)));
|
||||
#else
|
||||
typedef __int64 ptrdiff_t;
|
||||
#endif
|
||||
#else
|
||||
typedef int ptrdiff_t;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _WCHAR_T_DEFINED
|
||||
#define _WCHAR_T_DEFINED
|
||||
#ifndef __cplusplus
|
||||
typedef unsigned short wchar_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _WCTYPE_T_DEFINED
|
||||
#define _WCTYPE_T_DEFINED
|
||||
typedef unsigned short wint_t;
|
||||
typedef unsigned short wctype_t;
|
||||
#endif
|
||||
|
||||
#ifndef __GNUC_VA_LIST
|
||||
#define __GNUC_VA_LIST
|
||||
typedef __builtin_va_list __gnuc_va_list;
|
||||
@@ -434,128 +186,15 @@ extern "C" {
|
||||
typedef __gnuc_va_list va_list;
|
||||
#endif
|
||||
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
#ifdef _WIN64
|
||||
#error You cannot use 32-bit time_t (_USE_32BIT_TIME_T) with _WIN64
|
||||
#undef _USE_32BIT_TIME_T
|
||||
#endif
|
||||
#else
|
||||
#if _INTEGRAL_MAX_BITS < 64
|
||||
#define _USE_32BIT_TIME_T
|
||||
#endif
|
||||
/* Diable deprecation for now! */
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
#define _CRT_SECURE_NO_DEPRECATE_CORE
|
||||
#ifdef __WINESRC__
|
||||
#define _CRT_NONSTDC_NO_DEPRECATE
|
||||
#endif
|
||||
|
||||
#ifndef _ERRCODE_DEFINED
|
||||
#define _ERRCODE_DEFINED
|
||||
typedef int errcode;
|
||||
typedef int errno_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
|
||||
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 _CONST_RETURN
|
||||
#define _CONST_RETURN
|
||||
#endif
|
||||
|
||||
#ifndef __CRT_UNALIGNED
|
||||
#define __CRT_UNALIGNED
|
||||
#endif
|
||||
|
||||
#ifndef UNALIGNED
|
||||
#if defined(__ia64__) || defined(__x86_64)
|
||||
#define UNALIGNED __unaligned
|
||||
#else
|
||||
#define UNALIGNED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _CRT_ALIGN
|
||||
#define _CRT_ALIGN(x) __attribute__ ((aligned(x)))
|
||||
#endif
|
||||
|
||||
#ifndef _CRTNOALIAS
|
||||
#define _CRTNOALIAS
|
||||
#endif
|
||||
|
||||
#ifndef _CRTRESTRICT
|
||||
#define _CRTRESTRICT
|
||||
#endif
|
||||
|
||||
#ifndef __CRTDECL
|
||||
#define __CRTDECL __cdecl
|
||||
#endif
|
||||
|
||||
#define _ARGMAX 100
|
||||
|
||||
#ifndef _TRUNCATE
|
||||
#define _TRUNCATE ((size_t)-1)
|
||||
#endif
|
||||
struct threadlocaleinfostruct;
|
||||
struct threadmbcinfostruct;
|
||||
typedef struct threadlocaleinfostruct *pthreadlocinfo;
|
||||
typedef struct threadmbcinfostruct *pthreadmbcinfo;
|
||||
struct __lc_time_data;
|
||||
|
||||
typedef struct localeinfo_struct {
|
||||
pthreadlocinfo locinfo;
|
||||
pthreadmbcinfo mbcinfo;
|
||||
} _locale_tstruct,*_locale_t;
|
||||
|
||||
#ifndef _TAGLC_ID_DEFINED
|
||||
#define _TAGLC_ID_DEFINED
|
||||
typedef struct tagLC_ID {
|
||||
unsigned short wLanguage;
|
||||
unsigned short wCountry;
|
||||
unsigned short wCodePage;
|
||||
} LC_ID,*LPLC_ID;
|
||||
#endif
|
||||
|
||||
#ifndef _THREADLOCALEINFO
|
||||
#define _THREADLOCALEINFO
|
||||
typedef struct threadlocaleinfostruct {
|
||||
int refcount;
|
||||
unsigned int lc_codepage;
|
||||
unsigned int lc_collate_cp;
|
||||
unsigned long lc_handle[6];
|
||||
LC_ID lc_id[6];
|
||||
struct {
|
||||
char *locale;
|
||||
wchar_t *wlocale;
|
||||
int *refcount;
|
||||
int *wrefcount;
|
||||
} lc_category[6];
|
||||
int lc_clike;
|
||||
int mb_cur_max;
|
||||
int *lconv_intl_refcount;
|
||||
int *lconv_num_refcount;
|
||||
int *lconv_mon_refcount;
|
||||
struct lconv *lconv;
|
||||
int *ctype1_refcount;
|
||||
unsigned short *ctype1;
|
||||
const unsigned short *pctype;
|
||||
const unsigned char *pclmap;
|
||||
const unsigned char *pcumap;
|
||||
struct __lc_time_data *lc_time_curr;
|
||||
} threadlocinfo;
|
||||
#if (defined(_MSC_VER) && __STDC__)// || !defined(__WINESRC__)
|
||||
#define NO_OLDNAMES
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -568,5 +207,26 @@ extern "C" {
|
||||
#define _CRT_UNUSED(x) (void)x
|
||||
#endif
|
||||
|
||||
#pragma pack(pop)
|
||||
/* These are here for intrin.h */
|
||||
#ifndef _SIZE_T_DEFINED
|
||||
#define _SIZE_T_DEFINED
|
||||
#ifdef _WIN64
|
||||
typedef unsigned __int64 size_t;
|
||||
#else
|
||||
typedef unsigned int size_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _UINTPTR_T_DEFINED
|
||||
#define _UINTPTR_T_DEFINED
|
||||
#ifdef _WIN64
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
#else
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <mingw32/intrin.h>
|
||||
|
||||
#endif /* !_INC_MINGW */
|
||||
|
||||
|
||||
@@ -6,53 +6,36 @@
|
||||
#ifndef __ASSERT_H_
|
||||
#define __ASSERT_H_
|
||||
|
||||
#include <_mingw.h>
|
||||
#ifdef __cplusplus
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#include <crtdefs.h>
|
||||
|
||||
#ifdef NDEBUG
|
||||
|
||||
#ifndef assert
|
||||
#define assert(_Expression) ((void)0)
|
||||
#endif
|
||||
#else
|
||||
|
||||
#ifndef _CRT_TERMINATE_DEFINED
|
||||
#define _CRT_TERMINATE_DEFINED
|
||||
__declspec(noreturn) void __cdecl exit(int _Code);
|
||||
_CRTIMP __declspec(noreturn) void __cdecl _exit(int _Code);
|
||||
#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
|
||||
/* C99 function name */
|
||||
void __cdecl __declspec(noreturn) _Exit(int); /* Declare to get noreturn attribute. */
|
||||
__CRT_INLINE void __cdecl _Exit(int status)
|
||||
{ _exit(status); }
|
||||
#endif
|
||||
|
||||
#if __MINGW_GNUC_PREREQ(4,4)
|
||||
#pragma push_macro("abort")
|
||||
#undef abort
|
||||
#endif
|
||||
void __cdecl __declspec(noreturn) abort(void);
|
||||
#if __MINGW_GNUC_PREREQ(4,4)
|
||||
#pragma pop_macro("abort")
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#else /* !NDEBUG */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//extern void __cdecl _wassert(const wchar_t *_Message,const wchar_t *_File,unsigned _Line);
|
||||
_CRTIMP void __cdecl _assert(const char *_Message,const char *_File,unsigned _Line);
|
||||
_CRTIMP void __cdecl _wassert(const wchar_t *_Message,const wchar_t *_File,unsigned _Line);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef assert
|
||||
//#define assert(_Expression) (void)((!!(_Expression)) || (_assert(#_Expression,__FILE__,__LINE__),0))
|
||||
#define assert(_Expression) (void)((!!(_Expression)))// || (_wassert(_CRT_WIDE(#_Expression),_CRT_WIDE(__FILE__),__LINE__),0))
|
||||
#endif
|
||||
|
||||
#ifndef wassert
|
||||
#define wassert(_Expression) (void)((!!(_Expression)) || (_wassert(_CRT_WIDE(#_Expression),_CRT_WIDE(__FILE__),__LINE__),0))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,8 +26,7 @@
|
||||
#ifndef _COMPLEX_H_
|
||||
#define _COMPLEX_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
|
||||
|| !defined __STRICT_ANSI__
|
||||
|
||||
+34
-27
@@ -6,17 +6,17 @@
|
||||
#ifndef _INC_CONIO
|
||||
#define _INC_CONIO
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
_CRTIMP char *_cgets(char *_Buffer);
|
||||
_CRTIMP char * __cdecl _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,...);
|
||||
_CRT_INSECURE_DEPRECATE(_cscanf_s) _CRTIMP int __cdecl _cscanf(const char *_Format,...);
|
||||
_CRT_INSECURE_DEPRECATE(_cscanf_s_l) _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);
|
||||
@@ -27,6 +27,12 @@ extern "C" {
|
||||
_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);
|
||||
_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);
|
||||
|
||||
#if defined(_X86_) && !defined(__x86_64)
|
||||
int __cdecl _inp(unsigned short);
|
||||
@@ -37,12 +43,6 @@ extern "C" {
|
||||
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
|
||||
@@ -58,8 +58,8 @@ extern "C" {
|
||||
_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,...);
|
||||
_CRT_INSECURE_DEPRECATE(_cwscanf_s) _CRTIMP int __cdecl _cwscanf(const wchar_t *_Format,...);
|
||||
_CRT_INSECURE_DEPRECATE(_cwscanf_s_l) _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);
|
||||
@@ -71,31 +71,38 @@ extern "C" {
|
||||
_CRTIMP wint_t __cdecl _getwch_nolock(void);
|
||||
_CRTIMP wint_t __cdecl _getwche_nolock(void);
|
||||
_CRTIMP wint_t __cdecl _ungetwch_nolock(wint_t _WCh);
|
||||
#endif /* _WCONIO_DEFINED */
|
||||
|
||||
#ifndef _MT
|
||||
#define _putwch() _putwch_nolock()
|
||||
#define _getwch() _getwch_nolock()
|
||||
#define _getwche() _getwche_nolock()
|
||||
#define _ungetwch() _ungetwch_nolock()
|
||||
#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);
|
||||
_CRT_NONSTDC_DEPRECATE(_cgets) _CRT_INSECURE_DEPRECATE(_cgets_s) _CRTIMP char *__cdecl cgets(char *_Buffer);
|
||||
_CRT_NONSTDC_DEPRECATE(_cprintf) _CRTIMP int __cdecl cprintf(const char *_Format,...);
|
||||
_CRT_NONSTDC_DEPRECATE(_cputs) _CRTIMP int __cdecl cputs(const char *_Str);
|
||||
_CRT_NONSTDC_DEPRECATE(_cscanf) _CRTIMP int __cdecl cscanf(const char *_Format,...);
|
||||
_CRT_NONSTDC_DEPRECATE(_getch) _CRTIMP int __cdecl getch(void);
|
||||
_CRT_NONSTDC_DEPRECATE(_getche) _CRTIMP int __cdecl getche(void);
|
||||
_CRT_NONSTDC_DEPRECATE(_kbhit) _CRTIMP int __cdecl kbhit(void);
|
||||
_CRT_NONSTDC_DEPRECATE(_putch) _CRTIMP int __cdecl putch(int _Ch);
|
||||
_CRT_NONSTDC_DEPRECATE(_ungetch) _CRTIMP 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);
|
||||
_CRT_NONSTDC_DEPRECATE(_inp) _CRTIMP int __cdecl inp(unsigned short);
|
||||
_CRT_NONSTDC_DEPRECATE(_inpw) _CRTIMP unsigned short __cdecl inpw(unsigned short);
|
||||
_CRT_NONSTDC_DEPRECATE(_outp) _CRTIMP int __cdecl outp(unsigned short,int);
|
||||
_CRT_NONSTDC_DEPRECATE(_outpw) _CRTIMP unsigned short __cdecl outpw(unsigned short,unsigned short);
|
||||
#endif
|
||||
#endif /* !NO_OLDNAMES */
|
||||
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <sec_api/conio_s.h>
|
||||
|
||||
#endif
|
||||
#endif /* _INC_CONIO */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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 <crtdefs.h>
|
||||
|
||||
#ifndef _INC_CRTDBG
|
||||
#define _INC_CRTDBG
|
||||
@@ -97,14 +97,26 @@ extern "C" {
|
||||
#define _ASSERT(expr) ((void)0)
|
||||
#endif
|
||||
|
||||
#ifndef _ASSERT_WRN
|
||||
#define _ASSERT_WRN(expr) ((void)0)
|
||||
#endif
|
||||
|
||||
#ifndef _ASSERTE
|
||||
#define _ASSERTE(expr) ((void)0)
|
||||
#endif
|
||||
|
||||
#ifndef _ASSERTE_WRN
|
||||
#define _ASSERTE_WRN(expr) ((void)0)
|
||||
#endif
|
||||
|
||||
#ifndef _ASSERT_EXPR
|
||||
#define _ASSERT_EXPR(expr,expr_str) ((void)0)
|
||||
#endif
|
||||
|
||||
#ifndef _ASSERT_EXPR_WRN
|
||||
#define _ASSERT_EXPR_WRN(expr,expr_str) ((void)0)
|
||||
#endif
|
||||
|
||||
#ifndef _ASSERT_BASE
|
||||
#define _ASSERT_BASE _ASSERT_EXPR
|
||||
#endif
|
||||
|
||||
@@ -4,3 +4,389 @@
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
#include <_mingw.h>
|
||||
|
||||
#ifndef _INC_CRTDEFS
|
||||
#define _INC_CRTDEFS
|
||||
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
#ifdef _WIN64
|
||||
#error You cannot use 32-bit time_t (_USE_32BIT_TIME_T) with _WIN64
|
||||
#undef _USE_32BIT_TIME_T
|
||||
#endif
|
||||
#else
|
||||
#if _INTEGRAL_MAX_BITS < 64
|
||||
#define _USE_32BIT_TIME_T
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Compatability definition */
|
||||
#if _MSC_VER > 0 && __STDC__
|
||||
#define NO_OLDNAMES
|
||||
#endif
|
||||
|
||||
/** Properties ***************************************************************/
|
||||
|
||||
#undef _CRT_PACKING
|
||||
#define _CRT_PACKING 8
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
#ifndef _CRT_STRINGIZE
|
||||
#define __CRT_STRINGIZE(_Value) #_Value
|
||||
#define _CRT_STRINGIZE(_Value) __CRT_STRINGIZE(_Value)
|
||||
#endif
|
||||
|
||||
#ifndef _CRT_WIDE
|
||||
#define __CRT_WIDE(_String) L ## _String
|
||||
#define _CRT_WIDE(_String) __CRT_WIDE(_String)
|
||||
#endif
|
||||
|
||||
#ifndef _W64
|
||||
#if !defined(_midl) && defined(_X86_) && _MSC_VER >= 1300
|
||||
#define _W64 __w64
|
||||
#else
|
||||
#define _W64
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _CRTIMP
|
||||
#ifdef _DLL
|
||||
#define _CRTIMP __declspec(dllimport)
|
||||
#else
|
||||
#define _CRTIMP
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//#define _CRT_ALTERNATIVE_INLINES
|
||||
|
||||
#ifndef _CRTIMP_ALT
|
||||
#ifdef _DLL
|
||||
#ifdef _CRT_ALTERNATIVE_INLINES
|
||||
#define _CRTIMP_ALT
|
||||
#else
|
||||
#define _CRTIMP_ALT _CRTIMP
|
||||
#define _CRT_ALTERNATIVE_IMPORTED
|
||||
#endif
|
||||
#else
|
||||
#define _CRTIMP_ALT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _CRTDATA
|
||||
#ifdef _M_CEE_PURE
|
||||
#define _CRTDATA(x) x
|
||||
#else
|
||||
#define _CRTDATA(x) _CRTIMP x
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _CRTIMP2
|
||||
#define _CRTIMP2 _CRTIMP
|
||||
#endif
|
||||
|
||||
#ifndef _CRTIMP_PURE
|
||||
#define _CRTIMP_PURE _CRTIMP
|
||||
#endif
|
||||
|
||||
#ifndef _CRTIMP_ALTERNATIVE
|
||||
#define _CRTIMP_ALTERNATIVE _CRTIMP
|
||||
#define _CRT_ALTERNATIVE_IMPORTED
|
||||
#endif
|
||||
|
||||
#ifndef _CRTIMP_NOIA64
|
||||
#ifdef __ia64__
|
||||
#define _CRTIMP_NOIA64
|
||||
#else
|
||||
#define _CRTIMP_NOIA64 _CRTIMP
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _MRTIMP2
|
||||
#define _MRTIMP2 _CRTIMP
|
||||
#endif
|
||||
|
||||
#ifndef _MCRTIMP
|
||||
#define _MCRTIMP _CRTIMP
|
||||
#endif
|
||||
|
||||
#ifndef _PGLOBAL
|
||||
#define _PGLOBAL
|
||||
#endif
|
||||
|
||||
#ifndef _AGLOBAL
|
||||
#define _AGLOBAL
|
||||
#endif
|
||||
|
||||
#ifndef _CONST_RETURN
|
||||
#define _CONST_RETURN
|
||||
#endif
|
||||
|
||||
#ifndef UNALIGNED
|
||||
#if defined(__ia64__) || defined(__x86_64)
|
||||
#define UNALIGNED __unaligned
|
||||
#else
|
||||
#define UNALIGNED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _CRT_ALIGN
|
||||
#define _CRT_ALIGN(x) __attribute__ ((aligned(x)))
|
||||
#endif
|
||||
|
||||
#ifndef _CRTNOALIAS
|
||||
#define _CRTNOALIAS
|
||||
#endif
|
||||
|
||||
#ifndef _CRTRESTRICT
|
||||
#define _CRTRESTRICT
|
||||
#endif
|
||||
|
||||
#ifndef __CRTDECL
|
||||
#define __CRTDECL __cdecl
|
||||
#endif
|
||||
|
||||
#ifndef _CRT_UNUSED
|
||||
#define _CRT_UNUSED(x) (void)x
|
||||
#endif
|
||||
|
||||
#ifndef _CONST_RETURN
|
||||
#ifdef __cplusplus
|
||||
#define _CONST_RETURN const
|
||||
#define _CRT_CONST_CORRECT_OVERLOADS
|
||||
#else
|
||||
#define _CONST_RETURN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define __crt_typefix(ctype)
|
||||
|
||||
|
||||
/** Deprecated ***************************************************************/
|
||||
|
||||
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated)
|
||||
|
||||
#ifndef _CRT_INSECURE_DEPRECATE
|
||||
# ifdef _CRT_SECURE_NO_DEPRECATE
|
||||
# define _CRT_INSECURE_DEPRECATE(_Replacement)
|
||||
# else
|
||||
# define _CRT_INSECURE_DEPRECATE(_Replacement) \
|
||||
_CRT_DEPRECATE_TEXT("This may be unsafe, Try " #_Replacement " instead!")
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef _CRT_INSECURE_DEPRECATE_CORE
|
||||
# ifdef _CRT_SECURE_NO_DEPRECATE_CORE
|
||||
# define _CRT_INSECURE_DEPRECATE_CORE(_Replacement)
|
||||
# else
|
||||
# define _CRT_INSECURE_DEPRECATE_CORE(_Replacement) \
|
||||
_CRT_DEPRECATE_TEXT("This may be unsafe, Try " #_Replacement " instead! Enable _CRT_SECURE_NO_DEPRECATE to avoid thie warning.")
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef _CRT_NONSTDC_DEPRECATE
|
||||
# ifdef _CRT_NONSTDC_NO_DEPRECATE
|
||||
# define _CRT_NONSTDC_DEPRECATE(_Replacement)
|
||||
# else
|
||||
# define _CRT_NONSTDC_DEPRECATE(_Replacement) \
|
||||
_CRT_DEPRECATE_TEXT("Deprecated POSIX name, Try " #_Replacement " instead!")
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef _CRT_INSECURE_DEPRECATE_MEMORY
|
||||
#define _CRT_INSECURE_DEPRECATE_MEMORY(_Replacement)
|
||||
#endif
|
||||
|
||||
#ifndef _CRT_INSECURE_DEPRECATE_GLOBALS
|
||||
#define _CRT_INSECURE_DEPRECATE_GLOBALS(_Replacement)
|
||||
#endif
|
||||
|
||||
#ifndef _CRT_MANAGED_HEAP_DEPRECATE
|
||||
#define _CRT_MANAGED_HEAP_DEPRECATE
|
||||
#endif
|
||||
|
||||
#ifndef _CRT_OBSOLETE
|
||||
#define _CRT_OBSOLETE(_NewItem)
|
||||
#endif
|
||||
|
||||
/** Constants ****************************************************************/
|
||||
|
||||
#define _ARGMAX 100
|
||||
|
||||
#ifndef _TRUNCATE
|
||||
#define _TRUNCATE ((size_t)-1)
|
||||
#endif
|
||||
|
||||
#define __STDC_SECURE_LIB__ 200411L
|
||||
#define __GOT_SECURE_LIB__ __STDC_SECURE_LIB__
|
||||
#define _SECURECRT_FILL_BUFFER_PATTERN 0xFD
|
||||
|
||||
|
||||
|
||||
/** Type definitions *********************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#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 _INTPTR_T_DEFINED
|
||||
#define _INTPTR_T_DEFINED
|
||||
#ifndef __intptr_t_defined
|
||||
#define __intptr_t_defined
|
||||
#undef intptr_t
|
||||
#ifdef _WIN64
|
||||
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
||||
typedef int intptr_t __attribute__ ((mode (DI)));
|
||||
#else
|
||||
typedef __int64 intptr_t;
|
||||
#endif
|
||||
#else
|
||||
typedef int intptr_t;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _UINTPTR_T_DEFINED
|
||||
#define _UINTPTR_T_DEFINED
|
||||
#ifndef __uintptr_t_defined
|
||||
#define __uintptr_t_defined
|
||||
#undef uintptr_t
|
||||
#ifdef _WIN64
|
||||
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
||||
typedef unsigned int uintptr_t __attribute__ ((mode (DI)));
|
||||
#else
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
#endif
|
||||
#else
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _PTRDIFF_T_DEFINED
|
||||
#define _PTRDIFF_T_DEFINED
|
||||
#ifndef _PTRDIFF_T_
|
||||
#undef ptrdiff_t
|
||||
#ifdef _WIN64
|
||||
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
||||
typedef int ptrdiff_t __attribute__ ((mode (DI)));
|
||||
#else
|
||||
typedef __int64 ptrdiff_t;
|
||||
#endif
|
||||
#else
|
||||
typedef int ptrdiff_t;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _WCHAR_T_DEFINED
|
||||
#define _WCHAR_T_DEFINED
|
||||
#ifndef __cplusplus
|
||||
typedef unsigned short wchar_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _WCTYPE_T_DEFINED
|
||||
#define _WCTYPE_T_DEFINED
|
||||
typedef unsigned short wint_t;
|
||||
typedef unsigned short wctype_t;
|
||||
#endif
|
||||
|
||||
#ifndef _ERRCODE_DEFINED
|
||||
#define _ERRCODE_DEFINED
|
||||
typedef int errcode;
|
||||
typedef int errno_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
|
||||
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
|
||||
|
||||
struct threadlocaleinfostruct;
|
||||
typedef struct threadlocaleinfostruct *pthreadlocinfo;
|
||||
|
||||
struct threadmbcinfostruct;
|
||||
typedef struct threadmbcinfostruct *pthreadmbcinfo;
|
||||
|
||||
struct __lc_time_data;
|
||||
|
||||
typedef struct localeinfo_struct {
|
||||
pthreadlocinfo locinfo;
|
||||
pthreadmbcinfo mbcinfo;
|
||||
} _locale_tstruct,*_locale_t;
|
||||
|
||||
#ifndef _TAGLC_ID_DEFINED
|
||||
#define _TAGLC_ID_DEFINED
|
||||
typedef struct tagLC_ID {
|
||||
unsigned short wLanguage;
|
||||
unsigned short wCountry;
|
||||
unsigned short wCodePage;
|
||||
} LC_ID,*LPLC_ID;
|
||||
#endif
|
||||
|
||||
#ifndef _THREADLOCALEINFO
|
||||
#define _THREADLOCALEINFO
|
||||
typedef struct threadlocaleinfostruct {
|
||||
int refcount;
|
||||
unsigned int lc_codepage;
|
||||
unsigned int lc_collate_cp;
|
||||
unsigned long lc_handle[6];
|
||||
LC_ID lc_id[6];
|
||||
struct {
|
||||
char *locale;
|
||||
wchar_t *wlocale;
|
||||
int *refcount;
|
||||
int *wrefcount;
|
||||
} lc_category[6];
|
||||
int lc_clike;
|
||||
int mb_cur_max;
|
||||
int *lconv_intl_refcount;
|
||||
int *lconv_num_refcount;
|
||||
int *lconv_mon_refcount;
|
||||
struct lconv *lconv;
|
||||
int *ctype1_refcount;
|
||||
unsigned short *ctype1;
|
||||
const unsigned short *pctype;
|
||||
const unsigned char *pclmap;
|
||||
const unsigned char *pcumap;
|
||||
struct __lc_time_data *lc_time_curr;
|
||||
} threadlocinfo;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif /* !_INC_CRTDEFS */
|
||||
|
||||
+53
-88
@@ -6,7 +6,7 @@
|
||||
#ifndef _INC_CTYPE
|
||||
#define _INC_CTYPE
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -17,69 +17,36 @@ extern "C" {
|
||||
#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 const unsigned short *_pctype;
|
||||
#else
|
||||
extern const unsigned short **_imp___pctype;
|
||||
#define _pctype (*_imp___pctype)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
# define _CRT_CTYPEDATA_DEFINED
|
||||
# ifndef _CTYPE_DISABLE_MACROS
|
||||
# ifndef __PCTYPE_FUNC
|
||||
# ifdef _DLL
|
||||
# define __PCTYPE_FUNC __pctype_func()
|
||||
# else
|
||||
# define __PCTYPE_FUNC _pctype
|
||||
# endif
|
||||
# endif /* !__PCTYPE_FUNC */
|
||||
_CRTIMP const unsigned short * __cdecl __pctype_func(void);
|
||||
# ifndef _M_CEE_PURE
|
||||
_CRTDATA(extern const unsigned short *_pctype);
|
||||
# else
|
||||
# define _pctype (__pctype_func())
|
||||
# endif /* !_M_CEE_PURE */
|
||||
# endif /* !_CTYPE_DISABLE_MACROS */
|
||||
#endif /* !_CRT_CTYPEDATA_DEFINED */
|
||||
|
||||
#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 const unsigned short *_pwctype;
|
||||
#endif
|
||||
#else
|
||||
#define __pwctype_func() (*_imp___pwctype)
|
||||
#ifndef _pwctype
|
||||
extern const 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
|
||||
# ifndef _CTYPE_DISABLE_MACROS
|
||||
_CRTDATA(extern unsigned short *_wctype);
|
||||
_CRTIMP const wctype_t * __cdecl __pwctype_func(void);
|
||||
# ifndef _M_CEE_PURE
|
||||
_CRTDATA(extern const wctype_t *_pwctype);
|
||||
# else
|
||||
# define _pwctype (__pwctype_func())
|
||||
# endif /* !_M_CEE_PURE */
|
||||
# endif /* !_CTYPE_DISABLE_MACROS */
|
||||
#endif /* !_CRT_WCTYPEDATA_DEFINED */
|
||||
|
||||
#define _UPPER 0x1
|
||||
#define _LOWER 0x2
|
||||
@@ -96,7 +63,6 @@ extern "C" {
|
||||
|
||||
#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);
|
||||
@@ -131,51 +97,49 @@ extern "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
|
||||
#endif /* !_CTYPE_DEFINED */
|
||||
|
||||
#ifndef _WCTYPE_DEFINED
|
||||
#define _WCTYPE_DEFINED
|
||||
|
||||
int __cdecl iswalpha(wint_t _C);
|
||||
_CRTIMP 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(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswupper_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswlower(wint_t _C);
|
||||
_CRTIMP 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(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswdigit_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswxdigit(wint_t _C);
|
||||
_CRTIMP 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(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswspace_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswpunct(wint_t _C);
|
||||
_CRTIMP 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(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswalnum_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswprint(wint_t _C);
|
||||
_CRTIMP 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(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswgraph_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswcntrl(wint_t _C);
|
||||
_CRTIMP 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 iswascii(wint_t _C);
|
||||
_CRTIMP 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(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(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(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);
|
||||
_CRTIMP 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);
|
||||
@@ -261,12 +225,12 @@ int __cdecl iswblank(wint_t _C);
|
||||
#define _iswcsym_l(_c,_p) (_iswalnum_l(_c,_p) || ((_c)=='_'))
|
||||
#endif
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
#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);
|
||||
_CRT_NONSTDC_DEPRECATE(__isascii) _CRTIMP int __cdecl isascii(int _C);
|
||||
_CRT_NONSTDC_DEPRECATE(__toascii) _CRTIMP int __cdecl toascii(int _C);
|
||||
_CRT_NONSTDC_DEPRECATE(__iscsymf) _CRTIMP int __cdecl iscsymf(int _C);
|
||||
_CRT_NONSTDC_DEPRECATE(__iscsym) _CRTIMP int __cdecl iscsym(int _C);
|
||||
#else
|
||||
#define isascii __isascii
|
||||
#define toascii __toascii
|
||||
@@ -278,4 +242,5 @@ int __cdecl iswblank(wint_t _C);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* !_INC_CTYPE */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef _INC_DIRECT
|
||||
#define _INC_DIRECT
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
#include <io.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* 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>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef _INC_DOS
|
||||
#define _INC_DOS
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
#include <io.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
@@ -39,8 +39,8 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#if (defined(_X86_) && !defined(__x86_64))
|
||||
// void __cdecl _disable(void);
|
||||
// void __cdecl _enable(void);
|
||||
void __cdecl _disable(void);
|
||||
void __cdecl _enable(void);
|
||||
#endif
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <emmintrin.h>
|
||||
#include <assert.h>
|
||||
#include <fvec.h>
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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 <crtdefs.h>
|
||||
|
||||
#ifndef _EH_H_
|
||||
#define _EH_H_
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef _INC_ERRNO
|
||||
#define _INC_ERRNO
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+112
-86
@@ -1,103 +1,129 @@
|
||||
/*
|
||||
* excpt.h
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is a part of the mingw-runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within the package.
|
||||
*
|
||||
* Support for operating system level structured exception handling.
|
||||
*
|
||||
* NOTE: This is very preliminary stuff. I am also pretty sure it is
|
||||
* completely Intel specific.
|
||||
*
|
||||
* 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
|
||||
|
||||
#ifndef _EXCPT_H_
|
||||
#define _EXCPT_H_
|
||||
#include <crtdefs.h>
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
/*
|
||||
* NOTE: The constants structs and typedefs below should be defined in the
|
||||
* Win32 API headers.
|
||||
*/
|
||||
#define EXCEPTION_EXECUTE_HANDLER 1
|
||||
#define EXCEPTION_CONTINUE_SEARCH 0
|
||||
#define EXCEPTION_CONTINUE_EXECUTION -1
|
||||
|
||||
#define EH_NONCONTINUABLE 0x01
|
||||
#define EH_UNWINDING 0x02
|
||||
#define EH_EXIT_UNWIND 0x04
|
||||
#define EH_STACK_INVALID 0x08
|
||||
#define EH_NESTED_CALL 0x10
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
typedef enum {
|
||||
ExceptionContinueExecution,
|
||||
ExceptionContinueSearch,
|
||||
ExceptionNestedException,
|
||||
ExceptionCollidedUnwind
|
||||
} EXCEPTION_DISPOSITION;
|
||||
|
||||
|
||||
/*
|
||||
* End of stuff that should be in the Win32 API files.
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The type of function that is expected as an exception handler to be
|
||||
* installed with __try1.
|
||||
*/
|
||||
struct _CONTEXT;
|
||||
struct _EXCEPTION_RECORD;
|
||||
typedef EXCEPTION_DISPOSITION (*PEXCEPTION_HANDLER)
|
||||
(struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);
|
||||
|
||||
/*
|
||||
* This is not entirely necessary, but it is the structure installed by
|
||||
* the __try1 primitive below.
|
||||
*/
|
||||
typedef struct _EXCEPTION_REGISTRATION
|
||||
typedef enum _EXCEPTION_DISPOSITION
|
||||
{
|
||||
struct _EXCEPTION_REGISTRATION* prev;
|
||||
PEXCEPTION_HANDLER handler;
|
||||
} EXCEPTION_REGISTRATION, *PEXCEPTION_REGISTRATION;
|
||||
ExceptionContinueExecution,
|
||||
ExceptionContinueSearch,
|
||||
ExceptionNestedException,
|
||||
ExceptionCollidedUnwind,
|
||||
} EXCEPTION_DISPOSITION;
|
||||
|
||||
/*
|
||||
* A macro which installs the supplied exception handler.
|
||||
* Push the pointer to the new handler onto the stack,
|
||||
* then push the pointer to the old registration structure (at fs:0)
|
||||
* onto the stack, then put a pointer to the new registration
|
||||
* structure (i.e. the current stack pointer) at fs:0.
|
||||
*/
|
||||
#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;
|
||||
struct _DISPATCHER_CONTEXT;
|
||||
|
||||
_CRTIMP EXCEPTION_DISPOSITION __cdecl __C_specific_handler (struct _EXCEPTION_RECORD *_ExceptionRecord,void *_EstablisherFrame,struct _CONTEXT *_ContextRecord,struct _DISPATCHER_CONTEXT *_DispatcherContext);
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER // HACK!!!
|
||||
#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
|
||||
#endif
|
||||
|
||||
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
|
||||
|
||||
#if 0
|
||||
/* 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));
|
||||
__asm__ ("pushl %0;pushl %%fs:0;movl %%esp,%%fs:0;" : : "g" (pHandler));
|
||||
|
||||
/*
|
||||
* A macro which (despite its name) *removes* an installed
|
||||
* exception handler. Should be used only in conjunction with the above
|
||||
* install routine __try1.
|
||||
* Move the pointer to the old reg. struct (at the current stack
|
||||
* position) to fs:0, replacing the pointer we installed above,
|
||||
* then add 8 to the stack pointer to get rid of the space we
|
||||
* used when we pushed on our new reg. struct above. Notice that
|
||||
* the stack must be in the exact state at this point that it was
|
||||
* after we did __try1 or this will smash things.
|
||||
*/
|
||||
#define __except1 \
|
||||
__asm__ ("movl (%%esp),%%eax;movl %%eax,%%fs:0;addl $8,%%esp;" \
|
||||
: : : "%eax");
|
||||
__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));
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define __except1 \
|
||||
__asm__ ("movq (%%rsp),%%rax;movq %%rax,%%gs:0;addq $16,%%rsp;" \
|
||||
: : : "%rax");
|
||||
#else
|
||||
#define __try1(pHandler)
|
||||
#define __except1
|
||||
#endif
|
||||
|
||||
#endif // 0
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* Not RC_INVOKED */
|
||||
|
||||
#endif /* _EXCPT_H_ not defined */
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
* 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>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#ifndef _INC_FCNTL
|
||||
#define _INC_FCNTL
|
||||
@@ -36,7 +34,6 @@
|
||||
#define O_RDONLY _O_RDONLY
|
||||
#define O_WRONLY _O_WRONLY
|
||||
#define O_RDWR _O_RDWR
|
||||
#define O_ACCMODE _O_ACCMODE
|
||||
#define O_APPEND _O_APPEND
|
||||
#define O_CREAT _O_CREAT
|
||||
#define O_TRUNC _O_TRUNC
|
||||
@@ -48,5 +45,6 @@
|
||||
#define O_NOINHERIT _O_NOINHERIT
|
||||
#define O_SEQUENTIAL _O_SEQUENTIAL
|
||||
#define O_RANDOM _O_RANDOM
|
||||
#define O_ACCMODE _O_ACCMODE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+16
-17
@@ -21,8 +21,7 @@
|
||||
#ifndef _MINGW_FLOAT_H_
|
||||
#define _MINGW_FLOAT_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
/*
|
||||
* Functions and definitions for controlling the FPU.
|
||||
@@ -99,12 +98,12 @@ extern "C" {
|
||||
/* Set the FPU control word as cw = (cw & ~unMask) | (unNew & unMask),
|
||||
* i.e. change the bits in unMask to have the values they have in unNew,
|
||||
* leaving other bits unchanged. */
|
||||
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _controlfp (unsigned int unNew, unsigned int unMask);
|
||||
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _control87 (unsigned int unNew, unsigned int unMask);
|
||||
_CRTIMP unsigned int __cdecl __attribute__ ((__nothrow__)) _controlfp (unsigned int unNew, unsigned int unMask);
|
||||
_CRTIMP unsigned int __cdecl __attribute__ ((__nothrow__)) _control87 (unsigned int unNew, unsigned int unMask);
|
||||
|
||||
|
||||
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _clearfp (void); /* Clear the FPU status word */
|
||||
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _statusfp (void); /* Report the FPU status word */
|
||||
_CRTIMP unsigned int __cdecl __attribute__ ((__nothrow__)) _clearfp (void); /* Clear the FPU status word */
|
||||
_CRTIMP unsigned int __cdecl __attribute__ ((__nothrow__)) _statusfp (void); /* Report the FPU status word */
|
||||
#define _clear87 _clearfp
|
||||
#define _status87 _statusfp
|
||||
|
||||
@@ -118,11 +117,11 @@ _CRTIMP unsigned int __cdecl __MINGW_NOTHROW _statusfp (void); /* Report the FPU
|
||||
per fninit. To use the MSVCRT.dll _fpreset, include CRT_fp8.o when
|
||||
building your application.
|
||||
*/
|
||||
void __cdecl __MINGW_NOTHROW _fpreset (void);
|
||||
void __cdecl __MINGW_NOTHROW fpreset (void);
|
||||
void __cdecl __attribute__ ((__nothrow__)) _fpreset (void);
|
||||
void __cdecl __attribute__ ((__nothrow__)) fpreset (void);
|
||||
|
||||
/* Global 'variable' for the current floating point error code. */
|
||||
_CRTIMP int * __cdecl __MINGW_NOTHROW __fpecode(void);
|
||||
_CRTIMP int * __cdecl __attribute__ ((__nothrow__)) __fpecode(void);
|
||||
#define _fpecode (*(__fpecode()))
|
||||
|
||||
/*
|
||||
@@ -130,15 +129,15 @@ _CRTIMP int * __cdecl __MINGW_NOTHROW __fpecode(void);
|
||||
* but they really belong in math.h.
|
||||
*/
|
||||
|
||||
_CRTIMP double __cdecl __MINGW_NOTHROW _chgsign (double);
|
||||
_CRTIMP double __cdecl __MINGW_NOTHROW _copysign (double, double);
|
||||
_CRTIMP double __cdecl __MINGW_NOTHROW _logb (double);
|
||||
_CRTIMP double __cdecl __MINGW_NOTHROW _nextafter (double, double);
|
||||
_CRTIMP double __cdecl __MINGW_NOTHROW _scalb (double, long);
|
||||
_CRTIMP double __cdecl __attribute__ ((__nothrow__)) _chgsign (double);
|
||||
_CRTIMP double __cdecl __attribute__ ((__nothrow__)) _copysign (double, double);
|
||||
_CRTIMP double __cdecl __attribute__ ((__nothrow__)) _logb (double);
|
||||
_CRTIMP double __cdecl __attribute__ ((__nothrow__)) _nextafter (double, double);
|
||||
_CRTIMP double __cdecl __attribute__ ((__nothrow__)) _scalb (double, long);
|
||||
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _finite (double);
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _fpclass (double);
|
||||
_CRTIMP int __cdecl __MINGW_NOTHROW _isnan (double);
|
||||
_CRTIMP int __cdecl __attribute__ ((__nothrow__)) _finite (double);
|
||||
_CRTIMP int __cdecl __attribute__ ((__nothrow__)) _fpclass (double);
|
||||
_CRTIMP int __cdecl __attribute__ ((__nothrow__)) _isnan (double);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef _INC_FPIEEE
|
||||
#define _INC_FPIEEE
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <xmmintrin.h>
|
||||
#include <assert.h>
|
||||
#include <ivec.h>
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#if defined(_ENABLE_VEC_DEBUG)
|
||||
#include <iostream>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#ifndef _INTTYPES_H_
|
||||
#define _INTTYPES_H_
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
#include <stdint.h>
|
||||
#define __need_wchar_t
|
||||
#include <stddef.h>
|
||||
|
||||
+50
-120
@@ -1,3 +1,4 @@
|
||||
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the w64 mingw-runtime package.
|
||||
@@ -6,7 +7,7 @@
|
||||
#ifndef _IO_H_
|
||||
#define _IO_H_
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
#include <string.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
@@ -25,15 +26,6 @@ _CRTIMP char* __cdecl _getcwd (char*, int);
|
||||
|
||||
#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];
|
||||
};
|
||||
|
||||
struct _finddata_t {
|
||||
unsigned attrib;
|
||||
time_t time_create;
|
||||
@@ -43,7 +35,25 @@ _CRTIMP char* __cdecl _getcwd (char*, int);
|
||||
char name[260];
|
||||
};
|
||||
|
||||
/*#if _INTEGRAL_MAX_BITS >= 64*/
|
||||
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 _finddatai64_t {
|
||||
unsigned attrib;
|
||||
time_t time_create;
|
||||
time_t time_access;
|
||||
time_t time_write;
|
||||
__int64 size;
|
||||
char name[260];
|
||||
};
|
||||
|
||||
struct _finddata32i64_t {
|
||||
unsigned attrib;
|
||||
@@ -71,45 +81,13 @@ _CRTIMP char* __cdecl _getcwd (char*, int);
|
||||
__int64 size;
|
||||
char name[260];
|
||||
};
|
||||
|
||||
struct _finddatai64_t {
|
||||
unsigned attrib;
|
||||
time_t time_create;
|
||||
time_t time_access;
|
||||
time_t time_write;
|
||||
__int64 size;
|
||||
char name[260];
|
||||
};
|
||||
|
||||
/* #endif */
|
||||
|
||||
#ifdef _WIN64
|
||||
//#define _findfirst64i32 _findfirst
|
||||
//#define _findnext64i32 _findnext
|
||||
//#define _findfirsti64 _findfirst64
|
||||
//#define _findnexti64 _findnext64
|
||||
|
||||
#else /* !_WIN64 */
|
||||
//#define _findfirst32 _findfirst
|
||||
//#define _findnext32 _findnext
|
||||
//#define _findfirst32i64 _findfirsti64
|
||||
//#define _findnext32i64 _findnexti64
|
||||
#endif /* !_WIN64 */
|
||||
#endif /* _INTEGRAL_MAX_BITS >= 64 */
|
||||
|
||||
#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];
|
||||
};
|
||||
|
||||
struct _wfinddata_t {
|
||||
unsigned attrib;
|
||||
time_t time_create;
|
||||
@@ -119,7 +97,25 @@ _CRTIMP char* __cdecl _getcwd (char*, int);
|
||||
wchar_t name[260];
|
||||
};
|
||||
|
||||
/* #if _INTEGRAL_MAX_BITS >= 64 */
|
||||
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 _wfinddatai64_t {
|
||||
unsigned attrib;
|
||||
time_t time_create;
|
||||
time_t time_access;
|
||||
time_t time_write;
|
||||
__int64 size;
|
||||
wchar_t name[260];
|
||||
};
|
||||
|
||||
struct _wfinddata32i64_t {
|
||||
unsigned attrib;
|
||||
@@ -147,17 +143,7 @@ _CRTIMP char* __cdecl _getcwd (char*, int);
|
||||
__int64 size;
|
||||
wchar_t name[260];
|
||||
};
|
||||
|
||||
struct _wfinddatai64_t {
|
||||
unsigned attrib;
|
||||
time_t time_create;
|
||||
time_t time_access;
|
||||
time_t time_write;
|
||||
__int64 size;
|
||||
wchar_t name[260];
|
||||
};
|
||||
|
||||
/* #endif */
|
||||
#endif
|
||||
|
||||
#define _WFINDDATA_T_DEFINED
|
||||
#endif
|
||||
@@ -169,60 +155,6 @@ _CRTIMP char* __cdecl _getcwd (char*, int);
|
||||
#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 */
|
||||
@@ -248,7 +180,6 @@ _CRTIMP char* __cdecl _getcwd (char*, int);
|
||||
_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);
|
||||
@@ -271,11 +202,16 @@ _CRTIMP char* __cdecl _getcwd (char*, int);
|
||||
#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 _findfirst64i32(const char *_Filename,struct _finddata64i32_t *_FindData);
|
||||
_CRTIMP intptr_t __cdecl _findfirst64(const char *_Filename,struct __finddata64_t *_FindData);
|
||||
_CRTIMP int __cdecl _findnext32i64(intptr_t _FindHandle,struct _finddata32i64_t *_FindData);
|
||||
_CRTIMP int __cdecl _findnext64i32(intptr_t _FindHandle,struct _finddata64i32_t *_FindData);
|
||||
_CRTIMP int __cdecl _findnext64(intptr_t _FindHandle,struct __finddata64_t *_FindData);
|
||||
_CRTIMP __int64 __cdecl _lseeki64(int _FileHandle,__int64 _Offset,int _Origin);
|
||||
_CRTIMP __int64 __cdecl _telli64(int _FileHandle);
|
||||
#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;
|
||||
@@ -288,9 +224,6 @@ _CRTIMP char* __cdecl _getcwd (char*, int);
|
||||
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;
|
||||
@@ -303,11 +236,9 @@ _CRTIMP char* __cdecl _getcwd (char*, int);
|
||||
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 NO_OLDNAMES
|
||||
#ifndef _UWIN
|
||||
int __cdecl chdir (const char *);
|
||||
char *__cdecl getcwd (char *, int);
|
||||
@@ -316,7 +247,6 @@ _CRTIMP char* __cdecl _getcwd (char*, int);
|
||||
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);
|
||||
@@ -359,7 +289,7 @@ _CRTIMP char* __cdecl _getcwd (char*, int);
|
||||
extern "C++" _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode = 0);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* !_WIO_DEFINED */
|
||||
|
||||
int __cdecl __lock_fhandle(int _Filehandle);
|
||||
void __cdecl _unlock_fhandle(int _Filehandle);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#define _LIBGEN_H_
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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 <crtdefs.h>
|
||||
|
||||
#ifndef _INC_LIMITS
|
||||
#define _INC_LIMITS
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef _INC_LOCALE
|
||||
#define _INC_LOCALE
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef _MALLOC_H_
|
||||
#define _MALLOC_H_
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
@@ -25,7 +25,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _STATIC_ASSERT
|
||||
#define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)?1:-1]
|
||||
#define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)]
|
||||
#endif
|
||||
|
||||
/* Return codes for _heapwalk() */
|
||||
|
||||
+14
-23
@@ -3,14 +3,10 @@
|
||||
* 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_
|
||||
#ifndef _INC_MATH
|
||||
#define _INC_MATH
|
||||
|
||||
#if __GNUC__ >= 3
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
struct exception;
|
||||
|
||||
@@ -48,14 +44,7 @@ extern "C" {
|
||||
#define EDOM 33
|
||||
#define ERANGE 34
|
||||
|
||||
#ifndef _HUGE
|
||||
#ifdef _MSVCRT_
|
||||
extern double *_HUGE;
|
||||
#else
|
||||
extern double *_imp___HUGE;
|
||||
#define _HUGE (*_imp___HUGE)
|
||||
#endif
|
||||
#endif
|
||||
_CRTIMP extern double _HUGE;
|
||||
|
||||
#define HUGE_VAL _HUGE
|
||||
|
||||
@@ -76,6 +65,7 @@ extern "C" {
|
||||
double __cdecl cos(double _X);
|
||||
double __cdecl cosh(double _X);
|
||||
double __cdecl exp(double _X);
|
||||
double expm1(double _X);
|
||||
double __cdecl fabs(double _X);
|
||||
double __cdecl fmod(double _X,double _Y);
|
||||
double __cdecl log(double _X);
|
||||
@@ -93,19 +83,19 @@ extern "C" {
|
||||
#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 ceil(double _X);
|
||||
_CRTIMP double __cdecl floor(double _X);
|
||||
_CRTIMP double __cdecl frexp(double _X,int *_Y);
|
||||
_CRTIMP 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);
|
||||
_CRTIMP 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 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);
|
||||
@@ -130,6 +120,7 @@ extern "C" {
|
||||
float __cdecl sinhf(float _X);
|
||||
float __cdecl tanhf(float _X);
|
||||
float __cdecl expf(float _X);
|
||||
float expm1f(float _X);
|
||||
float __cdecl logf(float _X);
|
||||
float __cdecl log10f(float _X);
|
||||
float __cdecl modff(float _X,float *_Y);
|
||||
@@ -421,6 +412,7 @@ extern "C" {
|
||||
|
||||
extern long double __cdecl powl (long double, long double);
|
||||
extern long double __cdecl expl(long double);
|
||||
extern long double expm1l(long double);
|
||||
extern long double __cdecl coshl(long double);
|
||||
extern long double __cdecl fabsl (long double);
|
||||
extern long double __cdecl acosl(long double);
|
||||
@@ -764,5 +756,4 @@ __fp_unordered_compare (long double x, long double y){
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* End _MATH_H_ */
|
||||
|
||||
#endif /* !_INC_MATH */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef _INC_MBCTYPE
|
||||
#define _INC_MBCTYPE
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -14,16 +14,29 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* CRT stuff */
|
||||
#if defined(_M_CEE_PURE)
|
||||
#if 1
|
||||
#if defined (_DLL) && defined (_M_IX86)
|
||||
/* Retained for compatibility with VC++ 5.0 and earlier versions */
|
||||
_CRTIMP unsigned char * __cdecl __p__mbctype(void);
|
||||
_CRTIMP unsigned char * __cdecl __p__mbcasemap(void);
|
||||
#define _mbctype (__p__mbctype())
|
||||
#define _mbcasemap (__p__mbcasemap())
|
||||
#endif /* defined (_DLL) && defined (_M_IX86) */
|
||||
#endif
|
||||
#ifndef _mbctype
|
||||
#ifdef _MSVCRT_
|
||||
extern unsigned char _mbctype[257];
|
||||
#else
|
||||
_CRTIMP extern unsigned char _mbctype[];
|
||||
_CRTIMP extern unsigned char _mbcasemap[];
|
||||
#endif // defined(_M_CEE_PURE)
|
||||
#define _mbctype (*_imp___mbctype)
|
||||
extern unsigned char **_imp___mbctype;
|
||||
#endif
|
||||
#endif
|
||||
#ifndef _mbcasemap
|
||||
#ifdef _MSVCRT_
|
||||
extern unsigned char *_mbcasemap;
|
||||
#else
|
||||
#define _mbcasemap (*_imp___mbcasemap)
|
||||
extern unsigned char **_imp___mbcasemap;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* CRT stuff */
|
||||
#if 1
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef _INC_MBSTRING
|
||||
#define _INC_MBSTRING
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef _INC_MEMORY
|
||||
#define _INC_MEMORY
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include <new>
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#pragma push_macro("new")
|
||||
#undef new
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef _INC_PROCESS
|
||||
#define _INC_PROCESS
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
/* Includes a definition of _pid_t and pid_t */
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef _INC_RTCAPI
|
||||
#define _INC_RTCAPI
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef _INC_SEARCH
|
||||
#define _INC_SEARCH
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef _INC_SETJMP
|
||||
#define _INC_SETJMP
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
@@ -130,28 +130,7 @@ extern "C" {
|
||||
#define _JMP_BUF_DEFINED
|
||||
#endif
|
||||
|
||||
__CRT_INLINE void * __cdecl __attribute__ ((__nothrow__)) mingw_getsp(void)
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
#ifdef __x86_64
|
||||
__int64 *ret;
|
||||
__asm__ __volatile__("leaq 16(%%rsp),%0\n"
|
||||
:"=r"(ret)
|
||||
:
|
||||
);
|
||||
return ret;
|
||||
#elif __i386__
|
||||
__int32 *ret;
|
||||
__asm__ __volatile__("lea 8(%esp),%0\n"
|
||||
:"=r"(ret)
|
||||
:
|
||||
);
|
||||
return ret;
|
||||
#endif
|
||||
#else
|
||||
#error Unsupported Compiler
|
||||
#endif
|
||||
}
|
||||
void * __cdecl __attribute__ ((__nothrow__)) mingw_getsp(void);
|
||||
|
||||
#ifdef USE_MINGW_SETJMP_TWO_ARGS
|
||||
#ifndef _INC_SETJMPEX
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#error Only Win32 target is supported!
|
||||
#endif
|
||||
|
||||
#define _SH_COMPAT 0x00 /* Compatibility */
|
||||
#define _SH_COMPAT 0x00
|
||||
#define _SH_DENYRW 0x10
|
||||
#define _SH_DENYWR 0x20
|
||||
#define _SH_DENYRD 0x30
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef _INC_SIGNAL
|
||||
#define _INC_SIGNAL
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#ifndef _INC_STDDEF
|
||||
#define _INC_STDDEF
|
||||
@@ -140,11 +140,11 @@ _TYPE_wchar_t;
|
||||
#define ___int_ptrdiff_t_h
|
||||
#define _GCC_PTRDIFF_T
|
||||
#ifndef __PTRDIFF_TYPE__
|
||||
# ifdef _WIN64
|
||||
#define __PTRDIFF_TYPE__ long long int
|
||||
# else
|
||||
# #define __PTRDIFF_TYPE__ long int
|
||||
# endif
|
||||
#ifdef _WIN64
|
||||
#define __PTRDIFF_TYPE__ long long int
|
||||
#else
|
||||
#define __PTRDIFF_TYPE__ long int
|
||||
#endif
|
||||
#endif
|
||||
#ifndef _PTRDIFF_T_DEFINED
|
||||
#define _PTRDIFF_T_DEFINED
|
||||
@@ -208,11 +208,11 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
#define __size_t
|
||||
#endif
|
||||
#ifndef __SIZE_TYPE__
|
||||
# ifdef _WIN64
|
||||
# define __SIZE_TYPE__ long long unsigned int
|
||||
# else
|
||||
# define __SIZE_TYPE__ long unsigned int
|
||||
# endif
|
||||
#ifdef _WIN64
|
||||
#define __SIZE_TYPE__ long long unsigned int
|
||||
#else
|
||||
#define __SIZE_TYPE__ long unsigned int
|
||||
#endif
|
||||
#endif
|
||||
#if !(defined (__GNUG__) && defined (size_t))
|
||||
typedef __SIZE_TYPE__ size_t;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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 <crtdefs.h>
|
||||
|
||||
#ifndef _INC_STDEXCPT
|
||||
#define _INC_STDEXCPT
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#ifndef _STDINT_H
|
||||
#define _STDINT_H
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#define __need_wint_t
|
||||
#define __need_wchar_t
|
||||
|
||||
+96
-134
@@ -6,7 +6,7 @@
|
||||
#ifndef _INC_STDIO
|
||||
#define _INC_STDIO
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
@@ -92,7 +92,10 @@ extern "C" {
|
||||
|
||||
#ifndef _STDIO_DEFINED
|
||||
_CRTIMP FILE *__cdecl __iob_func(void);
|
||||
_CRTIMP extern FILE _iob[];
|
||||
_CRTDATA(extern FILE _iob[];)
|
||||
#ifdef _M_CEE_PURE
|
||||
#define _iob __iob_func()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _FPOS_T_DEFINED
|
||||
@@ -110,17 +113,11 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _STDSTREAM_DEFINED
|
||||
#define _STDSTREAM_DEFINED
|
||||
#ifdef _M_CEE_PURE
|
||||
#define stdin (&__iob_func()[0])
|
||||
#define stdout (&__iob_func()[1])
|
||||
#define stderr (&__iob_func()[2])
|
||||
#else // !_M_CEE_PURE
|
||||
#define stdin (&_iob[0])
|
||||
#define stdout (&_iob[1])
|
||||
#define stderr (&_iob[2])
|
||||
#endif
|
||||
#endif
|
||||
#define _STDSTREAM_DEFINED
|
||||
#define stdin (&_iob[0])
|
||||
#define stdout (&_iob[1])
|
||||
#define stderr (&_iob[1])
|
||||
#endif /* !_STDSTREAM_DEFINED */
|
||||
|
||||
#define _IOREAD 0x0001
|
||||
#define _IOWRT 0x0002
|
||||
@@ -134,9 +131,6 @@ extern "C" {
|
||||
#define _IOERR 0x0020
|
||||
#define _IOSTRG 0x0040
|
||||
#define _IORW 0x0080
|
||||
#ifdef _POSIX_
|
||||
#define _IOAPPEND 0x0200
|
||||
#endif
|
||||
|
||||
#define _TWO_DIGIT_EXPONENT 0x1
|
||||
|
||||
@@ -149,21 +143,21 @@ extern "C" {
|
||||
#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 void __cdecl clearerr(FILE *_File);
|
||||
_CRTIMP 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 feof(FILE *_File);
|
||||
_CRTIMP int __cdecl ferror(FILE *_File);
|
||||
_CRTIMP int __cdecl fflush(FILE *_File);
|
||||
_CRTIMP 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);
|
||||
_CRTIMP int __cdecl fgetpos(FILE *_File ,fpos_t *_Pos);
|
||||
_CRTIMP char *__cdecl fgets(char *_Buf,int _MaxCount,FILE *_File);
|
||||
#ifdef _POSIX_
|
||||
int __cdecl fileno(FILE *_File);
|
||||
#else
|
||||
@@ -171,68 +165,61 @@ extern "C" {
|
||||
#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 FILE *__cdecl fopen(const char *_Filename,const char *_Mode);
|
||||
_CRTIMP int __cdecl fprintf(FILE *_File,const char *_Format,...);
|
||||
_CRTIMP 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 fputs(const char *_Str,FILE *_File);
|
||||
_CRTIMP size_t __cdecl fread(void *_DstBuf,size_t _ElementSize,size_t _Count,FILE *_File);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE(freopen_s) FILE *__cdecl freopen(const char *_Filename,const char *_Mode,FILE *_File);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE(fscanf_s) int __cdecl fscanf(FILE *_File,const char *_Format,...);
|
||||
_CRTIMP int __cdecl fsetpos(FILE *_File,const fpos_t *_Pos);
|
||||
_CRTIMP int __cdecl fseek(FILE *_File,long _Offset,int _Origin);
|
||||
_CRTIMP long __cdecl ftell(FILE *_File);
|
||||
_CRTIMP int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int _Origin);
|
||||
_CRTIMP __int64 __cdecl _ftelli64(FILE *_File);
|
||||
_CRTIMP size_t __cdecl fwrite(const void *_Str,size_t _Size,size_t _Count,FILE *_File);
|
||||
_CRTIMP int __cdecl getc(FILE *_File);
|
||||
_CRTIMP int __cdecl getchar(void);
|
||||
_CRTIMP int __cdecl _getmaxstdio(void);
|
||||
char *__cdecl gets(char *_Buffer);
|
||||
int __cdecl _getw(FILE *_File);
|
||||
_CRTIMP char *__cdecl gets(char *_Buffer); // FIXME: non-standard
|
||||
_CRTIMP int __cdecl _getw(FILE *_File);
|
||||
#ifndef _CRT_PERROR_DEFINED
|
||||
#define _CRT_PERROR_DEFINED
|
||||
void __cdecl perror(const char *_ErrMsg);
|
||||
_CRTIMP 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 printf(const char *_Format,...);
|
||||
_CRTIMP int __cdecl putc(int _Ch,FILE *_File);
|
||||
_CRTIMP int __cdecl putchar(int _Ch);
|
||||
_CRTIMP 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 remove(const char *_Filename);
|
||||
_CRTIMP 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);
|
||||
#ifndef NO_OLDNAMES
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_unlink) int __cdecl unlink(const char *_Filename);
|
||||
#endif
|
||||
#endif
|
||||
void __cdecl rewind(FILE *_File);
|
||||
_CRTIMP void __cdecl rewind(FILE *_File);
|
||||
_CRTIMP int __cdecl _rmtmp(void);
|
||||
int __cdecl scanf(const char *_Format,...);
|
||||
void __cdecl setbuf(FILE *_File,char *_Buffer);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE_CORE(scanf_s) int __cdecl scanf(const char *_Format,...);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE(setvbuf) 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 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);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE_CORE(sscanf_s) int __cdecl sscanf(const char *_Src,const char *_Format,...);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE_CORE(_snscanf_s) int __cdecl _snscanf(const char *_Src,size_t _MaxCount,const char *_Format,...);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE(tmpfile_s) FILE *__cdecl tmpfile(void);
|
||||
_CRTIMP char *__cdecl tmpnam(char *_Buffer);
|
||||
_CRTIMP_ALT int __cdecl ungetc(int _Ch,FILE *_File);
|
||||
_CRTIMP int __cdecl vfprintf(FILE *_File,const char *_Format,va_list _ArgList);
|
||||
_CRTIMP int __cdecl vprintf(const char *_Format,va_list _ArgList);
|
||||
/* Make sure macros are not defined. */
|
||||
#if __MINGW_GNUC_PREREQ(4,4)
|
||||
#pragma push_macro("vsnprintf")
|
||||
@@ -240,27 +227,13 @@ extern "C" {
|
||||
#endif
|
||||
#undef vsnprintf
|
||||
#undef snprintf
|
||||
|
||||
extern
|
||||
#ifdef gnu_printf
|
||||
__attribute__((format(gnu_printf, 3, 0))) __attribute__((nonnull (3)))
|
||||
#endif
|
||||
int __mingw_vsnprintf(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList);
|
||||
extern
|
||||
#ifdef gnu_printf
|
||||
__attribute__((format(gnu_printf, 3, 4))) __attribute__((nonnull (3)))
|
||||
#endif
|
||||
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 _CRT_INSECURE_DEPRECATE(vsnprintf_s) 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 * __restrict__ Format, va_list argp);
|
||||
int __cdecl vfscanf (FILE * __restrict__ fp, const char * Format,va_list argp);
|
||||
int __cdecl vsscanf (const char * __restrict__ _Str,const char * __restrict__ Format,va_list argp);
|
||||
@@ -270,26 +243,22 @@ extern "C" {
|
||||
#pragma pop_macro("snprintf")
|
||||
#pragma pop_macro("vsnprintf")
|
||||
#endif
|
||||
/* 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
|
||||
#else
|
||||
#ifndef vsnprint
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#ifndef snprintf
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#ifndef vsnprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#ifndef snprintf
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
_CRTIMP int __cdecl _vscprintf(const char *_Format,va_list _ArgList);
|
||||
#ifdef _SAFECRT_IMPL
|
||||
#define _set_printf_count_output(i)
|
||||
#define _get_printf_count_output() (FALSE)
|
||||
#else
|
||||
_CRTIMP int __cdecl _set_printf_count_output(int _Value);
|
||||
_CRTIMP int __cdecl _get_printf_count_output();
|
||||
_CRTIMP int __cdecl _get_printf_count_output(void);
|
||||
#endif
|
||||
|
||||
#ifndef _WSTDIO_DEFINED
|
||||
|
||||
@@ -302,24 +271,24 @@ extern "C" {
|
||||
#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 fgetwc(FILE *_File);
|
||||
_CRTIMP wint_t __cdecl _fgetwchar(void);
|
||||
wint_t __cdecl fputwc(wchar_t _Ch,FILE *_File);
|
||||
_CRTIMP 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 wint_t __cdecl getwc(FILE *_File);
|
||||
_CRTIMP wint_t __cdecl getwchar(void);
|
||||
_CRTIMP wint_t __cdecl putwc(wchar_t _Ch,FILE *_File);
|
||||
_CRTIMP wint_t __cdecl putwchar(wchar_t _Ch);
|
||||
_CRTIMP wint_t __cdecl ungetwc(wint_t _Ch,FILE *_File);
|
||||
_CRTIMP wchar_t *__cdecl fgetws(wchar_t *_Dst,int _SizeInWords,FILE *_File);
|
||||
_CRTIMP 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 fwprintf(FILE *_File,const wchar_t *_Format,...);
|
||||
_CRTIMP 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 vfwprintf(FILE *_File,const wchar_t *_Format,va_list _ArgList);
|
||||
_CRTIMP 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,...);
|
||||
@@ -327,18 +296,11 @@ extern "C" {
|
||||
_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 */
|
||||
__CRT_INLINE int __cdecl snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...) {
|
||||
int r;
|
||||
va_list a;
|
||||
__mingw_va_start(a, format);
|
||||
r = _vsnwprintf (s, n, format, a);
|
||||
__mingw_va_end(a);
|
||||
return r;
|
||||
}
|
||||
_CRTIMP 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);
|
||||
_CRTIMP int __cdecl vwscanf (const wchar_t *, va_list);
|
||||
_CRTIMP int __cdecl vfwscanf (FILE *,const wchar_t *,va_list);
|
||||
_CRTIMP 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);
|
||||
@@ -347,21 +309,21 @@ extern "C" {
|
||||
#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
|
||||
#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 fwscanf(FILE *_File,const wchar_t *_Format,...);
|
||||
_CRTIMP 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 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);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef _INC_STDLIB
|
||||
#define _INC_STDLIB
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
#include <limits.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
@@ -131,7 +131,7 @@ extern "C" {
|
||||
typedef void (__cdecl *_purecall_handler)(void);
|
||||
|
||||
_CRTIMP _purecall_handler __cdecl _set_purecall_handler(_purecall_handler _Handler);
|
||||
_CRTIMP _purecall_handler __cdecl _get_purecall_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);
|
||||
@@ -149,15 +149,10 @@ extern "C" {
|
||||
errno_t __cdecl _set_doserrno(unsigned long _Value);
|
||||
errno_t __cdecl _get_doserrno(unsigned long *_Value);
|
||||
|
||||
#ifdef _MSVCRT_
|
||||
extern int* _imp___sys_nerr;
|
||||
extern char*** _imp__sys_errlist;
|
||||
#else
|
||||
__MINGW_IMPORT int _sys_nerr;
|
||||
__MINGW_IMPORT char* _sys_errlist[];
|
||||
#endif
|
||||
_CRTIMP extern char *_sys_errlist[];
|
||||
_CRTIMP extern int _sys_nerr;
|
||||
|
||||
//#if (defined(_X86_) && !defined(__x86_64))
|
||||
#if (defined(_X86_) || defined(__x86_64)) // HACK
|
||||
_CRTIMP int *__cdecl __p___argc(void);
|
||||
_CRTIMP char ***__cdecl __p___argv(void);
|
||||
_CRTIMP wchar_t ***__cdecl __p___wargv(void);
|
||||
@@ -165,7 +160,7 @@ extern "C" {
|
||||
_CRTIMP wchar_t ***__cdecl __p__wenviron(void);
|
||||
_CRTIMP char **__cdecl __p__pgmptr(void);
|
||||
_CRTIMP wchar_t **__cdecl __p__wpgmptr(void);
|
||||
//#endif
|
||||
#endif
|
||||
#ifndef __argc
|
||||
#ifdef _MSVCRT_
|
||||
extern int __argc;
|
||||
@@ -350,15 +345,15 @@ extern "C" {
|
||||
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 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);*/
|
||||
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 */
|
||||
#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);
|
||||
@@ -367,7 +362,7 @@ extern "C" {
|
||||
_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 */
|
||||
#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);
|
||||
@@ -449,7 +444,7 @@ extern "C" {
|
||||
_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 */
|
||||
#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);
|
||||
@@ -458,7 +453,7 @@ extern "C" {
|
||||
_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
|
||||
#endif
|
||||
|
||||
#ifndef _POSIX_
|
||||
@@ -473,8 +468,8 @@ extern "C" {
|
||||
_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);
|
||||
_CRTIMP unsigned long __cdecl __MINGW_NOTHROW _lrotl(unsigned long, int) __MINGW_ATTRIB_CONST;
|
||||
_CRTIMP unsigned long __cdecl __MINGW_NOTHROW _lrotr(unsigned long, int) __MINGW_ATTRIB_CONST;
|
||||
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);
|
||||
|
||||
@@ -483,13 +478,13 @@ extern "C" {
|
||||
void __cdecl perror(const char *_ErrMsg);
|
||||
#endif
|
||||
_CRTIMP int __cdecl _putenv(const char *_EnvString);
|
||||
//_CRTIMP unsigned int __cdecl _rotl(unsigned int, int) __MINGW_ATTRIB_CONST;
|
||||
unsigned int __cdecl _rotl(unsigned int _Val,int _Shift);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
//_CRTIMP unsigned __int64 __cdecl _rotl64(unsigned __int64, int) __MINGW_ATTRIB_CONST;
|
||||
unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val,int _Shift);
|
||||
#endif
|
||||
//_CRTIMP unsigned int __cdecl _rotr(unsigned int, int) __MINGW_ATTRIB_CONST;
|
||||
unsigned int __cdecl _rotr(unsigned int _Val,int _Shift);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
//_CRTIMP unsigned __int64 __cdecl _rotr64(unsigned __int64, int) __MINGW_ATTRIB_CONST;
|
||||
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);
|
||||
@@ -529,8 +524,8 @@ extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define sys_errlist (*_imp___sys_errlist)
|
||||
#define sys_nerr (*_imp___sys_nerr)
|
||||
#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);
|
||||
@@ -564,7 +559,7 @@ extern "C" {
|
||||
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);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
|
||||
/* __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); }
|
||||
@@ -573,7 +568,7 @@ extern "C" {
|
||||
__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
|
||||
|
||||
#endif /* !__NO_ISOCEXT */
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -583,6 +578,4 @@ extern "C" {
|
||||
#pragma pack(pop)
|
||||
|
||||
#include <sec_api/stdlib_s.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef _INC_STRING
|
||||
#define _INC_STRING
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -25,37 +25,35 @@ extern "C" {
|
||||
#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 _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);
|
||||
_CRT_INSECURE_DEPRECATE_MEMORY(memcpy_s) 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);
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_memccpy) void *__cdecl memccpy(void *_Dst,const void *_Src,int _Val,size_t _Size);
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_memicmp) 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 size_t __cdecl strnlen(const char *_Str,size_t _MaxCount);
|
||||
|
||||
_CRT_INSECURE_DEPRECATE_MEMORY(memmove_s) 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 _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(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);
|
||||
@@ -63,9 +61,9 @@ extern "C" {
|
||||
_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 size_t __cdecl strcspn(const char *_Str,const char *_Control);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE(_strerror_s) char *__cdecl _strerror(const char *_ErrMsg);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE(strerror_s) 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);
|
||||
@@ -73,67 +71,67 @@ extern "C" {
|
||||
_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 _CRT_INSECURE_DEPRECATE_CORE(_strnset_s) char *__cdecl _strnset(char *_Str,int _Val,size_t _MaxCount);
|
||||
_CRTIMP _CONST_RETURN char *__cdecl strpbrk(const char *_Str,const char *_Control);
|
||||
_CRTIMP _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 size_t __cdecl strspn(const char *_Str,const char *_Control);
|
||||
_CRTIMP _CONST_RETURN char *__cdecl strstr(const char *_Str,const char *_SubStr);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE_CORE(strtok_s) 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(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);
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_strdup) char *__cdecl strdup(const char *_Src);
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_strcmpi) int __cdecl strcmpi(const char *_Str1,const char *_Str2);
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_stricmp) int __cdecl stricmp(const char *_Str1,const char *_Str2);
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_strlwr) char *__cdecl strlwr(char *_Str);
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_strnicmp) 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); }
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_strnset) char *__cdecl strnset(char *_Str,int _Val,size_t _MaxCount);
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_strrev) char *__cdecl strrev(char *_Str);
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_strset) char *__cdecl strset(char *_Str,int _Val);
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_strupr) 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 wchar_t *__cdecl wcscat(wchar_t *_Dest,const wchar_t *_Source);
|
||||
_CRTIMP _CONST_RETURN wchar_t *__cdecl wcschr(const wchar_t *_Str,wchar_t _Ch);
|
||||
_CRTIMP int __cdecl wcscmp(const wchar_t *_Str1,const wchar_t *_Str2);
|
||||
_CRTIMP wchar_t *__cdecl wcscpy(wchar_t *_Dest,const wchar_t *_Source);
|
||||
_CRTIMP size_t __cdecl wcscspn(const wchar_t *_Str,const wchar_t *_Control);
|
||||
_CRTIMP size_t __cdecl wcslen(const wchar_t *_Str);
|
||||
_CRTIMP size_t __cdecl wcsnlen(const wchar_t *_Src,size_t _MaxCount);
|
||||
_CRTIMP wchar_t *wcsncat(wchar_t *_Dest,const wchar_t *_Source,size_t _Count);
|
||||
_CRTIMP int __cdecl wcsncmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
|
||||
_CRTIMP wchar_t *wcsncpy(wchar_t *_Dest,const wchar_t *_Source,size_t _Count);
|
||||
_CRTIMP _CONST_RETURN wchar_t *__cdecl wcspbrk(const wchar_t *_Str,const wchar_t *_Control);
|
||||
_CRTIMP _CONST_RETURN wchar_t *__cdecl wcsrchr(const wchar_t *_Str,wchar_t _Ch);
|
||||
_CRTIMP size_t __cdecl wcsspn(const wchar_t *_Str,const wchar_t *_Control);
|
||||
_CRTIMP _CONST_RETURN wchar_t *__cdecl wcsstr(const wchar_t *_Str,const wchar_t *_SubStr);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE_CORE(wcstok_s) wchar_t *__cdecl wcstok(wchar_t *_Str,const wchar_t *_Delim);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE(_wcserror_s) wchar_t *__cdecl _wcserror(int _ErrNum);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE(__wcserror_s) 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 _CRT_INSECURE_DEPRECATE_CORE(_wcsnset_s) 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 _CRT_INSECURE_DEPRECATE_CORE(_wcsset_s) 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(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(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);
|
||||
@@ -143,27 +141,30 @@ extern "C" {
|
||||
_CRTIMP int __cdecl _wcsnicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
/* NOTE: There is no _wcscmpi, but this is for compatibility. */
|
||||
int __cdecl wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2);
|
||||
__CRT_INLINE int __cdecl wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2) { return _wcsicmp (__ws1, __ws2); }
|
||||
#define _wcscmpi _wcsicmp
|
||||
|
||||
wchar_t *__cdecl wcsdup(const wchar_t *_Str);
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_wcsdup) 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
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_wcsicmp) int __cdecl wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_wcsnicmp) int __cdecl wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount);
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_wcsnset) wchar_t *__cdecl wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount);
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_wcsrev) wchar_t *__cdecl wcsrev(wchar_t *_Str);
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_wcsset) wchar_t *__cdecl wcsset(wchar_t *_Str,wchar_t _Val);
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_wcslwr) wchar_t *__cdecl wcslwr(wchar_t *_Str);
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_wcsupr) wchar_t *__cdecl wcsupr(wchar_t *_Str);
|
||||
_CRTIMP _CRT_NONSTDC_DEPRECATE(_wcsicoll) int __cdecl wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2);
|
||||
#endif
|
||||
|
||||
#endif /* !_WSTRING_DEFINED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <sec_api/string_s.h>
|
||||
|
||||
// HACK
|
||||
#define strcasecmp _stricmp
|
||||
#define strncasecmp _strnicmp
|
||||
#define stricmp _stricmp
|
||||
#define wcsicmp _wcsicmp
|
||||
|
||||
#endif
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
#error Only Win32 target is supported!
|
||||
#endif
|
||||
|
||||
/* All the headers include this file. */
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#define _LK_UNLCK 0
|
||||
#define _LK_LOCK 1
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
#error Only Win32 target is supported!
|
||||
#endif
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <io.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
@@ -19,49 +18,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _CRTIMP
|
||||
#define _CRTIMP __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#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
|
||||
|
||||
#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
|
||||
#define _STAT_DEFINED
|
||||
|
||||
struct _stat32 {
|
||||
_dev_t st_dev;
|
||||
@@ -107,8 +67,7 @@ extern "C" {
|
||||
};
|
||||
#endif
|
||||
|
||||
/* #if _INTEGRAL_MAX_BITS >= 64 */
|
||||
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
struct _stat32i64 {
|
||||
_dev_t st_dev;
|
||||
_ino_t st_ino;
|
||||
@@ -165,11 +124,10 @@ extern "C" {
|
||||
time_t st_ctime;
|
||||
};
|
||||
|
||||
/* #endif */
|
||||
#endif /* _INTEGRAL_MAX_BITS >= 64 */
|
||||
|
||||
#define __stat64 _stat64
|
||||
|
||||
#define _STAT_DEFINED
|
||||
#endif /* !_STAT_DEFINED */
|
||||
|
||||
#define _S_IFMT 0xF000
|
||||
@@ -189,52 +147,16 @@ extern "C" {
|
||||
#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 _fstat64i32(int _FileDes,struct _stat64i32 *_Stat);
|
||||
_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
|
||||
_CRTIMP int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat);
|
||||
#endif /* _INTEGRAL_MAX_BITS >= 64 */
|
||||
|
||||
#ifndef _WSTAT_DEFINED
|
||||
#define _WSTAT_DEFINED
|
||||
_CRTIMP int __cdecl _wstat(const wchar_t *_Name,struct _stat *_Stat);
|
||||
_CRTIMP int __cdecl _wstat32(const wchar_t *_Name,struct _stat32 *_Stat);
|
||||
_CRTIMP int __cdecl _wstati64(const wchar_t *_Name,struct _stati64 *_Stat);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
_CRTIMP int __cdecl _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat);
|
||||
_CRTIMP int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat);
|
||||
@@ -242,6 +164,55 @@ extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/** Compatibility definitons *************************************************/
|
||||
|
||||
#if !defined(RC_INVOKED)
|
||||
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
#define _fstat32 _fstat
|
||||
#define _fstat32i64 _fstati64
|
||||
#define _fstat64i32 _fstat64
|
||||
#else
|
||||
#define _fstat64i32 _fstat
|
||||
__CRT_INLINE int __cdecl _fstat32(int _FileDes, struct _stat32 *_Stat)
|
||||
{
|
||||
struct _stat _Stat64;
|
||||
int ret = _fstat(_FileDes, &_Stat64);
|
||||
_Stat->st_dev = _Stat64.st_dev;
|
||||
_Stat->st_ino = _Stat64.st_ino;
|
||||
_Stat->st_mode = _Stat64.st_mode;
|
||||
_Stat->st_nlink = _Stat64.st_nlink;
|
||||
_Stat->st_uid = _Stat64.st_uid;
|
||||
_Stat->st_gid = _Stat64.st_gid;
|
||||
_Stat->st_rdev = _Stat64.st_rdev;
|
||||
_Stat->st_size = _Stat64.st_size;
|
||||
_Stat->st_atime = _Stat64.st_atime;
|
||||
_Stat->st_mtime = _Stat64.st_mtime;
|
||||
_Stat->st_ctime = _Stat64.st_ctime;
|
||||
return ret;
|
||||
}
|
||||
__CRT_INLINE int __cdecl _fstat32i64(int _FileDes, struct _stat32i64 *_Stat)
|
||||
{
|
||||
struct _stat64 _Stat64;
|
||||
int ret = _fstat64(_FileDes, &_Stat64);
|
||||
_Stat->st_dev = _Stat64.st_dev;
|
||||
_Stat->st_ino = _Stat64.st_ino;
|
||||
_Stat->st_mode = _Stat64.st_mode;
|
||||
_Stat->st_nlink = _Stat64.st_nlink;
|
||||
_Stat->st_uid = _Stat64.st_uid;
|
||||
_Stat->st_gid = _Stat64.st_gid;
|
||||
_Stat->st_rdev = _Stat64.st_rdev;
|
||||
_Stat->st_size = _Stat64.st_size;
|
||||
_Stat->st_atime = _Stat64.st_atime;
|
||||
_Stat->st_mtime = _Stat64.st_mtime;
|
||||
_Stat->st_ctime = _Stat64.st_ctime;
|
||||
return ret;
|
||||
}
|
||||
#endif /* _USE_32BIT_TIME_T */
|
||||
|
||||
#endif /* !defined(RC_INVOKED) */
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
#define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */
|
||||
|
||||
@@ -271,13 +242,10 @@ extern "C" {
|
||||
#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);
|
||||
|
||||
#if !defined (RC_INVOKED)
|
||||
_CRTIMP int __cdecl stat(const char *_Filename,struct stat *_Stat);
|
||||
_CRTIMP int __cdecl fstat(int _Desc,struct stat *_Stat);
|
||||
_CRTIMP int __cdecl wstat(const wchar_t *_Filename,struct stat *_Stat);
|
||||
__CRT_INLINE int __cdecl fstat(int _Desc,struct stat *_Stat) {
|
||||
return _fstat(_Desc,(struct _stat *)_Stat);
|
||||
}
|
||||
@@ -292,6 +260,9 @@ __CRT_INLINE int __cdecl wstat(const wchar_t *_Filename,struct stat *_Stat) {
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* !NO_OLDNAMES */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
* 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_
|
||||
#ifndef _INC_TIMEB
|
||||
#define _INC_TIMEB
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#error Only Win32 target is supported!
|
||||
@@ -18,44 +18,16 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _CRTIMP
|
||||
#define _CRTIMP __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#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
|
||||
|
||||
#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 _timeb {
|
||||
time_t time;
|
||||
unsigned short millitm;
|
||||
short timezone;
|
||||
short dstflag;
|
||||
};
|
||||
|
||||
struct __timeb32 {
|
||||
__time32_t time;
|
||||
unsigned short millitm;
|
||||
@@ -81,41 +53,20 @@ extern "C" {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
#define _timeb __timeb32
|
||||
#define _ftime _ftime32
|
||||
#else
|
||||
#define _timeb __timeb64
|
||||
#define _ftime _ftime64
|
||||
#endif
|
||||
#endif
|
||||
#endif /* !_TIMEB_DEFINED */
|
||||
|
||||
_CRTIMP void __cdecl _ftime32(struct __timeb32 *_Time);
|
||||
_CRTIMP void __cdecl _ftime(struct _timeb *_Time);
|
||||
_CRT_INSECURE_DEPRECATE(_ftime32_s) _CRTIMP void __cdecl _ftime32(struct __timeb32 *_Time);
|
||||
_CRTIMP errno_t __cdecl _ftime32_s(struct __timeb32 *_Time);
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
_CRTIMP void __cdecl _ftime64(struct __timeb64 *_Time);
|
||||
_CRT_INSECURE_DEPRECATE(_ftime64_s) _CRTIMP void __cdecl _ftime64(struct __timeb64 *_Time);
|
||||
_CRTIMP errno_t __cdecl _ftime64_s(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
|
||||
#ifndef NO_OLDNAMES
|
||||
#if !defined (RC_INVOKED)
|
||||
__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);
|
||||
_ftime((struct _timeb *)_Tmb);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -127,4 +78,5 @@ __CRT_INLINE void __cdecl ftime(struct timeb *_Tmb) {
|
||||
#pragma pack(pop)
|
||||
|
||||
#include <sec_api/sys/timeb_s.h>
|
||||
#endif
|
||||
|
||||
#endif /* !_INC_TIMEB */
|
||||
|
||||
@@ -10,38 +10,7 @@
|
||||
#error Only Win32 target is supported!
|
||||
#endif
|
||||
|
||||
#include <_mingw.h>
|
||||
|
||||
#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
|
||||
|
||||
#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
|
||||
#include <crtdefs.h>
|
||||
|
||||
#ifndef _INO_T_DEFINED
|
||||
#define _INO_T_DEFINED
|
||||
@@ -59,58 +28,12 @@ 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)
|
||||
# ifndef NO_OLDNAMES
|
||||
typedef long off_t;
|
||||
#endif
|
||||
#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
|
||||
#endif /* !_INC_TYPES */
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#error Only Win32 target is supported!
|
||||
#endif
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
@@ -18,46 +18,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _CRTIMP
|
||||
#define _CRTIMP __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#ifndef _WCHAR_T_DEFINED
|
||||
typedef unsigned short wchar_t;
|
||||
#define _WCHAR_T_DEFINED
|
||||
#endif
|
||||
|
||||
#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
|
||||
|
||||
#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
|
||||
|
||||
@@ -89,13 +49,13 @@ extern "C" {
|
||||
__time32_t modtime;
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
#endif /* !_UTIMBUF_DEFINED */
|
||||
|
||||
_CRTIMP int __cdecl _utime(const char *_Filename,struct _utimbuf *_Utimbuf);
|
||||
_CRTIMP int __cdecl _utime(const char *_Filename,struct _utimbuf *_Time);
|
||||
_CRTIMP int __cdecl _utime32(const char *_Filename,struct __utimbuf32 *_Time);
|
||||
_CRTIMP int __cdecl _futime(int _Desc,struct _utimbuf *_Utimbuf);
|
||||
_CRTIMP int __cdecl _futime(int _FileDes,struct _utimbuf *_Time);
|
||||
_CRTIMP int __cdecl _futime32(int _FileDes,struct __utimbuf32 *_Time);
|
||||
_CRTIMP int __cdecl _wutime(const wchar_t *_Filename,struct _utimbuf *_Utimbuf);
|
||||
_CRTIMP int __cdecl _wutime(const wchar_t *_Filename,struct _utimbuf *_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);
|
||||
@@ -103,38 +63,25 @@ extern "C" {
|
||||
_CRTIMP int __cdecl _wutime64(const wchar_t *_Filename,struct __utimbuf64 *_Time);
|
||||
#endif
|
||||
|
||||
// Do it like this to keep compatibility to MSVC while using msvcrt.dll
|
||||
#ifndef RC_INVOKED
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
__CRT_INLINE int __cdecl _utime32(const char *_Filename,struct __utimbuf32 *_Utimbuf) {
|
||||
return _utime(_Filename,(struct _utimbuf *)_Utimbuf);
|
||||
}
|
||||
__CRT_INLINE int __cdecl _futime32(int _Desc,struct __utimbuf32 *_Utimbuf) {
|
||||
return _futime(_Desc,(struct _utimbuf *)_Utimbuf);
|
||||
}
|
||||
__CRT_INLINE int __cdecl _wutime32(const wchar_t *_Filename,struct __utimbuf32 *_Utimbuf) {
|
||||
return _wutime(_Filename,(struct _utimbuf *)_Utimbuf);
|
||||
}
|
||||
#else // !_USE_32BIT_TIME_T
|
||||
#ifndef _WIN64
|
||||
__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
|
||||
#endif // _USE_32BIT_TIME_T
|
||||
#endif // RC_INVOKED
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
__CRT_INLINE int __cdecl _utime32(const char *_Filename,struct __utimbuf32 *_Utimbuf) {
|
||||
return _utime(_Filename,(struct _utimbuf *)_Utimbuf);
|
||||
}
|
||||
__CRT_INLINE int __cdecl _futime32(int _Desc,struct __utimbuf32 *_Utimbuf) {
|
||||
return _futime(_Desc,(struct _utimbuf *)_Utimbuf);
|
||||
}
|
||||
__CRT_INLINE int __cdecl _wutime32(const wchar_t *_Filename,struct __utimbuf32 *_Utimbuf) {
|
||||
return _wutime(_Filename,(struct _utimbuf *)_Utimbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
__CRT_INLINE int __cdecl utime(const char *_Filename,struct utimbuf *_Utimbuf) {
|
||||
return _utime(_Filename,(struct _utimbuf *)_Utimbuf);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+17
-11
@@ -3,7 +3,7 @@
|
||||
* 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 <crtdefs.h>
|
||||
|
||||
#ifndef _INC_TCHAR
|
||||
#define _INC_TCHAR
|
||||
@@ -79,12 +79,14 @@ extern "C" {
|
||||
|
||||
#define _WConst_return _CONST_RETURN
|
||||
|
||||
#ifdef _UNICODE
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _UNICODE
|
||||
/** UNICODE ******************************************************************/
|
||||
|
||||
#include <wchar.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -479,10 +481,7 @@ extern "C" {
|
||||
#define _tseekdir _wseekdir
|
||||
|
||||
#else
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
/** ANSI *********************************************************************/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -753,6 +752,7 @@ extern "C" {
|
||||
#define _tsetlocale setlocale
|
||||
|
||||
#ifdef _MBCS
|
||||
/** MBCS *********************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
@@ -851,7 +851,9 @@ extern "C" {
|
||||
#define _tclen _mbclen
|
||||
#define _tccpy _mbccpy
|
||||
#define _tccpy_l _mbccpy_l
|
||||
#else
|
||||
|
||||
|
||||
#else /* !_MB_MAP_DIRECT */
|
||||
|
||||
_CRTIMP _CONST_RETURN char *__cdecl _tcschr(const char *_Str,unsigned int _Val);
|
||||
_CRTIMP size_t __cdecl _tcscspn(const char *_Str,const char *_Control);
|
||||
@@ -957,7 +959,9 @@ extern "C" {
|
||||
#define _istlead _ismbblead
|
||||
#define _istleadbyte isleadbyte
|
||||
#define _istleadbyte_l _isleadbyte_l
|
||||
#else
|
||||
|
||||
#else /* !_MBCS */
|
||||
/** SBCS *********************************************************************/
|
||||
|
||||
#ifndef __TCHAR_DEFINED
|
||||
#define __TCHAR_DEFINED
|
||||
@@ -1106,8 +1110,10 @@ extern "C" {
|
||||
#define _strtok_l(_String,_Delimiters,_Locale) (strtok(_String,_Delimiters))
|
||||
#define _strnset_l(_Destination,_Value,_Count,_Locale) (_strnset(_Destination,_Value,_Count))
|
||||
#define _strset_l(_Destination,_Value,_Locale) (_strset(_Destination,_Value))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* !_MBCS */
|
||||
#endif /* !UNICODE */
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _T(x) __T(x)
|
||||
#define _TEXT(x) __T(x)
|
||||
|
||||
+55
-85
@@ -6,7 +6,7 @@
|
||||
#ifndef _TIME_H_
|
||||
#define _TIME_H_
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#error Only Win32 target is supported!
|
||||
@@ -18,15 +18,6 @@
|
||||
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;
|
||||
@@ -71,20 +62,6 @@ extern "C" {
|
||||
#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
|
||||
@@ -93,17 +70,6 @@ extern "C" {
|
||||
#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 {
|
||||
@@ -121,79 +87,97 @@ extern "C" {
|
||||
|
||||
#define CLOCKS_PER_SEC 1000
|
||||
|
||||
__MINGW_IMPORT int _daylight;
|
||||
__MINGW_IMPORT long _dstbias;
|
||||
__MINGW_IMPORT long _timezone;
|
||||
__MINGW_IMPORT char * _tzname[2];
|
||||
_CRTDATA(extern int _daylight);
|
||||
_CRTDATA(extern long _dstbias);
|
||||
_CRTDATA(extern long _timezone);
|
||||
_CRTDATA(extern 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 _CRT_INSECURE_DEPRECATE(asctime_s) char *__cdecl asctime(const struct tm *_Tm);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE(_ctime32_s) char *__cdecl _ctime32(const __time32_t *_Time);
|
||||
_CRTIMP 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 _CRT_INSECURE_DEPRECATE(_gmtime32_s) struct tm *__cdecl _gmtime32(const __time32_t *_Time);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE(_localtime32_s) struct tm *__cdecl _localtime32(const __time32_t *_Time);
|
||||
_CRTIMP 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);
|
||||
#endif
|
||||
_CRTIMP void __cdecl _tzset(void);
|
||||
_CRT_OBSOLETE(GetLocalTime) unsigned __cdecl _getsystime(struct tm *_Tm);
|
||||
_CRT_OBSOLETE(GetLocalTime) unsigned __cdecl _setsystime(struct tm *_Tm,unsigned _MilliSec);
|
||||
|
||||
_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
|
||||
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 double __cdecl _difftime64(__time64_t _Time1,__time64_t _Time2);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE(_ctime64_s) char *__cdecl _ctime64(const __time64_t *_Time);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE(_gmtime64_s) struct tm *__cdecl _gmtime64(const __time64_t *_Time);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE(_localtime64_s) 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);
|
||||
|
||||
_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
|
||||
unsigned __cdecl _getsystime(struct tm *_Tm);
|
||||
unsigned __cdecl _setsystime(struct tm *_Tm,unsigned _MilliSec);
|
||||
|
||||
#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);
|
||||
#define _WTIME_DEFINED
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE(_wasctime_s) wchar_t *__cdecl _wasctime(const struct tm *_Tm);
|
||||
_CRTIMP wchar_t *__cdecl _wctime(const time_t *_Time);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE(_wctime32_s) wchar_t *__cdecl _wctime32(const __time32_t *_Time);
|
||||
_CRTIMP 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);
|
||||
|
||||
_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 wchar_t *__cdecl _wctime64(const __time64_t *_Time);
|
||||
_CRTIMP _CRT_INSECURE_DEPRECATE(_wctime64_s) wchar_t *__cdecl _wctime64(const __time64_t *_Time);
|
||||
_CRTIMP errno_t __cdecl _wctime64_s(wchar_t *_Buf,size_t _SizeInWords,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); }
|
||||
/* Do it like this to be compatible to msvcrt.dll on 32 bit windows XP and before */
|
||||
__CRT_INLINE wchar_t *__cdecl _wctime32(const time_t *_Time) { return _wctime(_Time); }
|
||||
__CRT_INLINE errno_t _wctime32_s(wchar_t *_Buffer, size_t _SizeInWords,const __time32_t *_Time) { return _wctime32_s(_Buffer, _SizeInWords, _Time); }
|
||||
#else
|
||||
__CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime64(_Time); }
|
||||
__CRT_INLINE errno_t _wctime_s(wchar_t *_Buffer, size_t _SizeInWords,const time_t *_Time) { return _wctime64_s(_Buffer, _SizeInWords, _Time); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _WTIME_DEFINED
|
||||
#endif
|
||||
#endif /* !_WTIME_DEFINED */
|
||||
|
||||
_CRTIMP double __cdecl difftime(time_t _Time1,time_t _Time2);
|
||||
_CRTIMP char *__cdecl ctime(const time_t *_Time);
|
||||
_CRTIMP struct tm *__cdecl gmtime(const time_t *_Time);
|
||||
_CRTIMP struct tm *__cdecl localtime(const time_t *_Time);
|
||||
_CRTIMP struct tm *__cdecl localtime_r(const time_t *_Time,struct tm *);
|
||||
|
||||
_CRTIMP time_t __cdecl mktime(struct tm *_Tm);
|
||||
_CRTIMP time_t __cdecl _mkgmtime(struct tm *_Tm);
|
||||
_CRTIMP time_t __cdecl time(time_t *_Time);
|
||||
|
||||
#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 *);
|
||||
|
||||
_CRTIMP time_t __cdecl mktime(struct tm *_Tm);
|
||||
_CRTIMP time_t __cdecl _mkgmtime(struct tm *_Tm);
|
||||
_CRTIMP 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); }
|
||||
@@ -224,17 +208,6 @@ __CRT_INLINE time_t __cdecl time(time_t *_Time) { return _time64(_Time); }
|
||||
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 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -243,8 +216,5 @@ struct timeval {
|
||||
|
||||
#include <sec_api/time_s.h>
|
||||
|
||||
/* Adding timespec definition. */
|
||||
#include <sys/timeb.h>
|
||||
|
||||
#endif /* End _TIME_H_ */
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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 <crtdefs.h>
|
||||
|
||||
#ifndef _INC_TYPEINFO
|
||||
#define _INC_TYPEINFO
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#error Only Win32 target is supported!
|
||||
#endif
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#undef _CRT_PACKING
|
||||
#define _CRT_PACKING 8
|
||||
|
||||
+115
-183
@@ -6,7 +6,7 @@
|
||||
#ifndef _INC_WCHAR
|
||||
#define _INC_WCHAR
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
@@ -21,16 +21,6 @@ extern "C" {
|
||||
#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
|
||||
@@ -52,15 +42,18 @@ extern "C" {
|
||||
|
||||
#ifndef _STDIO_DEFINED
|
||||
_CRTIMP FILE *__cdecl __iob_func(void);
|
||||
_CRTIMP extern FILE _iob[];
|
||||
_CRTDATA(extern FILE _iob[];)
|
||||
#ifdef _M_CEE_PURE
|
||||
#define _iob __iob_func()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _STDSTREAM_DEFINED
|
||||
#define stdin (&__iob_func()[0])
|
||||
#define stdout (&__iob_func()[1])
|
||||
#define stderr (&__iob_func()[2])
|
||||
#define _STDSTREAM_DEFINED
|
||||
#endif
|
||||
#define stdin (&_iob[0])
|
||||
#define stdout (&_iob[1])
|
||||
#define stderr (&_iob[1])
|
||||
#endif /* !_STDSTREAM_DEFINED */
|
||||
|
||||
#ifndef _FSIZE_T_DEFINED
|
||||
typedef unsigned long _fsize_t;
|
||||
@@ -68,6 +61,15 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _WFINDDATA_T_DEFINED
|
||||
struct _wfinddata_t {
|
||||
unsigned attrib;
|
||||
time_t time_create;
|
||||
time_t time_access;
|
||||
time_t time_write;
|
||||
_fsize_t size;
|
||||
wchar_t name[260];
|
||||
};
|
||||
|
||||
struct _wfinddata32_t {
|
||||
unsigned attrib;
|
||||
__time32_t time_create;
|
||||
@@ -77,7 +79,15 @@ extern "C" {
|
||||
wchar_t name[260];
|
||||
};
|
||||
|
||||
/* #if _INTEGRAL_MAX_BITS >= 64 */
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
struct _wfinddatai64_t {
|
||||
unsigned attrib;
|
||||
time_t time_create;
|
||||
time_t time_access;
|
||||
time_t time_write;
|
||||
__int64 size;
|
||||
wchar_t name[260];
|
||||
};
|
||||
|
||||
struct _wfinddata32i64_t {
|
||||
unsigned attrib;
|
||||
@@ -105,28 +115,10 @@ extern "C" {
|
||||
__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
|
||||
#endif /* !_WFINDDATA_T_DEFINED */
|
||||
|
||||
#ifndef NULL
|
||||
#ifdef __cplusplus
|
||||
@@ -136,65 +128,37 @@ extern "C" {
|
||||
#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
|
||||
# define _CRT_CTYPEDATA_DEFINED
|
||||
# ifndef _CTYPE_DISABLE_MACROS
|
||||
# ifndef __PCTYPE_FUNC
|
||||
# ifdef _DLL
|
||||
# define __PCTYPE_FUNC __pctype_func()
|
||||
# else
|
||||
# define __PCTYPE_FUNC _pctype
|
||||
# endif
|
||||
# endif /* !__PCTYPE_FUNC */
|
||||
_CRTIMP const unsigned short * __cdecl __pctype_func(void);
|
||||
# ifndef _M_CEE_PURE
|
||||
_CRTDATA(extern unsigned short *_pctype);
|
||||
# else
|
||||
# define _pctype (__pctype_func())
|
||||
# endif /* !_M_CEE_PURE */
|
||||
# endif /* !_CTYPE_DISABLE_MACROS */
|
||||
#endif /* !_CRT_CTYPEDATA_DEFINED */
|
||||
|
||||
#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
|
||||
# ifndef _CTYPE_DISABLE_MACROS
|
||||
_CRTDATA(extern unsigned short *_wctype);
|
||||
_CRTIMP const wctype_t * __cdecl __pwctype_func(void);
|
||||
# ifndef _M_CEE_PURE
|
||||
_CRTDATA(extern const wctype_t *_pwctype);
|
||||
# else
|
||||
# define _pwctype (__pwctype_func())
|
||||
# endif /* !_M_CEE_PURE */
|
||||
# endif /* !_CTYPE_DISABLE_MACROS */
|
||||
#endif /* !_CRT_WCTYPEDATA_DEFINED */
|
||||
|
||||
#define _UPPER 0x1
|
||||
#define _LOWER 0x2
|
||||
@@ -211,48 +175,46 @@ extern "C" {
|
||||
|
||||
#ifndef _WCTYPE_DEFINED
|
||||
#define _WCTYPE_DEFINED
|
||||
|
||||
int __cdecl iswalpha(wint_t _C);
|
||||
_CRTIMP 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(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswupper_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswlower(wint_t _C);
|
||||
_CRTIMP 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(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswdigit_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswxdigit(wint_t _C);
|
||||
_CRTIMP 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(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswspace_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswpunct(wint_t _C);
|
||||
_CRTIMP 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(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswalnum_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswprint(wint_t _C);
|
||||
_CRTIMP 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(wint_t _C);
|
||||
_CRTIMP int __cdecl _iswgraph_l(wint_t _C,_locale_t _Locale);
|
||||
int __cdecl iswcntrl(wint_t _C);
|
||||
_CRTIMP 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 iswascii(wint_t _C);
|
||||
_CRTIMP 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(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(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(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);
|
||||
_CRTIMP 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);
|
||||
@@ -263,7 +225,6 @@ extern "C" {
|
||||
|
||||
#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);
|
||||
@@ -274,10 +235,10 @@ extern "C" {
|
||||
_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 _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 _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);
|
||||
@@ -288,7 +249,7 @@ extern "C" {
|
||||
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
|
||||
#endif /* !_WIO_DEFINED */
|
||||
|
||||
#ifndef _WLOCALE_DEFINED
|
||||
#define _WLOCALE_DEFINED
|
||||
@@ -297,7 +258,6 @@ extern "C" {
|
||||
|
||||
#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,...);
|
||||
@@ -317,8 +277,8 @@ extern "C" {
|
||||
#ifndef _CRT_WSYSTEM_DEFINED
|
||||
#define _CRT_WSYSTEM_DEFINED
|
||||
_CRTIMP int __cdecl _wsystem(const wchar_t *_Command);
|
||||
#endif
|
||||
#endif
|
||||
#endif /* !_CRT_WSYSTEM_DEFINED */
|
||||
#endif /* !_WPROCESS_DEFINED */
|
||||
|
||||
#ifndef _WCTYPE_INLINE_DEFINED
|
||||
#undef _CRT_WCTYPE_NOINLINE
|
||||
@@ -373,19 +333,16 @@ extern "C" {
|
||||
|
||||
#ifndef _OFF_T_DEFINED
|
||||
#define _OFF_T_DEFINED
|
||||
#ifndef _OFF_T_
|
||||
#define _OFF_T_
|
||||
typedef long _off_t;
|
||||
#if !defined(NO_OLDNAMES) || defined(_POSIX)
|
||||
#ifndef NO_OLDNAMES
|
||||
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)
|
||||
#ifndef NO_OLDNAMES
|
||||
typedef long long off64_t;
|
||||
#endif
|
||||
#endif
|
||||
@@ -393,28 +350,6 @@ extern "C" {
|
||||
#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;
|
||||
@@ -429,6 +364,20 @@ extern "C" {
|
||||
__time32_t st_ctime;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
struct stat {
|
||||
_dev_t st_dev;
|
||||
@@ -445,7 +394,7 @@ extern "C" {
|
||||
};
|
||||
#endif
|
||||
|
||||
/* #if _INTEGRAL_MAX_BITS >= 64 */
|
||||
#if _INTEGRAL_MAX_BITS >= 64
|
||||
|
||||
struct _stat32i64 {
|
||||
_dev_t st_dev;
|
||||
@@ -488,7 +437,7 @@ extern "C" {
|
||||
__time64_t st_mtime;
|
||||
__time64_t st_ctime;
|
||||
};
|
||||
/* #endif */
|
||||
#endif
|
||||
|
||||
#define __stat64 _stat64
|
||||
|
||||
@@ -496,11 +445,11 @@ extern "C" {
|
||||
|
||||
#ifndef _WSTAT_DEFINED
|
||||
#define _WSTAT_DEFINED
|
||||
|
||||
_CRTIMP int __cdecl _wstat(const wchar_t *_Name,struct _stat *_Stat);
|
||||
_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 _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat);
|
||||
_CRTIMP int __cdecl _wstat64(const wchar_t *_Name,struct _stat64 *_Stat);
|
||||
#endif
|
||||
#endif
|
||||
@@ -508,11 +457,6 @@ extern "C" {
|
||||
|
||||
#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);
|
||||
@@ -539,34 +483,30 @@ extern "C" {
|
||||
#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_ALT 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 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 wint_t __cdecl getwc(FILE *_File);
|
||||
_CRTIMP wint_t __cdecl getwchar(void);
|
||||
_CRTIMP wint_t __cdecl putwc(wchar_t _Ch,FILE *_File);
|
||||
_CRTIMP wint_t __cdecl putwchar(wchar_t _Ch);
|
||||
_CRTIMP_ALT wint_t __cdecl ungetwc(wint_t _Ch,FILE *_File);
|
||||
_CRTIMP wchar_t *__cdecl fgetws(wchar_t *_Dst,int _SizeInWords,FILE *_File);
|
||||
_CRTIMP 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 fwprintf(FILE *_File,const wchar_t *_Format,...);
|
||||
_CRTIMP 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 vfwprintf(FILE *_File,const wchar_t *_Format,va_list _ArgList);
|
||||
_CRTIMP 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,...);
|
||||
@@ -574,11 +514,11 @@ extern "C" {
|
||||
_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, ...);
|
||||
_CRTIMP 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);
|
||||
_CRTIMP int __cdecl vwscanf (const wchar_t *, va_list);
|
||||
_CRTIMP int __cdecl vfwscanf (FILE *,const wchar_t *,va_list);
|
||||
_CRTIMP 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,...);
|
||||
@@ -609,9 +549,6 @@ extern "C" {
|
||||
_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
|
||||
@@ -766,11 +703,6 @@ extern "C" {
|
||||
_CRTIMP int __cdecl _wcsnicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale);
|
||||
|
||||
#ifndef NO_OLDNAMES
|
||||
/* NOTE: There is no _wcscmpi, but this is for compatibility. */
|
||||
int __cdecl wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2);
|
||||
__CRT_INLINE int __cdecl wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2) { return _wcsicmp (__ws1, __ws2); }
|
||||
#define _wcscmpi _wcsicmp
|
||||
|
||||
wchar_t *__cdecl wcsdup(const wchar_t *_Str);
|
||||
#define wcswcs wcsstr
|
||||
int __cdecl wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2);
|
||||
@@ -864,5 +796,5 @@ __CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime64(_T
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#include <sec_api/wchar_s.h>
|
||||
//#include <sec_api/wchar_s.h>
|
||||
#endif
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#error Only Win32 target is supported!
|
||||
#endif
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef _YVALS
|
||||
#define _YVALS
|
||||
|
||||
#include <_mingw.h>
|
||||
#include <crtdefs.h>
|
||||
|
||||
#pragma pack(push,_CRT_PACKING)
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@ typedef struct __SEH2Frame
|
||||
{
|
||||
_SEH2Registration_t SF_Registration;
|
||||
volatile struct __SEH2TryLevel * volatile SF_TopTryLevel;
|
||||
struct _EXCEPTION_POINTERS * volatile SF_ExceptionInformation;
|
||||
volatile unsigned long SF_Code;
|
||||
}
|
||||
_SEH2Frame_t;
|
||||
@@ -143,15 +142,23 @@ void * _SEHClosureFromTrampoline(_SEHTrampoline_t * trampoline_)
|
||||
#define __SEH_FORCE_NEST \
|
||||
__asm__ __volatile__("#%0" : : "r" (&_SEHFrame))
|
||||
|
||||
#define __SEH_DECLARE_EXCEPT_PFN(NAME_) int (__cdecl * NAME_)(void)
|
||||
#define __SEH_DECLARE_EXCEPT(NAME_) int __cdecl NAME_(void)
|
||||
#define __SEH_DEFINE_EXCEPT(NAME_) int __cdecl NAME_(void)
|
||||
#define __SEH_EXCEPT_RET long
|
||||
#define __SEH_EXCEPT_ARGS __attribute__((unused)) _SEH2Frame_t * _SEH2FrameP, __attribute__((unused)) struct _EXCEPTION_POINTERS * _SEHExceptionInformation
|
||||
#define __SEH_EXCEPT_ARGS_ , __SEH_EXCEPT_ARGS
|
||||
#define __SEH_EXCEPT_PFN __SEH_DECLARE_EXCEPT_PFN
|
||||
#define __SEH_DECLARE_EXCEPT_PFN(NAME_) __SEH_EXCEPT_RET (__cdecl * NAME_)(__SEH_EXCEPT_ARGS)
|
||||
#define __SEH_DECLARE_EXCEPT(NAME_) __SEH_EXCEPT_RET __cdecl NAME_(__SEH_EXCEPT_ARGS)
|
||||
#define __SEH_DEFINE_EXCEPT(NAME_) __SEH_EXCEPT_RET __cdecl NAME_(__SEH_EXCEPT_ARGS)
|
||||
|
||||
#define __SEH_DECLARE_FINALLY_PFN(NAME_) void (__cdecl * NAME_)(void)
|
||||
#define __SEH_DECLARE_FINALLY(NAME_) void __cdecl NAME_(void)
|
||||
#define __SEH_DEFINE_FINALLY(NAME_) void __cdecl NAME_(void)
|
||||
#define __SEH_FINALLY_RET void
|
||||
#define __SEH_FINALLY_ARGS void
|
||||
#define __SEH_FINALLY_ARGS_
|
||||
#define __SEH_FINALLY_PFN __SEH_DECLARE_FINALLY_PFN
|
||||
#define __SEH_DECLARE_FINALLY_PFN(NAME_) __SEH_FINALLY_RET (__cdecl * NAME_)(__SEH_FINALLY_ARGS)
|
||||
#define __SEH_DECLARE_FINALLY(NAME_) __SEH_FINALLY_RET __cdecl NAME_(__SEH_FINALLY_ARGS)
|
||||
#define __SEH_DEFINE_FINALLY(NAME_) __SEH_FINALLY_RET __cdecl NAME_(__SEH_FINALLY_ARGS)
|
||||
|
||||
#define __SEH_RETURN_EXCEPT(R_) return (int)(R_)
|
||||
#define __SEH_RETURN_EXCEPT(R_) return (long)(R_)
|
||||
#define __SEH_RETURN_FINALLY() return
|
||||
|
||||
#define __SEH_BEGIN_TRY \
|
||||
@@ -178,9 +185,9 @@ void * _SEHClosureFromTrampoline(_SEHTrampoline_t * trampoline_)
|
||||
#define __SEH_LEAVE_TRYLEVEL() __SEH_SET_TRYLEVEL(_SEHPrevTryLevelP)
|
||||
|
||||
#define __SEH_END_SCOPE_CHAIN \
|
||||
static const int _SEH2ScopeKind = 1; \
|
||||
static _SEH2Frame_t * const _SEH2FrameP = 0; \
|
||||
static _SEH2TryLevel_t * const _SEH2TryLevelP = 0;
|
||||
static __attribute__((unused)) const int _SEH2ScopeKind = 1; \
|
||||
static __attribute__((unused)) _SEH2Frame_t * const _SEH2FrameP = 0; \
|
||||
static __attribute__((unused)) _SEH2TryLevel_t * const _SEH2TryLevelP = 0;
|
||||
|
||||
#define __SEH_BEGIN_SCOPE \
|
||||
for(;;) \
|
||||
@@ -290,35 +297,39 @@ void * _SEHClosureFromTrampoline(_SEHTrampoline_t * trampoline_)
|
||||
\
|
||||
_SEHBeforeTry:; \
|
||||
\
|
||||
if(__builtin_constant_p((__VA_ARGS__))) \
|
||||
{ \
|
||||
if((__VA_ARGS__) > 0) \
|
||||
__attribute__((unused)) struct _EXCEPTION_POINTERS * volatile _SEHExceptionInformation; \
|
||||
\
|
||||
if(__builtin_constant_p((__VA_ARGS__))) \
|
||||
{ \
|
||||
_SEHTryLevel.ST_Filter = (void *)1; \
|
||||
_SEHTryLevel.ST_Body = &&_SEHBeginExcept; \
|
||||
__SEH_USE_LABEL(_SEHBeginExcept); \
|
||||
} \
|
||||
else if((__VA_ARGS__) < 0) \
|
||||
{ \
|
||||
_SEHTryLevel.ST_Filter = (void *)-1; \
|
||||
_SEHTryLevel.ST_Body = NULL; \
|
||||
if((__VA_ARGS__) > 0) \
|
||||
{ \
|
||||
_SEHTryLevel.ST_Filter = (void *)1; \
|
||||
_SEHTryLevel.ST_Body = &&_SEHBeginExcept; \
|
||||
__SEH_USE_LABEL(_SEHBeginExcept); \
|
||||
} \
|
||||
else if((__VA_ARGS__) < 0) \
|
||||
{ \
|
||||
_SEHTryLevel.ST_Filter = (void *)-1; \
|
||||
_SEHTryLevel.ST_Body = NULL; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
_SEHTryLevel.ST_Filter = (void *)0; \
|
||||
_SEHTryLevel.ST_Body = NULL; \
|
||||
} \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
_SEHTryLevel.ST_Filter = (void *)0; \
|
||||
_SEHTryLevel.ST_Body = NULL; \
|
||||
} \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
__SEH_DEFINE_EXCEPT(_SEHExcept) \
|
||||
{ \
|
||||
__SEH_RETURN_EXCEPT((__VA_ARGS__)); \
|
||||
} \
|
||||
__SEH_DEFINE_EXCEPT(_SEHExcept) \
|
||||
{ \
|
||||
__SEH_RETURN_EXCEPT((__VA_ARGS__)); \
|
||||
} \
|
||||
\
|
||||
_SEHTryLevel.ST_Filter = &_SEHExcept; \
|
||||
_SEHTryLevel.ST_Body = &&_SEHBeginExcept; \
|
||||
__SEH_USE_LABEL(_SEHBeginExcept); \
|
||||
_SEHTryLevel.ST_Filter = &_SEHExcept; \
|
||||
_SEHTryLevel.ST_Body = &&_SEHBeginExcept; \
|
||||
__SEH_USE_LABEL(_SEHBeginExcept); \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
__SEH_BARRIER; \
|
||||
@@ -350,8 +361,6 @@ void * _SEHClosureFromTrampoline(_SEHTrampoline_t * trampoline_)
|
||||
_SEHBeginExcept:; \
|
||||
{ \
|
||||
{ \
|
||||
_SEH2Frame_t * const _SEH2FrameP = _SEHTopTryLevel ? &_SEHFrame : _SEHCurFrameP; \
|
||||
(void)_SEH2FrameP; \
|
||||
__SEH_BARRIER;
|
||||
|
||||
#define _SEH2_END \
|
||||
@@ -363,7 +372,7 @@ void * _SEHClosureFromTrampoline(_SEHTrampoline_t * trampoline_)
|
||||
} \
|
||||
__SEH_END_SCOPE;
|
||||
|
||||
#define _SEH2_GetExceptionInformation() ((_SEH2FrameP)->SF_ExceptionInformation)
|
||||
#define _SEH2_GetExceptionInformation() (_SEHExceptionInformation)
|
||||
#define _SEH2_GetExceptionCode() ((_SEH2FrameP)->SF_Code)
|
||||
#define _SEH2_AbnormalTermination() (_SEHAbnormalTermination)
|
||||
|
||||
|
||||
@@ -277,6 +277,27 @@ typedef struct _SERVERINFO
|
||||
COLORREF SysColors[COLOR_MENUBAR+1]; // GetSysColor
|
||||
HBRUSH SysColorBrushes[COLOR_MENUBAR+1]; // GetSysColorBrush
|
||||
HPEN SysColorPens[COLOR_MENUBAR+1]; // ReactOS exclusive
|
||||
HBRUSH hbrGray;
|
||||
POINTL ptCursor;
|
||||
//
|
||||
DWORD cxSysFontChar;
|
||||
DWORD cySysFontChar;
|
||||
DWORD cxMsgFontChar;
|
||||
DWORD cyMsgFontChar;
|
||||
TEXTMETRICW tmSysFont;
|
||||
//
|
||||
RECTL rcScreen;
|
||||
WORD BitCount;
|
||||
WORD dmLogPixels;
|
||||
BYTE BitsPixel;
|
||||
BYTE Planes;
|
||||
WORD reserved;
|
||||
DWORD PUSIFlags; // PERUSERSERVERINFO Flags.
|
||||
ULONG uCaretWidth;
|
||||
LANGID UILangID;
|
||||
UINT LastRITWasKeyboard : 1;
|
||||
UINT bKeyboardPref : 1;
|
||||
DWORD TimeTick;
|
||||
DWORD SrvEventActivity;
|
||||
} SERVERINFO, *PSERVERINFO;
|
||||
|
||||
|
||||
@@ -442,7 +442,7 @@
|
||||
|
||||
/* Define to 1 if the system has the type `pid_t'. */
|
||||
#if !defined(_MSC_VER)
|
||||
#define HAVE_PID_T 1
|
||||
//#define HAVE_PID_T 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef EXCEPTION_DISPOSITION (*PEXCEPTION_HANDLER)
|
||||
(struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);
|
||||
|
||||
struct _EXCEPTION_REGISTRATION_RECORD;
|
||||
typedef struct _EXCEPTION_REGISTRATION_RECORD EXCEPTION_REGISTRATION_RECORD, *PEXCEPTION_REGISTRATION_RECORD;
|
||||
|
||||
@@ -37,6 +40,13 @@ struct _EXCEPTION_REGISTRATION_RECORD
|
||||
#define AbnormalTermination() _SEH2_AbnormalTermination()
|
||||
#endif
|
||||
|
||||
/* Win32 seems to use the same flags as ExceptionFlags in an EXCEPTION_RECORD */
|
||||
#define EH_NONCONTINUABLE 0x01
|
||||
#define EH_UNWINDING 0x02
|
||||
#define EH_EXIT_UNWIND 0x04
|
||||
#define EH_STACK_INVALID 0x08
|
||||
#define EH_NESTED_CALL 0x10
|
||||
|
||||
#define EXCEPTION_WINE_STUB 0x80000100
|
||||
#define EXCEPTION_WINE_ASSERTION 0x80000101
|
||||
|
||||
|
||||
@@ -20,14 +20,15 @@
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#define _NTSYSTEM_
|
||||
#define _NTSYSTEM_ /* removes dllimport attribute from RtlUnwind */
|
||||
|
||||
#define STRICT
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
||||
#include <pseh/pseh2.h>
|
||||
|
||||
#include <excpt.h>
|
||||
#include <intrin.h>
|
||||
|
||||
#ifndef EXCEPTION_EXIT_UNWIND
|
||||
#define EXCEPTION_EXIT_UNWIND 4
|
||||
@@ -37,18 +38,29 @@
|
||||
#define EXCEPTION_UNWINDING 2
|
||||
#endif
|
||||
|
||||
extern _SEH2Registration_t * __cdecl _SEH2CurrentRegistration(void);
|
||||
|
||||
extern int __SEH2Except(void *, void *);
|
||||
extern void __SEH2Finally(void *, void *);
|
||||
extern DECLSPEC_NORETURN int __SEH2Handle(void *, void *, void *);
|
||||
|
||||
extern void __cdecl __SEH2EnterFrame(_SEH2Registration_t *);
|
||||
extern void __cdecl __SEH2LeaveFrame(void);
|
||||
|
||||
extern int __cdecl __SEH2FrameHandler(struct _EXCEPTION_RECORD *, void *, struct _CONTEXT *, void *);
|
||||
extern int __cdecl __SEH2NestedHandler(struct _EXCEPTION_RECORD *, void *, struct _CONTEXT *, void *);
|
||||
|
||||
FORCEINLINE
|
||||
_SEH2Registration_t * __cdecl _SEH2CurrentRegistration(void)
|
||||
{
|
||||
return (_SEH2Registration_t *)__readfsdword(0);
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
void __cdecl __SEH2EnterFrame(_SEH2Registration_t * frame)
|
||||
{
|
||||
frame->SER_Prev = _SEH2CurrentRegistration();
|
||||
__writefsdword(0, (unsigned long)frame);
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
void __cdecl __SEH2LeaveFrame(void)
|
||||
{
|
||||
__writefsdword(0, (unsigned long)_SEH2CurrentRegistration()->SER_Prev);
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
void _SEH2GlobalUnwind(void * target)
|
||||
{
|
||||
@@ -67,11 +79,12 @@ void _SEH2GlobalUnwind(void * target)
|
||||
);
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
int _SEH2Except(_SEH2Frame_t * frame, volatile _SEH2TryLevel_t * trylevel)
|
||||
static
|
||||
__SEH_EXCEPT_RET _SEH2Except(_SEH2Frame_t * frame, volatile _SEH2TryLevel_t * trylevel, struct _EXCEPTION_POINTERS * ep)
|
||||
{
|
||||
void * filter = trylevel->ST_Filter;
|
||||
void * context = NULL;
|
||||
__SEH_EXCEPT_RET ret;
|
||||
|
||||
if(filter == (void *)0)
|
||||
return 0;
|
||||
@@ -88,10 +101,22 @@ int _SEH2Except(_SEH2Frame_t * frame, volatile _SEH2TryLevel_t * trylevel)
|
||||
filter = _SEHFunctionFromTrampoline((_SEHTrampoline_t *)filter);
|
||||
}
|
||||
|
||||
return __SEH2Except(filter, context);
|
||||
__asm__ __volatile__
|
||||
(
|
||||
"push %[ep]\n"
|
||||
"push %[frame]\n"
|
||||
"call *%[filter]\n"
|
||||
"pop %%edx\n"
|
||||
"pop %%edx\n" :
|
||||
[ret] "=a" (ret) :
|
||||
"c" (context), [filter] "r" (filter), [frame] "g" (frame), [ep] "g" (ep) :
|
||||
"edx", "flags", "memory"
|
||||
);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
static
|
||||
void _SEH2Finally(_SEH2Frame_t * frame, volatile _SEH2TryLevel_t * trylevel)
|
||||
{
|
||||
if(trylevel->ST_Filter == NULL && trylevel->ST_Body != NULL)
|
||||
@@ -105,7 +130,7 @@ void _SEH2Finally(_SEH2Frame_t * frame, volatile _SEH2TryLevel_t * trylevel)
|
||||
body = _SEHFunctionFromTrampoline((_SEHTrampoline_t *)body);
|
||||
}
|
||||
|
||||
__SEH2Finally(body, context);
|
||||
__asm__ __volatile__("call *%1\n" : : "c" (context), "r" (body) : "eax", "edx", "flags", "memory");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,11 +204,10 @@ int __cdecl _SEH2FrameHandler
|
||||
ep.ContextRecord = ContextRecord;
|
||||
|
||||
frame->SF_Code = ExceptionRecord->ExceptionCode;
|
||||
frame->SF_ExceptionInformation = &ep;
|
||||
|
||||
for(trylevel = frame->SF_TopTryLevel; trylevel != NULL; trylevel = trylevel->ST_Next)
|
||||
{
|
||||
ret = _SEH2Except(frame, trylevel);
|
||||
ret = _SEH2Except(frame, trylevel, &ep);
|
||||
|
||||
if(ret < 0)
|
||||
return ExceptionContinueExecution;
|
||||
|
||||
@@ -21,32 +21,6 @@
|
||||
.text
|
||||
.intel_syntax noprefix
|
||||
|
||||
.func _SEH2CurrentRegistration
|
||||
.globl __SEH2CurrentRegistration
|
||||
__SEH2CurrentRegistration:
|
||||
mov eax, [fs:0]
|
||||
ret
|
||||
.endfunc
|
||||
|
||||
.func __SEH2EnterFrame
|
||||
.globl ___SEH2EnterFrame
|
||||
___SEH2EnterFrame:
|
||||
mov eax, [esp+4]
|
||||
mov ecx, [fs:0]
|
||||
mov [eax], ecx
|
||||
mov [fs:0], eax
|
||||
ret
|
||||
.endfunc
|
||||
|
||||
.func __SEH2LeaveFrame
|
||||
.globl ___SEH2LeaveFrame
|
||||
___SEH2LeaveFrame:
|
||||
mov eax, [fs:0]
|
||||
mov eax, [eax]
|
||||
mov [fs:0], eax
|
||||
ret
|
||||
.endfunc
|
||||
|
||||
.func __SEH2Handle
|
||||
.globl ___SEH2Handle
|
||||
___SEH2Handle:
|
||||
@@ -56,28 +30,6 @@ ___SEH2Handle:
|
||||
jmp eax
|
||||
.endfunc
|
||||
|
||||
.func __SEH2Except
|
||||
.globl ___SEH2Except
|
||||
___SEH2Except:
|
||||
mov eax, [esp+4]
|
||||
mov ecx, [esp+8]
|
||||
|
||||
call eax
|
||||
|
||||
ret
|
||||
.endfunc
|
||||
|
||||
.func __SEH2Finally
|
||||
.globl ___SEH2Finally
|
||||
___SEH2Finally:
|
||||
mov eax, [esp+4]
|
||||
mov ecx, [esp+8]
|
||||
|
||||
call eax
|
||||
|
||||
ret
|
||||
.endfunc
|
||||
|
||||
.func __SEH2FrameHandler
|
||||
.globl ___SEH2FrameHandler
|
||||
___SEH2FrameHandler:
|
||||
|
||||
@@ -19,28 +19,10 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "wine/config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "winternl.h"
|
||||
#include "wine/exception.h"
|
||||
#include "winnt.h"
|
||||
#include "excpt.h"
|
||||
#include "wine/debug.h"
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <precomp.h>
|
||||
|
||||
#include <internal/wine/msvcrt.h>
|
||||
#include <internal/wine/cppexcept.h>
|
||||
#include <internal/mtdll.h>
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
|
||||
|
||||
typedef exception bad_cast;
|
||||
typedef exception bad_typeid;
|
||||
@@ -76,7 +58,6 @@ typedef struct _rtti_object_locator
|
||||
const rtti_object_hierarchy *type_hierarchy;
|
||||
} rtti_object_locator;
|
||||
|
||||
|
||||
#ifdef __i386__ /* thiscall functions are i386-specific */
|
||||
|
||||
#define THISCALL(func) __thiscall_ ## func
|
||||
|
||||
@@ -23,20 +23,11 @@
|
||||
* www.thecodeproject.com.
|
||||
*/
|
||||
|
||||
#include "wine/config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#define __WINE_DEBUG_CHANNEL__
|
||||
#include <precomp.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "winternl.h"
|
||||
#include <internal/wine/msvcrt.h>
|
||||
#include "wine/exception.h"
|
||||
#include "excpt.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
#include <internal/wine/cppexcept.h>
|
||||
|
||||
#ifdef __i386__ /* CxxFrameHandler is not supported on non-i386 */
|
||||
@@ -328,7 +319,7 @@ static inline void call_catch_block( PEXCEPTION_RECORD rec, cxx_exception_frame
|
||||
|
||||
/* setup an exception block for nested exceptions */
|
||||
|
||||
nested_frame.frame.Handler = (PEXCEPTION_HANDLER)catch_function_nested_handler;
|
||||
nested_frame.frame.Handler = (PEXCEPTION_ROUTINE)catch_function_nested_handler;
|
||||
nested_frame.prev_rec = thread_data->exc_record;
|
||||
nested_frame.cxx_frame = frame;
|
||||
nested_frame.descr = descr;
|
||||
|
||||
@@ -21,6 +21,57 @@
|
||||
#ifndef __MSVCRT_CPPEXCEPT_H
|
||||
#define __MSVCRT_CPPEXCEPT_H
|
||||
|
||||
#include <pseh/pseh2.h>
|
||||
|
||||
/* Macros to define assembler functions somewhat portably */
|
||||
|
||||
#define __ASM_FUNC(name) ".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef"
|
||||
#define __ASM_NAME(name) "_" name
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define __ASM_GLOBAL_FUNC(name,code) \
|
||||
__asm__( ".align 4\n\t" \
|
||||
".globl " __ASM_NAME(#name) "\n\t" \
|
||||
__ASM_FUNC(#name) "\n" \
|
||||
__ASM_NAME(#name) ":\n\t" \
|
||||
code );
|
||||
#else /* __GNUC__ */
|
||||
# define __ASM_GLOBAL_FUNC(name,code) \
|
||||
void __asm_dummy_##name(void) { \
|
||||
asm( ".align 4\n\t" \
|
||||
".globl " __ASM_NAME(#name) "\n\t" \
|
||||
__ASM_FUNC(#name) "\n" \
|
||||
__ASM_NAME(#name) ":\n\t" \
|
||||
code ); \
|
||||
}
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#define EH_NONCONTINUABLE 0x01
|
||||
#define EH_UNWINDING 0x02
|
||||
#define EH_EXIT_UNWIND 0x04
|
||||
#define EH_STACK_INVALID 0x08
|
||||
#define EH_NESTED_CALL 0x10
|
||||
|
||||
static inline EXCEPTION_REGISTRATION_RECORD *__wine_push_frame( EXCEPTION_REGISTRATION_RECORD *frame )
|
||||
{
|
||||
frame->Next = (struct _EXCEPTION_REGISTRATION_RECORD *)__readfsdword(0);
|
||||
__writefsdword(0, (unsigned long)frame);
|
||||
return frame->Next;
|
||||
}
|
||||
|
||||
static inline EXCEPTION_REGISTRATION_RECORD *__wine_pop_frame( EXCEPTION_REGISTRATION_RECORD *frame )
|
||||
{
|
||||
__writefsdword(0, (unsigned long)frame->Next);
|
||||
return frame->Next;
|
||||
}
|
||||
|
||||
#define __TRY _SEH2_TRY
|
||||
#define __EXCEPT(func) _SEH2_EXCEPT(func(_SEH2_GetExceptionInformation()))
|
||||
#define __EXCEPT_PAGE_FAULT _SEH2_EXCEPT(_SEH2_GetExceptionCode() == STATUS_ACCESS_VIOLATION)
|
||||
#define __EXCEPT_ALL _SEH2_EXCEPT(_SEH_EXECUTE_HANDLER)
|
||||
#define __ENDTRY _SEH2_END
|
||||
#define __FINALLY(func) _SEH2_FINALLY { func(!_SEH2_AbnormalTermination()); }
|
||||
|
||||
#define CXX_FRAME_MAGIC 0x19930520
|
||||
#define CXX_EXCEPTION 0xe06d7363
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ static void remap_synonym(char *name)
|
||||
size_t i;
|
||||
for (i = 0; i < sizeof(_country_synonyms)/sizeof(char*); i += 2 )
|
||||
{
|
||||
if (!strcasecmp(_country_synonyms[i],name))
|
||||
if (!_stricmp(_country_synonyms[i],name))
|
||||
{
|
||||
TRACE(":Mapping synonym %s to %s\n",name,_country_synonyms[i+1]);
|
||||
name[0] = _country_synonyms[i+1][0];
|
||||
@@ -172,7 +172,7 @@ static int compare_info(LCID lcid, DWORD flags, char* buff, const char* cmp)
|
||||
if (!buff[0] || !cmp[0])
|
||||
return 0;
|
||||
/* Partial matches are allowed, e.g. "Germ" matches "Germany" */
|
||||
return !strncasecmp(cmp, buff, strlen(cmp));
|
||||
return !_strnicmp(cmp, buff, strlen(cmp));
|
||||
}
|
||||
|
||||
|
||||
@@ -271,12 +271,12 @@ static LCID MSVCRT_locale_to_LCID(locale_search_t* locale)
|
||||
else
|
||||
{
|
||||
/* Special codepage values: OEM & ANSI */
|
||||
if (strcasecmp(locale->search_codepage,"OCP"))
|
||||
if (_stricmp(locale->search_codepage,"OCP"))
|
||||
{
|
||||
GetLocaleInfoA(lcid, LOCALE_IDEFAULTCODEPAGE,
|
||||
locale->found_codepage, MAX_ELEM_LEN);
|
||||
}
|
||||
if (strcasecmp(locale->search_codepage,"ACP"))
|
||||
if (_stricmp(locale->search_codepage,"ACP"))
|
||||
{
|
||||
GetLocaleInfoA(lcid, LOCALE_IDEFAULTANSICODEPAGE,
|
||||
locale->found_codepage, MAX_ELEM_LEN);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user