Skip to content

Commit

Permalink
options/ansi: Move complex-stubs.cpp to complex-stubs.c
Browse files Browse the repository at this point in the history
This fixes an issue where the 'complex' type is not defined for C++ sources
  • Loading branch information
mintsuki committed Dec 2, 2023
1 parent 472c145 commit e7f1bfa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
#include <complex.h>

extern "C" {

long double cimagl(long double complex z) {
return __imag__(z);
}

long double creall(long double complex z) {
return __real__(z);
}


}
2 changes: 1 addition & 1 deletion options/ansi/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit e7f1bfa

Please sign in to comment.