re-org platform APIs, simplify porting process (#201)
Co-authored-by: Xu Jun <jun1.xu@intel.com>
This commit is contained in:
@ -15,6 +15,9 @@ endif (NOT WAMR_BUILD_PLATFORM)
|
||||
|
||||
message ("WAMR_BUILD_PLATFORM = " ${WAMR_BUILD_PLATFORM})
|
||||
|
||||
add_definitions(-DWA_MALLOC=malloc)
|
||||
add_definitions(-DWA_FREE=free)
|
||||
|
||||
set (REPO_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../..)
|
||||
set (IWASM_DIR ${REPO_ROOT_DIR}/core/iwasm)
|
||||
set (APP_MGR_DIR ${REPO_ROOT_DIR}/core/app-mgr)
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
|
||||
#include "host_tool_utils.h"
|
||||
#include "bi-inc/shared_utils.h"
|
||||
#include "bh_platform.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <sys/stat.h>
|
||||
@ -23,14 +24,7 @@ typedef union jvalue {
|
||||
double d;
|
||||
} jvalue;
|
||||
|
||||
#ifndef bh_memcpy_s
|
||||
int b_memcpy_s(void * s1, unsigned int s1max,
|
||||
const void * s2, unsigned int n);
|
||||
#define bh_memcpy_s(dest, dlen, src, slen) do { \
|
||||
int _ret = slen == 0 ? 0 : b_memcpy_s (dest, dlen, src, slen); \
|
||||
(void)_ret; \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
|
||||
static inline int16_t get_int16(const char *buf)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user