libc: add {get,set,swap,make}context user context manipulation functions

Add the obsolescent SUSv3 family of user context manipulating functions
for arm, i386, mips, x86_64.

Signed-off-by: Timon ter Braak <timonterbraak@gmail.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
buildsys: remove superfluous default n

kconfig's default defaults to n so spelling out default n is redundant

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

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
buildsys: use kbuild style, fix omission

forgot this hunk in d0234b16d61f06b2a3fd6241eff8c81250283a60

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

As noted by Florian Fainelli:
  LD libpthread-0.9.34-git.so
libpthread/linuxthreads.old/libpthread_so.a(wrapsyscall.oS): In function `fcntl64':
wrapsyscall.c:(.text+0xd8): undefined reference to `__libc_fcntl64'
libpthread/linuxthreads.old/libpthread_so.a(wrapsyscall.oS): In function `lseek64':
wrapsyscall.c:(.text+0x190): undefined reference to `__libc_lseek64'
libpthread/linuxthreads.old/libpthread_so.a(wrapsyscall.oS): In function `pread64':
wrapsyscall.c:(.text+0x39c): undefined reference to `__libc_pread64'

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

The non-reentrant version of getpwnam is used in the RPC code (for
!HAS_REENTRANT_RPC)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
buildsys: link libgcc_eh if DODEBUG

with -O0 we (e.g. lockf) might end up with references to
_Unwind_Resume, so pull in gcc_eh in this case..

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
config: improve help of UCLIBC_HAS_RESOLVER_SUPPORT

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>
statfs: support f_frsize

closes bugzilla #5834

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

preparatory work.

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>
libc: fix typo in statvfs

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
libc: fix typo in statvfs

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
libc/sysdeps: dup3: fix typo in comment

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
buildsys: clean up path scrubbing a bit

This just makes it easier to read -- no functional changes.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
buildsys: allow the toolchain to search its dirs for kernel headers

Setting KERNEL_HEADERS up to the exact path all the time is a pita,
especially when the toolchain is often times already configured to
do the right thing.  So if the user has set that to "", don't force
any specific paths.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
buildsys: gen_bits_syscall_h: remove top_builddir references

This script hasn't used this var in a while (it writes to stdout), so
drop all mention/usage of it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
buildsys: gen_bits_syscall_h: clean up script

Just style changes here to make it more readable.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
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>