[MPlayer-dev-eng] [patch] FreeBSD native byteswap support

Mario Sergio Fujikawa Ferreira lioux-list at uol.com.br
Sat May 7 06:13:43 CEST 2005


Hi,

	I added some simple patches to allow mplayer
to use FreeBSD's native byteswap routines.

	These patches were done against Player-1.0pre7 and FreeBSD

.4-STABLE FreeBSD 5.4-STABLE #9: Sun Apr 24 23:26:17 BRT 2005

	Please direct me to the proper mailing list
if I made a mistake. Please do not disregard the patches just because
I misinterpreted the mailing list subject.

	Regards,

ps: Where should I direct feature requests such as an adevice option
for FreeBSD?

-- 
Mario S F Ferreira - DF - Brazil - "I guess this is a signature."
feature, n: a documented bug | bug, n: an undocumented feature
-------------- next part --------------
--- bswap.h.orig	Mon May  2 22:32:06 2005
+++ bswap.h	Mon May  2 22:32:12 2005
@@ -3,6 +3,8 @@
 
 #ifdef HAVE_BYTESWAP_H
 #include <byteswap.h>
+#elif (defined(__FreeBSD__) && __FreeBSD_version >= 470000)
+#include <sys/endian.h>
 #else
 
 #include <inttypes.h>
-------------- next part --------------
--- libavcodec/bswap.h.orig	Mon May  2 22:36:01 2005
+++ libavcodec/bswap.h	Mon May  2 22:35:21 2005
@@ -8,6 +8,8 @@
 
 #ifdef HAVE_BYTESWAP_H
 #include <byteswap.h>
+#elif (defined(__FreeBSD__) && __FreeBSD_version >= 470000)
+#include <sys/endian.h>
 #else
 
 #ifdef ARCH_X86_64
-------------- next part --------------
--- libmpdvdkit2/bswap.h.orig	Mon May  2 22:38:08 2005
+++ libmpdvdkit2/bswap.h	Mon May  2 22:40:04 2005
@@ -38,6 +38,12 @@
 #define B2N_32(x) x = bswap_32(x)
 #define B2N_64(x) x = bswap_64(x)
 
+#elif (defined(__FreeBSD__) && __FreeBSD_version >= 470000)
+#include <sys/endian.h>
+#define B2N_16(x) be16toh(x)
+#define B2N_32(x) be32toh(x)
+#define B2N_64(x) be64toh(x)
+
 #elif defined(__NetBSD__)
 #include <sys/endian.h>
 #define B2N_16(x) BE16TOH(x)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050507/955c7d4e/attachment.pgp>


More information about the MPlayer-dev-eng mailing list