From 906725b13af68cadd3acf57d2216ab91e02bd827 Mon Sep 17 00:00:00 2001 From: Simon Marchetto Date: Tue, 20 Aug 2013 19:26:44 +0200 Subject: [PATCH 1/1] * Bug #12852 fixed - Visual Studio 2012 SDK configuration is incorrect. Change-Id: I5f1dcaf5d8a24b1062f4cc2b82629f7ba368648f --- scilab/CHANGES_5.5.X | 2 ++ .../macros/windows/dlwSetEnvCommonVc11.sci | 4 +-- .../tests/nonreg_tests/bug_12852.dia.ref | 31 ++++++++++++++++++ .../dynamic_link/tests/nonreg_tests/bug_12852.tst | 34 ++++++++++++++++++++ 4 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 scilab/modules/dynamic_link/tests/nonreg_tests/bug_12852.dia.ref create mode 100644 scilab/modules/dynamic_link/tests/nonreg_tests/bug_12852.tst diff --git a/scilab/CHANGES_5.5.X b/scilab/CHANGES_5.5.X index 2a3b911..fc80c38 100644 --- a/scilab/CHANGES_5.5.X +++ b/scilab/CHANGES_5.5.X @@ -552,3 +552,5 @@ Bug fixes * Bug #12840 fixed - Fix typo in number_properties.xml. +* Bug #12852 fixed - Visual Studio 2012 SDK configuration is incorrect. + diff --git a/scilab/modules/dynamic_link/macros/windows/dlwSetEnvCommonVc11.sci b/scilab/modules/dynamic_link/macros/windows/dlwSetEnvCommonVc11.sci index 2052d12..8fccb21 100644 --- a/scilab/modules/dynamic_link/macros/windows/dlwSetEnvCommonVc11.sci +++ b/scilab/modules/dynamic_link/macros/windows/dlwSetEnvCommonVc11.sci @@ -175,8 +175,8 @@ function newINCLUDE = getNewINCLUDEx64(INCLUDE, msvsPath, sdkPath, bIsExpress) newINCLUDE = newINCLUDE + .. sdkPath + "\include" + pathsep() + INCLUDE + .. - getenv("PROGRAMFILES") + "\Windows Kits\8.0\Include\um;" + .. - getenv("PROGRAMFILES") + "\Windows Kits\8.0\Include\shared;"; + getenv("PROGRAMFILES(X86)") + "\Windows Kits\8.0\Include\um;" + .. + getenv("PROGRAMFILES(X86)") + "\Windows Kits\8.0\Include\shared;"; endfunction //============================================================================= diff --git a/scilab/modules/dynamic_link/tests/nonreg_tests/bug_12852.dia.ref b/scilab/modules/dynamic_link/tests/nonreg_tests/bug_12852.dia.ref new file mode 100644 index 0000000..442e4c8 --- /dev/null +++ b/scilab/modules/dynamic_link/tests/nonreg_tests/bug_12852.dia.ref @@ -0,0 +1,31 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Simon MARCHETTO +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +// +// <-- WINDOWS ONLY --> +// +// <-- Non-regression test for bug 12852 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=12852 +// +// <-- Short Description --> +// Visual Studio 2012 SDK configuration is incorrect. +curPath = pwd(); +cd TMPDIR; +src = ['#include ' + 'int create_directory(char* path)' + '{' + ' return CreateDirectory(path, NULL);'; + '}']; +srcfile = 'test_windows_sdk.c'; +mputl(src, srcfile); +libn = ilib_for_link('test_windows_sdk', srcfile, [], "c"); +assert_checktrue(libn <> 0); +exec('cleaner.sce'); +cd(curPath); diff --git a/scilab/modules/dynamic_link/tests/nonreg_tests/bug_12852.tst b/scilab/modules/dynamic_link/tests/nonreg_tests/bug_12852.tst new file mode 100644 index 0000000..f9e8c04 --- /dev/null +++ b/scilab/modules/dynamic_link/tests/nonreg_tests/bug_12852.tst @@ -0,0 +1,34 @@ +// ============================================================================= +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2013 - Scilab Enterprises - Simon MARCHETTO +// +// This file is distributed under the same license as the Scilab package. +// ============================================================================= +// +// <-- CLI SHELL MODE --> +// +// <-- WINDOWS ONLY --> +// +// <-- Non-regression test for bug 12852 --> +// +// <-- Bugzilla URL --> +// http://bugzilla.scilab.org/show_bug.cgi?id=12852 +// +// <-- Short Description --> +// Visual Studio 2012 SDK configuration is incorrect. + +curPath = pwd(); +cd TMPDIR; +src = ['#include ' + 'int create_directory(char* path)' + '{' + ' return CreateDirectory(path, NULL);'; + '}']; +srcfile = 'test_windows_sdk.c'; +mputl(src, srcfile); + +libn = ilib_for_link('test_windows_sdk', srcfile, [], "c"); +assert_checktrue(libn <> 0); + +exec('cleaner.sce'); +cd(curPath); -- 1.7.9.5