Add Windows support for C-API and Runtime API libraries and examples. (#379)
* Add Windows support for C-API and Runtime API libraries and examples. Signed-off-by: Wu Zhongmin <vwzm@live.com> Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com> * Address the review comments Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com> * Rewrite the the bh_getopt to make it avaliable for more kinds of options Signed-off-by: Wu Zhongmin <vwzm@live.com> Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com> * Add the license header Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com> Co-authored-by: Zhongmin Wu <vwzm@live.com>
This commit is contained in:
@ -34,8 +34,13 @@ extern "C" {
|
||||
#define BH_FREE os_free
|
||||
#endif
|
||||
|
||||
#if defined(MSVC)
|
||||
__declspec(dllimport) void *BH_MALLOC(unsigned int size);
|
||||
__declspec(dllimport) void BH_FREE(void *ptr);
|
||||
#else
|
||||
void *BH_MALLOC(unsigned int size);
|
||||
void BH_FREE(void *ptr);
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL (void*)0
|
||||
|
||||
Reference in New Issue
Block a user