2020-02-17 21:41:09 +01:00
|
|
|
|
|
|
|
|
2020-02-23 21:23:31 +01:00
|
|
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
2020-03-13 14:11:58 +01:00
|
|
|
#undef memset
|
|
|
|
#undef memcpy
|
2020-02-17 21:41:09 +01:00
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
/*
|
|
|
|
* memset and memcpy has to be provided for clang
|
|
|
|
*/
|
|
|
|
|
2020-03-03 10:45:07 +01:00
|
|
|
#if 1 //!defined(_MSC_VER)
|
2020-08-12 17:15:47 +02:00
|
|
|
|
2020-03-03 10:45:07 +01:00
|
|
|
#ifdef __GNUC__
|
2020-08-12 17:15:47 +02:00
|
|
|
void* memset(void* dst, int ch, size_t count) __attribute__ ((used));
|
|
|
|
//void* memcpy(void* dst, const void* src, UINT64 count) __attribute__ ((used));
|
2020-03-03 10:45:07 +01:00
|
|
|
#else
|
|
|
|
void* memset(void* dst, int ch, UINT64 count);
|
2020-08-12 17:15:47 +02:00
|
|
|
//void* memcpy(void* dst, const void* src, UINT64 count);
|
2020-03-03 10:45:07 +01:00
|
|
|
#endif
|
2020-02-17 21:41:09 +01:00
|
|
|
|
2020-08-12 17:15:47 +02:00
|
|
|
void* memset(void* dst, int ch, size_t count)
|
2020-02-17 21:41:09 +01:00
|
|
|
{
|
|
|
|
SetMem(dst, count, (UINT8)(ch));
|
|
|
|
return dst;
|
|
|
|
}
|
2020-04-16 11:09:22 +02:00
|
|
|
//
|
|
|
|
//void* memcpy(void* dst, const void* src, UINT64 count)
|
|
|
|
//{
|
|
|
|
// CopyMem(dst, src, count);
|
|
|
|
// return dst;
|
|
|
|
//}
|
2020-02-21 10:44:15 +01:00
|
|
|
#endif
|
2020-02-17 21:41:09 +01:00
|
|
|
|
|
|
|
} // extern "C"
|