[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#286659: marked as done (libc6-dev: strtof does not work, strtod works)



Your message dated Fri, 24 Dec 2004 10:39:28 +0900
with message-id <81y8foscdr.wl@omega.webmasters.gr.jp>
and subject line Bug#286659: libc6-dev: strtof does not work, strtod works
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)

--------------------------------------
Received: (at submit) by bugs.debian.org; 21 Dec 2004 10:53:30 +0000
>From igor@to.infn.it Tue Dec 21 02:53:30 2004
Return-path: <igor@to.infn.it>
Received: from fw2.nbi.dk (MobilIgor.to.infn.it) [130.225.212.198] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Cghdy-000528-00; Tue, 21 Dec 2004 02:53:30 -0800
Received: from igor by MobilIgor.to.infn.it with local (Exim 3.36 #1 (Debian))
	id 1Cghdv-0000iO-00; Tue, 21 Dec 2004 11:53:27 +0100
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Igor Pesando <ipesando@to.infn.it>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libc6-dev: strtof does not work, strtod works
X-Mailer: reportbug 3.4
Date: Tue, 21 Dec 2004 11:53:27 +0100
Message-Id: <[🔎] E1Cghdv-0000iO-00@MobilIgor.to.infn.it>
Sender: Igor Pesando <igor@to.infn.it>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Package: libc6-dev
Version: 2.3.2.ds1-19
Severity: normal



-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (800, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.24
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libc6-dev depends on:
ii  libc6                2.3.2.ds1-19        GNU C Library: Shared libraries an
ii  linux-kernel-headers 2.5.999-test7-bk-17 Linux Kernel Headers for developme

-- no debconf information

Try to run

#include <stdio.h>

#include <stdlib.h>


/**********************************************************************/

int main(){
 float S0;
 double S1;
 char *s="12.3";
 char *endp;

  S0=strtof(s,&endp);
  if( s == endp ) {
  printf("NO conversion\n");
  }
  printf("S0=%f\n",(double) S0);

  S1=strtod(s,&endp);
  if( s == endp ) {
    printf("NO conversion\n");
  }
  printf("S1=%f\n",S1);

  return 0;
  }


  the output is
  S0=4508877.000000
  S1=12.300000

---------------------------------------
Received: (at 286659-done) by bugs.debian.org; 24 Dec 2004 01:39:34 +0000
>From gotom@debian.or.jp Thu Dec 23 17:39:34 2004
Return-path: <gotom@debian.or.jp>
Received: from omega.webmasters.gr.jp (webmasters.gr.jp) [218.44.239.78] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CheQY-0007eR-00; Thu, 23 Dec 2004 17:39:34 -0800
Received: from omega.webmasters.gr.jp (localhost [127.0.0.1])
	by webmasters.gr.jp (Postfix) with ESMTP
	id 3AD57DEB58; Fri, 24 Dec 2004 10:39:33 +0900 (JST)
Date: Fri, 24 Dec 2004 10:39:28 +0900
Message-ID: <81y8foscdr.wl@omega.webmasters.gr.jp>
From: GOTO Masanori <gotom@debian.or.jp>
To: "Adam D. Barratt" <debian-bts@adam-barratt.org.uk>,
	286659-done@bugs.debian.org
Cc: "Igor Pesando" <ipesando@to.infn.it>
Subject: Re: Bug#286659: libc6-dev: strtof does not work, strtod works
In-Reply-To: <[🔎] 0b4201c4e757$3e4e8200$eb00010a@andromeda>
References: <[🔎] E1Cghdv-0000iO-00@MobilIgor.to.infn.it>
	<[🔎] 0b4201c4e757$3e4e8200$eb00010a@andromeda>
User-Agent: Wanderlust/2.9.9 (Unchained Melody) SEMI/1.14.3 (Ushinoya)
 FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 Emacs/21.2
 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI)
MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya")
Content-Type: text/plain; charset=US-ASCII
Delivered-To: 286659-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

At Tue, 21 Dec 2004 12:18:56 -0000,
Adam D. Barratt <debian-bts@adam-barratt.org.uk> wrote:
> On Tuesday, December 21, 2004 10:53 AM, Igor Pesando <ipesando@to.infn.it>
> wrote:
> 
> strtof() works fine, you've just missed a key note at the foot of strtof(3):
> 
> CONFORMING TO
>        ANSI C describes strtod, C99 describes the other two functions.
> 
> By default, gcc will use `gnu89' (ISO C90 plus some GNU extensions) as the
> standard to compile against (see gcc(1)). Those extensions *don't* include
> strtof() or strtold().
>
> Compiling the provided sample with saner flags should have highlighted the
> fact that there was an issue:
> 
> adam@kaa:~$ gcc -Wall -o 286659 286659.c
> 286659.c: In function `main':
> 286659.c:14: warning: implicit declaration of function `strtof'
> 
> At this point, examining stdlib.h will show that the definition of strtof is
> wrapped in a `#ifdef  __USE_ISOC99'. So...
> 
> adam@kaa:~$ gcc -Wall -std=c99 -o 286659 286659.c
> adam@kaa:~$ ./286659
> S0=12.300000
> S1=12.300000
> 
> IMHO, this bug should be closed as due to user error.

It's nice explanation and examples.  I close this bug.

Regards,
-- gotom



Reply to: