diff options
author | hayati ayguen <h_ayguen@web.de> | 2020-03-29 03:39:30 +0200 |
---|---|---|
committer | hayati ayguen <h_ayguen@web.de> | 2020-03-29 03:39:30 +0200 |
commit | c974c1d9e336bdd790260d96044207424384613c (patch) | |
tree | 4ee2c5936213ee02ece083cb14d586cb33f8408e /fftpack.c | |
parent | 7b3ca7d7804ef7f650382a922c89571bf7fee980 (diff) | |
download | pffft-c974c1d9e336bdd790260d96044207424384613c.tar.gz |
removed most gcc extensions in source - but still required
* replaced the c++ style '//' comments
* added explicit math defines M_PI, .. - if not already defined
* gcc function (inline) attributes still require the extensions :-(
Signed-off-by: hayati ayguen <h_ayguen@web.de>
Diffstat (limited to 'fftpack.c')
-rw-r--r-- | fftpack.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -66,6 +66,16 @@ static real c_abs(f77complex *c) { return sqrt(c->r*c->r + c->i*c->i); } static double dmax(double a, double b) { return a < b ? b : a; } #endif +/* define own constants required to turn off g++ extensions .. */ +#ifndef M_PI + #define M_PI 3.14159265358979323846 /* pi */ +#endif + +#ifndef M_SQRT2 + #define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ +#endif + + /* translated by f2c (version 20061008), and slightly edited */ static void passfb(integer *nac, integer ido, integer ip, integer l1, integer idl1, @@ -3109,4 +3119,4 @@ int main(void) return all_ok ? 0 : 1; } -#endif //TESTING_FFTPACK +#endif /* TESTING_FFTPACK */ |