summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-07-13 16:11:20 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-07-13 14:54:14 +0000
commit2cdc693c56c266e149473241e6b3cb54fb2a2a03 (patch)
tree0c4dc65cfd85858ef1a12db9217830d708e67336
parent80f9ad9011843dbc9d166147402366438bcfe29a (diff)
Remove __cplusplus-checks from apparently-C++-only files
Change-Id: I87e9ce45cf945e75e8140a9d4608da8abcddada6 Reviewed-on: https://gerrit.libreoffice.org/27187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--dbaccess/win32/source/odbcconfig/odbcconfig.cxx4
-rw-r--r--desktop/win32/source/applauncher/launcher.hxx3
-rw-r--r--hwpfilter/source/grammar.cxx12
-rw-r--r--hwpfilter/source/lexer.cxx31
-rw-r--r--include/registry/registry.hxx5
-rw-r--r--include/vcl/checksum.hxx5
-rw-r--r--onlineupdate/source/libmar/verify/MacVerifyCrypto.cpp4
-rw-r--r--sal/osl/w32/salinit.cxx4
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx4
-rw-r--r--ucb/source/ucp/ftp/ftploaderthread.cxx6
-rw-r--r--vcl/inc/unx/i18n_cb.hxx4
-rw-r--r--vcl/unx/generic/window/FWS.hxx4
-rw-r--r--xmloff/source/core/facreg.cxx4
-rw-r--r--xmloff/source/transform/XMLFilterRegistration.cxx4
14 files changed, 1 insertions, 93 deletions
diff --git a/dbaccess/win32/source/odbcconfig/odbcconfig.cxx b/dbaccess/win32/source/odbcconfig/odbcconfig.cxx
index 47f83ebfbb32..ef82f546e097 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 7bf05ad15f9d..bfc5e588455c 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 14751da6fbf7..80d2d175a6e9 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 76ba0ba770e8..0c52851d26dc 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 c110b3b0f9be..614f54f7ffa7 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 8bc10969ecfe..bdc503a409ba 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 b067a10071bf..e86fac3c5863 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 84022f2dc76d..141cc2fe5b3e 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 9f2d329a23ad..ce4af329cc2d 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 ab2df72ba55e..be68d9a24fd2 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 35b44a02793a..2ab73da7924d 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 93c863f74cef..d9a354456828 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 c050b10c4407..884baed3d213 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 4b7ce03acd07..863495fd385b 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: */