From ada25a756a1ce34bb9ccb36559c1a6b43fb084eb Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 19 Sep 2011 10:09:00 +0200 Subject: [PATCH] restore the enviornment test --- newlib/examples/hello.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/newlib/examples/hello.c b/newlib/examples/hello.c index 98aa17d1..708bb644 100644 --- a/newlib/examples/hello.c +++ b/newlib/examples/hello.c @@ -44,8 +44,19 @@ extern int errno; int main(int argc, char** argv) { - char* teststr = malloc(sizeof(char)*100); - int testfile = open("/bin/test.txt", O_CREAT | O_EXCL, "wr"); + int i, testfile; + char* teststr; + + for(i=0; environ[i]; i++) + printf("environ[%d] = %s\n", i, environ[i]); + for(i=0; i