From c2cef3c051b68d13c4c9419dace61d4c4ac57a6d Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sun, 11 Jan 2015 15:22:47 -0800 Subject: [PATCH] ALL: Avoid name space collision for the global variable PC when readline is dynamically loaded in many simulators. --- BESM6/besm6_defs.h | 4 ++++ HP2100/hp2100_defs.h | 4 ++++ I7094/i7094_defs.h | 4 ++++ Interdata/id_defs.h | 4 ++++ PDP1/pdp1_defs.h | 4 ++++ PDP18B/pdp18b_defs.h | 4 ++++ TX-0/tx0_defs.h | 4 ++++ alpha/alpha_defs.h | 4 ++++ sigma/sigma_defs.h | 4 ++++ swtp6800/swtp6800/swtp_defs.h | 4 ++++ 10 files changed, 40 insertions(+) diff --git a/BESM6/besm6_defs.h b/BESM6/besm6_defs.h index 824c0da8..8be817d2 100644 --- a/BESM6/besm6_defs.h +++ b/BESM6/besm6_defs.h @@ -34,6 +34,10 @@ #include "scp.h" #include +/* Rename of global PC variable to avoid namespace conflicts on some platforms */ + +#define PC PC_Global + /* * Memory. */ diff --git a/HP2100/hp2100_defs.h b/HP2100/hp2100_defs.h index 4713a6ff..a2bca878 100644 --- a/HP2100/hp2100_defs.h +++ b/HP2100/hp2100_defs.h @@ -79,6 +79,10 @@ #include "sim_defs.h" /* simulator defns */ +/* Rename of global PC variable to avoid namespace conflicts on some platforms */ + +#define PC PC_Global + /* The following pragmas quell clang warnings that are on by default but should not be, in my opinion. They warn about the use of perfectly valid code and diff --git a/I7094/i7094_defs.h b/I7094/i7094_defs.h index 356a8d60..cbb9e928 100644 --- a/I7094/i7094_defs.h +++ b/I7094/i7094_defs.h @@ -38,6 +38,10 @@ #include "sim_defs.h" /* simulator defns */ +/* Rename of global PC variable to avoid namespace conflicts on some platforms */ + +#define PC PC_Global + #if defined(USE_ADDR64) #error "7094 does not support 64b addresses!" #endif diff --git a/Interdata/id_defs.h b/Interdata/id_defs.h index d2e82866..d4f37df0 100644 --- a/Interdata/id_defs.h +++ b/Interdata/id_defs.h @@ -41,6 +41,10 @@ #include "sim_defs.h" /* simulator defns */ +/* Rename of global PC variable to avoid namespace conflicts on some platforms */ + +#define PC PC_Global + #if defined(USE_INT64) || defined(USE_ADDR64) #error "Interdata 16/32 does not support 64b values!" #endif diff --git a/PDP1/pdp1_defs.h b/PDP1/pdp1_defs.h index 5313bcee..136d4651 100644 --- a/PDP1/pdp1_defs.h +++ b/PDP1/pdp1_defs.h @@ -54,6 +54,10 @@ #include "sim_defs.h" +/* Rename of global PC variable to avoid namespace conflicts on some platforms */ + +#define PC PC_Global + #if defined(USE_INT64) || defined(USE_ADDR64) #error "PDP-1 does not support 64b values!" #endif diff --git a/PDP18B/pdp18b_defs.h b/PDP18B/pdp18b_defs.h index 74e1d480..0bdce5f9 100644 --- a/PDP18B/pdp18b_defs.h +++ b/PDP18B/pdp18b_defs.h @@ -55,6 +55,10 @@ #include "sim_defs.h" /* simulator defns */ +/* Rename of global PC variable to avoid namespace conflicts on some platforms */ + +#define PC PC_Global + #if defined(USE_INT64) || defined(USE_ADDR64) #error "18b PDP's do not support 64b values!" #endif diff --git a/TX-0/tx0_defs.h b/TX-0/tx0_defs.h index e292fd91..687b4df3 100644 --- a/TX-0/tx0_defs.h +++ b/TX-0/tx0_defs.h @@ -42,6 +42,10 @@ #include "sim_defs.h" +/* Rename of global PC variable to avoid namespace conflicts on some platforms */ + +#define PC PC_Global + /* Simulator stop codes */ #define STOP_RSRV 1 /* must be 1 */ #define STOP_HALT 2 /* HALT */ diff --git a/alpha/alpha_defs.h b/alpha/alpha_defs.h index 7090bc94..afd617ae 100644 --- a/alpha/alpha_defs.h +++ b/alpha/alpha_defs.h @@ -36,6 +36,10 @@ #define INLINE +/* Rename of global PC variable to avoid namespace conflicts on some platforms */ + +#define PC PC_Global + /* Configuration */ #define INITMEMSIZE (1 << 24) /* !!debug!! */ diff --git a/sigma/sigma_defs.h b/sigma/sigma_defs.h index a2033d0a..d4ab45a6 100644 --- a/sigma/sigma_defs.h +++ b/sigma/sigma_defs.h @@ -34,6 +34,10 @@ #include "sim_defs.h" /* simulator defns */ +/* Rename of global PC variable to avoid namespace conflicts on some platforms */ + +#define PC PC_Global + #if defined(USE_INT64) || defined(USE_ADDR64) #error "Sigma 32b does not support 64b values!" #endif diff --git a/swtp6800/swtp6800/swtp_defs.h b/swtp6800/swtp6800/swtp_defs.h index 2466a5c0..90384145 100644 --- a/swtp6800/swtp6800/swtp_defs.h +++ b/swtp6800/swtp6800/swtp_defs.h @@ -27,6 +27,10 @@ Copyright (c) 2005-2012, William Beech #include #include "sim_defs.h" // simulator defs +/* Rename of global PC variable to avoid namespace conflicts on some platforms */ + +#define PC PC_Global + /* Memory */ #define MAXMEMSIZE 65536 // max memory size