Skip to content

Commit

Permalink
I hope this is the last I see of bswap.h for a while.
Browse files Browse the repository at this point in the history
Getting all the variations right is rather tiring.
  • Loading branch information
Beirdo committed May 9, 2012
1 parent 3b62c77 commit 812fcf7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mythtv/libs/libmythbase/bswap.h
Expand Up @@ -21,10 +21,12 @@
# define bswap_16(x) OSSwapInt16(x)
# define bswap_32(x) OSSwapInt32(x)
# define bswap_64(x) OSSwapInt64(x)
#else
#elif HAVE_BIGENDIAN
# error Byte swapping functions not defined for this platform
#endif

#ifdef bswap_32
// TODO: Any reason we choose not to use bswap_64 for this?
static __inline__ double bswap_dbl(double x)
{
union {
Expand All @@ -36,5 +38,6 @@ static __inline__ double bswap_dbl(double x)
r.l[1] = bswap_32(w.l[0]);
return r.d;
}
#endif

#endif /* ndef MYTHTV_BSWAP_H */

0 comments on commit 812fcf7

Please sign in to comment.