[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sal/inc
sal/inc/osl/endian.h |2 ++ sal/inc/sal/types.h | 15 ++- 2 files changed, 16 insertions(+), 1 deletion(-) New commits: commit 9ab0a116fec8762da6ff31f2e103d5a2a7dae8ae Author: Damjan Jovanovic Date: Mon Mar 5 17:31:41 2018 + Add some initial fixes for Win64 in main/sal. Patch by: me diff --git a/sal/inc/osl/endian.h b/sal/inc/osl/endian.h index b1a010922f58..3ea794f1a096 100644 --- a/sal/inc/osl/endian.h +++ b/sal/inc/osl/endian.h @@ -35,6 +35,8 @@ extern "C" { #ifdef _WIN32 # if defined(_M_IX86) # define _LITTLE_ENDIAN +# elif defined(_M_AMD64) +# define _LITTLE_ENDIAN # elif defined(_M_MRX000) # define _LITTLE_ENDIAN # elif defined(_M_ALPHA) diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h index 1f4a0fedd077..7bf1685848ba 100644 --- a/sal/inc/sal/types.h +++ b/sal/inc/sal/types.h @@ -29,7 +29,7 @@ /* Grab __SIZEOFxxx constants from typesconfig tool on Unix */ #if defined UNX #include -#elif defined(WNT) || defined(OS2) +#elif defined(WNT) /* FIXME: autogeneration of type sizes on Win32/Win64? */ #define SAL_TYPES_ALIGNMENT2 1 #define SAL_TYPES_ALIGNMENT4 1 @@ -38,6 +38,19 @@ #define SAL_TYPES_SIZEOFINT 4 #define SAL_TYPES_SIZEOFLONG 4 #define SAL_TYPES_SIZEOFLONGLONG 8 + #if defined(_M_IX86) +#define SAL_TYPES_SIZEOFPOINTER 4 + #elif defined(_M_AMD64) +#define SAL_TYPES_SIZEOFPOINTER 8 + #endif +#elif defined(OS2) + #define SAL_TYPES_ALIGNMENT2 1 + #define SAL_TYPES_ALIGNMENT4 1 + #define SAL_TYPES_ALIGNMENT8 1 + #define SAL_TYPES_SIZEOFSHORT 2 + #define SAL_TYPES_SIZEOFINT 4 + #define SAL_TYPES_SIZEOFLONG 4 + #define SAL_TYPES_SIZEOFLONGLONG 8 #define SAL_TYPES_SIZEOFPOINTER 4 #endif ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sal/inc sal/osl solenv/gbuild solenv/inc
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 Date: Thu Dec 28 15:35:35 2017 + #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 - -#define INCL_DOSPROCESS -#define INCL_DOSEXCEPTIONS -#define INCL_DOSMODULEMGR -#include -#define INCL_LOADEXCEPTQ -#include - -#include - -#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 +#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 -#define INCL_LOADEXCEPTQ -#include /* 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 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sal/inc sc/inc
sal/inc/sal/types.h |8 sc/inc/compiler.hxx |6 +- 2 files changed, 13 insertions(+), 1 deletion(-) New commits: commit cc9823f5bde6f49eb75e4ad0e8f8a162bf341f34 Author: Don Lewis Date: Thu Sep 1 06:47:05 2016 + Fix -Wunused-private-field errors in sc/inc/compiler.hxx. The structure ScDoubleRawToken contains four unused private fields. Mark these as unused to eliminate the warning message. We can't delete these fields because we want the layout of this structure to match ScRawToken. diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h index 8f829d3..2bad6d6 100644 --- a/sal/inc/sal/types.h +++ b/sal/inc/sal/types.h @@ -235,6 +235,14 @@ typedef void * sal_Handle; # define SAL_MAX_ENUM 0x7fff #endif +#if defined(__GNUC__) || defined(__clang__) +#define SAL_UNUSED(__x__) __x__ __attribute((__unused__)) +#elif defined(_MSC_VER) +#define SAL_UNUSED(__x__) __pragma(warning(suppress:4100;suppress:4101)) __x__ +#else +#define SAL_UNUSED(__x__) __x__ +#endif + #if defined(_MSC_VER) || defined(__MINGW32__) # define SAL_DLLPUBLIC_EXPORT__declspec(dllexport) #if defined(_MSC_VER) diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx index ffb2cab..bd05000 100644 --- a/sc/inc/compiler.hxx +++ b/sc/inc/compiler.hxx @@ -116,7 +116,11 @@ class ScTokenArray; struct ScDoubleRawToken { private: -SC_TOKEN_FIX_MEMBERS +// SC_TOKEN_FIX_MEMBERS +OpCode SAL_UNUSED(eOp); +formula::StackVar SAL_UNUSED(eType); +sal_uInt16 SAL_UNUSED(nRefCnt); +sal_Bool SAL_UNUSED(bRaw); public: union { // union only to assure alignment identical to ScRawToken ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sal/inc
sal/inc/rtl/string.hxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit fa6f55c32a3f76b4a9e7810e9d4b07ea9510f4d8 Author: Herbert Dürr Date: Wed Jun 18 11:39:01 2014 + #i125112# fix CStringHash functor to match full strings only diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx index b05cb09..8c98a36 100644 --- a/sal/inc/rtl/string.hxx +++ b/sal/inc/rtl/string.hxx @@ -945,10 +945,10 @@ struct OStringHash struct CStringEqual { bool operator()( const char* p1, const char* p2) const { -while( *p1) +while( *p1 != '\0') if( *(p1++) != *(p2++)) return false; -return true; +return (*p2 == '\0'); } }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sal/inc
sal/inc/sal/mathconf.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 2d9ea78c63a73622cbdd77f8e7ce114cef47deb1 Author: Herbert Dürr Date: Tue Jun 4 11:22:50 2013 + fix gnuc_minor version check diff --git a/sal/inc/sal/mathconf.h b/sal/inc/sal/mathconf.h index e7fd4fd..dfeffdc 100644 --- a/sal/inc/sal/mathconf.h +++ b/sal/inc/sal/mathconf.h @@ -56,7 +56,7 @@ extern "C" { /* SAL_MATH_FINITE(d): test double d on INFINITY, NaN et al. */ #if defined(__GNUC__) // workaround gcc bug 14608 -#if (__GNUC_MINOR >= 3) // gcc>=4.3 has a builtin +#if (__GNUC_MINOR__ >= 3) // gcc>=4.3 has a builtin #define SAL_MATH_FINITE(d) __builtin_isfinite(d) #else #define SAL_MATH_FINITE(d) finite(d) // fall back to pre-C99 name ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sal/inc
sal/inc/sal/mathconf.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) New commits: commit 9cf0a23174cc8e028e38fd0044f6f5157d9424ca Author: Herbert Dürr Date: Tue Jun 4 08:57:15 2013 + extend workaround for gcc bug 14608 to work on gcc<4.3 diff --git a/sal/inc/sal/mathconf.h b/sal/inc/sal/mathconf.h index ae1ecb9..e7fd4fd 100644 --- a/sal/inc/sal/mathconf.h +++ b/sal/inc/sal/mathconf.h @@ -55,15 +55,15 @@ extern "C" { /* SAL_MATH_FINITE(d): test double d on INFINITY, NaN et al. */ -#if defined(__GNUC__) -#if defined(MACOSX) -#define SAL_MATH_FINITE(d) finite(d) -#else -#define SAL_MATH_FINITE(d) __builtin_isfinite(d) // gcc bug 14608 -#endif +#if defined(__GNUC__) // workaround gcc bug 14608 +#if (__GNUC_MINOR >= 3) // gcc>=4.3 has a builtin +#define SAL_MATH_FINITE(d) __builtin_isfinite(d) +#else +#define SAL_MATH_FINITE(d) finite(d) // fall back to pre-C99 name +#endif #elif defined(__STDC__) // isfinite() should be available in math.h according to C99,C++99,SUSv3,etc. -// unless GCC bug 14608 hits us where cmath undefines isfinite as macro +// unless GCC bug 14608 hits us where cmath undefines isfinite() as macro #define SAL_MATH_FINITE(d) isfinite(d) #elif defined( WNT) #define SAL_MATH_FINITE(d) _finite(d) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sal/inc
sal/inc/rtl/string.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7f6f4407437933ef1ca9d9d33f921bafda0114ba Author: Herbert Dürr Date: Thu May 16 12:53:45 2013 + fix the long cast to eliminate the little warning diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx index dcd6ca4..ebf3e30 100644 --- a/sal/inc/rtl/string.hxx +++ b/sal/inc/rtl/string.hxx @@ -947,7 +947,7 @@ struct CStringHash size_t operator()( const char* p) const { size_t n = 0; while( *p) -n += 4*n + *static_cast(p++); +n += 4*n + *reinterpret_cast(p++); return n; } }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sal/inc
sal/inc/rtl/string.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 515de997f69222b06a07ce9a95e8610cc9c7cbcc Author: Herbert Dürr Date: Thu May 16 07:25:49 2013 + fix constness issue causing a build breaker diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx index 951fa78..dcd6ca4 100644 --- a/sal/inc/rtl/string.hxx +++ b/sal/inc/rtl/string.hxx @@ -947,7 +947,7 @@ struct CStringHash size_t operator()( const char* p) const { size_t n = 0; while( *p) -n += 4*n + *static_cast(p++); +n += 4*n + *static_cast(p++); return n; } }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits