summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2002-11-10 19:38:57 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2002-11-10 19:38:57 +0000
commit8f24b0985f6039d532d7d38542053572e31f33f3 (patch)
treeb6e3df8d2d4bfc2d422760652d78f49114a75d4e /graphics
parentxargs -> ${XARGS}. (diff)
o Further improve detection of FreeBSD optimized byteswap routines
o No PORTREVISION bump
Notes
Notes: svn path=/head/; revision=69837
Diffstat (limited to 'graphics')
-rw-r--r--graphics/ogle/files/extra-patch-include:ogle_endian.h23
-rw-r--r--graphics/ogle/files/patch-include:ogle_endian.h10
2 files changed, 20 insertions, 13 deletions
diff --git a/graphics/ogle/files/extra-patch-include:ogle_endian.h b/graphics/ogle/files/extra-patch-include:ogle_endian.h
index 391a38e4dfa2..80ea4b9c6108 100644
--- a/graphics/ogle/files/extra-patch-include:ogle_endian.h
+++ b/graphics/ogle/files/extra-patch-include:ogle_endian.h
@@ -1,21 +1,26 @@
---- include/ogle_endian.h.orig Thu Oct 10 12:20:03 2002
-+++ include/ogle_endian.h Thu Oct 10 12:21:47 2002
-@@ -39,6 +39,18 @@
- #elif defined(HAVE_SYS_ENDIAN_H) && !defined(__FreeBSD__)
+--- include/ogle_endian.h.orig Thu Oct 4 00:41:49 2001
++++ include/ogle_endian.h Sun Nov 10 17:12:23 2002
+@@ -29,6 +29,9 @@
+ # define FROM_BE_32(x) (x)
+ #else
+
++#if (defined(__unix__) || defined(unix)) && !defined(USG)
++#include <sys/param.h>
++#endif
+
+ #if defined(HAVE_BYTESWAP_H)
+ # include <byteswap.h>
+@@ -39,6 +42,13 @@
+ #elif defined(HAVE_SYS_ENDIAN_H)
# include <sys/endian.h>
# define FROM_BE_32(x) (swap32(x))
+#elif defined(__FreeBSD__)
-+# if defined(HAVE_SYS_ENDIAN_H) && __FreeBSD_version >= 500000
-+# include <sys/endian.h>
-+# define FROM_BE_32(x) (bswap32(x))
-+# else
+# define _KERNEL
+# define I486_CPU /* Will crash unless 486+ */
+# include <machine/endian.h>
+# undef _KERNEL
+# undef I486_CPU
+# define FROM_BE_32(x) (ntohl(x))
-+# endif
#else
# warning "No accelerated byte swap found. Using slow c version."
# include <inttypes.h>
diff --git a/graphics/ogle/files/patch-include:ogle_endian.h b/graphics/ogle/files/patch-include:ogle_endian.h
index 479aadab635d..555b9431c4dd 100644
--- a/graphics/ogle/files/patch-include:ogle_endian.h
+++ b/graphics/ogle/files/patch-include:ogle_endian.h
@@ -1,6 +1,6 @@
---- include/ogle_endian.h.orig Thu Oct 4 00:41:49 2001
-+++ include/ogle_endian.h Thu Oct 10 12:08:36 2002
-@@ -36,7 +36,7 @@
+--- include/ogle_endian.h.orig Sun Nov 10 17:13:10 2002
++++ include/ogle_endian.h Sun Nov 10 17:13:29 2002
+@@ -36,6 +36,9 @@
#elif defined(HAVE_SYS_BSWAP_H)
# include <sys/bswap.h>
# define FROM_BE_32(x) (bswap32(x))
@@ -8,4 +8,6 @@
+#elif defined(HAVE_SYS_ENDIAN_H) && !defined(__FreeBSD__)
# include <sys/endian.h>
# define FROM_BE_32(x) (swap32(x))
- #else
++#elif defined(HAVE_SYS_ENDIAN_H) && defined(__FreeBSD__) && __FreeBSD_version >= 470000
++# include <sys/endian.h>
++# define FROM_BE_32(x) (be32toh(x))