Closed Bug 578540 Opened 10 years ago Closed 9 years ago

_HAS_TR1 macro redefinition warning spam when building with MSVC10

Categories

(Core :: IPC, defect, major)

x86
Windows 7
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla2.0b8

People

(Reporter: RyanVM, Assigned: RyanVM)

Details

(Whiteboard: [build_warning])

Attachments

(1 file)

In the IPC code, the following warning is spammed repeatedly:

c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\yvals.h(21) : warning C4005: '_HAS_TR1' : macro redefinition
        command-line arguments :  see previous definition of '_HAS_TR1'
_HAS_TR1=0 is definied in http://mxr.mozilla.org/mozilla1.9.2/source/ipc/chromium/chromium-config.mk#85

there is also a chromium bug about that (http://code.google.com/p/chromium/issues/detail?id=27238), saying that there is an issue with VS2010 in googletest.
Chris, any chance this can get any love? It makes it very hard to look for other warnings because this and bug 578546 are so overwhelmingly spammed to the console.
Sorry, was on PTO.  I think there was another bug on this; I remember it being discussed anyway.  The conclusion was that _HAS_TR1=0 isn't supported by VC10, so we should stop trying to build like that.  I won't be able to look at this until next week at the earliest.
OK, so yvals.h defines it to 1. Chromium sets it to 0 due to their issues with googletest that they're not in a hurry to fix. Do we care about those issues with the Chromium code we use?

If yes, seems that we should be using an ifdef/undef before the _HAS_TR1 define. (Conditional on MSC_VER as well?)
If no, we should just remove the define.

Let me know and I'll happily make the patch. The warning spam from this issue is ridiculous.
We don't care about googletest.  If things are clean in VS9 and VS10, let's just drop the _HAS_TR1 bit.
Builds fine with VC10 and removes the warning. I don't see any difference in browser behavior (IPC seems to be working OK).
Assignee: nobody → ryanvm
Status: NEW → ASSIGNED
Attachment #487792 - Flags: review?(jones.chris.g)
Attachment #487792 - Flags: review?(jones.chris.g) → review+
Attachment #487792 - Flags: approval2.0?
Passes try with only the usual random orange suspects. Who can a2.0+ this patch?
Attachment #487792 - Flags: approval2.0? → approval2.0+
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/e162ecf5bf4e
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
You need to log in before you can comment on or make changes to this bug.