| From a305e44543b00ce4eb133c164c81430d04a5afbd Mon Sep 17 00:00:00 2001 | |
| From: Derek Schuff <dschuff@chromium.org> | |
| Date: Fri, 13 Feb 2026 01:32:11 +0000 | |
| Subject: [PATCH 21/30] bh: remove C common symbols | |
| --- | |
| MultiSource/Benchmarks/Olden/bh/defs.h | 8 ++++---- | |
| MultiSource/Benchmarks/Olden/bh/newbh.c | 10 ++++++---- | |
| MultiSource/Benchmarks/Olden/bh/walksub.c | 1 - | |
| 3 files changed, 10 insertions(+), 9 deletions(-) | |
| diff --git a/MultiSource/Benchmarks/Olden/bh/defs.h b/MultiSource/Benchmarks/Olden/bh/defs.h | |
| index 396ac79e2..00be1b38f 100644 | |
| --- a/MultiSource/Benchmarks/Olden/bh/defs.h | |
| +++ b/MultiSource/Benchmarks/Olden/bh/defs.h | |
| @@ -17,7 +17,7 @@ | |
| #define RETEST(); | |
| /*#define isnan(xxx) 0*/ | |
| #define PID(xxx) 0 | |
| -int NumNodes; | |
| +extern int NumNodes; | |
| #endif | |
| @@ -192,15 +192,15 @@ typedef struct { | |
| * ROOT: origin of tree; declared as nodeptr for tree with only 1 body. | |
| */ | |
| -global nodeptr root; | |
| +extern nodeptr root; | |
| /* | |
| * Integerized coordinates: used to mantain body-tree. | |
| */ | |
| -global vector rmin; /* lower-left corner of coordinate box */ | |
| +extern vector rmin; /* lower-left corner of coordinate box */ | |
| -global real xxxrsize; /* side-length of integer coordinate box */ | |
| +extern real xxxrsize; /* side-length of integer coordinate box */ | |
| #define IMAX_SHIFT (8 * sizeof(int) - 2) | |
| #define IMAX (1 << (8 * sizeof(int) - 2)) /* highest bit of int coord */ | |
| diff --git a/MultiSource/Benchmarks/Olden/bh/newbh.c b/MultiSource/Benchmarks/Olden/bh/newbh.c | |
| index d55a1909a..06dd1a1f3 100644 | |
| --- a/MultiSource/Benchmarks/Olden/bh/newbh.c | |
| +++ b/MultiSource/Benchmarks/Olden/bh/newbh.c | |
| @@ -7,13 +7,16 @@ | |
| * It's free because it's yours. | |
| */ | |
| -#define global /* nada */ | |
| - | |
| #include "defs.h" | |
| #include "code.h" | |
| -int nbody; | |
| +int nbody = 0; | |
| +int NumNodes = 0; | |
| +nodeptr root = NULL; | |
| +vector rmin = {0.0, 0.0, 0.0}; | |
| +real xxxrsize = 0.0; | |
| +int arg1 = 0; | |
| double sqrt(), xrand(), my_rand(); | |
| real pow(); | |
| @@ -49,7 +52,6 @@ int old_subindex(icstruct ic, int l); | |
| int dealwithargs(); | |
| int error(); | |
| -int arg1; | |
| /* Used to setup runtime system, get arguments-- see old_main */ | |
| int main(int argc, char **argv) { | |
| diff --git a/MultiSource/Benchmarks/Olden/bh/walksub.c b/MultiSource/Benchmarks/Olden/bh/walksub.c | |
| index 34fd06f61..7e53edb63 100644 | |
| --- a/MultiSource/Benchmarks/Olden/bh/walksub.c | |
| +++ b/MultiSource/Benchmarks/Olden/bh/walksub.c | |
| @@ -1,4 +1,3 @@ | |
| -#define global | |
| #include "defs.h" | |
| typedef struct { | |
| -- | |
| 2.53.0.1213.gd9a14994de-goog | |