summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
AgeCommit message (Collapse)Author
2010-03-25prettify make cleanBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-03-05pull kernel-features.h from NPTLBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-03-04poll: unavailable on linux < 2.2.0Bernhard Reutner-Fischer
fixes bug #253 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-02-10libc: Add a common sysdep headerCarmelo Amoroso
Add a common header file to provide macros useful in asm code: C_LABEL to construct the asm name for a C symbol cfi_xxx to generate eh_frame unwind information. Ported from NPTL branch. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-02-05getdents: Fix mips64 buildAtsushi Nemoto
On Wed, 27 Jan 2010 07:14:08 +0100, Carmelo AMOROSO <carmelo.amoroso@st.com> wrote: > I would re-write your patch in a simpler way. > > We already have the following > > 136 #if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64 > 137 attribute_hidden strong_alias(__getdents,__getdents64) > 138 #endif > > I think that it's simpler to move in the proper place this statement. Thanks, indeed. If we came into "#elif WORDSIZE == 32" block, above condition never be true. So we can just move this statement out of "#if...#elif...#elif...#endif" block. Here is a revised patch. ------------------------------------------------------ From: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Subject: [PATCH] getdents: Fix mips64 build Some archs (such as mips64) do not have getdents64 syscall but have getdents syscall. Define alias for it. This fixes regression from 0.9.30.1. Backgrounds: This is once done by commit e8b1c674. But after the commit 33bcf733 ("Use getdents syscall if kernel provide supports for this instead of relying upon getdents64."), if __ASSUME_GETDENTS32_D_TYPE was defined the alias for getdents64 is not defined. The macro __ASSUME_GETDENTS32_D_TYPE had been effectively ignored until 0.9.30.1 but the commit 0f0f20ab ("Move kernel-features.h header from the linuxthread directory to a common one...") really enables it. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-02-05prctl: silence shadow warningsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-02-02remove two checks for gettimeofday errorDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-02time,times: stop interpreting negative return values ar errorsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-22silence warning about implicit decl of sysctlBernhard Reutner-Fischer
... and reinstate comment explaining the gory details Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-01-16futimens: add missing local prototypeBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-12-19x86_64: fix multiple definition of chk functionsAustin Foxley
also enable __chk_fail and only try to call it when SSP is on Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-11-30uClibc_ctype.h: fix inverted check for susv4 macroAustin Foxley
Was causing build failures if ctype tables were disabled and susv4 was on Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-11-26sync confname, environments with glibcBernhard Reutner-Fischer
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>
2009-11-25in6_{pktinfo,mtuinfo}: provide type if IPV6 is onBernhard Reutner-Fischer
Disable some IPv6 header defines if IPv6 is off. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-23bits/mmap.h: unify ala linux asm-generic effortsMike Frysinger
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>
2009-11-23futimens: Ducument why we need manual hidden_protoBernhard Reutner-Fischer
Also, remove unneeded __need_timespec (It cuts off a tiny bit of work for CPP but is of course not strictly needed). Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-20futimens: add functionBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-20ppoll: get NULL from stddef.hBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-19SUSv4: disable isascii, toascii, _toupper, _tolowerBernhard Reutner-Fischer
[__]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>
2009-11-19DO_XSI_MATH: add config knobBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-19_Exit(): add weak alias to _exit() for C99Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-10-22disable _POSIX_SPAWN defineMike Frysinger
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>
2009-10-22sysctl: avoid inline initializationMike Frysinger
Assign each field one by one rather than stack initialization as gcc will call memset() to zero out the rest of the structure -- which we don't care about as the field is unused and not seen outside of the libc. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-08utime() is obsolescent in SUSv4Bernhard Reutner-Fischer
LEGACY was removed for utimes() in SUSv4 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-10-08Fix building arm EABIBernhard Reutner-Fischer
The syscall() impl on aeabi comes from syscall-eabi.S thus we do not need the generic syscall() impl. Fixes: AS libc/sysdeps/linux/arm/syscall-eabi.os CC libc/sysdeps/linux/common/syscall.os libc/libc_so.a(syscall.os): In function `syscall': syscall.c:(.text+0x0): multiple definition of `syscall' libc/libc_so.a(syscall-eabi.os):(.text+0x0): first defined here Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-10-07clean up O_CLOEXEC handlingMike Frysinger
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>
2009-10-05descriptive error messageBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-09-21add timerfd syscall and headerStephan Raue
Signed-off-by: Austin Foxley <austinf@cetoncorp.com> Signed-off-by: Stephan Raue <mailinglists@openelec.tv>
2009-09-19sigpause: remove libc_hidden_proto/defDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-19remove a few more empty #if/#endif pairsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-18convert // comments to /**/; remove empty #if/#endif pairs. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-18trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer
sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *) sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *) should be a nop Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-09-06fstatat: fix up behavior on 32/64 bit hostsMike Frysinger
The fstatat() syscall is a little funky in that it sometimes changes name between 32 and 64 bit hosts, but it should always operate on a 64bit stat structure. So for the fstatat() function, make sure we convert it from a 64bit kstat to a 32bit stat. Along these lines, we need to restore the __xstat32_conv() function. Reported-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-06xstatconv: drop useless hidden codeMike Frysinger
The xstatconv.h header already sets up hidden prototypes for us, so no need to duplicate the code. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-08-31drop last _syscall6 checksMike Frysinger
If your arch does not support _syscall6(), it is broken anyways. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-08-30honour NO_LONG_DOUBLE_MATHBernhard Reutner-Fischer
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>
2009-08-05handle _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLNBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-08-01ioperm is not used internally, remove hidden_protoBernhard Reutner-Fischer
Without a hidden_def we'd end up with __GI_ioperm which is wrong. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-07-26force arches to provide sys/user.hMike Frysinger
Now that Linux is no longer installing linux/user.h, arches will have to provide their own. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-26enable nanosecond stat support for everyoneMike Frysinger
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>
2009-07-26enable sbrk() for everyoneMike Frysinger
The sbrk() function can be used to merely query sizes and for that, no-mmu works the same as mmu. It can also sometimes increase data segments on no-mmu systems provided the trailing memory is free. So, there is no real reason to exclude this function for no-mmu ports. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-26add missing UTIME_* defines for *at funcsMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-23create real common vfork() functionMike Frysinger
Rather than force people to always implement their own vfork(), have the default implementation be sane. For now, only the Blackfin port uses the new code. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-22add hidden aliases for openat funcsMike Frysinger
openat64() uses openat(), so we need hidden aliases for it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-21byteswap: unify common definitionsMike Frysinger
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>
2009-07-21s/UCLIBC_INTERNAL/_LIBC/gDenys Vlasenko
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>
2009-07-20some ports define ENOTSUPMike Frysinger
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>
2009-07-20INLINE_SYSCALL_NCS: scope out local vars to avoid conflictsMike Frysinger
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>
2009-07-20fdatasync: handle latest alpha syscallsMike Frysinger
The latest alpha Linux kernel defines __NR_fdatasync like everyone else and deprecates the older __NR_osf_fdatasync, so support that setup. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-20first pass at implementing *at funcsMike Frysinger
Tested basic functionality with coreutils and things seem to work. At least gives us a basis to jump from. Signed-off-by: Mike Frysinger <vapier@gentoo.org>