From 503f5c78c8c3a34be63e60443efa139c36797f5d Mon Sep 17 00:00:00 2001 From: kichik Date: Fri, 17 Mar 2006 12:01:17 +0000 Subject: [PATCH] moved _NSIS_NO_INT64_SHR test to SCons/Config/ms so it'll only be called once and not for each stub and because it's a better location being a vc specific problem git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4595 212acab6-be3b-0410-9dea-997c60f758d6 --- SCons/Config/ms | 26 +++++++++++++++++++++++++- Source/exehead/SConscript | 21 --------------------- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/SCons/Config/ms b/SCons/Config/ms index 2ee5cf63..6d87312b 100644 --- a/SCons/Config/ms +++ b/SCons/Config/ms @@ -116,6 +116,30 @@ cp_util_env = util_env.Copy() test_env = defenv.Copy() -# return +### weird compiler requirements + +# +# MSVC 6 SP6 doesn't like direct shifting of 64-bit integers. +# It generates a call to ___aullshr which requires libc, which +# we don't like. However, it does agree to work properly with +# a call to Int64ShrlMod32. +# + +conf = stub_env.Configure() + +int64test = """ +#include +int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam, int nCmdShow) { + ULARGE_INTEGER *i = 0; + return (int)(i->QuadPart >> 10); +} +""" + +if not conf.TryLink(int64test, '.c'): + stub_env.Append(CPPDEFINES = ['_NSIS_NO_INT64_SHR']) + +conf.Finish() + +### return Return('stub_env makensis_env plugin_env util_env cp_util_env test_env') diff --git a/Source/exehead/SConscript b/Source/exehead/SConscript index af869801..b004c790 100644 --- a/Source/exehead/SConscript +++ b/Source/exehead/SConscript @@ -48,27 +48,6 @@ libs = Split(""" Import('env compression solid_compression') -### Compiler specific configuration - -conf = env.Configure() - -int64test = """ -#include -int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam, int nCmdShow) { - ULARGE_INTEGER *i = 0; - return (int)(i->QuadPart >> 10); -} -""" - -if not conf.TryLink(int64test, '.c'): - # MSVC 6 SP6 doesn't like direct shifting of 64-bit integers. - # It generates a call to ___aullshr which requires libc, which - # we don't like. However, it does agree to work properly with - # a call to Int64ShrlMod32. - env.Append(CPPDEFINES = ['_NSIS_NO_INT64_SHR']) - -conf.Finish() - ### Defines env.Append(CPPDEFINES = ['EXEHEAD'])