summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/common/bits
Commit message (Collapse)AuthorAgeFilesLines
* math: isnan is a C99 featureHenning Heinold2010-08-051-6/+5
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de>
* nptl: _POSIX_IPV6 depends on UCLIBC_HAS_IPV6Bernhard Reutner-Fischer2010-08-021-0/+8
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* new helper funcs for alloca/malloc with mmu/nommuMike Frysinger2010-07-271-0/+26
| | | | | | | | | | | | | The rpc rcmd code has some ugly ifdef mazes to handle mmu/nommu differences just to select alloca or malloc. Unify those with some helper macros in a new header, and then convert the rcmd code over to it. This is all geared towards fixing the getdents helper functions which only use alloca() atm. Now that we have helper functions, convert the getdents functions over too. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reviewed-by: Steven J. Magnani <steve@digidescorp.com>
* remove trailing comma in enumBernhard Reutner-Fischer2010-07-271-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* include/param.h: Dont use ARG_MAX from kernel headersKhem Raj2010-07-091-1/+9
| | | | | | | * Use getrlimit for ARG_MAX in sysconf on nptl. * Define NCARGS directly instead of ARG_MAX Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Revert "don't make __errno_location / __h_errno_location hidden"Austin Foxley2010-07-062-0/+4
| | | | | | | | This reverts commit 0d6ee549bc86fd330672a79d9a87d2c3825eea67. We need to find a solution that will work in shared and static libraries Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* don't make __errno_location / __h_errno_location hiddenPeter Korsgaard2010-07-052-4/+0
| | | | | | | | | | | | | Closes #2089 (https://bugs.busybox.net/show_bug.cgi?id=2089) __errno_location / __h_errno_location access has to go through the PLT like malloc/free, so the linuxthread variants gets used instead when compiling with -pthread. Based on http://github.com/mat-c/uClibc/commit/328d392c54aa5dc2b8e7f398a419087de497de2b Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* remove extra comma in lock macroAustin Foxley2010-07-031-1/+1
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* bits/socket.h: add SOCK_CLOEXEC and SOCK_NONBLOCK supportVladimir Zapolskiy2010-06-011-1/+11
| | | | | | | | This patch adds support for SOCK_CLOEXEC and SOCK_NONBLOCK socket descriptor flags, which are introduced since Linux 2.6.27 Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* fix a few build errors for the no threads caseAustin Foxley2010-04-281-0/+1
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* nptl: fix libc internal, dynamically enabled lockingTimo Teräs2010-04-221-12/+5
| | | | | | | | | | | | | | | | | | | | | Final iteration to fix libc internal locking if libpthread is pulled in by dlopen call (directly or indirectly). We cannot really use the weak symbol trick for shared build, since the symbols won't get refreshed if libpthread is pulled in dynamically. In glibc, they have #ifdef SHARED magic to either use pthread_functions table, or weaks. But as we shared object files with both builds, this does not sounds good either. The reintroduces the libc weaks.c, but uses them now only with static build. For dynamic build, we still use the symbols with same name, but provide weaks in forward.c so they end up dereferencing the pthread_functions table indirectly if we are not linked to libpthread. Mutex initialization is hard coded as inline, as it needs to happen even if libpthread is not initially loaded. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* nptl: remove unneeded libc-lock.h includeTimo Teräs2010-04-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | I semi-accidentally added include for libc-lock.h because the intention was to use locking macroes from there. However, we ended up using using the weak alias stuff. This is additionally good since now this can result in compile errors like: In file included from /toolchain/include/bits/uClibc_mutex.h:16, from /toolchain/include/bits/uClibc_stdio.h:107, from /toolchain/include/stdio.h:72, from /work/freetype-2.3.11/include/freetype/config/ftstdlib.h:100, from ./builds/unix/ftconfig.h:43, from builds/unix/ftsystem.c:21: /toolchain/include/bits/libc-lock.h:309: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' Remove the unneeded include causing breakage. Reported-by: Kevin Day <thekevinday@gmail.com> Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* libc: remove libc weak __pthreads_* wrappersTimo Teras2010-04-162-8/+21
| | | | | | | | | | | | | | | | | It is not possible to override for libpthread to override the weak libc definitions. This has never worked in uclibc, and does no longer work in glibc either (unless you use LD_DYNAMIC_WEAK). The proper thing to do is have weak prototypes in libc, and definitions in libpthread only. This way libc runs even if those functions are not defined, but just needs to protect against the NULL values (done by implementing __uclibc_maybe_call). This fix the problems if libc is linked before libpthread or if libpthread is pulled by a dependency library. Signed-off-by: Timo Teras <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Merge commit 'origin/master' into nptlAustin Foxley2010-04-021-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile.in extra/Configs/Config.in libc/sysdeps/linux/common/bits/kernel-features.h libc/sysdeps/linux/common/poll.c libc/sysdeps/linux/common/sysdep.h libc/sysdeps/linux/sh/sysdep.h Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * pull kernel-features.h from NPTLBernhard Reutner-Fischer2010-03-051-18/+392
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * poll: unavailable on linux < 2.2.0Bernhard Reutner-Fischer2010-03-041-0/+5
| | | | | | | | | | | | fixes bug #253 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | update kernel-features.h with futex featuresAustin Foxley2010-02-191-0/+17
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | Assorted fixed to get nptl compiling on ARMKhem Raj2010-02-171-5/+0
| | | | | | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* | Merge commit 'origin/master' into nptlAustin Foxley2010-02-051-0/+17
|\| | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * time,times: stop interpreting negative return values ar errorsDenys Vlasenko2010-02-021-0/+17
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * uClibc_ctype.h: fix inverted check for susv4 macroAustin Foxley2009-11-301-1/+1
| | | | | | | | | | | | Was causing build failures if ctype tables were disabled and susv4 was on Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | kernel-features: add __ASSUME_POSIX_CPU_TIMERSBernhard Reutner-Fischer2010-02-051-0/+5
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | uClibc_ctype.h: fix inverted check for susv4 macroAustin Foxley2009-11-301-1/+1
| | | | | | | | | | | | Was causing build failures if ctype tables were disabled and susv4 was on Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | Merge remote branch 'origin/master' into nptlAustin Foxley2009-11-285-114/+214
|\| | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * sync confname, environments with glibcBernhard Reutner-Fischer2009-11-262-17/+102
| | | | | | | | | | | | | | Plus related synch. Add a testcase for the sysconf variables based on the one from glibc Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * in6_{pktinfo,mtuinfo}: provide type if IPV6 is onBernhard Reutner-Fischer2009-11-251-0/+2
| | | | | | | | | | | | Disable some IPv6 header defines if IPv6 is off. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * bits/mmap.h: unify ala linux asm-generic effortsMike Frysinger2009-11-232-97/+110
| | | | | | | | | | | | | | | | | | | | Most ports have the same exact mman bit defines, so let's unify things like the linux kernel has with the asm-generic efforts. A few ports are left behind as they are non-trivial to merge -- the arch maintainers can tackle it if they care. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | Merge remote branch 'origin/master' into nptl_mergeAustin Foxley2009-11-222-0/+4
|\| | | | | | | | | | | | | | | | | Conflicts: Rules.mak libc/misc/sysvipc/msgq.c test/Rules.mak Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * SUSv4: disable isascii, toascii, _toupper, _tolowerBernhard Reutner-Fischer2009-11-191-0/+2
| | | | | | | | | | | | | | [__]isascii need to be defined all the time for the build. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * DO_XSI_MATH: add config knobBernhard Reutner-Fischer2009-11-191-0/+2
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * disable _POSIX_SPAWN defineMike Frysinger2009-10-221-0/+2
| | | | | | | | | | | | | | We don't provide spawn.h let alone any other spawn funcs/types, so don't set up the _POSIX_SPAWN define that some packages (like vlc) check. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | disable _POSIX_SPAWN defineMike Frysinger2009-11-091-0/+2
| | | | | | | | | | | | | | | | We don't provide spawn.h let alone any other spawn funcs/types, so don't set up the _POSIX_SPAWN define that some packages (like vlc) check. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | cancellation support for a large amount of the required syscallsAustin Foxley2009-10-171-2/+2
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | rework internal uClibc mutexes to support futex locking, and nptlAustin Foxley2009-10-172-12/+84
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | some tweaks under libc/ needed for nptlAustin Foxley2009-10-171-15/+372
|/ | | | | | | | | | * updated kernel-features.h * system is provided by pt-system with nptl * _exit should do exit_group with nptl * tsd tls ptr in libc * rt_sigwaitinfo impl added Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* clean up O_CLOEXEC handlingMike Frysinger2009-10-071-0/+8
| | | | | | | Drop the "#ifndef O_CLOEXEC" cruft, enable O_CLOEXEC in most fcntl.h headers, and import __ASSUME_O_CLOEXEC from glibc. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* descriptive error messageBernhard Reutner-Fischer2009-10-051-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* convert // comments to /**/; remove empty #if/#endif pairs. no code changesDenys Vlasenko2009-09-181-4/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* honour NO_LONG_DOUBLE_MATHBernhard Reutner-Fischer2009-08-301-0/+6
| | | | | | | | This fixes compilation errors on hosts that turn off long double support for C99 like powerpc32. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* handle _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLNBernhard Reutner-Fischer2009-08-051-0/+5
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* enable nanosecond stat support for everyoneMike Frysinger2009-07-261-2/+2
| | | | | | | | | | | | | Fill out the stat structure so that the nanosecond resolution support is always available. There is a small code size increase for a few ports (three additional assignments in xstatconv), but otherwise everything should remain the same. While we're here, punt __old_kernel_stat from the few headers that still define it as it is unused in uClibc and causes compile errors after these nanosecond changes. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* add missing UTIME_* defines for *at funcsMike Frysinger2009-07-261-1/+6
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* byteswap: unify common definitionsMike Frysinger2009-07-212-87/+109
| | | | | | | | | The majority of the byteswap functions are the same across all arches, so setup a common header to provide definitions if they don't exist. This allows arches to override only the ones they actually want to implement with inline assembly. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* s/UCLIBC_INTERNAL/_LIBC/gDenys Vlasenko2009-07-211-2/+2
| | | | | | | | | | Undo my old mistake. I added UCLIBC_INTERNAL define, but later I realized _LIBC is doing exactly the same thing. This change converts all usages of UCLIBC_INTERNAL to _LIBC, removing all instances of UCLIBC_INTERNAL. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* some ports define ENOTSUPMike Frysinger2009-07-201-1/+3
| | | | | | | A port or two (like hppa) does define ENOTSUP, so don't assume that everyone needs this fallback define. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* INLINE_SYSCALL_NCS: scope out local vars to avoid conflictsMike Frysinger2009-07-201-6/+6
| | | | | | | | | | | The INLINE_SYSCALL_NCS() macro was using "res" and "err" as local variable names, but this caused conflicts with some code (like clock_getres) whose arguments were named the same. libc/sysdeps/linux/common/clock_getres.c: In function 'clock_getres': libc/sysdeps/linux/common/clock_getres.c:15: warning: 'res' is used uninitialized in this function Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* syscall: unify part 2: NCS varietyMike Frysinger2009-07-092-3/+17
| | | | | | | Declare common NCS (non-constant syscall) variants and convert the existing ports over to this. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* syscall: unify common syscall definesMike Frysinger2009-07-082-1/+83
| | | | | | | | | Unify all the common syscall defines in syscalls-common.h and scrub all the duplicated code from relevant ports. This should also make converting existing ports to INLINE_SYSCALL() much easier as they don't have to get lost in all the unrelated noise, as well as creating new ports. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* uClibc_arch_features: sync defines between portsMike Frysinger2009-07-031-0/+6
| | | | | | | Make sure each arch has the same complete list to make comparing between them easier. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* mathcalls.h: remove tons of redundant semicolons; better comment about macrosDenis Vlasenko2009-02-181-85/+87
| | | | | | | math.h: make macro machinery a bit more understandable No code changes (verified with objdump)