From de4a40d07fd7bed8f57a49a22bf8c110751e80d6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 29 Jul 1999 20:40:05 +0000 Subject: Update. * sysdeps/generic/setenv.c: Move setenv code in new function __add_to_environ. Add new parameter specifying already constructed string for the environment. (setenv): Call __add_to_environ with new parameter set to NULL. (unsetenv): Really test all elements for duplicated name. Missed those cases where the two are following each other. * sysdeps/generic/putenv.c: Use __add_to_environ instead of setenv. * include/stdlib.h: Add prototype of __add_to_environ. * stdlib/tst-environ.c: New file. --- include/stdlib.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/stdlib.h b/include/stdlib.h index c15d364..187c458 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -46,6 +46,9 @@ extern char *__canonicalize_file_name __P ((__const char *__name)); extern char *__realpath __P ((__const char *__name, char *__resolved)); extern int __ptsname_r __P ((int __fd, char *__buf, size_t __buflen)); extern int __getpt __P ((void)); + +extern int __add_to_environ (const char *name, const char *value, + const char *combines, int replace); #endif #undef __Need_M_And_C -- cgit v1.1