Kaydet (Commit) 2cdc693c authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Remove __cplusplus-checks from apparently-C++-only files

Change-Id: I87e9ce45cf945e75e8140a9d4608da8abcddada6
Reviewed-on: https://gerrit.libreoffice.org/27187Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 80f9ad90
......@@ -18,10 +18,6 @@
*/
#ifndef __cplusplus
#error Need C++ to compile
#endif
#define UNICODE
#define _UNICODE
#include <tchar.h>
......
......@@ -18,9 +18,6 @@
*/
#pragma once
#ifndef __cplusplus
#error Need C++ to compile
#endif
#include <windows.h>
#include <winbase.h>
......
......@@ -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
......
......@@ -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).
......
......@@ -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;
......
......@@ -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,
......
......@@ -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
......
......@@ -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: */
......@@ -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)
{
......
......@@ -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
/********************************************************************************/
/* */
......
......@@ -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;
......
......@@ -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
......
......@@ -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: */
......@@ -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: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment