Hello! Samuel Thibault <samuel.thiba...@gnu.org> skribis:
> Ludovic Courtès, le Mon 06 Jun 2011 14:39:39 +0200, a écrit : >> @@ -79,6 +79,8 @@ >> extern int __dup (int __fd); >> extern int __dup2 (int __fd, int __fd2); >> libc_hidden_proto (__dup2) >> +extern int __dup3 (int __fd, int __fd2, int __flags); >> +libc_hidden_proto (__dup3) > > It seems Ulrich added a dup3 hiddenproto in the meanwhile. I guess > +libc_hidden_def (dup3) > needs to be added to our patch, as is done in commit 94b7cc37 The attached patch against t/dup3 appears to fix it (should fix the ‘tarball’ job at <http://hydra.nixos.org/jobset/gnu/glibc-hurd> within an hour or so.) OK to apply? Thanks, Ludo’.
>From 22542dcc89805af8d9bd9209129259d2737372b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <l...@gnu.org> Date: Sat, 11 Jun 2011 16:38:18 +0200 Subject: [PATCH] Bring `dup3' in sync with that of GNU/Linux. --- include/unistd.h | 3 +-- sysdeps/mach/hurd/dup3.c | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/unistd.h b/include/unistd.h index 1dbf170..b812dcc 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -79,8 +79,7 @@ char *__canonicalize_directory_name_internal (__const char *__thisdir, extern int __dup (int __fd); extern int __dup2 (int __fd, int __fd2); libc_hidden_proto (__dup2) -extern int __dup3 (int __fd, int __fd2, int __flags); -libc_hidden_proto (__dup3) +libc_hidden_proto (dup3) extern int __execve (__const char *__path, char *__const __argv[], char *__const __envp[]); extern long int __pathconf (__const char *__path, int __name); diff --git a/sysdeps/mach/hurd/dup3.c b/sysdeps/mach/hurd/dup3.c index 1e03eed..178ee16 100644 --- a/sysdeps/mach/hurd/dup3.c +++ b/sysdeps/mach/hurd/dup3.c @@ -28,7 +28,7 @@ open on the same file as FD is, and setting FD2's flags according to FLAGS. Return FD2 or -1. */ int -__dup3 (int fd, int fd2, int flags) +dup3 (int fd, int fd2, int flags) { struct hurd_fd *d; @@ -137,5 +137,4 @@ __dup3 (int fd, int fd2, int flags) return fd2; } -libc_hidden_def (__dup3) -weak_alias (__dup3, dup3) +libc_hidden_def (dup3) -- 1.7.4.1