diff --git a/buildall.bat b/buildall.bat index 15505010..99a07c83 100644 --- a/buildall.bat +++ b/buildall.bat @@ -7,11 +7,11 @@ set LLVM_INSTALL_DIR=c:\users\mmp\llvm-dev REM Both the LLVM binaries and python need to be in the path set path=%LLVM_INSTALL_DIR%\bin;%PATH%;c:\cygwin\bin -msbuild ispc.vcxproj /m:4 /V:m /p:Platform=Win32 /p:Configuration=Release +msbuild ispc.vcxproj /V:m /p:Platform=Win32 /p:Configuration=Release -msbuild examples\examples.sln /m:4 /V:m /p:Platform=x64 /p:Configuration=Release -msbuild examples\examples.sln /m:4 /V:m /p:Platform=x64 /p:Configuration=Debug -msbuild examples\examples.sln /m:4 /V:m /p:Platform=Win32 /p:Configuration=Release -msbuild examples\examples.sln /m:4 /V:m /p:Platform=Win32 /p:Configuration=Debug +msbuild examples\examples.sln /V:m /p:Platform=x64 /p:Configuration=Release /t:rebuild +msbuild examples\examples.sln /V:m /p:Platform=x64 /p:Configuration=Debug /t:rebuild +msbuild examples\examples.sln /V:m /p:Platform=Win32 /p:Configuration=Release /t:rebuild +msbuild examples\examples.sln /V:m /p:Platform=Win32 /p:Configuration=Debug /t:rebuild diff --git a/builtins-c.c b/builtins-c.c index 8dd6a4ea..30cbe106 100644 --- a/builtins-c.c +++ b/builtins-c.c @@ -57,6 +57,7 @@ #include #include +#include #include typedef int Bool; @@ -147,21 +148,21 @@ void __do_print(const char *format, const char *types, int width, int mask, int __num_cores() { #ifdef _MSC_VER - // This is quite a hack. Including all of windows.h to get this definition - // pulls in a bunch of stuff that leads to undefined symbols at link time. - // So we don't #include but instead have the equivalent declarations - // here. Presumably this struct declaration won't be changing in the future - // anyway... - struct SYSTEM_INFO { - int pad0[2]; - void *pad1[2]; - int *pad2; - int dwNumberOfProcessors; + // This is quite a hack. Including all of windows.h to get this definition + // pulls in a bunch of stuff that leads to undefined symbols at link time. + // So we don't #include but instead have the equivalent declarations + // here. Presumably this struct declaration won't be changing in the future + // anyway... + struct SYSTEM_INFO { + int pad0[2]; + void *pad1[2]; + int *pad2; + int dwNumberOfProcessors; int pad3[3]; - }; + }; struct SYSTEM_INFO sysInfo; - extern void __stdcall GetSystemInfo(struct SYSTEM_INFO *); + extern void __stdcall GetSystemInfo(struct SYSTEM_INFO *); GetSystemInfo(&sysInfo); return sysInfo.dwNumberOfProcessors; #else