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 d2d65ff..abc825b 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 cf79d53..0c32823 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 7d3bfc1..0e72f87 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 868ca13..5a0322c 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>