From patchwork Wed Oct 10 04:15:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Rafael_=C3=81vila_de_Esp=C3=ADndola?= X-Patchwork-Id: 981676 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-96330-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=espindo.la Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="hw//hJf5"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=espindo.la header.i=@espindo.la header.b="K0M1V7HC"; 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 42VLQH2nWtz9s89 for ; Wed, 10 Oct 2018 15:16:38 +1100 (AEDT) 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:to:from:reply-to:subject:message-id :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=OhStlqp+CR12t/nns9sow0YzElEenliTmg/w0NxiuXnuEMzTLPHT0 7Bsrzbkhux/RRMthMq3mU9M+cp4ANr9cyCHZpo1VXNB129JtlwzXsS8IJFha2eEr r9oU20hrOWRYdLQfqukq3t99pkpBHyjCluaWKuo7XIxg9ePRcVOl8c= 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:to:from:reply-to:subject:message-id :mime-version:content-type:content-transfer-encoding; s=default; bh=4o7WiWjflWesA1dXGy0/lT3nlEI=; b=hw//hJf57VmBihxQ+PmM90rnJPVW EaUfV5hS7vB4uJ7hoXYLrISC/nHMqBHh2gmg+CdkchgOxNVLJhQ6eFCFTJ0CGYTH OOcC9rg9axP7jiKF9sCmJOAff98TNe/rnWIHkWUE1Iv2Dsubs29ZzFOLTL7qZ6Zu OEqSRsFGLT7Cm5Y= Received: (qmail 25169 invoked by alias); 10 Oct 2018 04:16:29 -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 24783 invoked by uid 89); 10 Oct 2018 04:16:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=H*F:U*rafael, HX-Envelope-From:sk:rafael@ X-HELO: mail-40132.protonmail.ch Date: Wed, 10 Oct 2018 04:15:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=espindo.la; s=protonmail; t=1539144960; bh=QwS/UOnnO/4B7qeTLFXK998IXP9fTPWvndzvrzX+3sg=; h=Date:To:From:Reply-To:Subject:Feedback-ID:From; b=K0M1V7HCSU/nvV5ThX0svihY9U7F6qRYkSq6Zg7g26PmRQ2uLRU1nw/jLLNrHG/Wu vda2DMmocY4OiOzmo7fl1opiMwVTSh7s1KoVeyCFKiumliZdruIuBuI5oYlCuWFmat 8/MQKqbey/R/XdSXa89myZKiEIwoyiZ1MygB9n9s= To: libc-alpha@sourceware.org, "H.J. Lu" , Florian Weimer , Szabolcs Nagy From: Rafael Avila de Espindola Reply-To: Rafael Avila de Espindola Subject: [PATCH] Simplify an #if #else #endif. Message-ID: MIME-Version: 1.0 The #else of two nested #if clauses were identical. Reviewed-by: Szabolcs Nagy --- This also makes the followup patches for VDSO handling easier to read. 2018-10-09 Rafael Ávila de Espíndola [BZ #19767] * sysdeps/unix/sysv/linux/sysdep-vdso.h: Merge nested #if. diff --git a/sysdeps/unix/sysv/linux/sysdep-vdso.h b/sysdeps/unix/sysv/linux/sysdep-vdso.h index 1912c1c156..7ec175c4c4 100644 --- a/sysdeps/unix/sysv/linux/sysdep-vdso.h +++ b/sysdeps/unix/sysv/linux/sysdep-vdso.h @@ -26,13 +26,11 @@ funcptr (args) #endif -#ifdef SHARED +#if defined SHARED && defined HAVE_VSYSCALL -# ifdef HAVE_VSYSCALL +# include -# include - -# define INLINE_VSYSCALL(name, nr, args...) \ +# define INLINE_VSYSCALL(name, nr, args...) \ ({ \ __label__ out; \ __label__ iserr; \ @@ -61,7 +59,7 @@ sc_ret; \ }) -# define INTERNAL_VSYSCALL(name, err, nr, args...) \ +# define INTERNAL_VSYSCALL(name, err, nr, args...) \ ({ \ __label__ out; \ long v_ret; \ @@ -79,20 +77,13 @@ out: \ v_ret; \ }) -# else -# define INLINE_VSYSCALL(name, nr, args...) \ - INLINE_SYSCALL (name, nr, ##args) -# define INTERNAL_VSYSCALL(name, err, nr, args...) \ - INTERNAL_SYSCALL (name, err, nr, ##args) -# endif /* HAVE_VSYSCALL */ - -# else /* SHARED */ +#else # define INLINE_VSYSCALL(name, nr, args...) \ INLINE_SYSCALL (name, nr, ##args) # define INTERNAL_VSYSCALL(name, err, nr, args...) \ INTERNAL_SYSCALL (name, err, nr, ##args) -#endif /* SHARED */ +#endif /* defined SHARED && defined HAVE_VSYSCALL */ #endif /* SYSDEP_VDSO_LINUX_H */