From patchwork Tue Mar 15 16:30:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 597689 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3qPg8q1LVjz9s8g for ; Wed, 16 Mar 2016 03:30:50 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=aMIJv0Pl; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=jY7OabgBh1FVAsmcvGIKmd/ySl92f BiXMOyoSKlW8U2FGsuemQu5HveshTqxuHwOIeBaIPcAlUtNhLnyC9qdJd8YKS7jt IFPI7TsPexqso0QK1fu7dfMgtsF7iqEp71OHF4eu2a0IiBa0wIbvzZ3Y4dpFXu5t Vtrdb5diE6TOxE= 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:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=1NeyvueLz8skuyS6SklQKjsMGHo=; b=aMI Jv0PlXufn99Bolc/vylbvzyZ4tSIwkTBg7uWwev5kAonjT7VJVfitIpseKkKJFwm Vxq9Aq1lEg8Wy3xKw9Dy8qYjfAEpjM06Sht+3vg6CAXhrVhI1pWtm4sZnMJjW2Rv MEOpuC1gTctHpntkkz6A7+NNdwYH4byfCz3MGo5M= Received: (qmail 39519 invoked by alias); 15 Mar 2016 16:30:42 -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 39497 invoked by uid 89); 15 Mar 2016 16:30:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=2018, 586, wired, 58, 6 X-HELO: relay1.mentorg.com Date: Tue, 15 Mar 2016 16:30:27 +0000 From: Joseph Myers To: Subject: Remove __ASSUME_PPOLL Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 With current kernel version requirements, the ppoll Linux syscall can be assumed to be present on all architectures; this patch removes the __ASSUME_PPOLL macro and conditionals on it and on whether __NR_ppoll is defined. (Note that the same can't yet be done for pselect, because MicroBlaze only wired that up in the syscall table in 3.15.) Tested for x86_64 and x86 that installed stripped shared libraries are unchanged by the patch. 2016-03-15 Joseph Myers * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_PPOLL): Remove macro. * sysdeps/unix/sysv/linux/ppoll.c: Do not include . [__NR_ppoll]: Make code unconditional. [!__ASSUME_PPOLL]: Remove conditional code. diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 9832f41..e3b7459 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -58,7 +58,6 @@ /* pselect/ppoll were introduced just after 2.6.16-rc1. On x86_64 and SH this appeared first in 2.6.19-rc1, on ia64 in 2.6.22-rc1. */ #define __ASSUME_PSELECT 1 -#define __ASSUME_PPOLL 1 /* The *at syscalls were introduced just after 2.6.16-rc1. On PPC they were introduced in 2.6.17-rc1, on SH in 2.6.19-rc1. */ diff --git a/sysdeps/unix/sysv/linux/ppoll.c b/sysdeps/unix/sysv/linux/ppoll.c index c4486af..e14fe60 100644 --- a/sysdeps/unix/sysv/linux/ppoll.c +++ b/sysdeps/unix/sysv/linux/ppoll.c @@ -20,18 +20,9 @@ #include #include #include -#include #include -#ifdef __NR_ppoll -# ifndef __ASSUME_PPOLL -static int __generic_ppoll (struct pollfd *fds, nfds_t nfds, - const struct timespec *timeout, - const sigset_t *sigmask); -# endif - - int ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout, const sigset_t *sigmask) @@ -45,24 +36,6 @@ ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout, timeout = &tval; } - int result; - - result = SYSCALL_CANCEL (ppoll, fds, nfds, timeout, sigmask, _NSIG / 8); - -# ifndef __ASSUME_PPOLL - if (result == -1 && errno == ENOSYS) - result = __generic_ppoll (fds, nfds, timeout, sigmask); -# endif - - return result; + return SYSCALL_CANCEL (ppoll, fds, nfds, timeout, sigmask, _NSIG / 8); } libc_hidden_def (ppoll) - -# ifndef __ASSUME_PPOLL -# define ppoll static __generic_ppoll -# endif -#endif - -#ifndef __ASSUME_PPOLL -# include -#endif