search for: __cplusplus

Displaying 20 results from an estimated 293 matches for "__cplusplus".

2016 Apr 21
25
[PATCH 00/24] drm: add extern C guard for the UAPI headers
Hi all, As some of you may know there some subtle distinction between C and C++ structs, thus one should wrap/annotate them roughly like below. ... #if defined(__cplusplus) extern "C" { #endif struct foo { int bar; ... }; ... #if defined(__cplusplus) } #endif In order to work around the lack of these users can wrap the header inclusion in the same way. For example: ... #if defined(__cplusplus) extern "C" { #endif #include <i915...
2004 Sep 10
0
new checkins
...=================== RCS file: /cvsroot/flac/flac/include/FLAC/file_decoder.h,v retrieving revision 1.13 diff -u -r1.13 file_decoder.h --- file_decoder.h 26 Jan 2002 17:36:39 -0000 1.13 +++ file_decoder.h 6 May 2002 15:07:21 -0000 @@ -22,6 +22,10 @@ #include "stream_decoder.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { FLAC__FILE_DECODER_OK = 0, FLAC__FILE_DECODER_SEEKING, /*@@@ NOTE: unused; remove this in the next minor-version */ @@ -133,5 +137,9 @@ FLAC__bool FLAC__file_decoder_process_remaining_frames(FLAC__FileDecoder *decoder); FLAC__bool FLAC__f...
2018 Oct 08
4
R_ext/Altrep.h should be more C++-friendly
I am not able to #include "R_ext/Altrep.h" from a C++ file. I think it needs two changes: 1. add the same __cplusplus check as most of the other header files: #ifdef __cplusplus extern "C" { #endif ... #ifdef __cplusplus } #endif 2. change the line R_new_altrep(R_altrep_class_t class, SEXP data1, SEXP data2); to R_new_altrep(R_altrep_class_t cls, SEXP data1, SE...
2016 Apr 21
0
[PATCH 03/24] drm: add extern C guard for the UAPI headers
...api/drm/drm_sarea.h | 8 ++++++++ 4 files changed, 40 insertions(+) diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index 3683250..452675f 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -65,6 +65,10 @@ typedef unsigned long drm_handle_t; #endif +#if defined(__cplusplus) +extern "C" { +#endif + #define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */ #define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */ #define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */ @@ -691,8 +695,16 @@ struct drm_prime_handle { __s32...
2004 Sep 10
3
new checkins
FYI, I have checked in a few interesting things. One is a speedup to the decoder (about 15% improvement in overall decode time). Another is a new interface to FLAC file metadata. If you're curious look at include/FLAC/metadata.h. It is basically a collection of object manipulation routines and iterators that make it pretty easy to add/edit/delete FLAC metadata in files efficiently. The
2001 Apr 07
2
silent extern error (PR#898)
Full_Name: Byron Ellis Version: 1.2.2 OS: all Submission from: (NULL) (140.247.105.95) R_ext/Arith.h #ifdef MAIN #define extern #endif #ifdef __cplusplus extern "C" { #endif these two should be reversed. Its never a problem because builds aren't done against C++ compilers, but its still an error (just a low priority one). also, you could change that to #ifdef __cplusplus extern "C" { #endif #ifdef __MAIN__ #define extern #...
2005 Apr 19
0
R 2.0.1 install problem on Solaris 9
...t;>>>>>>> >>>>>> errors appearing in config.log >>>>> configure:4488: gcc -c -g -O2 -I/usr/include conftest.c >&5 conftest.c:2: error: parse error before "me" configure:4494: $? = 1 configure: failed program was: | #ifndef __cplusplus | choke me | #endif configure:5894: g++ -c -g -O2 -I/usr/include conftest.cc >&5 conftest.cc: In function `int main()': conftest.cc:20: error: `exit' undeclared (first use this function) conftest.cc:20: error: (Each undeclared identifier is reported only once for each function it...
2019 Jul 12
2
[clang][AST] : extern "C" symbols not present or not visited when traversing TU decl
Hi, I'm using clang ast for a while now to do meta compilation, and I just fell into a problem when trying to parse vulkan library which has extern "C" in it. Every symbol inside extern "C" seem to be striped from the TU and ast. I tried to #undef __cplusplus and this time I got the symbols into the AST. I first supposed it was a problem with missing includes or else, but clang ouput no errors, and more, now when tracing the files of every symbol in the AST i fall onto some windows headers I never had before #undef of __cplusplus. Does someone know wha...
2007 Mar 19
3
Rinternals.h and undefined symbols
Hi, I'm trying to register my native routines using R_registerRoutines (...). I can compile the code, but the loader cannot resolve the symbol: undefined symbol: _Z18R_registerRoutinesP8_DllInfoPK12R_CMethodDefPK15R_CallMethodDefS3_S6 _ $ nm bgx.Rcheck/bgx/libs/bgx.so | grep R_registerRoutines U _Z18R_registerRoutinesP8_DllInfoPK12R_CMethodDefPK15R_CallMethodDefS3_S6
2018 Feb 02
2
Debug info error on bitcode inline modification
...n inlining. How can I fix it? I'm using LLVM 3.8.1 on OS X (On below example target is Android but it should be same on others). I'll appreciate any advice. Thanks. * Targets caller.cpp ----------------------------------------------------------------- #include <android/log.h> #ifdef __cplusplus extern "C" { #endif void caller() { __android_log_print(ANDROID_LOG_DEBUG, "TEST", "%s:%d:%s", __FILE__, __LINE__, __FUNCTION__); } #ifdef __cplusplus } #endif ----------------------------------------------------------------- callee.cpp ---------------------...
2004 Oct 23
1
Issues with compiling wine
...nftest.err configure:2269: $? = 0 configure:2272: test -s conftest.o configure:2275: $? = 0 configure:2293: result: none needed configure:2311: gcc -c -g -O2 conftest.c >&5 conftest.c:2: error: parse error before "me" configure:2317: $? = 1 configure: failed program was: | #ifndef __cplusplus | choke me | #endif configure:2499: checking for g++ configure:2515: found /usr/local/bin/g++ configure:2525: result: g++ configure:2541: checking for C++ compiler version configure:2544: g++ --version </dev/null >&5 g++ (GCC) 3.4.2 Copyright (C) 2004 Free Software Foundation, Inc. This...
2006 Apr 12
6
*OUTPUT/*INPUT typemaps
Hi Have been looking again at SWIG output pointer parameters, as: http://www.swig.org/Doc1.3/Ruby.html#Ruby_nn32 The problem is, whenever I tried to include the SWIG/Ruby ''typemaps.i'' file, it threw loads of errors. A bit more investigation pinned the problem down to some secondary files that typemaps.i includes to map ''special'' types like File. So I tried
2018 Feb 02
0
Debug info error on bitcode inline modification
...LLVM 3.8.1 on OS X (On below example target is Android but it > should be same on others). > I'll appreciate any advice. Thanks. > > * Targets > caller.cpp > ----------------------------------------------------------------- > #include <android/log.h> > > #ifdef __cplusplus > extern "C" { > #endif > > void caller() > { > __android_log_print(ANDROID_LOG_DEBUG, "TEST", "%s:%d:%s", > __FILE__, __LINE__, __FUNCTION__); > } > > #ifdef __cplusplus > } > #endif > ------------------------------------...
2008 Jun 27
1
Missing 'extern "C" {' in speex_jitter_buffer.h ?
Hi, It seems like there's a missing ... #ifdef __cplusplus extern "C" { #endif ... somewhere near the beginning of speex_jitter_buffer.h (I'm looking at the latest SVN version). Otherwise, there is nothing to match the "#ifdef __cplusplus" near the end of the file. Inserting the lines above allows my code to compile. (BTW,...
2008 Apr 16
1
C++ complains abouct Rprintf signature
...to 'char*' Is there a reason for the non-const? It is curious that Rf_error, which is similar to RPrintf, is const. If there is a need to keep it non-const in C please consider using the patch below in future releases. Thanks, Vadim Patch to R-2.6.1/include/R_ext/Print.h #ifdef __cplusplus extern "C" { #define CONST const #endif void Rprintf(CONST char *, ...); void REprintf(CONST char *, ...); void Rvprintf(const char *, va_list); void REvprintf(const char *, va_list); #ifdef __cplusplus } #undef CONST #endif [[alternative HTML version deleted]]
2005 Oct 24
1
3.0.20b and Heimdal
On Mon, Oct 24, 2005 at 03:35:41PM -0400, William Jojo wrote: > > Has anyone been able to get Heimdal 0.7.1 with Samba 3.0.20b to compile successfully without commenting out the __cplusplus stuff in include/includes.h? If I comment it out, it's fine on FC3. The Heimdal people are using "private" as a structure member name, so I know it's a Heimdal problem :-). I think you need to remove the __cplusplus change in Samba3 to make things compile. > Also, should one...
2018 Feb 05
1
Debug info error on bitcode inline modification
...e target is Android but it >> should be same on others). >> I'll appreciate any advice. Thanks. >> >> * Targets >> caller.cpp >> ----------------------------------------------------------------- >> #include <android/log.h> >> >> #ifdef __cplusplus >> extern "C" { >> #endif >> >> void caller() >> { >> __android_log_print(ANDROID_LOG_DEBUG, "TEST", "%s:%d:%s", >> __FILE__, __LINE__, __FUNCTION__); >> } >> >> #ifdef __cplusplus >> } >>...
2002 Jul 22
1
impedence mismatch between openssh 3.4p1 and openssl 0.9.6d on SCO OpenServer 3.2 5.0.6
...conftest.o i386ld fatal: Symbol referencing errors. No output written to conftest configure:8170: $? = 13 configure: failed program was: #line 8125 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char RAND_add (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif...
2013 Jan 23
1
[PATCH V2] libxc, libxenstore: make the headers C++-friendlier
...igned-off-by: Razvan Cojocaru <rzvncj@gmail.com> diff -r 5af4f2ab06f3 -r c273ee1fc8ba tools/libxc/xenctrl.h --- a/tools/libxc/xenctrl.h Tue Jan 22 09:33:10 2013 +0100 +++ b/tools/libxc/xenctrl.h Wed Jan 23 11:18:49 2013 +0200 @@ -26,6 +26,10 @@ #ifndef XENCTRL_H #define XENCTRL_H +#ifdef __cplusplus +extern "C" { +#endif + /* Tell the Xen public headers we are a user-space tools build. */ #ifndef __XEN_TOOLS__ #define __XEN_TOOLS__ 1 @@ -114,6 +118,15 @@ typedef struct xc_interface_core xc_inte typedef struct xc_interface_core xc_evtchn; typedef struct xc_interface_core xc_gntta...
2013 Jan 23
1
[PATCH V3] libxc, libxenstore: make the headers C++-friendlier
...igned-off-by: Razvan Cojocaru <rzvncj@gmail.com> diff -r 5af4f2ab06f3 -r f80587008e17 tools/libxc/xenctrl.h --- a/tools/libxc/xenctrl.h Tue Jan 22 09:33:10 2013 +0100 +++ b/tools/libxc/xenctrl.h Wed Jan 23 16:41:30 2013 +0200 @@ -26,6 +26,10 @@ #ifndef XENCTRL_H #define XENCTRL_H +#ifdef __cplusplus +extern "C" { +#endif + /* Tell the Xen public headers we are a user-space tools build. */ #ifndef __XEN_TOOLS__ #define __XEN_TOOLS__ 1 @@ -114,6 +118,15 @@ typedef struct xc_interface_core xc_inte typedef struct xc_interface_core xc_evtchn; typedef struct xc_interface_core xc_gntta...