Fixes for GCC 4.4. Thanks John for this patch!
author <shinichiro.hamaji@gmail.com> <>
Tue, 10 Mar 2009 02:15:40 +0000 (02:15 +0000)
committer <shinichiro.hamaji@gmail.com> <>
Tue, 10 Mar 2009 02:15:40 +0000 (02:15 +0000)
git-svn-id: https://google-glog.googlecode.com/svn/trunk@41 eb4d4688-79bd-11dd-afb4-1d65580434c0

src/googletest.h
src/logging_unittest.cc
src/symbolize.cc
src/utilities.cc

index d2d65ff7c5b422b1ab4b8c0a08cbeb4ef2f651ff..abc825b06189a4627e0a675c30dd1204ed6de87b 100644 (file)
@@ -46,6 +46,9 @@
 #include <string>
 #include <vector>
 
+#include <stdio.h>
+#include <stdlib.h>
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index cf79d533b284086ee357bc6bc39a4a3350dbf083..0c32823b3d0f887e4e879b9c0f7546f6a67b5691 100644 (file)
@@ -48,6 +48,9 @@
 #include <string>
 #include <vector>
 
+#include <stdio.h>
+#include <stdlib.h>
+
 #include "base/commandlineflags.h"
 #include "glog/logging.h"
 #include "glog/raw_logging.h"
index 7d3bfc14f12b9bcdaa6d4c7789c0fba714868426..0e72f878c34ecb5ef1be62f0b42d776e0d13d64c 100644 (file)
@@ -441,8 +441,7 @@ class LineReader {
   void operator=(const LineReader&);
 
   char *FindLineFeed() {
-    return reinterpret_cast<char *>
-      (memchr(reinterpret_cast<const void *>(bol_), '\n', eod_ - bol_));
+    return reinterpret_cast<char *>(memchr(bol_, '\n', eod_ - bol_));
   }
 
   bool BufferIsEmpty() {
@@ -456,7 +455,7 @@ class LineReader {
   const int fd_;
   char * const buf_;
   const int buf_len_;
-  const char *bol_;
+  char *bol_;
   char *eol_;
   const char *eod_;  // End of data in "buf_".
 };
index 868ca133be27ece4100252411ae0f2118f18ee4d..5a0322c5a2ae6b783b925ff9a1bcb49a90b41e05 100644 (file)
@@ -31,6 +31,9 @@
 
 #include "utilities.h"
 
+#include <stdio.h>
+#include <stdlib.h>
+
 #include <signal.h>
 #ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>