Update excpt.h, fcntl.h, float.h, math.c, mbctype.h, setjmp.h, share.h, stddef.h, stdio.h, stdlib.h, string.h, wchar.h from ming64

- fix __p__mbctype()
- add some stuff to wine/exception.h that was formerly in except.h, but doesn't belong there
- inlcude intrin.h from _mingw.h

svn path=/trunk/; revision=38252
This commit is contained in:
Timo Kreuzer 2008-12-21 22:43:46 +00:00
parent fec3246837
commit ebd5a724c6
15 changed files with 220 additions and 189 deletions

View file

@ -569,5 +569,27 @@ extern "C" {
#endif
#pragma pack(pop)
/* There 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

View file

@ -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

View file

@ -36,7 +36,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 +47,6 @@
#define O_NOINHERIT _O_NOINHERIT
#define O_SEQUENTIAL _O_SEQUENTIAL
#define O_RANDOM _O_RANDOM
#define O_ACCMODE _O_ACCMODE
#endif
#endif

View file

@ -99,12 +99,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 +118,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 +130,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
}

View file

@ -76,6 +76,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);
@ -130,6 +131,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 +423,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);

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -294,7 +294,7 @@ extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */
_CRTIMP int __cdecl _vscprintf(const char *_Format,va_list _ArgList);
_CRTIMP int __cdecl _set_printf_count_output(int _Value);
_CRTIMP int __cdecl _get_printf_count_output();
_CRTIMP int __cdecl _get_printf_count_output(void);
#ifndef _WSTDIO_DEFINED
@ -332,14 +332,7 @@ extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */
_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);

View file

@ -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))
_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;
@ -349,15 +344,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);
@ -366,7 +361,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);
@ -448,7 +443,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);
@ -457,7 +452,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_
@ -472,8 +467,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);
@ -482,13 +477,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);
@ -528,8 +523,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);
@ -563,7 +558,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); }
@ -572,7 +567,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

View file

@ -143,11 +143,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);

View file

@ -457,7 +457,7 @@ extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */
};
#endif
/* #if _INTEGRAL_MAX_BITS >= 64 */
#if _INTEGRAL_MAX_BITS >= 64
struct _stat32i64 {
_dev_t st_dev;
@ -500,7 +500,7 @@ extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */
__time64_t st_mtime;
__time64_t st_ctime;
};
/* #endif */
#endif
#define __stat64 _stat64
@ -778,11 +778,6 @@ extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */
_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);

View 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

View file

@ -45,7 +45,7 @@ int _ismbslead( const unsigned char *start, const unsigned char *str)
/*
* @implemented
*/
const unsigned char *__p__mbctype(void)
unsigned char *__p__mbctype(void)
{
return _mbctype;
}