From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31098 invoked by alias); 1 Feb 2006 15:25:08 -0000 Received: (qmail 31074 invoked by uid 22791); 1 Feb 2006 15:25:07 -0000 X-Spam-Check-By: sourceware.org Received: from sunsite.ms.mff.cuni.cz (HELO sunsite.mff.cuni.cz) (195.113.15.26) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 01 Feb 2006 15:25:05 +0000 Received: from sunsite.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.mff.cuni.cz (8.13.1/8.13.1) with ESMTP id k11FOsR1017152; Wed, 1 Feb 2006 16:24:54 +0100 Received: (from jj@localhost) by sunsite.mff.cuni.cz (8.13.1/8.13.1/Submit) id k11FOsJK017151; Wed, 1 Feb 2006 16:24:54 +0100 Date: Wed, 01 Feb 2006 15:25:00 -0000 From: Jakub Jelinek To: Ulrich Drepper , Roland McGrath Cc: Glibc hackers Subject: [PATCH] Fix __BEGIN_NAMESPACE_C99/__END_NAMESPACE_C99 pairing Message-ID: <20060201152453.GZ4625@sunsite.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00003.txt.bz2 Hi! In , __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 * 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