o If ${OSVERSION} >= 500000 use bswap16(9)/bswap32(9) instead

of be16toh(9)/be32toh(9).
o Bump PORTREVISION
This commit is contained in:
Mario Sergio Fujikawa Ferreira 2005-11-28 22:56:51 +00:00
parent 34afd47109
commit 96d55faa24
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=149839
2 changed files with 12 additions and 4 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= ogle
PORTVERSION= 0.9.2
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= multimedia
MASTER_SITES= http://www.dtek.chalmers.se/groups/dvd/dist/

View File

@ -1,15 +1,23 @@
--- include/ogle_endian.h.orig Wed Mar 5 23:26:06 2003
+++ include/ogle_endian.h Wed Mar 5 23:28:37 2003
@@ -45,6 +45,13 @@
--- include/ogle_endian.h.orig Sun Apr 13 12:43:23 2003
+++ include/ogle_endian.h Mon Nov 28 16:46:40 2005
@@ -48,8 +48,21 @@
# define FROM_BE_32(x) (swap32(x))
#elif defined(HAVE_SYS_ENDIAN_H) && defined(__FreeBSD__) && __FreeBSD_version >= 470000
# include <sys/endian.h>
+# if (__FreeBSD_version >= 500000)
+# define FROM_BE_16(x) (bswap16(x))
+# define FROM_BE_32(x) (bswap32(x))
+# else
# define FROM_BE_16(x) (be16toh(x))
# define FROM_BE_32(x) (be32toh(x))
+# endif
+#elif defined(__FreeBSD__)
+# define _KERNEL
+# define I486_CPU /* Will crash unless 486+ */
+# include <machine/endian.h>
+# undef _KERNEL
+# undef I486_CPU
+# define FROM_BE_16(x) (ntohs(x))
+# define FROM_BE_32(x) (ntohl(x))
#else
# warning "No accelerated byte swap found. Using slow c version."