Created
September 21, 2013 09:26
-
-
Save pravic/6648872 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From de33fd77983d89cbf42c0710aec4b0ef2cff6a52 Mon Sep 17 00:00:00 2001 | |
From: pravic <ehysta@gmail.com> | |
Date: Sat, 21 Sep 2013 12:49:49 +0400 | |
Subject: [PATCH] fix long double for MSVC 12 (2013) | |
--- | |
dmd2/root/port.c | 8 +++++--- | |
vcbuild/strtold.c | 2 +- | |
2 files changed, 6 insertions(+), 4 deletions(-) | |
diff --git a/dmd2/root/port.c b/dmd2/root/port.c | |
index 4422809..a069a38 100644 | |
--- a/dmd2/root/port.c | |
+++ b/dmd2/root/port.c | |
@@ -349,14 +349,16 @@ int Port::stricmp(const char *s1, const char *s2) | |
} | |
// See vcbuild/strtold.c. | |
-longdouble strtold(const char *p, char **endp); | |
+longdouble vc_strtold(const char *p, char **endp); | |
longdouble Port::strtold(const char *p, char **endp) | |
{ | |
- return ::strtold(p, endp); | |
+ longdouble ld; | |
+ ld = ::strtold(p, endp); | |
+ return ld; | |
} | |
-#endif | |
+#endif // _MSC_VER | |
#if __MINGW32__ | |
diff --git a/vcbuild/strtold.c b/vcbuild/strtold.c | |
index bbe0188..8ccfd77 100644 | |
--- a/vcbuild/strtold.c | |
+++ b/vcbuild/strtold.c | |
@@ -136,7 +136,7 @@ static longdouble postab[] = | |
* Terminates on first unrecognized character. | |
*/ | |
-longdouble strtold(const char *p,char **endp) | |
+longdouble vc_strtold(const char *p, char **endp) | |
{ | |
longdouble ldval; | |
int exp; | |
-- | |
1.7.10.msysgit.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment