Explorar el Código

assert: Add static_assert macro

See the C11 standard 7.2 §3

The definition is copied from glibc.

Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Nicolas Cavallari hace 3 años
padre
commit
03fbd941e9
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      include/assert.h

+ 5 - 0
include/assert.h

@@ -76,3 +76,8 @@ __END_DECLS
 # endif
 
 #endif /* NDEBUG.  */
+
+#if defined __USE_ISOC11 && !defined __cplusplus
+# undef static_assert
+# define static_assert _Static_assert
+#endif