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:
Xiang Xiao
2020-07-06 21:06:43 +08:00
committed by Abdelatif Guettouche
parent a349595316
commit 1bca457b28
4 changed files with 1 additions and 18 deletions
-6
View File
@@ -121,7 +121,6 @@ int rand(void);
#define srandom(s) srand(s)
long random(void);
#ifndef CONFIG_DISABLE_ENVIRON
/* Environment variable support */
FAR char **get_environ_ptr(void);
@@ -130,18 +129,13 @@ int putenv(FAR const char *string);
int clearenv(void);
int setenv(FAR const char *name, FAR const char *value, int overwrite);
int unsetenv(FAR const char *name);
#endif
/* Process exit functions */
void exit(int status) noreturn_function;
void abort(void) noreturn_function;
#ifdef CONFIG_SCHED_ATEXIT
int atexit(CODE void (*func)(void));
#endif
#ifdef CONFIG_SCHED_ONEXIT
int on_exit(CODE void (*func)(int, FAR void *), FAR void *arg);
#endif
/* _Exit() is a stdlib.h equivalent to the unistd.h _exit() function */