summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/common
Commit message (Collapse)AuthorAgeFilesLines
* futimens: add functionBernhard Reutner-Fischer2009-11-222-0/+25
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* ppoll: get NULL from stddef.hBernhard Reutner-Fischer2009-11-221-3/+2
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* SUSv4: disable isascii, toascii, _toupper, _tolowerBernhard Reutner-Fischer2009-11-221-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* DO_XSI_MATH: add config knobBernhard Reutner-Fischer2009-11-221-0/+2
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* _Exit(): add weak alias to _exit() for C99Bernhard Reutner-Fischer2009-11-221-0/+1
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* 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>
* sysctl: avoid inline initializationMike Frysinger2009-11-091-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* whitespace fixesAustin Foxley2009-10-175-6/+5
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* utime() is obsolescent in SUSv4Bernhard Reutner-Fischer2009-10-163-1/+5
| | | | | | | LEGACY was removed for utimes() in SUSv4 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* clean up O_CLOEXEC handlingMike Frysinger2009-10-161-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* descriptive error messageBernhard Reutner-Fischer2009-10-161-1/+1
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.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> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Revert part of ecd7069ac6Austin Foxley2009-09-251-0/+2
| | | | | | This seemingly harmless warning fix causes mutex use in libc to crash... Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* spent this morning beating i386 nptl into shapeAustin Foxley2009-09-221-0/+4
| | | | | | Got it compiling thus far, still working on getting it to run Signed-off-by: Austin Foxley <austinf@cetoncorp.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>
* not-cancel: use *_not_cancel variants directlyAustin Foxley2009-09-211-0/+19
| | | | | | add a no threads version of not-cancel.h to fallback on Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* uClibc_mutex.h: define non-thread versions of all the io-mutex macrosAustin Foxley2009-09-211-5/+12
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* warning fixesAustin Foxley2009-09-211-2/+0
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* guard sysdep-cancel.h include under defineAustin Foxley2009-09-201-0/+6
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* guard sysdep.h include with correct defineAustin Foxley2009-09-201-1/+1
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* remove a few more empty #if/#endif pairsDenys Vlasenko2009-09-182-7/+0
| | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* trim Experimentally off and uncommented hiddenAustin Foxley2009-09-1886-147/+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: Austin Foxley <austinf@cetoncorp.com>
* fstatat: fix up behavior on 32/64 bit hostsMike Frysinger2009-09-184-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* xstatconv: drop useless hidden codeMike Frysinger2009-09-181-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* drop last _syscall6 checksMike Frysinger2009-09-032-2/+2
| | | | | | | If your arch does not support _syscall6(), it is broken anyways. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* honour NO_LONG_DOUBLE_MATHBernhard Reutner-Fischer2009-09-031-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* handle _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLNBernhard Reutner-Fischer2009-08-191-0/+5
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* ioperm is not used internally, remove hidden_protoBernhard Reutner-Fischer2009-08-191-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* force arches to provide sys/user.hMike Frysinger2009-08-191-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* enable nanosecond stat support for everyoneMike Frysinger2009-08-192-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* enable sbrk() for everyoneMike Frysinger2009-08-191-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* add missing UTIME_* defines for *at funcsMike Frysinger2009-08-191-1/+6
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* create real common vfork() functionMike Frysinger2009-08-191-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* add hidden aliases for openat funcsMike Frysinger2009-08-192-0/+14
| | | | | | | openat64() uses openat(), so we need hidden aliases for it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* byteswap: unify common definitionsMike Frysinger2009-08-192-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* s/UCLIBC_INTERNAL/_LIBC/gDenys Vlasenko2009-08-191-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* some ports define ENOTSUPMike Frysinger2009-08-191-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* INLINE_SYSCALL_NCS: scope out local vars to avoid conflictsMike Frysinger2009-08-191-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* first pass at implementing *at funcsMike Frysinger2009-08-1917-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* fdatasync: handle latest alpha syscallsMike Frysinger2009-08-191-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* mknod: convert to INLINE_SYSCALL() to sync with glibcMike Frysinger2009-08-191-12/+6
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* ppoll: switch to INLINE_SYSCALL() to match glibcMike Frysinger2009-08-191-11/+2
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* syscall(): create a common version based on INLINE_SYSCALL_NCS()Mike Frysinger2009-07-091-0/+12
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* 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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* drop missing {INLINE,INTERNAL}_SYSCALL fallback logicMike Frysinger2009-07-098-102/+0
| | | | | | | | Ports missing INLINE_SYSCALL() support need to get fixed, so drop the cruft keeping them alive since it no longer works with the unification. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* syscall: unify common syscall definesMike Frysinger2009-07-092-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* uClibc_arch_features: sync defines between portsMike Frysinger2009-07-091-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* waitid: linux ABI takes 5 args, not 4Mike Frysinger2009-06-051-5/+52
| | | | | | | | | The POSIX waitid() takes 4 args, but the Linux one takes 5 args, so make sure we stuff the 5th arg with a NULL. Otherwise garbage gets randomly passed up and considering this is a pointer, that's baaaad. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* sparc32 nptl functionalaustinf2009-03-191-0/+4
| | | | | | | | | * pulled updated asm and headers from glibc for sparc32 * probably no cancellation support yet * no shared TLS relocs yet, since ldso is hosed on sparc still note: didn't use TARGET_SUBARCH method of includes since that would cause other parts of libc to fail currently. Will need to be fixed later.