summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
AgeCommit message (Collapse)Author
2013-04-01linux: use OFF64_HI_LO rather than __LONG_LONG_PAIRMike Frysinger
This macro takes care of the shift/mask split for us, so no need to open code this ourselves and then use __LONG_LONG_PAIR. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-04-01mips: only define SYSCALL_ALIGN_64BIT for O32 ABIsMike Frysinger
The 64bit register alignment issue only affects the O32 ABI, so wrap the define accordingly. We don't want this being used for N32 ABIs. This doesn't directly affect the N64 ABI since these files wouldn't even be compiled for those targets (no need for the 32bit/64bit shim). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-04-01libc: rename TRUNCATE64_HAS_4_ARGS to SYSCALL_ALIGN_64BITMike Frysinger
The reason truncate64 takes 4 args on some arches is that their ABI requires 64bit values to be aligned on register pair boundaries. Since this alignment affects more than just truncate64, rename the define to properly document its purpose. This also allows us to expand it to the other impacted syscalls (which will be done in a follow up commit). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-03-22libc: Fix common-generic stat.h for BEMischa Jonker
Signed-off-by: Mischa Jonker <mjonker@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14libc: switch several users to unlikely()Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14metag: Add NPTL supportMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14libm: Add support for the Meta architectureMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14Add support for the Meta architectureMarkos Chandras
Meta cores are 32-bit, hardware multithreaded, general purpose, embedded processors which also feature a DSP instruction set, and can be found in many digital radios. They are capable of running different operating systems on different hardware threads, for example a digital radio might run RTOSes for DAB decoding and audio decoding on 3 hardware threads, and run Linux on the 4th hardware thread to manage the user interface, networking etc. HTPs are also capable of running SMP Linux on multiple hardware threads. Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14fstat64: Fix Build warnings with common-generic ABI buildVineet Gupta
CC libc/sysdeps/linux/common/fstat64.os In file included from libc/sysdeps/linux/common/fstat64.c:16: libc/sysdeps/linux/common/xstatconv.h:28: warning: 'struct kernel_stat' declared inside parameter list libc/sysdeps/linux/common/xstatconv.h:28: warning: its scope is only this definition or declaration, which is probably not what you want libc/sysdeps/linux/common/fstat64.c: In function 'fstat64': libc/sysdeps/linux/common/fstat64.c:33: warning: passing argument 2 of '__syscall_fstat64' from incompatible pointer type libc/sysdeps/linux/common/fstat64.c:18: note: expected 'struct stat *' but argument is of type 'struct stat64 *' ------------------------------------------------------------------- Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14leek: if lseek syscall is not available, use lseek64 even for !LFSVineet Gupta
With Busybox and uClibc - both built w/o LFS, this caused ash to be completely broken, as lseek was simply returning error. Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14utimes: Export utimensat based utimesVineet Gupta
sys/time.h has libc_hidden_proto(utimes) which generates the hidden "__GI_utimes" symbol reference, and common/utimes.c has a libc_hidden_def(utimes) which generates the exported "utimes" alias. As part of no-legacy-syscall kernel ABI, Commit 80dc2ed05 "utimes: Use utimensat if arch does not have the utimes syscall" introduced a new wrapper, but missed the corresponding libc_hidden_def, causing Busybox (1.20.0) link to fail (for ARC). Also don't generate a STUB, in that case. ---------------->8------------------- .... touch.c:(.text.touch_main+0xdc): undefined reference to `utimes' touch.c:(.text.touch_main+0x114): undefined reference to `utimes' libbb/lib.a(copy_file.o): In function `copy_file': copy_file.c:(.text.copy_file+0x446): undefined reference to `utimes' collect2: ld returned 1 exit status ---------------->8------------------- Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-27libc/pause: Enable pause_nocancel for arches without __NR_pauseMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20nice: fix overflow checking in int_add_no_wrap()Xi Wang
In C, signed integer overflow is undefined behavior. Many compilers optimize away checks like `a + b < a'. Use safe precondition testing instead. Signed-off-by: Xi Wang <xi@mit.edu> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20open: Use openat if arch does not have the open syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20not-cancel.h: Use openat if arch does not have the open syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20open64: Use openat if arch does not have the open syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20fcntl: Use fcntl64 is arch does not have the fcntl syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20fstatfs: Add __libc_fstatfs wrapperMarkos Chandras
New architectures don't have fstatfs anymore, so we use a wrapper for __libc_fstatfs which will use fstatfs64 internally. The interface however needs to remain the same (i.e accepting a struct statfs as a second argument) for backwards compatibility Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20stat: Use fstatat64 if arch does not have the stat syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20ustat: Add ustat stub for arches that don't have the ustat system callMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20lstat64: Use fstatat64 if arch does not have the lstat64 syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20lstat: Use fstatat64 if arch does not have the lstat syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20stat64: Use fstatat64 if arch does not have the stat64 syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20fstatat{64}: No conversion code is needed for new architecturesMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20fstatat64: Use newfstatat only for 64-bit operationsMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20fstatat: Use newfstatat only for 64-bit operationsMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20fstat: Use fstat64 if arch does not have the fstat syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20statfs: Use statfs64 if arch does not have the statfs syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20getdents: Use getdents64 if arch does not have the getdents syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20lseek: Use lseek64 is arch does not have the lseek syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20sendfile: Use sendfile64 if arch does not have the sendfile syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20truncate: Use truncate64 if arch does not have the truncate syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20ftruncate: Use ftruncate64 if arch does not have the ftruncate syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20fork: Use clone if arch does not have the fork syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20vfork: Use clone if arch does not have the vfork syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20utime: Use utimensat if arch does not have the utime syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20inotify_init: Use inotify_init1 if inotify_init syscall is not definedMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20epoll: Use epoll_pwait if arch does not have the epoll_wait syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20epoll: Use epoll_create1 if arch does not have the epoll_create syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20pipe: Use pipe2 if arch does not have the pipe syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20utimes: Use utimensat if arch does not have the utimes syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20symlink: Use symlinkat if arch does not have the symlink syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20readlink: Use readlinkat if arch does not have the readlink syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20rename: Use renameat if arch does not have the rename syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20mkdir: Use mkdirat if arch does not have the mkdir syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20lchown: Use fchownat if arch does not have the lchown syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20rmdir: Use unlinkat if arch does not have the rmdir syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20chown: Use fchownat if arch does not have the chown syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20mknod: Use mknodat if arch does not have the mknod syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20unlink: Use unlinkat if arch does not have the unlink syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>