Closed Bug 1120664 Opened 10 years ago Closed 10 years ago

pkix/Result.h has a duplicate token by a macro defined in windows.h

Categories

(Core :: Security: PSM, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: emk, Assigned: emk)

References

Details

Attachments

(2 files, 1 obsolete file)

Attached patch windows_h_testSplinter Review
Steps to reproduce: 1. Apply the attached patch. 2. Build the tree on Windows. Actual result: The following criptic message. 1:52.69 Unified_cpp_manager_ssl_src1.cpp 1:52.69 f:\m\mozilla-central\security\pkix\include\pkix/Result.h(187) : error C 2059: 構文エラー : '定数' 1:52.69 f:\m\mozilla-central\security\pkix\include\pkix/Result.h(187) : error C 3805: '定数': 予期しないトークン。'}' か ',' が必要です。 1:52.70 f:\m\mozilla-central\security\pkix\include\pkix/Input.h(89) : error C28 38: 'FATAL_ERROR_INVALID_ARGS' : メンバー宣言内の限定名が間違っています。 1:52.70 f:\m\mozilla-central\security\pkix\include\pkix/Input.h(89) : error C20 65: 'FATAL_ERROR_INVALID_ARGS' : 定義されていない識別子です。 1:52.70 f:\m\mozilla-central\security\pkix\include\pkix/Input.h(163) : error C2 838: 'FATAL_ERROR_INVALID_ARGS' : メンバー宣言内の限定名が間違っています。 1:52.70 f:\m\mozilla-central\security\pkix\include\pkix/Input.h(163) : error C2 065: 'FATAL_ERROR_INVALID_ARGS' : 定義されていない識別子です。 1:52.70 f:\m\mozilla-central\security\pkix\include\pkix/Input.h(302) : error C2 838: 'FATAL_ERROR_INVALID_ARGS' : メンバー宣言内の限定名が間違っています。 1:52.70 f:\m\mozilla-central\security\pkix\include\pkix/Input.h(302) : error C2 065: 'FATAL_ERROR_INVALID_ARGS' : 定義されていない識別子です。 1:52.70 f:\m\mozilla-central\security\pkix\include\pkix/Input.h(313) : error C2 838: 'FATAL_ERROR_INVALID_ARGS' : メンバー宣言内の限定名が間違っています。 1:52.71 f:\m\mozilla-central\security\pkix\include\pkix/Input.h(313) : error C2 065: 'FATAL_ERROR_INVALID_ARGS' : 定義されていない識別子です。 1:52.71 f:\m\mozilla-central\security\pkix\include\pkix/Time.h(79) : error C283 8: 'FATAL_ERROR_INVALID_ARGS' : メンバー宣言内の限定名が間違っています。 1:52.71 f:\m\mozilla-central\security\pkix\include\pkix/Time.h(79) : error C206 5: 'FATAL_ERROR_INVALID_ARGS' : 定義されていない識別子です。 1:52.71 f:\m\mozilla-central\security\pkix\include\pkix/Time.h(88) : error C283 8: 'FATAL_ERROR_INVALID_ARGS' : メンバー宣言内の限定名が間違っています。 1:52.71 f:\m\mozilla-central\security\pkix\include\pkix/Time.h(88) : error C206 5: 'FATAL_ERROR_INVALID_ARGS' : 定義されていない識別子です。 Expected result: The tree should build. By adding A.cpp onto security/manager/ssl/src, nsKeygenHandlerContent.cpp will move from Unified_cpp_manager_ssl_src0.cpp to Unified_cpp_manager_ssl_src1.cpp. nsKeygenHandlerContent.cpp will end up with including windows.h. windows.h will #define ERROR_INVALID_KEY macro, which will prevent to compile pkix/Result.h.
Attached patch windows_h_must_die (obsolete) — Splinter Review
Undefine ERROR_INVALID_KEY before using MOZILLA_PKIX_MAP_LIST.
Attachment #8547793 - Flags: review?(dkeeler)
Blocks: 1120942
Comment on attachment 8547793 [details] [diff] [review] windows_h_must_die I think Brian would be a better reviewer of this. In particular, I imagine we don't want to unconditionally undefine ERROR_INVALID_TIME, but I don't know what a sound approach would be.
Attachment #8547793 - Flags: review?(dkeeler) → review?(brian)
Comment on attachment 8547793 [details] [diff] [review] windows_h_must_die Review of attachment 8547793 [details] [diff] [review]: ----------------------------------------------------------------- How about we just rename mozilla::pkix's ERROR_INVALID_TIME to ERROR_INVALID_TIME_DER or ERROR_INVALID_DER_TIME? Then we can avoid the mess. I think that would be better.
Attachment #8547793 - Flags: review?(brian) → review-
OK. Renamed to ERROR_INVALID_DER_TIME.
Attachment #8547793 - Attachment is obsolete: true
Attachment #8548985 - Flags: review?(brian)
Attachment #8548985 - Flags: review?(brian) → review+
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Flags: in-testsuite-
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: