public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>, Roland McGrath <roland@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Fix <bits/mathcalls.h> __BEGIN_NAMESPACE_C99/__END_NAMESPACE_C99 pairing
Date: Wed, 01 Feb 2006 15:25:00 -0000	[thread overview]
Message-ID: <20060201152453.GZ4625@sunsite.mff.cuni.cz> (raw)

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

             reply	other threads:[~2006-02-01 15:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-01 15:25 Jakub Jelinek [this message]
2006-02-01 15:29 ` Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060201152453.GZ4625@sunsite.mff.cuni.cz \
    --to=jakub@redhat.com \
    --cc=drepper@redhat.com \
    --cc=libc-hacker@sources.redhat.com \
    --cc=roland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).