diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-02-21 08:30:07 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-02-21 08:30:07 +0000 |
commit | df237488ed8af589bad06d3d2f5f009a5def8e9f (patch) | |
tree | eb4f2944272bcce4707fd2f40918cb9d8edbf680 | |
parent | b407708461d853ea8043b9b73b3a28f9ca5efc3f (diff) |
Miles Bader noticed that I'd messed up by always pulling
errno in, regardless of whether it is being used...
-Erik
-rw-r--r-- | libc/misc/internals/__uClibc_main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index fd4e9552b..ffe8ad813 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -13,10 +13,7 @@ #define _ERRNO_H #include <stdlib.h> #include <unistd.h> -//#include <errno.h> -#undef errno -#define __set_errno(val) (*__errno_location ()) = (val) /* * Prototypes. @@ -80,7 +77,8 @@ void __uClibc_main(int argc, char **argv, char **envp) * have resulted in errno being set nonzero, so set it to 0 before * we call main. */ - __set_errno(0); + if (__errno_location) + *(__errno_location()) = 0; /* * Finally, invoke application's main and then exit. |