You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2013/05/16 23:57:57 UTC

[38/47] git commit: TS-1899 strtod() does not honor Hex strings on Solaris.

TS-1899 strtod() does not honor Hex strings on Solaris.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/c3adcceb
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/c3adcceb
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/c3adcceb

Branch: refs/heads/sphinx-docs
Commit: c3adccebc45d804c9ac62f8b7cc94ecbb6c4bdbb
Parents: 8142bc4
Author: Leif Hedstrom <zw...@apache.org>
Authored: Wed May 15 14:05:00 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Wed May 15 14:05:00 2013 -0600

----------------------------------------------------------------------
 CHANGES                                   |    2 ++
 plugins/experimental/esi/lib/Expression.h |    5 +++++
 2 files changed, 7 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c3adcceb/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 43a1d14..cf42d0d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
   Changes with Apache Traffic Server 3.3.3
 
 
+  *) [TS-1899] strtod() does not honor Hex strings on Solaris.
+
   *) [TS-1894] madvise() not found on Solaris. And some cleanup.
 
   *) [TS-1765] Make jtest build more like the rest of the code.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c3adcceb/plugins/experimental/esi/lib/Expression.h
----------------------------------------------------------------------
diff --git a/plugins/experimental/esi/lib/Expression.h b/plugins/experimental/esi/lib/Expression.h
index 63f43f9..694ab4b 100644
--- a/plugins/experimental/esi/lib/Expression.h
+++ b/plugins/experimental/esi/lib/Expression.h
@@ -93,7 +93,12 @@ private:
     if (str_size) {
       char *endp;
       const char *str_ptr = str.c_str();
+      // Solaris is messed up, in that strtod() does not honor C99/SUSv3 mode.
+#if defined(solaris)
+      value = strtold(str_ptr, &endp);
+#else
       value = strtod(str_ptr, &endp);
+#endif
       return (static_cast<unsigned int>(endp - str_ptr) == str_size);
     }
     return false;