public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/omp/gcc-12] 'include/cuda/cuda.h': For C++, wrap in 'extern "C"'
@ 2022-07-05  8:10 Tobias Burnus
  0 siblings, 0 replies; only message in thread
From: Tobias Burnus @ 2022-07-05  8:10 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2c35fb158b3b041952cdf010801f948c521b7911

commit 2c35fb158b3b041952cdf010801f948c521b7911
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Tue Jul 5 08:41:50 2022 +0200

    'include/cuda/cuda.h': For C++, wrap in 'extern "C"'
    
            include/
            * cuda/cuda.h: For C++, wrap in 'extern "C"'.
    
    (cherry picked from commit bdd1dc1bfbe1492edf3ce5e4288cfbc55be329ab)

Diff:
---
 include/ChangeLog.omp | 7 +++++++
 include/cuda/cuda.h   | 8 ++++++++
 2 files changed, 15 insertions(+)

diff --git a/include/ChangeLog.omp b/include/ChangeLog.omp
index 6c3b73b44a9..d97509dfc31 100644
--- a/include/ChangeLog.omp
+++ b/include/ChangeLog.omp
@@ -1,3 +1,10 @@
+2022-07-05  Tobias Burnus  <tobias@codesourcery.com>
+
+	Backport from mainline:
+	2022-05-18  Thomas Schwinge <thomas@codesourcery.com>
+
+	* cuda/cuda.h: For C++, wrap in 'extern "C"'.
+
 2022-07-04  Tobias Burnus  <tobias@codesourcery.com>
 
 	Backport from mainline:
diff --git a/include/cuda/cuda.h b/include/cuda/cuda.h
index bbd9fd21b96..1c3271ae77a 100644
--- a/include/cuda/cuda.h
+++ b/include/cuda/cuda.h
@@ -32,6 +32,10 @@ the proprietary CUDA toolkit.  */
 
 #define CUDA_VERSION 8000
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef void *CUcontext;
 typedef int CUdevice;
 #if defined(__LP64__) || defined(_WIN64)
@@ -203,4 +207,8 @@ CUresult cuStreamQuery (CUstream);
 CUresult cuStreamSynchronize (CUstream);
 CUresult cuStreamWaitEvent (CUstream, CUevent, unsigned);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* GCC_CUDA_H */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-05  8:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05  8:10 [gcc/devel/omp/gcc-12] 'include/cuda/cuda.h': For C++, wrap in 'extern "C"' Tobias Burnus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).