From cb52e39d9f87d49fa79f63bff9c87ada63643cd8 Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Wed, 21 Nov 2007 23:50:03 +0000 Subject: [PATCH] Update mingw headers to version 3.13 Patch by encoded I made the following modifications to the patch: - excpt.h - Removed the inclusion of , it caused compilation problems and I don't see a need for it, also CRT headers shouldn't include PSDK headers at all - tchar.h - Removed the file as it would most-probably interfere with our PSDK tchar.h and this shouldn't be a CRT header - values.h - Removed the file, it has no real content - varargs.h - Removed the file, it just contains a #include_next line to include the next available varargs.h, also #include_next directives aren't supported by MSVC See issue #2736 for more details. svn path=/trunk/; revision=30656 --- reactos/include/crt/_mingw.h | 9 +- reactos/include/crt/assert.h | 2 +- reactos/include/crt/complex.h | 205 ++++++++++++++++++++++ reactos/include/crt/conio.h | 28 +-- reactos/include/crt/ctype.h | 177 +++++++++---------- reactos/include/crt/direct.h | 20 +-- reactos/include/crt/dirent.h | 123 ++++++++++++++ reactos/include/crt/dos.h | 2 +- reactos/include/crt/errno.h | 2 +- reactos/include/crt/excpt.h | 13 +- reactos/include/crt/fcntl.h | 6 + reactos/include/crt/fenv.h | 107 ++++++++++++ reactos/include/crt/float.h | 31 ++-- reactos/include/crt/inttypes.h | 12 +- reactos/include/crt/io.h | 183 ++++++++++---------- reactos/include/crt/libgen.h | 31 ++++ reactos/include/crt/locale.h | 7 +- reactos/include/crt/malloc.h | 42 ++--- reactos/include/crt/mbctype.h | 31 ++-- reactos/include/crt/mbstring.h | 143 ++++++++-------- reactos/include/crt/mem.h | 6 + reactos/include/crt/process.h | 84 ++++----- reactos/include/crt/search.h | 42 +++++ reactos/include/crt/setjmp.h | 5 +- reactos/include/crt/signal.h | 5 +- reactos/include/crt/stdint.h | 46 +++-- reactos/include/crt/stdio.h | 281 +++++++++++++++---------------- reactos/include/crt/stdlib.h | 259 ++++++++++++++-------------- reactos/include/crt/string.h | 188 +++++++++++---------- reactos/include/crt/sys/file.h | 7 + reactos/include/crt/sys/param.h | 22 +++ reactos/include/crt/sys/stat.h | 26 +-- reactos/include/crt/sys/time.h | 2 +- reactos/include/crt/sys/timeb.h | 6 +- reactos/include/crt/sys/unistd.h | 6 + reactos/include/crt/sys/utime.h | 14 +- reactos/include/crt/time.h | 55 +++--- reactos/include/crt/utime.h | 1 + reactos/include/crt/wchar.h | 271 +++++++++++++++-------------- reactos/include/crt/wctype.h | 81 ++++----- 40 files changed, 1608 insertions(+), 973 deletions(-) create mode 100644 reactos/include/crt/complex.h create mode 100644 reactos/include/crt/dirent.h create mode 100644 reactos/include/crt/fenv.h create mode 100644 reactos/include/crt/libgen.h create mode 100644 reactos/include/crt/mem.h create mode 100644 reactos/include/crt/sys/file.h create mode 100644 reactos/include/crt/sys/param.h create mode 100644 reactos/include/crt/sys/unistd.h create mode 100644 reactos/include/crt/utime.h diff --git a/reactos/include/crt/_mingw.h b/reactos/include/crt/_mingw.h index c0a05eb3789..9323d4722ec 100644 --- a/reactos/include/crt/_mingw.h +++ b/reactos/include/crt/_mingw.h @@ -23,6 +23,9 @@ #ifndef __MINGW_H #define __MINGW_H +#if __GNUC__ >= 3 +#pragma GCC system_header +#endif /* These are defined by the user (or the compiler) to specify how identifiers are imported from a DLL. @@ -163,7 +166,7 @@ #else #define __MINGW_ATTRIB_DEPRECATED #endif /* GNUC >= 3.1 */ - + #if __MINGW_GNUC_PREREQ (3, 3) #define __MINGW_NOTHROW __attribute__ ((__nothrow__)) #else @@ -175,8 +178,8 @@ # define __MSVCRT_VERSION__ 0x0600 #endif -#define __MINGW32_VERSION 3.12 +#define __MINGW32_VERSION 3.13 #define __MINGW32_MAJOR_VERSION 3 -#define __MINGW32_MINOR_VERSION 12 +#define __MINGW32_MINOR_VERSION 13 #endif /* __MINGW_H */ diff --git a/reactos/include/crt/assert.h b/reactos/include/crt/assert.h index 625908a179e..1ff6690af2d 100644 --- a/reactos/include/crt/assert.h +++ b/reactos/include/crt/assert.h @@ -35,7 +35,7 @@ extern "C" { * CRTDLL nicely supplies a function which does the actual output and * call to abort. */ -_CRTIMP void __cdecl _assert (const char*, const char*, int) __MINGW_ATTRIB_NORETURN; +_CRTIMP void __cdecl __MINGW_NOTHROW _assert (const char*, const char*, int) __MINGW_ATTRIB_NORETURN; /* * Definition of the assert macro. diff --git a/reactos/include/crt/complex.h b/reactos/include/crt/complex.h new file mode 100644 index 00000000000..2fd73a12e2c --- /dev/null +++ b/reactos/include/crt/complex.h @@ -0,0 +1,205 @@ +/* + * complex.h + * + * This file is part of the Mingw32 package. + * + * Contributors: + * Created by Danny Smith + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAIMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ + +#ifndef _COMPLEX_H_ +#define _COMPLEX_H_ + +/* All the headers include this file. */ +#include <_mingw.h> + +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ + || !defined __STRICT_ANSI__ + +/* These macros are specified by C99 standard */ + +#ifndef __cplusplus +#define complex _Complex +#endif + +#define _Complex_I (0.0F + 1.0iF) + +/* GCC doesn't support _Imaginary type yet, so we don't + define _Imaginary_I */ + +#define I _Complex_I + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef RC_INVOKED + +double __MINGW_ATTRIB_CONST creal (double _Complex); +double __MINGW_ATTRIB_CONST cimag (double _Complex); +double __MINGW_ATTRIB_CONST carg (double _Complex); +double __MINGW_ATTRIB_CONST cabs (double _Complex); +double _Complex __MINGW_ATTRIB_CONST conj (double _Complex); +double _Complex cacos (double _Complex); +double _Complex casin (double _Complex); +double _Complex catan (double _Complex); +double _Complex ccos (double _Complex); +double _Complex csin (double _Complex); +double _Complex ctan (double _Complex); +double _Complex cacosh (double _Complex); +double _Complex casinh (double _Complex); +double _Complex catanh (double _Complex); +double _Complex ccosh (double _Complex); +double _Complex csinh (double _Complex); +double _Complex ctanh (double _Complex); +double _Complex cexp (double _Complex); +double _Complex clog (double _Complex); +double _Complex cpow (double _Complex, double _Complex); +double _Complex csqrt (double _Complex); +double _Complex __MINGW_ATTRIB_CONST cproj (double _Complex); + +float __MINGW_ATTRIB_CONST crealf (float _Complex); +float __MINGW_ATTRIB_CONST cimagf (float _Complex); +float __MINGW_ATTRIB_CONST cargf (float _Complex); +float __MINGW_ATTRIB_CONST cabsf (float _Complex); +float _Complex __MINGW_ATTRIB_CONST conjf (float _Complex); +float _Complex cacosf (float _Complex); +float _Complex casinf (float _Complex); +float _Complex catanf (float _Complex); +float _Complex ccosf (float _Complex); +float _Complex csinf (float _Complex); +float _Complex ctanf (float _Complex); +float _Complex cacoshf (float _Complex); +float _Complex casinhf (float _Complex); +float _Complex catanhf (float _Complex); +float _Complex ccoshf (float _Complex); +float _Complex csinhf (float _Complex); +float _Complex ctanhf (float _Complex); +float _Complex cexpf (float _Complex); +float _Complex clogf (float _Complex); +float _Complex cpowf (float _Complex, float _Complex); +float _Complex csqrtf (float _Complex); +float _Complex __MINGW_ATTRIB_CONST cprojf (float _Complex); + +long double __MINGW_ATTRIB_CONST creall (long double _Complex); +long double __MINGW_ATTRIB_CONST cimagl (long double _Complex); +long double __MINGW_ATTRIB_CONST cargl (long double _Complex); +long double __MINGW_ATTRIB_CONST cabsl (long double _Complex); +long double _Complex __MINGW_ATTRIB_CONST conjl (long double _Complex); +long double _Complex cacosl (long double _Complex); +long double _Complex casinl (long double _Complex); +long double _Complex catanl (long double _Complex); +long double _Complex ccosl (long double _Complex); +long double _Complex csinl (long double _Complex); +long double _Complex ctanl (long double _Complex); +long double _Complex cacoshl (long double _Complex); +long double _Complex casinhl (long double _Complex); +long double _Complex catanhl (long double _Complex); +long double _Complex ccoshl (long double _Complex); +long double _Complex csinhl (long double _Complex); +long double _Complex ctanhl (long double _Complex); +long double _Complex cexpl (long double _Complex); +long double _Complex clogl (long double _Complex); +long double _Complex cpowl (long double _Complex, long double _Complex); +long double _Complex csqrtl (long double _Complex); +long double _Complex __MINGW_ATTRIB_CONST cprojl (long double _Complex); + +#ifdef __GNUC__ + +/* double */ +__CRT_INLINE double __MINGW_ATTRIB_CONST creal (double _Complex _Z) +{ + return __real__ _Z; +} + +__CRT_INLINE double __MINGW_ATTRIB_CONST cimag (double _Complex _Z) +{ + return __imag__ _Z; +} + +__CRT_INLINE double _Complex __MINGW_ATTRIB_CONST conj (double _Complex _Z) +{ + return __extension__ ~_Z; +} + +__CRT_INLINE double __MINGW_ATTRIB_CONST carg (double _Complex _Z) +{ + double res; + __asm__ ("fpatan;" + : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)"); + return res; +} + + +/* float */ +__CRT_INLINE float __MINGW_ATTRIB_CONST crealf (float _Complex _Z) +{ + return __real__ _Z; +} + +__CRT_INLINE float __MINGW_ATTRIB_CONST cimagf (float _Complex _Z) +{ + return __imag__ _Z; +} + +__CRT_INLINE float _Complex __MINGW_ATTRIB_CONST conjf (float _Complex _Z) +{ + return __extension__ ~_Z; +} + +__CRT_INLINE float __MINGW_ATTRIB_CONST cargf (float _Complex _Z) +{ + float res; + __asm__ ("fpatan;" + : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)"); + return res; +} + +/* long double */ +__CRT_INLINE long double __MINGW_ATTRIB_CONST creall (long double _Complex _Z) +{ + return __real__ _Z; +} + +__CRT_INLINE long double __MINGW_ATTRIB_CONST cimagl (long double _Complex _Z) +{ + return __imag__ _Z; +} + +__CRT_INLINE long double _Complex __MINGW_ATTRIB_CONST conjl (long double _Complex _Z) +{ + return __extension__ ~_Z; +} + +__CRT_INLINE long double __MINGW_ATTRIB_CONST cargl (long double _Complex _Z) +{ + long double res; + __asm__ ("fpatan;" + : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)"); + return res; +} + +#endif /* __GNUC__ */ + + +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STDC_VERSION__ >= 199901L */ + + +#endif /* _COMPLEX_H */ diff --git a/reactos/include/crt/conio.h b/reactos/include/crt/conio.h index a60ed85b201..8a821cbdba8 100644 --- a/reactos/include/crt/conio.h +++ b/reactos/include/crt/conio.h @@ -21,25 +21,25 @@ extern "C" { #endif -_CRTIMP char* __cdecl _cgets (char*); -_CRTIMP int __cdecl _cprintf (const char*, ...); -_CRTIMP int __cdecl _cputs (const char*); -_CRTIMP int __cdecl _cscanf (char*, ...); +_CRTIMP char* __cdecl __MINGW_NOTHROW _cgets (char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _cprintf (const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW _cputs (const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _cscanf (char*, ...); -_CRTIMP int __cdecl _getch (void); -_CRTIMP int __cdecl _getche (void); -_CRTIMP int __cdecl _kbhit (void); -_CRTIMP int __cdecl _putch (int); -_CRTIMP int __cdecl _ungetch (int); +_CRTIMP int __cdecl __MINGW_NOTHROW _getch (void); +_CRTIMP int __cdecl __MINGW_NOTHROW _getche (void); +_CRTIMP int __cdecl __MINGW_NOTHROW _kbhit (void); +_CRTIMP int __cdecl __MINGW_NOTHROW _putch (int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ungetch (int); #ifndef _NO_OLDNAMES -_CRTIMP int __cdecl getch (void); -_CRTIMP int __cdecl getche (void); -_CRTIMP int __cdecl kbhit (void); -_CRTIMP int __cdecl putch (int); -_CRTIMP int __cdecl ungetch (int); +_CRTIMP int __cdecl __MINGW_NOTHROW getch (void); +_CRTIMP int __cdecl __MINGW_NOTHROW getche (void); +_CRTIMP int __cdecl __MINGW_NOTHROW kbhit (void); +_CRTIMP int __cdecl __MINGW_NOTHROW putch (int); +_CRTIMP int __cdecl __MINGW_NOTHROW ungetch (int); #endif /* Not _NO_OLDNAMES */ diff --git a/reactos/include/crt/ctype.h b/reactos/include/crt/ctype.h index 92f2a89ac3b..a997504c288 100644 --- a/reactos/include/crt/ctype.h +++ b/reactos/include/crt/ctype.h @@ -1,4 +1,4 @@ -/* +/* * ctype.h * This file has no copyright assigned and is placed in the Public Domain. * This file is a part of the mingw-runtime package. @@ -33,7 +33,7 @@ #define _CONTROL 0x0020 /* _BLANK is set for SP and non-ASCII horizontal space chars (eg, "no-break space", 0xA0, in CP1250) but not for HT. */ -#define _BLANK 0x0040 +#define _BLANK 0x0040 #define _HEX 0x0080 #define _LEADBYTE 0x8000 @@ -45,30 +45,30 @@ extern "C" { #endif -_CRTIMP int __cdecl isalnum(int); -_CRTIMP int __cdecl isalpha(int); -_CRTIMP int __cdecl iscntrl(int); -_CRTIMP int __cdecl isdigit(int); -_CRTIMP int __cdecl isgraph(int); -_CRTIMP int __cdecl islower(int); -_CRTIMP int __cdecl isprint(int); -_CRTIMP int __cdecl ispunct(int); -_CRTIMP int __cdecl isspace(int); -_CRTIMP int __cdecl isupper(int); -_CRTIMP int __cdecl isxdigit(int); +_CRTIMP int __cdecl __MINGW_NOTHROW isalnum(int); +_CRTIMP int __cdecl __MINGW_NOTHROW isalpha(int); +_CRTIMP int __cdecl __MINGW_NOTHROW iscntrl(int); +_CRTIMP int __cdecl __MINGW_NOTHROW isdigit(int); +_CRTIMP int __cdecl __MINGW_NOTHROW isgraph(int); +_CRTIMP int __cdecl __MINGW_NOTHROW islower(int); +_CRTIMP int __cdecl __MINGW_NOTHROW isprint(int); +_CRTIMP int __cdecl __MINGW_NOTHROW ispunct(int); +_CRTIMP int __cdecl __MINGW_NOTHROW isspace(int); +_CRTIMP int __cdecl __MINGW_NOTHROW isupper(int); +_CRTIMP int __cdecl __MINGW_NOTHROW isxdigit(int); #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ || !defined __STRICT_ANSI__ -int __cdecl isblank (int); +int __cdecl __MINGW_NOTHROW isblank (int); #endif #ifndef __STRICT_ANSI__ -_CRTIMP int __cdecl _isctype (int, int); +_CRTIMP int __cdecl __MINGW_NOTHROW _isctype (int, int); #endif /* These are the ANSI versions, with correct checking of argument */ -_CRTIMP int __cdecl tolower(int); -_CRTIMP int __cdecl toupper(int); +_CRTIMP int __cdecl __MINGW_NOTHROW tolower(int); +_CRTIMP int __cdecl __MINGW_NOTHROW toupper(int); /* * NOTE: The above are not old name type wrappers, but functions exported @@ -79,9 +79,9 @@ _CRTIMP int __cdecl toupper(int); /* * These are the cheap non-std versions: The return values are undefined * if the argument is not ASCII char or is not of appropriate case - */ -_CRTIMP int __cdecl _tolower(int); -_CRTIMP int __cdecl _toupper(int); + */ +_CRTIMP int __cdecl __MINGW_NOTHROW _tolower(int); +_CRTIMP int __cdecl __MINGW_NOTHROW _toupper(int); #endif /* Also defined in stdlib.h */ @@ -108,17 +108,21 @@ _CRTIMP int __cdecl _toupper(int); #ifdef __DECLSPEC_SUPPORTED -__MINGW_IMPORT unsigned short _ctype[]; +# if __MSVCRT_VERSION__ <= 0x0700 + __MINGW_IMPORT unsigned short _ctype[]; +# endif # ifdef __MSVCRT__ __MINGW_IMPORT unsigned short* _pctype; # else /* CRTDLL */ __MINGW_IMPORT unsigned short* _pctype_dll; # define _pctype _pctype_dll -# endif +# endif #else /* __DECLSPEC_SUPPORTED */ -extern unsigned short** _imp___ctype; -#define _ctype (*_imp___ctype) +# if __MSVCRT_VERSION__ <= 0x0700 + extern unsigned short** _imp___ctype; +# define _ctype (*_imp___ctype) +# endif # ifdef __MSVCRT__ extern unsigned short** _imp___pctype; # define _pctype (*_imp___pctype) @@ -129,7 +133,7 @@ extern unsigned short** _imp___ctype; #endif /* __DECLSPEC_SUPPORTED */ /* - * Use inlines here rather than macros, because macros will upset + * Use inlines here rather than macros, because macros will upset * C++ usage (eg, ::isalnum), and so usually get undefined * * According to standard for SB chars, these function are defined only @@ -139,35 +143,35 @@ extern unsigned short** _imp___ctype; * * If no MB char support is needed, these can be simplified even * more by command line define -DMB_CUR_MAX=1. The compiler will then - * optimise away the constant condition. + * optimise away the constant condition. */ -#if ! (defined (__NO_INLINE__) || defined (__NO_CTYPE_INLINES) \ +#if !(defined (__NO_INLINE__) || defined (__NO_CTYPE_INLINES) \ || defined (__STRICT_ANSI__)) /* use simple lookup if SB locale, else _isctype() */ #define __ISCTYPE(c, mask) (MB_CUR_MAX == 1 ? (_pctype[c] & mask) : _isctype(c, mask)) -__CRT_INLINE int __cdecl isalnum(int c) {return __ISCTYPE(c, (_ALPHA|_DIGIT));} -__CRT_INLINE int __cdecl isalpha(int c) {return __ISCTYPE(c, _ALPHA);} -__CRT_INLINE int __cdecl iscntrl(int c) {return __ISCTYPE(c, _CONTROL);} -__CRT_INLINE int __cdecl isdigit(int c) {return __ISCTYPE(c, _DIGIT);} -__CRT_INLINE int __cdecl isgraph(int c) {return __ISCTYPE(c, (_PUNCT|_ALPHA|_DIGIT));} -__CRT_INLINE int __cdecl islower(int c) {return __ISCTYPE(c, _LOWER);} -__CRT_INLINE int __cdecl isprint(int c) {return __ISCTYPE(c, (_BLANK|_PUNCT|_ALPHA|_DIGIT));} -__CRT_INLINE int __cdecl ispunct(int c) {return __ISCTYPE(c, _PUNCT);} -__CRT_INLINE int __cdecl isspace(int c) {return __ISCTYPE(c, _SPACE);} -__CRT_INLINE int __cdecl isupper(int c) {return __ISCTYPE(c, _UPPER);} -__CRT_INLINE int __cdecl isxdigit(int c) {return __ISCTYPE(c, _HEX);} +__CRT_INLINE int __cdecl __MINGW_NOTHROW isalnum(int c) {return __ISCTYPE(c, (_ALPHA|_DIGIT));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW isalpha(int c) {return __ISCTYPE(c, _ALPHA);} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iscntrl(int c) {return __ISCTYPE(c, _CONTROL);} +__CRT_INLINE int __cdecl __MINGW_NOTHROW isdigit(int c) {return __ISCTYPE(c, _DIGIT);} +__CRT_INLINE int __cdecl __MINGW_NOTHROW isgraph(int c) {return __ISCTYPE(c, (_PUNCT|_ALPHA|_DIGIT));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW islower(int c) {return __ISCTYPE(c, _LOWER);} +__CRT_INLINE int __cdecl __MINGW_NOTHROW isprint(int c) {return __ISCTYPE(c, (_BLANK|_PUNCT|_ALPHA|_DIGIT));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW ispunct(int c) {return __ISCTYPE(c, _PUNCT);} +__CRT_INLINE int __cdecl __MINGW_NOTHROW isspace(int c) {return __ISCTYPE(c, _SPACE);} +__CRT_INLINE int __cdecl __MINGW_NOTHROW isupper(int c) {return __ISCTYPE(c, _UPPER);} +__CRT_INLINE int __cdecl __MINGW_NOTHROW isxdigit(int c) {return __ISCTYPE(c, _HEX);} #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ || !defined __STRICT_ANSI__ -__CRT_INLINE int __cdecl isblank (int c) +__CRT_INLINE int __cdecl __MINGW_NOTHROW isblank (int c) {return (__ISCTYPE(c, _BLANK) || c == '\t');} #endif /* these reproduce behaviour of lib underscored versions */ -__CRT_INLINE int __cdecl _tolower(int c) {return ( c -'A'+'a');} -__CRT_INLINE int __cdecl _toupper(int c) {return ( c -'a'+'A');} +__CRT_INLINE int __cdecl __MINGW_NOTHROW _tolower(int c) {return ( c -'A'+'a');} +__CRT_INLINE int __cdecl __MINGW_NOTHROW _toupper(int c) {return ( c -'a'+'A');} /* TODO? Is it worth inlining ANSI tolower, toupper? Probably only if we only want C-locale. */ @@ -185,78 +189,78 @@ typedef wchar_t wctype_t; #define _WCTYPE_T_DEFINED #endif -_CRTIMP int __cdecl iswalnum(wint_t); -_CRTIMP int __cdecl iswalpha(wint_t); -_CRTIMP int __cdecl iswascii(wint_t); -_CRTIMP int __cdecl iswcntrl(wint_t); -_CRTIMP int __cdecl iswctype(wint_t, wctype_t); -_CRTIMP int __cdecl is_wctype(wint_t, wctype_t); /* Obsolete! */ -_CRTIMP int __cdecl iswdigit(wint_t); -_CRTIMP int __cdecl iswgraph(wint_t); -_CRTIMP int __cdecl iswlower(wint_t); -_CRTIMP int __cdecl iswprint(wint_t); -_CRTIMP int __cdecl iswpunct(wint_t); -_CRTIMP int __cdecl iswspace(wint_t); -_CRTIMP int __cdecl iswupper(wint_t); -_CRTIMP int __cdecl iswxdigit(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswalnum(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswalpha(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswascii(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswcntrl(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswctype(wint_t, wctype_t); +_CRTIMP int __cdecl __MINGW_NOTHROW is_wctype(wint_t, wctype_t); /* Obsolete! */ +_CRTIMP int __cdecl __MINGW_NOTHROW iswdigit(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswgraph(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswlower(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswprint(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswpunct(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswspace(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswupper(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswxdigit(wint_t); #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ || !defined __STRICT_ANSI__ || defined __cplusplus -int __cdecl iswblank (wint_t); +int __cdecl __MINGW_NOTHROW iswblank (wint_t); #endif /* Older MS docs uses wchar_t for arg and return type, while newer online MS docs say arg is wint_t and return is int. ISO C uses wint_t for both. */ -_CRTIMP wint_t __cdecl towlower (wint_t); -_CRTIMP wint_t __cdecl towupper (wint_t); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW towlower (wint_t); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW towupper (wint_t); -_CRTIMP int __cdecl isleadbyte (int); +_CRTIMP int __cdecl __MINGW_NOTHROW isleadbyte (int); /* Also in wctype.h */ #if ! (defined (__NO_INLINE__) || defined(__NO_CTYPE_INLINES) \ || defined(__WCTYPE_INLINES_DEFINED)) #define __WCTYPE_INLINES_DEFINED -__CRT_INLINE int __cdecl iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));} -__CRT_INLINE int __cdecl iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));} -__CRT_INLINE int __cdecl iswascii(wint_t wc) {return ((wc & ~0x7F) ==0);} -__CRT_INLINE int __cdecl iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));} -__CRT_INLINE int __cdecl iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));} -__CRT_INLINE int __cdecl iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));} -__CRT_INLINE int __cdecl iswlower(wint_t wc) {return (iswctype(wc,_LOWER));} -__CRT_INLINE int __cdecl iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));} -__CRT_INLINE int __cdecl iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));} -__CRT_INLINE int __cdecl iswspace(wint_t wc) {return (iswctype(wc,_SPACE));} -__CRT_INLINE int __cdecl iswupper(wint_t wc) {return (iswctype(wc,_UPPER));} -__CRT_INLINE int __cdecl iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));} -__CRT_INLINE int __cdecl isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswascii(wint_t wc) {return ((wc & ~0x7F) ==0);} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswlower(wint_t wc) {return (iswctype(wc,_LOWER));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswspace(wint_t wc) {return (iswctype(wc,_SPACE));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswupper(wint_t wc) {return (iswctype(wc,_UPPER));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);} #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ || !defined __STRICT_ANSI__ || defined __cplusplus -__CRT_INLINE int __cdecl iswblank (wint_t wc) +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswblank (wint_t wc) {return (iswctype(wc,_BLANK) || wc == L'\t');} #endif #endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */ #ifndef __STRICT_ANSI__ -int __cdecl __isascii (int); -int __cdecl __toascii (int); -int __cdecl __iscsymf (int); /* Valid first character in C symbol */ -int __cdecl __iscsym (int); /* Valid character in C symbol (after first) */ +int __cdecl __MINGW_NOTHROW __isascii (int); +int __cdecl __MINGW_NOTHROW __toascii (int); +int __cdecl __MINGW_NOTHROW __iscsymf (int); /* Valid first character in C symbol */ +int __cdecl __MINGW_NOTHROW __iscsym (int); /* Valid character in C symbol (after first) */ #if !(defined (__NO_INLINE__) || defined (__NO_CTYPE_INLINES)) -__CRT_INLINE int __cdecl __isascii(int c) {return ((c & ~0x7F) == 0);} -__CRT_INLINE int __cdecl __toascii(int c) {return (c & 0x7F);} -__CRT_INLINE int __cdecl __iscsymf(int c) {return (isalpha(c) || (c == '_'));} -__CRT_INLINE int __cdecl __iscsym(int c) {return (isalnum(c) || (c == '_'));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW __isascii(int c) {return ((c & ~0x7F) == 0);} +__CRT_INLINE int __cdecl __MINGW_NOTHROW __toascii(int c) {return (c & 0x7F);} +__CRT_INLINE int __cdecl __MINGW_NOTHROW __iscsymf(int c) {return (isalpha(c) || (c == '_'));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW __iscsym(int c) {return (isalnum(c) || (c == '_'));} #endif /* __NO_CTYPE_INLINES */ #ifndef _NO_OLDNAMES -/* Not _CRTIMP */ -int __cdecl isascii (int); -int __cdecl toascii (int); -int __cdecl iscsymf (int); -int __cdecl iscsym (int); +/* Not _CRTIMP */ +int __cdecl __MINGW_NOTHROW isascii (int); +int __cdecl __MINGW_NOTHROW toascii (int); +int __cdecl __MINGW_NOTHROW iscsymf (int); +int __cdecl __MINGW_NOTHROW iscsym (int); #endif /* Not _NO_OLDNAMES */ #endif /* Not __STRICT_ANSI__ */ @@ -269,3 +273,4 @@ int __cdecl iscsym (int); #endif /* Not _CTYPE_H_ */ + diff --git a/reactos/include/crt/direct.h b/reactos/include/crt/direct.h index 90338edfa3d..86cd042bab3 100644 --- a/reactos/include/crt/direct.h +++ b/reactos/include/crt/direct.h @@ -42,11 +42,11 @@ struct _diskfree_t { * You really shouldn't be using these. Use the Win32 API functions instead. * However, it does make it easier to port older code. */ -_CRTIMP int __cdecl _getdrive (void); -_CRTIMP unsigned long __cdecl _getdrives(void); -_CRTIMP int __cdecl _chdrive (int); -_CRTIMP char* __cdecl _getdcwd (int, char*, int); -_CRTIMP unsigned __cdecl _getdiskfree (unsigned, struct _diskfree_t *); +_CRTIMP int __cdecl __MINGW_NOTHROW _getdrive (void); +_CRTIMP unsigned long __cdecl __MINGW_NOTHROW _getdrives(void); +_CRTIMP int __cdecl __MINGW_NOTHROW _chdrive (int); +_CRTIMP char* __cdecl __MINGW_NOTHROW _getdcwd (int, char*, int); +_CRTIMP unsigned __cdecl __MINGW_NOTHROW _getdiskfree (unsigned, struct _diskfree_t *); #ifndef _NO_OLDNAMES # define diskfree_t _diskfree_t @@ -55,11 +55,11 @@ _CRTIMP unsigned __cdecl _getdiskfree (unsigned, struct _diskfree_t *); #ifndef _WDIRECT_DEFINED /* wide character versions. Also in wchar.h */ #ifdef __MSVCRT__ -_CRTIMP int __cdecl _wchdir(const wchar_t*); -_CRTIMP wchar_t* __cdecl _wgetcwd(wchar_t*, int); -_CRTIMP wchar_t* __cdecl _wgetdcwd(int, wchar_t*, int); -_CRTIMP int __cdecl _wmkdir(const wchar_t*); -_CRTIMP int __cdecl _wrmdir(const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wchdir(const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetcwd(wchar_t*, int); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetdcwd(int, wchar_t*, int); +_CRTIMP int __cdecl __MINGW_NOTHROW _wmkdir(const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wrmdir(const wchar_t*); #endif /* __MSVCRT__ */ #define _WDIRECT_DEFINED #endif diff --git a/reactos/include/crt/dirent.h b/reactos/include/crt/dirent.h new file mode 100644 index 00000000000..e2a6689241d --- /dev/null +++ b/reactos/include/crt/dirent.h @@ -0,0 +1,123 @@ +/* + * DIRENT.H (formerly DIRLIB.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. + * + */ +#ifndef _DIRENT_H_ +#define _DIRENT_H_ + +/* All the headers include this file. */ +#include <_mingw.h> + +#include + +#ifndef RC_INVOKED + +#ifdef __cplusplus +extern "C" { +#endif + +struct dirent +{ + long d_ino; /* Always zero. */ + unsigned short d_reclen; /* Always zero. */ + unsigned short d_namlen; /* Length of name in d_name. */ + char d_name[FILENAME_MAX]; /* File name. */ +}; + +/* + * This is an internal data structure. Good programmers will not use it + * except as an argument to one of the functions below. + * dd_stat field is now int (was short in older versions). + */ +typedef struct +{ + /* disk transfer area for this dir */ + struct _finddata_t dd_dta; + + /* dirent struct to return from dir (NOTE: this makes this thread + * safe as long as only one thread uses a particular DIR struct at + * a time) */ + struct dirent dd_dir; + + /* _findnext handle */ + long dd_handle; + + /* + * Status of search: + * 0 = not started yet (next entry to read is first entry) + * -1 = off the end + * positive = 0 based index of next entry + */ + int dd_stat; + + /* given path for dir with search pattern (struct is extended) */ + char dd_name[1]; +} DIR; + +DIR* __cdecl __MINGW_NOTHROW opendir (const char*); +struct dirent* __cdecl __MINGW_NOTHROW readdir (DIR*); +int __cdecl __MINGW_NOTHROW closedir (DIR*); +void __cdecl __MINGW_NOTHROW rewinddir (DIR*); +long __cdecl __MINGW_NOTHROW telldir (DIR*); +void __cdecl __MINGW_NOTHROW seekdir (DIR*, long); + + +/* wide char versions */ + +struct _wdirent +{ + long d_ino; /* Always zero. */ + unsigned short d_reclen; /* Always zero. */ + unsigned short d_namlen; /* Length of name in d_name. */ + wchar_t d_name[FILENAME_MAX]; /* File name. */ +}; + +/* + * This is an internal data structure. Good programmers will not use it + * except as an argument to one of the functions below. + */ +typedef struct +{ + /* disk transfer area for this dir */ + struct _wfinddata_t dd_dta; + + /* dirent struct to return from dir (NOTE: this makes this thread + * safe as long as only one thread uses a particular DIR struct at + * a time) */ + struct _wdirent dd_dir; + + /* _findnext handle */ + long dd_handle; + + /* + * Status of search: + * 0 = not started yet (next entry to read is first entry) + * -1 = off the end + * positive = 0 based index of next entry + */ + int dd_stat; + + /* given path for dir with search pattern (struct is extended) */ + wchar_t dd_name[1]; +} _WDIR; + + + +_WDIR* __cdecl __MINGW_NOTHROW _wopendir (const wchar_t*); +struct _wdirent* __cdecl __MINGW_NOTHROW _wreaddir (_WDIR*); +int __cdecl __MINGW_NOTHROW _wclosedir (_WDIR*); +void __cdecl __MINGW_NOTHROW _wrewinddir (_WDIR*); +long __cdecl __MINGW_NOTHROW _wtelldir (_WDIR*); +void __cdecl __MINGW_NOTHROW _wseekdir (_WDIR*, long); + + +#ifdef __cplusplus +} +#endif + +#endif /* Not RC_INVOKED */ + +#endif /* Not _DIRENT_H_ */ diff --git a/reactos/include/crt/dos.h b/reactos/include/crt/dos.h index 9d39dad6384..e6bf561ac5b 100644 --- a/reactos/include/crt/dos.h +++ b/reactos/include/crt/dos.h @@ -74,7 +74,7 @@ struct _diskfree_t { #define _DISKFREE_T_DEFINED #endif -_CRTIMP unsigned __cdecl _getdiskfree (unsigned, struct _diskfree_t *); +_CRTIMP unsigned __cdecl __MINGW_NOTHROW _getdiskfree (unsigned, struct _diskfree_t *); #ifndef _NO_OLDNAMES # define diskfree_t _diskfree_t diff --git a/reactos/include/crt/errno.h b/reactos/include/crt/errno.h index 56f0346c6e8..e3690a709a8 100644 --- a/reactos/include/crt/errno.h +++ b/reactos/include/crt/errno.h @@ -88,7 +88,7 @@ extern "C" { #undef errno extern int errno; #else -_CRTIMP int* __cdecl _errno(void); +_CRTIMP int* __cdecl __MINGW_NOTHROW _errno(void); #define errno (*_errno()) #endif diff --git a/reactos/include/crt/excpt.h b/reactos/include/crt/excpt.h index 421311ee319..6be9b852edc 100644 --- a/reactos/include/crt/excpt.h +++ b/reactos/include/crt/excpt.h @@ -54,13 +54,22 @@ extern "C" { /* * The type of function that is expected as an exception handler to be - * installed with _try1. + * 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 +{ + struct _EXCEPTION_REGISTRATION* prev; + PEXCEPTION_HANDLER handler; +} EXCEPTION_REGISTRATION, *PEXCEPTION_REGISTRATION; /* * A macro which installs the supplied exception handler. @@ -81,7 +90,7 @@ typedef EXCEPTION_DISPOSITION (*PEXCEPTION_HANDLER) * 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. + * after we did __try1 or this will smash things. */ #define __except1 \ __asm__ ("movl (%%esp),%%eax;movl %%eax,%%fs:0;addl $8,%%esp;" \ diff --git a/reactos/include/crt/fcntl.h b/reactos/include/crt/fcntl.h index e62d15950fc..9bff9352a0d 100644 --- a/reactos/include/crt/fcntl.h +++ b/reactos/include/crt/fcntl.h @@ -46,6 +46,12 @@ #define _O_BINARY 0x8000 /* Input and output is not translated. */ #define _O_RAW _O_BINARY +#if (__MSVCRT_VERSION__ >= 0x0800) +#define _O_WTEXT 0x10000 +#define _O_U16TEXT 0x20000 +#define _O_U8TEXT 0x40000 +#endif + #ifndef _NO_OLDNAMES /* POSIX/Non-ANSI names for increased portability */ diff --git a/reactos/include/crt/fenv.h b/reactos/include/crt/fenv.h new file mode 100644 index 00000000000..ddae8921e51 --- /dev/null +++ b/reactos/include/crt/fenv.h @@ -0,0 +1,107 @@ +#ifndef _FENV_H_ +#define _FENV_H_ + +#include <_mingw.h> + +/* FPU status word exception flags */ +#define FE_INVALID 0x01 +#define FE_DENORMAL 0x02 +#define FE_DIVBYZERO 0x04 +#define FE_OVERFLOW 0x08 +#define FE_UNDERFLOW 0x10 +#define FE_INEXACT 0x20 +#define FE_ALL_EXCEPT (FE_INVALID | FE_DENORMAL | FE_DIVBYZERO \ + | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) + +/* FPU control word rounding flags */ +#define FE_TONEAREST 0x0000 +#define FE_DOWNWARD 0x0400 +#define FE_UPWARD 0x0800 +#define FE_TOWARDZERO 0x0c00 + +/* The MXCSR exception flags are the same as the + FE flags. */ +#define __MXCSR_EXCEPT_FLAG_SHIFT 0 + +/* How much to shift FE status word exception flags + to get the MXCSR exeptions masks, */ +#define __MXCSR_EXCEPT_MASK_SHIFT 7 + +/* How much to shift FE control word rounding flags + to get MXCSR rounding flags, */ +#define __MXCSR_ROUND_FLAG_SHIFT 3 + +#ifndef RC_INVOKED +/* + For now, support only for the basic abstraction of flags that are + either set or clear. fexcept_t could be structure that holds more + info about the fp environment. +*/ +typedef unsigned short fexcept_t; + +/* This 32-byte struct represents the entire floating point + environment as stored by fnstenv or fstenv, augmented by + the contents of the MXCSR register, as stored by stmxcsr + (if CPU supports it). */ +typedef struct +{ + unsigned short __control_word; + unsigned short __unused0; + unsigned short __status_word; + unsigned short __unused1; + unsigned short __tag_word; + unsigned short __unused2; + unsigned int __ip_offset; /* instruction pointer offset */ + unsigned short __ip_selector; + unsigned short __opcode; + unsigned int __data_offset; + unsigned short __data_selector; + unsigned short __unused3; + unsigned int __mxcsr; /* contents of the MXCSR register */ +} fenv_t; + + +/*The C99 standard (7.6.9) allows us to define implementation-specific macros for + different fp environments */ + +/* The default Intel x87 floating point environment (64-bit mantissa) */ +#define FE_PC64_ENV ((const fenv_t *)-1) + +/* The floating point environment set by MSVCRT _fpreset (53-bit mantissa) */ +#define FE_PC53_ENV ((const fenv_t *)-2) + +/* The FE_DFL_ENV macro is required by standard. + fesetenv will use the environment set at app startup.*/ +#define FE_DFL_ENV ((const fenv_t *) 0) + +#ifdef __cplusplus +extern "C" { +#endif + +/*TODO: Some of these could be inlined */ +/* 7.6.2 Exception */ + +extern int __cdecl __MINGW_NOTHROW feclearexcept (int); +extern int __cdecl __MINGW_NOTHROW fegetexceptflag (fexcept_t * flagp, int excepts); +extern int __cdecl __MINGW_NOTHROW feraiseexcept (int excepts ); +extern int __cdecl __MINGW_NOTHROW fesetexceptflag (const fexcept_t *, int); +extern int __cdecl __MINGW_NOTHROW fetestexcept (int excepts); + +/* 7.6.3 Rounding */ + +extern int __cdecl __MINGW_NOTHROW fegetround (void); +extern int __cdecl __MINGW_NOTHROW fesetround (int mode); + +/* 7.6.4 Environment */ + +extern int __cdecl __MINGW_NOTHROW fegetenv (fenv_t * envp); +extern int __cdecl __MINGW_NOTHROW fesetenv (const fenv_t * ); +extern int __cdecl __MINGW_NOTHROW feupdateenv (const fenv_t *); +extern int __cdecl __MINGW_NOTHROW feholdexcept (fenv_t *); + +#ifdef __cplusplus +} +#endif +#endif /* Not RC_INVOKED */ + +#endif /* ndef _FENV_H */ diff --git a/reactos/include/crt/float.h b/reactos/include/crt/float.h index 6226f4818be..3b1ca89f078 100644 --- a/reactos/include/crt/float.h +++ b/reactos/include/crt/float.h @@ -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 _controlfp (unsigned int unNew, unsigned int unMask); -_CRTIMP unsigned int __cdecl _control87 (unsigned int unNew, unsigned int unMask); +_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 _clearfp (void); /* Clear the FPU status word */ -_CRTIMP unsigned int __cdecl _statusfp (void); /* Report the FPU status word */ +_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 */ #define _clear87 _clearfp #define _status87 _statusfp @@ -118,11 +118,11 @@ _CRTIMP unsigned int __cdecl _statusfp (void); /* Report the FPU status word */ per fninit. To use the MSVCRT.dll _fpreset, include CRT_fp8.o when building your application. */ -void __cdecl _fpreset (void); -void __cdecl fpreset (void); +void __cdecl __MINGW_NOTHROW _fpreset (void); +void __cdecl __MINGW_NOTHROW fpreset (void); /* Global 'variable' for the current floating point error code. */ -_CRTIMP int * __cdecl __fpecode(void); +_CRTIMP int * __cdecl __MINGW_NOTHROW __fpecode(void); #define _fpecode (*(__fpecode())) /* @@ -130,15 +130,15 @@ _CRTIMP int * __cdecl __fpecode(void); * but they really belong in math.h. */ -_CRTIMP double __cdecl _chgsign (double); -_CRTIMP double __cdecl _copysign (double, double); -_CRTIMP double __cdecl _logb (double); -_CRTIMP double __cdecl _nextafter (double, double); -_CRTIMP double __cdecl _scalb (double, long); +_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 int __cdecl _finite (double); -_CRTIMP int __cdecl _fpclass (double); -_CRTIMP int __cdecl _isnan (double); +_CRTIMP int __cdecl __MINGW_NOTHROW _finite (double); +_CRTIMP int __cdecl __MINGW_NOTHROW _fpclass (double); +_CRTIMP int __cdecl __MINGW_NOTHROW _isnan (double); #ifdef __cplusplus } @@ -150,3 +150,4 @@ _CRTIMP int __cdecl _isnan (double); #endif /* _FLOAT_H_ */ + diff --git a/reactos/include/crt/inttypes.h b/reactos/include/crt/inttypes.h index 3937d2166a5..0d42a079d24 100644 --- a/reactos/include/crt/inttypes.h +++ b/reactos/include/crt/inttypes.h @@ -255,20 +255,20 @@ typedef struct { #endif /* !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) */ -__CRT_INLINE intmax_t __cdecl imaxabs (intmax_t j) +__CRT_INLINE intmax_t __cdecl __MINGW_NOTHROW imaxabs (intmax_t j) {return (j >= 0 ? j : -j);} -imaxdiv_t __cdecl imaxdiv (intmax_t numer, intmax_t denom); +imaxdiv_t __cdecl __MINGW_NOTHROW imaxdiv (intmax_t numer, intmax_t denom); /* 7.8.2 Conversion functions for greatest-width integer types */ -intmax_t __cdecl strtoimax (const char* __restrict__ nptr, +intmax_t __cdecl __MINGW_NOTHROW strtoimax (const char* __restrict__ nptr, char** __restrict__ endptr, int base); -uintmax_t __cdecl strtoumax (const char* __restrict__ nptr, +uintmax_t __cdecl __MINGW_NOTHROW strtoumax (const char* __restrict__ nptr, char** __restrict__ endptr, int base); -intmax_t __cdecl wcstoimax (const wchar_t* __restrict__ nptr, +intmax_t __cdecl __MINGW_NOTHROW wcstoimax (const wchar_t* __restrict__ nptr, wchar_t** __restrict__ endptr, int base); -uintmax_t __cdecl wcstoumax (const wchar_t* __restrict__ nptr, +uintmax_t __cdecl __MINGW_NOTHROW wcstoumax (const wchar_t* __restrict__ nptr, wchar_t** __restrict__ endptr, int base); #ifdef __cplusplus diff --git a/reactos/include/crt/io.h b/reactos/include/crt/io.h index bfb20b81012..e49a6b7e4e8 100644 --- a/reactos/include/crt/io.h +++ b/reactos/include/crt/io.h @@ -1,4 +1,4 @@ -/* +/* * io.h * This file has no copyright assigned and is placed in the Public Domain. * This file is a part of the mingw-runtime package. @@ -18,7 +18,6 @@ * an inclusion of sys/types.h */ #include /* To get time_t. */ -#include /* For intptr_t. */ /* * Attributes of files as returned by _findfirst et al. @@ -34,6 +33,15 @@ #ifndef RC_INVOKED +#ifndef _INTPTR_T_DEFINED +#define _INTPTR_T_DEFINED +#ifdef _WIN64 + typedef __int64 intptr_t; +#else + typedef int intptr_t; +#endif +#endif + #ifndef _FSIZE_T_DEFINED typedef unsigned long _fsize_t; #define _FSIZE_T_DEFINED @@ -42,7 +50,7 @@ typedef unsigned long _fsize_t; /* * The maximum length of a file name. You should use GetVolumeInformation * instead of this constant. But hey, this works. - * Also defined in stdio.h. + * Also defined in stdio.h. */ #ifndef FILENAME_MAX #define FILENAME_MAX (260) @@ -73,8 +81,8 @@ struct _finddatai64_t { struct __finddata64_t { unsigned attrib; - __time64_t time_create; - __time64_t time_access; + __time64_t time_create; + __time64_t time_access; __time64_t time_write; _fsize_t size; char name[FILENAME_MAX]; @@ -101,7 +109,7 @@ struct _wfinddatai64_t { struct __wfinddata64_t { unsigned attrib; - __time64_t time_create; + __time64_t time_create; __time64_t time_access; __time64_t time_write; _fsize_t size; @@ -122,31 +130,32 @@ extern "C" { * and 0 if a match was found. Call _findclose when you are finished. */ /* FIXME: Should these all use intptr_t, as per recent MSDN docs? */ -_CRTIMP long __cdecl _findfirst (const char*, struct _finddata_t*); -_CRTIMP int __cdecl _findnext (long, struct _finddata_t*); -_CRTIMP int __cdecl _findclose (long); +_CRTIMP long __cdecl __MINGW_NOTHROW _findfirst (const char*, struct _finddata_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _findnext (long, struct _finddata_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _findclose (long); -_CRTIMP int __cdecl _chdir (const char*); -_CRTIMP char* __cdecl _getcwd (char*, int); -_CRTIMP int __cdecl _mkdir (const char*); -_CRTIMP char* __cdecl _mktemp (char*); -_CRTIMP int __cdecl _rmdir (const char*); -_CRTIMP int __cdecl _chmod (const char*, int); +_CRTIMP int __cdecl __MINGW_NOTHROW _chdir (const char*); +_CRTIMP char* __cdecl __MINGW_NOTHROW _getcwd (char*, int); +_CRTIMP int __cdecl __MINGW_NOTHROW _mkdir (const char*); +_CRTIMP char* __cdecl __MINGW_NOTHROW _mktemp (char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _rmdir (const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _chmod (const char*, int); #ifdef __MSVCRT__ -_CRTIMP __int64 __cdecl _filelengthi64(int); -_CRTIMP long __cdecl _findfirsti64(const char*, struct _finddatai64_t*); -_CRTIMP int __cdecl _findnexti64(long, struct _finddatai64_t*); -_CRTIMP __int64 __cdecl _lseeki64(int, __int64, int); -_CRTIMP __int64 __cdecl _telli64(int); -/* These require newer versions of msvcrt.dll (6.1 or higher). */ +_CRTIMP __int64 __cdecl __MINGW_NOTHROW _filelengthi64(int); +_CRTIMP long __cdecl __MINGW_NOTHROW _findfirsti64(const char*, struct _finddatai64_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _findnexti64(long, struct _finddatai64_t*); +_CRTIMP __int64 __cdecl __MINGW_NOTHROW _lseeki64(int, __int64, int); +_CRTIMP __int64 __cdecl __MINGW_NOTHROW _telli64(int); +/* These require newer versions of msvcrt.dll (6.1 or higher). */ #if __MSVCRT_VERSION__ >= 0x0601 -_CRTIMP intptr_t __cdecl _findfirst64(const char*, struct __finddata64_t*); -_CRTIMP intptr_t __cdecl _findnext64(intptr_t, struct __finddata64_t*); +_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findfirst64(const char*, struct __finddata64_t*); +_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findnext64(intptr_t, struct __finddata64_t*); #endif /* __MSVCRT_VERSION__ >= 0x0601 */ #ifndef __NO_MINGW_LFS -__CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence) +__CRT_INLINE off64_t lseek64 (int, off64_t, int); +__CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence) { return _lseeki64(fd, (__int64) offset, whence); } @@ -157,12 +166,12 @@ __CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence) #ifndef _NO_OLDNAMES #ifndef _UWIN -_CRTIMP int __cdecl chdir (const char*); -_CRTIMP char* __cdecl getcwd (char*, int); -_CRTIMP int __cdecl mkdir (const char*); -_CRTIMP char* __cdecl mktemp (char*); -_CRTIMP int __cdecl rmdir (const char*); -_CRTIMP int __cdecl chmod (const char*, int); +_CRTIMP int __cdecl __MINGW_NOTHROW chdir (const char*); +_CRTIMP char* __cdecl __MINGW_NOTHROW getcwd (char*, int); +_CRTIMP int __cdecl __MINGW_NOTHROW mkdir (const char*); +_CRTIMP char* __cdecl __MINGW_NOTHROW mktemp (char*); +_CRTIMP int __cdecl __MINGW_NOTHROW rmdir (const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int); #endif /* _UWIN */ #endif /* Not _NO_OLDNAMES */ @@ -181,7 +190,7 @@ _CRTIMP int __cdecl chmod (const char*, int); * it doesn't seem to hurt to add them). */ #define F_OK 0 /* Check for file existence */ /* Well maybe it does hurt. On newer versions of MSVCRT, an access mode - of 1 causes invalid parameter error. */ + of 1 causes invalid parameter error. */ #define X_OK 1 /* MS access() doesn't check for execute permission. */ #define W_OK 2 /* Check for write permission */ #define R_OK 4 /* Check for read permission */ @@ -192,20 +201,20 @@ _CRTIMP int __cdecl chmod (const char*, int); extern "C" { #endif -_CRTIMP int __cdecl _access (const char*, int); -_CRTIMP int __cdecl _chsize (int, long); -_CRTIMP int __cdecl _close (int); -_CRTIMP int __cdecl _commit(int); +_CRTIMP int __cdecl __MINGW_NOTHROW _access (const char*, int); +_CRTIMP int __cdecl __MINGW_NOTHROW _chsize (int, long); +_CRTIMP int __cdecl __MINGW_NOTHROW _close (int); +_CRTIMP int __cdecl __MINGW_NOTHROW _commit(int); /* NOTE: The only significant bit in unPermissions appears to be bit 7 (0x80), * the "owner write permission" bit (on FAT). */ -_CRTIMP int __cdecl _creat (const char*, int); +_CRTIMP int __cdecl __MINGW_NOTHROW _creat (const char*, int); -_CRTIMP int __cdecl _dup (int); -_CRTIMP int __cdecl _dup2 (int, int); -_CRTIMP long __cdecl _filelength (int); -_CRTIMP long __cdecl _get_osfhandle (int); -_CRTIMP int __cdecl _isatty (int); +_CRTIMP int __cdecl __MINGW_NOTHROW _dup (int); +_CRTIMP int __cdecl __MINGW_NOTHROW _dup2 (int, int); +_CRTIMP long __cdecl __MINGW_NOTHROW _filelength (int); +_CRTIMP long __cdecl __MINGW_NOTHROW _get_osfhandle (int); +_CRTIMP int __cdecl __MINGW_NOTHROW _isatty (int); /* In a very odd turn of events this function is excluded from those * files which define _STREAM_COMPAT. This is required in order to @@ -213,54 +222,54 @@ _CRTIMP int __cdecl _isatty (int); * line 107. Actually I might just be able to change the name of * the enum member in streambuf.h... we'll see. TODO */ #ifndef _STREAM_COMPAT -_CRTIMP int __cdecl _eof (int); +_CRTIMP int __cdecl __MINGW_NOTHROW _eof (int); #endif /* LK_... locking commands defined in sys/locking.h. */ -_CRTIMP int __cdecl _locking (int, int, long); +_CRTIMP int __cdecl __MINGW_NOTHROW _locking (int, int, long); -_CRTIMP long __cdecl _lseek (int, long, int); +_CRTIMP long __cdecl __MINGW_NOTHROW _lseek (int, long, int); /* Optional third argument is unsigned unPermissions. */ -_CRTIMP int __cdecl _open (const char*, int, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW _open (const char*, int, ...); -_CRTIMP int __cdecl _open_osfhandle (long, int); -_CRTIMP int __cdecl _pipe (int *, unsigned int, int); -_CRTIMP int __cdecl _read (int, void*, unsigned int); -_CRTIMP int __cdecl _setmode (int, int); +_CRTIMP int __cdecl __MINGW_NOTHROW _open_osfhandle (long, int); +_CRTIMP int __cdecl __MINGW_NOTHROW _pipe (int *, unsigned int, int); +_CRTIMP int __cdecl __MINGW_NOTHROW _read (int, void*, unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _setmode (int, int); /* MS puts remove & rename (but not wide versions) in io.h as well as in stdio.h. */ -_CRTIMP int __cdecl remove (const char*); -_CRTIMP int __cdecl rename (const char*, const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW remove (const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW rename (const char*, const char*); /* SH_... flags for nShFlags defined in share.h * Optional fourth argument is unsigned unPermissions */ -_CRTIMP int __cdecl _sopen (const char*, int, int, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW _sopen (const char*, int, int, ...); -_CRTIMP long __cdecl _tell (int); +_CRTIMP long __cdecl __MINGW_NOTHROW _tell (int); /* Should umask be in sys/stat.h and/or sys/types.h instead? */ -_CRTIMP int __cdecl _umask (int); -_CRTIMP int __cdecl _unlink (const char*); -_CRTIMP int __cdecl _write (int, const void*, unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _umask (int); +_CRTIMP int __cdecl __MINGW_NOTHROW _unlink (const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _write (int, const void*, unsigned int); /* Wide character versions. Also declared in wchar.h. */ /* Not in crtdll.dll */ #if !defined (_WIO_DEFINED) #if defined (__MSVCRT__) -_CRTIMP int __cdecl _waccess(const wchar_t*, int); -_CRTIMP int __cdecl _wchmod(const wchar_t*, int); -_CRTIMP int __cdecl _wcreat(const wchar_t*, int); -_CRTIMP long __cdecl _wfindfirst(const wchar_t*, struct _wfinddata_t*); -_CRTIMP int __cdecl _wfindnext(long, struct _wfinddata_t *); -_CRTIMP int __cdecl _wunlink(const wchar_t*); -_CRTIMP int __cdecl _wopen(const wchar_t*, int, ...); -_CRTIMP int __cdecl _wsopen(const wchar_t*, int, int, ...); -_CRTIMP wchar_t * __cdecl _wmktemp(wchar_t*); -_CRTIMP long __cdecl _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*); -_CRTIMP int __cdecl _wfindnexti64(long, struct _wfinddatai64_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _waccess(const wchar_t*, int); +_CRTIMP int __cdecl __MINGW_NOTHROW _wchmod(const wchar_t*, int); +_CRTIMP int __cdecl __MINGW_NOTHROW _wcreat(const wchar_t*, int); +_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst(const wchar_t*, struct _wfinddata_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext(long, struct _wfinddata_t *); +_CRTIMP int __cdecl __MINGW_NOTHROW _wunlink(const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wopen(const wchar_t*, int, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW _wsopen(const wchar_t*, int, int, ...); +_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW _wmktemp(wchar_t*); +_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnexti64(long, struct _wfinddatai64_t*); #if __MSVCRT_VERSION__ >= 0x0601 -_CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t*, struct __wfinddata64_t*); -_CRTIMP intptr_t __cdecl _wfindnext64(intptr_t, struct __wfinddata64_t*); +_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct __wfinddata64_t*); +_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, struct __wfinddata64_t*); #endif #endif /* defined (__MSVCRT__) */ #define _WIO_DEFINED @@ -273,24 +282,24 @@ _CRTIMP intptr_t __cdecl _wfindnext64(intptr_t, struct __wfinddata64_t*); */ #ifndef _UWIN -_CRTIMP int __cdecl access (const char*, int); -_CRTIMP int __cdecl chsize (int, long ); -_CRTIMP int __cdecl close (int); -_CRTIMP int __cdecl creat (const char*, int); -_CRTIMP int __cdecl dup (int); -_CRTIMP int __cdecl dup2 (int, int); -_CRTIMP int __cdecl eof (int); -_CRTIMP long __cdecl filelength (int); -_CRTIMP int __cdecl isatty (int); -_CRTIMP long __cdecl lseek (int, long, int); -_CRTIMP int __cdecl open (const char*, int, ...); -_CRTIMP int __cdecl read (int, void*, unsigned int); -_CRTIMP int __cdecl setmode (int, int); -_CRTIMP int __cdecl sopen (const char*, int, int, ...); -_CRTIMP long __cdecl tell (int); -_CRTIMP int __cdecl umask (int); -_CRTIMP int __cdecl unlink (const char*); -_CRTIMP int __cdecl write (int, const void*, unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW access (const char*, int); +_CRTIMP int __cdecl __MINGW_NOTHROW chsize (int, long ); +_CRTIMP int __cdecl __MINGW_NOTHROW close (int); +_CRTIMP int __cdecl __MINGW_NOTHROW creat (const char*, int); +_CRTIMP int __cdecl __MINGW_NOTHROW dup (int); +_CRTIMP int __cdecl __MINGW_NOTHROW dup2 (int, int); +_CRTIMP int __cdecl __MINGW_NOTHROW eof (int); +_CRTIMP long __cdecl __MINGW_NOTHROW filelength (int); +_CRTIMP int __cdecl __MINGW_NOTHROW isatty (int); +_CRTIMP long __cdecl __MINGW_NOTHROW lseek (int, long, int); +_CRTIMP int __cdecl __MINGW_NOTHROW open (const char*, int, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW read (int, void*, unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW setmode (int, int); +_CRTIMP int __cdecl __MINGW_NOTHROW sopen (const char*, int, int, ...); +_CRTIMP long __cdecl __MINGW_NOTHROW tell (int); +_CRTIMP int __cdecl __MINGW_NOTHROW umask (int); +_CRTIMP int __cdecl __MINGW_NOTHROW unlink (const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW write (int, const void*, unsigned int); #endif /* _UWIN */ #ifdef __USE_MINGW_ACCESS diff --git a/reactos/include/crt/libgen.h b/reactos/include/crt/libgen.h new file mode 100644 index 00000000000..db89e1e14ac --- /dev/null +++ b/reactos/include/crt/libgen.h @@ -0,0 +1,31 @@ +#ifndef _LIBGEN_H_ +/* + * libgen.h + * + * $Id: libgen.h,v 1.2 2007/06/23 07:34:15 dannysmith Exp $ + * + * 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. + * + * Functions for splitting pathnames into dirname and basename components. + * + */ +#define _LIBGEN_H_ + +/* All the headers include this file. */ +#include <_mingw.h> + +#ifdef __cplusplus +extern "C" { +#endif + +extern __cdecl __MINGW_NOTHROW char *basename (char *); +extern __cdecl __MINGW_NOTHROW char *dirname (char *); + +#ifdef __cplusplus +} +#endif + +#endif /* _LIBGEN_H_: end of file */ + diff --git a/reactos/include/crt/locale.h b/reactos/include/crt/locale.h index ea4e666a0de..f80ccf3069a 100644 --- a/reactos/include/crt/locale.h +++ b/reactos/include/crt/locale.h @@ -68,13 +68,13 @@ struct lconv extern "C" { #endif -_CRTIMP char* __cdecl setlocale (int, const char*); -_CRTIMP struct lconv* __cdecl localeconv (void); +_CRTIMP char* __cdecl __MINGW_NOTHROW setlocale (int, const char*); +_CRTIMP struct lconv* __cdecl __MINGW_NOTHROW localeconv (void); #ifndef _WLOCALE_DEFINED /* also declared in wchar.h */ # define __need_wchar_t # include - _CRTIMP wchar_t* __cdecl _wsetlocale(int, const wchar_t*); + _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wsetlocale(int, const wchar_t*); # define _WLOCALE_DEFINED #endif /* ndef _WLOCALE_DEFINED */ @@ -86,3 +86,4 @@ _CRTIMP struct lconv* __cdecl localeconv (void); #endif /* Not _LOCALE_H_ */ + diff --git a/reactos/include/crt/malloc.h b/reactos/include/crt/malloc.h index dbe50b0ebfa..9d2c33f0772 100644 --- a/reactos/include/crt/malloc.h +++ b/reactos/include/crt/malloc.h @@ -50,44 +50,44 @@ extern "C" { The _heap* memory allocation functions are supported on NT but not W9x. On latter, they always set errno to ENOSYS. */ -_CRTIMP int __cdecl _heapwalk (_HEAPINFO*); +_CRTIMP int __cdecl __MINGW_NOTHROW _heapwalk (_HEAPINFO*); #ifdef __GNUC__ #define _alloca(x) __builtin_alloca((x)) #endif #ifndef _NO_OLDNAMES -_CRTIMP int __cdecl heapwalk (_HEAPINFO*); +_CRTIMP int __cdecl __MINGW_NOTHROW heapwalk (_HEAPINFO*); #ifdef __GNUC__ #define alloca(x) __builtin_alloca((x)) #endif #endif /* Not _NO_OLDNAMES */ -_CRTIMP int __cdecl _heapchk (void); /* Verify heap integrety. */ -_CRTIMP int __cdecl _heapmin (void); /* Return unused heap to the OS. */ -_CRTIMP int __cdecl _heapset (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _heapchk (void); /* Verify heap integrety. */ +_CRTIMP int __cdecl __MINGW_NOTHROW _heapmin (void); /* Return unused heap to the OS. */ +_CRTIMP int __cdecl __MINGW_NOTHROW _heapset (unsigned int); -_CRTIMP size_t __cdecl _msize (void*); -_CRTIMP size_t __cdecl _get_sbh_threshold (void); -_CRTIMP int __cdecl _set_sbh_threshold (size_t); -_CRTIMP void* __cdecl _expand (void*, size_t); +_CRTIMP size_t __cdecl __MINGW_NOTHROW _msize (void*); +_CRTIMP size_t __cdecl __MINGW_NOTHROW _get_sbh_threshold (void); +_CRTIMP int __cdecl __MINGW_NOTHROW _set_sbh_threshold (size_t); +_CRTIMP void* __cdecl __MINGW_NOTHROW _expand (void*, size_t); -/* These require msvcr70.dll or higher. */ +/* These require msvcr70.dll or higher. */ #if __MSVCRT_VERSION__ >= 0x0700 -_CRTIMP void * __cdecl _aligned_offset_malloc(size_t, size_t, size_t); -_CRTIMP void * __cdecl _aligned_offset_realloc(void*, size_t, size_t, size_t); +_CRTIMP void * __cdecl __MINGW_NOTHROW _aligned_offset_malloc(size_t, size_t, size_t); +_CRTIMP void * __cdecl __MINGW_NOTHROW _aligned_offset_realloc(void*, size_t, size_t, size_t); -_CRTIMP void * __cdecl _aligned_malloc (size_t, size_t); -_CRTIMP void * __cdecl _aligned_realloc (void*, size_t, size_t); -_CRTIMP void __cdecl _aligned_free (void*); +_CRTIMP void * __cdecl __MINGW_NOTHROW _aligned_malloc (size_t, size_t); +_CRTIMP void * __cdecl __MINGW_NOTHROW _aligned_realloc (void*, size_t, size_t); +_CRTIMP void __cdecl __MINGW_NOTHROW _aligned_free (void*); #endif /* __MSVCRT_VERSION__ >= 0x0700 */ -/* These require libmingwex.a. */ -void * __cdecl __mingw_aligned_offset_malloc (size_t, size_t, size_t); -void * __cdecl __mingw_aligned_offset_realloc (void*, size_t, size_t, size_t); +/* These require libmingwex.a. */ +void * __cdecl __MINGW_NOTHROW __mingw_aligned_offset_malloc (size_t, size_t, size_t); +void * __cdecl __MINGW_NOTHROW __mingw_aligned_offset_realloc (void*, size_t, size_t, size_t); -void * __cdecl __mingw_aligned_malloc (size_t, size_t); -void * __cdecl __mingw_aligned_realloc (void*, size_t, size_t); -void __cdecl __mingw_aligned_free (void*); +void * __cdecl __MINGW_NOTHROW __mingw_aligned_malloc (size_t, size_t); +void * __cdecl __MINGW_NOTHROW __mingw_aligned_realloc (void*, size_t, size_t); +void __cdecl __MINGW_NOTHROW __mingw_aligned_free (void*); #ifdef __cplusplus } diff --git a/reactos/include/crt/mbctype.h b/reactos/include/crt/mbctype.h index d1fa6d81138..ffc9a3771f9 100644 --- a/reactos/include/crt/mbctype.h +++ b/reactos/include/crt/mbctype.h @@ -53,29 +53,29 @@ extern "C" { #ifndef __STRICT_ANSI__ -_CRTIMP int __cdecl _setmbcp (int); -_CRTIMP int __cdecl _getmbcp (void); +_CRTIMP int __cdecl __MINGW_NOTHROW _setmbcp (int); +_CRTIMP int __cdecl __MINGW_NOTHROW _getmbcp (void); /* byte classification */ /* NB: Corresponding _ismbc* functions are in mbstring.h */ -_CRTIMP int __cdecl _ismbbalpha (unsigned int); -_CRTIMP int __cdecl _ismbbalnum (unsigned int); -_CRTIMP int __cdecl _ismbbgraph (unsigned int); -_CRTIMP int __cdecl _ismbbprint (unsigned int); -_CRTIMP int __cdecl _ismbbpunct (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbalpha (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbalnum (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbgraph (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbprint (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbpunct (unsigned int); -_CRTIMP int __cdecl _ismbbkana (unsigned int); -_CRTIMP int __cdecl _ismbbkalnum (unsigned int); -_CRTIMP int __cdecl _ismbbkprint (unsigned int); -_CRTIMP int __cdecl _ismbbkpunct (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbkana (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbkalnum (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbkprint (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbkpunct (unsigned int); /* these are also in mbstring.h */ -_CRTIMP int __cdecl _ismbblead (unsigned int); -_CRTIMP int __cdecl _ismbbtrail (unsigned int); -_CRTIMP int __cdecl _ismbslead (const unsigned char*, const unsigned char*); -_CRTIMP int __cdecl _ismbstrail (const unsigned char*, const unsigned char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbblead (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbtrail (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbslead (const unsigned char*, const unsigned char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbstrail (const unsigned char*, const unsigned char*); #ifdef __DECLSPEC_SUPPORTED __MINGW_IMPORT unsigned char _mbctype[]; @@ -94,3 +94,4 @@ __MINGW_IMPORT unsigned char _mbcasemap[]; #endif /* Not _MCTYPE_H_ */ + diff --git a/reactos/include/crt/mbstring.h b/reactos/include/crt/mbstring.h index 593ae0c33f1..4428b60a651 100644 --- a/reactos/include/crt/mbstring.h +++ b/reactos/include/crt/mbstring.h @@ -36,89 +36,89 @@ extern "C" { #ifndef __STRICT_ANSI__ /* character classification */ -_CRTIMP int __cdecl _ismbcalnum (unsigned int); -_CRTIMP int __cdecl _ismbcalpha (unsigned int); -_CRTIMP int __cdecl _ismbcdigit (unsigned int); -_CRTIMP int __cdecl _ismbcgraph (unsigned int); -_CRTIMP int __cdecl _ismbcprint (unsigned int); -_CRTIMP int __cdecl _ismbcpunct (unsigned int); -_CRTIMP int __cdecl _ismbcspace (unsigned int); -_CRTIMP int __cdecl _ismbclower (unsigned int); -_CRTIMP int __cdecl _ismbcupper (unsigned int); -_CRTIMP int __cdecl _ismbclegal (unsigned int); -_CRTIMP int __cdecl _ismbcsymbol (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcalnum (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcalpha (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcdigit (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcgraph (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcprint (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcpunct (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcspace (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbclower (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcupper (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbclegal (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcsymbol (unsigned int); /* also in mbctype.h */ -_CRTIMP int __cdecl _ismbblead (unsigned int ); -_CRTIMP int __cdecl _ismbbtrail (unsigned int ); -_CRTIMP int __cdecl _ismbslead ( const unsigned char*, const unsigned char*); -_CRTIMP int __cdecl _ismbstrail ( const unsigned char*, const unsigned char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbblead (unsigned int ); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbtrail (unsigned int ); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbslead ( const unsigned char*, const unsigned char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbstrail ( const unsigned char*, const unsigned char*); -_CRTIMP unsigned int __cdecl _mbctolower (unsigned int); -_CRTIMP unsigned int __cdecl _mbctoupper (unsigned int); +_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbctolower (unsigned int); +_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbctoupper (unsigned int); -_CRTIMP void __cdecl _mbccpy (unsigned char*, const unsigned char*); -_CRTIMP size_t __cdecl _mbclen (const unsigned char*); +_CRTIMP void __cdecl __MINGW_NOTHROW _mbccpy (unsigned char*, const unsigned char*); +_CRTIMP size_t __cdecl __MINGW_NOTHROW _mbclen (const unsigned char*); -_CRTIMP unsigned int __cdecl _mbbtombc (unsigned int); -_CRTIMP unsigned int __cdecl _mbctombb (unsigned int); +_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbbtombc (unsigned int); +_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbctombb (unsigned int); /* Return value constants for these are defined in mbctype.h. */ -_CRTIMP int __cdecl _mbbtype (unsigned char, int); -_CRTIMP int __cdecl _mbsbtype (const unsigned char*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW _mbbtype (unsigned char, int); +_CRTIMP int __cdecl __MINGW_NOTHROW _mbsbtype (const unsigned char*, size_t); -_CRTIMP unsigned char* __cdecl _mbscpy (unsigned char*, const unsigned char*); -_CRTIMP unsigned char* __cdecl _mbsncpy (unsigned char*, const unsigned char*, size_t); -_CRTIMP unsigned char* __cdecl _mbsnbcpy (unsigned char*, const unsigned char*, size_t); -_CRTIMP unsigned char* __cdecl _mbsset (unsigned char*, unsigned int); -_CRTIMP unsigned char* __cdecl _mbsnset (unsigned char*, unsigned int, size_t); -_CRTIMP unsigned char* __cdecl _mbsnbset (unsigned char*, unsigned int, size_t); -_CRTIMP unsigned char* __cdecl _mbsdup (const unsigned char*); -_CRTIMP unsigned char* __cdecl _mbsrev (unsigned char*); -_CRTIMP unsigned char* __cdecl _mbscat (unsigned char*, const unsigned char*); -_CRTIMP unsigned char* __cdecl _mbsncat (unsigned char*, const unsigned char*, size_t); -_CRTIMP unsigned char* __cdecl _mbsnbcat (unsigned char*, const unsigned char*, size_t); -_CRTIMP size_t __cdecl _mbslen (const unsigned char*); -_CRTIMP size_t __cdecl _mbsnbcnt (const unsigned char*, size_t); -_CRTIMP size_t __cdecl _mbsnccnt (const unsigned char*, size_t); -_CRTIMP unsigned char* __cdecl _mbschr (const unsigned char*, unsigned int); -_CRTIMP unsigned char* __cdecl _mbsrchr (const unsigned char*, unsigned int); -_CRTIMP size_t __cdecl _mbsspn (const unsigned char*, const unsigned char*); -_CRTIMP size_t __cdecl _mbscspn (const unsigned char*, const unsigned char*); -_CRTIMP unsigned char* __cdecl _mbsspnp (const unsigned char*, const unsigned char*); -_CRTIMP unsigned char* __cdecl _mbspbrk (const unsigned char*, const unsigned char*); -_CRTIMP int __cdecl _mbscmp (const unsigned char*, const unsigned char*); -_CRTIMP int __cdecl _mbsicmp (const unsigned char*, const unsigned char*); -_CRTIMP int __cdecl _mbsncmp (const unsigned char*, const unsigned char*, size_t); -_CRTIMP int __cdecl _mbsnicmp (const unsigned char*, const unsigned char*, size_t); -_CRTIMP int __cdecl _mbsnbcmp (const unsigned char*, const unsigned char*, size_t); -_CRTIMP int __cdecl _mbsnbicmp (const unsigned char*, const unsigned char*, size_t); -_CRTIMP int __cdecl _mbscoll (const unsigned char*, const unsigned char*); -_CRTIMP int __cdecl _mbsicoll (const unsigned char*, const unsigned char*); -_CRTIMP int __cdecl _mbsncoll (const unsigned char*, const unsigned char*, size_t); -_CRTIMP int __cdecl _mbsnicoll (const unsigned char*, const unsigned char*, size_t); -_CRTIMP int __cdecl _mbsnbcoll (const unsigned char*, const unsigned char*, size_t); -_CRTIMP int __cdecl _mbsnbicoll (const unsigned char*, const unsigned char*, size_t); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbscpy (unsigned char*, const unsigned char*); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsncpy (unsigned char*, const unsigned char*, size_t); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsnbcpy (unsigned char*, const unsigned char*, size_t); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsset (unsigned char*, unsigned int); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsnset (unsigned char*, unsigned int, size_t); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsnbset (unsigned char*, unsigned int, size_t); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsdup (const unsigned char*); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsrev (unsigned char*); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbscat (unsigned char*, const unsigned char*); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsncat (unsigned char*, const unsigned char*, size_t); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsnbcat (unsigned char*, const unsigned char*, size_t); +_CRTIMP size_t __cdecl __MINGW_NOTHROW _mbslen (const unsigned char*); +_CRTIMP size_t __cdecl __MINGW_NOTHROW _mbsnbcnt (const unsigned char*, size_t); +_CRTIMP size_t __cdecl __MINGW_NOTHROW _mbsnccnt (const unsigned char*, size_t); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbschr (const unsigned char*, unsigned int); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsrchr (const unsigned char*, unsigned int); +_CRTIMP size_t __cdecl __MINGW_NOTHROW _mbsspn (const unsigned char*, const unsigned char*); +_CRTIMP size_t __cdecl __MINGW_NOTHROW _mbscspn (const unsigned char*, const unsigned char*); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsspnp (const unsigned char*, const unsigned char*); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbspbrk (const unsigned char*, const unsigned char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _mbscmp (const unsigned char*, const unsigned char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _mbsicmp (const unsigned char*, const unsigned char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _mbsncmp (const unsigned char*, const unsigned char*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW _mbsnicmp (const unsigned char*, const unsigned char*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW _mbsnbcmp (const unsigned char*, const unsigned char*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW _mbsnbicmp (const unsigned char*, const unsigned char*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW _mbscoll (const unsigned char*, const unsigned char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _mbsicoll (const unsigned char*, const unsigned char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _mbsncoll (const unsigned char*, const unsigned char*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW _mbsnicoll (const unsigned char*, const unsigned char*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW _mbsnbcoll (const unsigned char*, const unsigned char*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW _mbsnbicoll (const unsigned char*, const unsigned char*, size_t); -_CRTIMP unsigned char* __cdecl _mbsinc (const unsigned char*); -_CRTIMP unsigned char* __cdecl _mbsninc (const unsigned char*, size_t); -_CRTIMP unsigned char* __cdecl _mbsdec (const unsigned char*, const unsigned char*); -_CRTIMP unsigned int __cdecl _mbsnextc (const unsigned char*); -_CRTIMP unsigned char* __cdecl _mbslwr (unsigned char*); -_CRTIMP unsigned char* __cdecl _mbsupr (unsigned char*); -_CRTIMP unsigned char* __cdecl _mbstok (unsigned char*, const unsigned char*); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsinc (const unsigned char*); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsninc (const unsigned char*, size_t); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsdec (const unsigned char*, const unsigned char*); +_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbsnextc (const unsigned char*); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbslwr (unsigned char*); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsupr (unsigned char*); +_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbstok (unsigned char*, const unsigned char*); /* Kanji */ -_CRTIMP int __cdecl _ismbchira (unsigned int); -_CRTIMP int __cdecl _ismbckata (unsigned int); -_CRTIMP int __cdecl _ismbcl0 (unsigned int); -_CRTIMP int __cdecl _ismbcl1 (unsigned int); -_CRTIMP int __cdecl _ismbcl2 (unsigned int); -_CRTIMP unsigned int __cdecl _mbcjistojms (unsigned int); -_CRTIMP unsigned int __cdecl _mbcjmstojis (unsigned int); -_CRTIMP unsigned int __cdecl _mbctohira (unsigned int); -_CRTIMP unsigned int __cdecl _mbctokata (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbchira (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbckata (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcl0 (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcl1 (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcl2 (unsigned int); +_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbcjistojms (unsigned int); +_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbcjmstojis (unsigned int); +_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbctohira (unsigned int); +_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbctokata (unsigned int); #endif /* Not strict ANSI */ @@ -130,3 +130,4 @@ _CRTIMP unsigned int __cdecl _mbctokata (unsigned int); #endif /* Not _MBSTRING_H_ */ + diff --git a/reactos/include/crt/mem.h b/reactos/include/crt/mem.h new file mode 100644 index 00000000000..451de0cd47e --- /dev/null +++ b/reactos/include/crt/mem.h @@ -0,0 +1,6 @@ +/* + * This file is part of the Mingw32 package. + * + * mem.h maps to string.h + */ +#include diff --git a/reactos/include/crt/process.h b/reactos/include/crt/process.h index a572edcfa16..0e679b63faf 100644 --- a/reactos/include/crt/process.h +++ b/reactos/include/crt/process.h @@ -55,30 +55,30 @@ extern "C" { #endif -_CRTIMP void __cdecl _cexit(void); -_CRTIMP void __cdecl _c_exit(void); +_CRTIMP void __cdecl __MINGW_NOTHROW _cexit(void); +_CRTIMP void __cdecl __MINGW_NOTHROW _c_exit(void); -_CRTIMP int __cdecl _cwait (int*, _pid_t, int); +_CRTIMP int __cdecl __MINGW_NOTHROW _cwait (int*, _pid_t, int); -_CRTIMP _pid_t __cdecl _getpid(void); +_CRTIMP _pid_t __cdecl __MINGW_NOTHROW _getpid(void); -_CRTIMP int __cdecl _execl (const char*, const char*, ...); -_CRTIMP int __cdecl _execle (const char*, const char*, ...); -_CRTIMP int __cdecl _execlp (const char*, const char*, ...); -_CRTIMP int __cdecl _execlpe (const char*, const char*, ...); -_CRTIMP int __cdecl _execv (const char*, const char* const*); -_CRTIMP int __cdecl _execve (const char*, const char* const*, const char* const*); -_CRTIMP int __cdecl _execvp (const char*, const char* const*); -_CRTIMP int __cdecl _execvpe (const char*, const char* const*, const char* const*); +_CRTIMP int __cdecl __MINGW_NOTHROW _execl (const char*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW _execle (const char*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW _execlp (const char*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW _execlpe (const char*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW _execv (const char*, const char* const*); +_CRTIMP int __cdecl __MINGW_NOTHROW _execve (const char*, const char* const*, const char* const*); +_CRTIMP int __cdecl __MINGW_NOTHROW _execvp (const char*, const char* const*); +_CRTIMP int __cdecl __MINGW_NOTHROW _execvpe (const char*, const char* const*, const char* const*); -_CRTIMP int __cdecl _spawnl (int, const char*, const char*, ...); -_CRTIMP int __cdecl _spawnle (int, const char*, const char*, ...); -_CRTIMP int __cdecl _spawnlp (int, const char*, const char*, ...); -_CRTIMP int __cdecl _spawnlpe (int, const char*, const char*, ...); -_CRTIMP int __cdecl _spawnv (int, const char*, const char* const*); -_CRTIMP int __cdecl _spawnve (int, const char*, const char* const*, const char* const*); -_CRTIMP int __cdecl _spawnvp (int, const char*, const char* const*); -_CRTIMP int __cdecl _spawnvpe (int, const char*, const char* const*, const char* const*); +_CRTIMP int __cdecl __MINGW_NOTHROW _spawnl (int, const char*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW _spawnle (int, const char*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW _spawnlp (int, const char*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW _spawnlpe (int, const char*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW _spawnv (int, const char*, const char* const*); +_CRTIMP int __cdecl __MINGW_NOTHROW _spawnve (int, const char*, const char* const*, const char* const*); +_CRTIMP int __cdecl __MINGW_NOTHROW _spawnvp (int, const char*, const char* const*); +_CRTIMP int __cdecl __MINGW_NOTHROW _spawnvpe (int, const char*, const char* const*, const char* const*); /* @@ -92,15 +92,15 @@ _CRTIMP int __cdecl _spawnvpe (int, const char*, const char* const*, const char* * * NOTE: No old names for these functions. Use the underscore. */ -_CRTIMP unsigned long __cdecl +_CRTIMP unsigned long __cdecl __MINGW_NOTHROW _beginthread (void (*)(void *), unsigned, void*); -_CRTIMP void __cdecl _endthread (void); +_CRTIMP void __cdecl __MINGW_NOTHROW _endthread (void); #ifdef __MSVCRT__ -_CRTIMP unsigned long __cdecl +_CRTIMP unsigned long __cdecl __MINGW_NOTHROW _beginthreadex (void *, unsigned, unsigned (__stdcall *) (void *), void*, unsigned, unsigned*); -_CRTIMP void __cdecl _endthreadex (unsigned); +_CRTIMP void __cdecl __MINGW_NOTHROW _endthreadex (unsigned); #endif @@ -109,24 +109,24 @@ _CRTIMP void __cdecl _endthreadex (unsigned); * Functions without the leading underscore, for portability. These functions * live in liboldnames.a. */ -_CRTIMP int __cdecl cwait (int*, pid_t, int); -_CRTIMP pid_t __cdecl getpid (void); -_CRTIMP int __cdecl execl (const char*, const char*, ...); -_CRTIMP int __cdecl execle (const char*, const char*, ...); -_CRTIMP int __cdecl execlp (const char*, const char*, ...); -_CRTIMP int __cdecl execlpe (const char*, const char*, ...); -_CRTIMP int __cdecl execv (const char*, const char* const*); -_CRTIMP int __cdecl execve (const char*, const char* const*, const char* const*); -_CRTIMP int __cdecl execvp (const char*, const char* const*); -_CRTIMP int __cdecl execvpe (const char*, const char* const*, const char* const*); -_CRTIMP int __cdecl spawnl (int, const char*, const char*, ...); -_CRTIMP int __cdecl spawnle (int, const char*, const char*, ...); -_CRTIMP int __cdecl spawnlp (int, const char*, const char*, ...); -_CRTIMP int __cdecl spawnlpe (int, const char*, const char*, ...); -_CRTIMP int __cdecl spawnv (int, const char*, const char* const*); -_CRTIMP int __cdecl spawnve (int, const char*, const char* const*, const char* const*); -_CRTIMP int __cdecl spawnvp (int, const char*, const char* const*); -_CRTIMP int __cdecl spawnvpe (int, const char*, const char* const*, const char* const*); +_CRTIMP int __cdecl __MINGW_NOTHROW cwait (int*, pid_t, int); +_CRTIMP pid_t __cdecl __MINGW_NOTHROW getpid (void); +_CRTIMP int __cdecl __MINGW_NOTHROW execl (const char*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW execle (const char*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW execlp (const char*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW execlpe (const char*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW execv (const char*, const char* const*); +_CRTIMP int __cdecl __MINGW_NOTHROW execve (const char*, const char* const*, const char* const*); +_CRTIMP int __cdecl __MINGW_NOTHROW execvp (const char*, const char* const*); +_CRTIMP int __cdecl __MINGW_NOTHROW execvpe (const char*, const char* const*, const char* const*); +_CRTIMP int __cdecl __MINGW_NOTHROW spawnl (int, const char*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW spawnle (int, const char*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW spawnlp (int, const char*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW spawnlpe (int, const char*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW spawnv (int, const char*, const char* const*); +_CRTIMP int __cdecl __MINGW_NOTHROW spawnve (int, const char*, const char* const*, const char* const*); +_CRTIMP int __cdecl __MINGW_NOTHROW spawnvp (int, const char*, const char* const*); +_CRTIMP int __cdecl __MINGW_NOTHROW spawnvpe (int, const char*, const char* const*, const char* const*); #endif /* Not _NO_OLDNAMES */ #ifdef __cplusplus diff --git a/reactos/include/crt/search.h b/reactos/include/crt/search.h index 1b80a1e6a14..fc6ffc387da 100644 --- a/reactos/include/crt/search.h +++ b/reactos/include/crt/search.h @@ -47,6 +47,48 @@ _CRTIMP void* __cdecl _lfind (const void*, const void*, unsigned int*, unsigned int, int (*)(const void*, const void*)); _CRTIMP void* __cdecl _lsearch (const void*, void*, unsigned int*, unsigned int, int (*)(const void*, const void*)); +/* +Documentation for these POSIX definitions and prototypes can be found in +The Open Group Base Specifications Issue 6 +IEEE Std 1003.1, 2004 Edition. +eg: http://www.opengroup.org/onlinepubs/009695399/functions/twalk.html +*/ + + +typedef struct entry { + char *key; + void *data; +} ENTRY; + +typedef enum { + FIND, + ENTER +} ACTION; + +typedef enum { + preorder, + postorder, + endorder, + leaf +} VISIT; + +#ifdef _SEARCH_PRIVATE +typedef struct node { + char *key; + struct node *llink, *rlink; +} node_t; +#endif + +void * __cdecl tdelete (const void * __restrict__, void ** __restrict__, + int (*)(const void *, const void *)) + __MINGW_ATTRIB_NONNULL (1) __MINGW_ATTRIB_NONNULL (3); +void * __cdecl tfind (const void *, void * const *, + int (*)(const void *, const void *)) + __MINGW_ATTRIB_NONNULL (1) __MINGW_ATTRIB_NONNULL (3); +void * __cdecl tsearch (const void *, void **, + int (*)(const void *, const void *)) + __MINGW_ATTRIB_NONNULL (1) __MINGW_ATTRIB_NONNULL (3); +void __cdecl twalk (const void *, void (*)(const void *, VISIT, int)); #ifndef _NO_OLDNAMES _CRTIMP void* __cdecl lfind (const void*, const void*, unsigned int*, diff --git a/reactos/include/crt/setjmp.h b/reactos/include/crt/setjmp.h index b170f43c445..f83e1c01220 100644 --- a/reactos/include/crt/setjmp.h +++ b/reactos/include/crt/setjmp.h @@ -36,7 +36,7 @@ typedef _JBTYPE jmp_buf[_JBLEN]; * The function provided by CRTDLL which appears to do the actual work * of setjmp. */ -_CRTIMP int __cdecl _setjmp (jmp_buf); +_CRTIMP int __cdecl __MINGW_NOTHROW _setjmp (jmp_buf); #define setjmp(x) _setjmp(x) @@ -44,7 +44,7 @@ _CRTIMP int __cdecl _setjmp (jmp_buf); * Return to the last setjmp call and act as if setjmp had returned * nVal (which had better be non-zero!). */ -_CRTIMP void __cdecl longjmp (jmp_buf, int) __MINGW_ATTRIB_NORETURN; +_CRTIMP void __cdecl __MINGW_NOTHROW longjmp (jmp_buf, int) __MINGW_ATTRIB_NORETURN; #ifdef __cplusplus } @@ -54,3 +54,4 @@ _CRTIMP void __cdecl longjmp (jmp_buf, int) __MINGW_ATTRIB_NORETURN; #endif /* Not _SETJMP_H_ */ + diff --git a/reactos/include/crt/signal.h b/reactos/include/crt/signal.h index b142fd26190..18a75e384f2 100644 --- a/reactos/include/crt/signal.h +++ b/reactos/include/crt/signal.h @@ -81,12 +81,12 @@ extern "C" { * previous handler, or SIG_ERR if an error occurs. Initially * unhandled signals defined above will return SIG_DFL. */ -_CRTIMP __p_sig_fn_t __cdecl signal(int, __p_sig_fn_t); +_CRTIMP __p_sig_fn_t __cdecl __MINGW_NOTHROW signal(int, __p_sig_fn_t); /* * Raise the signal indicated by sig. Returns non-zero on success. */ -_CRTIMP int __cdecl raise (int); +_CRTIMP int __cdecl __MINGW_NOTHROW raise (int); #ifdef __cplusplus } @@ -96,3 +96,4 @@ _CRTIMP int __cdecl raise (int); #endif /* Not _SIGNAL_H_ */ + diff --git a/reactos/include/crt/stdint.h b/reactos/include/crt/stdint.h index 2d8e0d851a1..57db989cdae 100644 --- a/reactos/include/crt/stdint.h +++ b/reactos/include/crt/stdint.h @@ -43,9 +43,9 @@ typedef unsigned uint_least32_t; typedef long long int_least64_t; typedef unsigned long long uint_least64_t; -/* 7.18.1.3 Fastest minimum-width integer types +/* 7.18.1.3 Fastest minimum-width integer types * Not actually guaranteed to be fastest for all purposes - * Here we use the exact-width types for 8 and 16-bit ints. + * Here we use the exact-width types for 8 and 16-bit ints. */ typedef char int_fast8_t; typedef unsigned char uint_fast8_t; @@ -57,18 +57,34 @@ typedef long long int_fast64_t; typedef unsigned long long uint_fast64_t; /* 7.18.1.4 Integer types capable of holding object pointers */ -typedef int intptr_t; -typedef unsigned uintptr_t; + +#ifndef _INTPTR_T_DEFINED +#define _INTPTR_T_DEFINED +#ifdef _WIN64 + typedef __int64 intptr_t; +#else + typedef int intptr_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 /* 7.18.1.5 Greatest-width integer types */ typedef long long intmax_t; -typedef unsigned long long uintmax_t; +typedef unsigned long long uintmax_t; /* 7.18.2 Limits of specified-width integer types */ #if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS) /* 7.18.2.1 Limits of exact-width integer types */ -#define INT8_MIN (-128) +#define INT8_MIN (-128) #define INT16_MIN (-32768) #define INT32_MIN (-2147483647 - 1) #define INT64_MIN (-9223372036854775807LL - 1) @@ -117,9 +133,15 @@ typedef unsigned long long uintmax_t; /* 7.18.2.4 Limits of integer types capable of holding object pointers */ +#ifdef _WIN64 +#define INTPTR_MIN INT64_MIN +#define INTPTR_MAX INT64_MAX +#define UINTPTR_MAX UINT64_MAX +#else #define INTPTR_MIN INT32_MIN #define INTPTR_MAX INT32_MAX #define UINTPTR_MAX UINT32_MAX +#endif /* 7.18.2.5 Limits of greatest-width integer types */ #define INTMAX_MIN INT64_MIN @@ -127,15 +149,15 @@ typedef unsigned long long uintmax_t; #define UINTMAX_MAX UINT64_MAX /* 7.18.3 Limits of other integer types */ -#define PTRDIFF_MIN INT32_MIN -#define PTRDIFF_MAX INT32_MAX +#define PTRDIFF_MIN INTPTR_MIN +#define PTRDIFF_MAX INTPTR_MAX -#define SIG_ATOMIC_MIN INT32_MIN -#define SIG_ATOMIC_MAX INT32_MAX +#define SIG_ATOMIC_MIN INTPTR_MIN +#define SIG_ATOMIC_MAX INTPTR_MAX -#define SIZE_MAX UINT32_MAX +#define SIZE_MAX UINTPTR_MAX -#ifndef WCHAR_MIN /* also in wchar.h */ +#ifndef WCHAR_MIN /* also in wchar.h */ #define WCHAR_MIN 0 #define WCHAR_MAX 0xffff /* UINT16_MAX */ #endif diff --git a/reactos/include/crt/stdio.h b/reactos/include/crt/stdio.h index 8e12777dfd1..90011fed757 100644 --- a/reactos/include/crt/stdio.h +++ b/reactos/include/crt/stdio.h @@ -166,54 +166,53 @@ extern "C" { /* * File Operations */ -_CRTIMP FILE* __cdecl fopen (const char*, const char*); -_CRTIMP FILE* __cdecl freopen (const char*, const char*, FILE*); -_CRTIMP int __cdecl fflush (FILE*); -_CRTIMP int __cdecl fclose (FILE*); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW fopen (const char*, const char*); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW freopen (const char*, const char*, FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW fflush (FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW fclose (FILE*); /* MS puts remove & rename (but not wide versions) in io.h also */ -_CRTIMP int __cdecl remove (const char*); -_CRTIMP int __cdecl rename (const char*, const char*); -_CRTIMP FILE* __cdecl tmpfile (void); -_CRTIMP char* __cdecl tmpnam (char*); +_CRTIMP int __cdecl __MINGW_NOTHROW remove (const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW rename (const char*, const char*); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW tmpfile (void); +_CRTIMP char* __cdecl __MINGW_NOTHROW tmpnam (char*); #ifndef __STRICT_ANSI__ -_CRTIMP char* __cdecl _tempnam (const char*, const char*); -_CRTIMP int __cdecl _rmtmp(void); -_CRTIMP int __cdecl _unlink (const char*); +_CRTIMP char* __cdecl __MINGW_NOTHROW _tempnam (const char*, const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _rmtmp(void); +_CRTIMP int __cdecl __MINGW_NOTHROW _unlink (const char*); #ifndef NO_OLDNAMES -_CRTIMP char* __cdecl tempnam (const char*, const char*); -_CRTIMP int __cdecl rmtmp(void); -_CRTIMP int __cdecl unlink (const char*); +_CRTIMP char* __cdecl __MINGW_NOTHROW tempnam (const char*, const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW rmtmp(void); +_CRTIMP int __cdecl __MINGW_NOTHROW unlink (const char*); #endif #endif /* __STRICT_ANSI__ */ -_CRTIMP int __cdecl setvbuf (FILE*, char*, int, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW setvbuf (FILE*, char*, int, size_t); -_CRTIMP void __cdecl setbuf (FILE*, char*); +_CRTIMP void __cdecl __MINGW_NOTHROW setbuf (FILE*, char*); /* * Formatted Output */ -_CRTIMP int __cdecl fprintf (FILE*, const char*, ...); -_CRTIMP int __cdecl printf (const char*, ...); -_CRTIMP int __cdecl sprintf (char*, const char*, ...); -_CRTIMP int __cdecl _snprintf (char*, size_t, const char*, ...); -_CRTIMP int __cdecl vfprintf (FILE*, const char*, __VALIST); -_CRTIMP int __cdecl vprintf (const char*, __VALIST); -_CRTIMP int __cdecl vsprintf (char*, const char*, __VALIST); -_CRTIMP int __cdecl _vsnprintf (char*, size_t, const char*, __VALIST); +_CRTIMP int __cdecl __MINGW_NOTHROW fprintf (FILE*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW printf (const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW sprintf (char*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW _snprintf (char*, size_t, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW vfprintf (FILE*, const char*, __VALIST); +_CRTIMP int __cdecl __MINGW_NOTHROW vprintf (const char*, __VALIST); +_CRTIMP int __cdecl __MINGW_NOTHROW vsprintf (char*, const char*, __VALIST); +_CRTIMP int __cdecl __MINGW_NOTHROW _vsnprintf (char*, size_t, const char*, __VALIST); #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, __VALIST arg) - { return _vsnprintf ( s, n, format, arg); } -int __cdecl vscanf (const char * __restrict__, __VALIST); -int __cdecl vfscanf (FILE * __restrict__, const char * __restrict__, +int __cdecl __MINGW_NOTHROW snprintf(char *, size_t, const char *, ...); +int __cdecl __MINGW_NOTHROW vsnprintf (char *, size_t, const char *, __VALIST); + +int __cdecl __MINGW_NOTHROW vscanf (const char * __restrict__, __VALIST); +int __cdecl __MINGW_NOTHROW vfscanf (FILE * __restrict__, const char * __restrict__, __VALIST); -int __cdecl vsscanf (const char * __restrict__, +int __cdecl __MINGW_NOTHROW vsscanf (const char * __restrict__, const char * __restrict__, __VALIST); #endif @@ -221,20 +220,20 @@ int __cdecl vsscanf (const char * __restrict__, * Formatted Input */ -_CRTIMP int __cdecl fscanf (FILE*, const char*, ...); -_CRTIMP int __cdecl scanf (const char*, ...); -_CRTIMP int __cdecl sscanf (const char*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW fscanf (FILE*, const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW scanf (const char*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW sscanf (const char*, const char*, ...); /* * Character Input and Output Functions */ -_CRTIMP int __cdecl fgetc (FILE*); -_CRTIMP char* __cdecl fgets (char*, int, FILE*); -_CRTIMP int __cdecl fputc (int, FILE*); -_CRTIMP int __cdecl fputs (const char*, FILE*); -_CRTIMP char* __cdecl gets (char*); -_CRTIMP int __cdecl puts (const char*); -_CRTIMP int __cdecl ungetc (int, FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW fgetc (FILE*); +_CRTIMP char* __cdecl __MINGW_NOTHROW fgets (char*, int, FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW fputc (int, FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW fputs (const char*, FILE*); +_CRTIMP char* __cdecl __MINGW_NOTHROW gets (char*); +_CRTIMP int __cdecl __MINGW_NOTHROW puts (const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW ungetc (int, FILE*); /* Traditionally, getc and putc are defined as macros. but the standard doesn't say that they must be macros. @@ -242,33 +241,33 @@ _CRTIMP int __cdecl ungetc (int, FILE*); to be used in C++ with namespace qualification, eg., ::getc. _filbuf and _flsbuf are not thread-safe. */ -_CRTIMP int __cdecl _filbuf (FILE*); -_CRTIMP int __cdecl _flsbuf (int, FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW _filbuf (FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW _flsbuf (int, FILE*); #if !defined _MT -__CRT_INLINE int __cdecl getc (FILE* __F) +__CRT_INLINE int __cdecl __MINGW_NOTHROW getc (FILE* __F) { return (--__F->_cnt >= 0) ? (int) (unsigned char) *__F->_ptr++ : _filbuf (__F); } -__CRT_INLINE int __cdecl putc (int __c, FILE* __F) +__CRT_INLINE int __cdecl __MINGW_NOTHROW putc (int __c, FILE* __F) { return (--__F->_cnt >= 0) ? (int) (unsigned char) (*__F->_ptr++ = (char)__c) : _flsbuf (__c, __F); } -__CRT_INLINE int __cdecl getchar (void) +__CRT_INLINE int __cdecl __MINGW_NOTHROW getchar (void) { return (--stdin->_cnt >= 0) ? (int) (unsigned char) *stdin->_ptr++ : _filbuf (stdin); } -__CRT_INLINE int __cdecl putchar(int __c) +__CRT_INLINE int __cdecl __MINGW_NOTHROW putchar(int __c) { return (--stdout->_cnt >= 0) ? (int) (unsigned char) (*stdout->_ptr++ = (char)__c) @@ -276,10 +275,10 @@ __CRT_INLINE int __cdecl putchar(int __c) #else /* Use library functions. */ -_CRTIMP int __cdecl getc (FILE*); -_CRTIMP int __cdecl putc (int, FILE*); -_CRTIMP int __cdecl getchar (void); -_CRTIMP int __cdecl putchar (int); +_CRTIMP int __cdecl __MINGW_NOTHROW getc (FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW putc (int, FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW getchar (void); +_CRTIMP int __cdecl __MINGW_NOTHROW putchar (int); #endif @@ -287,25 +286,25 @@ _CRTIMP int __cdecl putchar (int); * Direct Input and Output Functions */ -_CRTIMP size_t __cdecl fread (void*, size_t, size_t, FILE*); -_CRTIMP size_t __cdecl fwrite (const void*, size_t, size_t, FILE*); +_CRTIMP size_t __cdecl __MINGW_NOTHROW fread (void*, size_t, size_t, FILE*); +_CRTIMP size_t __cdecl __MINGW_NOTHROW fwrite (const void*, size_t, size_t, FILE*); /* * File Positioning Functions */ -_CRTIMP int __cdecl fseek (FILE*, long, int); -_CRTIMP long __cdecl ftell (FILE*); -_CRTIMP void __cdecl rewind (FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW fseek (FILE*, long, int); +_CRTIMP long __cdecl __MINGW_NOTHROW ftell (FILE*); +_CRTIMP void __cdecl __MINGW_NOTHROW rewind (FILE*); #if __MSVCRT_VERSION__ >= 0x800 -_CRTIMP int __cdecl _fseek_nolock (FILE*, long, int); -_CRTIMP long __cdecl _ftell_nolock (FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW _fseek_nolock (FILE*, long, int); +_CRTIMP long __cdecl __MINGW_NOTHROW _ftell_nolock (FILE*); -_CRTIMP int __cdecl _fseeki64 (FILE*, __int64, int); -_CRTIMP __int64 __cdecl _ftelli64 (FILE*); -_CRTIMP int __cdecl _fseeki64_nolock (FILE*, __int64, int); -_CRTIMP __int64 __cdecl _ftelli64_nolock (FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW _fseeki64 (FILE*, __int64, int); +_CRTIMP __int64 __cdecl __MINGW_NOTHROW _ftelli64 (FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW _fseeki64_nolock (FILE*, __int64, int); +_CRTIMP __int64 __cdecl __MINGW_NOTHROW _ftelli64_nolock (FILE*); #endif #ifdef __USE_MINGW_FSEEK /* These are in libmingwex.a */ @@ -314,8 +313,8 @@ _CRTIMP __int64 __cdecl _ftelli64_nolock (FILE*); * not zero'd out if you seek past the end and then write. */ -int __cdecl __mingw_fseek (FILE *, long, int); -size_t __cdecl __mingw_fwrite (const void*, size_t, size_t, FILE*); +int __cdecl __MINGW_NOTHROW __mingw_fseek (FILE *, long, int); +size_t __cdecl __MINGW_NOTHROW __mingw_fwrite (const void*, size_t, size_t, FILE*); #define fseek(fp, offset, whence) __mingw_fseek(fp, offset, whence) #define fwrite(buffer, size, count, fp) __mingw_fwrite(buffer, size, count, fp) #endif /* __USE_MINGW_FSEEK */ @@ -335,67 +334,67 @@ typedef long long fpos_t; typedef long fpos_t; #endif -_CRTIMP int __cdecl fgetpos (FILE*, fpos_t*); -_CRTIMP int __cdecl fsetpos (FILE*, const fpos_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW fgetpos (FILE*, fpos_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW fsetpos (FILE*, const fpos_t*); /* * Error Functions */ -_CRTIMP int __cdecl feof (FILE*); -_CRTIMP int __cdecl ferror (FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW feof (FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW ferror (FILE*); #ifdef __cplusplus -inline int __cdecl feof (FILE* __F) +inline int __cdecl __MINGW_NOTHROW feof (FILE* __F) { return __F->_flag & _IOEOF; } -inline int __cdecl ferror (FILE* __F) +inline int __cdecl __MINGW_NOTHROW ferror (FILE* __F) { return __F->_flag & _IOERR; } #else #define feof(__F) ((__F)->_flag & _IOEOF) #define ferror(__F) ((__F)->_flag & _IOERR) #endif -_CRTIMP void __cdecl clearerr (FILE*); -_CRTIMP void __cdecl perror (const char*); +_CRTIMP void __cdecl __MINGW_NOTHROW clearerr (FILE*); +_CRTIMP void __cdecl __MINGW_NOTHROW perror (const char*); #ifndef __STRICT_ANSI__ /* * Pipes */ -_CRTIMP FILE* __cdecl _popen (const char*, const char*); -_CRTIMP int __cdecl _pclose (FILE*); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW _popen (const char*, const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _pclose (FILE*); #ifndef NO_OLDNAMES -_CRTIMP FILE* __cdecl popen (const char*, const char*); -_CRTIMP int __cdecl pclose (FILE*); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW popen (const char*, const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW pclose (FILE*); #endif /* * Other Non ANSI functions */ -_CRTIMP int __cdecl _flushall (void); -_CRTIMP int __cdecl _fgetchar (void); -_CRTIMP int __cdecl _fputchar (int); -_CRTIMP FILE* __cdecl _fdopen (int, const char*); -_CRTIMP int __cdecl _fileno (FILE*); -_CRTIMP int __cdecl _fcloseall(void); -_CRTIMP FILE* __cdecl _fsopen(const char*, const char*, int); +_CRTIMP int __cdecl __MINGW_NOTHROW _flushall (void); +_CRTIMP int __cdecl __MINGW_NOTHROW _fgetchar (void); +_CRTIMP int __cdecl __MINGW_NOTHROW _fputchar (int); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW _fdopen (int, const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _fileno (FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW _fcloseall(void); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW _fsopen(const char*, const char*, int); #ifdef __MSVCRT__ -_CRTIMP int __cdecl _getmaxstdio(void); -_CRTIMP int __cdecl _setmaxstdio(int); +_CRTIMP int __cdecl __MINGW_NOTHROW _getmaxstdio(void); +_CRTIMP int __cdecl __MINGW_NOTHROW _setmaxstdio(int); #endif #if __MSVCRT_VERSION__ >= 0x800 -_CRTIMP int __cdecl _set_printf_count_output(int); -_CRTIMP int __cdecl _get_printf_count_output(void); +_CRTIMP int __cdecl __MINGW_NOTHROW _set_printf_count_output(int); +_CRTIMP int __cdecl __MINGW_NOTHROW _get_printf_count_output(void); #endif #ifndef _NO_OLDNAMES -_CRTIMP int __cdecl fgetchar (void); -_CRTIMP int __cdecl fputchar (int); -_CRTIMP FILE* __cdecl fdopen (int, const char*); -_CRTIMP int __cdecl fileno (FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW fgetchar (void); +_CRTIMP int __cdecl __MINGW_NOTHROW fputchar (int); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW fdopen (int, const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW fileno (FILE*); #endif /* Not _NO_OLDNAMES */ #define _fileno(__F) ((__F)->_file) @@ -405,19 +404,19 @@ _CRTIMP int __cdecl fileno (FILE*); #if defined (__MSVCRT__) && !defined (__NO_MINGW_LFS) #include -__CRT_INLINE FILE* __cdecl fopen64 (const char* filename, const char* mode) +__CRT_INLINE FILE* __cdecl __MINGW_NOTHROW fopen64 (const char* filename, const char* mode) { return fopen (filename, mode); } -int __cdecl fseeko64 (FILE*, off64_t, int); +int __cdecl __MINGW_NOTHROW fseeko64 (FILE*, off64_t, int); #ifdef __USE_MINGW_FSEEK -int __cdecl __mingw_fseeko64 (FILE *, off64_t, int); +int __cdecl __MINGW_NOTHROW __mingw_fseeko64 (FILE *, off64_t, int); #define fseeko64(fp, offset, whence) __mingw_fseeko64(fp, offset, whence) #endif -__CRT_INLINE off64_t __cdecl ftello64 (FILE * stream) +__CRT_INLINE off64_t __cdecl __MINGW_NOTHROW ftello64 (FILE * stream) { fpos_t pos; if (fgetpos(stream, &pos)) @@ -433,51 +432,51 @@ __CRT_INLINE off64_t __cdecl ftello64 (FILE * stream) #ifndef _WSTDIO_DEFINED /* also in wchar.h - keep in sync */ -_CRTIMP int __cdecl fwprintf (FILE*, const wchar_t*, ...); -_CRTIMP int __cdecl wprintf (const wchar_t*, ...); -_CRTIMP int __cdecl swprintf (wchar_t*, const wchar_t*, ...); -_CRTIMP int __cdecl _snwprintf (wchar_t*, size_t, const wchar_t*, ...); -_CRTIMP int __cdecl vfwprintf (FILE*, const wchar_t*, __VALIST); -_CRTIMP int __cdecl vwprintf (const wchar_t*, __VALIST); -_CRTIMP int __cdecl vswprintf (wchar_t*, const wchar_t*, __VALIST); -_CRTIMP int __cdecl _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST); -_CRTIMP int __cdecl fwscanf (FILE*, const wchar_t*, ...); -_CRTIMP int __cdecl wscanf (const wchar_t*, ...); -_CRTIMP int __cdecl swscanf (const wchar_t*, const wchar_t*, ...); -_CRTIMP wint_t __cdecl fgetwc (FILE*); -_CRTIMP wint_t __cdecl fputwc (wchar_t, FILE*); -_CRTIMP wint_t __cdecl ungetwc (wchar_t, FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW fwprintf (FILE*, const wchar_t*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW wprintf (const wchar_t*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW swprintf (wchar_t*, const wchar_t*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW _snwprintf (wchar_t*, size_t, const wchar_t*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW vfwprintf (FILE*, const wchar_t*, __VALIST); +_CRTIMP int __cdecl __MINGW_NOTHROW vwprintf (const wchar_t*, __VALIST); +_CRTIMP int __cdecl __MINGW_NOTHROW vswprintf (wchar_t*, const wchar_t*, __VALIST); +_CRTIMP int __cdecl __MINGW_NOTHROW _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST); +_CRTIMP int __cdecl __MINGW_NOTHROW fwscanf (FILE*, const wchar_t*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW wscanf (const wchar_t*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW swscanf (const wchar_t*, const wchar_t*, ...); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW fgetwc (FILE*); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW fputwc (wchar_t, FILE*); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW ungetwc (wchar_t, FILE*); #ifdef __MSVCRT__ -_CRTIMP wchar_t* __cdecl fgetws (wchar_t*, int, FILE*); -_CRTIMP int __cdecl fputws (const wchar_t*, FILE*); -_CRTIMP wint_t __cdecl getwc (FILE*); -_CRTIMP wint_t __cdecl getwchar (void); -_CRTIMP wchar_t* __cdecl _getws (wchar_t*); -_CRTIMP wint_t __cdecl putwc (wint_t, FILE*); -_CRTIMP int __cdecl _putws (const wchar_t*); -_CRTIMP wint_t __cdecl putwchar (wint_t); -_CRTIMP FILE* __cdecl _wfdopen(int, wchar_t *); -_CRTIMP FILE* __cdecl _wfopen (const wchar_t*, const wchar_t*); -_CRTIMP FILE* __cdecl _wfreopen (const wchar_t*, const wchar_t*, FILE*); -_CRTIMP FILE* __cdecl _wfsopen (const wchar_t*, const wchar_t*, int); -_CRTIMP wchar_t* __cdecl _wtmpnam (wchar_t*); -_CRTIMP wchar_t* __cdecl _wtempnam (const wchar_t*, const wchar_t*); -_CRTIMP int __cdecl _wrename (const wchar_t*, const wchar_t*); -_CRTIMP int __cdecl _wremove (const wchar_t*); -_CRTIMP void __cdecl _wperror (const wchar_t*); -_CRTIMP FILE* __cdecl _wpopen (const wchar_t*, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW fgetws (wchar_t*, int, FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW fputws (const wchar_t*, FILE*); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW getwc (FILE*); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW getwchar (void); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _getws (wchar_t*); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwc (wint_t, FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW _putws (const wchar_t*); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwchar (wint_t); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfdopen(int, wchar_t *); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfopen (const wchar_t*, const wchar_t*); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfreopen (const wchar_t*, const wchar_t*, FILE*); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfsopen (const wchar_t*, const wchar_t*, int); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtmpnam (wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtempnam (const wchar_t*, const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wrename (const wchar_t*, const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wremove (const wchar_t*); +_CRTIMP void __cdecl __MINGW_NOTHROW _wperror (const wchar_t*); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wpopen (const wchar_t*, const wchar_t*); #endif /* __MSVCRT__ */ #ifndef __NO_ISOCEXT /* externs in libmingwex.a */ -int __cdecl snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...); -__CRT_INLINE int __cdecl +int __cdecl __MINGW_NOTHROW snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...); +__CRT_INLINE int __cdecl __MINGW_NOTHROW vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg) { return _vsnwprintf ( s, n, format, arg);} -int __cdecl vwscanf (const wchar_t * __restrict__, __VALIST); -int __cdecl vfwscanf (FILE * __restrict__, +int __cdecl __MINGW_NOTHROW vwscanf (const wchar_t * __restrict__, __VALIST); +int __cdecl __MINGW_NOTHROW vfwscanf (FILE * __restrict__, const wchar_t * __restrict__, __VALIST); -int __cdecl vswscanf (const wchar_t * __restrict__, +int __cdecl __MINGW_NOTHROW vswscanf (const wchar_t * __restrict__, const wchar_t * __restrict__, __VALIST); #endif @@ -487,23 +486,23 @@ int __cdecl vswscanf (const wchar_t * __restrict__, #ifndef __STRICT_ANSI__ #ifdef __MSVCRT__ #ifndef NO_OLDNAMES -_CRTIMP FILE* __cdecl wpopen (const wchar_t*, const wchar_t*); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW wpopen (const wchar_t*, const wchar_t*); #endif /* not NO_OLDNAMES */ #endif /* MSVCRT runtime */ /* * Other Non ANSI wide functions */ -_CRTIMP wint_t __cdecl _fgetwchar (void); -_CRTIMP wint_t __cdecl _fputwchar (wint_t); -_CRTIMP int __cdecl _getw (FILE*); -_CRTIMP int __cdecl _putw (int, FILE*); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW _fgetwchar (void); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW _fputwchar (wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW _getw (FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW _putw (int, FILE*); #ifndef _NO_OLDNAMES -_CRTIMP wint_t __cdecl fgetwchar (void); -_CRTIMP wint_t __cdecl fputwchar (wint_t); -_CRTIMP int __cdecl getw (FILE*); -_CRTIMP int __cdecl putw (int, FILE*); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW fgetwchar (void); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW fputwchar (wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW getw (FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW putw (int, FILE*); #endif /* Not _NO_OLDNAMES */ #endif /* __STRICT_ANSI */ diff --git a/reactos/include/crt/stdlib.h b/reactos/include/crt/stdlib.h index f6ece9a4c09..df8a487f0a1 100644 --- a/reactos/include/crt/stdlib.h +++ b/reactos/include/crt/stdlib.h @@ -21,8 +21,6 @@ #include #endif /* RC_INVOKED */ -#include /* For uintptr_t */ - /* * RAND_MAX is the maximum value that may be returned by rand. * The minimum is zero. @@ -76,9 +74,9 @@ extern char** _argv; /* imports from runtime dll of the above variables */ #ifdef __MSVCRT__ -extern int* __cdecl __p___argc(void); -extern char*** __cdecl __p___argv(void); -extern wchar_t*** __cdecl __p___wargv(void); +extern int* __cdecl __MINGW_NOTHROW __p___argc(void); +extern char*** __cdecl __MINGW_NOTHROW __p___argv(void); +extern wchar_t*** __cdecl __MINGW_NOTHROW __p___wargv(void); #define __argc (*__p___argc()) #define __argv (*__p___argv()) @@ -128,28 +126,28 @@ __MINGW_IMPORT char** __argv_dll; #endif /* __DECLSPEC_SUPPORTED */ #endif /* MB_CUR_MAX */ -/* - * MS likes to declare errno in stdlib.h as well. +/* + * MS likes to declare errno in stdlib.h as well. */ #ifdef _UWIN #undef errno extern int errno; #else - _CRTIMP int* __cdecl _errno(void); + _CRTIMP int* __cdecl __MINGW_NOTHROW _errno(void); #define errno (*_errno()) #endif - _CRTIMP int* __cdecl __doserrno(void); + _CRTIMP int* __cdecl __MINGW_NOTHROW __doserrno(void); #define _doserrno (*__doserrno()) #if !defined (__STRICT_ANSI__) /* - * Use environ from the DLL, not as a global. + * Use environ from the DLL, not as a global. */ #ifdef __MSVCRT__ - extern _CRTIMP char *** __cdecl __p__environ(void); - extern _CRTIMP wchar_t *** __cdecl __p__wenviron(void); + extern _CRTIMP char *** __cdecl __MINGW_NOTHROW __p__environ(void); + extern _CRTIMP wchar_t *** __cdecl __MINGW_NOTHROW __p__wenviron(void); # define _environ (*__p__environ()) # define _wenviron (*__p__wenviron()) #else /* ! __MSVCRT__ */ @@ -208,10 +206,10 @@ __MINGW_IMPORT char* _sys_errlist[]; #ifdef __MSVCRT__ /* msvcrtxx.dll */ -extern _CRTIMP unsigned __cdecl int* __p__osver(void); -extern _CRTIMP unsigned __cdecl int* __p__winver(void); -extern _CRTIMP unsigned __cdecl int* __p__winmajor(void); -extern _CRTIMP unsigned __cdecl int* __p__winminor(void); +extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int* __p__osver(void); +extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int* __p__winver(void); +extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int* __p__winmajor(void); +extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int* __p__winminor(void); #ifndef __DECLSPEC_SUPPORTED # define _osver (*__p__osver()) @@ -259,9 +257,9 @@ __MINGW_IMPORT unsigned int _winminor_dll; #if defined __MSVCRT__ /* although the _pgmptr is exported as DATA, * be safe and use the access function __p__pgmptr() to get it. */ -_CRTIMP char** __cdecl __p__pgmptr(void); +_CRTIMP char** __cdecl __MINGW_NOTHROW __p__pgmptr(void); #define _pgmptr (*__p__pgmptr()) -_CRTIMP wchar_t** __cdecl __p__wpgmptr(void); +_CRTIMP wchar_t** __cdecl __MINGW_NOTHROW __p__wpgmptr(void); #define _wpgmptr (*__p__wpgmptr()) #else /* ! __MSVCRT__ */ # ifndef __DECLSPEC_SUPPORTED @@ -302,66 +300,74 @@ __MINGW_IMPORT int _fmode_dll; #endif /* Not __STRICT_ANSI__ */ -_CRTIMP double __cdecl atof (const char*); -_CRTIMP int __cdecl atoi (const char*); -_CRTIMP long __cdecl atol (const char*); +_CRTIMP double __cdecl __MINGW_NOTHROW atof (const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW atoi (const char*); +_CRTIMP long __cdecl __MINGW_NOTHROW atol (const char*); #if !defined (__STRICT_ANSI__) -_CRTIMP int __cdecl _wtoi (const wchar_t *); -_CRTIMP long __cdecl _wtol (const wchar_t *); +_CRTIMP int __cdecl __MINGW_NOTHROW _wtoi (const wchar_t *); +_CRTIMP long __cdecl __MINGW_NOTHROW _wtol (const wchar_t *); #endif -_CRTIMP double __cdecl strtod (const char*, char**); +_CRTIMP double __cdecl __MINGW_NOTHROW strtod (const char*, char**); #if !defined __NO_ISOCEXT /* in libmingwex.a */ -float __cdecl strtof (const char * __restrict__, char ** __restrict__); -long double __cdecl strtold (const char * __restrict__, char ** __restrict__); +float __cdecl __MINGW_NOTHROW strtof (const char * __restrict__, char ** __restrict__); +long double __cdecl __MINGW_NOTHROW strtold (const char * __restrict__, char ** __restrict__); #endif /* __NO_ISOCEXT */ -_CRTIMP long __cdecl strtol (const char*, char**, int); -_CRTIMP unsigned long __cdecl strtoul (const char*, char**, int); +_CRTIMP long __cdecl __MINGW_NOTHROW strtol (const char*, char**, int); +_CRTIMP unsigned long __cdecl __MINGW_NOTHROW strtoul (const char*, char**, int); #ifndef _WSTDLIB_DEFINED /* also declared in wchar.h */ -_CRTIMP double __cdecl wcstod (const wchar_t*, wchar_t**); +_CRTIMP long __cdecl __MINGW_NOTHROW wcstol (const wchar_t*, wchar_t**, int); +_CRTIMP unsigned long __cdecl __MINGW_NOTHROW wcstoul (const wchar_t*, wchar_t**, int); +_CRTIMP double __cdecl __MINGW_NOTHROW wcstod (const wchar_t*, wchar_t**); #if !defined __NO_ISOCEXT /* in libmingwex.a */ -float __cdecl wcstof( const wchar_t * __restrict__, wchar_t ** __restrict__); -long double __cdecl wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__); +float __cdecl __MINGW_NOTHROW wcstof( const wchar_t * __restrict__, wchar_t ** __restrict__); +long double __cdecl __MINGW_NOTHROW wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__); #endif /* __NO_ISOCEXT */ - -_CRTIMP long __cdecl wcstol (const wchar_t*, wchar_t**, int); -_CRTIMP unsigned long __cdecl wcstoul (const wchar_t*, wchar_t**, int); +#ifdef __MSVCRT__ +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetenv(const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wputenv(const wchar_t*); +_CRTIMP void __cdecl __MINGW_NOTHROW _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wsystem(const wchar_t*); +_CRTIMP void __cdecl __MINGW_NOTHROW _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*); +_CRTIMP void __cdecl __MINGW_NOTHROW _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wfullpath (wchar_t*, const wchar_t*, size_t); +#endif #define _WSTDLIB_DEFINED #endif -_CRTIMP size_t __cdecl wcstombs (char*, const wchar_t*, size_t); -_CRTIMP int __cdecl wctomb (char*, wchar_t); +_CRTIMP size_t __cdecl __MINGW_NOTHROW wcstombs (char*, const wchar_t*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW wctomb (char*, wchar_t); -_CRTIMP int __cdecl mblen (const char*, size_t); -_CRTIMP size_t __cdecl mbstowcs (wchar_t*, const char*, size_t); -_CRTIMP int __cdecl mbtowc (wchar_t*, const char*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW mblen (const char*, size_t); +_CRTIMP size_t __cdecl __MINGW_NOTHROW mbstowcs (wchar_t*, const char*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW mbtowc (wchar_t*, const char*, size_t); -_CRTIMP int __cdecl rand (void); -_CRTIMP void __cdecl srand (unsigned int); +_CRTIMP int __cdecl __MINGW_NOTHROW rand (void); +_CRTIMP void __cdecl __MINGW_NOTHROW srand (unsigned int); -_CRTIMP void* __cdecl calloc (size_t, size_t) __MINGW_ATTRIB_MALLOC; -_CRTIMP void* __cdecl malloc (size_t) __MINGW_ATTRIB_MALLOC; -_CRTIMP void* __cdecl realloc (void*, size_t); -_CRTIMP void __cdecl free (void*); -_CRTIMP void __cdecl abort (void) __MINGW_ATTRIB_NORETURN; -_CRTIMP void __cdecl exit (int) __MINGW_ATTRIB_NORETURN; +_CRTIMP void* __cdecl __MINGW_NOTHROW calloc (size_t, size_t) __MINGW_ATTRIB_MALLOC; +_CRTIMP void* __cdecl __MINGW_NOTHROW malloc (size_t) __MINGW_ATTRIB_MALLOC; +_CRTIMP void* __cdecl __MINGW_NOTHROW realloc (void*, size_t); +_CRTIMP void __cdecl __MINGW_NOTHROW free (void*); +_CRTIMP void __cdecl __MINGW_NOTHROW abort (void) __MINGW_ATTRIB_NORETURN; +_CRTIMP void __cdecl __MINGW_NOTHROW exit (int) __MINGW_ATTRIB_NORETURN; /* Note: This is in startup code, not imported directly from dll */ -int __cdecl atexit (void (*)(void)); +int __cdecl __MINGW_NOTHROW atexit (void (*)(void)); -_CRTIMP int __cdecl system (const char*); -_CRTIMP char* __cdecl getenv (const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW system (const char*); +_CRTIMP char* __cdecl __MINGW_NOTHROW getenv (const char*); /* bsearch and qsort are also in non-ANSI header search.h */ -_CRTIMP void* __cdecl bsearch (const void*, const void*, size_t, size_t, - int (*)(const void*, const void*)); -_CRTIMP void __cdecl qsort (void*, size_t, size_t, - int (*)(const void*, const void*)); +_CRTIMP void* __cdecl bsearch (const void*, const void*, size_t, size_t, + int (*)(const void*, const void*)); +_CRTIMP void __cdecl qsort(void*, size_t, size_t, + int (*)(const void*, const void*)); -_CRTIMP int __cdecl abs (int) __MINGW_ATTRIB_CONST; -_CRTIMP long __cdecl labs (long) __MINGW_ATTRIB_CONST; +_CRTIMP int __cdecl __MINGW_NOTHROW abs (int) __MINGW_ATTRIB_CONST; +_CRTIMP long __cdecl __MINGW_NOTHROW labs (long) __MINGW_ATTRIB_CONST; /* * div_t and ldiv_t are structures used to return the results of div and @@ -374,8 +380,8 @@ _CRTIMP long __cdecl labs (long) __MINGW_ATTRIB_CONST; typedef struct { int quot, rem; } div_t; typedef struct { long quot, rem; } ldiv_t; -_CRTIMP div_t __cdecl div (int, int) __MINGW_ATTRIB_CONST; -_CRTIMP ldiv_t __cdecl ldiv (long, long) __MINGW_ATTRIB_CONST; +_CRTIMP div_t __cdecl __MINGW_NOTHROW div (int, int) __MINGW_ATTRIB_CONST; +_CRTIMP ldiv_t __cdecl __MINGW_NOTHROW ldiv (long, long) __MINGW_ATTRIB_CONST; #if !defined (__STRICT_ANSI__) @@ -383,65 +389,67 @@ _CRTIMP ldiv_t __cdecl ldiv (long, long) __MINGW_ATTRIB_CONST; * NOTE: Officially the three following functions are obsolete. The Win32 API * functions SetErrorMode, Beep and Sleep are their replacements. */ -_CRTIMP void __cdecl _beep (unsigned int, unsigned int) __MINGW_ATTRIB_DEPRECATED; +_CRTIMP void __cdecl __MINGW_NOTHROW _beep (unsigned int, unsigned int) __MINGW_ATTRIB_DEPRECATED; /* Not to be confused with _set_error_mode (int). */ -_CRTIMP void __cdecl _seterrormode (int) __MINGW_ATTRIB_DEPRECATED; -_CRTIMP void __cdecl _sleep (unsigned long) __MINGW_ATTRIB_DEPRECATED; +_CRTIMP void __cdecl __MINGW_NOTHROW _seterrormode (int) __MINGW_ATTRIB_DEPRECATED; +_CRTIMP void __cdecl __MINGW_NOTHROW _sleep (unsigned long) __MINGW_ATTRIB_DEPRECATED; -_CRTIMP void __cdecl _exit (int) __MINGW_ATTRIB_NORETURN; +_CRTIMP void __cdecl __MINGW_NOTHROW _exit (int) __MINGW_ATTRIB_NORETURN; /* _onexit is MS extension. Use atexit for portability. */ /* Note: This is in startup code, not imported directly from dll */ typedef int (* _onexit_t)(void); -_onexit_t __cdecl _onexit( _onexit_t ); +_onexit_t __cdecl __MINGW_NOTHROW _onexit( _onexit_t ); -_CRTIMP int __cdecl _putenv (const char*); -_CRTIMP void __cdecl _searchenv (const char*, const char*, char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _putenv (const char*); +_CRTIMP void __cdecl __MINGW_NOTHROW _searchenv (const char*, const char*, char*); -_CRTIMP char* __cdecl _ecvt (double, int, int*, int*); -_CRTIMP char* __cdecl _fcvt (double, int, int*, int*); -_CRTIMP char* __cdecl _gcvt (double, int, char*); +_CRTIMP char* __cdecl __MINGW_NOTHROW _ecvt (double, int, int*, int*); +_CRTIMP char* __cdecl __MINGW_NOTHROW _fcvt (double, int, int*, int*); +_CRTIMP char* __cdecl __MINGW_NOTHROW _gcvt (double, int, char*); -_CRTIMP void __cdecl _makepath (char*, const char*, const char*, const char*, const char*); -_CRTIMP void __cdecl _splitpath (const char*, char*, char*, char*, char*); -_CRTIMP char* __cdecl _fullpath (char*, const char*, size_t); +_CRTIMP void __cdecl __MINGW_NOTHROW _makepath (char*, const char*, const char*, const char*, const char*); +_CRTIMP void __cdecl __MINGW_NOTHROW _splitpath (const char*, char*, char*, char*, char*); +_CRTIMP char* __cdecl __MINGW_NOTHROW _fullpath (char*, const char*, size_t); -_CRTIMP char* __cdecl _itoa (int, char*, int); -_CRTIMP char* __cdecl _ltoa (long, char*, int); -_CRTIMP char* __cdecl _ultoa(unsigned long, char*, int); -_CRTIMP wchar_t* __cdecl _itow (int, wchar_t*, int); -_CRTIMP wchar_t* __cdecl _ltow (long, wchar_t*, int); -_CRTIMP wchar_t* __cdecl _ultow (unsigned long, wchar_t*, int); +_CRTIMP char* __cdecl __MINGW_NOTHROW _itoa (int, char*, int); +_CRTIMP char* __cdecl __MINGW_NOTHROW _ltoa (long, char*, int); +_CRTIMP char* __cdecl __MINGW_NOTHROW _ultoa(unsigned long, char*, int); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _itow (int, wchar_t*, int); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _ltow (long, wchar_t*, int); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _ultow (unsigned long, wchar_t*, int); #ifdef __MSVCRT__ -_CRTIMP __int64 __cdecl _atoi64(const char *); -_CRTIMP char* __cdecl _i64toa(__int64, char *, int); -_CRTIMP char* __cdecl _ui64toa(unsigned __int64, char *, int); -_CRTIMP __int64 __cdecl _wtoi64(const wchar_t *); -_CRTIMP wchar_t* __cdecl _i64tow(__int64, wchar_t *, int); -_CRTIMP wchar_t* __cdecl _ui64tow(unsigned __int64, wchar_t *, int); +_CRTIMP __int64 __cdecl __MINGW_NOTHROW _atoi64(const char *); +_CRTIMP char* __cdecl __MINGW_NOTHROW _i64toa(__int64, char *, int); +_CRTIMP char* __cdecl __MINGW_NOTHROW _ui64toa(unsigned __int64, char *, int); +_CRTIMP __int64 __cdecl __MINGW_NOTHROW _wtoi64(const wchar_t *); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _i64tow(__int64, wchar_t *, int); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _ui64tow(unsigned __int64, wchar_t *, int); -_CRTIMP wchar_t* __cdecl _wgetenv(const wchar_t*); -_CRTIMP int __cdecl _wputenv(const wchar_t*); -_CRTIMP void __cdecl _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*); -_CRTIMP void __cdecl _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*); -_CRTIMP void __cdecl _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*); -_CRTIMP wchar_t* __cdecl _wfullpath (wchar_t*, const wchar_t*, size_t); -_CRTIMP unsigned int __cdecl _rotl(unsigned int, int) __MINGW_ATTRIB_CONST; -_CRTIMP unsigned int __cdecl _rotr(unsigned int, int) __MINGW_ATTRIB_CONST; -_CRTIMP unsigned long __cdecl _lrotl(unsigned long, int) __MINGW_ATTRIB_CONST; -_CRTIMP unsigned long __cdecl _lrotr(unsigned long, int) __MINGW_ATTRIB_CONST; +_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _rotl(unsigned int, int) __MINGW_ATTRIB_CONST; +_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _rotr(unsigned int, int) __MINGW_ATTRIB_CONST; +_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; -_CRTIMP int __cdecl _set_error_mode (int); +_CRTIMP int __cdecl __MINGW_NOTHROW _set_error_mode (int); #define _OUT_TO_DEFAULT 0 #define _OUT_TO_STDERR 1 #define _OUT_TO_MSGBOX 2 #define _REPORT_ERRMODE 3 #if __MSVCRT_VERSION__ >= 0x800 -_CRTIMP unsigned int __cdecl _set_abort_behavior (unsigned int, unsigned int); +#ifndef _INTPTR_T_DEFINED +#define _INTPTR_T_DEFINED +#ifdef _WIN64 + typedef __int64 intptr_t; +#else + typedef int intptr_t; +#endif +#endif +_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _set_abort_behavior (unsigned int, unsigned int); /* These masks work with msvcr80.dll version 8.0.50215.44 (a beta release). */ #define _WRITE_ABORT_MSG 1 #define _CALL_REPORTFAULT 2 @@ -457,16 +465,16 @@ _invalid_parameter_handler _set_invalid_parameter_handler (_invalid_parameter_ha #ifndef _NO_OLDNAMES -_CRTIMP int __cdecl putenv (const char*); -_CRTIMP void __cdecl searchenv (const char*, const char*, char*); +_CRTIMP int __cdecl __MINGW_NOTHROW putenv (const char*); +_CRTIMP void __cdecl __MINGW_NOTHROW searchenv (const char*, const char*, char*); -_CRTIMP char* __cdecl itoa (int, char*, int); -_CRTIMP char* __cdecl ltoa (long, char*, int); +_CRTIMP char* __cdecl __MINGW_NOTHROW itoa (int, char*, int); +_CRTIMP char* __cdecl __MINGW_NOTHROW ltoa (long, char*, int); #ifndef _UWIN -_CRTIMP char* __cdecl ecvt (double, int, int*, int*); -_CRTIMP char* __cdecl fcvt (double, int, int*, int*); -_CRTIMP char* __cdecl gcvt (double, int, char*); +_CRTIMP char* __cdecl __MINGW_NOTHROW ecvt (double, int, int*, int*); +_CRTIMP char* __cdecl __MINGW_NOTHROW fcvt (double, int, int*, int*); +_CRTIMP char* __cdecl __MINGW_NOTHROW gcvt (double, int, char*); #endif /* _UWIN */ #endif /* Not _NO_OLDNAMES */ @@ -477,46 +485,46 @@ _CRTIMP char* __cdecl gcvt (double, int, char*); #if !defined __NO_ISOCEXT /* externs in static libmingwex.a */ /* C99 name for _exit */ -void __cdecl _Exit(int) __MINGW_ATTRIB_NORETURN; +void __cdecl __MINGW_NOTHROW _Exit(int) __MINGW_ATTRIB_NORETURN; #ifndef __STRICT_ANSI__ /* inline using non-ansi functions */ -__CRT_INLINE void __cdecl _Exit(int __status) +__CRT_INLINE void __cdecl __MINGW_NOTHROW _Exit(int __status) { _exit (__status); } -#endif +#endif typedef struct { long long quot, rem; } lldiv_t; -lldiv_t __cdecl lldiv (long long, long long) __MINGW_ATTRIB_CONST; +lldiv_t __cdecl __MINGW_NOTHROW lldiv (long long, long long) __MINGW_ATTRIB_CONST; -long long __cdecl llabs(long long); -__CRT_INLINE long long __cdecl llabs(long long _j) +long long __cdecl __MINGW_NOTHROW llabs(long long); +__CRT_INLINE long long __cdecl __MINGW_NOTHROW llabs(long long _j) {return (_j >= 0 ? _j : -_j);} -long long __cdecl strtoll (const char* __restrict__, char** __restrict, int); -unsigned long long __cdecl strtoull (const char* __restrict__, char** __restrict__, int); +long long __cdecl __MINGW_NOTHROW strtoll (const char* __restrict__, char** __restrict, int); +unsigned long long __cdecl __MINGW_NOTHROW strtoull (const char* __restrict__, char** __restrict__, int); -#if defined (__MSVCRT__) /* these are stubs for MS _i64 versions */ -long long __cdecl atoll (const char *); +#if defined (__MSVCRT__) /* these are stubs for MS _i64 versions */ +long long __cdecl __MINGW_NOTHROW atoll (const char *); #if !defined (__STRICT_ANSI__) -long long __cdecl wtoll (const wchar_t *); -char* __cdecl lltoa (long long, char *, int); -char* __cdecl ulltoa (unsigned long long , char *, int); -wchar_t* __cdecl lltow (long long, wchar_t *, int); -wchar_t* __cdecl ulltow (unsigned long long, wchar_t *, int); +long long __cdecl __MINGW_NOTHROW wtoll (const wchar_t *); +char* __cdecl __MINGW_NOTHROW lltoa (long long, char *, int); +char* __cdecl __MINGW_NOTHROW ulltoa (unsigned long long , char *, int); +wchar_t* __cdecl __MINGW_NOTHROW lltow (long long, wchar_t *, int); +wchar_t* __cdecl __MINGW_NOTHROW ulltow (unsigned long long, wchar_t *, int); /* inline using non-ansi functions */ -__CRT_INLINE long long __cdecl atoll (const char * _c) +__CRT_INLINE long long __cdecl __MINGW_NOTHROW atoll (const char * _c) { return _atoi64 (_c); } -__CRT_INLINE char* __cdecl lltoa (long long _n, char * _c, int _i) +__CRT_INLINE char* __cdecl __MINGW_NOTHROW lltoa (long long _n, char * _c, int _i) { return _i64toa (_n, _c, _i); } -__CRT_INLINE char* __cdecl ulltoa (unsigned long long _n, char * _c, int _i) +__CRT_INLINE char* __cdecl __MINGW_NOTHROW ulltoa (unsigned long long _n, char * _c, int _i) { return _ui64toa (_n, _c, _i); } -__CRT_INLINE long long __cdecl wtoll (const wchar_t * _w) +__CRT_INLINE long long __cdecl __MINGW_NOTHROW wtoll (const wchar_t * _w) { return _wtoi64 (_w); } -__CRT_INLINE wchar_t* __cdecl lltow (long long _n, wchar_t * _w, int _i) - { return _i64tow (_n, _w, _i); } -__CRT_INLINE wchar_t* __cdecl ulltow (unsigned long long _n, wchar_t * _w, int _i) - { return _ui64tow (_n, _w, _i); } +__CRT_INLINE wchar_t* __cdecl __MINGW_NOTHROW lltow (long long _n, wchar_t * _w, int _i) + { return _i64tow (_n, _w, _i); } +__CRT_INLINE wchar_t* __cdecl __MINGW_NOTHROW ulltow (unsigned long long _n, wchar_t * _w, int _i) + { return _ui64tow (_n, _w, _i); } #endif /* (__STRICT_ANSI__) */ #endif /* __MSVCRT__ */ @@ -532,3 +540,4 @@ __CRT_INLINE wchar_t* __cdecl ulltow (unsigned long long _n, wchar_t * _w, int #endif /* Not _STDLIB_H_ */ + diff --git a/reactos/include/crt/string.h b/reactos/include/crt/string.h index 1047e50191f..62bdb3f10d1 100644 --- a/reactos/include/crt/string.h +++ b/reactos/include/crt/string.h @@ -33,52 +33,52 @@ extern "C" { /* * Prototypes of the ANSI Standard C library string functions. */ -_CRTIMP void* __cdecl memchr (const void*, int, size_t) __MINGW_ATTRIB_PURE; -_CRTIMP int __cdecl memcmp (const void*, const void*, size_t) __MINGW_ATTRIB_PURE; -_CRTIMP void* __cdecl memcpy (void*, const void*, size_t); -_CRTIMP void* __cdecl memmove (void*, const void*, size_t); -_CRTIMP void* __cdecl memset (void*, int, size_t); -_CRTIMP char* __cdecl strcat (char*, const char*); -_CRTIMP char* __cdecl strchr (const char*, int) __MINGW_ATTRIB_PURE; -_CRTIMP int __cdecl strcmp (const char*, const char*) __MINGW_ATTRIB_PURE; -_CRTIMP int __cdecl strcoll (const char*, const char*); /* Compare using locale */ -_CRTIMP char* __cdecl strcpy (char*, const char*); -_CRTIMP size_t __cdecl strcspn (const char*, const char*) __MINGW_ATTRIB_PURE; -_CRTIMP char* __cdecl strerror (int); /* NOTE: NOT an old name wrapper. */ +_CRTIMP void* __cdecl __MINGW_NOTHROW memchr (const void*, int, size_t) __MINGW_ATTRIB_PURE; +_CRTIMP int __cdecl __MINGW_NOTHROW memcmp (const void*, const void*, size_t) __MINGW_ATTRIB_PURE; +_CRTIMP void* __cdecl __MINGW_NOTHROW memcpy (void*, const void*, size_t); +_CRTIMP void* __cdecl __MINGW_NOTHROW memmove (void*, const void*, size_t); +_CRTIMP void* __cdecl __MINGW_NOTHROW memset (void*, int, size_t); +_CRTIMP char* __cdecl __MINGW_NOTHROW strcat (char*, const char*); +_CRTIMP char* __cdecl __MINGW_NOTHROW strchr (const char*, int) __MINGW_ATTRIB_PURE; +_CRTIMP int __cdecl __MINGW_NOTHROW strcmp (const char*, const char*) __MINGW_ATTRIB_PURE; +_CRTIMP int __cdecl __MINGW_NOTHROW strcoll (const char*, const char*); /* Compare using locale */ +_CRTIMP char* __cdecl __MINGW_NOTHROW strcpy (char*, const char*); +_CRTIMP size_t __cdecl __MINGW_NOTHROW strcspn (const char*, const char*) __MINGW_ATTRIB_PURE; +_CRTIMP char* __cdecl __MINGW_NOTHROW strerror (int); /* NOTE: NOT an old name wrapper. */ -_CRTIMP size_t __cdecl strlen (const char*) __MINGW_ATTRIB_PURE; -_CRTIMP char* __cdecl strncat (char*, const char*, size_t); -_CRTIMP int __cdecl strncmp (const char*, const char*, size_t) __MINGW_ATTRIB_PURE; -_CRTIMP char* __cdecl strncpy (char*, const char*, size_t); -_CRTIMP char* __cdecl strpbrk (const char*, const char*) __MINGW_ATTRIB_PURE; -_CRTIMP char* __cdecl strrchr (const char*, int) __MINGW_ATTRIB_PURE; -_CRTIMP size_t __cdecl strspn (const char*, const char*) __MINGW_ATTRIB_PURE; -_CRTIMP char* __cdecl strstr (const char*, const char*) __MINGW_ATTRIB_PURE; -_CRTIMP char* __cdecl strtok (char*, const char*); -_CRTIMP size_t __cdecl strxfrm (char*, const char*, size_t); +_CRTIMP size_t __cdecl __MINGW_NOTHROW strlen (const char*) __MINGW_ATTRIB_PURE; +_CRTIMP char* __cdecl __MINGW_NOTHROW strncat (char*, const char*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW strncmp (const char*, const char*, size_t) __MINGW_ATTRIB_PURE; +_CRTIMP char* __cdecl __MINGW_NOTHROW strncpy (char*, const char*, size_t); +_CRTIMP char* __cdecl __MINGW_NOTHROW strpbrk (const char*, const char*) __MINGW_ATTRIB_PURE; +_CRTIMP char* __cdecl __MINGW_NOTHROW strrchr (const char*, int) __MINGW_ATTRIB_PURE; +_CRTIMP size_t __cdecl __MINGW_NOTHROW strspn (const char*, const char*) __MINGW_ATTRIB_PURE; +_CRTIMP char* __cdecl __MINGW_NOTHROW strstr (const char*, const char*) __MINGW_ATTRIB_PURE; +_CRTIMP char* __cdecl __MINGW_NOTHROW strtok (char*, const char*); +_CRTIMP size_t __cdecl __MINGW_NOTHROW strxfrm (char*, const char*, size_t); #ifndef __STRICT_ANSI__ /* * Extra non-ANSI functions provided by the CRTDLL library */ -_CRTIMP char* __cdecl _strerror (const char *); -_CRTIMP void* __cdecl _memccpy (void*, const void*, int, size_t); -_CRTIMP int __cdecl _memicmp (const void*, const void*, size_t); -_CRTIMP char* __cdecl _strdup (const char*) __MINGW_ATTRIB_MALLOC; -_CRTIMP int __cdecl _strcmpi (const char*, const char*); -_CRTIMP int __cdecl _stricmp (const char*, const char*); -_CRTIMP int __cdecl _stricoll (const char*, const char*); -_CRTIMP char* __cdecl _strlwr (char*); -_CRTIMP int __cdecl _strnicmp (const char*, const char*, size_t); -_CRTIMP char* __cdecl _strnset (char*, int, size_t); -_CRTIMP char* __cdecl _strrev (char*); -_CRTIMP char* __cdecl _strset (char*, int); -_CRTIMP char* __cdecl _strupr (char*); -_CRTIMP void __cdecl _swab (const char*, char*, size_t); +_CRTIMP char* __cdecl __MINGW_NOTHROW _strerror (const char *); +_CRTIMP void* __cdecl __MINGW_NOTHROW _memccpy (void*, const void*, int, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW _memicmp (const void*, const void*, size_t); +_CRTIMP char* __cdecl __MINGW_NOTHROW _strdup (const char*) __MINGW_ATTRIB_MALLOC; +_CRTIMP int __cdecl __MINGW_NOTHROW _strcmpi (const char*, const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _stricmp (const char*, const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _stricoll (const char*, const char*); +_CRTIMP char* __cdecl __MINGW_NOTHROW _strlwr (char*); +_CRTIMP int __cdecl __MINGW_NOTHROW _strnicmp (const char*, const char*, size_t); +_CRTIMP char* __cdecl __MINGW_NOTHROW _strnset (char*, int, size_t); +_CRTIMP char* __cdecl __MINGW_NOTHROW _strrev (char*); +_CRTIMP char* __cdecl __MINGW_NOTHROW _strset (char*, int); +_CRTIMP char* __cdecl __MINGW_NOTHROW _strupr (char*); +_CRTIMP void __cdecl __MINGW_NOTHROW _swab (const char*, char*, size_t); #ifdef __MSVCRT__ -_CRTIMP int __cdecl _strncoll(const char*, const char*, size_t); -_CRTIMP int __cdecl _strnicoll(const char*, const char*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW _strncoll(const char*, const char*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW _strnicoll(const char*, const char*, size_t); #endif #ifndef _NO_OLDNAMES @@ -87,26 +87,28 @@ _CRTIMP int __cdecl _strnicoll(const char*, const char*, size_t); * and provide a little extra portability. Also a few extra UNIX-isms like * strcasecmp. */ -_CRTIMP void* __cdecl memccpy (void*, const void*, int, size_t); -_CRTIMP int __cdecl memicmp (const void*, const void*, size_t); -_CRTIMP char* __cdecl strdup (const char*) __MINGW_ATTRIB_MALLOC; -_CRTIMP int __cdecl strcmpi (const char*, const char*); -_CRTIMP int __cdecl stricmp (const char*, const char*); -__CRT_INLINE int __cdecl +_CRTIMP void* __cdecl __MINGW_NOTHROW memccpy (void*, const void*, int, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW memicmp (const void*, const void*, size_t); +_CRTIMP char* __cdecl __MINGW_NOTHROW strdup (const char*) __MINGW_ATTRIB_MALLOC; +_CRTIMP int __cdecl __MINGW_NOTHROW strcmpi (const char*, const char*); +_CRTIMP int __cdecl __MINGW_NOTHROW stricmp (const char*, const char*); +__CRT_INLINE int __cdecl __MINGW_NOTHROW strcasecmp (const char*, const char *); +__CRT_INLINE int __cdecl __MINGW_NOTHROW strcasecmp (const char * __sz1, const char * __sz2) {return _stricmp (__sz1, __sz2);} -_CRTIMP int __cdecl stricoll (const char*, const char*); -_CRTIMP char* __cdecl strlwr (char*); -_CRTIMP int __cdecl strnicmp (const char*, const char*, size_t); -__CRT_INLINE int __cdecl +_CRTIMP int __cdecl __MINGW_NOTHROW stricoll (const char*, const char*); +_CRTIMP char* __cdecl __MINGW_NOTHROW strlwr (char*); +_CRTIMP int __cdecl __MINGW_NOTHROW strnicmp (const char*, const char*, size_t); +__CRT_INLINE int __cdecl __MINGW_NOTHROW strncasecmp (const char *, const char *, size_t); +__CRT_INLINE int __cdecl __MINGW_NOTHROW strncasecmp (const char * __sz1, const char * __sz2, size_t __sizeMaxCompare) {return _strnicmp (__sz1, __sz2, __sizeMaxCompare);} -_CRTIMP char* __cdecl strnset (char*, int, size_t); -_CRTIMP char* __cdecl strrev (char*); -_CRTIMP char* __cdecl strset (char*, int); -_CRTIMP char* __cdecl strupr (char*); +_CRTIMP char* __cdecl __MINGW_NOTHROW strnset (char*, int, size_t); +_CRTIMP char* __cdecl __MINGW_NOTHROW strrev (char*); +_CRTIMP char* __cdecl __MINGW_NOTHROW strset (char*, int); +_CRTIMP char* __cdecl __MINGW_NOTHROW strupr (char*); #ifndef _UWIN -_CRTIMP void __cdecl swab (const char*, char*, size_t); +_CRTIMP void __cdecl __MINGW_NOTHROW swab (const char*, char*, size_t); #endif /* _UWIN */ #endif /* _NO_OLDNAMES */ @@ -117,23 +119,23 @@ _CRTIMP void __cdecl swab (const char*, char*, size_t); * Unicode versions of the standard calls. * Also in wchar.h, where they belong according to ISO standard. */ -_CRTIMP wchar_t* __cdecl wcscat (wchar_t*, const wchar_t*); -_CRTIMP wchar_t* __cdecl wcschr (const wchar_t*, wchar_t); -_CRTIMP int __cdecl wcscmp (const wchar_t*, const wchar_t*); -_CRTIMP int __cdecl wcscoll (const wchar_t*, const wchar_t*); -_CRTIMP wchar_t* __cdecl wcscpy (wchar_t*, const wchar_t*); -_CRTIMP size_t __cdecl wcscspn (const wchar_t*, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscat (wchar_t*, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcschr (const wchar_t*, wchar_t); +_CRTIMP int __cdecl __MINGW_NOTHROW wcscmp (const wchar_t*, const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW wcscoll (const wchar_t*, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscpy (wchar_t*, const wchar_t*); +_CRTIMP size_t __cdecl __MINGW_NOTHROW wcscspn (const wchar_t*, const wchar_t*); /* Note: _wcserror requires __MSVCRT_VERSION__ >= 0x0700. */ -_CRTIMP size_t __cdecl wcslen (const wchar_t*); -_CRTIMP wchar_t* __cdecl wcsncat (wchar_t*, const wchar_t*, size_t); -_CRTIMP int __cdecl wcsncmp(const wchar_t*, const wchar_t*, size_t); -_CRTIMP wchar_t* __cdecl wcsncpy(wchar_t*, const wchar_t*, size_t); -_CRTIMP wchar_t* __cdecl wcspbrk(const wchar_t*, const wchar_t*); -_CRTIMP wchar_t* __cdecl wcsrchr(const wchar_t*, wchar_t); -_CRTIMP size_t __cdecl wcsspn(const wchar_t*, const wchar_t*); -_CRTIMP wchar_t* __cdecl wcsstr(const wchar_t*, const wchar_t*); -_CRTIMP wchar_t* __cdecl wcstok(wchar_t*, const wchar_t*); -_CRTIMP size_t __cdecl wcsxfrm(wchar_t*, const wchar_t*, size_t); +_CRTIMP size_t __cdecl __MINGW_NOTHROW wcslen (const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncat (wchar_t*, const wchar_t*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW wcsncmp(const wchar_t*, const wchar_t*, size_t); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncpy(wchar_t*, const wchar_t*, size_t); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcspbrk(const wchar_t*, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrchr(const wchar_t*, wchar_t); +_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsspn(const wchar_t*, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsstr(const wchar_t*, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcstok(wchar_t*, const wchar_t*); +_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsxfrm(wchar_t*, const wchar_t*, size_t); #ifndef __STRICT_ANSI__ /* @@ -143,40 +145,40 @@ _CRTIMP size_t __cdecl wcsxfrm(wchar_t*, const wchar_t*, size_t); /* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */ #define _wcscmpi _wcsicmp -_CRTIMP wchar_t* __cdecl _wcsdup (const wchar_t*); -_CRTIMP int __cdecl _wcsicmp (const wchar_t*, const wchar_t*); -_CRTIMP int __cdecl _wcsicoll (const wchar_t*, const wchar_t*); -_CRTIMP wchar_t* __cdecl _wcslwr (wchar_t*); -_CRTIMP int __cdecl _wcsnicmp (const wchar_t*, const wchar_t*, size_t); -_CRTIMP wchar_t* __cdecl _wcsnset (wchar_t*, wchar_t, size_t); -_CRTIMP wchar_t* __cdecl _wcsrev (wchar_t*); -_CRTIMP wchar_t* __cdecl _wcsset (wchar_t*, wchar_t); -_CRTIMP wchar_t* __cdecl _wcsupr (wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsdup (const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wcsicmp (const wchar_t*, const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wcsicoll (const wchar_t*, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcslwr (wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicmp (const wchar_t*, const wchar_t*, size_t); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsnset (wchar_t*, wchar_t, size_t); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsrev (wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsset (wchar_t*, wchar_t); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsupr (wchar_t*); #ifdef __MSVCRT__ -_CRTIMP int __cdecl _wcsncoll(const wchar_t*, const wchar_t*, size_t); -_CRTIMP int __cdecl _wcsnicoll(const wchar_t*, const wchar_t*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW _wcsncoll(const wchar_t*, const wchar_t*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicoll(const wchar_t*, const wchar_t*, size_t); #if __MSVCRT_VERSION__ >= 0x0700 -_CRTIMP wchar_t* __cdecl _wcserror(int); -_CRTIMP wchar_t* __cdecl __wcserror(const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcserror(int); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW __wcserror(const wchar_t*); #endif #endif #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 +int __cdecl __MINGW_NOTHROW wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2); +__CRT_INLINE int __cdecl __MINGW_NOTHROW wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2) {return _wcsicmp (__ws1, __ws2);} -_CRTIMP wchar_t* __cdecl wcsdup (const wchar_t*); -_CRTIMP int __cdecl wcsicmp (const wchar_t*, const wchar_t*); -_CRTIMP int __cdecl wcsicoll (const wchar_t*, const wchar_t*); -_CRTIMP wchar_t* __cdecl wcslwr (wchar_t*); -_CRTIMP int __cdecl wcsnicmp (const wchar_t*, const wchar_t*, size_t); -_CRTIMP wchar_t* __cdecl wcsnset (wchar_t*, wchar_t, size_t); -_CRTIMP wchar_t* __cdecl wcsrev (wchar_t*); -_CRTIMP wchar_t* __cdecl wcsset (wchar_t*, wchar_t); -_CRTIMP wchar_t* __cdecl wcsupr (wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsdup (const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW wcsicmp (const wchar_t*, const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW wcsicoll (const wchar_t*, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcslwr (wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW wcsnicmp (const wchar_t*, const wchar_t*, size_t); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsnset (wchar_t*, wchar_t, size_t); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrev (wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsset (wchar_t*, wchar_t); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsupr (wchar_t*); #endif /* Not _NO_OLDNAMES */ #endif /* Not strict ANSI */ diff --git a/reactos/include/crt/sys/file.h b/reactos/include/crt/sys/file.h new file mode 100644 index 00000000000..e95654c09a0 --- /dev/null +++ b/reactos/include/crt/sys/file.h @@ -0,0 +1,7 @@ +/* + * This file is part of the Mingw32 package. + * + * This file.h maps to the root fcntl.h + * TODO? + */ +#include diff --git a/reactos/include/crt/sys/param.h b/reactos/include/crt/sys/param.h new file mode 100644 index 00000000000..74966bd78da --- /dev/null +++ b/reactos/include/crt/sys/param.h @@ -0,0 +1,22 @@ +/* + * param.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. + * + */ + +#ifndef _SYS_PARAM_H +#define _SYS_PARAM_H + +#include +#include + +/* These are useful for cross-compiling */ +#define BIG_ENDIAN 4321 +#define LITTLE_ENDIAN 1234 +#define BYTE_ORDER LITTLE_ENDIAN + +#define MAXPATHLEN PATH_MAX + +#endif diff --git a/reactos/include/crt/sys/stat.h b/reactos/include/crt/sys/stat.h index 357a1793f0d..34019d0fbb0 100644 --- a/reactos/include/crt/sys/stat.h +++ b/reactos/include/crt/sys/stat.h @@ -155,32 +155,32 @@ struct __stat64 extern "C" { #endif -_CRTIMP int __cdecl _fstat (int, struct _stat*); -_CRTIMP int __cdecl _chmod (const char*, int); -_CRTIMP int __cdecl _stat (const char*, struct _stat*); +_CRTIMP int __cdecl __MINGW_NOTHROW _fstat (int, struct _stat*); +_CRTIMP int __cdecl __MINGW_NOTHROW _chmod (const char*, int); +_CRTIMP int __cdecl __MINGW_NOTHROW _stat (const char*, struct _stat*); #ifndef _NO_OLDNAMES /* These functions live in liboldnames.a. */ -_CRTIMP int __cdecl fstat (int, struct stat*); -_CRTIMP int __cdecl chmod (const char*, int); -_CRTIMP int __cdecl stat (const char*, struct stat*); +_CRTIMP int __cdecl __MINGW_NOTHROW fstat (int, struct stat*); +_CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int); +_CRTIMP int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*); #endif /* Not _NO_OLDNAMES */ #if defined (__MSVCRT__) -_CRTIMP int __cdecl _fstati64(int, struct _stati64 *); -_CRTIMP int __cdecl _stati64(const char *, struct _stati64 *); +_CRTIMP int __cdecl __MINGW_NOTHROW _fstati64(int, struct _stati64 *); +_CRTIMP int __cdecl __MINGW_NOTHROW _stati64(const char *, struct _stati64 *); /* These require newer versions of msvcrt.dll (6.10 or higher). */ #if __MSVCRT_VERSION__ >= 0x0601 -_CRTIMP int __cdecl _fstat64 (int, struct __stat64*); -_CRTIMP int __cdecl _stat64 (const char*, struct __stat64*); +_CRTIMP int __cdecl __MINGW_NOTHROW _fstat64 (int, struct __stat64*); +_CRTIMP int __cdecl __MINGW_NOTHROW _stat64 (const char*, struct __stat64*); #endif /* __MSVCRT_VERSION__ >= 0x0601 */ #if !defined ( _WSTAT_DEFINED) /* also declared in wchar.h */ -_CRTIMP int __cdecl _wstat(const wchar_t*, struct _stat*); -_CRTIMP int __cdecl _wstati64 (const wchar_t*, struct _stati64*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wstat(const wchar_t*, struct _stat*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wstati64 (const wchar_t*, struct _stati64*); #if __MSVCRT_VERSION__ >= 0x0601 -_CRTIMP int __cdecl _wstat64 (const wchar_t*, struct __stat64*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wstat64 (const wchar_t*, struct __stat64*); #endif /* __MSVCRT_VERSION__ >= 0x0601 */ #define _WSTAT_DEFINED #endif /* _WSTAT_DEFIND */ diff --git a/reactos/include/crt/sys/time.h b/reactos/include/crt/sys/time.h index 1f1d0be0d79..e11a2baa09c 100644 --- a/reactos/include/crt/sys/time.h +++ b/reactos/include/crt/sys/time.h @@ -36,7 +36,7 @@ struct timezone The timezone pointer arg is ignored. Errors are ignored. */ -int __cdecl gettimeofday(struct timeval *__restrict__, +int __cdecl __MINGW_NOTHROW gettimeofday(struct timeval *__restrict__, void *__restrict__ /* tzp (unused) */); #ifdef __cplusplus diff --git a/reactos/include/crt/sys/timeb.h b/reactos/include/crt/sys/timeb.h index d5653129a1f..72e2fcf6154 100644 --- a/reactos/include/crt/sys/timeb.h +++ b/reactos/include/crt/sys/timeb.h @@ -54,15 +54,15 @@ extern "C" { #endif /* TODO: Not tested. */ -_CRTIMP void __cdecl _ftime (struct _timeb*); +_CRTIMP void __cdecl __MINGW_NOTHROW _ftime (struct _timeb*); #ifndef _NO_OLDNAMES -_CRTIMP void __cdecl ftime (struct timeb*); +_CRTIMP void __cdecl __MINGW_NOTHROW ftime (struct timeb*); #endif /* Not _NO_OLDNAMES */ /* This requires newer versions of msvcrt.dll (6.10 or higher). */ #if __MSVCRT_VERSION__ >= 0x0601 -_CRTIMP void __cdecl _ftime64 (struct __timeb64*); +_CRTIMP void __cdecl __MINGW_NOTHROW _ftime64 (struct __timeb64*); #endif /* __MSVCRT_VERSION__ >= 0x0601 */ #ifdef __cplusplus diff --git a/reactos/include/crt/sys/unistd.h b/reactos/include/crt/sys/unistd.h new file mode 100644 index 00000000000..39eac4a9001 --- /dev/null +++ b/reactos/include/crt/sys/unistd.h @@ -0,0 +1,6 @@ +/* + * This file is part of the Mingw32 package. + * + * unistd.h maps (roughly) to io.h + */ +#include diff --git a/reactos/include/crt/sys/utime.h b/reactos/include/crt/sys/utime.h index 76caeaf2794..a6b1cd629ec 100644 --- a/reactos/include/crt/sys/utime.h +++ b/reactos/include/crt/sys/utime.h @@ -52,25 +52,25 @@ struct __utimbuf64 extern "C" { #endif -_CRTIMP int __cdecl _utime (const char*, struct _utimbuf*); +_CRTIMP int __cdecl __MINGW_NOTHROW _utime (const char*, struct _utimbuf*); #ifndef _NO_OLDNAMES -_CRTIMP int __cdecl utime (const char*, struct utimbuf*); +_CRTIMP int __cdecl __MINGW_NOTHROW utime (const char*, struct utimbuf*); #endif /* Not _NO_OLDNAMES */ -_CRTIMP int __cdecl _futime (int, struct _utimbuf*); +_CRTIMP int __cdecl __MINGW_NOTHROW _futime (int, struct _utimbuf*); /* The wide character version, only available for MSVCRT versions of the * C runtime library. */ #ifdef __MSVCRT__ -_CRTIMP int __cdecl _wutime (const wchar_t*, struct _utimbuf*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wutime (const wchar_t*, struct _utimbuf*); #endif /* MSVCRT runtime */ /* These require newer versions of msvcrt.dll (6.10 or higher). */ #if __MSVCRT_VERSION__ >= 0x0601 -_CRTIMP int __cdecl _utime64 (const char*, struct __utimbuf64*); -_CRTIMP int __cdecl _wutime64 (const wchar_t*, struct __utimbuf64*); -_CRTIMP int __cdecl _futime64 (int, struct __utimbuf64*); +_CRTIMP int __cdecl __MINGW_NOTHROW _utime64 (const char*, struct __utimbuf64*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wutime64 (const wchar_t*, struct __utimbuf64*); +_CRTIMP int __cdecl __MINGW_NOTHROW _futime64 (int, struct __utimbuf64*); #endif /* __MSVCRT_VERSION__ >= 0x0601 */ #ifdef __cplusplus diff --git a/reactos/include/crt/time.h b/reactos/include/crt/time.h index 47028e9dc80..9bcf4521745 100644 --- a/reactos/include/crt/time.h +++ b/reactos/include/crt/time.h @@ -81,10 +81,10 @@ struct tm extern "C" { #endif -_CRTIMP clock_t __cdecl clock (void); -_CRTIMP time_t __cdecl time (time_t*); -_CRTIMP double __cdecl difftime (time_t, time_t); -_CRTIMP time_t __cdecl mktime (struct tm*); +_CRTIMP clock_t __cdecl __MINGW_NOTHROW clock (void); +_CRTIMP time_t __cdecl __MINGW_NOTHROW time (time_t*); +_CRTIMP double __cdecl __MINGW_NOTHROW difftime (time_t, time_t); +_CRTIMP time_t __cdecl __MINGW_NOTHROW mktime (struct tm*); /* * These functions write to and return pointers to static buffers that may @@ -96,31 +96,31 @@ _CRTIMP time_t __cdecl mktime (struct tm*); * Fault and crap out your program. Guess how I know. Hint: stat called on * a directory gives 'invalid' times in st_atime etc... */ -_CRTIMP char* __cdecl asctime (const struct tm*); -_CRTIMP char* __cdecl ctime (const time_t*); -_CRTIMP struct tm* __cdecl gmtime (const time_t*); -_CRTIMP struct tm* __cdecl localtime (const time_t*); +_CRTIMP char* __cdecl __MINGW_NOTHROW asctime (const struct tm*); +_CRTIMP char* __cdecl __MINGW_NOTHROW ctime (const time_t*); +_CRTIMP struct tm* __cdecl __MINGW_NOTHROW gmtime (const time_t*); +_CRTIMP struct tm* __cdecl __MINGW_NOTHROW localtime (const time_t*); -_CRTIMP size_t __cdecl strftime (char*, size_t, const char*, const struct tm*); +_CRTIMP size_t __cdecl __MINGW_NOTHROW strftime (char*, size_t, const char*, const struct tm*); #ifndef __STRICT_ANSI__ -extern _CRTIMP void __cdecl _tzset (void); +extern _CRTIMP void __cdecl __MINGW_NOTHROW _tzset (void); #ifndef _NO_OLDNAMES -extern _CRTIMP void __cdecl tzset (void); +extern _CRTIMP void __cdecl __MINGW_NOTHROW tzset (void); #endif -_CRTIMP char* __cdecl _strdate(char*); -_CRTIMP char* __cdecl _strtime(char*); +_CRTIMP char* __cdecl __MINGW_NOTHROW _strdate(char*); +_CRTIMP char* __cdecl __MINGW_NOTHROW _strtime(char*); /* These require newer versions of msvcrt.dll (6.10 or higher). */ #if __MSVCRT_VERSION__ >= 0x0601 -_CRTIMP __time64_t __cdecl _time64( __time64_t*); -_CRTIMP __time64_t __cdecl _mktime64 (struct tm*); -_CRTIMP char* __cdecl _ctime64 (const __time64_t*); -_CRTIMP struct tm* __cdecl _gmtime64 (const __time64_t*); -_CRTIMP struct tm* __cdecl _localtime64 (const __time64_t*); +_CRTIMP __time64_t __cdecl __MINGW_NOTHROW _time64( __time64_t*); +_CRTIMP __time64_t __cdecl __MINGW_NOTHROW _mktime64 (struct tm*); +_CRTIMP char* __cdecl __MINGW_NOTHROW _ctime64 (const __time64_t*); +_CRTIMP struct tm* __cdecl __MINGW_NOTHROW _gmtime64 (const __time64_t*); +_CRTIMP struct tm* __cdecl __MINGW_NOTHROW _localtime64 (const __time64_t*); #endif /* __MSVCRT_VERSION__ >= 0x0601 */ /* @@ -132,9 +132,9 @@ _CRTIMP struct tm* __cdecl _localtime64 (const __time64_t*); #ifdef __MSVCRT__ /* These are for compatibility with pre-VC 5.0 suppied MSVCRT. */ -extern _CRTIMP int* __cdecl __p__daylight (void); -extern _CRTIMP long* __cdecl __p__timezone (void); -extern _CRTIMP char** __cdecl __p__tzname (void); +extern _CRTIMP int* __cdecl __MINGW_NOTHROW __p__daylight (void); +extern _CRTIMP long* __cdecl __MINGW_NOTHROW __p__timezone (void); +extern _CRTIMP char** __cdecl __MINGW_NOTHROW __p__tzname (void); __MINGW_IMPORT int _daylight; __MINGW_IMPORT long _timezone; @@ -195,16 +195,16 @@ __MINGW_IMPORT char *tzname[2]; /* wide function prototypes, also declared in wchar.h */ #ifndef __STRICT_ANSI__ #ifdef __MSVCRT__ -_CRTIMP wchar_t* __cdecl _wasctime(const struct tm*); -_CRTIMP wchar_t* __cdecl _wctime(const time_t*); -_CRTIMP wchar_t* __cdecl _wstrdate(wchar_t*); -_CRTIMP wchar_t* __cdecl _wstrtime(wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wasctime(const struct tm*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime(const time_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrdate(wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrtime(wchar_t*); #if __MSVCRT_VERSION__ >= 0x0601 -_CRTIMP wchar_t* __cdecl _wctime64 (const __time64_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime64 (const __time64_t*); #endif #endif /* __MSVCRT__ */ #endif /* __STRICT_ANSI__ */ -_CRTIMP size_t __cdecl wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*); +_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*); #define _WTIME_DEFINED #endif /* _WTIME_DEFINED */ @@ -216,3 +216,4 @@ _CRTIMP size_t __cdecl wcsftime (wchar_t*, size_t, const wchar_t*, const struct #endif /* Not _TIME_H_ */ + diff --git a/reactos/include/crt/utime.h b/reactos/include/crt/utime.h new file mode 100644 index 00000000000..8285f38fdef --- /dev/null +++ b/reactos/include/crt/utime.h @@ -0,0 +1 @@ +#include diff --git a/reactos/include/crt/wchar.h b/reactos/include/crt/wchar.h index 38e3ab7ccaf..3c3ef35fac0 100644 --- a/reactos/include/crt/wchar.h +++ b/reactos/include/crt/wchar.h @@ -59,7 +59,7 @@ #ifndef RC_INVOKED -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif @@ -100,67 +100,75 @@ struct tm { #ifndef _WSTDIO_DEFINED /* Also in stdio.h - keep in sync */ -_CRTIMP int __cdecl fwprintf (FILE*, const wchar_t*, ...); -_CRTIMP int __cdecl wprintf (const wchar_t*, ...); -_CRTIMP int __cdecl swprintf (wchar_t*, const wchar_t*, ...); -_CRTIMP int __cdecl _snwprintf (wchar_t*, size_t, const wchar_t*, ...); -_CRTIMP int __cdecl vfwprintf (FILE*, const wchar_t*, __VALIST); -_CRTIMP int __cdecl vwprintf (const wchar_t*, __VALIST); -_CRTIMP int __cdecl vswprintf (wchar_t*, const wchar_t*, __VALIST); -_CRTIMP int __cdecl _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST); -_CRTIMP int __cdecl fwscanf (FILE*, const wchar_t*, ...); -_CRTIMP int __cdecl wscanf (const wchar_t*, ...); -_CRTIMP int __cdecl swscanf (const wchar_t*, const wchar_t*, ...); -_CRTIMP wint_t __cdecl fgetwc (FILE*); -_CRTIMP wint_t __cdecl fputwc (wchar_t, FILE*); -_CRTIMP wint_t __cdecl ungetwc (wchar_t, FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW fwprintf (FILE*, const wchar_t*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW wprintf (const wchar_t*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW swprintf (wchar_t*, const wchar_t*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW _snwprintf (wchar_t*, size_t, const wchar_t*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW vfwprintf (FILE*, const wchar_t*, __VALIST); +_CRTIMP int __cdecl __MINGW_NOTHROW vwprintf (const wchar_t*, __VALIST); +_CRTIMP int __cdecl __MINGW_NOTHROW vswprintf (wchar_t*, const wchar_t*, __VALIST); +_CRTIMP int __cdecl __MINGW_NOTHROW _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST); +_CRTIMP int __cdecl __MINGW_NOTHROW fwscanf (FILE*, const wchar_t*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW wscanf (const wchar_t*, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW swscanf (const wchar_t*, const wchar_t*, ...); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW fgetwc (FILE*); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW fputwc (wchar_t, FILE*); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW ungetwc (wchar_t, FILE*); -#ifdef __MSVCRT__ -_CRTIMP wchar_t* __cdecl fgetws (wchar_t*, int, FILE*); -_CRTIMP int __cdecl fputws (const wchar_t*, FILE*); -_CRTIMP wint_t __cdecl getwc (FILE*); -_CRTIMP wint_t __cdecl getwchar (void); -_CRTIMP wint_t __cdecl putwc (wint_t, FILE*); -_CRTIMP wint_t __cdecl putwchar (wint_t); +#ifdef __MSVCRT__ +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW fgetws (wchar_t*, int, FILE*); +_CRTIMP int __cdecl __MINGW_NOTHROW fputws (const wchar_t*, FILE*); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW getwc (FILE*); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW getwchar (void); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwc (wint_t, FILE*); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwchar (wint_t); #ifndef __STRICT_ANSI__ -_CRTIMP wchar_t* __cdecl _getws (wchar_t*); -_CRTIMP int __cdecl _putws (const wchar_t*); -_CRTIMP FILE* __cdecl _wfdopen(int, wchar_t *); -_CRTIMP FILE* __cdecl _wfopen (const wchar_t*, const wchar_t*); -_CRTIMP FILE* __cdecl _wfreopen (const wchar_t*, const wchar_t*, FILE*); -_CRTIMP FILE* __cdecl _wfsopen (const wchar_t*, const wchar_t*, int); -_CRTIMP wchar_t* __cdecl _wtmpnam (wchar_t*); -_CRTIMP wchar_t* __cdecl _wtempnam (const wchar_t*, const wchar_t*); -_CRTIMP int __cdecl _wrename (const wchar_t*, const wchar_t*); -_CRTIMP int __cdecl _wremove (const wchar_t*); -_CRTIMP void __cdecl _wperror (const wchar_t*); -_CRTIMP FILE* __cdecl _wpopen (const wchar_t*, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _getws (wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _putws (const wchar_t*); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfdopen(int, wchar_t *); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfopen (const wchar_t*, const wchar_t*); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfreopen (const wchar_t*, const wchar_t*, FILE*); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfsopen (const wchar_t*, const wchar_t*, int); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtmpnam (wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtempnam (const wchar_t*, const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wrename (const wchar_t*, const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wremove (const wchar_t*); +_CRTIMP void __cdecl __MINGW_NOTHROW _wperror (const wchar_t*); +_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wpopen (const wchar_t*, const wchar_t*); #endif /* __STRICT_ANSI__ */ #endif /* __MSVCRT__ */ #ifndef __NO_ISOCEXT /* externs in libmingwex.a */ -int __cdecl snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...); -__CRT_INLINE int __cdecl +int __cdecl __MINGW_NOTHROW snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...); +__CRT_INLINE int __cdecl __MINGW_NOTHROW vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg) { return _vsnwprintf ( s, n, format, arg);} -int __cdecl vwscanf (const wchar_t * __restrict__, __VALIST); -int __cdecl vfwscanf (FILE * __restrict__, +int __cdecl __MINGW_NOTHROW vwscanf (const wchar_t * __restrict__, __VALIST); +int __cdecl __MINGW_NOTHROW vfwscanf (FILE * __restrict__, const wchar_t * __restrict__, __VALIST); -int __cdecl vswscanf (const wchar_t * __restrict__, +int __cdecl __MINGW_NOTHROW vswscanf (const wchar_t * __restrict__, const wchar_t * __restrict__, __VALIST); #endif #define _WSTDIO_DEFINED #endif /* _WSTDIO_DEFINED */ - #ifndef _WSTDLIB_DEFINED /* also declared in stdlib.h */ -_CRTIMP long __cdecl wcstol (const wchar_t*, wchar_t**, int); -_CRTIMP unsigned long __cdecl wcstoul (const wchar_t*, wchar_t**, int); -_CRTIMP double __cdecl wcstod (const wchar_t*, wchar_t**); +_CRTIMP long __cdecl __MINGW_NOTHROW wcstol (const wchar_t*, wchar_t**, int); +_CRTIMP unsigned long __cdecl __MINGW_NOTHROW wcstoul (const wchar_t*, wchar_t**, int); +_CRTIMP double __cdecl __MINGW_NOTHROW wcstod (const wchar_t*, wchar_t**); #if !defined __NO_ISOCEXT /* in libmingwex.a */ -float __cdecl wcstof (const wchar_t * __restrict__, wchar_t ** __restrict__); -long double __cdecl wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__); +float __cdecl __MINGW_NOTHROW wcstof (const wchar_t * __restrict__, wchar_t ** __restrict__); +long double __cdecl __MINGW_NOTHROW wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__); #endif /* __NO_ISOCEXT */ +#ifdef __MSVCRT__ +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetenv(const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wputenv(const wchar_t*); +_CRTIMP void __cdecl __MINGW_NOTHROW _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wsystem(const wchar_t*); +_CRTIMP void __cdecl __MINGW_NOTHROW _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*); +_CRTIMP void __cdecl __MINGW_NOTHROW _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wfullpath (wchar_t*, const wchar_t*, size_t); +#endif #define _WSTDLIB_DEFINED #endif /* _WSTDLIB_DEFINED */ @@ -168,18 +176,18 @@ long double __cdecl wcstold (const wchar_t * __restrict__, wchar_t ** __restrict #ifndef __STRICT_ANSI__ #ifdef __MSVCRT__ /* wide function prototypes, also declared in time.h */ -_CRTIMP wchar_t* __cdecl _wasctime (const struct tm*); -_CRTIMP wchar_t* __cdecl _wctime (const time_t*); -_CRTIMP wchar_t* __cdecl _wstrdate (wchar_t*); -_CRTIMP wchar_t* __cdecl _wstrtime (wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wasctime (const struct tm*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrdate (wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrtime (wchar_t*); #if __MSVCRT_VERSION__ >= 0x601 -_CRTIMP wchar_t* __cdecl _wctime64 (const __time64_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime64 (const __time64_t*); #endif #endif /* __MSVCRT__ */ #endif /* __STRICT_ANSI__ */ -_CRTIMP size_t __cdecl wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*); +_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*); #define _WTIME_DEFINED -#endif /* _WTIME_DEFINED */ +#endif /* _WTIME_DEFINED */ #ifndef _WSTRING_DEFINED @@ -187,23 +195,23 @@ _CRTIMP size_t __cdecl wcsftime (wchar_t*, size_t, const wchar_t*, const struct * Unicode versions of the standard string calls. * Also in string.h. */ -_CRTIMP wchar_t* __cdecl wcscat (wchar_t*, const wchar_t*); -_CRTIMP wchar_t* __cdecl wcschr (const wchar_t*, wchar_t); -_CRTIMP int __cdecl wcscmp (const wchar_t*, const wchar_t*); -_CRTIMP int __cdecl wcscoll (const wchar_t*, const wchar_t*); -_CRTIMP wchar_t* __cdecl wcscpy (wchar_t*, const wchar_t*); -_CRTIMP size_t __cdecl wcscspn (const wchar_t*, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscat (wchar_t*, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcschr (const wchar_t*, wchar_t); +_CRTIMP int __cdecl __MINGW_NOTHROW wcscmp (const wchar_t*, const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW wcscoll (const wchar_t*, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscpy (wchar_t*, const wchar_t*); +_CRTIMP size_t __cdecl __MINGW_NOTHROW wcscspn (const wchar_t*, const wchar_t*); /* Note: _wcserror requires __MSVCRT_VERSION__ >= 0x0700. */ -_CRTIMP size_t __cdecl wcslen (const wchar_t*); -_CRTIMP wchar_t* __cdecl wcsncat (wchar_t*, const wchar_t*, size_t); -_CRTIMP int __cdecl wcsncmp(const wchar_t*, const wchar_t*, size_t); -_CRTIMP wchar_t* __cdecl wcsncpy(wchar_t*, const wchar_t*, size_t); -_CRTIMP wchar_t* __cdecl wcspbrk(const wchar_t*, const wchar_t*); -_CRTIMP wchar_t* __cdecl wcsrchr(const wchar_t*, wchar_t); -_CRTIMP size_t __cdecl wcsspn(const wchar_t*, const wchar_t*); -_CRTIMP wchar_t* __cdecl wcsstr(const wchar_t*, const wchar_t*); -_CRTIMP wchar_t* __cdecl wcstok(wchar_t*, const wchar_t*); -_CRTIMP size_t __cdecl wcsxfrm(wchar_t*, const wchar_t*, size_t); +_CRTIMP size_t __cdecl __MINGW_NOTHROW wcslen (const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncat (wchar_t*, const wchar_t*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW wcsncmp(const wchar_t*, const wchar_t*, size_t); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncpy(wchar_t*, const wchar_t*, size_t); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcspbrk(const wchar_t*, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrchr(const wchar_t*, wchar_t); +_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsspn(const wchar_t*, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsstr(const wchar_t*, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcstok(wchar_t*, const wchar_t*); +_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsxfrm(wchar_t*, const wchar_t*, size_t); #ifndef __STRICT_ANSI__ /* @@ -213,39 +221,39 @@ _CRTIMP size_t __cdecl wcsxfrm(wchar_t*, const wchar_t*, size_t); /* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */ #define _wcscmpi _wcsicmp -_CRTIMP wchar_t* __cdecl _wcsdup (const wchar_t*); -_CRTIMP int __cdecl _wcsicmp (const wchar_t*, const wchar_t*); -_CRTIMP int __cdecl _wcsicoll (const wchar_t*, const wchar_t*); -_CRTIMP wchar_t* __cdecl _wcslwr (wchar_t*); -_CRTIMP int __cdecl _wcsnicmp (const wchar_t*, const wchar_t*, size_t); -_CRTIMP wchar_t* __cdecl _wcsnset (wchar_t*, wchar_t, size_t); -_CRTIMP wchar_t* __cdecl _wcsrev (wchar_t*); -_CRTIMP wchar_t* __cdecl _wcsset (wchar_t*, wchar_t); -_CRTIMP wchar_t* __cdecl _wcsupr (wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsdup (const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wcsicmp (const wchar_t*, const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wcsicoll (const wchar_t*, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcslwr (wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicmp (const wchar_t*, const wchar_t*, size_t); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsnset (wchar_t*, wchar_t, size_t); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsrev (wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsset (wchar_t*, wchar_t); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsupr (wchar_t*); #ifdef __MSVCRT__ -_CRTIMP int __cdecl _wcsncoll(const wchar_t*, const wchar_t*, size_t); -_CRTIMP int __cdecl _wcsnicoll(const wchar_t*, const wchar_t*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW _wcsncoll(const wchar_t*, const wchar_t*, size_t); +_CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicoll(const wchar_t*, const wchar_t*, size_t); #if __MSVCRT_VERSION__ >= 0x0700 -_CRTIMP wchar_t* __cdecl _wcserror(int); -_CRTIMP wchar_t* __cdecl __wcserror(const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcserror(int); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW __wcserror(const wchar_t*); #endif #endif #ifndef _NO_OLDNAMES /* NOTE: There is no _wcscmpi, but this is for compatibility. */ -__CRT_INLINE int __cdecl +__CRT_INLINE int __cdecl __MINGW_NOTHROW wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2) {return _wcsicmp (__ws1, __ws2);} -_CRTIMP wchar_t* __cdecl wcsdup (const wchar_t*); -_CRTIMP int __cdecl wcsicmp (const wchar_t*, const wchar_t*); -_CRTIMP int __cdecl wcsicoll (const wchar_t*, const wchar_t*); -_CRTIMP wchar_t* __cdecl wcslwr (wchar_t*); -_CRTIMP int __cdecl wcsnicmp (const wchar_t*, const wchar_t*, size_t); -_CRTIMP wchar_t* __cdecl wcsnset (wchar_t*, wchar_t, size_t); -_CRTIMP wchar_t* __cdecl wcsrev (wchar_t*); -_CRTIMP wchar_t* __cdecl wcsset (wchar_t*, wchar_t); -_CRTIMP wchar_t* __cdecl wcsupr (wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsdup (const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW wcsicmp (const wchar_t*, const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW wcsicoll (const wchar_t*, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcslwr (wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW wcsnicmp (const wchar_t*, const wchar_t*, size_t); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsnset (wchar_t*, wchar_t, size_t); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrev (wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsset (wchar_t*, wchar_t); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsupr (wchar_t*); #endif /* Not _NO_OLDNAMES */ #endif /* Not strict ANSI */ @@ -264,35 +272,35 @@ typedef wchar_t _Wint_t; typedef int mbstate_t; -wint_t __cdecl btowc(int); -size_t __cdecl mbrlen(const char * __restrict__, size_t, +wint_t __cdecl __MINGW_NOTHROW btowc(int); +size_t __cdecl __MINGW_NOTHROW mbrlen(const char * __restrict__, size_t, mbstate_t * __restrict__); -size_t __cdecl mbrtowc(wchar_t * __restrict__, const char * __restrict__, +size_t __cdecl __MINGW_NOTHROW mbrtowc(wchar_t * __restrict__, const char * __restrict__, size_t, mbstate_t * __restrict__); -size_t __cdecl mbsrtowcs(wchar_t * __restrict__, const char ** __restrict__, +size_t __cdecl __MINGW_NOTHROW mbsrtowcs(wchar_t * __restrict__, const char ** __restrict__, size_t, mbstate_t * __restrict__); -size_t __cdecl wcrtomb(char * __restrict__, wchar_t, +size_t __cdecl __MINGW_NOTHROW wcrtomb(char * __restrict__, wchar_t, mbstate_t * __restrict__); -size_t __cdecl wcsrtombs(char * __restrict__, const wchar_t ** __restrict__, +size_t __cdecl __MINGW_NOTHROW wcsrtombs(char * __restrict__, const wchar_t ** __restrict__, size_t, mbstate_t * __restrict__); -int __cdecl wctob(wint_t); +int __cdecl __MINGW_NOTHROW wctob(wint_t); #ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */ -__CRT_INLINE int __cdecl fwide(FILE* __UNUSED_PARAM(stream), +__CRT_INLINE int __cdecl __MINGW_NOTHROW fwide(FILE* __UNUSED_PARAM(stream), int __UNUSED_PARAM(mode)) - {return -1;} /* limited to byte orientation */ -__CRT_INLINE int __cdecl mbsinit(const mbstate_t* __UNUSED_PARAM(ps)) + {return -1;} /* limited to byte orientation */ +__CRT_INLINE int __cdecl __MINGW_NOTHROW mbsinit(const mbstate_t* __UNUSED_PARAM(ps)) {return 1;} -wchar_t* __cdecl wmemset(wchar_t *, wchar_t, size_t); -wchar_t* __cdecl wmemchr(const wchar_t*, wchar_t, size_t); +wchar_t* __cdecl __MINGW_NOTHROW wmemset(wchar_t *, wchar_t, size_t); +wchar_t* __cdecl __MINGW_NOTHROW wmemchr(const wchar_t*, wchar_t, size_t); int wmemcmp(const wchar_t*, const wchar_t *, size_t); -wchar_t* __cdecl wmemcpy(wchar_t* __restrict__, +wchar_t* __cdecl __MINGW_NOTHROW wmemcpy(wchar_t* __restrict__, const wchar_t* __restrict__, size_t); -wchar_t* __cdecl wmemmove(wchar_t* s1, const wchar_t *, size_t); -long long __cdecl wcstoll(const wchar_t * __restrict__, +wchar_t* __cdecl __MINGW_NOTHROW wmemmove(wchar_t* s1, const wchar_t *, size_t); +long long __cdecl __MINGW_NOTHROW wcstoll(const wchar_t * __restrict__, wchar_t** __restrict__, int); -unsigned long long __cdecl wcstoull(const wchar_t * __restrict__, +unsigned long long __cdecl __MINGW_NOTHROW wcstoull(const wchar_t * __restrict__, wchar_t ** __restrict__, int); #endif /* __NO_ISOCEXT */ @@ -323,7 +331,7 @@ struct _wfinddatai64_t { }; struct __wfinddata64_t { unsigned attrib; - __time64_t time_create; + __time64_t time_create; __time64_t time_access; __time64_t time_write; _fsize_t size; @@ -338,20 +346,20 @@ struct __wfinddata64_t { #if !defined (_WIO_DEFINED) #if defined (__MSVCRT__) #include /* For intptr_t. */ -_CRTIMP int __cdecl _waccess (const wchar_t*, int); -_CRTIMP int __cdecl _wchmod (const wchar_t*, int); -_CRTIMP int __cdecl _wcreat (const wchar_t*, int); -_CRTIMP long __cdecl _wfindfirst (const wchar_t*, struct _wfinddata_t *); -_CRTIMP int __cdecl _wfindnext (long, struct _wfinddata_t *); -_CRTIMP int __cdecl _wunlink (const wchar_t*); -_CRTIMP int __cdecl _wopen (const wchar_t*, int, ...); -_CRTIMP int __cdecl _wsopen (const wchar_t*, int, int, ...); -_CRTIMP wchar_t* __cdecl _wmktemp (wchar_t*); -_CRTIMP long __cdecl _wfindfirsti64 (const wchar_t*, struct _wfinddatai64_t*); -_CRTIMP int __cdecl _wfindnexti64 (long, struct _wfinddatai64_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _waccess (const wchar_t*, int); +_CRTIMP int __cdecl __MINGW_NOTHROW _wchmod (const wchar_t*, int); +_CRTIMP int __cdecl __MINGW_NOTHROW _wcreat (const wchar_t*, int); +_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t*, struct _wfinddata_t *); +_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext (long, struct _wfinddata_t *); +_CRTIMP int __cdecl __MINGW_NOTHROW _wunlink (const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wopen (const wchar_t*, int, ...); +_CRTIMP int __cdecl __MINGW_NOTHROW _wsopen (const wchar_t*, int, int, ...); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wmktemp (wchar_t*); +_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t*, struct _wfinddatai64_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnexti64 (long, struct _wfinddatai64_t*); #if __MSVCRT_VERSION__ >= 0x0601 -_CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t*, struct __wfinddata64_t*); -_CRTIMP intptr_t __cdecl _wfindnext64(intptr_t, struct __wfinddata64_t*); +_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct __wfinddata64_t*); +_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, struct __wfinddata64_t*); #endif /* __MSVCRT_VERSION__ >= 0x0601 */ #endif /* defined (__MSVCRT__) */ #define _WIO_DEFINED @@ -359,12 +367,12 @@ _CRTIMP intptr_t __cdecl _wfindnext64(intptr_t, struct __wfinddata64_t*); #ifndef _WDIRECT_DEFINED /* Also in direct.h */ -#ifdef __MSVCRT__ -_CRTIMP int __cdecl _wchdir (const wchar_t*); -_CRTIMP wchar_t* __cdecl _wgetcwd (wchar_t*, int); -_CRTIMP wchar_t* __cdecl _wgetdcwd (int, wchar_t*, int); -_CRTIMP int __cdecl _wmkdir (const wchar_t*); -_CRTIMP int __cdecl _wrmdir (const wchar_t*); +#ifdef __MSVCRT__ +_CRTIMP int __cdecl __MINGW_NOTHROW _wchdir (const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetcwd (wchar_t*, int); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetdcwd (int, wchar_t*, int); +_CRTIMP int __cdecl __MINGW_NOTHROW _wmkdir (const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wrmdir (const wchar_t*); #endif /* __MSVCRT__ */ #define _WDIRECT_DEFINED #endif /* _WDIRECT_DEFINED */ @@ -448,17 +456,17 @@ struct __stat64 #if !defined ( _WSTAT_DEFINED) /* also declared in sys/stat.h */ #if defined __MSVCRT__ -_CRTIMP int __cdecl _wstat (const wchar_t*, struct _stat*); -_CRTIMP int __cdecl _wstati64 (const wchar_t*, struct _stati64*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wstat (const wchar_t*, struct _stat*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wstati64 (const wchar_t*, struct _stati64*); #if __MSVCRT_VERSION__ >= 0x0601 -_CRTIMP int __cdecl _wstat64 (const wchar_t*, struct __stat64*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wstat64 (const wchar_t*, struct __stat64*); #endif /* __MSVCRT_VERSION__ >= 0x0601 */ #endif /* __MSVCRT__ */ #define _WSTAT_DEFINED #endif /* ! _WSTAT_DEFIND */ #ifndef _WLOCALE_DEFINED /* also declared in locale.h */ -_CRTIMP wchar_t* __cdecl _wsetlocale (int, const wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wsetlocale (int, const wchar_t*); #define _WLOCALE_DEFINED #endif @@ -472,3 +480,4 @@ _CRTIMP wchar_t* __cdecl _wsetlocale (int, const wchar_t*); #endif /* not _WCHAR_H_ */ + diff --git a/reactos/include/crt/wctype.h b/reactos/include/crt/wctype.h index 341b278e315..5e2dc88b83c 100644 --- a/reactos/include/crt/wctype.h +++ b/reactos/include/crt/wctype.h @@ -64,38 +64,40 @@ typedef wchar_t wctype_t; #endif /* Wide character equivalents - also in ctype.h */ -_CRTIMP int __cdecl iswalnum(wint_t); -_CRTIMP int __cdecl iswalpha(wint_t); -_CRTIMP int __cdecl iswascii(wint_t); -_CRTIMP int __cdecl iswcntrl(wint_t); -_CRTIMP int __cdecl iswctype(wint_t, wctype_t); -_CRTIMP int __cdecl is_wctype(wint_t, wctype_t); /* Obsolete! */ -_CRTIMP int __cdecl iswdigit(wint_t); -_CRTIMP int __cdecl iswgraph(wint_t); -_CRTIMP int __cdecl iswlower(wint_t); -_CRTIMP int __cdecl iswprint(wint_t); -_CRTIMP int __cdecl iswpunct(wint_t); -_CRTIMP int __cdecl iswspace(wint_t); -_CRTIMP int __cdecl iswupper(wint_t); -_CRTIMP int __cdecl iswxdigit(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswalnum(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswalpha(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswascii(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswcntrl(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswctype(wint_t, wctype_t); +_CRTIMP int __cdecl __MINGW_NOTHROW is_wctype(wint_t, wctype_t); /* Obsolete! */ +_CRTIMP int __cdecl __MINGW_NOTHROW iswdigit(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswgraph(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswlower(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswprint(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswpunct(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswspace(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswupper(wint_t); +_CRTIMP int __cdecl __MINGW_NOTHROW iswxdigit(wint_t); #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ || !defined __STRICT_ANSI__ || defined __cplusplus -int __cdecl iswblank (wint_t); +int __cdecl __MINGW_NOTHROW iswblank (wint_t); #endif /* Older MS docs uses wchar_t for arg and return type, while newer online MS docs say arg is wint_t and return is int. ISO C uses wint_t for both. */ -_CRTIMP wint_t __cdecl towlower (wint_t); -_CRTIMP wint_t __cdecl towupper (wint_t); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW towlower (wint_t); +_CRTIMP wint_t __cdecl __MINGW_NOTHROW towupper (wint_t); -_CRTIMP int __cdecl isleadbyte (int); +_CRTIMP int __cdecl __MINGW_NOTHROW isleadbyte (int); /* Also in ctype.h */ #ifdef __DECLSPEC_SUPPORTED -__MINGW_IMPORT unsigned short _ctype[]; +# if __MSVCRT_VERSION__ <= 0x0700 + __MINGW_IMPORT unsigned short _ctype[]; +# endif # ifdef __MSVCRT__ __MINGW_IMPORT unsigned short* _pctype; # else /* CRTDLL */ @@ -104,8 +106,10 @@ __MINGW_IMPORT unsigned short _ctype[]; # endif #else /* ! __DECLSPEC_SUPPORTED */ -extern unsigned short** _imp___ctype; -#define _ctype (*_imp___ctype) +# if __MSVCRT_VERSION__ <= 0x0700 + extern unsigned short** _imp___ctype; +# define _ctype (*_imp___ctype) +# endif # ifdef __MSVCRT__ extern unsigned short** _imp___pctype; # define _pctype (*_imp___pctype) @@ -119,23 +123,23 @@ extern unsigned short** _imp___ctype; #if !(defined (__NO_INLINE__) || defined(__NO_CTYPE_INLINES) \ || defined(__WCTYPE_INLINES_DEFINED)) #define __WCTYPE_INLINES_DEFINED -__CRT_INLINE int __cdecl iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));} -__CRT_INLINE int __cdecl iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));} -__CRT_INLINE int __cdecl iswascii(wint_t wc) {return ((wc & ~0x7F) ==0);} -__CRT_INLINE int __cdecl iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));} -__CRT_INLINE int __cdecl iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));} -__CRT_INLINE int __cdecl iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));} -__CRT_INLINE int __cdecl iswlower(wint_t wc) {return (iswctype(wc,_LOWER));} -__CRT_INLINE int __cdecl iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));} -__CRT_INLINE int __cdecl iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));} -__CRT_INLINE int __cdecl iswspace(wint_t wc) {return (iswctype(wc,_SPACE));} -__CRT_INLINE int __cdecl iswupper(wint_t wc) {return (iswctype(wc,_UPPER));} -__CRT_INLINE int __cdecl iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));} -__CRT_INLINE int __cdecl isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswascii(wint_t wc) {return ((wc & ~0x7F) ==0);} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswlower(wint_t wc) {return (iswctype(wc,_LOWER));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswspace(wint_t wc) {return (iswctype(wc,_SPACE));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswupper(wint_t wc) {return (iswctype(wc,_UPPER));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));} +__CRT_INLINE int __cdecl __MINGW_NOTHROW isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);} #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ || !defined __STRICT_ANSI__ || defined __cplusplus -__CRT_INLINE int __cdecl iswblank (wint_t wc) +__CRT_INLINE int __cdecl __MINGW_NOTHROW iswblank (wint_t wc) {return (iswctype(wc, _BLANK) || wc == L'\t');} #endif @@ -150,9 +154,9 @@ typedef wchar_t wctrans_t; for a valid string descriptor. If you want the MS behaviour (and you have msvcp60.dll in your path) add -lmsvcp60 to your command line. */ -wint_t __cdecl towctrans(wint_t, wctrans_t); -wctrans_t __cdecl wctrans(const char*); -wctype_t __cdecl wctype(const char*); +wint_t __cdecl __MINGW_NOTHROW towctrans(wint_t, wctrans_t); +wctrans_t __cdecl __MINGW_NOTHROW wctrans(const char*); +wctype_t __cdecl __MINGW_NOTHROW wctype(const char*); #ifdef __cplusplus } @@ -162,3 +166,4 @@ wctype_t __cdecl wctype(const char*); #endif /* Not _WCTYPE_H_ */ +