Re: broken locale in 7.0.2 without multibyte support (FreeBSD 4.1-RELEASE) ?
От | Peter Eisentraut |
---|---|
Тема | Re: broken locale in 7.0.2 without multibyte support (FreeBSD 4.1-RELEASE) ? |
Дата | |
Msg-id | Pine.LNX.4.21.0009171248450.576-100000@peter обсуждение исходный текст |
Ответ на | Re: broken locale in 7.0.2 without multibyte support (FreeBSD 4.1-RELEASE) ? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: broken locale in 7.0.2 without multibyte support (FreeBSD 4.1-RELEASE) ?
|
Список | pgsql-hackers |
Tom Lane writes: > - if (isascii((unsigned char)lower_text[i]) && isupper(lower_text[i])) > + if (isascii((int)lower_text[i]) && isupper((int) lower_text[i])) > Peter, I suppose what you were trying to clean up is a "char used as > array subscript" kind of warning? Yep. > I would like to think that your compiler will not complain about > if (isascii((unsigned char)lower_text[i]) ... > If it does we'd have to write something as ugly as > if (isascii((int)(unsigned char)lower_text[i]) ... > which I can see no value in from a portability standpoint. I think that the problem might rather be that lower_text (and various other arrays) are not declared as unsigned char in the first place. That would also explain why -funsigned-chars fixes it. Because calling toupper() etc. with a signed char argument is in violation of the spec. (Hmm, template/aix contains this: CFLAGS='-qchars=signed ...'. That can't be good.) -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
В списке pgsql-hackers по дате отправления: