From e356ea321c8098cf1a83a67e27d64c44de08a298 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 20 Feb 2002 09:18:50 +0000 Subject: Merge in the pthread library. This is the linuxthreads library taken from glibc 2.1.3 and ported to work with uClibc by Stefan Soucek and Erik Andersen (me). Stefan has hacked things up such that linuxthreads runs on MMU-less systems (tested only on arm-nommu). Erik cleaned things up and made it work properly as a shared library. -Erik --- libc/misc/internals/errno.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 libc/misc/internals/errno.c (limited to 'libc/misc/internals/errno.c') diff --git a/libc/misc/internals/errno.c b/libc/misc/internals/errno.c new file mode 100644 index 000000000..06978c430 --- /dev/null +++ b/libc/misc/internals/errno.c @@ -0,0 +1,29 @@ +#if 0 +#include +/* Unforunately, this produces noisy warnings... */ +int errno __attribute__ ((section (".bss"))); +int h_errno __attribute__ ((section (".bss"))); +weak_alias(errno, _errno); +weak_alias(h_errno, _h_errno); +#else +__asm__(" +.weak _errno; +_errno = errno +.weak _h_errno; +_h_errno = h_errno + +.bss +.globl errno +.type errno,%object +.size errno,4 +errno: + .space 4 + +.bss +.globl h_errno +.type h_errno,%object +.size h_errno,4 +h_errno: + .space 4 +"); +#endif -- cgit v1.2.3