From ec9bc6068de002f14a0232f015e0dc2ad50cde37 Mon Sep 17 00:00:00 2001 From: "scottmg@chromium.org" Date: Wed, 17 Apr 2013 01:13:21 +0000 Subject: [PATCH] intsafe workaround to separate header Allows workaround to work without precompiled headers (as in buildtype=Official) R=cpu@chromium.org BUG=225822 Review URL: https://codereview.chromium.org/14201003 git-svn-id: http://src.chromium.org/svn/trunk/src/build@194506 4ff67af0-8c30-449e-8e8b-ad334ec8d88c --- intsafe_workaround.h | 27 +++++++++++++++++++++++++++ precompile.h | 19 +------------------ 2 files changed, 28 insertions(+), 18 deletions(-) create mode 100644 intsafe_workaround.h diff --git a/intsafe_workaround.h b/intsafe_workaround.h new file mode 100644 index 000000000..8d459cbe3 --- /dev/null +++ b/intsafe_workaround.h @@ -0,0 +1,27 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef BUILD_INTSAFE_WORKAROUND_H_ +#define BUILD_INTSAFE_WORKAROUND_H_ + +// Workaround for: +// http://connect.microsoft.com/VisualStudio/feedback/details/621653/ +// http://crbug.com/225822 +// Note that we can't actually include here because there's other +// code in third_party that has partial versions of stdint types that conflict. +#include +#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 + +#endif // BUILD_INTSAFE_WORKAROUND_H_ diff --git a/precompile.h b/precompile.h index 9f82f88a5..2209fec25 100644 --- a/precompile.h +++ b/precompile.h @@ -107,21 +107,4 @@ #include #include -// Workaround for: -// http://connect.microsoft.com/VisualStudio/feedback/details/621653/ -// http://crbug.com/225822 -// Note that we can't actually include here because there's other -// code in third_party that has partial versions of stdint types that conflict. -#include -#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 +#include "build/intsafe_workaround.h"