@@ -1,20 +1,23 @@ #include #include #include #include -#include /* heapf.c - kmheapf() "heap free" * ~ lexi hale * kmheapf() frees a region on the heap à la libc free() * see also: kmheapa() "heap alloc" */ -/* we define all platform functions here, - * whether or not they're for the correct - * platform - only the ones actually called - * by the generated code will be linked, - * linker errors are our friend here! */ +/* arch specific headers */ +#ifdef KFenv_posix +# include +#endif + +/* we define all our platform functions here, whether or not + * they're for the correct platform - only the ones that are + * called by the preprocessed form of the code will actually + * be linked, linker errors are our friend here! */ extern int kmem_platform_munmap(void* addr, unsigned long sz); kmcond kmheapf(void* ptr) { /* take an object allocated on the heap and free it, @@ -37,9 +40,9 @@ return kmcond_bad_address; } # else - Knoimpl(kmheapa,KVos); + Knoimpl(kmheapf,KVos); # error missing implementation # endif return kmcond_ok; }