File tree Expand file tree Collapse file tree 4 files changed +20
-21
lines changed
components/libc/compilers Expand file tree Collapse file tree 4 files changed +20
-21
lines changed Original file line number Diff line number Diff line change @@ -258,8 +258,8 @@ void _ttywrch(int ch)
258258
259259RT_WEAK void _sys_exit (int return_code )
260260{
261- extern void __exit__ (int status );
262- __exit__ (return_code );
261+ extern void __rt_libc_exit (int status );
262+ __rt_libc_exit (return_code );
263263 while (1 );
264264}
265265
@@ -306,8 +306,8 @@ int remove(const char *filename)
306306#else
307307int system (const char * string )
308308{
309- extern int __system__ (const char * string );
310- return __system__ (string );
309+ extern int __rt_libc_system (const char * string );
310+ return __rt_libc_system (string );
311311}
312312#endif
313313
Original file line number Diff line number Diff line change 99 */
1010
1111#include <rtthread.h>
12+ #include <stdlib.h>
1213
13- #define ABORT_STATUS 1
14-
15- void __exit__ (int status )
14+ void __rt_libc_exit (int status )
1615{
1716 rt_thread_t self = rt_thread_self ();
1817
@@ -25,7 +24,7 @@ void __exit__(int status)
2524
2625 if (self != RT_NULL )
2726 {
28- if (status == ABORT_STATUS ) /* abort() */
27+ if (status == EXIT_FAILURE ) /* abort() */
2928 {
3029 rt_kprintf ("thread:%s abort!\n" , self -> name );
3130 }
@@ -38,12 +37,12 @@ void __exit__(int status)
3837 }
3938}
4039
41- void __abort__ (void )
40+ void __rt_libc_abort (void )
4241{
43- __exit__ ( ABORT_STATUS );
42+ __rt_libc_exit ( EXIT_FAILURE );
4443}
4544
46- int __system__ (const char * string )
45+ int __rt_libc_system (const char * string )
4746{
4847 /* TODO */
4948 return 0 ;
Original file line number Diff line number Diff line change 1111
1212void exit (int status )
1313{
14- extern void __exit__ (int status );
15- __exit__ (status );
14+ extern void __rt_libc_exit (int status );
15+ __rt_libc_exit (status );
1616 while (1 );
1717}
1818
1919void abort (void )
2020{
21- extern void __abort__ (void );
22- __abort__ ();
21+ extern void __rt_libc_abort (void );
22+ __rt_libc_abort ();
2323 while (1 );
2424}
Original file line number Diff line number Diff line change @@ -286,16 +286,16 @@ _free_r (struct _reent *ptr, void *addr)
286286void
287287exit (int status )
288288{
289- extern void __exit__ (int status );
290- __exit__ (status );
289+ extern void __rt_libc_exit (int status );
290+ __rt_libc_exit (status );
291291 while (1 );
292292}
293293
294294void
295295_system (const char * s )
296296{
297- extern int __system__ (const char * string );
298- __system__ (s );
297+ extern int __rt_libc_system (const char * string );
298+ __rt_libc_system (s );
299299}
300300
301301void __libc_init_array (void )
@@ -305,8 +305,8 @@ void __libc_init_array(void)
305305
306306void abort (void )
307307{
308- extern void __abort__ (void );
309- __abort__ ();
308+ extern void __rt_libc_abort (void );
309+ __rt_libc_abort ();
310310 while (1 );
311311}
312312
You can’t perform that action at this time.
0 commit comments