From patchwork Fri Jun 20 18:05:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 362311 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 2AF6314008B for ; Sat, 21 Jun 2014 04:05:35 +1000 (EST) 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=pR0KLy3szoLLG/rVhX3jwm21wJY21 V8ExCBhsZcYsK8Lg77Bt8fRB2StGySOoCilFA1IXJ1pZmBGma7HJdQxRBr70mvy9 yKW7stoZUuP2xIj/6gb69O48tCytf+gVhRfAz6EaPL6/AEjnh1lbyCQKCX0CvZHO HUS1DkDLVwYRrs= 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=iREr0/xWEWhCJUmXX8bh9ifPNms=; b=BE1 xoryIYK/PU5YMqAR6FbGwYIu1slzdXYlgdcxS8zUBnH41F4erXJ+fJIvQZqu+syy 7UYthKSBM/7GTrUuisiPlVYYP/YmOOZrXuOvvgTfkA/13aRwzcPtARaCWreDgW2c v9vzLiMPE/yYS2n8f536MfUGYOhaubaLx0p7u7Rg= Received: (qmail 32100 invoked by alias); 20 Jun 2014 18:05:30 -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 32085 invoked by uid 89); 20 Jun 2014 18:05:29 -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 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Date: Fri, 20 Jun 2014 18:05:21 +0000 From: "Joseph S. Myers" To: Subject: Remove __ASSUME_F_GETOWN_EX Message-ID: MIME-Version: 1.0 This patch removes __ASSUME_F_GETOWN_EX now it can be assumed to be true unconditionally. Tested x86_64 that disassembly of installed shared libraries is unchanged by this patch. 2014-06-20 Joseph Myers * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_F_GETOWN_EX): Remove macro. * sysdeps/unix/sysv/linux/fcntl.c: Do not include . (miss_F_GETOWN_EX): Remove variable or macro. (do_fcntl): Do not check miss_F_GETOWN_EX. (do_fcntl) [!__ASSUME_F_GETOWN_EX]: Remove conditional code. diff --git a/sysdeps/unix/sysv/linux/fcntl.c b/sysdeps/unix/sysv/linux/fcntl.c index 1432a2c..c1d33da 100644 --- a/sysdeps/unix/sysv/linux/fcntl.c +++ b/sysdeps/unix/sysv/linux/fcntl.c @@ -22,20 +22,12 @@ #include #include -#include - - -#ifdef __ASSUME_F_GETOWN_EX -# define miss_F_GETOWN_EX 0 -#else -static int miss_F_GETOWN_EX; -#endif static int do_fcntl (int fd, int cmd, void *arg) { - if (cmd != F_GETOWN || miss_F_GETOWN_EX) + if (cmd != F_GETOWN) return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg); INTERNAL_SYSCALL_DECL (err); @@ -44,15 +36,6 @@ do_fcntl (int fd, int cmd, void *arg) if (!INTERNAL_SYSCALL_ERROR_P (res, err)) return fex.type == F_OWNER_GID ? -fex.pid : fex.pid; -#ifndef __ASSUME_F_GETOWN_EX - if (INTERNAL_SYSCALL_ERRNO (res, err) == EINVAL) - { - res = INLINE_SYSCALL (fcntl, 3, fd, F_GETOWN, arg); - miss_F_GETOWN_EX = 1; - return res; - } -#endif - __set_errno (INTERNAL_SYSCALL_ERRNO (res, err)); return -1; } diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 026f89f..a8bc3e7 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -179,9 +179,6 @@ # define __ASSUME_REQUEUE_PI 1 #endif -/* Support for F_GETOWN_EX was introduced in 2.6.32. */ -#define __ASSUME_F_GETOWN_EX 1 - /* Support for recvmmsg functionality was added in 2.6.33. The macros defined correspond to those for accept4. */ #if __LINUX_KERNEL_VERSION >= 0x020621 && defined __ASSUME_SOCKETCALL