1
0
forked from 0ad/0ad
0ad/source/lib/sysdep/sysdep.cpp
janwas d64e2ed19f dyn_array: use memcpy2
add tex error codes
move memcpy code to ia32
tex: simplify codec call with separate tex_codec_for* calls
codecs: use error code instead of string; remove redundant params
ia32: heavy WIP - testing memcpy implementations
util: prepare for zero-copy improvement to screenshot code

This was SVN commit r2695.
2005-09-10 14:28:55 +00:00

45 lines
510 B
C++
Executable File

#include "precompiled.h"
#include "lib.h"
#include "sysdep.h"
#if CPU_IA32
# include "ia32.h"
#endif
#include <memory.h>
#include <stdarg.h>
#if MSC_VERSION
double round(double x)
{
return (long)(x + 0.5);
}
#endif
#if !HAVE_C99
float fminf(float a, float b)
{
return (a < b)? a : b;
}
float fmaxf(float a, float b)
{
return (a > b)? a : b;
}
#endif
void memcpy2(void* dst, const void* src, size_t nbytes)
{
#if CPU_IA32
ia32_memcpy(dst, src, nbytes);
#else
memcpy(dst, src, nbytes);
#endif
}