aboutsummaryrefslogtreecommitdiff
path: root/lib/mlibc/options/internal/include/bits/ensure.h
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-07 17:28:52 -0500
committerIan Moffett <ian@osmora.org>2024-03-07 18:24:51 -0500
commitf5e48e94a2f4d4bbd6e5628c7f2afafc6dbcc459 (patch)
tree93b156621dc0303816b37f60ba88051b702d92f6 /lib/mlibc/options/internal/include/bits/ensure.h
parentbd5969fc876a10b18613302db7087ef3c40f18e1 (diff)
build: Build mlibc + add distclean target
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/mlibc/options/internal/include/bits/ensure.h')
-rw-r--r--lib/mlibc/options/internal/include/bits/ensure.h45
1 files changed, 0 insertions, 45 deletions
diff --git a/lib/mlibc/options/internal/include/bits/ensure.h b/lib/mlibc/options/internal/include/bits/ensure.h
deleted file mode 100644
index f75a2e9..0000000
--- a/lib/mlibc/options/internal/include/bits/ensure.h
+++ /dev/null
@@ -1,45 +0,0 @@
-
-#ifndef MLIBC_ENSURE_H
-#define MLIBC_ENSURE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef __MLIBC_ABI_ONLY
-
-void __ensure_fail(const char *assertion, const char *file, unsigned int line,
- const char *function);
-
-void __ensure_warn(const char *assertion, const char *file, unsigned int line,
- const char *function);
-
-#endif /* !__MLIBC_ABI_ONLY */
-
-#define __ensure(assertion) do { if(!(assertion)) \
- __ensure_fail(#assertion, __FILE__, __LINE__, __func__); } while(0)
-
-#define MLIBC_UNIMPLEMENTED() __ensure_fail("Functionality is not implemented", \
- __FILE__, __LINE__, __func__)
-
-#define MLIBC_MISSING_SYSDEP() __ensure_warn("Library function fails due to missing sysdep", \
- __FILE__, __LINE__, __func__)
-
-#define MLIBC_CHECK_OR_ENOSYS(sysdep, ret) ({ \
- if (!(sysdep)) { \
- __ensure_warn("Library function fails due to missing sysdep", \
- __FILE__, __LINE__, __func__); \
- errno = ENOSYS; \
- return (ret); \
- } \
- sysdep; \
- })
-
-#define MLIBC_STUB_BODY { MLIBC_UNIMPLEMENTED(); __builtin_unreachable(); }
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // MLIBC_ENSURE_H
-