Index: uspace/lib/c/include/assert.h
===================================================================
--- uspace/lib/c/include/assert.h	(revision 172813441a9fac99c6e9e697c38ae267f65d9c3a)
+++ uspace/lib/c/include/assert.h	(revision e8d3c6f55fdb9a5a1e2e4d95612cb04c4ea82652)
@@ -34,8 +34,20 @@
  */
 
+// XXX: The definition of `assert()` is not guarded.
+// One must not use `#pragma once` in this header.
+// This is in accordance with the C standard.
+
 #ifndef LIBC_ASSERT_H_
 #define LIBC_ASSERT_H_
 
 #define static_assert(expr)	_Static_assert(expr, "")
+
+extern void __helenos_assert_abort(const char *, const char *, unsigned int)
+    __attribute__((noreturn));
+
+extern void __helenos_assert_quick_abort(const char *, const char *, unsigned int)
+    __attribute__((noreturn));
+
+#endif
 
 /** Debugging assert macro
@@ -49,22 +61,23 @@
  */
 
+#undef assert
+
 #ifndef NDEBUG
+	#define assert(expr) ((expr) ? (void) 0 : __helenos_assert_abort(#expr, __FILE__, __LINE__))
+#else
+	#define assert(expr) ((void) 0)
+#endif
 
-#define assert(expr) \
-	do { \
-		if (!(expr)) \
-			assert_abort(#expr, __FILE__, __LINE__); \
-	} while (0)
+#ifdef _HELENOS_SOURCE
 
-#else /* NDEBUG */
+#undef safe_assert
 
-#define assert(expr)
+#ifndef NDEBUG
+	#define safe_assert(expr) ((expr) ? (void) 0 : __helenos_assert_quick_abort(#expr, __FILE__, __LINE__))
+#else
+	#define safe_assert(expr) ((void) 0)
+#endif
 
-#endif /* NDEBUG */
-
-extern void assert_abort(const char *, const char *, unsigned int)
-    __attribute__((noreturn));
-
-#endif
+#endif /* _HELENOS_SOURCE */
 
 /** @}
