diff options
Diffstat (limited to 'libc/misc/internals')
-rw-r--r-- | libc/misc/internals/__uClibc_main.c | 13 | ||||
-rw-r--r-- | libc/misc/internals/errno.c | 13 | ||||
-rw-r--r-- | libc/misc/internals/static.c | 4 | ||||
-rw-r--r-- | libc/misc/internals/tempname.c | 14 | ||||
-rw-r--r-- | libc/misc/internals/tempname.h | 8 |
5 files changed, 20 insertions, 32 deletions
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index cd3b1b061..618fad74c 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -236,19 +236,6 @@ __uClibc_main(int (*main)(int, char **, char **), int argc, aux_dat += 2; } -#if !defined(SHARED) && defined(__UCLIBC_HAS_THREADS_NATIVE__) - { - extern void _dl_aux_init (ElfW(auxv_t) *av); - - /* - * Before we can make any pthread calls, we have to do some - * some TLS setup. This call may do more in the future. - */ - if (likely(_dl_aux_init != NULL)) - _dl_aux_init(auxvt); - } -#endif - /* We need to initialize uClibc. If we are dynamically linked this * may have already been completed by the shared lib loader. We call * __uClibc_init() regardless, to be sure the right thing happens. */ diff --git a/libc/misc/internals/errno.c b/libc/misc/internals/errno.c index 05acb7ea9..f2424eae0 100644 --- a/libc/misc/internals/errno.c +++ b/libc/misc/internals/errno.c @@ -1,15 +1,14 @@ #include <features.h> #undef errno -#ifdef __UCLIBC_HAS_THREADS_NATIVE__ -#include <tls.h> -extern int errno; -extern __thread int _h_errno; -int _errno = 0; -__thread int _h_errno; -#else extern int errno; extern int h_errno; + +#if 0 +/* Unfortunately, this doesn't work... */ +int h_errno __attribute__ ((section (".bss"))) = 0; +int errno __attribute__ ((section (".bss"))) = 0; +#else int _errno = 0; int _h_errno = 0; #endif diff --git a/libc/misc/internals/static.c b/libc/misc/internals/static.c deleted file mode 100644 index cd39ffdd7..000000000 --- a/libc/misc/internals/static.c +++ /dev/null @@ -1,4 +0,0 @@ -#include <stddef.h> - -/* Force static libraries to know about ... */ -void *__libc_stack_end=NULL; diff --git a/libc/misc/internals/tempname.c b/libc/misc/internals/tempname.c index 99a8ac0d8..fae3687ad 100644 --- a/libc/misc/internals/tempname.c +++ b/libc/misc/internals/tempname.c @@ -32,6 +32,8 @@ */ #define open64 __open64 +#define mkdir __mkdir +#define gettimeofday __gettimeofday #include <stddef.h> #include <stdint.h> @@ -61,8 +63,8 @@ static int direxists (const char *dir) for use with mk[s]temp. Will fail (-1) if DIR is non-null and doesn't exist, none of the searched dirs exists, or there's not enough space in TMPL. */ -int attribute_hidden __path_search (char *tmpl, size_t tmpl_len, const char *dir, - const char *pfx, int try_tmpdir) +int attribute_hidden ___path_search (char *tmpl, size_t tmpl_len, const char *dir, + const char *pfx /*, int try_tmpdir*/) { //const char *d; size_t dlen, plen; @@ -116,7 +118,7 @@ int attribute_hidden __path_search (char *tmpl, size_t tmpl_len, const char *dir return -1; } - sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx); + __sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx); return 0; } @@ -141,7 +143,7 @@ static unsigned int fillrand(unsigned char *buf, unsigned int len) static void brain_damaged_fillrand(unsigned char *buf, unsigned int len) { - int i, k; + unsigned int i, k; struct timeval tv; uint32_t high, low, rh; static uint64_t value; @@ -180,8 +182,8 @@ static void brain_damaged_fillrand(unsigned char *buf, unsigned int len) int attribute_hidden __gen_tempname (char *tmpl, int kind) { char *XXXXXX; - unsigned int k; - int len, i, count, fd, save_errno = errno; + unsigned int i, k; + int len, count, fd, save_errno = errno; unsigned char randomness[6]; len = __strlen (tmpl); diff --git a/libc/misc/internals/tempname.h b/libc/misc/internals/tempname.h index dfe9399ca..80a6cf7c1 100644 --- a/libc/misc/internals/tempname.h +++ b/libc/misc/internals/tempname.h @@ -3,8 +3,12 @@ #define __need_size_t #include <stddef.h> -extern int __path_search (char *tmpl, size_t tmpl_len, const char *dir, - const char *pfx, int try_tmpdir) attribute_hidden; + +/* Disable support for $TMPDIR */ +extern int ___path_search (char *tmpl, size_t tmpl_len, const char *dir, + const char *pfx /*, int try_tmpdir */) attribute_hidden; +#define __path_search(tmpl, tmpl_len, dir, pfx, try_tmpdir) ___path_search(tmpl, tmpl_len, dir, pfx) + extern int __gen_tempname (char *__tmpl, int __kind) attribute_hidden; /* The __kind argument to __gen_tempname may be one of: */ |