forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
undefine StrCat from StrCatW after including windows headers that redefine it Add preprocessor checks StrCat is not defined to something else. Add presubmit check headers that include shlwapi.h that redefines StrCat are wrapped Bug: chromium:856536, chromium:817738 Change-Id: Ief9303cbf6fa4f55f671861e49fb1fc747ed59aa Reviewed-on: https://chromium-review.googlesource.com/1117180 Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Dirk Pranke <dpranke@chromium.org> Reviewed-by: Bruce Dawson <brucedawson@chromium.org> Commit-Queue: Danil Chapovalov <danilchap@chromium.org> Cr-Commit-Position: refs/heads/master@{#582449}
- Loading branch information
Danil Chapovalov
authored and
Commit Bot
committed
Aug 11, 2018
1 parent
856d335
commit 3518f36
Showing
60 changed files
with
234 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2018 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 BASE_WIN_ATL_H_ | ||
#define BASE_WIN_ATL_H_ | ||
|
||
// Check no prior poisonous defines were made. | ||
#include "base/win/windows_defines.inc" | ||
// Undefine before windows header will make the poisonous defines | ||
#include "base/win/windows_undefines.inc" | ||
|
||
#ifndef _ATL_NO_EXCEPTIONS | ||
#define _ATL_NO_EXCEPTIONS | ||
#endif | ||
|
||
#include <atlbase.h> | ||
#include <atlcom.h> | ||
#include <atlctl.h> | ||
#include <atlhost.h> | ||
#include <atlsecurity.h> | ||
#include <atlwin.h> | ||
|
||
// Undefine the poisonous defines | ||
#include "base/win/windows_undefines.inc" | ||
// Check no poisonous defines follow this include | ||
#include "base/win/windows_defines.inc" | ||
|
||
#endif // BASE_WIN_ATL_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2018 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 BASE_WIN_PROPVARUTIL_H_ | ||
#define BASE_WIN_PROPVARUTIL_H_ | ||
|
||
// Check no prior poisonous defines were made. | ||
#include "base/win/windows_defines.inc" | ||
// Undefine before windows header will make the poisonous defines | ||
#include "base/win/windows_undefines.inc" | ||
|
||
#include <propvarutil.h> | ||
|
||
// Undefine the poisonous defines | ||
#include "base/win/windows_undefines.inc" | ||
// Check no poisonous defines follow this include | ||
#include "base/win/windows_defines.inc" | ||
|
||
#endif // BASE_WIN_PROPVARUTIL_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2018 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 BASE_WIN_SHLWAPI_H_ | ||
#define BASE_WIN_SHLWAPI_H_ | ||
|
||
// Check no prior poisonous defines were made. | ||
#include "base/win/windows_defines.inc" | ||
// Undefine before windows header will make the poisonous defines | ||
#include "base/win/windows_undefines.inc" | ||
|
||
#include <shlwapi.h> | ||
|
||
// Undefine the poisonous defines | ||
#include "base/win/windows_undefines.inc" | ||
// Check no poisonous defines follow this include | ||
#include "base/win/windows_defines.inc" | ||
|
||
#endif // BASE_WIN_SHLWAPI_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2018 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 BASE_WIN_SPHELPER_H_ | ||
#define BASE_WIN_SPHELPER_H_ | ||
|
||
// Check no prior poisonous defines were made. | ||
#include "base/win/windows_defines.inc" | ||
// Undefine before windows header will make the poisonous defines | ||
#include "base/win/windows_undefines.inc" | ||
|
||
#include <sphelper.h> | ||
|
||
// Undefine the poisonous defines | ||
#include "base/win/windows_undefines.inc" | ||
// Check no poisonous defines follow this include | ||
#include "base/win/windows_defines.inc" | ||
|
||
#endif // BASE_WIN_SPHELPER_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright 2018 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. | ||
|
||
// This file verifies no poisonous defines from windows headers are present. | ||
// If you add more macros here, add them to windows_undefines.inc too | ||
|
||
// This will generate an error if it was defined to something different, or | ||
// if it is defined to something different after. | ||
// Preprocessor will also nicely point to header that defined it differently. | ||
#define StrCat StrCat | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Copyright 2018 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. | ||
|
||
// This file undefines poisonous defines from windows headers. | ||
// If you add more macros here, add them to windows_defines.inc too | ||
|
||
#undef StrCat | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.