Bug 841451 - Fix build problems in metro/commandexecutehandler [r=jimm]
authorMatt Brubeck <mbrubeck@mozilla.com>
Thu, 14 Feb 2013 11:50:40 -0800
changeset 131827 76d9e8da43f36d9da37a2c8d8fd0f3e324a593d3
parent 131826 2984ebe7f22235c83c967ccedbd916d1c56f4a58
child 131828 47c4a7768ed9d58403525ae783b482482bd182df
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs841451
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 841451 - Fix build problems in metro/commandexecutehandler [r=jimm]
browser/metro/shell/commandexecutehandler/CEHHelper.cpp
browser/metro/shell/commandexecutehandler/CEHHelper.h
browser/metro/shell/commandexecutehandler/CommandExecuteHandler.cpp
--- a/browser/metro/shell/commandexecutehandler/CEHHelper.cpp
+++ b/browser/metro/shell/commandexecutehandler/CEHHelper.cpp
@@ -1,15 +1,19 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "CEHHelper.h"
 
+#ifdef SHOW_CONSOLE
+#include <io.h> // _open_osfhandle
+#endif
+
 HANDLE sCon;
 LPCWSTR metroDX10Available = L"MetroD3DAvailable";
 
 typedef HRESULT (WINAPI*D3D10CreateDevice1Func)
   (IDXGIAdapter *, D3D10_DRIVER_TYPE, HMODULE, UINT,
    D3D10_FEATURE_LEVEL1, UINT, ID3D10Device1 **);
 typedef HRESULT(WINAPI*CreateDXGIFactory1Func)(REFIID , void **);
 
--- a/browser/metro/shell/commandexecutehandler/CEHHelper.h
+++ b/browser/metro/shell/commandexecutehandler/CEHHelper.h
@@ -16,14 +16,14 @@
 
 //#define SHOW_CONSOLE 1
 extern HANDLE sCon;
 extern LPCWSTR metroDX10Available;
 
 void Log(const wchar_t *fmt, ...);
 
 #if defined(SHOW_CONSOLE)
-static void SetupConsole();
+void SetupConsole();
 #endif
 
 bool IsDX10Available();
 bool GetDWORDRegKey(LPCWSTR name, DWORD &value);
 bool SetDWORDRegKey(LPCWSTR name, DWORD value);
--- a/browser/metro/shell/commandexecutehandler/CommandExecuteHandler.cpp
+++ b/browser/metro/shell/commandexecutehandler/CommandExecuteHandler.cpp
@@ -141,17 +141,17 @@ public:
     DWORD count = 0;
     aArray->GetCount(&count);
     if (!count) {
       return E_FAIL;
     }
 
 #ifdef SHOW_CONSOLE
     Log(L"SetSelection param count: %d", count);
-    for (int idx = 0; idx < count; idx++) {
+    for (DWORD idx = 0; idx < count; idx++) {
       IShellItem* item = NULL;
       if (SUCCEEDED(aArray->GetItemAt(idx, &item))) {
         LPWSTR str = NULL;
         if (FAILED(item->GetDisplayName(SIGDN_FILESYSPATH, &str))) {
           if (FAILED(item->GetDisplayName(SIGDN_URL, &str))) {
             Log(L"Failed to get a shell item array item.");
             item->Release();
             continue;