Skip to content

Commit

Permalink
intsafe workaround to separate header
Browse files Browse the repository at this point in the history
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: svn://svn.chromium.org/chrome/trunk/src@194506 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
scottmg@chromium.org committed Apr 17, 2013
1 parent c2ff5f3 commit 2a0e06e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 18 deletions.
27 changes: 27 additions & 0 deletions build/intsafe_workaround.h
Original file line number Diff line number Diff line change
@@ -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 <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

#endif // BUILD_INTSAFE_WORKAROUND_H_
19 changes: 1 addition & 18 deletions build/precompile.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,4 @@
#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
#include "build/intsafe_workaround.h"
2 changes: 2 additions & 0 deletions win8/delegate_execute/delegate_execute.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "build/intsafe_workaround.h"

#include <atlbase.h>
#include <atlcom.h>
#include <atlctl.h>
Expand Down

0 comments on commit 2a0e06e

Please sign in to comment.