userland: move posix/environ from cpp-cheat

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-05-05 00:00:00 +00:00
parent ca2dbcd25d
commit 5695748b3f

15
userland/posix/environ.c Normal file
View File

@@ -0,0 +1,15 @@
/* Print all environment variables. */
#include <stdio.h>
#include <stdlib.h>
extern char **environ;
int main(void) {
char **env = environ;
while (*env) {
printf("%s\n", *env);
env++;
}
return EXIT_SUCCESS;
}