Skip to content

Commit

Permalink
unbreak build from JuliaLang#3078
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed May 15, 2013
1 parent a0d2b4d commit b35cf7b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,6 @@ Important Build Errata
----------------------

- Do not use GCC 4.6 or earlier

- LLVM doesn't build with the newly released 4.8 SEH gcc for 64-bit Windows because of an incorrect preprocessor definition. In deps/llvm-3.2/lib/ExecutionEngine/JIT/JIT.cpp, find the section that defines HAVE_EHTABLE_SUPPORT and replace it with an unconditional 0

8 changes: 4 additions & 4 deletions src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,12 @@ static BOOL WINAPI sigint_handler(DWORD wsig) //This needs winapi types to guara
fputs("error: GetThreadContext failed\n",stderr);
return 0;
}
#ifdef _CPU_X86_64_
#if defined(_CPU_X86_64_)
ctxThread.Rip = (DWORD64)&win_raise_exception;
ctxThread.Rcx = (DWORD64)jl_interrupt_exception;
ctxThread.Rsp &= (DWORD64)-16;
ctxThread.Rsp -= 8; //fix up the stack pointer -- this seems to be correct by observation
#elif _CPU_X86_
#elif defined(_CPU_X86_)
ctxThread.Eip = (DWORD)&win_raise_exception;
ctxThread.Ecx = (DWORD)jl_interrupt_exception;
ctxThread.Esp &= (DWORD)-16;
Expand All @@ -213,12 +213,12 @@ static LONG WINAPI exception_handler(struct _EXCEPTION_POINTERS *ExceptionInfo)
if (ExceptionInfo->ExceptionRecord->ExceptionFlags == 0) {
switch (ExceptionInfo->ExceptionRecord->ExceptionCode) {
case EXCEPTION_STACK_OVERFLOW:
#ifdef _CPU_X86_64_
#if defined(_CPU_X86_64_)
ExceptionInfo->ContextRecord->Rip = (DWORD64)&win_raise_exception;
ExceptionInfo->ContextRecord->Rcx = (DWORD64)jl_stackovf_exception;
ExceptionInfo->ContextRecord->Rsp &= (DWORD64)-16;
ExceptionInfo->ContextRecord->Rsp -= 8; //fix up the stack pointer -- this seems to be correct by observation
#elif _CPU_X86_
#elif defined(_CPU_X86_)
ExceptionInfo->ContextRecord->Eip = (DWORD)&win_raise_exception;
ExceptionInfo->ContextRecord->Ecx = (DWORD)jl_stackovf_exception;
ExceptionInfo->ContextRecord->Esp &= (DWORD)-16;
Expand Down
2 changes: 2 additions & 0 deletions src/os_detect.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#ifndef OS_DETECT_H
#define OS_DETECT_H
#include "support/platform.h"

/* This file uses is used by both Julia and C
After a major refactor, the C parts are now no longer necessary
Expand Down Expand Up @@ -60,6 +61,7 @@ XX(ISUNIX) - OS Traits
#define OS_CURRENT Darwin
#else
#define OS_CURRENT Unknown
#warning OS_CURRENT is Unknown
#endif

#ifndef JULIA
Expand Down

0 comments on commit b35cf7b

Please sign in to comment.