[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: rev 6291 - trunk/subversion/libsvn_subr

From: Branko Čibej <brane_at_xbc.nu>
Date: 2003-06-19 23:35:21 CEST

Philip Martin wrote:

>Branko ÄŒibej <brane@xbc.nu> writes:
>
>
>
>>philip@tigris.org wrote:
>>
>>
>>
>>>Author: philip
>>>Date: Wed Jun 18 15:23:23 2003
>>>New Revision: 6291
>>>
>>>Modified:
>>> trunk/subversion/libsvn_subr/cmdline.c
>>>Log:
>>>* subversion/libsvn_subr/cmdline.c (svn_cmdline_init): Produce a more
>>> verbose error message when setting the locale fails.
>>>
>>>
>>>
>>I'd just like to point out that this change is very Unix-specific (and
>>not ISO-C compliant, btw). Windows doesn't define any of these
>>environment variables. Of course, the chance that the setlocale call
>>would fail on Windows is fairly remote.
>>
>>
>
>Which bit is "non ISO-C compliant"? The word "compliant" doesn't
>occur in the standard. Did you mean that some part of the code has
>undefined, unspecified or implementation defined behaviour (I don't
>think it is any of those), or simply that ISO-C doesn't mention the
>environment variables.
>
The last, of course. IIRC those env variables are defined by POSIX, but
are not required by ISO C.

>I don't mind reverting this patch if you feel it is inappropriate.
>
No no, I didn't mean to imply that the patch should be reverted. As I
said, the chances that this particular call to setlocale() will fail on
Windows are remote, so the code that checks the variables won't be executed.

>I wrote it because I thought I had seen this problem before, but now I
>recall that the earlier case was not this problem, but a "failure
>during string recoding" message from utf.c:convert_to_stringbuf. That
>error message is particularly opaque, and doesn't really allow the
>user to identify which string failed to convert.
>
>
I agree with the spirit of your change. If setlocale does fail on
Windows, the resulting error message will be a bit strange, but I can
live with that.

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jun 19 23:36:59 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.