Bug 1602317 - More reliably workaround some silly windows.h defines. r=nical

I couldn't get some Windows sandbox code to build with the other patch in this
bug.

Differential Revision: https://phabricator.services.mozilla.com/D56343

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emilio Cobos Álvarez 2019-12-09 12:14:16 +00:00
Родитель 2e8025d163
Коммит 1dc32f9c0f
2 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -91,8 +91,14 @@ void apz_sample_transforms(mozilla::wr::WrWindowId aWindowId,
void apz_deregister_sampler(mozilla::wr::WrWindowId aWindowId);
} // extern "C"
// Work-around wingdi.h define which conflcits with WR color constant
#pragma push_macro("TRANSPARENT")
#undef TRANSPARENT
#include "webrender_ffi_generated.h"
#pragma pop_macro("TRANSPARENT")
// More functions invoked from Rust code. These are down here because they
// refer to data structures from webrender_ffi_generated.h
extern "C" {

Просмотреть файл

@ -6,8 +6,13 @@ header = """/* This Source Code Form is subject to the terms of the Mozilla Publ
#pragma GCC diagnostic push
#ifdef __clang__
# pragma GCC diagnostic ignored "-Wreturn-type-c-linkage"
#endif"""
#endif
// Work-around silly windows.h define.
#pragma push_macro("STRICT")
#undef STRICT
"""
trailer = """
#pragma pop_macro("STRICT")
#pragma GCC diagnostic pop
#include "mozilla/ServoStyleConstsInlines.h"
"""