Closed
Bug 834505
Opened 11 years ago
Closed 5 years ago
Wrap WinBase.h in something that #undefs GetCurrentTime macro
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox71 fixed)
RESOLVED
FIXED
mozilla71
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: mikeh, Assigned: karlt)
References
Details
Attachments
(1 file)
This macro conflict with MediaStream::GetCurrentTime() is extremely painful when you hit it, and it doesn't help that the MSVC compiler generates less-than-useful error messages about where exactly the problem is occurring. This is done almost everywhere anyway: http://mxr.mozilla.org/mozilla-central/ident?i=GetCurrentTime&filter=
Comment 1•8 years ago
|
||
I tried to create a winbase.h in our source tree which is basically like: #ifndef MOZILLA_WINBASE_H #define MOZILLA_WINBASE_H #include_next <winbase.h> #undef GetCurrentTime #endif //MOZILLA_WINBASE_H However, MSVC doesn't support include_next...
Comment 2•6 years ago
|
||
I was hit by this on mingw build. We can do similar way what we did for 'None' defined in X11/X.h.
See Also: → 1288686
Updated•6 years ago
|
Product: Core → Firefox Build System
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
GetCurrentTime is declared in WinBase.h
https://github.com/tpn/winsdk-10/blob/master/Include/10.0.10240.0/um/WinBase.h#L91
Documentation for functions declared in winbase.h instruct to include
Windows.h. e.g.
https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-copyfile
Other macro declarations in winbase.h such as CopyFile() are already adjusted
with this wrapper via windows-h-unicode.decls.h
A similar, but different, static inline could be provided but is not required.
Assignee | ||
Comment 4•5 years ago
|
||
Pushed by ktomlinson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/40b7ff3abf52 undef GetCurrentTime() from windows-h-wrapper.template.h r=glandium
Comment 6•5 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox71:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in
before you can comment on or make changes to this bug.
Description
•