support for the Genode OS framework (#5560)

This commit is contained in:
Emery Hemingway 2017-03-31 16:13:06 -05:00 • committed by Andreas Rumpf
commit 7e351fc7fa
14 changed files with 348 additions and 33 deletions

View file

@ -498,6 +498,11 @@ typedef int Nim_and_C_compiler_disagree_on_target_architecture[sizeof(NI) == siz
# include <sys/types.h>
#endif
#if defined(__GENODE__)
#include <libc/component.h>
extern Libc::Env *genodeEnv;
#endif
/* Compile with -d:checkAbi and a sufficiently C11:ish compiler to enable */
#define NIM_CHECK_SIZE(typ, sz) \
_Static_assert(sizeof(typ) == sz, "Nim & C disagree on type size")