projects
/
platform
/
upstream
/
libHarfBuzzSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b90fb83
)
src/hb-common.cc: Fix build on older Visual Studio
author
Chun-wei Fan
<fanchunwei@src.gnome.org>
Fri, 24 Feb 2017 09:58:25 +0000
(17:58 +0800)
committer
Khaled Hosny
<khaledhosny@eglug.org>
Wed, 22 Mar 2017 21:03:49 +0000
(23:03 +0200)
Visual Studio only supported strtof() from Visual Studio 2013 onwards, so
use strtod() instead to do the operation, which should do the same thing,
sans going to a double, not a float.
src/hb-common.cc
patch
|
blob
|
history
diff --git
a/src/hb-common.cc
b/src/hb-common.cc
index
64e77d4
..
4c1a9a8
100644
(file)
--- a/
src/hb-common.cc
+++ b/
src/hb-common.cc
@@
-667,7
+667,11
@@
parse_float (const char **pp, const char *end, float *pv)
float v;
errno = 0;
+#if defined (_MSC_VER) && (_MSC_VER < 1800)
+ v = strtod (p, &pend);
+#else
v = strtof (p, &pend);
+#endif
if (errno || p == pend)
return false;