summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/common
Commit message (Collapse)AuthorAgeFilesLines
* prettify make cleanBernhard Reutner-Fischer2010-03-251-2/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.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-042-1/+7
| | | | | | fixes bug #253 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc: Add a common sysdep headerCarmelo Amoroso2010-02-101-0/+139
| | | | | | | | | | 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>
* getdents: Fix mips64 buildAtsushi Nemoto2010-02-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* prctl: silence shadow warningsBernhard Reutner-Fischer2010-02-051-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* remove two checks for gettimeofday errorDenys Vlasenko2010-02-021-4/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* time,times: stop interpreting negative return values ar errorsDenys Vlasenko2010-02-023-8/+24
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* silence warning about implicit decl of sysctlBernhard Reutner-Fischer2010-01-221-1/+3
| | | | | | ... and reinstate comment explaining the gory details Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* futimens: add missing local prototypeBernhard Reutner-Fischer2010-01-161-0/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* x86_64: fix multiple definition of chk functionsAustin Foxley2009-12-191-2/+1
| | | | | | also enable __chk_fail and only try to call it when SSP is on Signed-off-by: Austin Foxley <austinf@cetoncorp.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>
* 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>
* futimens: Ducument why we need manual hidden_protoBernhard Reutner-Fischer2009-11-231-1/+6
| | | | | | | 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>
* futimens: add functionBernhard Reutner-Fischer2009-11-202-0/+25
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ppoll: get NULL from stddef.hBernhard Reutner-Fischer2009-11-201-3/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.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>
* _Exit(): add weak alias to _exit() for C99Bernhard Reutner-Fischer2009-11-191-0/+1
| | | | 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>
* sysctl: avoid inline initializationMike Frysinger2009-10-221-17/+9
| | | | | | | | 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>
* utime() is obsolescent in SUSv4Bernhard Reutner-Fischer2009-10-083-1/+5
| | | | | | LEGACY was removed for utimes() in SUSv4 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Fix building arm EABIBernhard Reutner-Fischer2009-10-081-1/+1
| | | | | | | | | | | | | | 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>
* 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>
* add timerfd syscall and headerStephan Raue2009-09-213-1/+93
| | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com> Signed-off-by: Stephan Raue <mailinglists@openelec.tv>
* sigpause: remove libc_hidden_proto/defDenys Vlasenko2009-09-191-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* remove a few more empty #if/#endif pairsDenys Vlasenko2009-09-192-7/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* convert // comments to /**/; remove empty #if/#endif pairs. no code changesDenys Vlasenko2009-09-182-8/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer2009-09-1890-151/+1
| | | | | | | | 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>
* fstatat: fix up behavior on 32/64 bit hostsMike Frysinger2009-09-064-2/+32
| | | | | | | | | | | | 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>
* xstatconv: drop useless hidden codeMike Frysinger2009-09-061-4/+2
| | | | | | | 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>
* drop last _syscall6 checksMike Frysinger2009-08-312-2/+2
| | | | | | If your arch does not support _syscall6(), it is broken anyways. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* 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>
* ioperm is not used internally, remove hidden_protoBernhard Reutner-Fischer2009-08-011-1/+3
| | | | | | 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>
* force arches to provide sys/user.hMike Frysinger2009-07-261-1/+1
| | | | | | | 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>
* enable nanosecond stat support for everyoneMike Frysinger2009-07-262-18/+8
| | | | | | | | | | | | | 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>
* enable sbrk() for everyoneMike Frysinger2009-07-261-4/+0
| | | | | | | | | 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>
* add missing UTIME_* defines for *at funcsMike Frysinger2009-07-261-1/+6
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* create real common vfork() functionMike Frysinger2009-07-231-7/+13
| | | | | | | | | 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>
* add hidden aliases for openat funcsMike Frysinger2009-07-222-0/+14
| | | | | | openat64() uses openat(), so we need hidden aliases for it. 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>
* fdatasync: handle latest alpha syscallsMike Frysinger2009-07-201-1/+1
| | | | | | | 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>
* first pass at implementing *at funcsMike Frysinger2009-07-2017-0/+321
| | | | | | | 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>