Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi,

the attached patch removes __cdecl and uses SAL_CALL instead. For future work: I suppose that I can omit files having win32 in their path?

Compiles fine for me but make check never completed without errors. What shall I do with these error messages? IRC or post to list and hope for help or accept that they exist :-)

Christina
From 32501dcdb15ac3696866cf5682c608847c6dbb4b Mon Sep 17 00:00:00 2001
From: Christina Rossmanith <ChrRossmanith@web.de>
Date: Mon, 23 May 2011 09:58:05 +0200
Subject: [PATCH] __cdecl -> SAL_CALL

---
 rsc/source/parser/rsckey.cxx       |   13 +++----------
 svtools/source/edit/textdoc.cxx    |   16 +++-------------
 svtools/source/svrtf/rtfkeywd.cxx  |    9 +--------
 toolkit/source/awt/vclxtoolkit.cxx |    9 +--------
 tools/workben/inetmimetest.cxx     |    6 +-----
 tools/workben/solar.c              |   12 ++----------
 tools/workben/urltest.cxx          |    6 +-----
 7 files changed, 12 insertions(+), 59 deletions(-)

diff --git a/rsc/source/parser/rsckey.cxx b/rsc/source/parser/rsckey.cxx
index e9c4ad6..4e8e57a 100644
--- a/rsc/source/parser/rsckey.cxx
+++ b/rsc/source/parser/rsckey.cxx
@@ -45,18 +45,11 @@
 /****************** C o d e **********************************************/
 /****************** keyword sort function ********************************/
 extern "C" {
-#if defined( WNT ) && !defined (ICC)
-    int _cdecl KeyCompare( const void * pFirst, const void * pSecond );
-#else
-    int KeyCompare( const void * pFirst, const void * pSecond );
-#endif
+    int SAL_CALL KeyCompare( const void * pFirst, const void * pSecond );
 }
 
-#if defined( WNT ) && !defined(ICC)
-int _cdecl KeyCompare( const void * pFirst, const void * pSecond ){
-#else
-int KeyCompare( const void * pFirst, const void * pSecond ){
-#endif
+int SAL_CALL KeyCompare( const void * pFirst, const void * pSecond )
+{
     if( ((KEY_STRUCT *)pFirst)->nName > ((KEY_STRUCT *)pSecond)->nName )
         return( 1 );
     else if( ((KEY_STRUCT *)pFirst)->nName < ((KEY_STRUCT *)pSecond)->nName )
diff --git a/svtools/source/edit/textdoc.cxx b/svtools/source/edit/textdoc.cxx
index cc5e1c2..da7f616 100644
--- a/svtools/source/edit/textdoc.cxx
+++ b/svtools/source/edit/textdoc.cxx
@@ -38,18 +38,8 @@ SV_IMPL_PTRARR( TextCharAttribs, TextCharAttribPtr );
 
 // Vergleichmethode wird von QuickSort gerufen...
 
-EXTERN_C
-#ifdef WNT
-#if _MSC_VER >= 1200
-int __cdecl
-#else
-int _cdecl
-#endif
-#else
-int
-#endif
-
-CompareStart( const void* pFirst, const void* pSecond )
+extern "C" {
+int SAL_CALL CompareStart( const void* pFirst, const void* pSecond )
 {
     if ( (*((TextCharAttrib**)pFirst))->GetStart() < (*((TextCharAttrib**)pSecond))->GetStart() )
         return (-1);
@@ -57,7 +47,7 @@ CompareStart( const void* pFirst, const void* pSecond )
         return (1);
     return 0;
 }
-
+}
 
 // -------------------------------------------------------------------------
 // (+) class TextCharAttrib
diff --git a/svtools/source/svrtf/rtfkeywd.cxx b/svtools/source/svrtf/rtfkeywd.cxx
index c307950..b5a5a4d 100644
--- a/svtools/source/svrtf/rtfkeywd.cxx
+++ b/svtools/source/svrtf/rtfkeywd.cxx
@@ -1187,14 +1187,7 @@ static RTF_TokenEntry aRTFTokenTab[] = {
 
 
 extern "C" {
-static int
-#if defined( WNT )
- __cdecl
-#endif
-#if defined( ICC ) && defined( OS2 )
-_Optlink
-#endif
-    RTFKeyCompare( const void *pFirst, const void *pSecond)
+static int SAL_CALL RTFKeyCompare( const void *pFirst, const void *pSecond)
 {
     int nRet = 0;
     if( -1 == ((RTF_TokenEntry*)pFirst)->nToken )
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 928751b..8bb2f19 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -342,14 +342,7 @@ static ComponentInfo aComponentInfos [] =
 
 extern "C"
 {
-static int
-#if defined( WNT )
- __cdecl
-#endif
-#if defined( ICC ) && defined( OS2 )
-_Optlink
-#endif
-     ComponentInfoCompare( const void* pFirst, const void* pSecond)
+static int SAL_CALL ComponentInfoCompare( const void* pFirst, const void* pSecond)
 {
     return( strcmp( ((ComponentInfo*)pFirst)->pName,
                     ((ComponentInfo*)pSecond)->pName ) );
diff --git a/tools/workben/inetmimetest.cxx b/tools/workben/inetmimetest.cxx
index 27f62a6..6f9a688 100644
--- a/tools/workben/inetmimetest.cxx
+++ b/tools/workben/inetmimetest.cxx
@@ -55,11 +55,7 @@ bool testDecode(char const * input, char const * expected) {
 
 }
 
-int
-#if defined WNT
-__cdecl
-#endif
-main() {
+int SAL_CALL main() {
     bool success = true;
     success &= testDecode("=?iso-8859-1?B?QQ==?=", "A");
     success &= testDecode("=?iso-8859-1?B?QUI=?=", "AB");
diff --git a/tools/workben/solar.c b/tools/workben/solar.c
index e5b5e1e..5e49427 100644
--- a/tools/workben/solar.c
+++ b/tools/workben/solar.c
@@ -154,11 +154,7 @@ va_dcl
 #ifndef USE_FORK_TO_CHECK
 static jmp_buf check_env;
 static int bSignal;
-#if defined (UNX) || defined (OS2)
-void SignalHandler( int sig )
-#else
-void __cdecl SignalHandler( int sig )
-#endif
+void SAL_CALL SignalHandler( int sig )
 {
   bSignal = 1;
   /*
@@ -354,11 +350,7 @@ void Description_Print( struct Description* pThis, char* name )
   fclose(f);
 }
 
-int
-#ifdef WNT
-__cdecl
-#endif
-main( int argc, char* argv[] )
+int SAL_CALL main( int argc, char* argv[] )
 {
   printTypeSign( char, "char" );
   printTypeSign( short, "short" );
diff --git a/tools/workben/urltest.cxx b/tools/workben/urltest.cxx
index b274ea4..9ec19e4 100644
--- a/tools/workben/urltest.cxx
+++ b/tools/workben/urltest.cxx
@@ -290,11 +290,7 @@ bool test_removeSegment(
 
 }
 
-int
-#if defined WNT
-__cdecl
-#endif // WNT
-main()
+int SAL_CALL main()
 {
     bool bSuccess = true;
 
-- 
1.7.0.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.