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 @@ ...@@ -18,10 +18,6 @@
*/ */
#ifndef __cplusplus
#error Need C++ to compile
#endif
#define UNICODE #define UNICODE
#define _UNICODE #define _UNICODE
#include <tchar.h> #include <tchar.h>
......
...@@ -18,9 +18,6 @@ ...@@ -18,9 +18,6 @@
*/ */
#pragma once #pragma once
#ifndef __cplusplus
#error Need C++ to compile
#endif
#include <windows.h> #include <windows.h>
#include <winbase.h> #include <winbase.h>
......
...@@ -58,13 +58,6 @@ typedef union { ...@@ -58,13 +58,6 @@ typedef union {
} YYSTYPE; } YYSTYPE;
#include <stdio.h> #include <stdio.h>
#ifndef __cplusplus
#ifndef __STDC__
#define const
#endif
#endif
#define YYFINAL 102 #define YYFINAL 102
#define YYFLAG -32768 #define YYFLAG -32768
#define YYNTBASE 43 #define YYNTBASE 43
...@@ -438,13 +431,8 @@ int yydebug; /* nonzero means print parse trace */ ...@@ -438,13 +431,8 @@ int yydebug; /* nonzero means print parse trace */
to the proper pointer type. */ to the proper pointer type. */
#ifdef YYPARSE_PARAM #ifdef YYPARSE_PARAM
#ifdef __cplusplus
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
#define YYPARSE_PARAM_DECL #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 */ #else /* not YYPARSE_PARAM */
#define YYPARSE_PARAM_ARG #define YYPARSE_PARAM_ARG
#define YYPARSE_PARAM_DECL #define YYPARSE_PARAM_DECL
......
...@@ -36,17 +36,6 @@ ...@@ -36,17 +36,6 @@
#include <stdio.h> #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> #include <stdlib.h>
#ifndef _WIN32 #ifndef _WIN32
#include <unistd.h> #include <unistd.h>
...@@ -61,16 +50,6 @@ ...@@ -61,16 +50,6 @@
/* The "const" storage-class-modifier is valid. */ /* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST #define YY_USE_CONST
#else /* ! __cplusplus */
#if __STDC__
#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
#ifdef YY_USE_CONST #ifdef YY_USE_CONST
#define yyconst const #define yyconst const
#else #else
...@@ -966,14 +945,10 @@ char *yytext; ...@@ -966,14 +945,10 @@ char *yytext;
#define isatty _isatty #define isatty _isatty
#endif #endif
#ifdef __cplusplus
extern "C" { extern "C" {
#endif
#include "grammar.h" #include "grammar.h"
int yywrap(); int yywrap();
#ifdef __cplusplus
} }
#endif
#ifdef _WIN32 #ifdef _WIN32
extern YYSTYPE yylval; extern YYSTYPE yylval;
...@@ -1023,11 +998,7 @@ static int yy_top_state YY_PROTO(( void )); ...@@ -1023,11 +998,7 @@ static int yy_top_state YY_PROTO(( void ));
#ifdef YY_MALLOC_DECL #ifdef YY_MALLOC_DECL
YY_MALLOC_DECL YY_MALLOC_DECL
#else #else
#if defined __STDC__ && __STDC__ #if !(defined __STDC__ && __STDC__)
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines. This will fail /* Just try to get by without declaring the routines. This will fail
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
* or sizeof(void*) != sizeof(int). * or sizeof(void*) != sizeof(int).
......
...@@ -24,9 +24,7 @@ ...@@ -24,9 +24,7 @@
#include <registry/regtype.h> #include <registry/regtype.h>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#ifdef __cplusplus
extern "C" { extern "C" {
#endif
/** specifies a collection of function pointers which represents the complete registry C-API. /** specifies a collection of function pointers which represents the complete registry C-API.
...@@ -73,10 +71,7 @@ struct Registry_Api ...@@ -73,10 +71,7 @@ struct Registry_Api
*/ */
REG_DLLPUBLIC Registry_Api* REGISTRY_CALLTYPE initRegistry_Api(); REG_DLLPUBLIC Registry_Api* REGISTRY_CALLTYPE initRegistry_Api();
#ifdef __cplusplus
} }
#endif
class RegistryKey; class RegistryKey;
......
...@@ -44,9 +44,7 @@ inline void BCToBCOA< BITMAP_CHECKSUM_SIZE >( BitmapChecksum, BitmapChecksumOcte ...@@ -44,9 +44,7 @@ inline void BCToBCOA< BITMAP_CHECKSUM_SIZE >( BitmapChecksum, BitmapChecksumOcte
return; return;
} }
#ifdef __cplusplus
extern "C" { extern "C" {
#endif
/*======================================================================== /*========================================================================
* *
...@@ -70,10 +68,7 @@ VCL_DLLPUBLIC sal_uInt64 SAL_CALL vcl_crc64 ( ...@@ -70,10 +68,7 @@ VCL_DLLPUBLIC sal_uInt64 SAL_CALL vcl_crc64 (
VCL_DLLPUBLIC const sal_uInt64* vcl_get_crc64_table(); VCL_DLLPUBLIC const sal_uInt64* vcl_get_crc64_table();
#ifdef __cplusplus
} }
#endif
inline BitmapChecksum vcl_get_checksum ( inline BitmapChecksum vcl_get_checksum (
BitmapChecksum Checksum, BitmapChecksum Checksum,
......
...@@ -11,9 +11,7 @@ ...@@ -11,9 +11,7 @@
// We declare the necessary parts of the Security Transforms API here since // 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 // we're building with the 10.6 SDK, which doesn't know about Security
// Transforms. // Transforms.
#ifdef __cplusplus
extern "C" { extern "C" {
#endif
const CFStringRef kSecTransformInputAttributeName = CFSTR("INPUT"); const CFStringRef kSecTransformInputAttributeName = CFSTR("INPUT");
typedef CFTypeRef SecTransformRef; typedef CFTypeRef SecTransformRef;
typedef struct OpaqueSecKeyRef* SecKeyRef; typedef struct OpaqueSecKeyRef* SecKeyRef;
...@@ -34,9 +32,7 @@ extern "C" { ...@@ -34,9 +32,7 @@ extern "C" {
CFTypeRef value, CFTypeRef value,
CFErrorRef* error); CFErrorRef* error);
SecTransformSetAttributeFunc SecTransformSetAttributePtr = NULL; SecTransformSetAttributeFunc SecTransformSetAttributePtr = NULL;
#ifdef __cplusplus
} }
#endif
#define MAC_OS_X_VERSION_10_7_HEX 0x00001070 #define MAC_OS_X_VERSION_10_7_HEX 0x00001070
......
...@@ -24,9 +24,7 @@ ...@@ -24,9 +24,7 @@
#include <sal/main.h> #include <sal/main.h>
#include <sal/types.h> #include <sal/types.h>
#ifdef __cplusplus
extern "C" { extern "C" {
#endif
//From time.c //From time.c
void sal_initGlobalTimer(); void sal_initGlobalTimer();
...@@ -100,8 +98,6 @@ void sal_detail_deinitialize() ...@@ -100,8 +98,6 @@ void sal_detail_deinitialize()
} }
} }
#ifdef __cplusplus
} // extern "C" } // extern "C"
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -2321,19 +2321,15 @@ static const struct cppu::ImplementationEntry g_entries[] = ...@@ -2321,19 +2321,15 @@ static const struct cppu::ImplementationEntry g_entries[] =
{ nullptr, nullptr, nullptr, nullptr, nullptr, 0 } { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
}; };
#ifdef __cplusplus
extern "C" extern "C"
{ {
#endif
SAL_DLLPUBLIC_EXPORT void* SAL_CALL sdfilt_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* pRegistryKey ) 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 ); return cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
} }
#ifdef __cplusplus
} }
#endif
void dump_pset(Reference< XPropertySet > const & rXPropSet) void dump_pset(Reference< XPropertySet > const & rXPropSet)
{ {
......
...@@ -34,10 +34,7 @@ using namespace ftp; ...@@ -34,10 +34,7 @@ using namespace ftp;
/* */ /* */
/********************************************************************************/ /********************************************************************************/
#ifdef __cplusplus
extern "C" { extern "C" {
#endif
int memory_write_dummy(void *,size_t,size_t,void *) int memory_write_dummy(void *,size_t,size_t,void *)
{ {
...@@ -54,10 +51,7 @@ extern "C" { ...@@ -54,10 +51,7 @@ extern "C" {
curl_easy_cleanup(static_cast<CURL*>(pData)); curl_easy_cleanup(static_cast<CURL*>(pData));
} }
#ifdef __cplusplus
} }
#endif
/********************************************************************************/ /********************************************************************************/
/* */ /* */
......
...@@ -22,9 +22,7 @@ ...@@ -22,9 +22,7 @@
#include <salwtype.hxx> #include <salwtype.hxx>
#include <vector> #include <vector>
#ifdef __cplusplus
extern "C" { extern "C" {
#endif
// xim callbacks // xim callbacks
void PreeditDoneCallback ( XIC ic, XPointer client_data, XPointer call_data); 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); ...@@ -46,9 +44,7 @@ void IM_IMDestroyCallback (XIM im, XPointer client_data, XPointer call_data);
Bool IsControlCode(sal_Unicode nChar); Bool IsControlCode(sal_Unicode nChar);
#ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */
#endif
typedef struct { typedef struct {
sal_Unicode *pUnicodeBuffer; sal_Unicode *pUnicodeBuffer;
......
...@@ -22,9 +22,7 @@ ...@@ -22,9 +22,7 @@
#include <X11/Xlib.h> #include <X11/Xlib.h>
#if defined(__cplusplus)
extern "C" { extern "C" {
#endif
/* Initialize our atoms and determine if the current window manager is /* Initialize our atoms and determine if the current window manager is
* providing FWS extension support. * providing FWS extension support.
...@@ -48,9 +46,7 @@ RegisterFwsWindow (Display *display, Window window); ...@@ -48,9 +46,7 @@ RegisterFwsWindow (Display *display, Window window);
void void
AddFwsProtocols (Display *display, Window window); AddFwsProtocols (Display *display, Window window);
#if defined(__cplusplus)
} /* extern "C" */ } /* extern "C" */
#endif
#endif // INCLUDED_VCL_UNX_GENERIC_WINDOW_FWS_HXX #endif // INCLUDED_VCL_UNX_GENERIC_WINDOW_FWS_HXX
......
...@@ -33,10 +33,8 @@ ...@@ -33,10 +33,8 @@
using namespace com::sun::star; using namespace com::sun::star;
#ifdef __cplusplus
extern "C" extern "C"
{ {
#endif
#define SINGLEFACTORY(classname)\ #define SINGLEFACTORY(classname)\
if( classname##_getImplementationName().equalsAsciiL( pImplName, nImplNameLen ) )\ if( classname##_getImplementationName().equalsAsciiL( pImplName, nImplNameLen ) )\
...@@ -142,8 +140,6 @@ XMLOFF_DLLPUBLIC void * SAL_CALL xo_component_getFactory( const sal_Char * pImpl ...@@ -142,8 +140,6 @@ XMLOFF_DLLPUBLIC void * SAL_CALL xo_component_getFactory( const sal_Char * pImpl
return pRet; return pRet;
} }
#ifdef __cplusplus
} }
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -83,10 +83,8 @@ namespace ...@@ -83,10 +83,8 @@ namespace
}; };
} }
#ifdef __cplusplus
extern "C" extern "C"
{ {
#endif
SAL_DLLPUBLIC_EXPORT void* SAL_CALL xof_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) 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 ...@@ -131,8 +129,6 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL xof_component_getFactory( const sal_Char * p
return pRet; return pRet;
} }
#ifdef __cplusplus
} }
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* 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