On 2013-11-18 5:41 PM, Ehsan Akhgari wrote:

I wouldn't go all the way to that extreme.  The list of broken system
headers is unfortunately quite large, and we already have lots of this
pattern in the tree:

#ifdef MyFunction
// screw you, windows.h/X.h/etc.
#undef MyFunction
#endif

A small note about this pattern: the #ifdef wrapper is unnecessary, i.e. it is safe to write only

  // screw you, X.h
  #undef MyFunction

because #undef is specified to be a silent NOP when applied to an identifier with no macro definition.

I am uneasy with the entire UNIFIED_SOURCES concept; I worry that it will lead to symbol-visibility problems down the road, when A.cpp defines things that aren't meant to be accessible elsewhere, B.cpp (which comes after it in the relevant unification block) starts using them, and nobody notices until decoupling them has become a major refactoring job.

But I'm not so uneasy that I'm going to get in the way of faster builds. :-)

zw
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to