This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.24-285-ge37208c
- From: fw at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 22 Oct 2016 15:33:37 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.24-285-ge37208c
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via e37208ce86916af9510ffb9ce7b3c187986f07de (commit)
from 7a8330c01bea0cb98654ca25e3ca5db7d48694b3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e37208ce86916af9510ffb9ce7b3c187986f07de
commit e37208ce86916af9510ffb9ce7b3c187986f07de
Author: Florian Weimer <fweimer@redhat.com>
Date: Sat Oct 22 17:33:26 2016 +0200
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.
diff --git a/ChangeLog b/ChangeLog
index e41c3e7..2520c44 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-10-22 Florian Weimer <fweimer@redhat.com>
+
+ * math/math.h [__cplusplus] (iszero): Wrap C++ bits in extern
+ "C++", to override a potential extern "C" directive around the
+ header file inclusion.
+
2016-10-21 Joseph Myers <joseph@codesourcery.com>
* benchtests/Makefile (CFLAGS-bench-sqrt.c): New variable.
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. */
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
math/math.h | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
hooks/post-receive
--
GNU C Library master sources