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: Rafael Avila de Espindola X-Patchwork-Id: 29687 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 */