This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] Fix *scanf and *strto*


>>>>> Jakub Jelinek writes:

 > Hi!
 > This patch fixes a few bugs I found in scanf, strtol and the unused
 > indigits*.h headers. Included is a testcase as well.

 > BTW: Can we have some testing foo_FOO locale which will have multiple
 > characters long indigits and thousand separators?
It shouldn't be a problem to add a locale to localedata/tests.

 > Also, in the I18N fix I assumed (because indigits.h seem to do that) that
 > if a number starts with a digit from script N, then all the remaining digits
 > in the number must be from the same script. Is that good assumption?
 > Otherwise I'd have to slightly modify __vfscanf.

[...]
 > --- libc/stdio-common/tst-sscanf.c.jj	Thu Jul 27 16:05:03 2000
 > +++ libc/stdio-common/tst-sscanf.c	Thu Jul 27 16:33:39 2000
 > @@ -0,0 +1,114 @@

 >  > +  tst_locale = 1;
 > +  if (tst_locale)
 > +    if (setlocale(LC_ALL, "en_US") == NULL)
You should add a file stdio-common/Depend that contains "localedata" -
and then add in the Makefile:
tst-sscanf-ENV=$(common-objpfx)localedata

Upps, libio and posix also need a dependency on localedata, I'll send
a separate patch.

Otherwise en_US will not exist - and better use en_US.ANSI_X3.4-1968
(aka ASCII) or en_US.ISO-8859-1.

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]