1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-05 22:43:24 +00:00
freebsd-ports/audio/sdl_mixer/files/patch-ac
Will Andrews 7bcdd7c82e Add SDL_mixer, an audio library based on SDL 1.1.
PR:		18190
Submitted by:	Maxim Sobolev <sobomax@altavista.net>
2000-04-25 21:19:17 +00:00

50 lines
1.1 KiB
Plaintext

--- timidity/config.h.orig Tue Feb 1 23:16:29 2000
+++ timidity/config.h Mon Apr 24 12:53:43 2000
@@ -156,6 +156,22 @@
# endif
#endif /* linux */
+#ifdef __FreeBSD__
+#include <errno.h>
+#include <machine/endian.h>
+#if BYTE_ORDER == LITTLE_ENDIAN
+#undef BIG_ENDIAN
+#undef PDP_ENDIAN
+#elif BYTE_ORDER == BIG_ENDIAN
+#undef LITTLE_ENDIAN
+#undef PDP_ENDIAN
+#else
+# error No valid byte sex defined
+#endif
+#define USE_LDEXP
+#define PI M_PI
+#endif
+
/* Win32 on Intel machines */
#ifdef __WIN32__
# define LITTLE_ENDIAN
@@ -186,13 +202,23 @@
#ifdef LITTLE_ENDIAN
#define LE_SHORT(x) x
#define LE_LONG(x) x
+#if defined(__FreeBSD__) && !defined(__alpha__)
+#define BE_SHORT(x) __byte_swap_word(x)
+#define BE_LONG(x) __byte_swap_long(x)
+#else
#define BE_SHORT(x) XCHG_SHORT(x)
#define BE_LONG(x) XCHG_LONG(x)
+#endif
#else
#define BE_SHORT(x) x
#define BE_LONG(x) x
+#ifdef __FreeBSD__
+#define LE_SHORT(x) __byte_swap_word(x)
+#define LE_LONG(x) __byte_swap_long(x)
+#else
#define LE_SHORT(x) XCHG_SHORT(x)
#define LE_LONG(x) XCHG_LONG(x)
+#endif
#endif
#define MAX_AMPLIFICATION 800