diff options
Diffstat (limited to 'io')
-rw-r--r-- | io/fcntl.h | 6 | ||||
-rw-r--r-- | io/lseek.c | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/io/fcntl.h b/io/fcntl.h index 61834cef1b..14ccae0d26 100644 --- a/io/fcntl.h +++ b/io/fcntl.h @@ -129,6 +129,12 @@ typedef __pid_t pid_t; # define SEEK_END 2 /* Seek from end of file. */ #endif /* XPG */ +/* The constants AT_REMOVEDIR and AT_EACCESS have the same value. AT_EASSESS + is meaningful only to faccessat, while AT_REMOVEDIR is meaningful only to + unlinkat. The two functions do completely different things and therefore, + the flags can be allowed to overlap. For example, passing AT_REMOVEDIR to + faccessat would be undefined behavior and thus treating it equivalent to + AT_EACCESS is valid undefined behavior. */ #ifdef __USE_ATFILE # define AT_FDCWD -100 /* Special value used to indicate the *at functions should use the diff --git a/io/lseek.c b/io/lseek.c index b65c50dae1..63cd75fd54 100644 --- a/io/lseek.c +++ b/io/lseek.c @@ -21,7 +21,7 @@ /* Seek to OFFSET on FD, starting from WHENCE. */ off_t -__lseek (fd, offset, whence) +__libc_lseek (fd, offset, whence) int fd; off_t offset; int whence; @@ -45,7 +45,8 @@ __lseek (fd, offset, whence) __set_errno (ENOSYS); return -1; } +weak_alias (__libc_lseek, __lseek) +weak_alias (__libc_lseek, lseek) stub_warning (lseek) -libc_hidden_def (__lseek) -weak_alias (__lseek, lseek) +libc_hidden_def (__lseek) |