[x264-devel] Haiku support

Jerome Duval git at videolan.org
Sun Oct 11 19:01:06 CEST 2015


x264 | branch: master | Jerome Duval <jerome.duval at gmail.com> | Fri Jun 13 19:56:27 2014 +0000| [39af8c72e618a544baa06ae427fb2b440861abcd] | committer: Henrik Gramner

Haiku support

Add Haiku as supported platform in configure.
Haiku has no nice() function, use the platform specific substitute instead.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=39af8c72e618a544baa06ae427fb2b440861abcd
---

 common/osdep.h |    4 ++++
 configure      |    3 +++
 2 files changed, 7 insertions(+)

diff --git a/common/osdep.h b/common/osdep.h
index a94c525..96596b7 100644
--- a/common/osdep.h
+++ b/common/osdep.h
@@ -369,6 +369,10 @@ static ALWAYS_INLINE void x264_prefetch( void *p )
     sp.sched_priority -= p;\
     pthread_setschedparam( handle, policy, &sp );\
 }
+#elif SYS_HAIKU
+#include <OS.h>
+#define x264_lower_thread_priority(p)\
+    { UNUSED status_t nice_ret = set_thread_priority( find_thread( NULL ), B_LOW_PRIORITY ); }
 #else
 #include <unistd.h>
 #define x264_lower_thread_priority(p) { UNUSED int nice_ret = nice(p); }
diff --git a/configure b/configure
index 57a47ac..681535c 100755
--- a/configure
+++ b/configure
@@ -651,6 +651,9 @@ case $host_os in
         HAVE_GETOPT_LONG=0
         CFLAGS="$CFLAGS -I\$(SRCPATH)/extras"
         ;;
+    *haiku*)
+        SYS="HAIKU"
+        ;;
     *)
         die "Unknown system $host, edit the configure"
         ;;



More information about the x264-devel mailing list