Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/libc/include/complex.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
#ifndef _COMPLEX_H
#define _COMPLEX_H

#ifdef __cplusplus

#include <complex>

#else /* __cplusplus */

#ifndef __FAST_MATH__
#warning "-ffast-math is required for complex multiplication and division to work properly at this time"
#endif

#ifndef __cplusplus
#define complex _Complex
#endif

#ifdef _Imaginary
#define imaginary _Imaginary
Expand Down Expand Up @@ -121,4 +125,6 @@ double _Complex catanh(double _Complex);
float _Complex catanhf(float _Complex);
long double _Complex catanhl(long double _Complex);

#endif /* __cplusplus */

#endif /* _COMPLEX_H */
1 change: 1 addition & 0 deletions src/libc/include/tgmath.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#ifdef __cplusplus

#include <cmath>
#include <complex>

#else /* __cplusplus */

Expand Down
3 changes: 3 additions & 0 deletions src/libcxx/header_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <algorithm>
#include <bit>
#include <cassert>
#include <ccomplex>
#include <cctype>
#include <cerrno>
#include <cfenv>
Expand All @@ -10,6 +11,7 @@
#include <ciso646>
#include <climits>
#include <cmath>
#include <complex>
#if __cplusplus >= 201907L
#include <concepts>
#endif // __cplusplus >= 201907L
Expand Down Expand Up @@ -45,6 +47,7 @@
#include <assert.h>
#include <byteswap.h>
#include <cdefs.h>
#include <complex.h>
#include <ctype.h>
#include <errno.h>
#include <fenv.h>
Expand Down
1 change: 1 addition & 0 deletions src/libcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
#define _EZCXX_NODEBUG __attribute__((__nodebug__))
#define _EZCXX_TEMPLATE_VIS __attribute__ ((__type_visibility__("default")))
#define _EZCXX_LIFETIMEBOUND [[_Clang::__lifetimebound__]]
#define _EZCXX_INLINE_VISIBILITY _EZCXX_HIDE_FROM_ABI

#endif // _EZCXX_CONFIG
9 changes: 9 additions & 0 deletions src/libcxx/include/ccomplex
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// -*- C++ -*-
#ifndef _EZCXX_CCOMPLEX
#define _EZCXX_CCOMPLEX

#include <complex>

#pragma clang system_header

#endif // _EZCXX_CCOMPLEX
Loading
Loading