diff -U 3 -dHrN a/plan404/cmoon.c b/plan404/cmoon.c --- a/plan404/cmoon.c 2024-11-09 10:33:59.000000000 +0100 +++ b/plan404/cmoon.c 2025-01-23 18:14:36.412869796 +0100 @@ -127,6 +127,7 @@ */ #include "plantbl.h" +#include extern int epsiln(double J); @@ -551,7 +552,7 @@ /* Beware of atan2()! */ -double floor(), sin(), cos(), asin(), mods3600(); +double mods3600(double); /* equatorial radius of the earth, in au */ @@ -560,7 +561,7 @@ #define Kearth 6378.137 extern double STR, DTR, J2000; -int moon1(), moon2(), moon3(), moon4(), chewm(), sscc(); +int moon1(), moon2(), moon3(), moon4(int), chewm(short*,int,int,int,double*), sscc(int,double,int); #if AASUB @@ -845,7 +846,6 @@ double x; { double lx; -double floor(); lx = x; lx = lx - 1296000.0 * floor( lx/1296000.0 ); diff -U 3 -dHrN a/plan404/epsiln.c b/plan404/epsiln.c --- a/plan404/epsiln.c 2024-11-09 10:33:59.000000000 +0100 +++ b/plan404/epsiln.c 2025-01-23 17:48:16.216078423 +0100 @@ -21,6 +21,7 @@ * */ #include "plantbl.h" + #include /* The results of the program are returned in these * global variables: @@ -30,7 +31,6 @@ double coseps = 0.0; /* Cosine of the obliquity */ double sineps = 0.0; /* Sine of the obliquity */ extern double eps, coseps, sineps, STR; -double sin(), cos(), fabs(); int epsiln(J) double J; /* Julian date input */ diff -U 3 -dHrN a/plan404/gplan.c b/plan404/gplan.c --- a/plan404/gplan.c 2024-11-09 10:33:59.000000000 +0100 +++ b/plan404/gplan.c 2025-01-23 17:52:39.690327333 +0100 @@ -1,4 +1,5 @@ #include "plantbl.h" +#include #define TIMESCALE 3652500.0 #define mods3600(x) ((x) - 1.296e6 * floor ((x)/1.296e6)) @@ -43,8 +44,7 @@ static double ss[9][24]; static double cc[9][24]; -double cos (), sin (), floor (), fabs (); -static int sscc (); +static int sscc (int,double,int); int gplan (J, plan, pobj) diff -U 3 -dHrN a/plan404/nutate.c b/plan404/nutate.c --- a/plan404/nutate.c 2024-11-09 10:33:59.000000000 +0100 +++ b/plan404/nutate.c 2025-01-23 18:07:43.080547973 +0100 @@ -21,6 +21,7 @@ * tested against JPL DE403 ephemeris file. */ #include "plantbl.h" +#include /* The answers are posted here by nutlo(): */ @@ -173,9 +174,8 @@ double ss[5][8]; double cc[5][8]; extern double ss[5][8], cc[5][8]; -int sscc(), epsiln(), showcor(); +int sscc(int,double,int), epsiln(double), showcor(); -double sin(), cos(), floor(); #define mod3600(x) ((x) - 1296000. * floor ((x)/1296000.)) int nutlo(J) @@ -317,7 +317,6 @@ double ce, se, cl, sl, sino, f; double dp[3], p1[3]; int i; -double sin(), cos(); nutlo(J); /* be sure we calculated nutl and nuto */ epsiln(J); /* and also the obliquity of date */ @@ -369,7 +368,6 @@ { double cu, su, cv, sv, s; int i; -double sin(), cos(); su = sin(arg); cu = cos(arg); diff -U 3 -dHrN a/plan404/plan404.c b/plan404/plan404.c --- a/plan404/plan404.c 2024-11-09 10:33:59.000000000 +0100 +++ b/plan404/plan404.c 2025-01-23 17:55:19.459025255 +0100 @@ -34,6 +34,7 @@ */ #include +#include #include "plantbl.h" #include "plan404.h" @@ -53,11 +54,12 @@ &plu404 }; +typedef struct plantbl Plantbl; + double sineps2k = 3.97777155754e-1; // ecliptic J2000 double coseps2k = 9.17482062146e-1; -double cos (), sin (); -int gplan (), gmoon (); +int gplan (double,Plantbl*,double*), gmoon (double,double*,double*); int Plan404 ( pla ) struct PlanetData *pla; diff -U 3 -dHrN a/plan404/precess.c b/plan404/precess.c --- a/plan404/precess.c 2024-11-09 10:33:59.000000000 +0100 +++ b/plan404/precess.c 2025-01-23 18:04:20.687395388 +0100 @@ -3,6 +3,7 @@ * * Program by Steve Moshier. */ #include "plantbl.h" +#include #define WILLIAMS 1 /* James G. Williams, "Contributions to the Earth's obliquity rate, @@ -62,13 +63,12 @@ */ #define DOUBLE double -double cos(), sin(); #define COS cos #define SIN sin extern DOUBLE J2000; /* = 2451545.0, 2000 January 1.5 */ extern DOUBLE STR; /* = 4.8481368110953599359e-6 radians per arc second */ extern DOUBLE coseps, sineps; /* see epsiln.c */ -extern int epsiln(); +extern int epsiln(double); /* In WILLIAMS and SIMON, Laskar's terms of order higher than t^4 have been retained, because Simon et al mention that the solution diff -U 3 -dHrN a/wcs/fitsfile.c b/wcs/fitsfile.c --- a/wcs/fitsfile.c 2024-11-09 10:33:59.000000000 +0100 +++ b/wcs/fitsfile.c 2025-01-23 18:28:11.010552409 +0100 @@ -83,6 +83,7 @@ #include #include #include +#include #include "fitsfile.h" static int verbose=0; /* Print diagnostics */ diff -U 3 -dHrN a/wcs/imgetwcs.c b/wcs/imgetwcs.c --- a/wcs/imgetwcs.c 2024-11-09 10:33:59.000000000 +0100 +++ b/wcs/imgetwcs.c 2025-01-23 18:42:54.560745332 +0100 @@ -31,6 +31,7 @@ #include #include #include +#include #include "wcs.h" #include "lwcs.h" diff -U 3 -dHrN a/wcs/Makefile b/wcs/Makefile --- a/wcs/Makefile 2025-01-23 17:23:42.116661645 +0100 +++ b/wcs/Makefile 2025-01-23 18:40:42.191867339 +0100 @@ -1,5 +1,5 @@ # -CFLAGS= -w -fPIC $(arch_flags) +CFLAGS= -w -fPIC $(arch_flags) -std=c17 -D_XOPEN_SOURCE=500 OSTYPE = $(shell uname) ifneq ($(findstring BSD,$(OSTYPE)),) CC = cc diff -U 3 -dHrN a/wcs/wcscon.c b/wcs/wcscon.c --- a/wcs/wcscon.c 2024-11-09 10:33:59.000000000 +0100 +++ b/wcs/wcscon.c 2025-01-23 18:42:59.588375118 +0100 @@ -71,6 +71,7 @@ #include /* for fprintf() and sprintf() */ #include #include +#include #include "wcs.h" void fk524(), fk524e(), fk524m(), fk524pv();