[Libreoffice-commits] .: 3 commits - tools/bootstrp tools/inc tools/source vcl/unx vcl/util

Robert Nagy rnagy at kemper.freedesktop.org
Fri Nov 5 03:36:21 PDT 2010


 tools/bootstrp/command.cxx                    |    2 +-
 tools/inc/tools/inetdef.hxx                   |    4 ++++
 tools/inc/tools/solar.h                       |    1 +
 tools/source/fsys/unx.cxx                     |    5 +++--
 tools/source/stream/strmunx.cxx               |    6 ++++--
 vcl/unx/inc/saldata.hxx                       |    3 ++-
 vcl/unx/inc/salunx.h                          |    3 ++-
 vcl/unx/source/app/i18n_ic.cxx                |    4 ++--
 vcl/unx/source/app/saldisp.cxx                |    4 ++--
 vcl/unx/source/dtrans/X11_selection.cxx       |    2 +-
 vcl/unx/source/printer/printerinfomanager.cxx |    4 ++--
 vcl/util/makefile.mk                          |    3 ++-
 12 files changed, 26 insertions(+), 15 deletions(-)

New commits:
commit 837995e47eb2e82515bfcff570434c743439d3d8
Author: Robert Nagy <robert at openbsd.org>
Date:   Thu Nov 4 12:33:28 2010 +0100

    Add OpenBSD ifdefs for vcl too

diff --git a/vcl/unx/inc/saldata.hxx b/vcl/unx/inc/saldata.hxx
index bb878aa..4164a0f 100644
--- a/vcl/unx/inc/saldata.hxx
+++ b/vcl/unx/inc/saldata.hxx
@@ -47,7 +47,8 @@ class SalPrinter;
 
 DECLARE_LIST( SalDisplays, SalDisplay* )
 
-#if defined SCO || defined LINUX || defined NETBSD || defined AIX || defined HPUX || defined FREEBSD
+#if defined SCO || defined LINUX || defined NETBSD || defined AIX || \
+	defined HPUX || defined FREEBSD || defined OPENBSD
 #include <pthread.h>
 #else
 typedef	unsigned int pthread_t;
diff --git a/vcl/unx/inc/salunx.h b/vcl/unx/inc/salunx.h
index ff17213..5946492 100644
--- a/vcl/unx/inc/salunx.h
+++ b/vcl/unx/inc/salunx.h
@@ -30,7 +30,8 @@
 #define _SALUNX_H
 
 // -=-= #includes =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#if defined SCO || defined LINUX || defined HPUX || defined FREEBSD || defined NETBSD
+#if defined SCO || defined LINUX || defined HPUX || defined FREEBSD || \
+	defined NETBSD || defined OPENBSD
 #include <sys/time.h>
 #elif defined AIX
 #include <time.h>
