diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-01-04 07:48:13 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-01-04 07:48:13 +0000 |
commit | 574b268e7f7a76fe3bcfe389509d9ff91227a860 (patch) | |
tree | ee213b8410cd034b34d72858e2488125359dc88f /stdlib/tst-putenvmod.c | |
parent | 3fb2606af3b1ab6e6bef7065c65eaca197d73a89 (diff) | |
download | glibc-574b268e7f7a76fe3bcfe389509d9ff91227a860.zip glibc-574b268e7f7a76fe3bcfe389509d9ff91227a860.tar.gz glibc-574b268e7f7a76fe3bcfe389509d9ff91227a860.tar.bz2 |
Update.
* stdlib/Makefile: Add rules to build and run tst-putenv.
* stdlib/tst-putenv.c: New file.
* stdlib/tst-putenvmod.c: New file.
Diffstat (limited to 'stdlib/tst-putenvmod.c')
-rw-r--r-- | stdlib/tst-putenvmod.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/stdlib/tst-putenvmod.c b/stdlib/tst-putenvmod.c new file mode 100644 index 0000000..7c0c337 --- /dev/null +++ b/stdlib/tst-putenvmod.c @@ -0,0 +1,17 @@ +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> + +void +__attribute ((constructor)) +init (void) +{ + puts ("init DSO"); + + static char str[] = "SOMETHING_NOBODY_USES=something_else"; + if (putenv (str) != 0) + { + puts ("putenv failed"); + _exit (1); + } +} |