From 59fd8012a0c11462f2cb8d608fad7bfe544e6ed0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 17 Jul 2007 15:27:33 +0000 Subject: [PATCH] strtod is more portable than strtof apparently. Instead of making this conditional, just always use strtod. This is temporary code anyway. llvm-svn: 39972 --- clang/Lex/LiteralSupport.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/clang/Lex/LiteralSupport.cpp b/clang/Lex/LiteralSupport.cpp index cbd7207a0a17..cd2082a3cb7b 100644 --- a/clang/Lex/LiteralSupport.cpp +++ b/clang/Lex/LiteralSupport.cpp @@ -19,12 +19,6 @@ #include "clang/Basic/TargetInfo.h" #include "llvm/ADT/APInt.h" #include "llvm/ADT/StringExtras.h" -#include "llvm/Config/config.h" -#if HAVE_STRTOF -#else -# define strtof strtod -#endif - using namespace clang; /// HexDigitValue - Return the value of the specified hex digit, or -1 if it's @@ -423,7 +417,7 @@ float NumericLiteralParser::GetFloatValue() { char floatChars[256]; strncpy(floatChars, ThisTokBegin, ThisTokEnd-ThisTokBegin); floatChars[ThisTokEnd-ThisTokBegin] = '\0'; - return strtof(floatChars, 0); + return (float)strtod(floatChars, 0); } void NumericLiteralParser::Diag(SourceLocation Loc, unsigned DiagID,