summaryrefslogtreecommitdiff
path: root/sal/inc
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@novell.com>2011-06-09 21:41:35 +0300
committerTor Lillqvist <tlillqvist@novell.com>2011-06-09 21:42:25 +0300
commit04a97047aea7117e14bcb6889e839457e5ef5f2a (patch)
treef3757bc0bb509302a1ee1a0962d552ea576521ad /sal/inc
parent22e611ef9a0b73d02e5147015cfd5f67ddc9b34c (diff)
First attempt at Android support
Diffstat (limited to 'sal/inc')
-rw-r--r--sal/inc/osl/endian.h17
-rw-r--r--sal/inc/sal/alloca.h2
-rw-r--r--sal/inc/sal/config.h2
3 files changed, 18 insertions, 3 deletions
diff --git a/sal/inc/osl/endian.h b/sal/inc/osl/endian.h
index 9abf8cf8f..3d9bba828 100644
--- a/sal/inc/osl/endian.h
+++ b/sal/inc/osl/endian.h
@@ -66,6 +66,21 @@ extern "C" {
# endif
#endif
+#ifdef ANDROID
+# include <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
+# define _PDP_ENDIAN
+# endif
+#endif
+
#ifdef NETBSD
# include <machine/endian.h>
# if BYTE_ORDER == LITTLE_ENDIAN
@@ -154,7 +169,7 @@ extern "C" {
!defined(AIX) && !defined(OPENBSD) && \
!defined(SOLARIS) && !defined(MACOSX) && !defined(FREEBSD) && \
!defined(DRAGONFLY) && \
- !defined(IOS)
+ !defined(IOS) && !defined(ANDROID)
# error "Target platform not specified !"
#endif
diff --git a/sal/inc/sal/alloca.h b/sal/inc/sal/alloca.h
index eb31ad591..087746ff7 100644
--- a/sal/inc/sal/alloca.h
+++ b/sal/inc/sal/alloca.h
@@ -29,7 +29,7 @@
#ifndef INCLUDED_SAL_ALLOCA_H
#define INCLUDED_SAL_ALLOCA_H
-#if defined (SOLARIS) || defined (LINUX) || defined(__EMX__) || defined(AIX)
+#if defined (SOLARIS) || defined (LINUX) || defined(__EMX__) || defined(AIX) || defined(ANDROID)
#ifndef INCLUDED_ALLOCA_H
#include <alloca.h>
diff --git a/sal/inc/sal/config.h b/sal/inc/sal/config.h
index 599a8bcee..9da307a04 100644
--- a/sal/inc/sal/config.h
+++ b/sal/inc/sal/config.h
@@ -75,7 +75,7 @@
#endif /* defined WIN32 */
#if defined(SOLARIS) || defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || \
- defined(AIX) || defined(OPENBSD) || defined(DRAGONFLY)
+ defined(AIX) || defined(OPENBSD) || defined(DRAGONFLY) || defined(ANDROID)
#define SAL_UNX
#define SAL_DLLEXTENSION ".so"
#define SAL_DLLPREFIX "lib"