From stdcxx-dev-return-4834-apmail-incubator-stdcxx-dev-archive=incubator.apache.org@incubator.apache.org Sat Sep 08 01:27:52 2007 Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 77678 invoked from network); 8 Sep 2007 01:27:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Sep 2007 01:27:51 -0000 Received: (qmail 38324 invoked by uid 500); 8 Sep 2007 01:27:46 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 38306 invoked by uid 500); 8 Sep 2007 01:27:46 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 38295 invoked by uid 99); 8 Sep 2007 01:27:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Sep 2007 18:27:46 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Sep 2007 01:27:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 32179714209 for ; Fri, 7 Sep 2007 18:27:31 -0700 (PDT) Message-ID: <2436109.1189214851202.JavaMail.jira@brutus> Date: Fri, 7 Sep 2007 18:27:31 -0700 (PDT) From: "Travis Vitek (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Updated: (STDCXX-436) [Linux] MB_LEN_MAX incorrect In-Reply-To: <17423181.1181017500089.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Travis Vitek updated STDCXX-436: -------------------------------- Attachment: stdcxx-436.patch Yes, I agree that it sounds like a bug when gcc include_next includes a file that has already been included. It looks like that include_next mechanism is a big kludge that has infected the system headers because there is a bunch of stink in /usr/include/limits.h related to it. Here is an updated patch. I've tested it on linux/gcc and it still works. I guess if I were being picky I'd move this block inside the block that includes _RWSTD_ANSI_C_LIMITS_H, but I'm happy with it the way that it is if you are. > [Linux] MB_LEN_MAX incorrect > ---------------------------- > > Key: STDCXX-436 > URL: https://issues.apache.org/jira/browse/STDCXX-436 > Project: C++ Standard Library > Issue Type: Bug > Components: 18. Language Support > Affects Versions: 4.1.3 > Environment: gcc version 4.1.1 20070105 (Red Hat 4.1.1-51) > Reporter: Mark Brown > Assignee: Travis Vitek > Priority: Critical > Fix For: 4.2 > > Attachments: stdcxx-436.patch > > > On my Linux system MB_LEN_MAX is normally defined to 16 but when I use the macro in a program compiled with stdcxx the macro evaluates to 1. The test case goes like this: > $ cat test.cpp && make CPPOPTS="-DGETCONF_MB_LEN_MAX=`getconf MB_LEN_MAX`" test && ./test > #include > #include > int main () > { > assert (MB_LEN_MAX == GETCONF_MB_LEN_MAX); > } > gcc -c -I/home/mbrown/stdcxx/include/ansi -D_RWSTDDEBUG -I/home/mbrown/stdcxx/include -I/home/mbrown/stdcxx-gcc-4.1.1-11s/include -I/home/mbrown/stdcxx/examples/include -DGETCONF_MB_LEN_MAX=16 -pedantic -nostdinc++ -g -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align test.cpp > gcc u.o -o u -L/home/mbrown/stdcxx-gcc-4.1.1-11s/lib -lstd11s -lsupc++ -lm > test: test.cpp:6: int main(): Assertion `1 == 16' failed. > Aborted -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.