win widget nsFilePicker doesn't build with Vista sdk

RESOLVED FIXED in mozilla11

Status

()

Core
Widget: Win32
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jimm, Assigned: jimm)

Tracking

Trunk
mozilla11
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

fix
1.46 KB, patch
neil@parkwaycc.co.uk
: review+
Details | Diff | Splinter Review
(Assignee)

Description

5 years ago
> 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.
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?
(Assignee)

Comment 2

5 years ago
Not sure, I'm setting up a vm with the old sdk and build tool to figure it out.

Comment 3

5 years ago
Aha, it's because the Vista SDK doesn't define _WIN32_WINNT_VISTA, you need to use _WIN32_WINNT_LONGHORN which fixes that bit.
(Assignee)

Comment 4

5 years ago
(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?
(Assignee)

Comment 5

5 years ago
Created attachment 582106 [details] [diff] [review]
fix

Fixup for vista sdk builds.
Assignee: nobody → jmathies
Attachment #582106 - Flags: review?(neil)

Comment 6

5 years ago
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.
(Assignee)

Updated

5 years ago
Attachment #582106 - Flags: review?(neil)
(Assignee)

Comment 7

5 years ago
Created attachment 582826 [details] [diff] [review]
fix

My mistake. Updated patch.
Attachment #582106 - Attachment is obsolete: true
Attachment #582826 - Flags: review?(neil)
(Assignee)

Updated

5 years ago
Attachment #582826 - Attachment is patch: true

Updated

5 years ago
Attachment #582826 - Flags: review?(neil) → review+
(Assignee)

Comment 8

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/61fd84847d1d

Comment 9

5 years ago
https://hg.mozilla.org/mozilla-central/rev/61fd84847d1d
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in before you can comment on or make changes to this bug.