Date: Fri, 5 Apr 2002 15:52:46 -0800 (PST) From: "Bruce A. Mah" <bmah@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/36805: [PATCH] Unbreak audio/timidity++ on -CURRENT Message-ID: <200204052352.g35Nqkv7055994@intruder.bmah.org>
next in thread | raw e-mail | index | archive | help
>Number: 36805 >Category: ports >Synopsis: [PATCH] Unbreak audio/timidity++ on -CURRENT >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Fri Apr 05 16:00:02 PST 2002 >Closed-Date: >Last-Modified: >Originator: Bruce A. Mah >Release: FreeBSD 4.5-STABLE i386 >Organization: >Environment: FreeBSD tomcat.bmah.org 5.0-DP1 FreeBSD 5.0-DP1 #5: Wed Mar 27 09:21:42 PST 2002 root@tomcat.bmah.org:/usr/obj/usr/users/bmah/p4/5_dp1/src/sys/GENERIC i386 >Description: The audio/timidity++ port won't build on 5-CURRENT, because of some API changes (byte-swapping macros). >How-To-Repeat: >Fix: Replacing patch-ac with the file below appears to fix the problem, but this could really use a review first. I'm not sure if I'm calling the right routines, or if I got the __FreeBSD_version check correct. Run-tested on i386 5.0-DP1, build-tested on i386 4.5-STABLE. --- patch-ac begins here --- --- 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) --- patch-ac ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204052352.g35Nqkv7055994>