Last Comment Bug 711073 - win widget nsFilePicker doesn't build with Vista sdk
: win widget nsFilePicker doesn't build with Vista sdk
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Widget: Win32 (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: mozilla11
Assigned To: Jim Mathies [:jimm]
:
: Jim Mathies [:jimm]
Mentors:
Depends on:
Blocks: 661991
  Show dependency treegraph
 
Reported: 2011-12-15 07:57 PST by Jim Mathies [:jimm]
Modified: 2011-12-20 06:07 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix (1.50 KB, patch)
2011-12-15 14:08 PST, Jim Mathies [:jimm]
no flags Details | Diff | Splinter Review
fix (1.46 KB, patch)
2011-12-19 07:50 PST, Jim Mathies [:jimm]
neil: review+
Details | Diff | Splinter Review

Description Jim Mathies [:jimm] 2011-12-15 07:57:31 PST
> The Vista stuff doesn't compile on the Vista SDK - ShObjIdl.h needs
> NTDDI_VERSION set to NTDDI_LONGHORN or better, but only MOZ_WINSDK_TARGETVER
> is set, so we try to compile against interfaces that haven't been defined...
> 
> Also the Vista SDK doesn't define FILEOPENDIALOGOPTIONS; newer SDKs typedef
> it as equivalent to DWORD.
Comment 1 Siddharth Agarwal [:sid0] (inactive) 2011-12-15 07:59:24 PST
Strange. As I pointed out to Neil on IRC, the _WIN32_WINNT at https://mxr.mozilla.org/mozilla-central/source/widget/src/windows/nsFilePicker.h#47 should get translated to NTDDI_VERSION. Maybe the Vista SDK does something wrong here?
Comment 2 Jim Mathies [:jimm] 2011-12-15 08:07:15 PST
Not sure, I'm setting up a vm with the old sdk and build tool to figure it out.
Comment 3 neil@parkwaycc.co.uk 2011-12-15 08:10:27 PST
Aha, it's because the Vista SDK doesn't define _WIN32_WINNT_VISTA, you need to use _WIN32_WINNT_LONGHORN which fixes that bit.
Comment 4 Jim Mathies [:jimm] 2011-12-15 08:15:32 PST
(In reply to neil@parkwaycc.co.uk from comment #3)
> Aha, it's because the Vista SDK doesn't define _WIN32_WINNT_VISTA, you need
> to use _WIN32_WINNT_LONGHORN which fixes that bit.

I don't have this setup to test yet, are you saying changing this line in the header:

#define _WIN32_WINNT _WIN32_WINNT_VISTA

to

#define _WIN32_WINNT _WIN32_WINNT_LONGHORN

will fix this bug?
Comment 5 Jim Mathies [:jimm] 2011-12-15 14:08:12 PST
Created attachment 582106 [details] [diff] [review]
fix

Fixup for vista sdk builds.
Comment 6 neil@parkwaycc.co.uk 2011-12-15 17:04:53 PST
Comment on attachment 582106 [details] [diff] [review]
fix

>+#ifndef FILEOPENDIALOGOPTIONS
>+typedef DWORD FILEOPENDIALOGOPTIONS;
>+#endif
Not sure what use this is because it's not a #define in the Windows 7 SDK.

>-#if _WIN32_WINNT < _WIN32_WINNT_VISTA
>+#if _WIN32_WINNT < _WIN32_WINNT_LONGHORN
> #define _WIN32_WINNT_bak _WIN32_WINNT
> #undef _WIN32_WINNT
>-#define _WIN32_WINNT _WIN32_WINNT_VISTA
>+#define _WIN32_WINNT _WIN32_WINNT_LONGHORN
This part works fine.
Comment 7 Jim Mathies [:jimm] 2011-12-19 07:50:39 PST
Created attachment 582826 [details] [diff] [review]
fix

My mistake. Updated patch.
Comment 9 Ed Morley [:emorley] 2011-12-20 06:07:16 PST
https://hg.mozilla.org/mozilla-central/rev/61fd84847d1d

Note You need to log in before you can comment on or make changes to this bug.