1 Index: uClibc-0.9.29/libc/sysdeps/linux/common/openat.c
2 ===================================================================
3 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
4 +++ uClibc-0.9.29/libc/sysdeps/linux/common/openat.c 2008-10-27 12:59:25.000000000 +0100
6 +/* vi: set sw=4 ts=4: */
8 + * openat() for uClibc
10 + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
12 + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
15 +#include <sys/syscall.h>
20 +#include <sys/param.h>
22 +extern __typeof(openat) __libc_openat;
24 +#define __NR___syscall_openat __NR_openat
25 +static inline _syscall4(int, __syscall_openat, int, fd, const char *, file,
26 + int, flags, __kernel_mode_t, mode);
28 +libc_hidden_proto(__libc_openat)
29 +int __libc_openat(int fd, const char *file, int oflag, ...)
33 + if (oflag & O_CREAT) {
35 + va_start (arg, oflag);
36 + mode = va_arg (arg, mode_t);
40 + return __syscall_openat(fd, file, oflag, mode);
42 +libc_hidden_def(__libc_openat)
44 +libc_hidden_proto(openat)
45 +weak_alias(__libc_openat,openat)
46 +libc_hidden_weak(openat)
47 Index: uClibc-0.9.29/include/fcntl.h
48 ===================================================================
49 --- uClibc-0.9.29.orig/include/fcntl.h 2008-10-27 12:52:04.000000000 +0100
50 +++ uClibc-0.9.29/include/fcntl.h 2008-10-27 13:08:11.000000000 +0100
52 # define SEEK_END 2 /* Seek from end of file. */
55 -#if 0 /*def __USE_GNU*/
57 # define AT_FDCWD -100 /* Special value used to indicate
58 openat should use the current
61 extern int open64 (__const char *__file, int __oflag, ...) __nonnull ((1));
64 -#if 0 /*def __USE_GNU*/
66 /* Similar to OPEN but a relative path name is interpreted relative to
67 the directory for which FD is a descriptor.