summaryrefslogtreecommitdiff
path: root/libc
AgeCommit message (Collapse)Author
2017-11-25statfs.h: add f_flagsWaldemar Brodkorb
Add missing member in struct statfs. It is used by xfsprogs (f.e. 4.13.1). Reported-by: Joshua Kinard <kumba@gentoo.org>
2017-11-25setjmp/longjmp saves only non-call clobbered regsChristian Svensson
Previously we saved everything, but we only need to save the registers that are promised to be untouched by the setjmp call.
2017-11-25Update __longjmp.SChristian Svensson
2017-11-25Only emulate fstatfs64 if __NR_fstatfs64 is not definedEugene Rudoy
Follow-up of e3d6c8bffe79b2c070bc7a3aabc9d9c65f6b099e Signed-off-by: Eugene Rudoy <gene.devel@gmail.com> Signed-off-by: Ralf Friedl <Ralf.Friedl@online.de>
2017-11-25fix regression from a745c4bfc8a9b5db4e48387170da0dc1d39e3abeWaldemar Brodkorb
2017-11-22remove misleading comment about f_frsize fieldEugene Rudoy
It is supported both in the sense of being contained in mips version of statfs/statfs64 structs and also in the sense that it's filled by the corresponding kernel syscalls. It is UNsupported in that sense that it's value is the same as that of f_bsize (at least on older kernel versions, the oldest version tested is 2.6.13), s. [1] and [2] for details ([1] is the latest kernel version as of now, [2] is the oldest kernel version git history is available for). [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/fs/statfs.c?h=v4.14-rc7#n64 [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/fs/open.c?h=v2.6.12-rc2#n41 Follow-up of 68de9946e914d8c30dcc6667a059ea59e5b74cac Signed-off-by: Eugene Rudoy <gene.devel@gmail.com> Signed-off-by: Ralf Friedl <Ralf.Friedl@online.de>
2017-11-22librt: fix broken posix_spawnWaldemar Brodkorb
Fix iteration over signals, synced with GNU C library code and pending patches. Issues found when running dhcpcd with hook scripts. (exit status 127) Reported-By: kapeka <kapeka@bering-uclibc.de>
2017-11-19csky: port to uclibc-ngGuo Ren
Follow the steps to build c-sky uclibc linux system: 1. git clone https://github.com/c-sky/buildroot.git 2. cd buildroot 3. make qemu_csky_ck810_uclibc_defconfig 4. make Follow the buildroot/board/qemu/csky/readme.txt to run. This buildroot toolchain is pre-build, But you can rebuild the c-sky uclibc-ng alone and install it to the buildroot sysroot manually. We'll try our best to improve the uclibc-ng continuously. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2017-11-19remove unused FORTIFY code fragmentsWaldemar Brodkorb
2017-11-18use atomic instructions for atomicsStafford Horne
Signed-off-by: Stafford Horne <shorne@gmail.com>
2017-11-16or1k: remove unused fileWaldemar Brodkorb
2017-11-03math: add exception handling functionalitySergey Cherkashin
According to standards SVID and SYSV. Modified lgamma calling in case when 'signgam' variable should not be used. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2017-11-03Define _STATFS_F_FRSIZE for MIPSWaldemar Brodkorb
After discussion on the busybox mailinglist. Reported-by: Ralf Friedl <Ralf.Friedl@online.de> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2017-11-03Only emulate statfs64 if __NR_statfs64 is not definedWaldemar Brodkorb
After discussions on the busybox mailinglist. Reported-by: Ralf Friedl <Ralf.Friedl@online.de> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2017-11-03malloc-standard/malloc.h: use getpagesizeYitai Schwartz
sysconf creates a lot of code dependencies. getpagesize dosen't. staticly linked code that calls malloc is now much smaller. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2017-11-02convert accept4() to use cancel.h macrosWaldemar Brodkorb
2017-10-11h8300: remove dead codeWaldemar Brodkorb
As h8/300 architecture does not use deprecated syscalls after reintroduction into Linux upstream, this part of the code in vfork.S is always unused.
2017-10-08socketcall: fix compile issue with older Linux kernelWaldemar Brodkorb
2017-10-01recvmmsg/sendmmsg: add recvmmsg sendmmsg support.Guo Ren
The recvmmsg and sendmmsg is very important for UDP stream application. If we only use recvmsg for UDP stream, it will only copy one mtu size of data in a syscall. And recvmmsg copy as many as you want in a syscall. So recvmmsg is more efficient,and some applications will depends on the recvmmsg and sendmmsg, eg: UDP media stream player. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2017-10-01statfs: bugfix statfs02 fstatfs02 failed in ltp-testsuiteGuo Ren
In the test-case of statfs from ltp-testsuite, it pass -1 to 2th argument. eg: fstatfs(fd , -1) When uclibc-ng parse the buf32 to buf will cause illegal address access, the kernel will signal the process with SIGSEGV. If we pass the -1 directly to the syscall of statfs/fstatfs, kernel use copy_to_user() to prevent the signal of SIGSEGV and just return EINVAL. This is the ltp-testsuite expect. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2017-10-01preadv/pwritev: bugfix preadv/pwritev syscall should be 5 argsGuo Ren
The current uclibc-ng use 4 arguments, and this will cause ltp-testsuite's preadv/pwritev case failed. The syscall of preadv/pwritev in current linux-kernel is 5 arguments: linux/fs/read_write.c: SYSCALL_DEFINE5(preadv, unsigned long, fd, const struct iovec __user *, vec, unsigned long, vlen, unsigned long, pos_l, unsigned long, pos_h) SYSCALL_DEFINE5(pwritev, unsigned long, fd, const struct iovec __user *, vec, unsigned long, vlen, unsigned long, pos_l, unsigned long, pos_h) So just update to 5-args-syscall, and off_t could be 32bit or 64bit. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2017-09-14arc: Ensure that debugger can recognize sigrestorerAnton Kolesov
An issue has been found with current implementation of signal restorer function in uClibc and how GDB handles it. When debugger information is not present, everything worked fine, because GDB would use a built-in logic to determine if function is a signal restorer. However when debugging information is present, debugger would rely solely on it and wouldn't use ARC-specific functions to detect signal handler frames. Because debug information for signal restorer is generated completely by the compiler, it lacks a marker, that identifies this as a signal frame that requires special handling. While it is possible to insert that marker via inline assembly, that still doesn't solve the whole problem, because some other expectations are not met by the debug information - there is no "nop" in front of the function, needed to fool debugger into thinking that this was a function call, and references to previous frame information need to be described manually. The simplest way to fix the problem is just to make sure that signal restorer function will not have any debug function at all, which can be done by writing it in assembly. Alternative, more complex, solution, where debug information for signal frame is manually defined can be found in glibc/sysdeps/unix/sysv/linux/x86_64/sigaction.c [1]. [1] https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/x86_64/sigaction.c;hb=HEAD Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
2017-08-20arc: Merge ARCv2 string routines in generic ARC .S filesAlexey Brodkin
In cde74b83f9b2 "ARC: remove special CFLAGS/LDFLAGS handling" we got rid of CONFIG_ARC_CPU_HS which was used to select ARCv2-specific implementation of optimized string routines. So now ARCv2-tuned memset/memcpy/strcmp are not used, instead those for ARC700 used for both ARC700 and ARCHS. Without uClibc config option we may only tell which CPU type we're targeting by built-in defines of GCC. I.e. no more conditional file inclusion in Makefiles. That leaves us only one option - merge both implementations in 1 file and use ifdefs. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2017-08-10sys/ptrace.h: remove obsolete Linux PTRACE_SEIZE_DEVEL constantWaldemar Brodkorb
Remove enum __ptrace_flags along with the only constant it contains, PTRACE_SEIZE_DEVEL, from Linux's sys/ptrace.h files. Following GNU C library commit: 60e2846e2633a990bdf474004a373bde54c0bc5f
2017-07-28aarch64: finetuning, sync with glibcWaldemar Brodkorb
2017-07-28fix tolower and localesEugene Yudin
The function towlower doesn't work with locales different from C. Issue was introduced in commit: 8cde3a9bf2856dcb9a759dec7ecb04a68e712254 Call to setlocale is needed for correct generation of the table uplow_diff. Otherwise you receive compile time error "range assumption error" after uncommenting the call. Similar problem described here: http://lists.uclibc.org/pipermail/uclibc/2015-March/048852.html This commit fix the problem by using int32_t values.
2017-07-28cleanup unused defines and includes from clone.SWaldemar Brodkorb
2017-06-23sparc64: add basic supportWaldemar Brodkorb
No NPTL, no LDSO support. Bootup with Busybox Ash in Qemu working. Testuite shows only two failures, but mksh continue/break support doesn't work.
2017-06-21remove editor hints for viWaldemar Brodkorb
2017-06-08fcntl.h: fixup namespace for O_DIRECTORY/O_NOFOLLOW/O_CLOEXECWaldemar Brodkorb
Sync with GNU C library. Found while trying to compile linux-rdma to uClibc-ng. Reported-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
2017-06-08Fix mkostemp64 creation mode.Ignacy Gawędzki
All flavors of mkstemp create files with mode S_IRUSR | S_IWUSR, as per POSIX.1-2008. Make mkostemp64 follow that too instead of creating files with mode S_IRUSR | S_IWUSR | S_IXUSR. Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
2017-06-06fix gcc warning with -Wmisleading-indentationWaldemar Brodkorb
2017-05-24sparc: cleanup sparc64 bits and unused soft-fpWaldemar Brodkorb
Remove a lot of unused 64 Bit header stuff.
2017-05-17x86: fix segfaults on SMP machineWaldemar Brodkorb
As reported by Bering-uClibc project uClibc-ng for x86 generates a segfault on SMP machines when trying to run ntpd. A small test case is here: https://gist.github.com/ddrown Use a similar nop instruction as for x86_64 in the code. Signed-off-by: KP.Kirchdoerfer <kapeka@bering-uclibc.de>
2017-05-14or1k: add NPTL/TLS supportWaldemar Brodkorb
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2017-05-14or1k: add clone() from old GNU libc implementationWaldemar Brodkorb
2017-04-22remove unused HP_TIMING_AVAIL and headerWaldemar Brodkorb
cleanup unused and unsupported code.
2017-04-17remove old regex implementationWaldemar Brodkorb
2017-04-17remove old fnmatch implementationWaldemar Brodkorb
2017-04-16or1k: remove unused fileWaldemar Brodkorb
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2017-04-16libm: allow long double wrappers for all architecturesWaldemar Brodkorb
If you enable these wrappers, be sure you don't need long double precision on your embedded device, as these only enables long double warpper functions to the existing double math functions. Required to build some software as lvm2. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2017-03-20remove RPC implementationWaldemar Brodkorb
The included RPC implementation is ipv4 only. Other C library projects have either deprecated the internal RPC implementation (GNU C Library) or never implemented such functionality (musl C Library). The latest rpcbind release (0.2.4) checks for libtirpc and does not allow to be build with uClibc-ng RPC without patching. The common use case for RPC nowadays is to use rpcbind together with nfs-utils to provide NFS server or client support to a system. The included RPC implementation does create issues with duplicate symbol failures when statically compiling with RPC enabled.
2017-03-17Discard 3072 bytes instead of 256 bytesLoganaden Velvindron
This follows the recommendations outlined in Network Operations Division Cryptographic Requirements published on wikileaks on March 2017. We discard more bytes of the first keystream to reduce possibility of non-random bytes. This is similar to a change in FreeBSD: https://svnweb.freebsd.org/base?view=revision&revision=315225 Signed-off-by: Loganaden Velvindron <logan@hackers.mu>
2017-02-25Only set *memptr when success for posix_memalignKito Cheng
2017-02-23guard new syscalls preadv/pwritevWaldemar Brodkorb
2017-02-18or1k: add missing definition of ucontextWaldemar Brodkorb
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2017-02-18remove dead code in dlfcn.hWaldemar Brodkorb
2017-02-13remove unused assignment in cloneWaldemar Brodkorb
Patch fetched from GNU libc mailinglist.
2017-02-03fstat: make new code aarch64 specificWaldemar Brodkorb
The new code get's used by MIPS64 N64 and fails. Make the new code aarch64 specific.
2017-02-01aarch64: fix syscall_error_handler, fixes tst-mqueue errorsWaldemar Brodkorb
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>