NL_TEXTMAX == INT_MAX?

H . J . Lu hjl@lucon.org
Tue May 16 17:24:00 GMT 2000


In glibc 2.1.3, we have

/* Maximum number of bytes in a message.  We have no limit.  */
#define NL_TEXTMAX      INT_MAX 

in <bits/xopen_lim.h>. I don't think it makes any senses. A program
I am working on has

	char msg [NL_TEXTMAX];

You can guess what happens. On Solaris 2.7/ia32, it is defined as 2048. 
If glibc does support long messages, 4096k should be more than enough.
I'd like to see a more reasonable number.


H.J.


More information about the Libc-hacker mailing list