diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-10-11 19:26:13 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-10-11 19:26:13 +0000 |
commit | 30d48cb10e8576126d9aa2e0bbc8e0a06b3896fc (patch) | |
tree | 80cc354a8b57f1746ce390b316456517d82bd59d /osdep | |
parent | 9f0ef64532858e0101f43050c1d369c3731b8bb9 (diff) | |
download | mpv-30d48cb10e8576126d9aa2e0bbc8e0a06b3896fc.tar.bz2 mpv-30d48cb10e8576126d9aa2e0bbc8e0a06b3896fc.tar.xz |
Zeta OS support, mostly working.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13613 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'osdep')
-rw-r--r-- | osdep/Makefile | 1 | ||||
-rw-r--r-- | osdep/shmem.c | 2 | ||||
-rw-r--r-- | osdep/swab.c | 17 | ||||
-rw-r--r-- | osdep/timer-lx.c | 3 |
4 files changed, 23 insertions, 0 deletions
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 <sys/uio.h> #ifdef HAVE_SYS_MMAN_H #include <sys/mman.h> +#elif defined(__BEOS__) +#include <mman.h> #endif #include <sys/socket.h> #include <fcntl.h> 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 <unistd.h> + +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 <unistd.h> +#ifdef __BEOS__ +#define usleep(t) snooze(t) +#endif #include <stdlib.h> #include <time.h> #include <sys/time.h> |