From 3a02bcfc04b3464e736c2fb349818f87afeb4f2a Mon Sep 17 00:00:00 2001 From: "sgjesse@google.com" Date: Thu, 19 Jan 2012 13:37:26 +0000 Subject: [PATCH] Add additional include guard in platform specific .h files R=ager@google.com BUG= TEST= Review URL: https://chromiumcodereview.appspot.com//9264006 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3433 260f80e4-7a28-3924-810f-c04153c831b5 --- runtime/bin/eventhandler_linux.h | 4 ++++ runtime/bin/eventhandler_macos.h | 6 +++++- runtime/bin/eventhandler_win.h | 6 +++++- runtime/bin/thread_pool_linux.h | 4 ++++ runtime/bin/thread_pool_macos.h | 4 ++++ runtime/bin/thread_pool_win.h | 4 ++++ runtime/platform/thread_linux.h | 4 ++++ runtime/platform/thread_macos.h | 4 ++++ runtime/platform/thread_win.h | 4 ++++ 9 files changed, 38 insertions(+), 2 deletions(-) diff --git a/runtime/bin/eventhandler_linux.h b/runtime/bin/eventhandler_linux.h index 763b48e9725..010a33dbf44 100644 --- a/runtime/bin/eventhandler_linux.h +++ b/runtime/bin/eventhandler_linux.h @@ -5,6 +5,10 @@ #ifndef BIN_EVENTHANDLER_LINUX_H_ #define BIN_EVENTHANDLER_LINUX_H_ +#if !defined(BIN_EVENTHANDLER_H_) +#error Do not include eventhandler_linux.h directly; use eventhandler.h instead. +#endif + #include #include diff --git a/runtime/bin/eventhandler_macos.h b/runtime/bin/eventhandler_macos.h index babb3257094..902aa5e0dc6 100644 --- a/runtime/bin/eventhandler_macos.h +++ b/runtime/bin/eventhandler_macos.h @@ -1,10 +1,14 @@ -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #ifndef BIN_EVENTHANDLER_MACOS_H_ #define BIN_EVENTHANDLER_MACOS_H_ +#if !defined(BIN_EVENTHANDLER_H_) +#error Do not include eventhandler_macos.h directly; use eventhandler.h instead. +#endif + #include #include diff --git a/runtime/bin/eventhandler_win.h b/runtime/bin/eventhandler_win.h index 9843093216f..cfc0d8c1426 100644 --- a/runtime/bin/eventhandler_win.h +++ b/runtime/bin/eventhandler_win.h @@ -1,10 +1,14 @@ -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #ifndef BIN_EVENTHANDLER_WIN_H_ #define BIN_EVENTHANDLER_WIN_H_ +#if !defined(BIN_EVENTHANDLER_H_) +#error Do not include eventhandler_win.h directly; use eventhandler.h instead. +#endif + #include #include diff --git a/runtime/bin/thread_pool_linux.h b/runtime/bin/thread_pool_linux.h index 704722bbc5c..84211975803 100644 --- a/runtime/bin/thread_pool_linux.h +++ b/runtime/bin/thread_pool_linux.h @@ -5,6 +5,10 @@ #ifndef BIN_THREAD_POOL_LINUX_H_ #define BIN_THREAD_POOL_LINUX_H_ +#if !defined(BIN_THREAD_POOL_H_) +#error Do not include thread_pool_linux.h directly; use thread_pool.h instead. +#endif + #include #include "platform/globals.h" diff --git a/runtime/bin/thread_pool_macos.h b/runtime/bin/thread_pool_macos.h index d29b6f8b1dc..b24a73e3283 100644 --- a/runtime/bin/thread_pool_macos.h +++ b/runtime/bin/thread_pool_macos.h @@ -5,6 +5,10 @@ #ifndef BIN_THREAD_POOL_MACOS_H_ #define BIN_THREAD_POOL_MACOS_H_ +#if !defined(BIN_THREAD_POOL_H_) +#error Do not include thread_pool_macos.h directly; use thread_pool.h instead. +#endif + #include #include "platform/globals.h" diff --git a/runtime/bin/thread_pool_win.h b/runtime/bin/thread_pool_win.h index 74482cc7686..5a6f450aca2 100644 --- a/runtime/bin/thread_pool_win.h +++ b/runtime/bin/thread_pool_win.h @@ -5,6 +5,10 @@ #ifndef BIN_THREAD_POOL_WIN_H_ #define BIN_THREAD_POOL_WIN_H_ +#if !defined(BIN_THREAD_POOL_H_) +#error Do not include thread_pool_win.h directly; use thread_pool.h instead. +#endif + #include "platform/globals.h" class ThreadPoolData { diff --git a/runtime/platform/thread_linux.h b/runtime/platform/thread_linux.h index 4681f30da40..7e15e5e2838 100644 --- a/runtime/platform/thread_linux.h +++ b/runtime/platform/thread_linux.h @@ -5,6 +5,10 @@ #ifndef PLATFORM_THREAD_LINUX_H_ #define PLATFORM_THREAD_LINUX_H_ +#if !defined(PLATFORM_THREAD_H_) +#error Do not include thread_linux.h directly; use thread.h instead. +#endif + #include #include "platform/assert.h" diff --git a/runtime/platform/thread_macos.h b/runtime/platform/thread_macos.h index baf5a9c292c..a836dc31aa4 100644 --- a/runtime/platform/thread_macos.h +++ b/runtime/platform/thread_macos.h @@ -5,6 +5,10 @@ #ifndef PLATFORM_THREAD_MACOS_H_ #define PLATFORM_THREAD_MACOS_H_ +#if !defined(PLATFORM_THREAD_H_) +#error Do not include thread_macos.h directly; use thread.h instead. +#endif + #include #include "platform/globals.h" diff --git a/runtime/platform/thread_win.h b/runtime/platform/thread_win.h index 1c49aed6aed..45235f19143 100644 --- a/runtime/platform/thread_win.h +++ b/runtime/platform/thread_win.h @@ -5,6 +5,10 @@ #ifndef PLATFORM_THREAD_WIN_H_ #define PLATFORM_THREAD_WIN_H_ +#if !defined(PLATFORM_THREAD_H_) +#error Do not include thread_win.h directly; use thread.h instead. +#endif + #include "platform/globals.h" namespace dart {