From df237488ed8af589bad06d3d2f5f009a5def8e9f Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 21 Feb 2002 08:30:07 +0000 Subject: Miles Bader noticed that I'd messed up by always pulling errno in, regardless of whether it is being used... -Erik --- libc/misc/internals/__uClibc_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libc/misc') 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 #include -//#include -#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. -- cgit v1.2.3