summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2017-06-01include/features.h: add _DEFAULT_SOURCE macroAnthony G. Basile
man feature_test_macros(7) specifies that _BSD_SOURCE and _SVID_SOURCE have been deprecated in favor of _DEFAULT_SOURCE since libc 2.20. Specifying either of the former is now equivalent to specifying just the latter. We add this macro to conform to this standard, but do not add the compiler warning to maintain full backwards compatibility with earlier version of glibc and uclibc. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2017-05-22include/sys/reboot.h: add constants RB_SW_SUSPEND and RB_KEXECAnthony G. Basile
This syncs up <sys/reboot.h> with the GNU C library, see their commit 1a09dc56. These constants are needed by init systems like openrc. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2017-05-22“new LT” is gonemirabilos
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2017-05-22add another generated filemirabilos
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2017-05-14or1k: add NPTL/TLS supportWaldemar Brodkorb
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2017-05-07sync features.h with GNU C library, fixes gcc 7.1 toolchain creationWaldemar Brodkorb
2017-04-22sys/stat.h: fix missing struct timespec definitionDamien Riegel
This is a second attempt to fix a compilation failure involving a missing struct timespec definition in some situation. Previous attempt was following commit but it had undesirable side effects and was reverted: 657c4a9d6c fcntl.h: fix a missing `struct timespec` definition A similar issue was identified and reported in glibc [1], and the fix was to include the timespec definition if __USE_XOPEN2K8 was defined. To minimize the possible impact of this new fix, it was decided to not replace __USE_ATFILE by __USE_XOPEN2K8 as glibc did, but to add an additional OR condition on __USE_XOPEN2K8. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=21371 Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com>
2017-04-22remove unused HP_TIMING_AVAIL and headerWaldemar Brodkorb
cleanup unused and unsupported code.
2017-04-18cleanup dead code in signal.hWaldemar Brodkorb
2017-04-04Revert "fcntl.h: fix a missing `struct timespec` definition"Waldemar Brodkorb
This reverts commit 657c4a9d6c2e649d86307f46ce9d5e44192f6e7a. This breaks a lot of package cross-compilation as lvm, ruby, ipsec-tools. :(
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-17sync header with GNU libc / kernelWaldemar Brodkorb
The header is not in sync with GNU libc and Linux kernel and therefore produces compile errors with qemu-user (2.8.0). Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2017-02-28fcntl.h: fix a missing `struct timespec` definitionDamien Riegel
If a source file is compiled with: #define _XOPEN_SOURCE 700 #define _POSIX_C_SOURCE 200112L Then including fcntl.h results in the following error: In file included from fcntl.h:37:0, from test.c:4: sys/stat.h:371:54: error: array type has incomplete element type ‘struct timespec’ extern int futimens (int __fd, const struct timespec __times[2]) __THROW; To fix that, we force the definition of struct timespec in fcntl.h when __USE_XOPEN2K8 is defined. This mimics the behavior of glibc which contains the following line in its io/fcntl.h header (included by fcntlh.h): #ifdef __USE_XOPEN2K8 # include <bits/types/struct_timespec.h> #endif This bug was spotted during the compilation of BoringSSL against uClibc. Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com>
2017-02-01g/c __libc_errnomirabilos
Signed-off-by: mirabilos <m@mirbsd.org> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2017-02-01add experimental aarch64 supportWaldemar Brodkorb
Ported over from GNU C Library and runtime tested in Qemu.
2017-01-22nds32: add NPTL/TLS, *context function, libm changes and code cleanupVincent Ren-Wei Chen
This commit includes following features. 1. Support NPTL/TLS 2. Add libm function which is used to handle FP rounding and excpetions (ex: fclrexcpt,fedisblxcpti,feenablxcpt... ) 3. Add *context function for operating user context (ex: setcontext,getcontext,makecontext... ) 4. Change the return flow from signal handler 5. Cleanup of old code The testsuite only has 2 errors, tst-cpuclock1 and tst-cputimer1, which are related to timing accuracy. (math and locale tests are disabled) Signed-off-by: Vincent Ren-Wei Chen <vincentc@andestech.com>
2017-01-14add wrappers for preadv/pwritevWaldemar Brodkorb
2017-01-14add uchar.h minimal from GNU libcWaldemar Brodkorb
2017-01-14add secure_getenv() functionWaldemar Brodkorb
2016-12-21remove obstack supportWaldemar Brodkorb
Remove __UCLIBC_HAS_OBSTACK__ as it isn't very uptodate and maintained part. It shouldn't be required for any software and mostly shipped with stuff which use it. (f.e. binutils-gdb)
2016-12-20sys/cdefs.h: add definition of __attribute_alloc_size__Thomas Petazzoni
Commit cee0b058fa0b4501b289a2da365182d60314d746 ("add aligned_alloc required for latest gcc libstdc++") added the prototype of aligned_alloc() to <stdlib.h>. This prototype contains '__attribute_alloc_size__ ((2))', but this is not defined anywhere in uClibc-ng. This commit addresses that by adding the relevant definition in <sys/cdefs.h>, borrowed from glibc. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-12-20add stub implementation for libintl/gettextWaldemar Brodkorb
These adds the stubs from gettext-tiny 0.0.5 from here: https://github.com/sabotage-linux/gettext-tiny
2016-12-14add libiconv-tiny implementationWaldemar Brodkorb
To use it enable UCLIBC_HAS_LIBICONV, then iconv_open/iconv_close should be available.
2016-12-10include/sys/mman.h: remove madvise/posix_madvise prototypes on noMMUThomas Petazzoni
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-12-02remove libintl stub and libintl.h headerWaldemar Brodkorb
As __UCLIBC_HAS_GETTEXT_AWARENESS__ is never defined, this is mostly dead code. It is planned to integrate libiconv-tiny and gettext-tiny into uClibc-ng after the next release, so that more software packages can be used without modification. Remove any _/_N macro usage.
2016-11-29remove libresolv stubWaldemar Brodkorb
2016-11-27remove UCLIBC_HAS_LFSWaldemar Brodkorb
2016-11-27remove libnsl stubWaldemar Brodkorb
2016-11-27fixup gcc warningsWaldemar Brodkorb
Remove following warning from common code: warning: ISO C90 forbids mixed declarations and code
2016-11-27add aligned_alloc required for latest gcc libstdc++Waldemar Brodkorb
2016-11-04nios2: sync support with glibcWaldemar Brodkorb
Only static linking is supported for now. More debugging and analyzing for ld.so, TLS and NPTL is required. But at least you can bootup a static root fileystem in Qemu.
2016-11-03microblaze: add NPTL/TLS support from GNU libcWaldemar Brodkorb
Not perfect, but a starting point. Some tests of the test suite are failing.
2016-09-25sync header with glibcWaldemar Brodkorb
Fixes a compile error for samba 4.5.0. Reported-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
2016-06-30nds32: add support for new architectureWaldemar Brodkorb
Add support for Andes Technology NDS32 architecture. See here http://www.andestech.com/en/index/index.htm for more informaton. Verification of the port from an older uClibc port was done on a sponsored AG101p board. The testsuite only has 5 errors, three are related to an existing bug in dlclose() with LT.old, also happening on cris32 and m68k. Failures to fallocate/posix_fallocate are unresolved. Thanks to Andes Technology sponsoring the hardware and being very helpful while doing the uClibc-ng porting. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2016-06-15sysconf: Support _SC_(AV)?PHYS_PAGES.Nicolas Cavallari
Do it by following the trail of the existing commented code, which implemented it by calling get_phys_pages() and get_avphys_pages(). This patch implements these two functions, which are also glibc extensions. Some program/libraries (e.g. libuv) assumes that sysconf(_SC_PHYS_PAGES) works on linux and never check for -1, thus they report an insane amount of memory. Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
2016-06-01remove MJN only debug messagesWaldemar Brodkorb
2016-05-24microblaze: fix ELF detection in ld.soWaldemar Brodkorb
2016-05-18remove linuxthreads.new, rename linuxthreads.oldWaldemar Brodkorb
Linuxthreads.new isn't really useful with the existence of NPTL/TLS for well supported architectures. There is no reason to use LT.new for ARM/MIPS or other architectures supporting NPTL/TLS. It is not available for noMMU architectures like Blackfin or FR-V. To simplify the live of the few uClibc-ng developers, LT.new is removed and LT.old is renamed to LT. LINUXTHREADS_OLD -> UCLIBC_HAS_LINUXTHREADS
2016-04-15replace FSF addresses with URLsNikola Forró
License notices in most of the source files refer to an outdated FSF address. Replace it with URL, like in the rest of the source files.Signed-off-by: Nikola Forró <nforro@redhat.com>
2016-04-05unlimited access to macrosWaldemar Brodkorb
Sync with GNU libc behaviour.
2016-03-31bits/byteswap-common.h: import recent headers from glibcAnthony G. Basile
On systems where uClibc doesn't provide an arch specific byteswap.h, we fall back on bits/byteswap-common.h. However, there is a bug in this header in the __bswap_constant_64(x) macro. If, for example, a double is passed, we get 'invalid operands to binary &' in which we mismatch a 'double' and 'long long unsigned int'. The newer glibc headers fix this and so we import them. Also, since the inclusion of byteswap.h is not appropriate for assembly code, we guard a portion of endian.h which uses byteswap.h from inclusion in any assembly. This is needed, for example, for f2fs-tools 1.6.0 on 32-bit big endian PowerPC. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2016-02-24Advertise obstack only when chosenAnton Kolesov
This is similar to this patch for GNU glob: ff6ce3999db93a52d1cd22510f8508b660ddf54e. The problem is that libiberty/obstack.c file checks for _GNU_OBSTACK_INTERFACE_VERSION == _OBSTACK_INTERFACE_VERSION and elides libiberty obstack implementation if there is already a compatible implementation in libc. Therefore define should be set only when obstack is actually selected, otherwise it is not possible to build binutils and gdb with uClibc. Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com> Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com> Cc: Alexey Brodkin <abrodkin@synopsys.com>
2016-02-19mark a.out support as not availableWaldemar Brodkorb
Some architectures do not provide the Linux header, so packages which include a.out.h might fail. Some discussions seen on the buildroot mailinglist.
2016-02-07frv: resurrect port somehow, totally untestedWaldemar Brodkorb
The FR-V port is really broken, and I have no emulator or hardware for this platform. I tried to get some hardware from RedHat, who made the FR-V port initially. Unfortunately Fujitsi didn't agreed to sent me some of their unused spare hardware lying @RedHat. As I invested some time to get stuff compiled, I decided to add the code and may be anytime later I can gain access to some emulator or hardware. GDB simulator for FR-V doesn't support booting Linux AFAIK.
2016-02-02include/netdb.h: Do not define IDN-related flags.Thomas Claveirole
getaddrinfo() does not implement IDN encoding, and always fail when provided an IDN flag (e.g., AI_IDN) with EAI_BADFLAGS. Some packages (such as the VLC media player) check for AI_IDN before they use it; providing an unimplemented AI_IDN in the libc makes these package fail. As a result they make calls to getaddrinfo() with AI_IDN that always fail while they could have made successful calls without AI_IDN instead. Thus, do not define IDN flags: it is better not to compile rather than to compile a code that always fail. Signed-off-by: Thomas Claveirole <thomas.claveirole@green-communications.fr>
2016-01-31ldso: Use single rtld_flags interpretation through all the callsLeonid Lisovskiy
Implement single rtld_flags interpretation through all the do_dlopen()/_dl_load_shared_library()/_dl_load_elf_shared_library() calls chain. This adds the ability to use the flags, passed to dlopen(), in all underlaying functions and implement rtld_flags inheritance. Saves a few bytes code. Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2016-01-31Provide __adjtimex() alias, like glibc.Leonid Lisovskiy
Althought recent versions of sofware don't require it, old ntpd wants - see http://bugs.ntp.org/show_bug.cgi?id=769 Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2016-01-10Implement legacy bcopy/bzero/bcmp/index/rindex as inline functionsWaldemar Brodkorb
patch from OpenWrt. Reported-by: Leonid Lisovskiy <lly.dev@gmail.com>
2016-01-02remove deprecated architectures v850/i960Waldemar Brodkorb
Both architectures are more or less deprecated. No Linux upstream support, no gcc support for uClinux.
2016-01-01Add argp implementationSalvatore Cro
Argp is an advanced support for parsing unix-style argument vectors. In addition to the common getopt interface, it provides automatic response to `--help' and `--version' options and use of custom parser in conjunction with argp native option parser, among others. Argp support is required by elfutils package and prelink. In uClibc argp functionalities has been moved from C library to libuargp.so Further the libc.so linker script contains an AS_NEEDED entry so that it doesn't need to link libuargp.so explicitely. Disable argp test if feature disabled. Signed-off-by: Salvatore Cro <salvatore.cro@st.com> Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>