From 1bc4f50230db4b57297fe88bdf9248f93139c4a8 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 22 Aug 2024 09:10:04 +0200 Subject: Platform.hxx: use EXTERN_C macro according to language. Signed-off-by: Amlal El Mahrouss --- dev/ZBA/BootKit/Platform.hxx | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'dev') diff --git a/dev/ZBA/BootKit/Platform.hxx b/dev/ZBA/BootKit/Platform.hxx index b89b0123..8155bc19 100644 --- a/dev/ZBA/BootKit/Platform.hxx +++ b/dev/ZBA/BootKit/Platform.hxx @@ -7,16 +7,26 @@ #pragma once /** - @file Processor.hxx - @brief Processor specific code. + @file Platform.hxx + @brief Platform specific code. */ #ifdef __x86_64__ -extern "C" void rt_halt(); -extern "C" void rt_cli(); -extern "C" void rt_sti(); -extern "C" void rt_cld(); -extern "C" void rt_std(); +#ifdef __cplusplus +#ifndef EXTERN_C +#define EXTERN_C extern "C" +#endif +#else +#ifndef EXTERN_C +#define EXTERN_C extern +#endif +#endif // __cplusplus + +EXTERN_C void rt_halt(); +EXTERN_C void rt_cli(); +EXTERN_C void rt_sti(); +EXTERN_C void rt_cld(); +EXTERN_C void rt_std(); #endif /* ifdef __x86_64__ */ -- cgit v1.2.3