[PATCH] fdo#63154: Remove all usages of the macro EXTERN_C

Marcos Souza (via Code Review) gerrit at gerrit.libreoffice.org
Fri Apr 26 04:35:59 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3621

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/21/3621/1

fdo#63154: Remove all usages of the macro EXTERN_C

Change-Id: I25b7f509ba5d1007a16c84ad05870a8174c094ec
---
M embedserv/source/inc/embservconst.h
M include/tools/solar.h
M lotuswordpro/source/filter/lwpfilter.hxx
M sal/systools/win32/uwinapi/legacy.c
M sfx2/source/control/dispatch.cxx
M sfx2/source/control/objface.cxx
6 files changed, 23 insertions(+), 31 deletions(-)



diff --git a/embedserv/source/inc/embservconst.h b/embedserv/source/inc/embservconst.h
index 7c876a6..6dac501 100644
--- a/embedserv/source/inc/embservconst.h
+++ b/embedserv/source/inc/embservconst.h
@@ -31,35 +31,35 @@
 #define SUPPORTED_FACTORIES_NUM 10
 
 #if defined(__MINGW32__) && !defined(INITGUID)
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_WriterTextServer;
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_WriterOASISTextServer;
+extern "C" const GUID DECLSPEC_SELECTANY OID_WriterTextServer;
+extern "C" const GUID DECLSPEC_SELECTANY OID_WriterOASISTextServer;
 
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_CalcServer;
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_CalcOASISServer;
+extern "C" const GUID DECLSPEC_SELECTANY OID_CalcServer;
+extern "C" const GUID DECLSPEC_SELECTANY OID_CalcOASISServer;
 
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_DrawingServer;
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_DrawingOASISServer;
+extern "C" const GUID DECLSPEC_SELECTANY OID_DrawingServer;
+extern "C" const GUID DECLSPEC_SELECTANY OID_DrawingOASISServer;
 
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_PresentationServer;
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_PresentationOASISServer;
+extern "C" const GUID DECLSPEC_SELECTANY OID_PresentationServer;
+extern "C" const GUID DECLSPEC_SELECTANY OID_PresentationOASISServer;
 
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_MathServer;
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_MathOASISServer;
+extern "C" const GUID DECLSPEC_SELECTANY OID_MathServer;
+extern "C" const GUID DECLSPEC_SELECTANY OID_MathOASISServer;
 #else
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_WriterTextServer = { SO3_SW_OLE_EMBED_CLASSID_60 };
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_WriterOASISTextServer = { SO3_SW_OLE_EMBED_CLASSID_8 };
+extern "C" const GUID DECLSPEC_SELECTANY OID_WriterTextServer = { SO3_SW_OLE_EMBED_CLASSID_60 };
+extern "C" const GUID DECLSPEC_SELECTANY OID_WriterOASISTextServer = { SO3_SW_OLE_EMBED_CLASSID_8 };
 
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_CalcServer = { SO3_SC_OLE_EMBED_CLASSID_60 };
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_CalcOASISServer = { SO3_SC_OLE_EMBED_CLASSID_8 };
+extern "C" const GUID DECLSPEC_SELECTANY OID_CalcServer = { SO3_SC_OLE_EMBED_CLASSID_60 };
+extern "C" const GUID DECLSPEC_SELECTANY OID_CalcOASISServer = { SO3_SC_OLE_EMBED_CLASSID_8 };
 
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_DrawingServer = { SO3_SDRAW_OLE_EMBED_CLASSID_60 };
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_DrawingOASISServer = { SO3_SDRAW_OLE_EMBED_CLASSID_8 };
+extern "C" const GUID DECLSPEC_SELECTANY OID_DrawingServer = { SO3_SDRAW_OLE_EMBED_CLASSID_60 };
+extern "C" const GUID DECLSPEC_SELECTANY OID_DrawingOASISServer = { SO3_SDRAW_OLE_EMBED_CLASSID_8 };
 
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_PresentationServer = { SO3_SIMPRESS_OLE_EMBED_CLASSID_60 };
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_PresentationOASISServer = { SO3_SIMPRESS_OLE_EMBED_CLASSID_8 };
+extern "C" const GUID DECLSPEC_SELECTANY OID_PresentationServer = { SO3_SIMPRESS_OLE_EMBED_CLASSID_60 };
+extern "C" const GUID DECLSPEC_SELECTANY OID_PresentationOASISServer = { SO3_SIMPRESS_OLE_EMBED_CLASSID_8 };
 
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_MathServer = { SO3_SM_OLE_EMBED_CLASSID_60 };
-EXTERN_C const GUID DECLSPEC_SELECTANY OID_MathOASISServer = { SO3_SM_OLE_EMBED_CLASSID_8 };
+extern "C" const GUID DECLSPEC_SELECTANY OID_MathServer = { SO3_SM_OLE_EMBED_CLASSID_60 };
+extern "C" const GUID DECLSPEC_SELECTANY OID_MathOASISServer = { SO3_SM_OLE_EMBED_CLASSID_8 };
 #endif
 
 #endif
diff --git a/include/tools/solar.h b/include/tools/solar.h
index 58d5849..7ef683f 100644
--- a/include/tools/solar.h
+++ b/include/tools/solar.h
@@ -107,12 +107,6 @@
 #endif
 #endif
 
-#ifdef __cplusplus
-#define EXTERN_C    extern "C"
-#else
-#define EXTERN_C
-#endif
-
 #define _LF     ((char)0x0A)
 #define _CR     ((char)0x0D)
 
diff --git a/lotuswordpro/source/filter/lwpfilter.hxx b/lotuswordpro/source/filter/lwpfilter.hxx
index 3c058ec..ed57baf 100644
--- a/lotuswordpro/source/filter/lwpfilter.hxx
+++ b/lotuswordpro/source/filter/lwpfilter.hxx
@@ -86,8 +86,6 @@
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star;
 
-#define EXTERN_C extern "C"
-
 /**
  * @brief
  * Implements the XFilter interface.
diff --git a/sal/systools/win32/uwinapi/legacy.c b/sal/systools/win32/uwinapi/legacy.c
index ec0b80a..777df2b 100644
--- a/sal/systools/win32/uwinapi/legacy.c
+++ b/sal/systools/win32/uwinapi/legacy.c
@@ -14,7 +14,7 @@
 #pragma warning(disable:4273)       // inconsistent dll linkage
 #endif
 
-EXTERN_C DWORD WINAPI GetShortPathNameW(LPCWSTR lpszLongPath,LPWSTR lpszShortPath,DWORD cchBuffer)
+extern "C" DWORD WINAPI GetShortPathNameW(LPCWSTR lpszLongPath,LPWSTR lpszShortPath,DWORD cchBuffer)
 {
     typedef DWORD (WINAPI * GetShortPathNameW_t) (LPCWSTR,LPWSTR,DWORD);
 
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 3ba81de..f77cae4 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -1734,7 +1734,7 @@
 }
 
 //--------------------------------------------------------------------
-EXTERN_C
+extern "C"
 #ifdef WNT
 int _cdecl
 #else
diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx
index 2d48db3..09870ea 100644
--- a/sfx2/source/control/objface.cxx
+++ b/sfx2/source/control/objface.cxx
@@ -35,7 +35,7 @@
 
 //====================================================================
 
-EXTERN_C
+extern "C"
 #ifdef WNT
 int _cdecl
 #else

-- 
To view, visit https://gerrit.libreoffice.org/3621
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25b7f509ba5d1007a16c84ad05870a8174c094ec
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Marcos Souza <marcos.souza.org at gmail.com>



More information about the LibreOffice mailing list