Skip to content

Commit 2e0d51e

Browse files
author
Peter Kooiman
committed
Avoid name space collision for the global variables PC, SP and BC when readline is dynamically loaded.
1 parent b036821 commit 2e0d51e

File tree

7 files changed

+24
-1
lines changed

7 files changed

+24
-1
lines changed

ALTAIR/altair_defs.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@
4040
#define STOP_IBKPT 3 /* breakpoint */
4141
#define STOP_OPCODE 4
4242

43+
/* Rename of global BC and SP variables to avoid namespace conflicts on some platforms */
44+
#define BC BC_Global
45+
#define SP SP_Global

Intel-Systems/Intel-MDS/system_defs.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
#include <string.h>
3232
#include "sim_defs.h" /* simulator defns */
3333

34+
/* Rename of global PC, BC and SP variables to avoid namespace conflicts on some platforms */
35+
#define PC PC_Global
36+
#define BC BC_Global
37+
#define SP SP_Global
38+
3439
#define SET_XACK(VAL) (xack = VAL)
3540

3641
#define I3214_NUM 0

LGP/lgp_defs.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131

3232
#include "sim_defs.h" /* simulator defns */
3333

34+
/* Rename of global PC variable to avoid namespace conflicts on some platforms */
35+
#define PC PC_Global
36+
37+
3438
#if defined(USE_INT64) || defined(USE_ADDR64)
3539
#error "LGP-30 does not support 64b values!"
3640
#endif

NOVA/nova_defs.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151

5252
#include "sim_defs.h" /* simulator defns */
5353

54+
/* Rename of global SP variable to avoid namespace conflicts on some platforms */
55+
#define SP SP_Global
56+
5457
#if (defined(USE_INT64) && !defined(ECLIPSE)) || defined(USE_ADDR64)
5558
#error "Nova does not support 64b values!"
5659
#endif

PDP10/kx10_defs.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030

3131
#include "sim_defs.h" /* simulator defns */
3232

33+
/* Rename of global PC variable to avoid namespace conflicts on some platforms */
34+
#define PC PC_Global
35+
3336
#if defined(USE_ADDR64)
3437
#error "PDP-10 does not support 64b addresses!"
3538
#endif

sigma/sigma_defs.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434

3535
#include "sim_defs.h" /* simulator defns */
3636

37+
/* Rename of global PC variable to avoid namespace conflicts on some platforms */
38+
#define PC PC_Global
39+
40+
3741
#if defined(USE_INT64) || defined(USE_ADDR64)
3842
#error "Sigma 32b does not support 64b values!"
3943
#endif

swtp6800/swtp6800/swtp_defs.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ Copyright (c) 2005-2012, William Beech
2727
#include <ctype.h>
2828
#include "sim_defs.h" // simulator defs
2929

30-
/* Rename of global PC variable to avoid namespace conflicts on some platforms */
30+
/* Rename of global PC and SP variables to avoid namespace conflicts on some platforms */
3131

3232
#define PC PC_Global
33+
#define SP SP_Global
3334

3435
//#define DONT_USE_INTERNAL_ROM 1
3536

0 commit comments

Comments
 (0)