mirror of
				https://sourceware.org/git/glibc.git
				synced 2025-10-30 10:45:40 +03:00 
			
		
		
		
	* stdlib/Makefile: Add rules to build and run tst-putenv. * stdlib/tst-putenv.c: New file. * stdlib/tst-putenvmod.c: New file.
		
			
				
	
	
		
			18 lines
		
	
	
		
			277 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			277 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #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);
 | |
|     }
 | |
| }
 |