* refs #13054 correctly handle {.exportc,dynlib.} and {.exportcpp,dynlib.} * put back NIM_EXTERNC for N_LIB_EXPORT; causes issues with compilerproc
This commit is contained in:
parent
107352f9d7
commit
c56612ff96
1 changed files with 7 additions and 11 deletions
|
|
@ -159,7 +159,13 @@ __AVR__
|
||||||
# define NIM_CAST(type, ptr) ((type)(ptr))
|
# define NIM_CAST(type, ptr) ((type)(ptr))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------- */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
# define NIM_EXTERNC extern "C"
|
||||||
|
#else
|
||||||
|
# define NIM_EXTERNC
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(WIN32) || defined(_WIN32) /* only Windows has this mess... */
|
#if defined(WIN32) || defined(_WIN32) /* only Windows has this mess... */
|
||||||
# define N_LIB_PRIVATE
|
# define N_LIB_PRIVATE
|
||||||
|
|
@ -208,11 +214,7 @@ __AVR__
|
||||||
# define N_FASTCALL_PTR(rettype, name) rettype (*name)
|
# define N_FASTCALL_PTR(rettype, name) rettype (*name)
|
||||||
# define N_SAFECALL_PTR(rettype, name) rettype (*name)
|
# define N_SAFECALL_PTR(rettype, name) rettype (*name)
|
||||||
# endif
|
# endif
|
||||||
# ifdef __cplusplus
|
# define N_LIB_EXPORT NIM_EXTERNC __attribute__((visibility("default")))
|
||||||
# define N_LIB_EXPORT extern "C"
|
|
||||||
# else
|
|
||||||
# define N_LIB_EXPORT extern
|
|
||||||
# endif
|
|
||||||
# define N_LIB_IMPORT extern
|
# define N_LIB_IMPORT extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -520,12 +522,6 @@ typedef int Nim_and_C_compiler_disagree_on_target_architecture[sizeof(NI) == siz
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
# define NIM_EXTERNC extern "C"
|
|
||||||
#else
|
|
||||||
# define NIM_EXTERNC
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
# define NIM_ALIGN(x) __declspec(align(x))
|
# define NIM_ALIGN(x) __declspec(align(x))
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue