summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/common
Commit message (Collapse)AuthorAgeFilesLines
* lstat/stat/fstat: Use 64bit version of syscall if availablemasterKhem Raj2012-02-053-13/+42
| | | | | | | | | | | | This is needed for stat'ing loop devices > 255 since otherwise kernel returns EOVERFLOW becasue it needs st_rdev/st_dev to be larger than 16bits but in kernel it uses __old_kernel_stat for stat syscall which has st_rdev/st_dev as unsigned short Add a testcase Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Declare __err and pass it to INTERNAL_SYSCALL_NCS so subsequent macros can ↵Khem Raj2012-02-051-2/+2
| | | | | | use it Signed-off-by: Khem Raj <raj.khem@gmail.com>
* tmpnam, tempnam are obsolete in SUSV4Bernhard Reutner-Fischer2012-01-291-1/+3
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* *: silence some warningsBernhard Reutner-Fischer2012-01-261-8/+14
| | | | | | warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stubs: mark stubs as usedBernhard Reutner-Fischer2012-01-181-0/+1
| | | | | | | Avoids warning from -Wunused-function about the alias target that is only used at link-time. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc: do not rely upon ulimit kernel syscall.Carmelo Amoroso2011-11-231-8/+0
| | | | | | | | | | | | On several architectures __NR_ulimit syscall number is currently defined but it is remapped onto sys_ni_syscall, while on other architectures they are not longer defined. So use {get,set}rlimit only to implement ulimit interface. It fixes LTP ulimit01 test case. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> Acked-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc: flesh out linux scheduler functionsHenning Heinold2011-11-077-17/+198
| | | | | | | Most stuff was taken from the eglibc. Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ldso: support RTLD_NOLOADTimo Teräs2011-11-071-2/+2
| | | | | | | | So application query if specified module is loaded or not with dlopen. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Add stub for eventfd.Jean-Christian de Rivaz2011-11-041-0/+4
| | | | | | | Warn if the enventfd() function is not implemented. Signed-off-by: Jean-Christian de Rivaz <jc@eclis.ch> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libm: implement a generic sincos().William Pitcock2011-11-041-1/+1
| | | | | | | We already provide sincos() on some archs, so we should ship a generic version. Signed-off-by: William Pitcock <nenolod@dereferenced.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* setegid: use setresgid conditionallyBernhard Reutner-Fischer2011-11-021-0/+6
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stubs: remove leftover undefsBernhard Reutner-Fischer2011-11-021-61/+0
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stubs: handle linux module functionsBernhard Reutner-Fischer2011-11-022-4/+5
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stubs: handle linux-specificBernhard Reutner-Fischer2011-11-022-19/+184
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stubs: fix inverted socket logicBernhard Reutner-Fischer2011-11-021-19/+19
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* stubs: undef linux specific unless they were asked forBernhard Reutner-Fischer2011-11-021-0/+34
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Add eventfd support.Jean-Christian de Rivaz2011-10-313-1/+68
| | | | | | | | | | | | Hello, I whould like to share this simple patch that add the eventfd call to uClibc. Please review so it can be accepted to be merged. Jean-Christian Signed-off-by: Jean-Christian de Rivaz <jc@eclis.ch> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Fix __libc_epoll_pwait compile failure on x86Phil Blundell2011-06-101-2/+3
| | | | | | | | | | | | | | This prevents "memory input 7 is not directly addressable" errors. | libc/sysdeps/linux/common/epoll.c: In function '__libc_epoll_pwait': | libc/sysdeps/linux/common/epoll.c:71:80: error: memory input 7 is not directly addressable | libc/sysdeps/linux/common/epoll.c:75:86: error: memory input 7 is not directly addressable | make: *** [libc/sysdeps/linux/common/epoll.o] Error 1 | make: *** Waiting for unfinished jobs.... Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Jason Woodward <jason.woodward@timesys.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* libc: make common longjmp usable with NPTLFilippo Arcidiacono2011-05-271-2/+2
| | | | | | | | Call _longjmp_unwind conditionally under NPTL config option, making longjmp usable with NPTL. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* sh: use the common implementation for longjmpFilippo Arcidiacono2011-05-271-1/+1
| | | | | Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* unwind.h: Move to libc/sysdeps from nptl sysdepsKhem Raj2011-05-131-0/+220
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* epoll: redo cancellation to match masterBernhard Reutner-Fischer2011-05-131-15/+32
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* epoll.c: add cancellation to epoll_[p]wait()Peter S. Mazinger2011-05-131-4/+21
| | | | | | | While there, fix epoll_pwait syscall, it takes 6 arguments Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* NPTL: needs madvise internallyBernhard Reutner-Fischer2011-05-121-4/+3
| | | | | | | This fixes 8d09a50a044638fde2ed3e1a1c4d3c7c5a3cce5c since NPTL also uses madvise internally. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* socket: fix stubsBernhard Reutner-Fischer2011-05-121-19/+19
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* epoll: unify epoll.hBernhard Reutner-Fischer2011-05-111-2/+24
|
* Implement epoll_create1 and epoll_pwait system calls.Thierry Reding2011-05-112-4/+52
| | | | | | | Note: TODO: This lacks cancellation support. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* add pipe2()Bernhard Reutner-Fischer2011-05-114-1/+39
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* socketcalls: add stubsBernhard Reutner-Fischer2011-05-111-0/+94
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* accept4: Implement cancellationBernhard Reutner-Fischer2011-05-112-0/+16
| | | | | | | .. and add proper prototype, move it into it's own obj and other such cleanups. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* getcwd: Fix memory-leak in error pathBernhard Reutner-Fischer2011-05-101-1/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: prettify ssp.c handlingBernhard Reutner-Fischer2011-05-031-4/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* madvise is LINUX_SPECIFICBernhard Reutner-Fischer2011-05-031-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* __rt_sigwaitinfo: depends on HAS_REALTIMEBernhard Reutner-Fischer2011-04-291-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: fix GNU make v3.80 compatibility againKevin Cernekee2011-04-131-2/+6
| | | | | | | | GNU make 3.80 cannot handle "$(and)" or "$(or)" from commit 18e7136e (buildsys: use kbuild style). Replace them with ifeq/ifneq. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* lutimes.c, stubs.c: fix compiling lutimes, if __NR_utimensat is not definedPeter S. Mazinger2011-03-192-1/+9
| | | | | | | | while there, provide stubs for functions depending on utimensat syscall. Reported-by: Sedat Dilek <sedat.dilek@googlemail.com> Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* nanosleep.c: remove duplicated libc_hidden_protoPeter S. Mazinger2011-03-101-1/+0
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* remove trailing ';' from _syscallX()Peter S. Mazinger2011-03-091-1/+1
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* bits/statvfs.h: update, adding ST_RELATIMEPeter S. Mazinger2011-03-091-2/+4
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* types.h: remove __ipc_pid_tPeter S. Mazinger2011-03-091-5/+0
| | | | | | | Remove __ipc_pid_t, not needed internally, we do not support pre glibc-2.2 version of shmid_ds structure. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* guard *_chk() related stuff with UCLIBC_HAS_FORTIFYPeter S. Mazinger2011-03-092-2/+6
| | | | | | | | | | | | Guard x86_64 memset_chk/memcpy_chk be guarded by UCLIBC_HAS_FORTIFY. Compile ssp.c if one of SSP/FORTIFY is defined. Guard __chk_fail() with UCLIBC_HAS_FORTIFY and move its prototype to libc-internal.h. Disable _FORTIFY_SOURCE if UCLIBC_HAS_FORTIFY is not set. The config option itself is omitted on purpose, headers need to be reviewed and generic *_chk() functions need to be first provided. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* The C6X portAurelien Jacquiot2011-03-051-0/+1
| | | | | | | | This adds support for the TI C6X family of processors. Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: Aurelien Jacquiot <a-jacquiot@ti.com> Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
* provide internal hidden version of __fcntl_nocancelPeter S. Mazinger2011-03-031-0/+1
| | | | | | guard the prototype with _LIBC, it is only for internal use Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* add _dl_errno support to errno.h, cleanupPeter S. Mazinger2011-03-031-43/+0
| | | | | | | | Add support to use errno.h in ldso. Move __set_errno into _LIBC guard. Remove uClibc_errno.h, unused. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* simplify guard of uClibc internalsPeter S. Mazinger2011-03-031-1/+1
| | | | | | Simplify guard of uClibc internals, since _LIBC sections are removed on install. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* remove ucontext.h and guard sigstack structure with SUSV4_LEGACY and ↵Peter S. Mazinger2011-03-031-0/+2
| | | | | | | | | | STRICT_HEADERS Remove ucontext.h if SUSV4_LEGACY is not set and fix it's references. Guard sigstack structure with SUSV4_LEGACY and STRICT_HEADERS. Disable sigstack function prototype, it is not provided by uClibc. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* remove error handling from some syscallsPeter S. Mazinger2011-03-039-51/+33
| | | | | | | Remove error handling from getegid/getgid/geteuid/getuid/getppid/getpid/getpgrp Use strong_alias if fallbacks are needed Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* fix stubsPeter S. Mazinger2011-03-031-5/+1
| | | | | | We use enosys_stub only in this file so make it static Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* Correct ssp codePeter S. Mazinger2011-03-031-1/+2
| | | | | | | | Avoid using strong_alias in ssp, some archs dislike it. Make stack_chk_guard static. Export __stack_smash_handler only if compatibility option is enabled. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* add missing prototypesPeter S. Mazinger2011-03-031-0/+4
| | | | | | Add some missing prototypes Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>