public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix <bits/mathcalls.h> __BEGIN_NAMESPACE_C99/__END_NAMESPACE_C99 pairing
@ 2006-02-01 15:25 Jakub Jelinek
  2006-02-01 15:29 ` Jakub Jelinek
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2006-02-01 15:25 UTC (permalink / raw)
  To: Ulrich Drepper, Roland McGrath; +Cc: Glibc hackers

Hi!

In <bits/mathcalls.h>, __BEGIN_NAMESPACE_C99 is guarded with:
#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
condition while the corresponding __END_NAMESPACE_C99 with:
#ifdef __USE_ISOC99.  So, if in C++, _GLIBCPP_USE_NAMESPACES
is defined, either __USE_MISC or __USE_XOPEN_EXTENDED and not
__USE_ISOC99, we have unclosed namespace.
Additionally, it seems that currently scalb{,l,f} prototype is only
provided
#if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED) && defined __USE_ISOC99
while in revision 1.18 and older it was provided even if not
__USE_ISOC99 (after all, scalb{,l,f} is not in ISO C99).

2006-02-01  Jakub Jelinek  <jakub@redhat.com>

	* math/bits/mathcalls.h: Guard __END_NAMESPACE_C99 with the
	same #if condition as corresponding __BEGIN_NAMESPACE_C99.
	(scalb): Don't define only if __USE_ISOC99.

--- libc/math/bits/mathcalls.h.jj	2006-01-18 09:28:38.000000000 +0100
+++ libc/math/bits/mathcalls.h	2006-02-01 16:17:46.000000000 +0100
@@ -353,10 +353,13 @@ __MATHDECL_1 (int, __signbit,, (_Mdouble
 
 /* Multiply-add function computed as a ternary operation.  */
 __MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z));
+#endif /* Use ISO C99.  */
+
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
 __END_NAMESPACE_C99
+#endif
 
-# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
 /* Return X times (2 to the Nth power).  */
 __MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n));
-# endif
-#endif /* Use ISO C99.  */
+#endif

	Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-02-01 15:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-01 15:25 [PATCH] Fix <bits/mathcalls.h> __BEGIN_NAMESPACE_C99/__END_NAMESPACE_C99 pairing Jakub Jelinek
2006-02-01 15:29 ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).