summaryrefslogtreecommitdiff
path: root/sal/osl
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-05-27 21:13:02 +0200
committerJan Holesovsky <kendy@suse.cz>2011-05-27 21:13:02 +0200
commitbaf97f3cc9b8b7f90c2a1bf2fff53f4996b594d2 (patch)
tree03c324ebbb1ecb9d6f72ea277a27ac69ad690491 /sal/osl
parent4430b3f234ad47d7dfe1f3cbce8f2994fe7153db (diff)
parent3fb00a59b15233ff5c526ad57cccf54036832c88 (diff)
Merge branch 'master' of git://anongit.freedesktop.org/libreoffice/ure
Conflicts: sal/osl/unx/nlsupport.c
Diffstat (limited to 'sal/osl')
-rw-r--r--sal/osl/unx/file_volume.cxx12
-rw-r--r--sal/osl/unx/makefile.mk4
-rw-r--r--sal/osl/unx/module.c6
-rw-r--r--sal/osl/unx/nlsupport.c4
-rw-r--r--sal/osl/unx/process.c5
5 files changed, 22 insertions, 9 deletions
diff --git a/sal/osl/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx
index ca5461a15a20..b4b584decf07 100644
--- a/sal/osl/unx/file_volume.cxx
+++ b/sal/osl/unx/file_volume.cxx
@@ -1114,11 +1114,11 @@ osl_isFloppyMounted (oslVolumeDeviceHandleImpl* pDevice)
/******************************************************************************
*
- * MAC OS X FLOPPY FUNCTIONS
+ * MAC OS X AND IOS FLOPPY FUNCTIONS: NO FLOPPIES
*
*****************************************************************************/
-#if (defined(MACOSX) || defined(NETBSD) || defined(FREEBSD) || \
+#if (defined(MACOSX) || defined(IOS) || defined(NETBSD) || defined(FREEBSD) || \
defined(AIX) || defined(OPENBSD) || defined(DRAGONFLY))
static oslVolumeDeviceHandle osl_isFloppyDrive(const sal_Char* pszPath)
{
@@ -1127,7 +1127,7 @@ static oslVolumeDeviceHandle osl_isFloppyDrive(const sal_Char* pszPath)
}
#endif /* MACOSX */
-#if ( defined(MACOSX) || defined(NETBSD) || defined(FREEBSD) || \
+#if ( defined(MACOSX) || defined(IOS) || defined(NETBSD) || defined(FREEBSD) || \
defined(AIX) || defined(OPENBSD) || defined(DRAGONFLY))
static oslFileError osl_mountFloppy(oslVolumeDeviceHandle hFloppy)
{
@@ -1136,7 +1136,7 @@ static oslFileError osl_mountFloppy(oslVolumeDeviceHandle hFloppy)
}
#endif /* MACOSX */
-#if ( defined(MACOSX) || defined(NETBSD) || defined(FREEBSD) || \
+#if ( defined(MACOSX) || defined(IOS) || defined(NETBSD) || defined(FREEBSD) || \
defined(AIX) || defined(OPENBSD) || defined(DRAGONFLY))
static oslFileError osl_unmountFloppy(oslVolumeDeviceHandle hFloppy)
{
@@ -1145,14 +1145,14 @@ static oslFileError osl_unmountFloppy(oslVolumeDeviceHandle hFloppy)
}
#endif /* MACOSX */
-#if ( defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD) || defined(DRAGONFLY) )
+#if ( defined(NETBSD) || defined(IOS) || defined(FREEBSD) || defined(OPENBSD) || defined(DRAGONFLY) )
static sal_Bool osl_getFloppyMountEntry(const sal_Char* pszPath, oslVolumeDeviceHandleImpl* pItem)
{
return sal_False;
}
#endif /* NETBSD || FREEBSD || OPENBSD */
-#if ( defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD) || defined(DRAGONFLY) )
+#if ( defined(NETBSD) || defined(IOS) || defined(FREEBSD) || defined(OPENBSD) || defined(DRAGONFLY) )
static sal_Bool osl_isFloppyMounted(oslVolumeDeviceHandleImpl* pDevice)
{
return sal_False;
diff --git a/sal/osl/unx/makefile.mk b/sal/osl/unx/makefile.mk
index 92e701430194..cb566aeb1d60 100644
--- a/sal/osl/unx/makefile.mk
+++ b/sal/osl/unx/makefile.mk
@@ -134,6 +134,10 @@ APP1STDLIBS+=-lC
CFLAGS+=-DSAL_ENABLE_CRASH_REPORT
.ENDIF
+.IF "$(OS)" == "IOS"
+CFLAGS+=-DNO_DL_FUNCTIONS -DNO_CHILD_PROCESSES
+.ENDIF
+
.INCLUDE : target.mk
.IF "$(OS)$(CPU)"=="SOLARISU" || "$(OS)$(CPU)"=="SOLARISS" || "$(OS)$(CPU)"=="NETBSDS" || "$(OS)$(CPU)"=="LINUXS"
diff --git a/sal/osl/unx/module.c b/sal/osl/unx/module.c
index 6deb64f4f8e9..63634c7bd4a2 100644
--- a/sal/osl/unx/module.c
+++ b/sal/osl/unx/module.c
@@ -112,7 +112,11 @@ sal_Bool SAL_CALL
osl_getModuleHandle(rtl_uString *pModuleName, oslModule *pResult)
{
(void) pModuleName; /* avoid warning about unused parameter */
+#ifndef NO_DL_FUNCTIONS
*pResult = (oslModule) RTLD_DEFAULT;
+#else
+ *pResult = NULL;
+#endif
return sal_True;
}
@@ -204,6 +208,7 @@ osl_getFunctionSymbol(oslModule module, rtl_uString *puFunctionSymbolName)
sal_Bool SAL_CALL osl_getModuleURLFromAddress(void * addr, rtl_uString ** ppLibraryUrl)
{
sal_Bool result = sal_False;
+#ifndef NO_DL_FUNCTIONS
#if defined(AIX)
int i;
int size = 4 * 1024;
@@ -295,6 +300,7 @@ sal_Bool SAL_CALL osl_getModuleURLFromAddress(void * addr, rtl_uString ** ppLibr
}
}
#endif
+#endif
return result;
}
diff --git a/sal/osl/unx/nlsupport.c b/sal/osl/unx/nlsupport.c
index 6312cc956392..eb0068269620 100644
--- a/sal/osl/unx/nlsupport.c
+++ b/sal/osl/unx/nlsupport.c
@@ -32,7 +32,7 @@
#include <rtl/memory.h>
#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || \
- defined(FREEBSD) || defined(MACOSX) || defined(OPENBSD) || \
+ defined(FREEBSD) || defined(MACOSX) || defined(IOS) || defined(OPENBSD) || \
defined(DRAGONFLY)
#include <pthread.h>
#ifndef MACOSX
@@ -42,7 +42,7 @@
#include <osl/module.h>
#include <osl/thread.h>
#endif /* !MACOSX */
-#endif /* LINUX || SOLARIS || NETBSD || MACOSX */
+#endif /* LINUX || SOLARIS || NETBSD || MACOSX || IOS */
#include <string.h>
diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c
index c151f12ee710..07cd315882f7 100644
--- a/sal/osl/unx/process.c
+++ b/sal/osl/unx/process.c
@@ -72,7 +72,7 @@
#define MAX_ARGS 255
#define MAX_ENVS 255
-#if defined(MACOSX) || defined(IORESOURCE_TRANSFER_BSD) || defined(AIX)
+#if defined(MACOSX) || defined(IOS) || defined(IORESOURCE_TRANSFER_BSD) || defined(AIX)
#define CONTROLLEN (sizeof(struct cmsghdr) + sizeof(int))
#endif
@@ -455,6 +455,9 @@ static void ChildStatusProc(void *pData)
in our child process */
memcpy(&data, pData, sizeof(data));
+#ifdef NO_CHILD_PROCESSES
+#define fork() (errno = EINVAL, -1)
+#endif
if (socketpair(AF_UNIX, SOCK_STREAM, 0, channel) == -1)
status = errno;