]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
'include/cuda/cuda.h': For C++, wrap in 'extern "C"'
authorThomas Schwinge <thomas@codesourcery.com>
Tue, 5 Jul 2022 06:41:50 +0000 (08:41 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Tue, 5 Jul 2022 06:44:21 +0000 (08:44 +0200)
include/
* cuda/cuda.h: For C++, wrap in 'extern "C"'.

(cherry picked from commit bdd1dc1bfbe1492edf3ce5e4288cfbc55be329ab)

include/ChangeLog.omp
include/cuda/cuda.h

index 6c3b73b44a9f1c743b5ae33717737ed0b1bcdc2e..d97509dfc31d197540c2804fecbcc14c6da77a9b 100644 (file)
@@ -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:
index bbd9fd21b96562fdc7d28776e63f1813a32fc946..1c3271ae77a73f473a5fc43da8f19f61f4b2d7dc 100644 (file)
@@ -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 */