mirror of
https://git.freebsd.org/ports.git
synced 2025-06-08 06:10:30 -04:00
Run-tested on 4-STABLE/i386 and 5-CURRENT/i386. Approved by: Yoichi ASAI <yatt@msc.biglobe.ne.jp> (maintainer)
46 lines
1.4 KiB
Text
46 lines
1.4 KiB
Text
--- timidity/timidity.h.orig Fri Jan 11 23:36:13 2002
|
|
+++ timidity/timidity.h Fri Apr 5 15:37:51 2002
|
|
@@ -450,8 +450,19 @@
|
|
#define LE_SHORT(x) (x)
|
|
#define LE_LONG(x) (x)
|
|
#ifdef __FreeBSD__
|
|
-#define BE_SHORT(x) __byte_swap_word(x)
|
|
-#define BE_LONG(x) __byte_swap_long(x)
|
|
+# include <osreldate.h>
|
|
+# if __FreeBSD_version <= 500000
|
|
+# define BE_SHORT(x) __byte_swap_word(x)
|
|
+# define BE_LONG(x) __byte_swap_long(x)
|
|
+# else
|
|
+# if __FreeBSD_version <= 500028
|
|
+# define BE_SHORT(x) __uint8_swap_uint16(x)
|
|
+# define BE_LONG(x) __uint8_swap_uint32(x)
|
|
+# else
|
|
+# define BE_SHORT(x) __bswap16(x)
|
|
+# define BE_LONG(x) __bswap32(x)
|
|
+# endif
|
|
+# endif
|
|
#else
|
|
#define BE_SHORT(x) XCHG_SHORT(x)
|
|
#define BE_LONG(x) XCHG_LONG(x)
|
|
@@ -460,8 +471,19 @@
|
|
#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)
|
|
+# include <osreldate.h>
|
|
+# if __FreeBSD_version <= 500000
|
|
+# define LE_SHORT(x) __byte_swap_word(x)
|
|
+# define LE_LONG(x) __byte_swap_long(x)
|
|
+# else
|
|
+# if __FreeBSD_version <= 500028
|
|
+# define LE_SHORT(x) __uint8_swap_uint16(x)
|
|
+# define LE_LONG(x) __uint8_swap_uint32(x)
|
|
+# else
|
|
+# define LE_SHORT(x) __bswap16(x)
|
|
+# define LE_LONG(x) __bswap32(x)
|
|
+# endif
|
|
+# endif
|
|
#else
|
|
#define LE_SHORT(x) XCHG_SHORT(x)
|
|
#define LE_LONG(x) XCHG_LONG(x)
|