From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1534) id 2C29038582AD; Tue, 5 Jul 2022 08:10:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C29038582AD Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Tobias Burnus To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/omp/gcc-12] 'include/cuda/cuda.h': For C++, wrap in 'extern "C"' X-Act-Checkin: gcc X-Git-Author: Thomas Schwinge X-Git-Refname: refs/heads/devel/omp/gcc-12 X-Git-Oldrev: 2dda9403ca7218eb117740e8b3a1060421250a54 X-Git-Newrev: 2c35fb158b3b041952cdf010801f948c521b7911 Message-Id: <20220705081018.2C29038582AD@sourceware.org> Date: Tue, 5 Jul 2022 08:10:18 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2022 08:10:18 -0000 https://gcc.gnu.org/g:2c35fb158b3b041952cdf010801f948c521b7911 commit 2c35fb158b3b041952cdf010801f948c521b7911 Author: Thomas Schwinge 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 + + Backport from mainline: + 2022-05-18 Thomas Schwinge + + * cuda/cuda.h: For C++, wrap in 'extern "C"'. + 2022-07-04 Tobias Burnus 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 */