Make sure to get no errors, when implementing functions that exist as intrinsics.

svn path=/trunk/; revision=67721
This commit is contained in:
Timo Kreuzer 2015-05-14 20:20:59 +00:00
parent c40efb1837
commit 0c72efe8f1
16 changed files with 76 additions and 6 deletions

View file

@ -19,6 +19,10 @@
#include <precomp.h>
#if defined(_MSC_VER) && defined(_M_ARM)
#pragma function(_isnan)
#endif /* _MSC_VER */
/*
* @implemented
*/

View file

@ -6,6 +6,11 @@
* 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

View file

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

View file

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

View file

@ -4,6 +4,11 @@
* 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);
float powf(float x, float y)

View file

@ -6,6 +6,11 @@
* 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

View file

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

View file

@ -1,6 +1,10 @@
#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)
{
if (n)

View file

@ -1,5 +1,9 @@
#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)
{

View file

@ -1,6 +1,10 @@
#include <string.h>
#ifdef _MSC_VER
#pragma function(memset)
#endif /* _MSC_VER */
void* memset(void* src, int val, size_t count)
{
char *char_src = (char *)src;

View file

@ -1,6 +1,10 @@
#include <tchar.h>
#ifdef _MSC_VER
#pragma function(_tcscat)
#endif /* _MSC_VER */
_TCHAR * _tcscat(_TCHAR * s, const _TCHAR * append)
{
_TCHAR * save = s;

View file

@ -1,6 +1,10 @@
#include <tchar.h>
#if defined(_MSC_VER)
#pragma function(_tcscmp)
#endif /* _MSC_VER */
int _tcscmp(const _TCHAR* s1, const _TCHAR* s2)
{
while(*s1 == *s2)

View file

@ -1,6 +1,10 @@
#include <tchar.h>
#ifdef _MSC_VER
#pragma function(_tcscpy)
#endif /* _MSC_VER */
_TCHAR * _tcscpy(_TCHAR * to, const _TCHAR * from)
{
_TCHAR *save = to;

View file

@ -2,6 +2,10 @@
#include <stddef.h>
#include <tchar.h>
#ifdef _MSC_VER
#pragma function(_tcslen)
#endif /* _MSC_VER */
size_t _tcslen(const _TCHAR * str)
{
const _TCHAR * s;

View file

@ -2,6 +2,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)
{
if(n == 0) return 0;

View file

@ -2,6 +2,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)
{
if(n != 0)