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
commit63404bcf55153c80ef5424eeca08c246cf1a5ddb (patch)
tree5e8cbc58532139d4c4538a3c150a638138e860b4 /sal
parent6f8966f38df3607d59c8a124cdadf5e2d2332638 (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 fe4325c9c48b..40b72003ec67 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 f1001bde0321..3e4f3d45f893 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 4305347a795f..56eed36fd0b4 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 6983b073d11f..8283f36c8c57 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: */