From 30d48cb10e8576126d9aa2e0bbc8e0a06b3896fc Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 11 Oct 2004 19:26:13 +0000 Subject: Zeta OS support, mostly working. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13613 b3059339-0415-0410-9bf9-f77b7e298cf2 --- osdep/Makefile | 1 + osdep/shmem.c | 2 ++ osdep/swab.c | 17 +++++++++++++++++ osdep/timer-lx.c | 3 +++ 4 files changed, 23 insertions(+) create mode 100644 osdep/swab.c (limited to 'osdep') diff --git a/osdep/Makefile b/osdep/Makefile index 4052aa4cd7..58370bc628 100644 --- a/osdep/Makefile +++ b/osdep/Makefile @@ -4,6 +4,7 @@ include ../config.mak LIBNAME = libosdep.a SRCS= shmem.c strsep.c strl.c vsscanf.c scandir.c gettimeofday.c fseeko.c \ + swab.c # timer.c ifeq ($(TARGET_ARCH_X86),yes) diff --git a/osdep/shmem.c b/osdep/shmem.c index 9426a33fd5..ec496d92f1 100644 --- a/osdep/shmem.c +++ b/osdep/shmem.c @@ -20,6 +20,8 @@ #include #ifdef HAVE_SYS_MMAN_H #include +#elif defined(__BEOS__) +#include #endif #include #include diff --git a/osdep/swab.c b/osdep/swab.c new file mode 100644 index 0000000000..45d26cbc14 --- /dev/null +++ b/osdep/swab.c @@ -0,0 +1,17 @@ +#include "../config.h" + +#ifndef HAVE_SWAB +/* system has no swab. emulate via bswap */ +#include "../bswap.h" +#include + +void swab(const void *from, void *to, ssize_t n) { + const int16_t *in = (int16_t*)from; + int16_t *out = (int16_t*)to; + int i; + n /= 2; + for (i = 0 ; i < n; i++) { + out[i] = bswap_16(in[i]); + } +} +#endif diff --git a/osdep/timer-lx.c b/osdep/timer-lx.c index f7deb98dda..e0ecfb6e58 100644 --- a/osdep/timer-lx.c +++ b/osdep/timer-lx.c @@ -1,6 +1,9 @@ // Precise timer routines for LINUX (C) LGB & A'rpi/ASTRAL #include +#ifdef __BEOS__ +#define usleep(t) snooze(t) +#endif #include #include #include -- cgit v1.2.3