[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r12065: use the Haiku stubs for the
From: |
Rob Savoye |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r12065: use the Haiku stubs for the shm* and sem* functions. |
Date: |
Mon, 15 Mar 2010 23:23:48 -0600 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 12065
committer: Rob Savoye <address@hidden>
branch nick: trunk
timestamp: Mon 2010-03-15 23:23:48 -0600
message:
use the Haiku stubs for the shm* and sem* functions.
modified:
libbase/Makefile.am
libbase/SharedMem.cpp
libbase/SharedMem.h
libbase/curl_adapter.cpp
=== modified file 'libbase/Makefile.am'
--- a/libbase/Makefile.am 2010-03-14 02:26:46 +0000
+++ b/libbase/Makefile.am 2010-03-16 05:23:48 +0000
@@ -42,6 +42,10 @@
$(INCLTDL) \
$(NULL)
+if ANDROID
+libgnashbase_la_CPPFLAGS += $(ANDROID_NDK)/usr/include
+endif
+
# These headers get installed
libgnashbase_la_LIBADD = \
@@ -86,6 +90,9 @@
$(NULL)
+if ANDROID
+libgnashbase_la_SOURCES += SharedMemHaiku.cpp
+endif
if BUILD_HAIKU_GUI
libgnashbase_la_SOURCES += SharedMemHaiku.cpp
else
=== modified file 'libbase/SharedMem.cpp'
--- a/libbase/SharedMem.cpp 2010-02-17 16:56:43 +0000
+++ b/libbase/SharedMem.cpp 2010-03-16 05:23:48 +0000
@@ -25,12 +25,12 @@
#include <unistd.h>
#include <dirent.h>
#include <fcntl.h>
-#if !defined(HAVE_WINSOCK_H) && !defined(__riscos__) && !defined(__OS2__) &&
!defined(HAIKU_HOST)
+#if !defined(HAVE_WINSOCK_H) && !defined(__riscos__) && !defined(__OS2__) &&
!defined(HAIKU_HOST) && !defined(_ANDROID)
# include <sys/mman.h>
# include <sys/shm.h>
+# include <sys/sem.h>
# include <sys/ipc.h>
-# include <sys/sem.h>
-#elif !defined(__riscos__) && !defined(__OS2__)
+#elif !defined(__riscos__) && !defined(__OS2__) && !defined(_ANDROID)
# include <windows.h>
# include <process.h>
# include <io.h>
@@ -39,10 +39,22 @@
#include <vector>
#include <cerrno>
+#ifdef _ANDROID
+# include <linux/shm.h>
+# include <linux/sem.h>
+extern int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf);
+extern int semget (key_t __key, int __nsems, int __semflg);
+extern int semop (int __semid, struct sembuf *__sops, size_t __nsops);
+extern int shmdt (__const void *__shmaddr);
+extern void *shmat (int __shmid, __const void *__shmaddr, int __shmflg);
+extern int shmget (key_t __key, size_t __size, int __shmflg);
+extern int semctl (int __semid, int __semnum, int __cmd, ...);
+#endif
+
#include "log.h"
#include "SharedMem.h"
-#if (defined(USE_SYSV_SHM) && defined(HAVE_SHMGET)) || defined(_WIN32)
+#if (defined(USE_SYSV_SHM) && defined(HAVE_SHMGET)) || defined(_WIN32) ||
defined(_ANDROID)
# define ENABLE_SHARED_MEM 1
#else
# undef ENABLE_SHARED_MEM
=== modified file 'libbase/SharedMem.h'
--- a/libbase/SharedMem.h 2010-03-10 16:37:25 +0000
+++ b/libbase/SharedMem.h 2010-03-16 05:23:48 +0000
@@ -19,12 +19,20 @@
#ifndef GNASH_SHM_H
#define GNASH_SHM_H
+#ifdef HAVE_CONFIG_H
+# include "gnashconfig.h"
+#endif
+
#include <boost/cstdint.hpp>
#include <sys/types.h>
#if !defined(HAVE_WINSOCK_H) && !defined(__riscos__) && !defined(__OS2__) &&
!defined(__HAIKU__)
# include <sys/ipc.h>
+#ifdef _ANDROID
+# include <linux/shm.h>
+#else
# include <sys/shm.h>
+#endif
#elif !defined(__riscos__) && !defined(__OS2__) && !defined(__HAIKU__)
# include <windows.h>
# include <process.h>
=== modified file 'libbase/curl_adapter.cpp'
--- a/libbase/curl_adapter.cpp 2010-01-18 07:30:59 +0000
+++ b/libbase/curl_adapter.cpp 2010-03-16 05:23:48 +0000
@@ -22,6 +22,10 @@
#include "gnashconfig.h"
#endif
+#ifdef _ANDROID
+#include <sys/select.h>
+#endif
+
#include "NetworkAdapter.h"
#include "utility.h" // UNUSED macro
#include "log.h"
@@ -34,7 +38,6 @@
#include <boost/version.hpp>
#include <boost/assign/list_of.hpp>
-
#ifndef USE_CURL
namespace gnash {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r12065: use the Haiku stubs for the shm* and sem* functions.,
Rob Savoye <=