[Libreoffice-commits] .: 6 commits - sal/osl sal/textenc
Tor Lillqvist
tml at kemper.freedesktop.org
Tue May 24 16:17:06 PDT 2011
sal/osl/unx/file_volume.cxx | 12 ++++++------
sal/osl/unx/makefile.mk | 4 ++++
sal/osl/unx/module.c | 6 ++++++
sal/osl/unx/nlsupport.c | 10 +++++-----
sal/osl/unx/process.c | 5 ++++-
sal/textenc/tables.cxx | 6 ++++++
6 files changed, 31 insertions(+), 12 deletions(-)
New commits:
commit b6a9ee9e13f6306bab4c8a23e2331bb6cbc3807b
Author: Tor Lillqvist <tml at iki.fi>
Date: Tue May 24 23:57:16 2011 +0300
Don't fork() on iOS, use a new NO_CHILD_PROCESSES flag for that
diff --git a/sal/osl/unx/makefile.mk b/sal/osl/unx/makefile.mk
index 432dc64..cb566ae 100644
--- a/sal/osl/unx/makefile.mk
+++ b/sal/osl/unx/makefile.mk
@@ -135,7 +135,7 @@ CFLAGS+=-DSAL_ENABLE_CRASH_REPORT
.ENDIF
.IF "$(OS)" == "IOS"
-CFLAGS+=-DNO_DL_FUNCTIONS
+CFLAGS+=-DNO_DL_FUNCTIONS -DNO_CHILD_PROCESSES
.ENDIF
.INCLUDE : target.mk
diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c
index bc868ed..064b1a0 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
@@ -445,6 +445,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;
commit fc84d60d32ba7369ed8df18c794d92ce8c12b617
Author: Tor Lillqvist <tml at iki.fi>
Date: Tue May 24 23:55:57 2011 +0300
Define NO_DL_FUNCTIONS on iOS
diff --git a/sal/osl/unx/makefile.mk b/sal/osl/unx/makefile.mk
index 92e7014..432dc64 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
+.ENDIF
+
.INCLUDE : target.mk
.IF "$(OS)$(CPU)"=="SOLARISU" || "$(OS)$(CPU)"=="SOLARISS" || "$(OS)$(CPU)"=="NETBSDS" || "$(OS)$(CPU)"=="LINUXS"
commit 0a0579555f0136f40a2f4d8bbdde7b934ad8c5cd
Author: Tor Lillqvist <tml at iki.fi>
Date: Tue May 24 23:54:51 2011 +0300
Compilation fix for iOS
diff --git a/sal/osl/unx/nlsupport.c b/sal/osl/unx/nlsupport.c
index 4264571..71a92b3 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>
@@ -951,7 +951,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale )
{
/* only change env vars that exist already */
if( getenv( "LC_ALL" ) ) {
-#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || \
+#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( IOS ) || \
defined( AIX ) || defined( OPENBSD ) || defined( DRAGONFLY )
setenv( "LC_ALL", locale_buf, 1);
#else
@@ -960,7 +960,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale )
}
if( getenv( "LC_CTYPE" ) ) {
-#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || \
+#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( IOS ) || \
defined( AIX ) || defined( OPENBSD ) || defined( DRAGONFLY )
setenv("LC_CTYPE", locale_buf, 1 );
#else
@@ -969,7 +969,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale )
}
if( getenv( "LANG" ) ) {
-#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || \
+#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( IOS ) || \
defined( AIX ) || defined( OPENBSD) || defined( DRAGONFLY )
setenv("LC_CTYPE", locale_buf, 1 );
#else
commit a9c1a94d8e8561e704e9e95f5ec161b3b787be4d
Author: Tor Lillqvist <tml at iki.fi>
Date: Tue May 24 23:49:53 2011 +0300
Fix compilation errors when NO_DL_FUNCTIONS is defined
diff --git a/sal/osl/unx/module.c b/sal/osl/unx/module.c
index e2e06d3..c06368c 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;
}
commit 2640ab5941ddc5856f7d5554b061ccdbbb414e77
Author: Tor Lillqvist <tml at iki.fi>
Date: Tue May 24 23:45:10 2011 +0300
Use the dummy floppy API implementations on iOS, too
diff --git a/sal/osl/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx
index 79871c2..4a941ff 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;
commit f4c776bad6ad746ef1da32faec92fb001033ef9b
Author: Tor Lillqvist <tml at iki.fi>
Date: Tue May 24 23:40:10 2011 +0300
Compilation fix for iOS
diff --git a/sal/textenc/tables.cxx b/sal/textenc/tables.cxx
index 0d91d36..00d7811 100644
--- a/sal/textenc/tables.cxx
+++ b/sal/textenc/tables.cxx
@@ -127,6 +127,12 @@ static sal_uInt16 const aImplDoubleByteIdentifierTab[1] = { 0 };
ImplTextEncodingData const *
Impl_getTextEncodingData(rtl_TextEncoding nEncoding)
+#ifdef IOS
+ // Dunno if the g++ for iOS is just pickier, or why other g++
+ // versions don't complain about the lack of throw to match the
+ // one in the declaration in gettextencodingdata.h.o
+ SAL_THROW_EXTERN_C()
+#endif
{
static ImplTextEncodingData const * const aData[]
= { NULL, /* DONTKNOW */
More information about the Libreoffice-commits
mailing list