History

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.

Janne Grunau committed 14 years ago

Commit 1d01fee1 parent 67ffcb94 files · +2 −7Browse files

Unified · Split

4 files
  1. configure +1 −1
  2. libavcodec/aacps_tablegen.h +1 −0
  3. libavcodec/cos_tablegen.c +0 −3
  4. libavcodec/sinewin_tablegen.c +0 −3
configure+1−1
@@ -1682,7 +1682,7 @@ SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)' · 1681 unmodified lines
16821682 AS_O='-o $@'
16831683 CC_O='-o $@'
16841684
1685−host_cflags='-D_ISOC99_SOURCE -O3 -g'
1685+host_cflags='-D_ISOC99_SOURCE -D_XOPEN_SOURCE=600 -O3 -g'
16861686 host_libs='-lm'
16871687
16881688 target_path='$(CURDIR)'
libavcodec/aacps_tablegen.h+1−0
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323 #ifndef AACPS_TABLEGEN_H
2424 #define AACPS_TABLEGEN_H
2525
26+#include <math.h>
2627 #include <stdint.h>
2728
2829 #if CONFIG_HARDCODED_TABLES
libavcodec/cos_tablegen.c+0−3
@@ -24,9 +24,6 @@ · 23 unmodified lines
2424 #include <string.h>
2525 #include <math.h>
2626
27−#ifndef M_PI
28−#define M_PI 3.14159265358979323846
29−#endif
3027 #define BITS 16
3128 #define FLOATFMT "%.18e"
3229 #define FIXEDFMT "%6d"
libavcodec/sinewin_tablegen.c+0−3
@@ -26,9 +26,6 @@ · 25 unmodified lines
2626 #define SINETABLE(size) \
2727 float ff_sine_##size[size]
2828 #define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
29−#ifndef M_PI
30−#define M_PI 3.14159265358979323846
31−#endif
3229 #include "sinewin_tablegen.h"
3330 #include "tableprint.h"
3431

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t