summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/ogle/files/extra-patch-include:ogle_endian.h23
-rw-r--r--graphics/ogle/files/patch-include:ogle_endian.h10
-rw-r--r--multimedia/ogle/files/extra-patch-include:ogle_endian.h23
-rw-r--r--multimedia/ogle/files/patch-include:ogle_endian.h10
4 files changed, 40 insertions, 26 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))
diff --git a/multimedia/ogle/files/extra-patch-include:ogle_endian.h b/multimedia/ogle/files/extra-patch-include:ogle_endian.h
index 391a38e4dfa2..80ea4b9c6108 100644
--- a/multimedia/ogle/files/extra-patch-include:ogle_endian.h
+++ b/multimedia/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/multimedia/ogle/files/patch-include:ogle_endian.h b/multimedia/ogle/files/patch-include:ogle_endian.h
index 479aadab635d..555b9431c4dd 100644
--- a/multimedia/ogle/files/patch-include:ogle_endian.h
+++ b/multimedia/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))