Add a new header include into extensions/auth/nsAuthSSPI.h

RESOLVED FIXED

Status

()

Firefox
General
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Bo Yang, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

288 bytes, patch
Benjamin Smedberg
: review+
Details | Diff | Splinter Review
(Reporter)

Description

9 years ago
Created attachment 333373 [details] [diff] [review]
A trivial path

Without this header, there will be some undeclared types compile errors when compiling with Mingw. 

Could anybody tell, to whom I should ask review for this patch?
(Reporter)

Updated

9 years ago
Blocks: 450092

Comment 1

9 years ago
What types were undefined? This code isn't well-owned, so I can review this if necessary, but I'd like to see some MSDN docs about the functions or types in question.
(Reporter)

Comment 2

9 years ago
The errors are something like:

In file included from /home/byang/mingw-install/lib/gcc/i686-mingw32/4.3.0/../../../../i686-mingw32/include/security.h:38,
                 from /home/byang/mozilla-central/extensions/auth/nsAuthSSPI.h:48,
                 from /home/byang/mozilla-central/extensions/auth/nsAuthFactory.cpp:72:
/home/byang/mingw-install/lib/gcc/i686-mingw32/4.3.0/../../../../i686-mingw32/include/sspi.h:60: error: ‘UNICODE_STRING’ does
 not name a type
In file included from /home/byang/mingw-install/lib/gcc/i686-mingw32/4.3.0/../../../../i686-mingw32/include/security.h:39,
                 from /home/byang/mozilla-central/extensions/auth/nsAuthSSPI.h:48,
                 from /home/byang/mozilla-central/extensions/auth/nsAuthFactory.cpp:72:
/home/byang/mingw-install/lib/gcc/i686-mingw32/4.3.0/../../../../i686-mingw32/include/ntsecpkg.h:123: error: ‘SECURITY_STRING
’ does not name a type

In Mingw the UNICODE_STRING is defined in subauth.h, but in Windows SDK, it is not defined in that header, that is why only the mingw build incur this error. See  http://msdn.microsoft.com/en-us/library/aa492030.aspx, UNICODE_STRING is defined in ntdef.h. 
So, I revised the patch... 
(Reporter)

Comment 3

9 years ago
Created attachment 333493 [details] [diff] [review]
A second version
Attachment #333373 - Attachment is obsolete: true
Attachment #333493 - Flags: review?(benjamin)

Comment 4

9 years ago
According to MSDN, we should include ntsecapi.h... does that work in mingw?

http://msdn.microsoft.com/en-us/library/aa380518(VS.85).aspx
(Reporter)

Comment 5

9 years ago
(In reply to comment #4)
> According to MSDN, we should include ntsecapi.h... does that work in mingw?
> 
> http://msdn.microsoft.com/en-us/library/aa380518(VS.85).aspx

To my surprise, there is a UNICODE_STRING exactly the same in the both header files . I think I will file a bug for w32api for the redundant definition. 

Use the ntsecapi.h according MSDN. 
(Reporter)

Comment 6

9 years ago
Created attachment 333554 [details] [diff] [review]
Third version
Attachment #333554 - Flags: review?(benjamin)

Comment 7

9 years ago
Comment on attachment 333554 [details] [diff] [review]
Third version

Just include it unconditionally.
Attachment #333554 - Flags: review?(benjamin) → review-
(Reporter)

Comment 8

9 years ago
Created attachment 333556 [details] [diff] [review]
Forth version
Attachment #333493 - Attachment is obsolete: true
Attachment #333554 - Attachment is obsolete: true
Attachment #333556 - Flags: review?(benjamin)
Attachment #333493 - Flags: review?(benjamin)

Updated

9 years ago
Attachment #333556 - Flags: review?(benjamin) → review+

Comment 9

9 years ago
Pushed to mozilla-central, revision f40ef1c6180b
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.