search for: __nr_open

Displaying 11 results from an estimated 11 matches for "__nr_open".

2014 Jun 10
4
[LLVMdev] use of undeclared identifier '__NR_*' error while building clang
...vm/projects/compiler-rt' COMPILE: clang_linux/san-i386/i386: /home/sandeep/llvm_clang/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc /home/sandeep/llvm_clang/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc:123:27: error: use of undeclared identifier '__NR_open' return internal_syscall(SYSCALL(open), (uptr)filename, flags); ^ /home/sandeep/llvm_clang/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_syscall_generic.inc:17:24: note: expanded from macro 'SYSCALL' # define SYSCALL(name) __NR_ ## name...
2013 Nov 08
1
[PATCH 2/3] syscalls: Add syscalls needed by arm64
...> + * open64.c > + * > + * For 64 bit systems without the open syscall, pass straight > + * through into openat. > + */ > + > +#define _KLIBC_IN_OPEN_C > +#include <unistd.h> > +#include <fcntl.h> > +#include <sys/syscall.h> > + > +#if !defined(__NR_open) && _BITSIZE == 64 > + > +__extern int openat(int, const char *, int, ...); > + > +int open(const char *pathname, int flags, mode_t mode) > +{ > + return openat(AT_FDCWD, pathname, flags, mode); > +} > + > +#endif This applies equally to a 32-bit platform that do...
2013 Nov 12
0
[klibc:master] syscalls: Add syscalls needed by arm64
...stem call, to indicate that we're 64-bit safe. + * + * For 64 bit systems without the open syscall, pass straight + * through into openat. */ #define _KLIBC_IN_OPEN_C #include <unistd.h> #include <fcntl.h> #include <bitsize.h> +#include <sys/syscall.h> + +#ifndef __NR_open +#if _BITSIZE == 32 + +extern int __openat(int, const char *, int, mode_t); + +int open(const char *pathname, int flags, mode_t mode) +{ + return __openat(AT_FDCWD, pathname, flags | O_LARGEFILE, mode); +} + +#else + +__extern int openat(int, const char *, int, ...); + +int open(const char *pathnam...
2013 Nov 08
9
[PATCH 0/3] Introduce arm64 support
Hello, This series introduces arm64 support to klibc. I've rebased the work from Neil Williams and Anil Singhar into the following three patches. Most of the code changes are due to new syscall implementations being needed for arm64 as a only a minimal set of syscalls are defined in the arm64 kernel. This series is to be applied against the latest klibc, just after 25a66fa README.klibc:
2016 Apr 13
0
[PATCH 1/1] x32 support
...fined(__x86_64__) extern int __llseek(int fd, unsigned long hi, unsigned long lo, off_t * res, int whence); diff --git a/usr/klibc/open.c b/usr/klibc/open.c index 5305c3d..7d11a21 100644 --- a/usr/klibc/open.c +++ b/usr/klibc/open.c @@ -15,7 +15,7 @@ #include <sys/syscall.h> #ifndef __NR_open -#if _BITSIZE == 32 +#if _BITSIZE == 32 && !defined(__x86_64__) extern int __openat(int, const char *, int, mode_t); @@ -35,7 +35,7 @@ int open(const char *pathname, int flags, mode_t mode) #endif /* _BITSIZE == 32 */ -#elif _BITSIZE == 32 && !defined(__i386__) && !de...
2013 Nov 08
0
[PATCH 2/3] syscalls: Add syscalls needed by arm64
...--- /dev/null +++ b/usr/klibc/open64.c @@ -0,0 +1,22 @@ +/* + * open64.c + * + * For 64 bit systems without the open syscall, pass straight + * through into openat. + */ + +#define _KLIBC_IN_OPEN_C +#include <unistd.h> +#include <fcntl.h> +#include <sys/syscall.h> + +#if !defined(__NR_open) && _BITSIZE == 64 + +__extern int openat(int, const char *, int, ...); + +int open(const char *pathname, int flags, mode_t mode) +{ + return openat(AT_FDCWD, pathname, flags, mode); +} + +#endif diff --git a/usr/klibc/poll.c b/usr/klibc/poll.c new file mode 100644 index 0000000..69da693 --...
2012 Jan 29
5
[PATCH 0/2 v3] mkstemp() and m68k support
Hi, after a year, I decided to hack on klibc again. I?ve reworked both the patch to add mkstemp(), discussing to use AT_RANDOM as cheap entropy source on IRC (if there will ever be another entropy consumer, I can quickly write a minimal arc4random() seeded from it, as it has only 16 octets), capable of making a working mksh (static and shared) on amd64/xen, and the m68k support code, leading to
2013 Nov 11
5
[PATCH V2 0/3] Introduce arm64 support
Hello, Here is V2 of the arm64 support for klibc patch set. Notable changes since the original series: * fp regs dropped from setjmp/longjmp * chmod, lstat and stat re-implemented with *at functions. * open64 merged into open. As with the original, this series is to be applied against the latest klibc, just after 25a66fa README.klibc: update build information V2 has been tested on x86_64
2012 May 15
5
[PATCH 0/5] resubmitting pending patches
Hi, I?ve gone through the mailing list archives and hereby want to resubmit my pending patches. Most are independent of each other, except the m68k patch which will only be complete if sigsuspend is also fixed. (It can be applied before that, though.) http://www.zytor.com/pipermail/klibc/2012-January/003173.html [PATCH] fix m68k support Resubmitted here as 0005. While there was a question from
2006 Jun 26
0
[klibc 24/43] i386 support for klibc
...;asm/fcntl.h>, despite the name, isn't assembly-safe */ +#define O_LARGEFILE 0100000 + + .globl open + .type open, at function + +open: +#ifdef _REGPARM + movl 4(%esp),%eax + movl 8(%esp),%edx + movl 12(%esp),%ecx + orl $O_LARGEFILE,%edx +#else + orl $O_LARGEFILE,8(%esp) +#endif + pushl $__NR_open + jmp __syscall_common + + .size open,.-open diff --git a/usr/klibc/arch/i386/openat.S b/usr/klibc/arch/i386/openat.S new file mode 100644 index 0000000..2dfdfe2 --- /dev/null +++ b/usr/klibc/arch/i386/openat.S @@ -0,0 +1,26 @@ +/* + * arch/i386/openat.S + * + * Handle the openat() system call - od...
2006 Jun 28
35
[klibc 00/31] klibc as a historyless patchset (updated and reorganized)
I have updated the klibc patchset based on feedback received. In particular, the patchset has been reorganized so as not to break git-bisect. Additionally, this updates the patch base to 2.6.17-git12 (d38b69689c349f35502b92e20dafb30c62d49d63) and klibc 1.4.8; the main difference on the klibc side is removal of obsolete code. This is also available as a git tree at: