On Ubuntu Linux, I run into the following M_PI compilation errors without the patch in this PR.
$ make
cc -O3 -std=c11 -I. -c -o decode_ft8.o decode_ft8.c
decode_ft8.c: In function ‘hann_i’:
decode_ft8.c:38:27: error: ‘M_PI’ undeclared (first use in this function)
38 | float x = sinf((float)M_PI * i / N);
| ^~~~
decode_ft8.c:38:27: note: each undeclared identifier is reported only once for each function it appears in
decode_ft8.c: In function ‘hamming_i’:
decode_ft8.c:47:32: error: ‘M_PI’ undeclared (first use in this function)
47 | float x1 = cosf(2 * (float)M_PI * i / N);
| ^~~~
decode_ft8.c: In function ‘blackman_i’:
decode_ft8.c:58:32: error: ‘M_PI’ undeclared (first use in this function)
58 | float x1 = cosf(2 * (float)M_PI * i / N);
| ^~~~
make: *** [<builtin>: decode_ft8.o] Error 1
On Ubuntu Linux, I run into the following
M_PI
compilation errors without the patch in this PR.This PR fixes these compilation errors.