diff options
author | Florian Weimer <fweimer@redhat.com> | 2016-10-22 17:33:26 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2016-10-22 17:33:26 +0200 |
commit | e37208ce86916af9510ffb9ce7b3c187986f07de (patch) | |
tree | 123e9b737d4d4db7659fd97b42b932c4591a7a61 /math/math.h | |
parent | 7a8330c01bea0cb98654ca25e3ca5db7d48694b3 (diff) | |
download | glibc-e37208ce86916af9510ffb9ce7b3c187986f07de.zip glibc-e37208ce86916af9510ffb9ce7b3c187986f07de.tar.gz glibc-e37208ce86916af9510ffb9ce7b3c187986f07de.tar.bz2 |
math.h: Wrap C++ bits in extern "C++"
It is still common to include system header files in an extern "C"
block. This means that exiting <math.h>'s own extern "C" block
is not sufficient to get back to C++ mode. Use an extern "C++"
wrapper instead.
Diffstat (limited to 'math/math.h')
-rw-r--r-- | math/math.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/math/math.h b/math/math.h index 0220d08..7c0c709 100644 --- a/math/math.h +++ b/math/math.h @@ -342,7 +342,7 @@ enum # define iszero(x) (((__typeof (x)) (x)) == 0) # endif # else /* __cplusplus */ -__END_DECLS +extern "C++" { template <class __T> inline bool iszero (__T __val) { @@ -352,7 +352,7 @@ iszero (__T __val) return __val == 0; # endif } -__BEGIN_DECLS +} /* extern C++ */ # endif /* __cplusplus */ #endif /* Use IEC_60559_BFP_EXT. */ |