Author: tkreuzer
Date: Sun Dec 21 16:43:46 2008
New Revision: 38252
URL:
http://svn.reactos.org/svn/reactos?rev=38252&view=rev
Log:
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
Modified:
trunk/reactos/include/crt/_mingw.h
trunk/reactos/include/crt/excpt.h
trunk/reactos/include/crt/fcntl.h
trunk/reactos/include/crt/float.h
trunk/reactos/include/crt/math.h
trunk/reactos/include/crt/mbctype.h
trunk/reactos/include/crt/setjmp.h
trunk/reactos/include/crt/share.h
trunk/reactos/include/crt/stddef.h
trunk/reactos/include/crt/stdio.h
trunk/reactos/include/crt/stdlib.h
trunk/reactos/include/crt/string.h
trunk/reactos/include/crt/wchar.h
trunk/reactos/include/reactos/wine/exception.h
trunk/reactos/lib/sdk/crt/mbstring/ismblead.c
Modified: trunk/reactos/include/crt/_mingw.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/_mingw.h?rev=3…
==============================================================================
--- trunk/reactos/include/crt/_mingw.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/_mingw.h [iso-8859-1] Sun Dec 21 16:43:46 2008
@@ -569,5 +569,27 @@
#endif
#pragma pack(pop)
-#endif
-
+
+/* 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
+
Modified: trunk/reactos/include/crt/excpt.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/excpt.h?rev=38…
==============================================================================
--- trunk/reactos/include/crt/excpt.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/excpt.h [iso-8859-1] Sun Dec 21 16:43:46 2008
@@ -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*);
+typedef enum _EXCEPTION_DISPOSITION
+{
+ ExceptionContinueExecution,
+ ExceptionContinueSearch,
+ ExceptionNestedException,
+ ExceptionCollidedUnwind,
+} EXCEPTION_DISPOSITION;
-/*
- * This is not entirely necessary, but it is the structure installed by
- * the __try1 primitive below.
- */
-typedef struct _EXCEPTION_REGISTRATION
-{
- struct _EXCEPTION_REGISTRATION* prev;
- PEXCEPTION_HANDLER handler;
-} EXCEPTION_REGISTRATION, *PEXCEPTION_REGISTRATION;
+#if (defined(_X86_) && !defined(__x86_64))
+ struct _EXCEPTION_RECORD;
+ struct _CONTEXT;
-/*
- * 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.
- */
+ 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
Modified: trunk/reactos/include/crt/fcntl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/fcntl.h?rev=38…
==============================================================================
--- trunk/reactos/include/crt/fcntl.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/fcntl.h [iso-8859-1] Sun Dec 21 16:43:46 2008
@@ -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
Modified: trunk/reactos/include/crt/float.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/float.h?rev=38…
==============================================================================
--- trunk/reactos/include/crt/float.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/float.h [iso-8859-1] Sun Dec 21 16:43:46 2008
@@ -99,12 +99,12 @@
/* 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 @@
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 @@
* 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
}
Modified: trunk/reactos/include/crt/math.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/math.h?rev=382…
==============================================================================
--- trunk/reactos/include/crt/math.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/math.h [iso-8859-1] Sun Dec 21 16:43:46 2008
@@ -76,6 +76,7 @@
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 @@
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 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);
Modified: trunk/reactos/include/crt/mbctype.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mbctype.h?rev=…
==============================================================================
--- trunk/reactos/include/crt/mbctype.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/mbctype.h [iso-8859-1] Sun Dec 21 16:43:46 2008
@@ -14,16 +14,29 @@
#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
Modified: trunk/reactos/include/crt/setjmp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/setjmp.h?rev=3…
==============================================================================
--- trunk/reactos/include/crt/setjmp.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/setjmp.h [iso-8859-1] Sun Dec 21 16:43:46 2008
@@ -130,28 +130,7 @@
#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
Modified: trunk/reactos/include/crt/share.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/share.h?rev=38…
==============================================================================
--- trunk/reactos/include/crt/share.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/share.h [iso-8859-1] Sun Dec 21 16:43:46 2008
@@ -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
Modified: trunk/reactos/include/crt/stddef.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/stddef.h?rev=3…
==============================================================================
--- trunk/reactos/include/crt/stddef.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/stddef.h [iso-8859-1] Sun Dec 21 16:43:46 2008
@@ -140,11 +140,11 @@
#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 @@
#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;
Modified: trunk/reactos/include/crt/stdio.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/stdio.h?rev=38…
==============================================================================
--- trunk/reactos/include/crt/stdio.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/stdio.h [iso-8859-1] Sun Dec 21 16:43:46 2008
@@ -294,7 +294,7 @@
_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 @@
_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);
Modified: trunk/reactos/include/crt/stdlib.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/stdlib.h?rev=3…
==============================================================================
--- trunk/reactos/include/crt/stdlib.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/stdlib.h [iso-8859-1] Sun Dec 21 16:43:46 2008
@@ -131,7 +131,7 @@
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 @@
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
-
-//#if (defined(_X86_) && !defined(__x86_64))
+ _CRTIMP extern char *_sys_errlist[];
+ _CRTIMP extern int _sys_nerr;
+
+#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 @@
_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 @@
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 @@
_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 @@
_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 @@
_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 @@
_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 @@
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;
-#endif
- //_CRTIMP unsigned int __cdecl _rotr(unsigned int, int) __MINGW_ATTRIB_CONST;
+ unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val,int _Shift);
+#endif
+ 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 @@
#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 @@
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 @@
__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
Modified: trunk/reactos/include/crt/string.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/string.h?rev=3…
==============================================================================
--- trunk/reactos/include/crt/string.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/string.h [iso-8859-1] Sun Dec 21 16:43:46 2008
@@ -143,11 +143,6 @@
_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);
Modified: trunk/reactos/include/crt/wchar.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/wchar.h?rev=38…
==============================================================================
--- trunk/reactos/include/crt/wchar.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/wchar.h [iso-8859-1] Sun Dec 21 16:43:46 2008
@@ -457,7 +457,7 @@
};
#endif
-/* #if _INTEGRAL_MAX_BITS >= 64 */
+#if _INTEGRAL_MAX_BITS >= 64
struct _stat32i64 {
_dev_t st_dev;
@@ -500,7 +500,7 @@
__time64_t st_mtime;
__time64_t st_ctime;
};
-/* #endif */
+#endif
#define __stat64 _stat64
@@ -778,11 +778,6 @@
_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);
Modified: trunk/reactos/include/reactos/wine/exception.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/excep…
==============================================================================
--- trunk/reactos/include/reactos/wine/exception.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/wine/exception.h [iso-8859-1] Sun Dec 21 16:43:46 2008
@@ -8,6 +8,9 @@
#ifdef __cplusplus
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 @@
#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
Modified: trunk/reactos/lib/sdk/crt/mbstring/ismblead.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/mbstring/ismbl…
==============================================================================
--- trunk/reactos/lib/sdk/crt/mbstring/ismblead.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/mbstring/ismblead.c [iso-8859-1] Sun Dec 21 16:43:46 2008
@@ -45,7 +45,7 @@
/*
* @implemented
*/
-const unsigned char *__p__mbctype(void)
+unsigned char *__p__mbctype(void)
{
return _mbctype;
}