From 54c72aaccc45edf4832cfdc5053d9ae6acc9bcdf Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 23 Mar 2016 15:04:52 -0700 Subject: [PATCH] Fix header guards. I've been meaning to do this for a while, and it came up on the bug below that there have been conflicts with similar-named files in , so let's rule out one possible explanation. Bug: http://b/27804373 Change-Id: I69e5d52b6260c573c308513420aee0e281426bd4 --- base/include/android-base/errors.h | 6 +++--- base/include/android-base/file.h | 6 +++--- base/include/android-base/logging.h | 7 ++++--- base/include/android-base/macros.h | 6 +++--- base/include/android-base/memory.h | 6 +++--- base/include/android-base/parseint.h | 6 +++--- base/include/android-base/parsenetaddress.h | 6 +++--- base/include/android-base/stringprintf.h | 6 +++--- base/include/android-base/strings.h | 6 +++--- base/include/android-base/test_utils.h | 6 +++--- base/include/android-base/thread_annotations.h | 6 +++--- base/include/android-base/unique_fd.h | 2 +- base/include/android-base/utf8.h | 6 +++--- 13 files changed, 38 insertions(+), 37 deletions(-) diff --git a/base/include/android-base/errors.h b/base/include/android-base/errors.h index ca621fa8b..04c299c86 100644 --- a/base/include/android-base/errors.h +++ b/base/include/android-base/errors.h @@ -27,8 +27,8 @@ // special handling to get the error string. Refer to Microsoft documentation // to determine which error code to check for each function. -#ifndef BASE_ERRORS_H -#define BASE_ERRORS_H +#ifndef ANDROID_BASE_ERRORS_H +#define ANDROID_BASE_ERRORS_H #include @@ -43,4 +43,4 @@ std::string SystemErrorCodeToString(int error_code); } // namespace base } // namespace android -#endif // BASE_ERRORS_H +#endif // ANDROID_BASE_ERRORS_H diff --git a/base/include/android-base/file.h b/base/include/android-base/file.h index 5342d9878..aa18ea796 100644 --- a/base/include/android-base/file.h +++ b/base/include/android-base/file.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef BASE_FILE_H -#define BASE_FILE_H +#ifndef ANDROID_BASE_FILE_H +#define ANDROID_BASE_FILE_H #include #include @@ -46,4 +46,4 @@ bool RemoveFileIfExists(const std::string& path, std::string* err = nullptr); } // namespace base } // namespace android -#endif // BASE_FILE_H +#endif // ANDROID_BASE_FILE_H diff --git a/base/include/android-base/logging.h b/base/include/android-base/logging.h index 41fe4b32b..b86c232eb 100644 --- a/base/include/android-base/logging.h +++ b/base/include/android-base/logging.h @@ -13,8 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef BASE_LOGGING_H -#define BASE_LOGGING_H + +#ifndef ANDROID_BASE_LOGGING_H +#define ANDROID_BASE_LOGGING_H // NOTE: For Windows, you must include logging.h after windows.h to allow the // following code to suppress the evil ERROR macro: @@ -346,4 +347,4 @@ class ScopedLogSeverity { } // namespace base } // namespace android -#endif // BASE_LOGGING_H +#endif // ANDROID_BASE_LOGGING_H diff --git a/base/include/android-base/macros.h b/base/include/android-base/macros.h index b1ce7c6ba..913a9a03e 100644 --- a/base/include/android-base/macros.h +++ b/base/include/android-base/macros.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef UTILS_MACROS_H -#define UTILS_MACROS_H +#ifndef ANDROID_BASE_MACROS_H +#define ANDROID_BASE_MACROS_H #include // for size_t #include // for TEMP_FAILURE_RETRY @@ -185,4 +185,4 @@ void UNUSED(const T&...) { } while (0) #endif -#endif // UTILS_MACROS_H +#endif // ANDROID_BASE_MACROS_H diff --git a/base/include/android-base/memory.h b/base/include/android-base/memory.h index 882582f89..3a2f8fad6 100644 --- a/base/include/android-base/memory.h +++ b/base/include/android-base/memory.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef BASE_MEMORY_H -#define BASE_MEMORY_H +#ifndef ANDROID_BASE_MEMORY_H +#define ANDROID_BASE_MEMORY_H namespace android { namespace base { @@ -44,4 +44,4 @@ static inline void put_unaligned(T* address, T v) { } // namespace base } // namespace android -#endif // BASE_MEMORY_H +#endif // ANDROID_BASE_MEMORY_H diff --git a/base/include/android-base/parseint.h b/base/include/android-base/parseint.h index 0543795e1..ed75e2d48 100644 --- a/base/include/android-base/parseint.h +++ b/base/include/android-base/parseint.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef BASE_PARSEINT_H -#define BASE_PARSEINT_H +#ifndef ANDROID_BASE_PARSEINT_H +#define ANDROID_BASE_PARSEINT_H #include #include @@ -70,4 +70,4 @@ bool ParseInt(const char* s, T* out, } // namespace base } // namespace android -#endif // BASE_PARSEINT_H +#endif // ANDROID_BASE_PARSEINT_H diff --git a/base/include/android-base/parsenetaddress.h b/base/include/android-base/parsenetaddress.h index 2de5ac93d..b4ac0256b 100644 --- a/base/include/android-base/parsenetaddress.h +++ b/base/include/android-base/parsenetaddress.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef BASE_PARSENETADDRESS_H -#define BASE_PARSENETADDRESS_H +#ifndef ANDROID_BASE_PARSENETADDRESS_H +#define ANDROID_BASE_PARSENETADDRESS_H #include @@ -35,4 +35,4 @@ bool ParseNetAddress(const std::string& address, std::string* host, int* port, } // namespace base } // namespace android -#endif // BASE_PARSENETADDRESS_H +#endif // ANDROID_BASE_PARSENETADDRESS_H diff --git a/base/include/android-base/stringprintf.h b/base/include/android-base/stringprintf.h index d68af8713..cf666abe0 100644 --- a/base/include/android-base/stringprintf.h +++ b/base/include/android-base/stringprintf.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef BASE_STRINGPRINTF_H -#define BASE_STRINGPRINTF_H +#ifndef ANDROID_BASE_STRINGPRINTF_H +#define ANDROID_BASE_STRINGPRINTF_H #include #include @@ -53,4 +53,4 @@ void StringAppendV(std::string* dst, const char* format, va_list ap) } // namespace base } // namespace android -#endif // BASE_STRINGPRINTF_H +#endif // ANDROID_BASE_STRINGPRINTF_H diff --git a/base/include/android-base/strings.h b/base/include/android-base/strings.h index 20da144a4..69781cd40 100644 --- a/base/include/android-base/strings.h +++ b/base/include/android-base/strings.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef BASE_STRINGS_H -#define BASE_STRINGS_H +#ifndef ANDROID_BASE_STRINGS_H +#define ANDROID_BASE_STRINGS_H #include #include @@ -65,4 +65,4 @@ bool EndsWith(const std::string& s, const char* suffix); } // namespace base } // namespace android -#endif // BASE_STRINGS_H +#endif // ANDROID_BASE_STRINGS_H diff --git a/base/include/android-base/test_utils.h b/base/include/android-base/test_utils.h index 3f6872c3b..4ea3c8e48 100644 --- a/base/include/android-base/test_utils.h +++ b/base/include/android-base/test_utils.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef TEST_UTILS_H -#define TEST_UTILS_H +#ifndef ANDROID_BASE_TEST_UTILS_H +#define ANDROID_BASE_TEST_UTILS_H #include @@ -48,4 +48,4 @@ class TemporaryDir { DISALLOW_COPY_AND_ASSIGN(TemporaryDir); }; -#endif // TEST_UTILS_H +#endif // ANDROID_BASE_TEST_UTILS_H diff --git a/base/include/android-base/thread_annotations.h b/base/include/android-base/thread_annotations.h index 90979df07..24221024c 100644 --- a/base/include/android-base/thread_annotations.h +++ b/base/include/android-base/thread_annotations.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef UTILS_THREAD_ANNOTATIONS_H -#define UTILS_THREAD_ANNOTATIONS_H +#ifndef ANDROID_BASE_THREAD_ANNOTATIONS_H +#define ANDROID_BASE_THREAD_ANNOTATIONS_H #if defined(__SUPPORT_TS_ANNOTATION__) || defined(__clang__) #define THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x)) @@ -80,4 +80,4 @@ #define NO_THREAD_SAFETY_ANALYSIS \ THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis) -#endif // UTILS_THREAD_ANNOTATIONS_H +#endif // ANDROID_BASE_THREAD_ANNOTATIONS_H diff --git a/base/include/android-base/unique_fd.h b/base/include/android-base/unique_fd.h index d3b27cae3..f96e6c32f 100644 --- a/base/include/android-base/unique_fd.h +++ b/base/include/android-base/unique_fd.h @@ -76,4 +76,4 @@ class unique_fd final { } // namespace base } // namespace android -#endif // ANDROID_BASE_UNIQUE_FD_H +#endif // ANDROID_BASE_UNIQUE_FD_H diff --git a/base/include/android-base/utf8.h b/base/include/android-base/utf8.h index 3b0ed0af8..2d5a6f6d7 100755 --- a/base/include/android-base/utf8.h +++ b/base/include/android-base/utf8.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef BASE_UTF8_H -#define BASE_UTF8_H +#ifndef ANDROID_BASE_UTF8_H +#define ANDROID_BASE_UTF8_H #ifdef _WIN32 #include @@ -84,4 +84,4 @@ using ::unlink; } // namespace base } // namespace android -#endif // BASE_UTF8_H +#endif // ANDROID_BASE_UTF8_H