diff options
| author | Dan Cross <cross@gajendra.net> | 2025-07-23 06:47:21 -0400 |
|---|---|---|
| committer | Dan Cross <cross@gajendra.net> | 2025-07-25 12:25:11 -0400 |
| commit | 156e745be9f6a1b19b0f8e2a931148786d7acad4 (patch) | |
| tree | c853bc58f9d7e88d84de2da625bc4dddcdf46780 /src/cmd/scat | |
| parent | 1e6e30e91e7a2712d9507072b5ff3b59a73e5dfe (diff) | |
| download | plan9port-156e745be9f6a1b19b0f8e2a931148786d7acad4.tar.gz plan9port-156e745be9f6a1b19b0f8e2a931148786d7acad4.zip | |
all: remove need for `-fcommon`
Use `extern` where appropriate so that we can remove `-fcommon`
on macOS and others. On macOS, `-fcommon` generates a number of
linker warnings.
I've tested building on macOS, Linux, FreeBSD, NetBSD, OpenBSD
and illumos. I am not in a position to test on AIX or other
more esoteric platforms, however.
Diffstat (limited to 'src/cmd/scat')
| -rw-r--r-- | src/cmd/scat/dssread.c | 1 | ||||
| -rw-r--r-- | src/cmd/scat/scat.c | 5 | ||||
| -rw-r--r-- | src/cmd/scat/sky.h | 18 |
3 files changed, 15 insertions, 9 deletions
diff --git a/src/cmd/scat/dssread.c b/src/cmd/scat/dssread.c index bd72132a..4ccd38c2 100644 --- a/src/cmd/scat/dssread.c +++ b/src/cmd/scat/dssread.c @@ -5,7 +5,6 @@ static void dodecode(Biobuf*, Pix*, int, int, uchar*); static int32 getlong(uchar*); -int debug; Img* dssread(char *file) diff --git a/src/cmd/scat/scat.c b/src/cmd/scat/scat.c index dff596b1..a21b8cb9 100644 --- a/src/cmd/scat/scat.c +++ b/src/cmd/scat/scat.c @@ -34,6 +34,11 @@ Record *rec; Record *orec; Record *cur; +int nplate; +Plate plate[2000]; /* needs to go to 2000 when the north comes */ +int debug; +Gam gam; + char *dir; int saodb; int ngcdb; diff --git a/src/cmd/scat/sky.h b/src/cmd/scat/sky.h index bc55fbfc..21b1904c 100644 --- a/src/cmd/scat/sky.h +++ b/src/cmd/scat/sky.h @@ -303,13 +303,14 @@ struct Img #define ARCSECONDS_PER_RADIAN (DEG(1)*3600) #define MILLIARCSEC (1000*60*60) -int nplate; -Plate plate[2000]; /* needs to go to 2000 when the north comes */ -double PI_180; -double TWOPI; -double LN2; -int debug; -struct +extern int nplate; +extern Plate plate[2000]; /* needs to go to 2000 when the north comes */ +extern double PI_180; +extern double TWOPI; +extern double LN2; +extern int debug; +typedef struct Gam Gam; +struct Gam { float min; float max; @@ -318,7 +319,8 @@ struct float mult1; float mult2; int neg; -} gam; +}; +extern Gam gam; typedef struct Picture Picture; struct Picture |
