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

Re: svn commit: r11783 - trunk/subversion/svnserve

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2004-11-09 20:29:13 CET

On Tue, 9 Nov 2004, Julian Foad wrote:
> > Julian Foad wrote:
> >
> >>>> apr_socket_listen(sock, 7);
> >>>> +
> >>>> + /* svn_cmdline_init() sets up the locale, but when we serve clients, we
> >>>> + always want the "C" locale. */
> >>>> + if (!setlocale (LC_ALL, "C"))
> >>>> + {
> >>>> + fprintf(stderr, "Can't set locale back to the \"C\" locale\n");
> >>
> >> Can that call actually fail?
> >
> > Any call can fail.
>
> If you mean to imply that, therefore, every call should be checked, then should
> not the above-quoted "apr_socket_listen" and "fprintf" be checked too?
>
> Can setlocale(LC_ALL, "C") realistically be anticipated to fail on systems that
> svnserve can run on, and does failure have such consequences that it is worth
> worrying about and checking for?
>
I haven't the ISO C standard available, but according to POSIX, "C" is not
allowed to fail for a conforming ISO C implementation. I'll remove the
check.

fprintf will be checked. I'm planning to internationalize svnserve output,
and would do that at the same time. I don't know why apr_socket_listen
isn't checked.

Thanks,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 9 20:19:06 2004

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.