Author: tkreuzer Date: Thu May 14 20:20:59 2015 New Revision: 67721
URL: http://svn.reactos.org/svn/reactos?rev=67721&view=rev Log: [CRT] Make sure to get no errors, when implementing functions that exist as intrinsics.
Modified: trunk/reactos/lib/sdk/crt/float/isnan.c trunk/reactos/lib/sdk/crt/math/cos.c trunk/reactos/lib/sdk/crt/math/cosf.c trunk/reactos/lib/sdk/crt/math/logf.c trunk/reactos/lib/sdk/crt/math/powf.c trunk/reactos/lib/sdk/crt/math/sin.c trunk/reactos/lib/sdk/crt/math/sinf.c trunk/reactos/lib/sdk/crt/mem/memchr.c trunk/reactos/lib/sdk/crt/mem/memcpy.c trunk/reactos/lib/sdk/crt/mem/memset.c trunk/reactos/lib/sdk/crt/string/tcscat.h trunk/reactos/lib/sdk/crt/string/tcscmp.h trunk/reactos/lib/sdk/crt/string/tcscpy.h trunk/reactos/lib/sdk/crt/string/tcslen.h trunk/reactos/lib/sdk/crt/string/tcsncmp.h trunk/reactos/lib/sdk/crt/string/tcsncpy.h
Modified: trunk/reactos/lib/sdk/crt/float/isnan.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/float/isnan.c?r... ============================================================================== --- trunk/reactos/lib/sdk/crt/float/isnan.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/float/isnan.c [iso-8859-1] Thu May 14 20:20:59 2015 @@ -18,6 +18,10 @@ */
#include <precomp.h> + +#if defined(_MSC_VER) && defined(_M_ARM) +#pragma function(_isnan) +#endif /* _MSC_VER */
/* * @implemented
Modified: trunk/reactos/lib/sdk/crt/math/cos.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/cos.c?rev=... ============================================================================== --- trunk/reactos/lib/sdk/crt/math/cos.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/math/cos.c [iso-8859-1] Thu May 14 20:20:59 2015 @@ -5,6 +5,11 @@ * PURPOSE: Generic C Implementation of cos * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org) */ + +#ifdef _MSC_VER +#pragma warning(suppress:4164) /* intrinsic not declared */ +#pragma function(cos) +#endif /* _MSC_VER */
#define PRECISION 9 #define M_PI 3.141592653589793238462643
Modified: trunk/reactos/lib/sdk/crt/math/cosf.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/cosf.c?rev... ============================================================================== --- trunk/reactos/lib/sdk/crt/math/cosf.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/math/cosf.c [iso-8859-1] Thu May 14 20:20:59 2015 @@ -7,7 +7,12 @@ #include <math.h> #undef cosf
-float cosf(float _X) +#if defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_AMD64)) +#pragma warning(suppress:4164) /* intrinsic not declared */ +#pragma function(cosf) +#endif /* _MSC_VER */ + +float cosf(float x) { - return ((float)cos((double)_X)); + return ((float)cos((double)x)); }
Modified: trunk/reactos/lib/sdk/crt/math/logf.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/logf.c?rev... ============================================================================== --- trunk/reactos/lib/sdk/crt/math/logf.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/math/logf.c [iso-8859-1] Thu May 14 20:20:59 2015 @@ -7,7 +7,12 @@ #include <math.h> #undef logf
-float logf(float _X) +#if defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_AMD64)) +#pragma warning(suppress:4164) /* intrinsic not declared */ +#pragma function(logf) +#endif /* _MSC_VER */ + +float logf(float x) { - return ((float)log((double)_X)); + return ((float)log((double)x)); }
Modified: trunk/reactos/lib/sdk/crt/math/powf.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/powf.c?rev... ============================================================================== --- trunk/reactos/lib/sdk/crt/math/powf.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/math/powf.c [iso-8859-1] Thu May 14 20:20:59 2015 @@ -3,6 +3,11 @@ * This file is part of the w64 mingw-runtime package. * No warranty is given; refer to the file DISCLAIMER.PD within this package. */ + +#if defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_AMD64)) +#pragma warning(suppress:4164) /* intrinsic not declared */ +#pragma function(powf) +#endif /* _MSC_VER */
double __cdecl pow(double x, double y);
Modified: trunk/reactos/lib/sdk/crt/math/sin.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/sin.c?rev=... ============================================================================== --- trunk/reactos/lib/sdk/crt/math/sin.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/math/sin.c [iso-8859-1] Thu May 14 20:20:59 2015 @@ -5,6 +5,11 @@ * PURPOSE: Generic C Implementation of sin * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org) */ + +#ifdef _MSC_VER +#pragma warning(suppress:4164) /* intrinsic not declared */ +#pragma function(sin) +#endif /* _MSC_VER */
#define PRECISION 9 #define M_PI 3.141592653589793238462643
Modified: trunk/reactos/lib/sdk/crt/math/sinf.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/sinf.c?rev... ============================================================================== --- trunk/reactos/lib/sdk/crt/math/sinf.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/math/sinf.c [iso-8859-1] Thu May 14 20:20:59 2015 @@ -7,7 +7,12 @@ #include <math.h> #undef sinf
-float sinf(float _X) +#if defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_AMD64)) +#pragma warning(suppress:4164) /* intrinsic not declared */ +#pragma function(sinf) +#endif /* _MSC_VER */ + +float sinf(float x) { - return ((float) sin ((double) _X)); + return ((float)sin((double)x)); }
Modified: trunk/reactos/lib/sdk/crt/mem/memchr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/mem/memchr.c?re... ============================================================================== --- trunk/reactos/lib/sdk/crt/mem/memchr.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/mem/memchr.c [iso-8859-1] Thu May 14 20:20:59 2015 @@ -1,5 +1,9 @@
#include <string.h> + +#if defined(_MSC_VER) && defined(_M_ARM) +#pragma function(memchr) +#endif /* _MSC_VER */
void* memchr(const void *s, int c, size_t n) {
Modified: trunk/reactos/lib/sdk/crt/mem/memcpy.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/mem/memcpy.c?re... ============================================================================== --- trunk/reactos/lib/sdk/crt/mem/memcpy.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/mem/memcpy.c [iso-8859-1] Thu May 14 20:20:59 2015 @@ -1,4 +1,8 @@ #include <string.h> + +#ifdef _MSC_VER +#pragma function(memcpy) +#endif /* _MSC_VER */
/* NOTE: This code is a duplicate of memmove implementation! */ void* memcpy(void* dest, const void* src, size_t count)
Modified: trunk/reactos/lib/sdk/crt/mem/memset.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/mem/memset.c?re... ============================================================================== --- trunk/reactos/lib/sdk/crt/mem/memset.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/mem/memset.c [iso-8859-1] Thu May 14 20:20:59 2015 @@ -1,5 +1,9 @@
#include <string.h> + +#ifdef _MSC_VER +#pragma function(memset) +#endif /* _MSC_VER */
void* memset(void* src, int val, size_t count) {
Modified: trunk/reactos/lib/sdk/crt/string/tcscat.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/tcscat.h... ============================================================================== --- trunk/reactos/lib/sdk/crt/string/tcscat.h [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/string/tcscat.h [iso-8859-1] Thu May 14 20:20:59 2015 @@ -1,5 +1,9 @@
#include <tchar.h> + +#ifdef _MSC_VER +#pragma function(_tcscat) +#endif /* _MSC_VER */
_TCHAR * _tcscat(_TCHAR * s, const _TCHAR * append) {
Modified: trunk/reactos/lib/sdk/crt/string/tcscmp.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/tcscmp.h... ============================================================================== --- trunk/reactos/lib/sdk/crt/string/tcscmp.h [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/string/tcscmp.h [iso-8859-1] Thu May 14 20:20:59 2015 @@ -1,5 +1,9 @@
#include <tchar.h> + +#if defined(_MSC_VER) +#pragma function(_tcscmp) +#endif /* _MSC_VER */
int _tcscmp(const _TCHAR* s1, const _TCHAR* s2) {
Modified: trunk/reactos/lib/sdk/crt/string/tcscpy.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/tcscpy.h... ============================================================================== --- trunk/reactos/lib/sdk/crt/string/tcscpy.h [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/string/tcscpy.h [iso-8859-1] Thu May 14 20:20:59 2015 @@ -1,5 +1,9 @@
#include <tchar.h> + +#ifdef _MSC_VER +#pragma function(_tcscpy) +#endif /* _MSC_VER */
_TCHAR * _tcscpy(_TCHAR * to, const _TCHAR * from) {
Modified: trunk/reactos/lib/sdk/crt/string/tcslen.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/tcslen.h... ============================================================================== --- trunk/reactos/lib/sdk/crt/string/tcslen.h [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/string/tcslen.h [iso-8859-1] Thu May 14 20:20:59 2015 @@ -1,6 +1,10 @@
#include <stddef.h> #include <tchar.h> + +#ifdef _MSC_VER +#pragma function(_tcslen) +#endif /* _MSC_VER */
size_t _tcslen(const _TCHAR * str) {
Modified: trunk/reactos/lib/sdk/crt/string/tcsncmp.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/tcsncmp.... ============================================================================== --- trunk/reactos/lib/sdk/crt/string/tcsncmp.h [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/string/tcsncmp.h [iso-8859-1] Thu May 14 20:20:59 2015 @@ -1,6 +1,10 @@
#include <stddef.h> #include <tchar.h> + +#if defined(_MSC_VER) && defined(_M_ARM) +#pragma function(_tcsncmp) +#endif /* _MSC_VER */
int _tcsncmp(const _TCHAR * s1, const _TCHAR * s2, size_t n) {
Modified: trunk/reactos/lib/sdk/crt/string/tcsncpy.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/tcsncpy.... ============================================================================== --- trunk/reactos/lib/sdk/crt/string/tcsncpy.h [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/string/tcsncpy.h [iso-8859-1] Thu May 14 20:20:59 2015 @@ -1,6 +1,10 @@
#include <stddef.h> #include <tchar.h> + +#if defined(_MSC_VER) && defined(_M_ARM) +#pragma function(_tcsncpy) +#endif /* _MSC_VER */
_TCHAR * _tcsncpy(_TCHAR * dst, const _TCHAR * src, size_t n) {