+2012-05-12 Thomas Schwinge <thomas@codesourcery.com>
+
+ * io/dup3.c (dup3): Rename to __dup3, add weak alias for dup3.
+ * sysdeps/unix/syscalls.list (dup3): Likewise.
+ * libio/freopen.c (freopen): Invoke __dup3 instead of dup3.
+ * libio/freopen64.c (freopen64): Invoke __dup3 instead of dup3.
+
2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
* elf/stackguard-macros.h (STACK_CHK_GUARD) [__x86_64__]: Use
open the same file as FD is which setting flags according to
FLAGS. Return FD2 or -1. */
int
-dup3 (fd, fd2, flags)
+__dup3 (fd, fd2, flags)
int fd;
int fd2;
int flags;
__set_errno (ENOSYS);
return -1;
}
-libc_hidden_def (dup3)
+libc_hidden_def (__dup3)
+weak_alias (__dup3, dup3)
stub_warning (dup3)
#include <stub-tag.h>
else
newfd =
# endif
- dup3 (_IO_fileno (result), fd,
- (result->_flags2 & _IO_FLAGS2_CLOEXEC) != 0
- ? O_CLOEXEC : 0);
+ __dup3 (_IO_fileno (result), fd,
+ (result->_flags2 & _IO_FLAGS2_CLOEXEC) != 0
+ ? O_CLOEXEC : 0);
#else
# define newfd 1
#endif
else
newfd =
# endif
- dup3 (_IO_fileno (result), fd,
- (result->_flags2 & _IO_FLAGS2_CLOEXEC) != 0
- ? O_CLOEXEC : 0);
+ __dup3 (_IO_fileno (result), fd,
+ (result->_flags2 & _IO_FLAGS2_CLOEXEC) != 0
+ ? O_CLOEXEC : 0);
#else
# define newfd 1
#endif
close - close Ci:i __libc_close __close close
dup - dup i:i __dup dup
dup2 - dup2 i:ii __dup2 dup2
-dup3 - dup3 i:iii dup3
+dup3 - dup3 i:iii __dup3 dup3
fchdir - fchdir i:i __fchdir fchdir
fchmod - fchmod i:ii __fchmod fchmod
fchown - fchown i:iii __fchown fchown