Skip to content

Commit

Permalink
Fixes for the latest MSVS.
Browse files Browse the repository at this point in the history
- ssize_t
Since Windows does not have ssize_t, we need to include BaseTsd.h and
use SSIZE_t instead.

- include algorithm
MSVS 2013 requests developers to include algorithm when they use
std::min.

By yyanagisawa



git-svn-id: https://google-glog.googlecode.com/svn/trunk@143 eb4d4688-79bd-11dd-afb4-1d65580434c0
  • Loading branch information
shinh committed Aug 19, 2014
1 parent 176f11c commit 3d6a193
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/logging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

#include "utilities.h"

#include <algorithm>
#include <assert.h>
#include <iomanip>
#include <string>
Expand Down Expand Up @@ -180,6 +181,10 @@ GLOG_DEFINE_string(log_backtrace_at, "",
#define PATH_SEPARATOR '/'

#ifndef HAVE_PREAD
#if defined(OS_WINDOWS)
#include <BaseTsd.h>
#define ssize_t SSIZE_T
#endif
static ssize_t pread(int fd, void* buf, size_t count, off_t offset) {
off_t orig_offset = lseek(fd, 0, SEEK_CUR);
if (orig_offset == (off_t)-1)
Expand Down

0 comments on commit 3d6a193

Please sign in to comment.