summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2015-06-10h8300: 64bit integer supportYoshinori Sato
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-04-25Revert "Do not define unimplemented functions"Waldemar Brodkorb
This reverts commit bd3eaf83ef1b4954b6c0e7ba8bbdd29b2cd4a833. They are now implemented.
2015-04-24merge uClibc changesWaldemar Brodkorb
2015-04-22arm: Add BX and BXC macrosBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-04-15merge uClibc masterWaldemar Brodkorb
2015-04-14include/: ignore sys/random.h symlinkBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-29merge uClibc git masterWaldemar Brodkorb
2015-03-27include: update atomic.h from glibcBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-25include: Expand malloc-family commentsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-25utmp: favour POSIX utmpx over SVID utmpBernhard Reutner-Fischer
Note: _PATH_UTMPX == _PATH_UTMP and the utmp struct is identical to the utmpx struct so this only changes the external API entrypoints and NOT the underlying data source. This saves about 500b (~1300b from previously ~1950) while at it. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-24Revert "utent.c, wtent.c: move functions from utxent.c"Bernhard Reutner-Fischer
This reverts commit 84135275cfeebc0b233c1c96eeada4d4178a0b18. This change is said to make systemd deadlock (cannot reproduce this) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Conflicts: include/utmp.h
2015-03-18malloc.h: Add missing feature guardBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-18libm: Add missing C99 float/ld wrappersBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-17include: silence __leaf warningBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-13unistd.h: put getppid under XOPEN2K8Bernhard Reutner-Fischer
Add __LEAF to all __THROW, introduce non-leaf __THROWNL Adjust affected spots accordingly. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-12spawn.h: Fix !_GNU_SOURCE compilationBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-11add defines from GNU libc to fix ltrace compileWaldemar Brodkorb
Closes ticket #4. http://www.uclibc-ng.org/trac/ticket/4
2015-02-20sync with uClibcWaldemar Brodkorb
2015-02-20ARC: Remove unused EM_ARC_A5Vineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-20include/elf.h: bump EM_NUMBernhard Reutner-Fischer
and remove a few ancient entries Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-20elf: Add STT_GNU_IFUNC from glibcVineet Gupta
perf in upstream Linux kernel 3.17 onwards expects STT_GNU_IFUNC replicate it from glibc Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-20ARCv2 ISA supportVineet Gupta
This is next gen Instruction Set Architecture from Synopsys and basis for the ARC HS family of processors. http://www.synopsys.com/dw/ipdir.php?ds=arc-hs38-processor&elq_mid=5732&elq_cid=458802 http://www.synopsys.com/IP/ProcessorIP/ARCProcessors/arc-hs/Pages/default.aspx Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-16signal.h: elide memset from sigemptysetVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-16signal.h: elide memset from sigemptysetVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2015-02-14Revert "resolve merge"Waldemar Brodkorb
This reverts commit 6b6ede3d15f04fe825cfa9f697507457e3640344.
2015-02-14resolve mergeWaldemar Brodkorb
2015-02-07only advertise when choosenWaldemar Brodkorb
As discussed on the uClibc mailinglist, do not advertise when not activated. See this thread: http://lists.uclibc.org/pipermail/uclibc/2015-February/048766.html
2014-12-25merge upstream changesWaldemar Brodkorb
2014-12-25sync tcp header with glibcWaldemar Brodkorb
Nginx tries to find TCP_FASTOPEN, which is missing here.
2014-12-12unistd: allow to turn off getopt_longBernhard Reutner-Fischer
The GNU variant of getopt() previously had no way to turn off getopt_long() support.
2014-12-09Merge remote-tracking branch 'origin/upstream'Waldemar Brodkorb
2014-12-09sigaction: Fix !HAS_REALTIME compilationBernhard Reutner-Fischer
In file included from ./include/signal.h:279:0, from libc/sysdeps/linux/x86_64/sigaction.c:22: ./include/bits/sigaction.h:32:29: error: unknown type name 'siginfo_t' void (*sa_sigaction)(int, siginfo_t *, void *); Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-09-26Do not define unimplemented functionsCristian Morales Vega
e.g. fminf() is not implemented, only fmin(), but both are defined. Signed-off-by: Cristian Morales Vega <cristian@samknows.com>
2014-09-22xtensa: add support for NPTLWaldemar Brodkorb
Changes from: https://github.com/foss-xtensa/uClibc/commits/xtensa_nptl Author: Chris Zankel <chris@zankel.net> Author: Baruch Siach <baruch@tkos.co.il>
2014-09-09libc: add fallocate() and fallocate64()Anthony G. Basile
We add the Linux-specific function fallocate() which allows the user to directly manipulate allocate space for a file. fallocate() can operate in different modes, but the default mode is equivalent to posix_fallocate() which is specified in POSIX.1. Recent releases of e2fsprogs 1.42.11 and above expect fallocate64() to be available. Signed-off-by: Anthony G. Basile <blueness@gentoo.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-08-26timex: Sync with glibcKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-08-26Define IPTOS_CLASS_* macros according to RFC 2474Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-08-25Add clock_adjtime syscallKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-08-18libc: add issetugid()Anthony G. Basile
issetugid() returns 1 if the process environment or memory address space is considered tainted, and returns 0 otherwise. This happens, for example, when a process's privileges are elevated by the setuid or setgid flags on an executable belonging to root. This function first appeard in OpenBSD 2.0 and is needed for the LibreSSL. This patch follows the same logic as the equivalent musl commit. For more information see the commit message at http://git.musl-libc.org/cgit/musl/commit/?id=ddddec106fd17c3aca3287005d21e92f742aa9d4 Signed-off-by: Anthony G. Basile <blueness@gentoo.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-08-18NPTL: ARC supportVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-04-23weak symbols need to be "defined" weak but "declared" strongVineet Gupta
Patch "LT.old: Make __errno_location/__h_errno_location thread safe" uncovered yet another bug with static linking and errno (hopefully this is last of them all). Currently, __errno_location is declared weak but is defined strong. While this provides with the desired weak semantics in dso, it is subtly broken in static links. Quoting Joern Rennecke (ARC gcc expert): | I think the issue is that you declare the function as weak in the | header file. That is a rare instance where you want the reference | use declaration that differs a bit from the definition. | If the reference uses a weakly declared function, that creates a | weakref, i.e. the linker won't bother to look for this symbol at | all - if it gets linked in for some other reason, fine, | otherwise, it stays zero. So the solution to declare strong, define weak. Supporting data ----------------- orig code: ARM mmap wrapper (LT.old build + my prev patch for errno) _mmap: @ args = 8, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 stmfd sp!, {r4, r5, r7, lr} ldr r5, [sp, #20] movs ip, r5, asl #20 beq .L2 bl __errno_location(PLT) mov r3, #22 str r3, [r0, #0] mvn r0, #0 ... ... .weak __errno_location A statically linked hello world program which uses mmap too. As we can see__errno_location is completely gone - which is semantically wrong - we need functional errno. 00008274 <__GI_mmap>: 8274: e92d40b0 push {r4, r5, r7, lr} 8278: e59d5014 ldr r5, [sp, #20] 827c: e1b0ca05 lsls ip, r5, #20 8280: 0a000004 beq 8298 8284: e320f000 nop {0} ^^^^^^^^^^ 8288: e3a03016 mov r3, #22 828c: e5803000 str r3, [r0] 8290: e3e00000 mvn r0, #0 This in turn is due to a fixup in ARM ld which transforms branch-to-null into a nop. It is better than crashing but still wrong since errno handling is removed. With the patch, errno_location is restored back in test program. 00008274 <__GI_mmap>: 8274: e92d40b0 push {r4, r5, r7, lr} 8278: e59d5014 ldr r5, [sp, #20] 827c: e1b0ca05 lsls ip, r5, #20 8280: 0a000004 beq 8298 <__GI_mmap+0x24> 8284: eb000010 bl 82cc <__errno_location> 8288: e3a03016 mov r3, #22 828c: e5803000 str r3, [r0] Cc: Christian Ruppert <christian.ruppert@abilis.com> CC: Francois Bedard <Francois.Bedard@synopsys.com> Cc: Anton Kolesov <Anton.Kolesov@synopsys.com> Cc: Joern Rennecke <joern.rennecke@embecosm.com> Cc: Jeremy Bennett <jeremy.bennett@embecosm.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Peter Korsgaard <peter@korsgaard.com> Cc: Khem Raj <raj.khem@gmail.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-04-23LT.old: Make __errno_location/__h_errno_location thread safeVineet Gupta
WHY: errno in uClibc is not thread safe HOW: __errno_location and it's sibling __h_errno_location need to be called via PLT - even from within libc. That way when linked with pthread, intra-uClibc callers will also use the thread safe version. This is achieved by removing the GI alias for these functions, ensuring that they get called normally (via PLT) Verified with ARC LT.old and ARM cubieboard2 buildroot (LT.old) NPTL is unaffected by this bug. ------------ History behind this patch --------------------- This is a long standing bug (https://bugs.busybox.net/show_bug.cgi?id=2089) Others have tried to fix it in past (alteast Peter Korsgaard's patch in 2010), but somehow failed to be merged (or were backed out afterwards). http://lists.uclibc.org/pipermail/uclibc/2010-July/044176.html One of the causes could be side effect of atleast one more bug related to pthreads and static link which has now been fixed. http://lists.uclibc.org/pipermail/uclibc/2013-October/047958.html I have solved this w/o looking at other pacthes but would like to give credit to Peter and others for confirming that it makes sense. Cc: Christian Ruppert <christian.ruppert@abilis.com> CC: Francois Bedard <Francois.Bedard@synopsys.com> Cc: Joern Rennecke <joern.rennecke@embecosm.com> Cc: Jeremy Bennett <jeremy.bennett@embecosm.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Peter Korsgaard <peter@korsgaard.com> Cc: Khem Raj <raj.khem@gmail.com> Cc: buildroot@busybox.net Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-04-09ctype.h: Tweak commentBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-04-04sysinfo.h: Prevent redeclarationsBernhard Reutner-Fischer
Guard against duplicate inclusion. We should go back to just including the linux/sysinfo.h .. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-04-02libc: Fix buglet around __prognameBernhard Reutner-Fischer
508b20ead1710e8c295630d096960e51a65b7e5d disentangled program_invocation_name and __progname but forgot to make __progname conditional on __UCLIBC_HAS___PROGNAME__, resulting in getconf attempting to re-define __progname in case __UCLIBC_HAS___PROGNAME__ was not defined. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-12-23elf: Add ARC Magic and RelocationsVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-11-06pull kconfig from linux-3.11Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-11-06Fix weak/strong attribute of __errno_location and it's __GI aliasVineet Gupta
A simple statically linked hello world program was segfaulting for ARC in linuxthreads.old configuration (although the root casue applies cross-arch for NPTL as well as linuxthreads.old as described) The crash was due to branch to NULL in _stdio_init 0001026c <_stdio_init>: 1026c: push_s blink 1026e: st.a r13,[sp,-8] 10272: bl.d 0 --> supposed call to __errno_location The call was NOT getting patched to libc internal only alias __GI___errno_location, because it was weak while it's exported cousin, __errno_location was strong/normal. arc-linux-uclibc-nm libc/misc/internals/__errno_location.os 00000000 W __GI___errno_location 00000000 T __errno_location This is exactly opposite to what is expected. Quoting Peter S. Mazinger, commit 87936cd013041 "errno and *_init cleanup" | The rule adopted: | for enabled threads we make in libc the __GI_x() variants strong, x() weak | and (should) provide another strong x() in libpthread. | If threads are disabled, even the __GI_x() variants are weak. With the fix, we see the right settings as below 00000000 T __GI___errno_location 00000000 W __errno_location Note that problem won't show up in a static busybox build as it references errno and that seems to elide the issue. I can confirm the same/more issues with latest ARM buildroot builds w/o my fix. (1). linuxthreads.old (broken just like ARC) arm-linux-nm uclibc-snapshot/libc/misc/internals/__errno_location.os 00000000 W __GI___errno_location 00000000 T __errno_location But presumably the issue there is NOT catestrophic because ARM linker is likely smarter and patches a NOP instead of NULL branch. 00008388 <_stdio_init>: 8388: e92d4038 push {r3, r4, r5, lr} 838c: e320f000 nop {0} (2) NPTL build (exported version is not weak) 00000000 T __GI___errno_location 00000000 T __errno_location This causes a static link with libpthread and test program referencing errno to fail to link. #include <errno.h> int main(void) { printf("%d\n", errno); } arm-linux-gcc -static -pthread -o tst tst.o arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libc.a(__errno_location.os): In function `__errno_location': __errno_location.c:(.text+0x0): multiple definition of `__errno_location' arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libpthread.a (errno_location.os):errno_location.c:(.text+0x0): first defined here Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-06-14libc: hide obstack relocationsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-06-14libc/misc/gnu/obprintf.c: implement obstack_printf and obstack_vprintfAnthony G. Basile
This adds a straight forward implementation for obstack_printf and obstack_vprintf on uClibc's already existing obstack_grow and vasprintf. It does not attempt to port over glibc's implementation in terms of _IO_* structs and functions. Signed-off-by: Anthony G. Basile <blueness@gentoo.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>