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-18 05:15:11 (GMT)
commit933475ed53e7643618fdd702c9aa893b02343b30 (patch)
treed87a73e7a9ad6cdf5151b296409354d8ce503b61
parentef68bf72072f646603ab3fd6e7dddf4ac6f69fb5 (diff)
Fix PPC compilation of NuppeDecoder and NuppelRecorder
Patch from Lawrence Rust.
-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 */