Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpp/src/arrow/memory_pool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ namespace {
// (as of May 2016 64 bytes)
Status AllocateAligned(int64_t size, uint8_t** out) {
// TODO(emkornfield) find something compatible with windows
#ifdef _MSC_VER
// Special code path for MSVC
#ifdef _WIN32
// Special code path for Windows
*out =
reinterpret_cast<uint8_t*>(_aligned_malloc(static_cast<size_t>(size), kAlignment));
if (!*out) {
Expand Down
6 changes: 3 additions & 3 deletions cpp/src/arrow/util/io-util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Status FileTell(int fd, int64_t* pos) {

Status CreatePipe(int fd[2]) {
int ret;
#if defined(_MSC_VER)
#if defined(_WIN32)
ret = _pipe(fd, 4096, _O_BINARY);
#else
ret = pipe(fd);
Expand Down Expand Up @@ -379,7 +379,7 @@ Status FileGetSize(int fd, int64_t* size) {
//

static inline int64_t pread_compat(int fd, void* buf, int64_t nbytes, int64_t pos) {
#if defined(_MSC_VER)
#if defined(_WIN32)
HANDLE handle = reinterpret_cast<HANDLE>(_get_osfhandle(fd));
DWORD dwBytesRead = 0;
OVERLAPPED overlapped = {0};
Expand Down Expand Up @@ -496,7 +496,7 @@ Status FileWrite(int fd, const uint8_t* buffer, const int64_t nbytes) {
Status FileTruncate(int fd, const int64_t size) {
int ret, errno_actual;

#ifdef _MSC_VER
#ifdef _WIN32
errno_actual = _chsize_s(fd, static_cast<size_t>(size));
ret = errno_actual == 0 ? 0 : -1;
#else
Expand Down