Author: tkreuzer Date: Mon Mar 29 01:12:46 2010 New Revision: 46535
URL: http://svn.reactos.org/svn/reactos?rev=46535&view=rev Log: [CRT HEADERS] - add _mingw_mac.h from ming-w64 and include it into _mingw.h - Update _CRTIMP definition - Fix definition of _wctype - onexit is not _CRTIMP
Added: branches/ros-amd64-bringup/reactos/include/crt/_mingw_mac.h (with props) Modified: branches/ros-amd64-bringup/reactos/include/crt/_mingw.h branches/ros-amd64-bringup/reactos/include/crt/crtdefs.h branches/ros-amd64-bringup/reactos/include/crt/ctype.h branches/ros-amd64-bringup/reactos/include/crt/stdlib.h
Modified: branches/ros-amd64-bringup/reactos/include/crt/_mingw.h URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/includ... ============================================================================== --- branches/ros-amd64-bringup/reactos/include/crt/_mingw.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/crt/_mingw.h [iso-8859-1] Mon Mar 29 01:12:46 2010 @@ -184,7 +184,7 @@ #define USE_MINGW_SETJMP_TWO_ARGS #endif
-/* Diable deprecation for now! */ +/* Disable deprecation for now! */ #define _CRT_SECURE_NO_DEPRECATE #define _CRT_SECURE_NO_DEPRECATE_CORE #ifdef __WINESRC__ @@ -197,33 +197,7 @@ #define _CRT_UNUSED(x) (void)x #endif
-#if defined(__x86__) -#define __MINGW_USE_UNDERSCORE_PREFIX 1 -#else -#define __MINGW_USE_UNDERSCORE_PREFIX 0 -#endif - -#if __MINGW_USE_UNDERSCORE_PREFIX == 0 -#define __MINGW_IMP_SYMBOL(sym) __imp_##sym -#define __MINGW_USYMBOL(sym) sym -#else -#define __MINGW_IMP_SYMBOL(sym) _imp__##sym -#define __MINGW_USYMBOL(sym) _##sym -#endif - -#if defined(__x86__) -/* Hack, for bug in ld. Will be removed soon. */ -#define __ImageBase _image_base__ -/* This symbol is defined by the linker. */ -extern char __ImageBase; -#elif defined(__x86_64__) -/* Hack, for bug in ld. Will be removed soon. */ -#define __ImageBase __image_base__ -/* This symbol is defined by the linker. */ -extern char __ImageBase; -#else -#error FIXME: Unsupported __ImageBase implementation. -#endif +#include "_mingw_mac.h"
#endif /* !_INC_MINGW */
Added: branches/ros-amd64-bringup/reactos/include/crt/_mingw_mac.h URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/includ... ============================================================================== --- branches/ros-amd64-bringup/reactos/include/crt/_mingw_mac.h (added) +++ branches/ros-amd64-bringup/reactos/include/crt/_mingw_mac.h [iso-8859-1] Mon Mar 29 01:12:46 2010 @@ -1,0 +1,134 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#ifndef _INC_CRTDEFS_MACRO +#define _INC_CRTDEFS_MACRO + +#define __STRINGIFY(x) #x +#define __MINGW64_STRINGIFY(x) __STRINGIFY(x) + +#define __MINGW64_VERSION_MAJOR 1 +#define __MINGW64_VERSION_MINOR 1 +#define __MINGW64_VERSION_STR __MINGW64_STRINGIFY(__MINGW64_VERSION_MAJOR) "." __MINGW64_STRINGIFY(__MINGW64_VERSION_MINOR) +#define __MINGW64_VERSION_STATE "alpha" + +/* mingw.org's version macros: these make gcc to define + MINGW32_SUPPORTS_MT_EH and to use the _CRT_MT global + and the __mingwthr_key_dtor() function from the MinGW + CRT in its private gthr-win32.h header. */ +#define __MINGW32_MAJOR_VERSION 3 +#define __MINGW32_MINOR_VERSION 11 + +#ifdef _WIN64 +/* MS does not prefix symbols by underscores for 64-bit. */ +#ifndef __MINGW_USE_UNDERSCORE_PREFIX +/* As we have to support older gcc version, which are using underscores + as symbol prefix for x64, we have to check here for the user label + prefix defined by gcc. */ +#ifdef __USER_LABEL_PREFIX__ +#pragma push_macro ("_") +#undef _ +#define _ 1 +#if (__USER_LABEL_PREFIX__ + 0) != 0 +#define __MINGW_USE_UNDERSCORE_PREFIX 1 +#else +#define __MINGW_USE_UNDERSCORE_PREFIX 0 +#endif +#undef _ +#pragma pop_macro ("_") +#else +#define __MINGW_USE_UNDERSCORE_PREFIX 0 +#endif +#endif +#else +/* For 32-bits we have always to prefix by underscore. */ +#undef __MINGW_USE_UNDERSCORE_PREFIX +#define __MINGW_USE_UNDERSCORE_PREFIX 1 +#endif + +#if __MINGW_USE_UNDERSCORE_PREFIX == 0 +#define __MINGW_IMP_SYMBOL(sym) __imp_##sym +#define __MINGW_USYMBOL(sym) sym +#define __MINGW_LSYMBOL(sym) _##sym +#else +#define __MINGW_IMP_SYMBOL(sym) _imp__##sym +#define __MINGW_USYMBOL(sym) _##sym +#define __MINGW_LSYMBOL(sym) sym +#endif + +/* Use alias for msvcr80 export of get/set_output_format. */ +#ifndef __USE_MINGW_OUTPUT_FORMAT_EMU +#define __USE_MINGW_OUTPUT_FORMAT_EMU 1 +#endif + +/* Set VC specific compiler target macros. */ +#if defined(__x86_64) && defined(_X86_) +#undef _X86_ /* _X86_ is not for __x86_64 */ +#endif + +#if defined(_X86_) && !defined(_M_IX86) && !defined(_M_IA64) \ + && !defined(_M_AMD64) && !defined(__x86_64) +#if defined(__i486__) +#define _M_IX86 400 +#elif defined(__i586__) +#define _M_IX86 500 +#else +/* This gives wrong (600 instead of 300) value if -march=i386 is specified + but we cannot check for__i386__ as it is defined for all 32-bit CPUs. */ +#define _M_IX86 600 +#endif +#endif + +#if defined(__x86_64) && !defined(_M_IX86) && !defined(_M_IA64) \ + && !defined(_M_AMD64) +#define _M_AMD64 100 +#define _M_X64 100 +#endif + +#if defined(__ia64__) && !defined(_M_IX86) && !defined(_M_IA64) \ + && !defined(_M_AMD64) && !defined(_X86_) && !defined(__x86_64) +#define _M_IA64 100 +#endif + +#ifndef __PTRDIFF_TYPE__ +#ifdef _WIN64 +#define __PTRDIFF_TYPE__ long long int +#else +#define __PTRDIFF_TYPE__ long int +#endif +#endif + +#ifndef __SIZE_TYPE__ +#ifdef _WIN64 +#define __SIZE_TYPE__ long long unsigned int +#else +#define __SIZE_TYPE__ long unsigned int +#endif +#endif + +#ifndef __WCHAR_TYPE__ +#define __WCHAR_TYPE__ unsigned short +#endif +#ifndef __WINT_TYPE__ +#define __WINT_TYPE__ unsigned short +#endif + +#if defined(__GNUC__) || defined(__GNUG__) +#define __MINGW_EXTENSION __extension__ +#else +#define __MINGW_EXTENSION +#endif + +#ifdef UNICODE +# define __MINGW_NAME_AW(func) func##W +#else +# define __MINGW_NAME_AW(func) func##A +#endif +#define __MINGW_TYPEDEF_AW(type) \ + typedef __MINGW_NAME_AW(type) type; + +#endif /* _INC_CRTDEFS_MACRO */ +
Propchange: branches/ros-amd64-bringup/reactos/include/crt/_mingw_mac.h ------------------------------------------------------------------------------ svn:eol-style = native
Modified: branches/ros-amd64-bringup/reactos/include/crt/crtdefs.h URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/includ... ============================================================================== --- branches/ros-amd64-bringup/reactos/include/crt/crtdefs.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/crt/crtdefs.h [iso-8859-1] Mon Mar 29 01:12:46 2010 @@ -25,6 +25,7 @@ //#define NO_OLDNAMES //#endif
+ /** Properties ***************************************************************/
#undef _CRT_PACKING @@ -50,12 +51,14 @@ #endif
#ifndef _CRTIMP - #ifdef _DLL + #ifdef CRTDLL /* Defined for ntdll, crtdll, msvcrt, etc */ + #define _CRTIMP __declspec(dllexport) + #elif defined(_DLL) #define _CRTIMP __declspec(dllimport) - #else - #define _CRTIMP - #endif -#endif + #else /* !CRTDLL && !_DLL */ + #define _CRTIMP + #endif /* CRTDLL || _DLL */ +#endif /* !_CRTIMP */
//#define _CRT_ALTERNATIVE_INLINES
@@ -218,6 +221,7 @@ #define _CRT_OBSOLETE(_NewItem) #endif
+ /** Constants ****************************************************************/
#define _ARGMAX 100 @@ -229,7 +233,6 @@ #define __STDC_SECURE_LIB__ 200411L #define __GOT_SECURE_LIB__ __STDC_SECURE_LIB__ #define _SECURECRT_FILL_BUFFER_PATTERN 0xFD -
/** Type definitions *********************************************************/
Modified: branches/ros-amd64-bringup/reactos/include/crt/ctype.h URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/includ... ============================================================================== --- branches/ros-amd64-bringup/reactos/include/crt/ctype.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/crt/ctype.h [iso-8859-1] Mon Mar 29 01:12:46 2010 @@ -38,7 +38,7 @@ #ifndef _CRT_WCTYPEDATA_DEFINED #define _CRT_WCTYPEDATA_DEFINED # ifndef _CTYPE_DISABLE_MACROS - _CRTDATA(extern unsigned short *_wctype); + _CRTDATA(extern const unsigned short _wctype[]); _CRTIMP const wctype_t * __cdecl __pwctype_func(void); # ifndef _M_CEE_PURE _CRTDATA(extern const wctype_t *_pwctype);
Modified: branches/ros-amd64-bringup/reactos/include/crt/stdlib.h URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/includ... ============================================================================== --- branches/ros-amd64-bringup/reactos/include/crt/stdlib.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/crt/stdlib.h [iso-8859-1] Mon Mar 29 01:12:46 2010 @@ -535,7 +535,7 @@ _CRTIMP int __cdecl putenv(const char *_EnvString); _CRTIMP void __cdecl swab(char *_Buf1,char *_Buf2,int _SizeInBytes); _CRTIMP char *__cdecl ultoa(unsigned long _Val,char *_Dstbuf,int _Radix); - _CRTIMP onexit_t __cdecl onexit(onexit_t _Func); + onexit_t __cdecl onexit(onexit_t _Func); #endif #endif