From 14f82daac675d66ffa72b38982b267087201de33 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 17 Apr 1997 23:26:33 +0000 Subject: [PATCH] [_LIBC]: Define __clearenv and make clearenv a weak alias. --- sysdeps/generic/setenv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sysdeps/generic/setenv.c b/sysdeps/generic/setenv.c index 94dc7472ece..11b5906a9d3 100644 --- a/sysdeps/generic/setenv.c +++ b/sysdeps/generic/setenv.c @@ -56,6 +56,12 @@ __libc_lock_define_initialized (static, envlock) # define UNLOCK #endif +/* In the GNU C library we must keep the namespace clean. */ +#ifdef _LIBC +# define clearenv __clearenv +#endif + + /* If this variable is not a null pointer we allocated the current environment. */ static char **last_environ; @@ -188,3 +194,7 @@ clearenv () return 0; } +#ifdef _LIBC +# undef clearenv +weak_alias (__clearenv, clearenv) +#endif -- 2.47.2