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 | AS_O='-o $@' | 1682 | AS_O='-o $@' |
| 1683 | CC_O='-o $@' | 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 | host_libs='-lm' | 1686 | host_libs='-lm' |
| 1687 | 1687 | ||
| 1688 | target_path='$(CURDIR)' | 1688 | target_path='$(CURDIR)' |
| @@ -23,6 +23,7 @@ · 22 unmodified lines | |||
| 23 | #ifndef AACPS_TABLEGEN_H | 23 | #ifndef AACPS_TABLEGEN_H |
| 24 | #define AACPS_TABLEGEN_H | 24 | #define AACPS_TABLEGEN_H |
| 25 | 25 | ||
| 26 | #include <math.h> | ||
| 26 | #include <stdint.h> | 27 | #include <stdint.h> |
| 27 | 28 | ||
| 28 | #if CONFIG_HARDCODED_TABLES | 29 | #if CONFIG_HARDCODED_TABLES |
| @@ -24,9 +24,6 @@ · 23 unmodified lines | |||
| 24 | #include <string.h> | 24 | #include <string.h> |
| 25 | #include <math.h> | 25 | #include <math.h> |
| 26 | 26 | ||
| 27 | #ifndef M_PI | ||
| 28 | #define M_PI 3.14159265358979323846 | ||
| 29 | #endif | ||
| 30 | #define BITS 16 | 27 | #define BITS 16 |
| 31 | #define FLOATFMT "%.18e" | 28 | #define FLOATFMT "%.18e" |
| 32 | #define FIXEDFMT "%6d" | 29 | #define FIXEDFMT "%6d" |
| @@ -26,9 +26,6 @@ · 25 unmodified lines | |||
| 26 | #define SINETABLE(size) \ | 26 | #define SINETABLE(size) \ |
| 27 | float ff_sine_##size[size] | 27 | float ff_sine_##size[size] |
| 28 | #define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0])) | 28 | #define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0])) |
| 29 | #ifndef M_PI | ||
| 30 | #define M_PI 3.14159265358979323846 | ||
| 31 | #endif | ||
| 32 | #include "sinewin_tablegen.h" | 29 | #include "sinewin_tablegen.h" |
| 33 | #include "tableprint.h" | 30 | #include "tableprint.h" |
| 34 | 31 | ||