mirror of
https://sourceware.org/git/glibc.git
synced 2025-06-15 06:41:47 +03:00
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.
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user