1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-06-15 06:41:47 +03:00
* 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.
This commit is contained in:
Ulrich Drepper
1999-07-29 20:40:05 +00:00
parent a827898574
commit de4a40d07f
4 changed files with 96 additions and 73 deletions

View File

@ -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