mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 04:20:46 +00:00
[UCRTBASE] Implement simplistic versions of some stubs
This is to allow ucrtbase_winetest to run without debug breaks. Proper implementations will follow.
This commit is contained in:
parent
f81c82f5fa
commit
01cd8472c7
1 changed files with 10 additions and 10 deletions
|
@ -1,6 +1,9 @@
|
|||
|
||||
#include <stdint.h>
|
||||
#include <intrin.h>
|
||||
#include <malloc.h>
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
|
||||
// atexit is needed by libsupc++
|
||||
extern int __cdecl _crt_atexit(void (__cdecl*)(void));
|
||||
|
@ -9,13 +12,11 @@ int __cdecl atexit(void (__cdecl* function)(void))
|
|||
return _crt_atexit(function);
|
||||
}
|
||||
|
||||
void* __cdecl malloc(size_t);
|
||||
void* __cdecl operator_new(size_t size)
|
||||
{
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void free(void*);
|
||||
void _cdecl operator_delete(void *mem)
|
||||
{
|
||||
free(mem);
|
||||
|
@ -48,26 +49,25 @@ int __cdecl __acrt_initialize_sse2(void)
|
|||
|
||||
double fma(double x, double y, double z)
|
||||
{
|
||||
__debugbreak();
|
||||
return 0.;
|
||||
// Simplistic implementation
|
||||
return (x * y) + z;
|
||||
}
|
||||
|
||||
float fmaf(float x, float y, float z)
|
||||
{
|
||||
__debugbreak();
|
||||
return 0.;
|
||||
// Simplistic implementation
|
||||
return (x * y) + z;
|
||||
}
|
||||
|
||||
double log2(double x)
|
||||
{
|
||||
__debugbreak();
|
||||
return 0.;
|
||||
// Simplistic implementation: log2(x) = log(x) / log(2)
|
||||
return log(x) * M_LOG2E;
|
||||
}
|
||||
|
||||
float log2f(float x)
|
||||
{
|
||||
__debugbreak();
|
||||
return 0.;
|
||||
return (float)log2((double)x);
|
||||
}
|
||||
|
||||
long int lrint(double x)
|
||||
|
|
Loading…
Reference in a new issue