Parcourir la source

Rename __assert to __assert_fail

This makes relibc more compatible with other libc implementations
Mateusz Mikuła il y a 5 ans
Parent
commit
21a6701528
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1 1
      include/bits/assert.h
  2. 1 1
      src/header/assert/mod.rs

+ 1 - 1
include/bits/assert.h

@@ -5,7 +5,7 @@
 # define assert(cond) (void) 0
 #else
 # define assert(cond) \
-  ((void)((cond) || (__assert(__func__, __FILE__, __LINE__, #cond), 0)))
+  ((void)((cond) || (__assert_fail(__func__, __FILE__, __LINE__, #cond), 0)))
 #endif
 
 #endif

+ 1 - 1
src/header/assert/mod.rs

@@ -6,7 +6,7 @@ use header::{stdio, stdlib};
 use platform::types::*;
 
 #[no_mangle]
-pub unsafe extern "C" fn __assert(
+pub unsafe extern "C" fn __assert_fail(
     func: *const c_char,
     file: *const c_char,
     line: c_int,