Commit 1d01fee9 authored by Janne Grunau's avatar Janne Grunau

fix hardcoded tables compililation caused by missing math constants

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.
parent 67ffcb96
...@@ -1682,7 +1682,7 @@ SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)' ...@@ -1682,7 +1682,7 @@ SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)'
AS_O='-o $@' AS_O='-o $@'
CC_O='-o $@' CC_O='-o $@'
host_cflags='-D_ISOC99_SOURCE -O3 -g' host_cflags='-D_ISOC99_SOURCE -D_XOPEN_SOURCE=600 -O3 -g'
host_libs='-lm' host_libs='-lm'
target_path='$(CURDIR)' target_path='$(CURDIR)'
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#ifndef AACPS_TABLEGEN_H #ifndef AACPS_TABLEGEN_H
#define AACPS_TABLEGEN_H #define AACPS_TABLEGEN_H
#include <math.h>
#include <stdint.h> #include <stdint.h>
#if CONFIG_HARDCODED_TABLES #if CONFIG_HARDCODED_TABLES
......
...@@ -24,9 +24,6 @@ ...@@ -24,9 +24,6 @@
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#define BITS 16 #define BITS 16
#define FLOATFMT "%.18e" #define FLOATFMT "%.18e"
#define FIXEDFMT "%6d" #define FIXEDFMT "%6d"
......
...@@ -26,9 +26,6 @@ ...@@ -26,9 +26,6 @@
#define SINETABLE(size) \ #define SINETABLE(size) \
float ff_sine_##size[size] float ff_sine_##size[size]
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0])) #define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#include "sinewin_tablegen.h" #include "sinewin_tablegen.h"
#include "tableprint.h" #include "tableprint.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment