summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2011-05-14 03:04:08 +0300
committerTor Lillqvist <tml@iki.fi>2011-05-14 03:08:26 +0300
commitca61c5c96d56fc80259dcc361e29cea8cd138fcf (patch)
tree9baf4c51a167189c60d8c1c50014725c2fb3ed04 /sal
parent578725c8fc7e9692f4f6b7085677a5191b9b1006 (diff)
Add defines for iOS
Diffstat (limited to 'sal')
-rw-r--r--sal/inc/osl/endian.h20
-rw-r--r--sal/inc/sal/alloca.h7
-rw-r--r--sal/inc/sal/config.h11
-rw-r--r--sal/rtl/source/macro.hxx6
4 files changed, 39 insertions, 5 deletions
diff --git a/sal/inc/osl/endian.h b/sal/inc/osl/endian.h
index 49d778ad9..9abf8cf8f 100644
--- a/sal/inc/osl/endian.h
+++ b/sal/inc/osl/endian.h
@@ -130,13 +130,31 @@ extern "C" {
# endif
#endif
+#ifdef IOS
+# include <machine/endian.h>
+# if BYTE_ORDER == LITTLE_ENDIAN
+# ifndef _LITTLE_ENDIAN
+# define _LITTLE_ENDIAN
+# endif
+# elif BYTE_ORDER == BIG_ENDIAN
+# ifndef _BIG_ENDIAN
+# define _BIG_ENDIAN
+# endif
+# elif BYTE_ORDER == PDP_ENDIAN
+# ifndef _PDP_ENDIAN
+# define _PDP_ENDIAN
+# endif
+# endif
+#endif
+
/** Check supported platform.
*/
#if !defined(_WIN32) && \
!defined(LINUX) && !defined(NETBSD) && \
!defined(AIX) && !defined(OPENBSD) && \
!defined(SOLARIS) && !defined(MACOSX) && !defined(FREEBSD) && \
- !defined(DRAGONFLY)
+ !defined(DRAGONFLY) && \
+ !defined(IOS)
# error "Target platform not specified !"
#endif
diff --git a/sal/inc/sal/alloca.h b/sal/inc/sal/alloca.h
index 23282807e..eb31ad591 100644
--- a/sal/inc/sal/alloca.h
+++ b/sal/inc/sal/alloca.h
@@ -50,6 +50,13 @@
#define INCLUDED_SYS_TYPES_H
#endif
+#elif defined (IOS)
+
+#ifndef INCLUDED_SYS_TYPES_H
+#include <sys/types.h>
+#define INCLUDED_SYS_TYPES_H
+#endif
+
#elif defined (WNT)
#ifndef INCLUDED_MALLOC_H
diff --git a/sal/inc/sal/config.h b/sal/inc/sal/config.h
index 25bb38575..211b7386b 100644
--- a/sal/inc/sal/config.h
+++ b/sal/inc/sal/config.h
@@ -98,6 +98,17 @@
#define SAL_SYSCONFIGFILE( name ) "." name "rc"
#endif
+#ifdef IOS
+#define SAL_UNX
+#define SAL_DLLEXTENSION
+#define SAL_DLLPREFIX "lib"
+#define SAL_PRGEXTENSION ".bin"
+#define SAL_PATHSEPARATOR ':'
+#define SAL_PATHDELIMITER '/'
+#define SAL_CONFIGFILE( name ) name "rc"
+#define SAL_SYSCONFIGFILE( name ) "." name "rc"
+#endif
+
#ifdef sun
#undef sun
#define sun sun
diff --git a/sal/rtl/source/macro.hxx b/sal/rtl/source/macro.hxx
index 133a7cc33..25674513a 100644
--- a/sal/rtl/source/macro.hxx
+++ b/sal/rtl/source/macro.hxx
@@ -45,6 +45,8 @@
#endif
#elif defined MACOSX
#define THIS_OS "MacOSX"
+#elif defined IOS
+#define THIS_OS "iOS"
#elif defined NETBSD
#define THIS_OS "NetBSD"
#elif defined FREEBSD
@@ -109,8 +111,4 @@ this is inserted for the case that the preprocessor ignores error
#endif
-
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */