From patchwork Tue Jun 23 18:29:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 7309 Received: (qmail 32120 invoked by alias); 23 Jun 2015 18:29:51 -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 32110 invoked by uid 89); 23 Jun 2015 18:29:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, 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, 23 Jun 2015 18:29:49 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id F1244340831 for ; Tue, 23 Jun 2015 18:29:47 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH] sim: assume recentish compiler/systems Date: Tue, 23 Jun 2015 14:29:46 -0400 Message-Id: <1435084186-13224-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes Assume the build system supports stdint.h/stdarg.h as those have been around long enough and we don't care about pre-stdc compilers anymore. Committed. --- sim/arm/ChangeLog | 7 +++++++ sim/arm/armdefs.h | 13 +------------ sim/arm/dbg_hif.h | 6 +----- sim/common/ChangeLog | 5 +++++ sim/common/cgen-trace.c | 8 -------- sim/common/sim-trace.c | 18 ------------------ 6 files changed, 14 insertions(+), 43 deletions(-) diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index 4cc45a0..22b74db 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,3 +1,10 @@ +2015-06-23 Mike Frysinger + + * armdefs.h: Always include stdint.h. + [!__STDC__]: Delete. + [!HAVE_STDINT_H]: Delete. + * dbg_hif.h [!__STDC__]: Delete. + 2015-06-12 Mike Frysinger * configure: Regenerate. diff --git a/sim/arm/armdefs.h b/sim/arm/armdefs.h index 50a0619..08a61f2 100644 --- a/sim/arm/armdefs.h +++ b/sim/arm/armdefs.h @@ -17,6 +17,7 @@ #include "config.h" #include #include +#include #define FALSE 0 #define TRUE 1 @@ -25,22 +26,10 @@ #define LOWHIGH 1 #define HIGHLOW 2 -#ifndef __STDC__ -typedef char *VoidStar; -#endif - -#ifdef HAVE_STDINT_H -#include typedef uint32_t ARMword; typedef int32_t ARMsword; typedef uint64_t ARMdword; typedef int64_t ARMsdword; -#else -typedef unsigned int ARMword; /* must be 32 bits wide */ -typedef signed int ARMsword; -typedef unsigned long long ARMdword; /* Must be at least 64 bits wide. */ -typedef signed long long ARMsdword; -#endif typedef struct ARMul_State ARMul_State; typedef unsigned ARMul_CPInits (ARMul_State * state); diff --git a/sim/arm/dbg_hif.h b/sim/arm/dbg_hif.h index 3c6261a..686ed30 100644 --- a/sim/arm/dbg_hif.h +++ b/sim/arm/dbg_hif.h @@ -14,11 +14,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, see . */ -#ifdef __STDC__ -# include -#else -# include -#endif +#include typedef void Hif_DbgPrint (void *arg, const char *format, va_list ap); typedef void Hif_DbgPause (void *arg); diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 722ad98..0f0773d 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,8 @@ +2015-06-23 Mike Frysinger + + * cgen-trace.c [!__STDC__]: Delete. + * sim-trace.h [!__STDC__]: Likewise. + 2015-06-21 Mike Frysinger * sim-model.c (sim_model_init): Assert model is not NULL. diff --git a/sim/common/cgen-trace.c b/sim/common/cgen-trace.c index 566f2e6..f163a6e 100644 --- a/sim/common/cgen-trace.c +++ b/sim/common/cgen-trace.c @@ -302,18 +302,10 @@ cgen_trace_printf (SIM_CPU *cpu, char *fmt, ...) int sim_disasm_sprintf (SFILE *f, const char *format, ...) { -#ifndef __STDC__ - SFILE *f; - const char *format; -#endif int n; va_list args; va_start (args, format); -#ifndef __STDC__ - f = va_arg (args, SFILE *); - format = va_arg (args, char *); -#endif vsprintf (f->current, format, args); f->current += n = strlen (f->current); va_end (args); diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c index f00fe9b..f5ee678 100644 --- a/sim/common/sim-trace.c +++ b/sim/common/sim-trace.c @@ -1294,19 +1294,9 @@ trace_one_insn (SIM_DESC sd, sim_cpu *cpu, address_word pc, void trace_printf (SIM_DESC sd, sim_cpu *cpu, const char *fmt, ...) { -#if !defined __STDC__ && !defined ALMOST_STDC - SIM_DESC sd; - sim_cpu *cpu; - const char *fmt; -#endif va_list ap; va_start (ap, fmt); -#if !defined __STDC__ && !defined ALMOST_STDC - sd = va_arg (ap, SIM_DESC); - cpu = va_arg (ap, sim_cpu *); - fmt = va_arg (ap, const char *); -#endif trace_vprintf (sd, cpu, fmt, ap); @@ -1316,17 +1306,9 @@ trace_printf (SIM_DESC sd, sim_cpu *cpu, const char *fmt, ...) void debug_printf (sim_cpu *cpu, const char *fmt, ...) { -#if !defined __STDC__ && !defined ALMOST_STDC - sim_cpu *cpu; - const char *fmt; -#endif va_list ap; va_start (ap, fmt); -#if !defined __STDC__ && !defined ALMOST_STDC - cpu = va_arg (ap, sim_cpu *); - fmt = va_arg (ap, const char *); -#endif if (CPU_DEBUG_FILE (cpu) == NULL) (* STATE_CALLBACK (CPU_STATE (cpu))->evprintf_filtered)