On 2013-07-04 21:55, Luca Barbato wrote:
AIX defines a class() function in its math.h header without any
guard.
---
Tested locally by adding a class() function in math.h
compat/aix/math.h | 14 ++++++++++++++
configure | 3 +++
2 files changed, 17 insertions(+)
create mode 100644 compat/aix/math.h
This was pushed less than two hours after being posted. Can we *please*
not rush things so much? A broken AIX fate box is hardly an urgency
that needs to get fixed ASAP...
This is not the first, but more like the 100th time I complain about
rushed pushing of patches. I propose a 24h embargo on anything that is
not a fix for really urgent breakage.
--- /dev/null
+++ b/compat/aix/math.h
@@ -0,0 +1,14 @@
+/*
+ * Workaround aix-specific class() function clashing with libav class usage
+ */
The noun is "workaround", the verb is "to work around"; AIX-specific.
Then "class usage" is confusing, we do not use classes, there are
identifiers named "class".
Work around class() function in AIX math.h clashing with identifiers
named "class".
Also, this is missing a license header.
+#ifndef COMPAT_AIX_MATH_H
+#define COMPAT_AIX_MATH_H
COMPAT is not a valid prefix, it should be LIBAV or LIBAV_COMPAT.
+#define class class_in_math_h_causes_problems
+
+#include_next <math.h>
+
+#undef class
+
+#endif /* COMPAT_AIX_MATH_H */
--- a/configure
+++ b/configure
@@ -3049,6 +3049,9 @@ enabled spic && enable_weak pic
# OS specific
case $target_os in
+ aix)
+ add_cppflags '-I\$(SRC_PATH)/compat/aix'
+ ;;
math.h is a libc header. Detecting the AIX libc seems cleaner.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel