statfs: support f_frsize

closes bugzilla #5834

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
socket.h: pull socket_type.h from eglibc

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
mount.h: update

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
xtensa: add sigcontext.h

Signed-off-by: Chris Zankel <chris@zankel.net>
xtensa: use atomic instructions instead of a syscall

Replace system calls with atomic instructions for 'compare and swap'
in linuxthreads.old.

Signed-off-by: Chris Zankel <chris@zankel.net>
xtensa: add a set of atomic intrinsics

Add a new file that provides various atomic intrinsics, which use the
conditional store instruction.

Signed-off-by: Chris Zankel <chris@zankel.net>
xtensa: fix a misnumbered register in sigsetjmp

Signed-off-by: Chris Zankel <chris@zankel.net>
ldd: ELFCLASSM was not defined for the Xtensa architecture

Signed-off-by: Chris Zankel <chris@zankel.net>
xtensa: add a stub user.h file

Xtensa only supports the ELF binary format, so the user.h file isn't
needed. However, it's included by other files, so provide a stub user.h.

Signed-off-by: Chris Zankel <chris@zankel.net>
xtensa: sysdep.h needs to include sys/syscall.h

The Xtensa version of sysdep.h didn't include sys/syscall.h. This header
file is, for example, needed by not-cancel.h, which uses the
INTERNAL_SYSCALL macro.

Signed-off-by: Chris Zankel <chris@zankel.net>
xtensa: add missing atomic intrinsics

Add more atomic intrinsics. These are mostly non 32-bit versions, which
are not support by Xtensa. This file needs some more clean-up and
consolidation.

Signed-off-by: Chris Zankel <chris@zankel.net>
test/math: add libm-test-ulps-xtensa file

Add ulps file for Xtensa for the math test.

Signed-off-by: Chris Zankel <chris@zankel.net>
xtensa: fix setjmp that didn't save all registers correctly

Setjmp was only saving the lower order of registers (a0-a3) correctly, but
not the higher ones (a4-a8/a12).
The change also includes additional information, and renames many of the
registers, so that setjmp and longjmp look more like the inverse of
each other.

Signed-off-by: Chris Zankel <chris@zankel.net>
buildsys: gen_bits_syscall_h: do not leave undefined SYS_xxx around

If we end up doing '#undef __NR_xxx', we don't want to leave the
corresponding SYS_xxx symbol defined.  So undef it too.

For example, with the ARM EABI layer, we have a bunch of legacy
syscalls that we define early on and then later undefine (such
as __NR_utime).  But we left SYS_utime defined so code that tests
for that define before using it would be broken (since it'd be
defined to a non-existent symbol).

URL: https://bugs.gentoo.org/425006
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
libc/sysdeps: sync bits/in.h with glibc

URL: https://bugs.busybox.net/show_bug.cgi?id=5888
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
libc: atexit: reuse free slots at the end of exit functions table

Continuosly dlopen and dlclose of shared object will cause a memory leak
in atexit function. This fix reuse free slots at the end of the list.

For further detail see https://bugs.busybox.net/show_bug.cgi?id=2455

Signed-off-by: Ronald Wahl <ronald.wahl@raritan.com>
Tested-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
(cherry picked from commit 389cd96704f21549cafc0b5bdcd0ef762b98bc08)
mman: rename MAP_UNINITIALIZE to MAP_UNINITIALIZED

The name was changed to include a trailing 'D' when it went into the
kernel.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
libc: add posix_fallocate()

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
inet: add missing include for NULL in socketcalls

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
stdlib: Fix fndecl of mkostemp, mkostemp64

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>