From patchwork Sat Jun 16 01:06:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 930290 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-93296-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="nQGmjopG"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 416zj71Nxmz9s4Y for ; Sat, 16 Jun 2018 11:07:07 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=SVylUKPypLaloJ02kAbgk6QgdJatfHCZlwvcWz/CAseEITEJTthfP CpVhW/RvXdBE1n82khlb7AXz4viDp6M1De/6BVHvQ8ynYQGHSI9TZw4cPOJUcM2s K14pSOUk1fSMv7a2vpdBYUHoZZjrsZdVgTa4QqH9CBtELW8X8+PqiY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; s=default; bh=KUdWVCGmsqtzkYJyTe3HJ9IBDXs=; b=nQGmjopGJPBSbiAUsjGKoZJ1fdZH ZVz4D7el+vUJJca4jrdXoBy5w/n+AkfrUm0ZHJcfLNInodActIneZg/aFSswBLjj +CWEA5MZoR3vknSD6LlHlXlo6tScSUPA7Gy275GpbkZHheBsj5wsKLI7fHyigacb H5gfpfhy2jdtqjE= Received: (qmail 65846 invoked by alias); 16 Jun 2018 01:06:38 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 65571 invoked by uid 89); 16 Jun 2018 01:06:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, SPF_HELO_PASS, SPF_NEUTRAL, URIBL_RED autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:sk:static-, H*r:sk:static-, H*RU:sk:static-, ofs X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault Subject: [hurd, commited 1/8] hurd: avoid PLT ref between sendfile and sendfile64 Date: Sat, 16 Jun 2018 03:06:20 +0200 Message-Id: <20180616010627.29577-1-samuel.thibault@ens-lyon.org> * include/sys/sendfile.h (__sendfile64): Declare hidden prototype. * sysdeps/mach/hurd/sendfile.c (sendfile): Call __sendfile64 instead of sendfile. * sysdeps/mach/hurd/sendfile64.c (sendfile64): Rename to __sendfile64. (sendfile64): New strong alias. --- ChangeLog | 8 ++++++++ include/sys/sendfile.h | 6 ++++++ sysdeps/mach/hurd/sendfile.c | 4 ++-- sysdeps/mach/hurd/sendfile64.c | 3 ++- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a8f711fcd7..74c14d4f84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2018-06-15 Samuel Thibault + + * include/sys/sendfile.h (__sendfile64): Declare hidden prototype. + * sysdeps/mach/hurd/sendfile.c (sendfile): Call __sendfile64 instead + of sendfile. + * sysdeps/mach/hurd/sendfile64.c (sendfile64): Rename to __sendfile64. + (sendfile64): New strong alias. + 2018-06-15 Joseph Myers [BZ #23007] diff --git a/include/sys/sendfile.h b/include/sys/sendfile.h index abe09769cc..b88cca27b8 100644 --- a/include/sys/sendfile.h +++ b/include/sys/sendfile.h @@ -1 +1,7 @@ #include + +#ifndef _ISOMAC + +extern __typeof (sendfile64) __sendfile64 attribute_hidden; + +#endif diff --git a/sysdeps/mach/hurd/sendfile.c b/sysdeps/mach/hurd/sendfile.c index 6a3de0fcc1..4df66b56d7 100644 --- a/sysdeps/mach/hurd/sendfile.c +++ b/sysdeps/mach/hurd/sendfile.c @@ -25,11 +25,11 @@ ssize_t sendfile (int out_fd, int in_fd, off_t *offset, size_t count) { if (offset == NULL || sizeof (off_t) == sizeof (off64_t)) - return sendfile64 (out_fd, in_fd, (off64_t *) offset, count); + return __sendfile64 (out_fd, in_fd, (off64_t *) offset, count); else { off64_t ofs = *offset; - ssize_t ret = sendfile64 (out_fd, in_fd, &ofs, count); + ssize_t ret = __sendfile64 (out_fd, in_fd, &ofs, count); *offset = ofs; return ret; } diff --git a/sysdeps/mach/hurd/sendfile64.c b/sysdeps/mach/hurd/sendfile64.c index f69ccd4a79..ea4e96da90 100644 --- a/sysdeps/mach/hurd/sendfile64.c +++ b/sysdeps/mach/hurd/sendfile64.c @@ -24,7 +24,7 @@ /* Send COUNT bytes from file associated with IN_FD starting at OFFSET to descriptor OUT_FD. */ ssize_t -sendfile64 (int out_fd, int in_fd, off64_t *offset, size_t count) +__sendfile64 (int out_fd, int in_fd, off64_t *offset, size_t count) { /* We just do a vanilla io_read followed by a vanilla io_write here. In theory the IN_FD filesystem can return us out-of-line data that @@ -57,3 +57,4 @@ sendfile64 (int out_fd, int in_fd, off64_t *offset, size_t count) } return __hurd_fail (err); } +strong_alias (__sendfile64, sendfile64)