From e7f1bfa9229d40a8bb78dcf532f9e5dd1e7ee9e6 Mon Sep 17 00:00:00 2001 From: mintsuki Date: Sat, 2 Dec 2023 01:32:33 +0100 Subject: [PATCH] options/ansi: Move complex-stubs.cpp to complex-stubs.c This fixes an issue where the 'complex' type is not defined for C++ sources --- options/ansi/generic/{complex-stubs.cpp => complex-stubs.c} | 5 ----- options/ansi/meson.build | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) rename options/ansi/generic/{complex-stubs.cpp => complex-stubs.c} (90%) diff --git a/options/ansi/generic/complex-stubs.cpp b/options/ansi/generic/complex-stubs.c similarity index 90% rename from options/ansi/generic/complex-stubs.cpp rename to options/ansi/generic/complex-stubs.c index 9508439d2f..069626bd08 100644 --- a/options/ansi/generic/complex-stubs.cpp +++ b/options/ansi/generic/complex-stubs.c @@ -1,7 +1,5 @@ #include -extern "C" { - long double cimagl(long double complex z) { return __imag__(z); } @@ -9,6 +7,3 @@ long double cimagl(long double complex z) { long double creall(long double complex z) { return __real__(z); } - - -} diff --git a/options/ansi/meson.build b/options/ansi/meson.build index ff8b21ced9..fa1efd1fc2 100644 --- a/options/ansi/meson.build +++ b/options/ansi/meson.build @@ -6,7 +6,7 @@ endif ansi_sources = files( 'generic/stdlib-stubs.cpp', 'generic/assert-stubs.cpp', - 'generic/complex-stubs.cpp', + 'generic/complex-stubs.c', 'generic/complex/csqrt.c', 'generic/complex/csinhf.c',