Skip to content

Commit

Permalink
workaround for building with express toolchain on windows
Browse files Browse the repository at this point in the history
intsafe.h and stdint.h both define INT8_MIN et al. with no guards,
and so can't both be included. Because dependencies do this deep
in their internals, avoid this problem by including intsafe.h,
and then #undef'ing the conflicts in precompile.h (which is included
in all .cc files). intsafe.h's include guard symbol stays defined
so that any subsequent inclusions do not cause problems.

R=thestig@chromium.org
BUG=225822


Review URL: https://chromiumcodereview.appspot.com/13484002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192341 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
scottmg@chromium.org committed Apr 4, 2013
1 parent c587e03 commit df76449
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions build/precompile.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,22 @@
#include <string>
#include <utility>
#include <vector>

// Workaround for:
// http://connect.microsoft.com/VisualStudio/feedback/details/621653/
// http://crbug.com/225822
// Note that we can't actually include <stdint.h> here because there's other
// code in third_party that has partial versions of stdint types that conflict.
#include <intsafe.h>
#undef INT8_MIN
#undef INT16_MIN
#undef INT32_MIN
#undef INT64_MIN
#undef INT8_MAX
#undef UINT8_MAX
#undef INT16_MAX
#undef UINT16_MAX
#undef INT32_MAX
#undef UINT32_MAX
#undef INT64_MAX
#undef UINT64_MAX

0 comments on commit df76449

Please sign in to comment.