diff options
author | dzwdz | 2023-08-24 19:10:35 +0200 |
---|---|---|
committer | dzwdz | 2023-08-24 19:10:35 +0200 |
commit | 3e09037780ca95633749be3acd52e817eed7f98c (patch) | |
tree | 83bcf5026cd4383809c81c5f38473a6b1e46755e /src/libk/include | |
parent | 292b2386d766826b15f5ca084d37aa2c485fdda6 (diff) |
libc: get most of binutils to compile
Diffstat (limited to 'src/libk/include')
-rw-r--r-- | src/libk/include/assert.h | 9 | ||||
-rw-r--r-- | src/libk/include/camellia/errno.h | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/libk/include/assert.h b/src/libk/include/assert.h index 7520aa9..affe1dc 100644 --- a/src/libk/include/assert.h +++ b/src/libk/include/assert.h @@ -1,7 +1,12 @@ #ifdef NDEBUG -#define assert(stmt) do {} while (0) +#define assert(stmt) ((void)0) #else -#define assert(stmt) do { if (!(stmt)) __badassert(__func__, __FILE__, __LINE__); } while (0) +#define assert(stmt) (void)((stmt) || (__badassert(__func__, __FILE__, __LINE__),0)) +#endif + +#ifdef __SPARSE +#undef assert +#define assert(stmt) (0) #endif _Noreturn void __badassert(const char *func, const char *file, int line); diff --git a/src/libk/include/camellia/errno.h b/src/libk/include/camellia/errno.h index 1177f54..e148b40 100644 --- a/src/libk/include/camellia/errno.h +++ b/src/libk/include/camellia/errno.h @@ -26,3 +26,6 @@ #define EWOULDBLOCK 206 #define EEXIST 207 #define EAGAIN 208 +#define EIO 209 +#define EDOM 210 /* domain error */ +#define EFBIG 211 /* file too large */ |