summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Kendall <mkendall@mythtv.org>2011-02-18 05:15:11 (GMT)
committer Mark Kendall <mkendall@mythtv.org>2011-02-21 01:01:02 (GMT)
commit4ce4707321aeec4387af11804265d9d4dba7b388 (patch)
treedc964319818300117a6d7f16f09841d961470459
parentc66dceb8f9978d7215441116fc7aca1d624c03a4 (diff)
Fix PPC compilation of NuppeDecoder and NuppelRecorder
Patch from Lawrence Rust. (cherry picked from commit 933475ed53e7643618fdd702c9aa893b02343b30)
-rw-r--r--mythtv/libs/libmythtv/bswap.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/mythtv/libs/libmythtv/bswap.h b/mythtv/libs/libmythtv/bswap.h
new file mode 100644
index 0000000..6683c46
--- a/dev/null
+++ b/mythtv/libs/libmythtv/bswap.h
@@ -0,0 +1,19 @@
+#ifndef MYTHTV_BSWAP_H
+#define MYTHTV_BSWAP_H
+
+#include <stdint.h> /* uint32_t */
+#include <byteswap.h> /* bswap_16|32|64 */
+
+static __inline__ double bswap_dbl(double x)
+{
+ union {
+ uint32_t l[2];
+ double d;
+ } w, r;
+ w.d = x;
+ r.l[0] = bswap_32(w.l[1]);
+ r.l[1] = bswap_32(w.l[0]);
+ return r.d;
+}
+
+#endif /* ndef MYTHTV_BSWAP_H */