mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 17:33:08 +08:00
libc: Always declare getenv, link/symlink and atexit/on_exit
since many c++ library implementation reference these symbols by using ::xxx but never really use them, the declaration avoid the unused code is pulled into the final binary Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: Idd7bf9a1e09b77a6b21f900cd3ede08a1cc82d86
This commit is contained in:
committed by
Abdelatif Guettouche
parent
a349595316
commit
1bca457b28
@@ -40,7 +40,6 @@ namespace std
|
||||
using ::rand;
|
||||
using ::random;
|
||||
|
||||
#ifndef CONFIG_DISABLE_ENVIRON
|
||||
// Environment variable support
|
||||
|
||||
using ::get_environ_ptr;
|
||||
@@ -49,18 +48,13 @@ namespace std
|
||||
using ::clearenv;
|
||||
using ::setenv;
|
||||
using ::unsetenv;
|
||||
#endif
|
||||
|
||||
// Process exit functions
|
||||
|
||||
using ::exit;
|
||||
using ::abort;
|
||||
#ifdef CONFIG_SCHED_ATEXIT
|
||||
using ::atexit;
|
||||
#endif
|
||||
#ifdef CONFIG_SCHED_ONEXIT
|
||||
using ::on_exit;
|
||||
#endif
|
||||
|
||||
#ifndef __KERNEL__
|
||||
// System command
|
||||
|
||||
Reference in New Issue
Block a user