Your message dated Wed, 02 Jan 2008 22:23:42 +0100
with message-id <[EMAIL PROTECTED]>
and subject line Bug#458749: strtod("INFINITY", &e) under tr_TR locale.
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: libc6
Version: 2.3.6.ds1-13etch2

I found that strtod doesn't accept "INFINITY" under tr_TR
locale.

% cat strtod.c
#include <stdio.h>
#include <ctype.h>
#include <locale.h>
#include <stdlib.h>
#include <errno.h>

int main(int argc, char **argv)
{
  int i;
  double ret;
  char *e = NULL;

  setlocale(LC_ALL, "");

  errno = 0;
  ret = strtod(argv[1], &e);
  if (errno != 0) { perror("strtol"); }
  printf("%.18f [%s]\n", ret, e);
  return 0;
}
% gcc strtod.c               
% LANG=tr_TR ./a.out INFINITY
0,000000000000000000 [INFINITY]

It returns 0.0 and the string is not converted.

% LANG=C ./a.out INFINITY
inf []

It returns inf consumes "INFINITY" under C locale.

It is caused by Turkish case conversion rule.

strtod(3) has a description about the case of INFINITY as follows.

|        An infinity is either ``INF'' or ``INFINITY'', disregarding case.

I think it is not intentional to reject "INFINITY" under
tr_TR locale.

% dpkg -l|grep libc6
ii  libc6                            2.3.6.ds1-13etch2                        
GNU C Library: Shared libraries
ii  libc6-dev                        2.3.6.ds1-13etch2                        
GNU C Library: Development Libraries and Hea
ii  libc6-i686                       2.3.6.ds1-13etch2                        
GNU C Library: Shared libraries [i686 optimi
-- 
Tanaka Akira



--- End Message ---
--- Begin Message ---
On Wed, Jan 02, 2008 at 03:53:38PM +0000, Tanaka Akira wrote:
> Package: libc6
> Version: 2.3.6.ds1-13etch2
> 
> I found that strtod doesn't accept "INFINITY" under tr_TR
> locale.

  because if I'm correct, I isn't the uppercase of 'i' under tr_TR
locale, and strtod is locale-dependant.

-- 
·O·  Pierre Habouzit
··O                                                [EMAIL PROTECTED]
OOO                                                http://www.madism.org

Attachment: pgpbEqzHDyZwx.pgp
Description: PGP signature


--- End Message ---

Reply via email to