diff options
Diffstat (limited to 'libc/misc/internals/__uClibc_main.c')
| -rw-r--r-- | libc/misc/internals/__uClibc_main.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index c3f8a548c..cd3b1b061 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -1,6 +1,8 @@ /* - * Manuel Novoa III Feb 2001 - * Erik Andersen 2002-2004 + * Copyright (C) Feb 2001 Manuel Novoa III + * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org> + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. * * __uClibc_main is the routine to be called by all the arch-specific * versions of crt1.S in uClibc. @@ -11,6 +13,11 @@ * avoided in the static library case. */ +#define getgid __getgid +#define getuid __getuid +#define getegid __getegid +#define geteuid __geteuid + #define _ERRNO_H #include <features.h> #include <unistd.h> @@ -75,7 +82,8 @@ const char *__progname = 0; #endif extern int __libc_fcntl(int fd, int cmd, ...); -extern int __libc_open(const char *file, int flags, ...); + +#ifdef __ARCH_HAS_MMU__ static void __check_one_fd(int fd, int mode) { @@ -84,7 +92,7 @@ static void __check_one_fd(int fd, int mode) { /* The descriptor is probably not open, so try to use /dev/null */ struct stat st; - int nullfd = __libc_open(_PATH_DEVNULL, mode); + int nullfd = __open(_PATH_DEVNULL, mode); /* /dev/null is major=1 minor=3. Make absolutely certain * that is in fact the device that we have opened and not * some other wierd file... */ @@ -114,6 +122,7 @@ static int __check_suid(void) } return 1; } +#endif /* __uClibc_init completely initialize uClibc so it is ready to use. * @@ -222,12 +231,12 @@ __uClibc_main(int (*main)(int, char **, char **), int argc, while (*aux_dat) { ElfW(auxv_t) *auxv_entry = (ElfW(auxv_t) *) aux_dat; if (auxv_entry->a_type <= AT_EGID) { - memcpy(&(auxvt[auxv_entry->a_type]), auxv_entry, sizeof(ElfW(auxv_t))); + __memcpy(&(auxvt[auxv_entry->a_type]), auxv_entry, sizeof(ElfW(auxv_t))); } aux_dat += 2; } -#ifdef __UCLIBC_HAS_THREADS_NATIVE__ +#if !defined(SHARED) && defined(__UCLIBC_HAS_THREADS_NATIVE__) { extern void _dl_aux_init (ElfW(auxv_t) *av); |
