From patchwork Wed Jan 23 15:21:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 31179 Received: (qmail 62477 invoked by alias); 23 Jan 2019 15:21:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 61480 invoked by uid 89); 23 Jan 2019 15:21:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=esc, ESC, ctrl, 8524 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 Jan 2019 15:21:35 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 53450C000725; Wed, 23 Jan 2019 15:21:34 +0000 (UTC) Received: from localhost.localdomain (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7899067143; Wed, 23 Jan 2019 15:21:33 +0000 (UTC) From: Pedro Alves To: gdb-patches@sourceware.org Cc: Tom Tromey , Andrew Burgess Subject: [PATCH v3 01/17] Rename ESC -> ESC_PARENS Date: Wed, 23 Jan 2019 15:21:15 +0000 Message-Id: <20190123152131.29893-2-palves@redhat.com> In-Reply-To: <20190123152131.29893-1-palves@redhat.com> References: <20190123152131.29893-1-palves@redhat.com> A following patch will include common/preprocessor.h in some .c file that also includes readline.h, and that revealed a conflict -- ESC is defined by readline.h as well (actually readline's chardefs.h) with a completely unrelated meaning: #define ESC CTRL('[') Rename our version to avoid the conflict. gdb/ChangeLog: yyyy-mm-dd Pedro Alves * common/preprocessor.h (ESC): Rename to ... (ESC_PARENS): ... this. * common/valid-expr.h (CHECK_VALID_EXPR_1, CHECK_VALID_EXPR_2) (CHECK_VALID_EXPR_3, CHECK_VALID_EXPR_4): Adjust. --- gdb/common/preprocessor.h | 2 +- gdb/common/valid-expr.h | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gdb/common/preprocessor.h b/gdb/common/preprocessor.h index 647568ede6..a7c33d0978 100644 --- a/gdb/common/preprocessor.h +++ b/gdb/common/preprocessor.h @@ -30,6 +30,6 @@ /* Escape parens out. Useful if you need to pass an argument that includes commas to another macro. */ -#define ESC(...) __VA_ARGS__ +#define ESC_PARENS(...) __VA_ARGS__ #endif /* COMMON_PREPROC */ diff --git a/gdb/common/valid-expr.h b/gdb/common/valid-expr.h index 9289448365..603c76e8f1 100644 --- a/gdb/common/valid-expr.h +++ b/gdb/common/valid-expr.h @@ -85,24 +85,24 @@ another variant. */ #define CHECK_VALID_EXPR_1(T1, VALID, EXPR_TYPE, EXPR) \ - CHECK_VALID_EXPR_INT (ESC (typename T1), \ - ESC (T1), \ + CHECK_VALID_EXPR_INT (ESC_PARENS (typename T1), \ + ESC_PARENS (T1), \ VALID, EXPR_TYPE, EXPR) #define CHECK_VALID_EXPR_2(T1, T2, VALID, EXPR_TYPE, EXPR) \ - CHECK_VALID_EXPR_INT (ESC (typename T1, typename T2), \ - ESC (T1, T2), \ + CHECK_VALID_EXPR_INT (ESC_PARENS(typename T1, typename T2), \ + ESC_PARENS (T1, T2), \ VALID, EXPR_TYPE, EXPR) #define CHECK_VALID_EXPR_3(T1, T2, T3, VALID, EXPR_TYPE, EXPR) \ - CHECK_VALID_EXPR_INT (ESC (typename T1, typename T2, typename T3), \ - ESC (T1, T2, T3), \ + CHECK_VALID_EXPR_INT (ESC_PARENS (typename T1, typename T2, typename T3), \ + ESC_PARENS (T1, T2, T3), \ VALID, EXPR_TYPE, EXPR) #define CHECK_VALID_EXPR_4(T1, T2, T3, T4, VALID, EXPR_TYPE, EXPR) \ - CHECK_VALID_EXPR_INT (ESC (typename T1, typename T2, \ - typename T3, typename T4), \ - ESC (T1, T2, T3, T4), \ + CHECK_VALID_EXPR_INT (ESC_PARENS (typename T1, typename T2, \ + typename T3, typename T4), \ + ESC_PARENS (T1, T2, T3, T4), \ VALID, EXPR_TYPE, EXPR) #endif /* COMMON_VALID_EXPR_H */