Module: libav Branch: master Commit: 1d01fee980edf60215acd94daf2533a9fefb9342
Author: Janne Grunau <[email protected]> Committer: Janne Grunau <[email protected]> Date: Thu Jun 21 17:59:56 2012 +0200 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. --- configure | 2 +- libavcodec/aacps_tablegen.h | 1 + libavcodec/cos_tablegen.c | 3 --- libavcodec/sinewin_tablegen.c | 3 --- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 07608c4..14642fa 100755 --- a/configure +++ b/configure @@ -1682,7 +1682,7 @@ SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)' AS_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' target_path='$(CURDIR)' diff --git a/libavcodec/aacps_tablegen.h b/libavcodec/aacps_tablegen.h index d71a373..bd4e695 100644 --- a/libavcodec/aacps_tablegen.h +++ b/libavcodec/aacps_tablegen.h @@ -23,6 +23,7 @@ #ifndef AACPS_TABLEGEN_H #define AACPS_TABLEGEN_H +#include <math.h> #include <stdint.h> #if CONFIG_HARDCODED_TABLES diff --git a/libavcodec/cos_tablegen.c b/libavcodec/cos_tablegen.c index 5e52c48..8a90857 100644 --- a/libavcodec/cos_tablegen.c +++ b/libavcodec/cos_tablegen.c @@ -24,9 +24,6 @@ #include <string.h> #include <math.h> -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif #define BITS 16 #define FLOATFMT "%.18e" #define FIXEDFMT "%6d" diff --git a/libavcodec/sinewin_tablegen.c b/libavcodec/sinewin_tablegen.c index d5e0689..90a75c2 100644 --- a/libavcodec/sinewin_tablegen.c +++ b/libavcodec/sinewin_tablegen.c @@ -26,9 +26,6 @@ #define SINETABLE(size) \ float ff_sine_##size[size] #define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0])) -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif #include "sinewin_tablegen.h" #include "tableprint.h" _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
