From patchwork Tue Nov 10 07:18:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 9630 X-Patchwork-Delegate: vapier@gentoo.org Received: (qmail 68634 invoked by alias); 10 Nov 2015 07:18:43 -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 68614 invoked by uid 89); 10 Nov 2015 07:18:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL, BAYES_20, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 10 Nov 2015 07:18:40 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id CF7A83404A5 for ; Tue, 10 Nov 2015 07:18:38 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH] [RFC] sim: drop extern C linkage from most sim interface headers Date: Tue, 10 Nov 2015 02:18:37 -0500 Message-Id: <1447139917-3043-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes Since these headers merely have enum's, drop the extern C linkage markings. Helps to reduce the copy & paste spam. Is there any reason to not do this ? --- include/gdb/sim-arm.h | 8 -------- include/gdb/sim-cr16.h | 8 -------- include/gdb/sim-d10v.h | 8 -------- include/gdb/sim-frv.h | 8 -------- include/gdb/sim-h8300.h | 14 +++----------- include/gdb/sim-lm32.h | 8 -------- include/gdb/sim-sh.h | 8 -------- 7 files changed, 3 insertions(+), 59 deletions(-) diff --git a/include/gdb/sim-arm.h b/include/gdb/sim-arm.h index d1b1272..1483ab9 100644 --- a/include/gdb/sim-arm.h +++ b/include/gdb/sim-arm.h @@ -22,10 +22,6 @@ #if !defined (SIM_ARM_H) #define SIM_ARM_H -#ifdef __cplusplus -extern "C" { // } -#endif - enum sim_arm_regs { SIM_ARM_R0_REGNUM, @@ -105,8 +101,4 @@ enum sim_arm_regs SIM_ARM_IWMMXT_COP1R15_REGNUM }; -#ifdef __cplusplus -} -#endif - #endif diff --git a/include/gdb/sim-cr16.h b/include/gdb/sim-cr16.h index 03f4b81..2f41303 100644 --- a/include/gdb/sim-cr16.h +++ b/include/gdb/sim-cr16.h @@ -20,10 +20,6 @@ #if !defined (SIM_CR16_H) #define SIM_CR16_H -#ifdef __cplusplus -extern "C" { // } -#endif - enum { SIM_CR16_MEMORY_UNIFIED = 0x00000000, @@ -76,8 +72,4 @@ enum SIM_CR16_NR_CR_REGS = 11 }; -#ifdef __cplusplus -} -#endif - #endif diff --git a/include/gdb/sim-d10v.h b/include/gdb/sim-d10v.h index 3416766..5a83f91 100644 --- a/include/gdb/sim-d10v.h +++ b/include/gdb/sim-d10v.h @@ -20,10 +20,6 @@ #if !defined (SIM_D10V_H) #define SIM_D10V_H -#ifdef __cplusplus -extern "C" { // } -#endif - /* GDB interprets addresses as: 0x00xxxxxx: Physical unified memory segment (Unified memory) @@ -111,8 +107,4 @@ enum SIM_D10V_NR_CR_REGS = 16 }; -#ifdef __cplusplus -} -#endif - #endif diff --git a/include/gdb/sim-frv.h b/include/gdb/sim-frv.h index fa31e34..481b565 100644 --- a/include/gdb/sim-frv.h +++ b/include/gdb/sim-frv.h @@ -22,10 +22,6 @@ #if !defined (SIM_FRV_H) #define SIM_FRV_H -#ifdef __cplusplus -extern "C" { // } -#endif - enum sim_frv_regs { SIM_FRV_GR0_REGNUM = 0, @@ -44,8 +40,4 @@ enum sim_frv_regs SIM_FRV_SPR4095_REGNUM = SIM_FRV_SPR0_REGNUM + 4095 }; -#ifdef __cplusplus -} -#endif - #endif diff --git a/include/gdb/sim-h8300.h b/include/gdb/sim-h8300.h index 2821433..e0405d3 100644 --- a/include/gdb/sim-h8300.h +++ b/include/gdb/sim-h8300.h @@ -19,13 +19,9 @@ #if !defined (SIM_H8300_H) #define SIM_H8300_H -#ifdef __cplusplus -extern "C" { //} -#endif - /* The simulator makes use of the following register information. */ - enum sim_h8300_regs +enum sim_h8300_regs { /* Registers common to all the H8 variants. */ /* Start here: */ @@ -52,7 +48,7 @@ extern "C" { //} SIM_H8300_TICK_REGNUM }; - enum +enum { SIM_H8300_ARG_FIRST_REGNUM = SIM_H8300_R0_REGNUM, /* first reg in which an arg may be passed */ @@ -63,15 +59,11 @@ extern "C" { //} SIM_H8300_SP_REGNUM = SIM_H8300_R7_REGNUM /* Contains address of top of stack */ }; - enum +enum { SIM_H8300_NUM_COMMON_REGS = 10, SIM_H8300_S_NUM_REGS = 13, SIM_H8300_NUM_REGS = 16 }; -#ifdef __cplusplus -} -#endif - #endif /* SIM_H8300_H */ diff --git a/include/gdb/sim-lm32.h b/include/gdb/sim-lm32.h index 8fa5cf4..55926d4 100644 --- a/include/gdb/sim-lm32.h +++ b/include/gdb/sim-lm32.h @@ -21,10 +21,6 @@ #ifndef SIM_LM32_H #define SIM_LM32_H -#ifdef __cplusplus -extern "C" { // } -#endif - enum sim_lm32_regs { SIM_LM32_R0_REGNUM, @@ -69,8 +65,4 @@ enum sim_lm32_regs SIM_LM32_NUM_REGS }; -#ifdef __cplusplus -} -#endif - #endif diff --git a/include/gdb/sim-sh.h b/include/gdb/sim-sh.h index fc42212..e11d0b5 100644 --- a/include/gdb/sim-sh.h +++ b/include/gdb/sim-sh.h @@ -19,10 +19,6 @@ #if !defined (SIM_SH_H) #define SIM_SH_H -#ifdef __cplusplus -extern "C" { // } -#endif - /* The simulator makes use of the following register information. */ enum @@ -162,8 +158,4 @@ enum SIM_SH64_NR_FP_REGS = 64 /* number of floating point registers */ }; -#ifdef __cplusplus -} -#endif - #endif