Add -D_XOPEN_SOURCE=600 to host cflags to make the constants in math.h available. Include math.h where necessary and remove redundant M_PI defines.
Unified · Split
| @@ -1682,7 +1682,7 @@ SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)' · 1681 unmodified lines | ||
| 1682 | 1682 | AS_O='-o $@' |
| 1683 | 1683 | CC_O='-o $@' |
| 1684 | 1684 | |
| 1685 | −host_cflags='-D_ISOC99_SOURCE -O3 -g' | |
| 1685 | +host_cflags='-D_ISOC99_SOURCE -D_XOPEN_SOURCE=600 -O3 -g' | |
| 1686 | 1686 | host_libs='-lm' |
| 1687 | 1687 | |
| 1688 | 1688 | target_path='$(CURDIR)' |
| @@ -23,6 +23,7 @@ · 22 unmodified lines | ||
| 23 | 23 | #ifndef AACPS_TABLEGEN_H |
| 24 | 24 | #define AACPS_TABLEGEN_H |
| 25 | 25 | |
| 26 | +#include <math.h> | |
| 26 | 27 | #include <stdint.h> |
| 27 | 28 | |
| 28 | 29 | #if CONFIG_HARDCODED_TABLES |
| @@ -24,9 +24,6 @@ · 23 unmodified lines | ||
| 24 | 24 | #include <string.h> |
| 25 | 25 | #include <math.h> |
| 26 | 26 | |
| 27 | −#ifndef M_PI | |
| 28 | −#define M_PI 3.14159265358979323846 | |
| 29 | −#endif | |
| 30 | 27 | #define BITS 16 |
| 31 | 28 | #define FLOATFMT "%.18e" |
| 32 | 29 | #define FIXEDFMT "%6d" |
| @@ -26,9 +26,6 @@ · 25 unmodified lines | ||
| 26 | 26 | #define SINETABLE(size) \ |
| 27 | 27 | float ff_sine_##size[size] |
| 28 | 28 | #define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0])) |
| 29 | −#ifndef M_PI | |
| 30 | −#define M_PI 3.14159265358979323846 | |
| 31 | −#endif | |
| 32 | 29 | #include "sinewin_tablegen.h" |
| 33 | 30 | #include "tableprint.h" |
| 34 | 31 | |