mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 00:55:48 +00:00
[CRT]
Make sure to get no errors, when implementing functions that exist as intrinsics. svn path=/trunk/; revision=67721
This commit is contained in:
parent
c40efb1837
commit
0c72efe8f1
16 changed files with 76 additions and 6 deletions
|
@ -19,6 +19,10 @@
|
||||||
|
|
||||||
#include <precomp.h>
|
#include <precomp.h>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && defined(_M_ARM)
|
||||||
|
#pragma function(_isnan)
|
||||||
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -6,6 +6,11 @@
|
||||||
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
|
* 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 PRECISION 9
|
||||||
#define M_PI 3.141592653589793238462643
|
#define M_PI 3.141592653589793238462643
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,12 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#undef cosf
|
#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));
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,12 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#undef logf
|
#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));
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,11 @@
|
||||||
* No warranty is given; refer to the file DISCLAIMER.PD within this 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);
|
double __cdecl pow(double x, double y);
|
||||||
|
|
||||||
float powf(float x, float y)
|
float powf(float x, float y)
|
||||||
|
|
|
@ -6,6 +6,11 @@
|
||||||
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
|
* 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 PRECISION 9
|
||||||
#define M_PI 3.141592653589793238462643
|
#define M_PI 3.141592653589793238462643
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,12 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#undef sinf
|
#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));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
|
|
||||||
#include <string.h>
|
#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)
|
void* memchr(const void *s, int c, size_t n)
|
||||||
{
|
{
|
||||||
if (n)
|
if (n)
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma function(memcpy)
|
||||||
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
/* NOTE: This code is a duplicate of memmove implementation! */
|
/* NOTE: This code is a duplicate of memmove implementation! */
|
||||||
void* memcpy(void* dest, const void* src, size_t count)
|
void* memcpy(void* dest, const void* src, size_t count)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma function(memset)
|
||||||
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
void* memset(void* src, int val, size_t count)
|
void* memset(void* src, int val, size_t count)
|
||||||
{
|
{
|
||||||
char *char_src = (char *)src;
|
char *char_src = (char *)src;
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
|
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma function(_tcscat)
|
||||||
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
_TCHAR * _tcscat(_TCHAR * s, const _TCHAR * append)
|
_TCHAR * _tcscat(_TCHAR * s, const _TCHAR * append)
|
||||||
{
|
{
|
||||||
_TCHAR * save = s;
|
_TCHAR * save = s;
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
|
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#pragma function(_tcscmp)
|
||||||
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
int _tcscmp(const _TCHAR* s1, const _TCHAR* s2)
|
int _tcscmp(const _TCHAR* s1, const _TCHAR* s2)
|
||||||
{
|
{
|
||||||
while(*s1 == *s2)
|
while(*s1 == *s2)
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
|
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma function(_tcscpy)
|
||||||
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
_TCHAR * _tcscpy(_TCHAR * to, const _TCHAR * from)
|
_TCHAR * _tcscpy(_TCHAR * to, const _TCHAR * from)
|
||||||
{
|
{
|
||||||
_TCHAR *save = to;
|
_TCHAR *save = to;
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma function(_tcslen)
|
||||||
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
size_t _tcslen(const _TCHAR * str)
|
size_t _tcslen(const _TCHAR * str)
|
||||||
{
|
{
|
||||||
const _TCHAR * s;
|
const _TCHAR * s;
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <tchar.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)
|
int _tcsncmp(const _TCHAR * s1, const _TCHAR * s2, size_t n)
|
||||||
{
|
{
|
||||||
if(n == 0) return 0;
|
if(n == 0) return 0;
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <tchar.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)
|
_TCHAR * _tcsncpy(_TCHAR * dst, const _TCHAR * src, size_t n)
|
||||||
{
|
{
|
||||||
if(n != 0)
|
if(n != 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue