libk  Artifact [074eb1cc6b]

Artifact 074eb1cc6bddc0057a3f2cc90d0ff089c31f7b3772c6c6523882a80cbd487878:


#include <k/type.h>
/* <k/def.h>
 * ~ lexi hale <lexi@hale.su>
 * define flags so we can reason about
 * our environment. */

#if (KVos == lin)  ||\
    (KVos == fbsd) ||\
    (KVos == obsd) ||\
    (KVos == nbsd) ||\
    (KVos == dar) ||\
    (KVos == and)  
#   define KFenv_unix
#endif

#if defined(KFenv_unix)  ||\
           (KVos == hai) ||\
           (KVos == mgw)
#   define KFenv_posix
#endif

#define Kpragma(p) _Pragma(#p)
#if defined(__GNUC__) || defined(__clang__)
#   define Kerror(msg) Kpragma(GCC error #msg) 
#else
#   define Kerror(msg) Kpragma(message #msg)
#endif
#define Knoimpl(fn,p) Kerror(no implementation of fn for platform p)