aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2015-04-28 16:01:15 -0700
committerGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2015-04-28 16:01:15 -0700
commitf394616fbcbc13373883a0b521a0b0690ad817fd (patch)
tree72a5b31be972ef9ca8644abb68310ece4bc7295d /src
parent29c4d0a42d553fd73d8b1e9f11d15e9cf700c8b4 (diff)
parentd9a0f24098436cd1d917c592ca27f376a4abd6e0 (diff)
Merge pull request #1370 from zeliard/master
add Windows x64 (WIN64) mode and make buildable for the VS project file
Diffstat (limited to 'src')
-rw-r--r--src/core/support/alloc.c2
-rw-r--r--src/core/support/time_win32.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/support/alloc.c b/src/core/support/alloc.c
index a19a0141d4..d2ed82e771 100644
--- a/src/core/support/alloc.c
+++ b/src/core/support/alloc.c
@@ -55,7 +55,7 @@ void *gpr_realloc(void *p, size_t size) {
}
void *gpr_malloc_aligned(size_t size, size_t alignment_log) {
- size_t alignment = 1 << alignment_log;
+ size_t alignment = ((size_t)1) << alignment_log;
size_t extra = alignment - 1 + sizeof(void *);
void *p = gpr_malloc(size + extra);
void **ret = (void **)(((gpr_uintptr)p + extra) & ~(alignment - 1));
diff --git a/src/core/support/time_win32.c b/src/core/support/time_win32.c
index 539470bccf..f4443b5c2d 100644
--- a/src/core/support/time_win32.c
+++ b/src/core/support/time_win32.c
@@ -64,7 +64,7 @@ void gpr_sleep_until(gpr_timespec until) {
}
delta = gpr_time_sub(until, now);
- sleep_millis = delta.tv_sec * GPR_MS_PER_SEC + delta.tv_nsec / GPR_NS_PER_MS;
+ sleep_millis = (DWORD)delta.tv_sec * GPR_MS_PER_SEC + delta.tv_nsec / GPR_NS_PER_MS;
Sleep(sleep_millis);
}
}