diff options
-rw-r--r-- | bridges/inc/vtablefactory.hxx | 3 | ||||
-rw-r--r-- | bridges/source/cpp_uno/shared/vtablefactory.cxx | 2 | ||||
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | desktop/Module_desktop.mk | 2 | ||||
-rw-r--r-- | distro-configs/LibreOfficeHaiku.conf | 2 | ||||
-rw-r--r-- | idlc/source/idlccompile.cxx | 2 | ||||
-rw-r--r-- | include/osl/endian.h | 2 | ||||
-rw-r--r-- | include/sal/alloca.h | 2 | ||||
-rw-r--r-- | include/sal/config.h | 3 | ||||
-rw-r--r-- | sal/Library_sal.mk | 5 | ||||
-rw-r--r-- | sal/osl/unx/file_error_transl.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/system.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/system.hxx | 35 | ||||
-rw-r--r-- | sal/qa/osl/file/osl_File_Const.h | 6 | ||||
-rw-r--r-- | solenv/bin/concat-deps.c | 13 | ||||
-rw-r--r-- | solenv/gbuild/platform/HAIKU_INTEL_GCC.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/platform/HAIKU_X86_64_GCC.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/platform/haiku.mk | 19 | ||||
-rw-r--r-- | svl/Library_svl.mk | 2 | ||||
-rw-r--r-- | tools/source/stream/strmunx.cxx | 2 | ||||
-rw-r--r-- | vcl/Executable_svpclient.mk | 4 | ||||
-rw-r--r-- | vcl/Library_vcl.mk | 21 | ||||
-rw-r--r-- | vcl/inc/headless/svpinst.hxx | 1 | ||||
-rw-r--r-- | vcl/source/opengl/OpenGLHelper.cxx | 6 | ||||
-rw-r--r-- | vcl/source/salmain/salmain.cxx | 4 |
25 files changed, 128 insertions, 23 deletions
diff --git a/bridges/inc/vtablefactory.hxx b/bridges/inc/vtablefactory.hxx index 991716b423e8..70c87c385952 100644 --- a/bridges/inc/vtablefactory.hxx +++ b/bridges/inc/vtablefactory.hxx @@ -30,7 +30,8 @@ /*See: http://people.redhat.com/drepper/selinux-mem.html*/ #if defined(LINUX) || defined(OPENBSD) || defined(FREEBSD) \ - || defined(NETBSD) || defined(DRAGONFLY) || defined (ANDROID) + || defined(NETBSD) || defined(DRAGONFLY) || defined (ANDROID) \ + || defined(HAIKU) #define USE_DOUBLE_MMAP #endif diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx b/bridges/source/cpp_uno/shared/vtablefactory.cxx index 2c289ea58657..9e3a91fb0a93 100644 --- a/bridges/source/cpp_uno/shared/vtablefactory.cxx +++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx @@ -63,7 +63,7 @@ extern "C" void * allocExec( { std::size_t pagesize; #if defined SAL_UNX -#if defined FREEBSD || defined NETBSD || defined OPENBSD || defined DRAGONFLY +#if defined FREEBSD || defined NETBSD || defined OPENBSD || defined DRAGONFLY || defined HAIKU pagesize = getpagesize(); #else pagesize = sysconf(_SC_PAGESIZE); diff --git a/configure.ac b/configure.ac index 59df9857b616..6eacbc878174 100644 --- a/configure.ac +++ b/configure.ac @@ -792,7 +792,6 @@ haiku*) test_randr=no test_xrender=no test_freetype=yes - test_cairo=yes enable_java=no enable_opengl=no enable_odk=no @@ -803,7 +802,7 @@ haiku*) enable_gltf=no enable_collada=no enable_coinmp=no - enable_pdfimport=no + enable_pdfium=no enable_postgresql_sdbc=no enable_firebird_sdbc=no _os=Haiku @@ -4614,6 +4613,10 @@ if test "$USING_X11" != TRUE; then enable_cairo_canvas=no fi +if test "$OS" = "HAIKU"; then + enable_cairo_canvas=yes +fi + dnl =================================================================== dnl check for cups support dnl =================================================================== diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk index e18b23126dff..878febd603fb 100644 --- a/desktop/Module_desktop.mk +++ b/desktop/Module_desktop.mk @@ -102,6 +102,8 @@ else ifeq ($(OS),ANDROID) else ifeq ($(OS),IOS) +else ifeq ($(OS),HAIKU) + else $(eval $(call gb_Module_add_targets,desktop,\ diff --git a/distro-configs/LibreOfficeHaiku.conf b/distro-configs/LibreOfficeHaiku.conf index 6026c7fb5942..426d19a825f6 100644 --- a/distro-configs/LibreOfficeHaiku.conf +++ b/distro-configs/LibreOfficeHaiku.conf @@ -47,6 +47,7 @@ --with-system-redland --with-system-libcmis --with-system-cairo +--with-system-poppler --with-theme=breeze sifr --with-galleries=no --without-helppack-integration @@ -62,5 +63,4 @@ --disable-postgresql-sdbc --disable-lotuswordpro --disable-firebird-sdbc ---disable-cairo-canvas --enable-python=no diff --git a/idlc/source/idlccompile.cxx b/idlc/source/idlccompile.cxx index c2a4e045aea6..7a065428c1f2 100644 --- a/idlc/source/idlccompile.cxx +++ b/idlc/source/idlccompile.cxx @@ -33,7 +33,7 @@ #include <errno.h> #include <unistd.h> #if defined(MACOSX) || defined(FREEBSD) || defined(NETBSD) || \ - defined(AIX) || defined(OPENBSD) || defined(DRAGONFLY) + defined(AIX) || defined(OPENBSD) || defined(DRAGONFLY) || defined(HAIKU) #include <sys/wait.h> #else #include <wait.h> diff --git a/include/osl/endian.h b/include/osl/endian.h index 9ead0044aea5..43d0162b55df 100644 --- a/include/osl/endian.h +++ b/include/osl/endian.h @@ -34,7 +34,7 @@ extern "C" { || defined _M_MRX000 || defined _M_PPC # define OSL_LITENDIAN # endif -#elif defined ANDROID || defined LINUX +#elif defined ANDROID || defined LINUX || defined HAIKU # include <endian.h> # if __BYTE_ORDER == __LITTLE_ENDIAN # define OSL_LITENDIAN diff --git a/include/sal/alloca.h b/include/sal/alloca.h index f756acc3bab8..8c9509f8ed3c 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 (__sun) || defined (LINUX) || defined(AIX) || defined(ANDROID) +#if defined (__sun) || defined (LINUX) || defined(AIX) || defined(ANDROID) || defined(HAIKU) #ifndef INCLUDED_ALLOCA_H #include <alloca.h> diff --git a/include/sal/config.h b/include/sal/config.h index bfe4d5e2d3e2..18303909ad6c 100644 --- a/include/sal/config.h +++ b/include/sal/config.h @@ -44,7 +44,8 @@ #endif /* defined WIN32 */ #if defined(__sun) || defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || \ - defined(AIX) || defined(OPENBSD) || defined(DRAGONFLY) || defined(ANDROID) + defined(AIX) || defined(OPENBSD) || defined(DRAGONFLY) || defined(ANDROID) || \ + defined(HAIKU) #define SAL_UNX #define SAL_DLLEXTENSION ".so" #define SAL_EXEEXTENSION "" diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk index 01948f4c4465..0489e10a0e52 100644 --- a/sal/Library_sal.mk +++ b/sal/Library_sal.mk @@ -57,7 +57,7 @@ $(eval $(call gb_Library_use_system_win32_libs,sal,\ )) $(eval $(call gb_Library_add_libs,sal,\ - $(if $(filter-out $(OS),WNT), \ + $(if $(filter-out $(OS),WNT HAIKU), \ $(if $(filter $(OS),ANDROID),, \ -lpthread \ ) \ @@ -70,6 +70,9 @@ $(eval $(call gb_Library_add_libs,sal,\ -lnsl \ -lsocket \ ) \ + $(if $(filter $(OS),HAIKU), \ + -lnetwork \ + ) \ )) ifeq ($(OS),MACOSX) diff --git a/sal/osl/unx/file_error_transl.cxx b/sal/osl/unx/file_error_transl.cxx index 54b19ce10a9f..f8910289456b 100644 --- a/sal/osl/unx/file_error_transl.cxx +++ b/sal/osl/unx/file_error_transl.cxx @@ -155,8 +155,10 @@ oslFileError oslTranslateFileError(int Errno) return osl_File_E_MULTIHOP; #endif /* MACOSX */ +#if !defined(HAIKU) case EUSERS: return osl_File_E_USERS; +#endif case EOVERFLOW: return osl_File_E_OVERFLOW; diff --git a/sal/osl/unx/system.cxx b/sal/osl/unx/system.cxx index 7003b4ff5a41..aacd91a1290a 100644 --- a/sal/osl/unx/system.cxx +++ b/sal/osl/unx/system.cxx @@ -28,7 +28,7 @@ /* struct passwd differs on some platforms */ -#if defined(MACOSX) || defined(IOS) || defined(OPENBSD) || defined(NETBSD) +#if defined(MACOSX) || defined(IOS) || defined(OPENBSD) || defined(NETBSD) || defined(HAIKU) //No mutex needed on Mac OS X, gethostbyname is thread safe diff --git a/sal/osl/unx/system.hxx b/sal/osl/unx/system.hxx index a822b0a83a10..6a92f291e833 100644 --- a/sal/osl/unx/system.hxx +++ b/sal/osl/unx/system.hxx @@ -85,6 +85,38 @@ #endif +#ifdef HAIKU +# include <shadow.h> +# include <pthread.h> +# include <sys/file.h> +# include <sys/ioctl.h> +# include <sys/uio.h> +# include <sys/un.h> +# include <netinet/tcp.h> +# include <dlfcn.h> +# include <endian.h> +# include <sys/time.h> +# define IORESOURCE_TRANSFER_BSD +# define IOCHANNEL_TRANSFER_BSD_RENO +# define pthread_testcancel() +# define NO_PTHREAD_PRIORITY +# define NO_PTHREAD_RTL +# define PTHREAD_SIGACTION pthread_sigaction + +# ifndef ETIME +# define ETIME ETIMEDOUT +# endif +# define SIGIOT SIGABRT +# define ESOCKTNOSUPPORT ENOTSUP +# define ETOOMANYREFS EOPNOTSUPP +# define SOCK_RDM 0 +// hack: Haiku defines SOL_SOCKET as -1, but this makes GCC complain about +// narrowing conversion +# undef SOL_SOCKET +# define SOL_SOCKET (sal_uInt32) -1 + +#endif + #if defined(ANDROID) # include <pthread.h> # include <sys/file.h> @@ -242,7 +274,8 @@ int macxp_resolveAlias(char *path, int buflen); !defined(AIX) && \ !defined(__sun) && !defined(MACOSX) && \ !defined(OPENBSD) && !defined(DRAGONFLY) && \ - !defined(IOS) && !defined(ANDROID) + !defined(IOS) && !defined(ANDROID) && \ + !defined(HAIKU) # error "Target platform not specified!" #endif diff --git a/sal/qa/osl/file/osl_File_Const.h b/sal/qa/osl/file/osl_File_Const.h index ac9c7aab0a52..ed77b6d4484e 100644 --- a/sal/qa/osl/file/osl_File_Const.h +++ b/sal/qa/osl/file/osl_File_Const.h @@ -65,11 +65,13 @@ const sal_Char pBuffer_Blank[] = ""; # include <errno.h> # include <fcntl.h> # include <sys/stat.h> -# if !defined(MACOSX) && !defined(IOS) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined (DRAGONFLY) +# if !defined(MACOSX) && !defined(IOS) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined (DRAGONFLY) && !defined(HAIKU) # include <sys/statfs.h> # else # include <sys/param.h> -# include <sys/mount.h> +# ifndef HAIKU +# include <sys/mount.h> +# endif # endif # if !defined(ANDROID) # include <sys/statvfs.h> diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c index b815cad29b67..d02f62c48332 100644 --- a/solenv/bin/concat-deps.c +++ b/solenv/bin/concat-deps.c @@ -59,6 +59,19 @@ #endif /* !(_BYTE_ORDER == _LITTLE_ENDIAN) */ #endif /* Def *BSD */ +#if defined(__HAIKU__) +#include <endian.h> +#if __BYTE_ORDER == __LITTLE_ENDIAN +#undef CORE_BIG_ENDIAN +#define CORE_LITTLE_ENDIAN +#else /* !(__BYTE_ORDER == __LITTLE_ENDIAN) */ +#if __BYTE_ORDER == __BIG_ENDIAN +#define CORE_BIG_ENDIAN +#undef CORE_LITTLE_ENDIAN +#endif /* __BYTE_ORDER == __BIG_ENDIAN */ +#endif /* !(__BYTE_ORDER == __LITTLE_ENDIAN) */ +#endif /* Def __HAIKU__ */ + #ifdef __sun #ifdef __sparc #define CORE_BIG_ENDIAN diff --git a/solenv/gbuild/platform/HAIKU_INTEL_GCC.mk b/solenv/gbuild/platform/HAIKU_INTEL_GCC.mk index 5582d2dc8876..27628478ad18 100644 --- a/solenv/gbuild/platform/HAIKU_INTEL_GCC.mk +++ b/solenv/gbuild/platform/HAIKU_INTEL_GCC.mk @@ -11,6 +11,6 @@ gb_CPUDEFS := -DX86 -include $(GBUILDDIR)/platform/unxgcc.mk +include $(GBUILDDIR)/platform/haiku.mk # vim: set noet sw=4: diff --git a/solenv/gbuild/platform/HAIKU_X86_64_GCC.mk b/solenv/gbuild/platform/HAIKU_X86_64_GCC.mk index 6199f17b3015..bb2cbdf909d6 100644 --- a/solenv/gbuild/platform/HAIKU_X86_64_GCC.mk +++ b/solenv/gbuild/platform/HAIKU_X86_64_GCC.mk @@ -9,6 +9,6 @@ #please make generic modifications to unxgcc.mk -include $(GBUILDDIR)/platform/unxgcc.mk +include $(GBUILDDIR)/platform/haiku.mk # vim: set noet sw=4: diff --git a/solenv/gbuild/platform/haiku.mk b/solenv/gbuild/platform/haiku.mk new file mode 100644 index 000000000000..7066d6946618 --- /dev/null +++ b/solenv/gbuild/platform/haiku.mk @@ -0,0 +1,19 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + + +include $(GBUILDDIR)/platform/unxgcc.mk + +ifeq ($(HAVE_GCC_STACK_PROTECTOR_STRONG),TRUE) +gb_CFLAGS_COMMON += -lssp +gb_CXXFLAGS_COMMON += -lssp +gb_LinkTarget_LDFLAGS += -lssp +endif + +# vim: set noet sw=4 ts=4: diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk index de981cdc9315..aacbb273d87c 100644 --- a/svl/Library_svl.mk +++ b/svl/Library_svl.mk @@ -21,7 +21,7 @@ $(eval $(call gb_Library_Library,svl)) $(eval $(call gb_Library_use_externals,svl,\ boost_headers \ - $(if $(filter LINUX MACOSX ANDROID %BSD SOLARIS,$(OS)), \ + $(if $(filter LINUX MACOSX ANDROID %BSD SOLARIS HAIKU,$(OS)), \ curl) \ icu_headers \ icuuc \ diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx index be3b4d4fbea5..a74262fac383 100644 --- a/tools/source/stream/strmunx.cxx +++ b/tools/source/stream/strmunx.cxx @@ -187,7 +187,7 @@ static ErrCode GetSvError( int nErrno ) #if defined(NETBSD) || \ defined(FREEBSD) || defined(MACOSX) || defined(OPENBSD) || \ defined(__FreeBSD_kernel__) || defined (AIX) || defined(DRAGONFLY) || \ - defined(IOS) + defined(IOS) || defined(HAIKU) { EDEADLK, SVSTREAM_LOCKING_VIOLATION }, #else { EDEADLOCK, SVSTREAM_LOCKING_VIOLATION }, diff --git a/vcl/Executable_svpclient.mk b/vcl/Executable_svpclient.mk index 9f92ec55390c..3d92f2ebc481 100644 --- a/vcl/Executable_svpclient.mk +++ b/vcl/Executable_svpclient.mk @@ -31,6 +31,10 @@ $(eval $(call gb_Executable_use_libraries,svpclient,\ comphelper \ )) +ifeq ($(OS),HAIKU) +$(eval $(call gb_Executable_add_libs,svpclient,-lnetwork)) +endif + $(eval $(call gb_Executable_add_exception_objects,svpclient,\ vcl/workben/svpclient \ )) diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 244bbd14cf72..b116fd15705a 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -628,6 +628,27 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ endif endif +ifeq ($(OS),HAIKU) +$(eval $(call gb_Library_add_exception_objects,vcl,\ + vcl/unx/generic/printer/jobdata \ + vcl/unx/generic/printer/ppdparser \ + vcl/null/printerinfomanager \ + $(vcl_headless_code) \ + $(vcl_headless_freetype_code) \ +)) + +$(eval $(call gb_Library_add_libs,vcl,\ + -lbe \ +)) + +$(eval $(call gb_Library_use_externals,vcl,\ + cairo \ + fontconfig \ + freetype \ + expat \ +)) +endif + ifeq ($(OS),ANDROID) $(eval $(call gb_Library_add_libs,vcl,\ -llog \ diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx index 1dd577b78fb1..d370d67b8075 100644 --- a/vcl/inc/headless/svpinst.hxx +++ b/vcl/inc/headless/svpinst.hxx @@ -33,6 +33,7 @@ #include <list> #include <condition_variable> +#include <sys/time.h> #include <time.h> #define VIRTUAL_DESKTOP_WIDTH 1024 diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx index 4c8660fb920a..a25a0b1e781e 100644 --- a/vcl/source/opengl/OpenGLHelper.cxx +++ b/vcl/source/opengl/OpenGLHelper.cxx @@ -41,7 +41,7 @@ #include <vcl/opengl/OpenGLContext.hxx> #include <desktop/crashreport.hxx> -#if defined UNX && !defined MACOSX && !defined IOS && !defined ANDROID +#if defined UNX && !defined MACOSX && !defined IOS && !defined ANDROID && !defined HAIKU #include <opengl/x11/X11DeviceInfo.hxx> #elif defined (_WIN32) #include <opengl/win/WinDeviceInfo.hxx> @@ -199,7 +199,7 @@ namespace OString getDeviceInfoString() { -#if defined( SAL_UNX ) && !defined( MACOSX ) && !defined( IOS )&& !defined( ANDROID ) +#if defined( SAL_UNX ) && !defined( MACOSX ) && !defined( IOS )&& !defined( ANDROID ) && !defined( HAIKU ) const X11OpenGLDeviceInfo aInfo; return aInfo.GetOS() + aInfo.GetOSRelease() + @@ -774,7 +774,7 @@ bool OpenGLHelper::isDeviceBlacklisted() { OpenGLZone aZone; -#if defined UNX && !defined MACOSX && !defined IOS && !defined ANDROID +#if defined UNX && !defined MACOSX && !defined IOS && !defined ANDROID && !defined HAIKU X11OpenGLDeviceInfo aInfo; bBlacklisted = aInfo.isDeviceBlocked(); SAL_INFO("vcl.opengl", "blacklisted: " << bBlacklisted); diff --git a/vcl/source/salmain/salmain.cxx b/vcl/source/salmain/salmain.cxx index 36bd633fb95a..b2b45a89e934 100644 --- a/vcl/source/salmain/salmain.cxx +++ b/vcl/source/salmain/salmain.cxx @@ -28,12 +28,12 @@ #include <salinst.hxx> -#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && !defined LIBO_HEADLESS +#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && !defined LIBO_HEADLESS && !defined HAIKU #include <opengl/x11/glxtest.hxx> #endif SAL_IMPLEMENT_MAIN() { -#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && !defined LIBO_HEADLESS +#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && !defined LIBO_HEADLESS && !defined HAIKU fire_glxtest_process(); #endif tools::extendApplicationEnvironment(); |