[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sal/inc sal/osl solenv/gbuild solenv/inc

Yuri Dario ydario at apache.org
Thu Dec 28 17:09:11 UTC 2017


 sal/inc/sal/main.h            |   20 --------------------
 sal/osl/os2/salinit.cxx       |   10 +++++-----
 sal/osl/os2/thread.c          |    6 ------
 solenv/gbuild/platform/os2.mk |    1 +
 solenv/inc/os2gcci.mk         |    1 +
 5 files changed, 7 insertions(+), 31 deletions(-)

New commits:
commit 1e98fcbdb657980a5af9370972789c9be71794dc
Author: Yuri Dario <ydario at apache.org>
Date:   Thu Dec 28 15:35:35 2017 +0000

    #i126518# OS/2 link with system libcx0 to use new exception and memory mapping handling.

diff --git a/sal/inc/sal/main.h b/sal/inc/sal/main.h
index 8180d11e640b..0f2ca84ae920 100644
--- a/sal/inc/sal/main.h
+++ b/sal/inc/sal/main.h
@@ -33,26 +33,6 @@ extern "C" {
 void SAL_CALL sal_detail_initialize(int argc, char ** argv);
 void SAL_CALL sal_detail_deinitialize();
 
-#ifdef SAL_OS2
-#include <string.h>
-
-#define INCL_DOSPROCESS
-#define INCL_DOSEXCEPTIONS
-#define INCL_DOSMODULEMGR
-#include <os2.h>
-#define INCL_LOADEXCEPTQ
-#include <exceptq.h>
-
-#include <osl/process.h>
-
-#define sal_detail_initialize(a,b) \
-    EXCEPTIONREGISTRATIONRECORD exRegRec = {0}; \
-    LoadExceptq(&exRegRec, NULL, NULL); \
-    osl_setCommandArgs(argc, argv);
-#define sal_detail_deinitialize() \
-    UninstallExceptq(&exRegRec);
-#endif // SAL_OS2
-
 #define SAL_MAIN_WITH_ARGS_IMPL \
 int SAL_CALL main(int argc, char ** argv) \
 { \
diff --git a/sal/osl/os2/salinit.cxx b/sal/osl/os2/salinit.cxx
index ebafddba0171..511acbcc35ec 100644
--- a/sal/osl/os2/salinit.cxx
+++ b/sal/osl/os2/salinit.cxx
@@ -19,8 +19,11 @@
  *
  *************************************************************/
 
-#include <stdio.h>
+#include "precompiled_sal.hxx"
+#include "sal/config.h"
 
+#include "osl/process.h"
+#include "sal/main.h"
 #include "sal/types.h"
 
 #ifdef __cplusplus
@@ -32,14 +35,11 @@ extern "C" {
 // replaced by macros in sal/main.h
 void SAL_CALL sal_detail_initialize(int argc, char ** argv)
 {
-    printf("Dead code\n");
-    exit(1);
+    osl_setCommandArgs(argc, argv);
 }
 
 void SAL_CALL sal_detail_deinitialize()
 {
-    printf("Dead code\n");
-    exit(1);
 }
 
 #ifdef __cplusplus
diff --git a/sal/osl/os2/thread.c b/sal/osl/os2/thread.c
index d89d19fb3add..0789df653ff1 100644
--- a/sal/osl/os2/thread.c
+++ b/sal/osl/os2/thread.c
@@ -34,8 +34,6 @@
 #define INCL_DOSEXCEPTIONS
 #define INCL_DOSMODULEMGR
 #include <os2.h>
-#define INCL_LOADEXCEPTQ
-#include <exceptq.h>
 
 /*
     Thread-data structure hidden behind oslThread:
@@ -100,8 +98,6 @@ static void oslWorkerWrapperFunction(void* pData)
 {
     BOOL rc;
     osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)pData;
-    EXCEPTIONREGISTRATIONRECORD exRegRec = {0};
-    LoadExceptq(&exRegRec, NULL, NULL);
 
 #if OSL_DEBUG_LEVEL>0
 printf("oslWorkerWrapperFunction pThreadImpl %x, pThreadImpl->m_ThreadId %d\n", pThreadImpl, pThreadImpl->m_ThreadId);
@@ -132,8 +128,6 @@ printf("pThreadImpl->m_ThreadId %d, about to terminate hab\n", pThreadImpl->m_Th
 #if OSL_DEBUG_LEVEL>0
 printf("pThreadImpl->m_ThreadId %d, WinTerminate rc=%d (should be 1)\n", pThreadImpl->m_ThreadId, rc);
 
-    UninstallExceptq(&exRegRec);
-
 #endif
 }
 
diff --git a/solenv/gbuild/platform/os2.mk b/solenv/gbuild/platform/os2.mk
index edc4d14f5402..706e443702a7 100644
--- a/solenv/gbuild/platform/os2.mk
+++ b/solenv/gbuild/platform/os2.mk
@@ -130,6 +130,7 @@ gb_LinkTarget_LDFLAGS := \
 	-Zhigh-mem \
 	-Zlinker "DISABLE 1121" \
 	-Zmap \
+	-lcx \
 	$(patsubst %,-LIBPATH:%,$(filter-out .,$(subst ;, ,$(subst \,/,$(ILIB))))) \
 	$(subst -L../lib , ,$(SOLARLIB)) \
 
diff --git a/solenv/inc/os2gcci.mk b/solenv/inc/os2gcci.mk
index 0c078a414e61..b27b863e0fdf 100644
--- a/solenv/inc/os2gcci.mk
+++ b/solenv/inc/os2gcci.mk
@@ -187,6 +187,7 @@ LINK*=gcc
 LINKFLAGS= -Zbin-files -Zmap 
 #27/01/06 bin-files confuses transex/rsc work, removed.
 LINKFLAGS= -Zno-fork -Zhigh-mem -Zmap
+LINKFLAGS+=-lcx
 .IF "$(OS2_ARGS_WILD)" != ""
 LINKFLAGS+=-Zargs-wild -Zargs-resp
 .ENDIF


More information about the Libreoffice-commits mailing list