Issue Details (XML | Word | Printable)

Key: STDCXX-436
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Travis Vitek
Reporter: Mark Brown
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

[Linux] MB_LEN_MAX incorrect

Created: 05/Jun/07 04:23 AM   Updated: 16/Sep/07 06:52 PM
Return to search
Component/s: 18. Language Support
Affects Version/s: 4.1.3
Fix Version/s: 4.2.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works 18.limits.stdcxx-436.cpp 2007-09-16 06:52 PM Travis Vitek 2 kB
Text File Licensed for inclusion in ASF works LIMITS.cpp.patch 2007-09-14 01:08 AM Travis Vitek 0.7 kB
Text File Licensed for inclusion in ASF works stdcxx-436.patch 2007-09-08 01:26 AM Travis Vitek 0.7 kB
Environment: gcc version 4.1.1 20070105 (Red Hat 4.1.1-51)

Resolved: 08/Sep/07 08:58 PM
Resolution Date: 15/Sep/07 09:06 PM


 Description  « Hide
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 <assert.h>
#include <limits.h>

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



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.