1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

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.
This commit is contained in:
Florian Weimer
2016-10-22 17:33:26 +02:00
parent 7a8330c01b
commit e37208ce86
2 changed files with 8 additions and 2 deletions

View File

@ -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. */