Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jun 2001 17:41:48 -0700 (PDT)
From:      Tom Garcia <veri2@bigfoot.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/28390: atof incorrect when stdlib.h not #include'd
Message-ID:  <200106250041.f5P0fmR30692@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         28390
>Category:       bin
>Synopsis:       atof incorrect when stdlib.h not #include'd
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 24 17:50:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Tom Garcia
>Release:        4.3-STABLE
>Organization:
HiveMindSystems
>Environment:
FreeBSD queen.nursery.hivemind.org 4.3-STABLE FreeBSD 4.3-STABLE #7: Sun May 20
09:38:10 BST 2001     root@queen.nursery.hivemind.org:/usr/obj/usr/src/sys/QUEEN
  i386     
>Description:
atof returns random odd numbers when stdlib.h not #include'd, otherwise seems to work fine.
>How-To-Repeat:
/* note stdlib.h is not being included */
int main()
{
  printf("%g\n", atof("3.95"));
}

>Fix:
#include <stdlib.h>
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106250041.f5P0fmR30692>