diff options
| author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-01-05 01:25:30 +0000 |
|---|---|---|
| committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-01-05 01:25:30 +0000 |
| commit | 143df3663bfd9b759506366dc9179611ea911179 (patch) | |
| tree | 8449aabf4b35972a518bd93c914e1394819db6b9 /libc | |
| parent | 2a214a4cb8d68d3ab6d202feb3baabe31cc64355 (diff) | |
| download | uClibc-alpine-143df3663bfd9b759506366dc9179611ea911179.tar.bz2 uClibc-alpine-143df3663bfd9b759506366dc9179611ea911179.tar.xz | |
Changes to make 'h_errno' be a TLS variable. These changes should be portable into the trunk as, I think, they handle both thread and non-threaded cases and maybe only minor tweaks to handle the linuxthreads model, if any.
Diffstat (limited to 'libc')
| -rw-r--r-- | libc/misc/internals/Makefile.in | 2 | ||||
| -rw-r--r-- | libc/misc/internals/__h_errno_location.c | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/libc/misc/internals/Makefile.in b/libc/misc/internals/Makefile.in index 4c7012d9a..66fde4f76 100644 --- a/libc/misc/internals/Makefile.in +++ b/libc/misc/internals/Makefile.in @@ -17,7 +17,7 @@ MISC_INTERNALS_SRC:=$(patsubst %.c,$(MISC_INTERNALS_DIR)/%.c,$(CSRC)) MISC_INTERNALS_OBJ:=$(patsubst %.c,$(MISC_INTERNALS_OUT)/%.o,$(CSRC)) libc-a-y+=$(MISC_INTERNALS_OBJ) -libc-so-y+=$(MISC_INTERNALS_OBJ:.o=.os) +libc-so-y+=$(MISC_INTERNALS_OBJ:.o=.oS) libc-shared-y+=$(MISC_INTERNALS_OUT)/__uClibc_main.oS libc-static-y+=$(MISC_INTERNALS_OUT)/__uClibc_main.o diff --git a/libc/misc/internals/__h_errno_location.c b/libc/misc/internals/__h_errno_location.c index d1040dd87..209dcfc9c 100644 --- a/libc/misc/internals/__h_errno_location.c +++ b/libc/misc/internals/__h_errno_location.c @@ -1,11 +1,9 @@ #define __FORCE_GLIBC #include <features.h> #include <netdb.h> -#undef h_errno -#ifdef __UCLIBC_HAS_THREADS_NATIVE__ -extern __thread int h_errno; -#else +#ifndef __UCLIBC_HAS_THREADS_NATIVE__ +#undef h_errno extern int h_errno; #endif |
