summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2015-09-16 17:03:17 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2015-10-05 10:24:35 +0000
commit338f19a8cecfa632fa23d42cc27769a832d62104 (patch)
tree32a9f5f89828a35e4c59c9fddab7da44bea8eeb6 /include
parente62c2b03c79cf00c7bb7f08e986f73c76b784581 (diff)
Emscripten: First steps of porting to Emscripten
See https://wiki.documentfoundation.org/Development/Emscripten for details Change-Id: I977a8b9e98b9be13c263fef48f567b92347d0492 Reviewed-on: https://gerrit.libreoffice.org/18643 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'include')
-rw-r--r--include/osl/endian.h10
-rw-r--r--include/sal/alloca.h2
-rw-r--r--include/sal/config.h10
3 files changed, 20 insertions, 2 deletions
diff --git a/include/osl/endian.h b/include/osl/endian.h
index 530549308d6e..4043c403d86d 100644
--- a/include/osl/endian.h
+++ b/include/osl/endian.h
@@ -68,6 +68,13 @@ extern "C" {
# endif
#endif
+#ifdef EMSCRIPTEN
+# include <endian.h>
+# ifndef _LITTLE_ENDIAN
+# define _LITTLE_ENDIAN
+# endif
+#endif
+
#ifdef NETBSD
# include <machine/endian.h>
# if BYTE_ORDER == LITTLE_ENDIAN
@@ -132,7 +139,8 @@ extern "C" {
!defined(AIX) && !defined(OPENBSD) && \
!defined(SOLARIS) && !defined(MACOSX) && !defined(FREEBSD) && \
!defined(DRAGONFLY) && \
- !defined(IOS) && !defined(ANDROID)
+ !defined(IOS) && !defined(ANDROID) && \
+ !defined(EMSCRIPTEN)
# error "Target platform not specified !"
#endif
diff --git a/include/sal/alloca.h b/include/sal/alloca.h
index dfa808967a91..ad4f512f7ff0 100644
--- a/include/sal/alloca.h
+++ b/include/sal/alloca.h
@@ -20,7 +20,7 @@
#ifndef INCLUDED_SAL_ALLOCA_H
#define INCLUDED_SAL_ALLOCA_H
-#if defined (SOLARIS) || defined (LINUX) || defined(AIX) || defined(ANDROID)
+#if defined (SOLARIS) || defined (LINUX) || defined(AIX) || defined(ANDROID) || defined(EMSCRIPTEN)
#ifndef INCLUDED_ALLOCA_H
#include <alloca.h>
diff --git a/include/sal/config.h b/include/sal/config.h
index e891a6b09424..c86b12ffd9f9 100644
--- a/include/sal/config.h
+++ b/include/sal/config.h
@@ -63,6 +63,16 @@
#define SAL_CONFIGFILE( name ) name "rc"
#endif
+#ifdef EMSCRIPTEN
+#define SAL_UNX
+#define SAL_DLLEXTENSION ".bc"
+#define SAL_DLLPREFIX "lib"
+#define SAL_PATHSEPARATOR ':'
+#define SAL_PATHDELIMITER '/'
+#define SAL_NEWLINE_STRING "\n"
+#define SAL_CONFIGFILE( name ) name "rc"
+#endif
+
#ifdef MACOSX
#define SAL_UNX
#define SAL_DLLEXTENSION ".dylib"