diff --git a/vcl/unx/source/app/i18n_ic.cxx b/vcl/unx/source/app/i18n_ic.cxx
index c58532b..5a50b6a 100644
--- a/vcl/unx/source/app/i18n_ic.cxx
+++ b/vcl/unx/source/app/i18n_ic.cxx
@@ -334,7 +334,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
 
         if ( mnPreeditStyle != XIMPreeditNone )
         {
-#if defined LINUX || defined FREEBSD || defined NETBSD
+#if defined LINUX || defined FREEBSD || defined NETBSD || defined OPENBSD
             if ( mpPreeditAttributes != NULL )
 #endif
                 mpAttributes = XVaAddToNestedList( mpAttributes,
@@ -342,7 +342,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
         }
         if ( mnStatusStyle != XIMStatusNone )
         {
-#if defined LINUX || defined FREEBSD || defined NETBSD
+#if defined LINUX || defined FREEBSD || defined NETBSD || defined OPENBSD
             if ( mpStatusAttributes != NULL )
 #endif
                 mpAttributes = XVaAddToNestedList( mpAttributes,
diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
index 5726d7b..f0eaa8a 100644
--- a/vcl/unx/source/app/saldisp.cxx
+++ b/vcl/unx/source/app/saldisp.cxx
@@ -894,7 +894,7 @@ void SalDisplay::Init()
         sscanf( pProperties, "%li", &nProperties_ );
     else
     {
-#if defined DBG_UTIL || defined SUN || defined LINUX || defined FREEBSD
+#if defined DBG_UTIL || defined SUN || defined LINUX || defined FREEBSD || defined OPENBSD
         nProperties_ |= PROPERTY_FEATURE_Maximize;
 #endif
         // Server Bugs & Properties
@@ -920,7 +920,7 @@ void SalDisplay::Init()
         if( GetServerVendor() == vendor_xfree )
         {
             nProperties_ |= PROPERTY_BUG_XCopyArea_GXxor;
-#if defined LINUX || defined FREEBSD
+#if defined LINUX || defined FREEBSD || defined OPENBSD
             // otherwm and olwm are a kind of default, which are not detected
             // carefully. if we are running linux (i.e. not netbsd) on an xfree
             // display, fvwm is most probable the wm to choose, confusing with mwm
diff --git a/vcl/unx/source/dtrans/X11_selection.cxx b/vcl/unx/source/dtrans/X11_selection.cxx
index 04fe680..d06cb26 100644
--- a/vcl/unx/source/dtrans/X11_selection.cxx
+++ b/vcl/unx/source/dtrans/X11_selection.cxx
@@ -42,7 +42,7 @@
 #include <X11/keysym.h>
 #include <X11/Xutil.h>
 #include "tools/postx.h"
-#if defined(LINUX) || defined(NETBSD) || defined (FREEBSD)
+#if defined(LINUX) || defined(NETBSD) || defined (FREEBSD) || defined(OPENBSD)
 #include <sys/poll.h>
 #else
 #include <poll.h>
diff --git a/vcl/unx/source/printer/printerinfomanager.cxx b/vcl/unx/source/printer/printerinfomanager.cxx
index 389475f..c71088f 100644
--- a/vcl/unx/source/printer/printerinfomanager.cxx
+++ b/vcl/unx/source/printer/printerinfomanager.cxx
@@ -1207,7 +1207,7 @@ struct SystemCommandParameters
     tokenHandler    pHandler;
 };
 
-#if ! (defined(LINUX) || defined(NETBSD) || defined(FREEBSD)) 
+#if ! (defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD))
 static void lpgetSysQueueTokenHandler(
     const std::list< rtl::OString >& i_rLines,
     std::list< PrinterInfoManager::SystemPrintQueue >& o_rQueues,
@@ -1352,7 +1352,7 @@ static void standardSysQueueTokenHandler(
 
 static const struct SystemCommandParameters aParms[] =
 {
-    #if defined(LINUX) || defined(NETBSD) || defined(FREEBSD) 
+    #if defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD)
     { "/usr/sbin/lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0, standardSysQueueTokenHandler },
     { "lpc status", "lpr -P \"(PRINTER)\"", "", ":", 0, standardSysQueueTokenHandler },
     { "LANG=C;LC_ALL=C;export LANG LC_ALL;lpstat -s", "lp -d \"(PRINTER)\"", "system for ", ": ", 1, standardSysQueueTokenHandler }
diff --git a/vcl/util/makefile.mk b/vcl/util/makefile.mk
index e8221e4..983530c 100644
--- a/vcl/util/makefile.mk
+++ b/vcl/util/makefile.mk
@@ -332,7 +332,8 @@ SHL2STDLIBS+=`pkg-config --libs xrender`
 .IF "$(GUIBASE)"=="unx"
 
 SHL2STDLIBS += -lXext -lSM -lICE -lX11
-.IF "$(OS)"!="MACOSX" && "$(OS)"!="FREEBSD" && "$(OS)"!="NETBSD"
+.IF "$(OS)"!="MACOSX" && "$(OS)"!="FREEBSD" && "$(OS)"!="NETBSD" && \
+	&& "$(OS)"!="OPENBSD"
 # needed by salprnpsp.cxx
 SHL2STDLIBS+= -ldl
 .ENDIF
commit 50f5c3b960a0b18b3c39cb4b8db15211d7abdcab
Author: Robert Nagy <robert at openbsd.org>
Date:   Thu Nov 4 12:09:10 2010 +0100

    add needed OpenBSD ifdefs

diff --git a/tools/source/fsys/unx.cxx b/tools/source/fsys/unx.cxx
index d2c84ef..b1abae4 100644
--- a/tools/source/fsys/unx.cxx
+++ b/tools/source/fsys/unx.cxx
@@ -45,7 +45,7 @@
 extern "C" int mntctl( int cmd, size_t size, char* buf );
 #elif defined(NETBSD) 
 #include <sys/mount.h>
-#elif defined(FREEBSD) || defined(MACOSX)
+#elif defined(FREEBSD) || defined(MACOSX) || defined(OPENBSD)
 #elif defined DECUNIX
 struct mnttab
 {
@@ -95,7 +95,8 @@ struct mymnttab
 };
 
 
-#if defined(NETBSD) || defined(FREEBSD) || defined(MACOSX)
+#if defined(NETBSD) || defined(FREEBSD) || defined(MACOSX) || \
+	defined(OPENBSD)
 BOOL GetMountEntry(dev_t /* dev */, struct mymnttab * /* mytab */ )
 {
     DBG_WARNING( "Sorry, not implemented: GetMountEntry" );
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index f6e88b5..61313bc 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -210,7 +210,8 @@ static sal_uInt32 GetSvError( int nErrno )
         { 0,            SVSTREAM_OK },
         { EACCES,       SVSTREAM_ACCESS_DENIED },
         { EBADF,        SVSTREAM_INVALID_HANDLE },
-#if defined( RS6000 ) || defined( ALPHA ) || defined( HP9000 ) || defined( NETBSD ) || defined(FREEBSD) || defined(MACOSX) || defined(__FreeBSD_kernel__) || defined ( AIX )
+#if defined( RS6000 ) || defined( ALPHA ) || defined( HP9000 ) || defined( NETBSD ) || defined(FREEBSD) || defined(MACOSX) || \
+	defined(OPENBSD) || defined(__FreeBSD_kernel__) || defined ( AIX )
         { EDEADLK,      SVSTREAM_LOCKING_VIOLATION },
 #else
         { EDEADLOCK,    SVSTREAM_LOCKING_VIOLATION },
@@ -224,7 +225,8 @@ static sal_uInt32 GetSvError( int nErrno )
         { EAGAIN,       SVSTREAM_LOCKING_VIOLATION },
         { EISDIR,       SVSTREAM_PATH_NOT_FOUND },
         { ELOOP,        SVSTREAM_PATH_NOT_FOUND },
-#if ! defined( RS6000 ) && ! defined( ALPHA ) && ! defined( NETBSD ) && ! defined (FREEBSD) && ! defined (MACOSX) && ! defined(__FreeBSD_kernel__)
+#if ! defined( RS6000 ) && ! defined( ALPHA ) && ! defined( NETBSD ) && ! defined (FREEBSD) && ! defined (MACOSX) && \
+	!defined(OPENBSD) && ! defined(__FreeBSD_kernel__)
         { EMULTIHOP,    SVSTREAM_PATH_NOT_FOUND },
         { ENOLINK,      SVSTREAM_PATH_NOT_FOUND },
 #endif
commit c04bc10a3827ee7d35ab9d069c5bb7273010cc21
Author: Robert Nagy <robert at openbsd.org>
Date:   Thu Nov 4 09:29:27 2010 +0100

    Define OpenBSD as a supported system.

diff --git a/tools/bootstrp/command.cxx b/tools/bootstrp/command.cxx
index 1f13c99..89ee094 100644
--- a/tools/bootstrp/command.cxx
+++ b/tools/bootstrp/command.cxx
@@ -73,7 +73,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 #if ( defined NETBSD ) || defined (FREEBSD) || defined (AIX) \
-    || defined (HPUX) || defined (MACOSX)
+    || defined (HPUX) || defined (MACOSX) || defined (OPENBSD)
 #include <sys/wait.h>
 #else
 #include <wait.h>
diff --git a/tools/inc/tools/inetdef.hxx b/tools/inc/tools/inetdef.hxx
index 52a7ce4..ac2f8bc 100644
--- a/tools/inc/tools/inetdef.hxx
+++ b/tools/inc/tools/inetdef.hxx
@@ -59,6 +59,10 @@
 #define TOOLS_INETDEF_OS "FreeBSD/i386"
 #elif defined FREEBSD && defined X86_64
 #define TOOLS_INETDEF_OS "FreeBSD/amd64"
+#elif defined OPENBSD && defined X86
+#define TOOLS_INETDEF_OS "OpenBSD/i386"
+#elif defined OPENBSD && defined X86_64
+#define TOOLS_INETDEF_OS "OpenBSD/amd64"
 #elif defined SINIX
 #define TOOLS_INETDEF_OS "SINIX"
 #else // AIX, HPUX, SOLARIS, ...
diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h
index 3853245..1e37b76 100644
--- a/tools/inc/tools/solar.h
+++ b/tools/inc/tools/solar.h
@@ -310,6 +310,7 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); }
 #define SYSTEM_UNXMACXI		33
 #define SYSTEM_OS2GCCI		34
 #define SYSTEM_UNXBSDX		35
+#define SYSTEM_UNXOBSD		36
 #define SYSTEM_WNTGCCI  	99
 
 #if defined WNT


More information about the Libreoffice-commits mailing list