Use numeric_limits instead of SSIZE_MAX.
author <shinichiro.hamaji@gmail.com> <>
Wed, 11 Nov 2009 09:06:51 +0000 (09:06 +0000)
committer <shinichiro.hamaji@gmail.com> <>
Wed, 11 Nov 2009 09:06:51 +0000 (09:06 +0000)
It seems a version of arm-linux-gcc doesn't have this symbol.
http://code.google.com/p/google-glog/issues/detail?id=18

git-svn-id: https://google-glog.googlecode.com/svn/trunk@73 eb4d4688-79bd-11dd-afb4-1d65580434c0

src/symbolize.cc

index 0e72f87..3465de6 100644 (file)
@@ -50,6 +50,8 @@
 
 #if defined(HAVE_SYMBOLIZE)
 
+#include <limits>
+
 #include "symbolize.h"
 #include "demangle.h"
 
@@ -121,7 +123,7 @@ _START_GOOGLE_NAMESPACE_
 // success, return the number of bytes read.  Otherwise, return -1.
 static ssize_t ReadPersistent(const int fd, void *buf, const size_t count) {
   SAFE_ASSERT(fd >= 0);
-  SAFE_ASSERT(count >= 0 && count <= SSIZE_MAX);
+  SAFE_ASSERT(count >= 0 && count <= std::numeric_limits<ssize_t>::max());
   char *buf0 = reinterpret_cast<char *>(buf);
   ssize_t num_bytes = 0;
   while (num_bytes < count) {