[Libreoffice-commits] core.git: dbaccess/win32 desktop/win32 hwpfilter/source include/registry include/vcl onlineupdate/source sal/osl sd/source ucb/source vcl/inc vcl/unx xmloff/source
Stephan Bergmann
sbergman at redhat.com
Wed Jul 13 14:54:38 UTC 2016
dbaccess/win32/source/odbcconfig/odbcconfig.cxx | 4 --
desktop/win32/source/applauncher/launcher.hxx | 3 -
hwpfilter/source/grammar.cxx | 12 ------
hwpfilter/source/lexer.cxx | 31 ------------------
include/registry/registry.hxx | 5 --
include/vcl/checksum.hxx | 5 --
onlineupdate/source/libmar/verify/MacVerifyCrypto.cpp | 4 --
sal/osl/w32/salinit.cxx | 4 --
sd/source/filter/eppt/pptx-epptooxml.cxx | 4 --
ucb/source/ucp/ftp/ftploaderthread.cxx | 6 ---
vcl/inc/unx/i18n_cb.hxx | 4 --
vcl/unx/generic/window/FWS.hxx | 4 --
xmloff/source/core/facreg.cxx | 4 --
xmloff/source/transform/XMLFilterRegistration.cxx | 4 --
14 files changed, 1 insertion(+), 93 deletions(-)
New commits:
commit 2cdc693c56c266e149473241e6b3cb54fb2a2a03
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Jul 13 16:11:20 2016 +0200
Remove __cplusplus-checks from apparently-C++-only files
Change-Id: I87e9ce45cf945e75e8140a9d4608da8abcddada6
Reviewed-on: https://gerrit.libreoffice.org/27187
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/dbaccess/win32/source/odbcconfig/odbcconfig.cxx b/dbaccess/win32/source/odbcconfig/odbcconfig.cxx
index 47f83eb..ef82f54 100644
--- a/dbaccess/win32/source/odbcconfig/odbcconfig.cxx
+++ b/dbaccess/win32/source/odbcconfig/odbcconfig.cxx
@@ -18,10 +18,6 @@
*/
-#ifndef __cplusplus
-#error Need C++ to compile
-#endif
-
#define UNICODE
#define _UNICODE
#include <tchar.h>
diff --git a/desktop/win32/source/applauncher/launcher.hxx b/desktop/win32/source/applauncher/launcher.hxx
index 7bf05ad..bfc5e58 100644
--- a/desktop/win32/source/applauncher/launcher.hxx
+++ b/desktop/win32/source/applauncher/launcher.hxx
@@ -18,9 +18,6 @@
*/
#pragma once
-#ifndef __cplusplus
-#error Need C++ to compile
-#endif
#include <windows.h>
#include <winbase.h>
diff --git a/hwpfilter/source/grammar.cxx b/hwpfilter/source/grammar.cxx
index 14751da..80d2d175 100644
--- a/hwpfilter/source/grammar.cxx
+++ b/hwpfilter/source/grammar.cxx
@@ -58,13 +58,6 @@ typedef union {
} YYSTYPE;
#include <stdio.h>
-#ifndef __cplusplus
-#ifndef __STDC__
-#define const
-#endif
-#endif
-
-
#define YYFINAL 102
#define YYFLAG -32768
#define YYNTBASE 43
@@ -438,13 +431,8 @@ int yydebug; /* nonzero means print parse trace */
to the proper pointer type. */
#ifdef YYPARSE_PARAM
-#ifdef __cplusplus
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
#define YYPARSE_PARAM_DECL
-#else /* not __cplusplus */
-#define YYPARSE_PARAM_ARG YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
-#endif /* not __cplusplus */
#else /* not YYPARSE_PARAM */
#define YYPARSE_PARAM_ARG
#define YYPARSE_PARAM_DECL
diff --git a/hwpfilter/source/lexer.cxx b/hwpfilter/source/lexer.cxx
index 76ba0ba..0c52851 100644
--- a/hwpfilter/source/lexer.cxx
+++ b/hwpfilter/source/lexer.cxx
@@ -36,17 +36,6 @@
#include <stdio.h>
-
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
-#endif
-
-
-#ifdef __cplusplus
-
#include <stdlib.h>
#ifndef _WIN32
#include <unistd.h>
@@ -61,16 +50,6 @@
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
-#else /* ! __cplusplus */
-
-#if __STDC__
-
-#define YY_USE_PROTOS
-#define YY_USE_CONST
-
-#endif /* __STDC__ */
-#endif /* ! __cplusplus */
-
#ifdef YY_USE_CONST
#define yyconst const
#else
@@ -966,14 +945,10 @@ char *yytext;
#define isatty _isatty
#endif
-#ifdef __cplusplus
extern "C" {
-#endif
#include "grammar.h"
int yywrap();
-#ifdef __cplusplus
}
-#endif
#ifdef _WIN32
extern YYSTYPE yylval;
@@ -1023,11 +998,7 @@ static int yy_top_state YY_PROTO(( void ));
#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
-#if defined __STDC__ && __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
+#if !(defined __STDC__ && __STDC__)
/* Just try to get by without declaring the routines. This will fail
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
* or sizeof(void*) != sizeof(int).
diff --git a/include/registry/registry.hxx b/include/registry/registry.hxx
index c110b3b..614f54f 100644
--- a/include/registry/registry.hxx
+++ b/include/registry/registry.hxx
@@ -24,9 +24,7 @@
#include <registry/regtype.h>
#include <rtl/ustring.hxx>
-#ifdef __cplusplus
extern "C" {
-#endif
/** specifies a collection of function pointers which represents the complete registry C-API.
@@ -73,10 +71,7 @@ struct Registry_Api
*/
REG_DLLPUBLIC Registry_Api* REGISTRY_CALLTYPE initRegistry_Api();
-#ifdef __cplusplus
}
-#endif
-
class RegistryKey;
diff --git a/include/vcl/checksum.hxx b/include/vcl/checksum.hxx
index 8bc1096..bdc503a 100644
--- a/include/vcl/checksum.hxx
+++ b/include/vcl/checksum.hxx
@@ -44,9 +44,7 @@ inline void BCToBCOA< BITMAP_CHECKSUM_SIZE >( BitmapChecksum, BitmapChecksumOcte
return;
}
-#ifdef __cplusplus
extern "C" {
-#endif
/*========================================================================
*
@@ -70,10 +68,7 @@ VCL_DLLPUBLIC sal_uInt64 SAL_CALL vcl_crc64 (
VCL_DLLPUBLIC const sal_uInt64* vcl_get_crc64_table();
-
-#ifdef __cplusplus
}
-#endif
inline BitmapChecksum vcl_get_checksum (
BitmapChecksum Checksum,
diff --git a/onlineupdate/source/libmar/verify/MacVerifyCrypto.cpp b/onlineupdate/source/libmar/verify/MacVerifyCrypto.cpp
index b067a10..e86fac3 100644
--- a/onlineupdate/source/libmar/verify/MacVerifyCrypto.cpp
+++ b/onlineupdate/source/libmar/verify/MacVerifyCrypto.cpp
@@ -11,9 +11,7 @@
// We declare the necessary parts of the Security Transforms API here since
// we're building with the 10.6 SDK, which doesn't know about Security
// Transforms.
-#ifdef __cplusplus
extern "C" {
-#endif
const CFStringRef kSecTransformInputAttributeName = CFSTR("INPUT");
typedef CFTypeRef SecTransformRef;
typedef struct OpaqueSecKeyRef* SecKeyRef;
@@ -34,9 +32,7 @@ extern "C" {
CFTypeRef value,
CFErrorRef* error);
SecTransformSetAttributeFunc SecTransformSetAttributePtr = NULL;
-#ifdef __cplusplus
}
-#endif
#define MAC_OS_X_VERSION_10_7_HEX 0x00001070
diff --git a/sal/osl/w32/salinit.cxx b/sal/osl/w32/salinit.cxx
index 84022f2..141cc2f 100644
--- a/sal/osl/w32/salinit.cxx
+++ b/sal/osl/w32/salinit.cxx
@@ -24,9 +24,7 @@
#include <sal/main.h>
#include <sal/types.h>
-#ifdef __cplusplus
extern "C" {
-#endif
//From time.c
void sal_initGlobalTimer();
@@ -100,8 +98,6 @@ void sal_detail_deinitialize()
}
}
-#ifdef __cplusplus
} // extern "C"
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 9f2d329..ce4af32 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -2321,19 +2321,15 @@ static const struct cppu::ImplementationEntry g_entries[] =
{ nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
-#ifdef __cplusplus
extern "C"
{
-#endif
SAL_DLLPUBLIC_EXPORT void* SAL_CALL sdfilt_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* pRegistryKey )
{
return cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
}
-#ifdef __cplusplus
}
-#endif
void dump_pset(Reference< XPropertySet > const & rXPropSet)
{
diff --git a/ucb/source/ucp/ftp/ftploaderthread.cxx b/ucb/source/ucp/ftp/ftploaderthread.cxx
index ab2df72..be68d9a 100644
--- a/ucb/source/ucp/ftp/ftploaderthread.cxx
+++ b/ucb/source/ucp/ftp/ftploaderthread.cxx
@@ -34,10 +34,7 @@ using namespace ftp;
/* */
/********************************************************************************/
-
-#ifdef __cplusplus
extern "C" {
-#endif
int memory_write_dummy(void *,size_t,size_t,void *)
{
@@ -54,10 +51,7 @@ extern "C" {
curl_easy_cleanup(static_cast<CURL*>(pData));
}
-#ifdef __cplusplus
}
-#endif
-
/********************************************************************************/
/* */
diff --git a/vcl/inc/unx/i18n_cb.hxx b/vcl/inc/unx/i18n_cb.hxx
index 35b44a0..2ab73da 100644
--- a/vcl/inc/unx/i18n_cb.hxx
+++ b/vcl/inc/unx/i18n_cb.hxx
@@ -22,9 +22,7 @@
#include <salwtype.hxx>
#include <vector>
-#ifdef __cplusplus
extern "C" {
-#endif
// xim callbacks
void PreeditDoneCallback ( XIC ic, XPointer client_data, XPointer call_data);
@@ -46,9 +44,7 @@ void IM_IMDestroyCallback (XIM im, XPointer client_data, XPointer call_data);
Bool IsControlCode(sal_Unicode nChar);
-#ifdef __cplusplus
} /* extern "C" */
-#endif
typedef struct {
sal_Unicode *pUnicodeBuffer;
diff --git a/vcl/unx/generic/window/FWS.hxx b/vcl/unx/generic/window/FWS.hxx
index 93c863f..d9a3544 100644
--- a/vcl/unx/generic/window/FWS.hxx
+++ b/vcl/unx/generic/window/FWS.hxx
@@ -22,9 +22,7 @@
#include <X11/Xlib.h>
-#if defined(__cplusplus)
extern "C" {
-#endif
/* Initialize our atoms and determine if the current window manager is
* providing FWS extension support.
@@ -48,9 +46,7 @@ RegisterFwsWindow (Display *display, Window window);
void
AddFwsProtocols (Display *display, Window window);
-#if defined(__cplusplus)
} /* extern "C" */
-#endif
#endif // INCLUDED_VCL_UNX_GENERIC_WINDOW_FWS_HXX
diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx
index c050b10..884baed 100644
--- a/xmloff/source/core/facreg.cxx
+++ b/xmloff/source/core/facreg.cxx
@@ -33,10 +33,8 @@
using namespace com::sun::star;
-#ifdef __cplusplus
extern "C"
{
-#endif
#define SINGLEFACTORY(classname)\
if( classname##_getImplementationName().equalsAsciiL( pImplName, nImplNameLen ) )\
@@ -142,8 +140,6 @@ XMLOFF_DLLPUBLIC void * SAL_CALL xo_component_getFactory( const sal_Char * pImpl
return pRet;
}
-#ifdef __cplusplus
}
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/transform/XMLFilterRegistration.cxx b/xmloff/source/transform/XMLFilterRegistration.cxx
index 4b7ce03..863495f 100644
--- a/xmloff/source/transform/XMLFilterRegistration.cxx
+++ b/xmloff/source/transform/XMLFilterRegistration.cxx
@@ -83,10 +83,8 @@ namespace
};
}
-#ifdef __cplusplus
extern "C"
{
-#endif
SAL_DLLPUBLIC_EXPORT void* SAL_CALL xof_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
@@ -131,8 +129,6 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL xof_component_getFactory( const sal_Char * p
return pRet;
}
-#ifdef __cplusplus
}
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list