From owner-freebsd-bugs Sun Jun 24 23:27:57 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 858C337B401; Sun, 24 Jun 2001 23:27:55 -0700 (PDT) (envelope-from roam@FreeBSD.org) Received: (from roam@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f5P6Rt591214; Sun, 24 Jun 2001 23:27:55 -0700 (PDT) (envelope-from roam) Date: Sun, 24 Jun 2001 23:27:55 -0700 (PDT) From: Message-Id: <200106250627.f5P6Rt591214@freefall.freebsd.org> To: veri2@bigfoot.com, roam@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: bin/28390: atof incorrect when stdlib.h not #include'd Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Synopsis: atof incorrect when stdlib.h not #include'd State-Changed-From-To: open->closed State-Changed-By: roam State-Changed-When: Sun Jun 24 23:24:50 PDT 2001 State-Changed-Why: Many, many functions depend on some header file or other to be included in order to function properly. This has been well-documented in both the C standard, and the respective manpages. In this particular case, atof(3) fails simply because if there is no prototype, the compiler assumes that the function returns int. You might explicitly declare atof() to return double, or, much better, you should include the appropriate header files. http://www.FreeBSD.org/cgi/query-pr.cgi?pr=28390 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message