summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes2016-03-23 17:04:52 -0500
committerElliott Hughes2016-03-23 17:04:52 -0500
commit54c72aaccc45edf4832cfdc5053d9ae6acc9bcdf (patch)
tree67965789f69be307c3e27b9dc5cbf98beb412139 /base/include
parent8aeabe15dd38093029714dabb1713724400cf5f1 (diff)
downloadplatform-system-core-54c72aaccc45edf4832cfdc5053d9ae6acc9bcdf.tar.gz
platform-system-core-54c72aaccc45edf4832cfdc5053d9ae6acc9bcdf.tar.xz
platform-system-core-54c72aaccc45edf4832cfdc5053d9ae6acc9bcdf.zip
Fix <android-base/*.h> 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 <base/*.h>, so let's rule out one possible explanation. Bug: http://b/27804373 Change-Id: I69e5d52b6260c573c308513420aee0e281426bd4
Diffstat (limited to 'base/include')
-rw-r--r--base/include/android-base/errors.h6
-rw-r--r--base/include/android-base/file.h6
-rw-r--r--base/include/android-base/logging.h7
-rw-r--r--base/include/android-base/macros.h6
-rw-r--r--base/include/android-base/memory.h6
-rw-r--r--base/include/android-base/parseint.h6
-rw-r--r--base/include/android-base/parsenetaddress.h6
-rw-r--r--base/include/android-base/stringprintf.h6
-rw-r--r--base/include/android-base/strings.h6
-rw-r--r--base/include/android-base/test_utils.h6
-rw-r--r--base/include/android-base/thread_annotations.h6
-rw-r--r--base/include/android-base/unique_fd.h2
-rwxr-xr-xbase/include/android-base/utf8.h6
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 @@
27// special handling to get the error string. Refer to Microsoft documentation 27// special handling to get the error string. Refer to Microsoft documentation
28// to determine which error code to check for each function. 28// to determine which error code to check for each function.
29 29
30#ifndef BASE_ERRORS_H 30#ifndef ANDROID_BASE_ERRORS_H
31#define BASE_ERRORS_H 31#define ANDROID_BASE_ERRORS_H
32 32
33#include <string> 33#include <string>
34 34
@@ -43,4 +43,4 @@ std::string SystemErrorCodeToString(int error_code);
43} // namespace base 43} // namespace base
44} // namespace android 44} // namespace android
45 45
46#endif // BASE_ERRORS_H 46#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 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17#ifndef BASE_FILE_H 17#ifndef ANDROID_BASE_FILE_H
18#define BASE_FILE_H 18#define ANDROID_BASE_FILE_H
19 19
20#include <sys/stat.h> 20#include <sys/stat.h>
21#include <string> 21#include <string>
@@ -46,4 +46,4 @@ bool RemoveFileIfExists(const std::string& path, std::string* err = nullptr);
46} // namespace base 46} // namespace base
47} // namespace android 47} // namespace android
48 48
49#endif // BASE_FILE_H 49#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 @@
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16#ifndef BASE_LOGGING_H 16
17#define BASE_LOGGING_H 17#ifndef ANDROID_BASE_LOGGING_H
18#define ANDROID_BASE_LOGGING_H
18 19
19// NOTE: For Windows, you must include logging.h after windows.h to allow the 20// NOTE: For Windows, you must include logging.h after windows.h to allow the
20// following code to suppress the evil ERROR macro: 21// following code to suppress the evil ERROR macro:
@@ -346,4 +347,4 @@ class ScopedLogSeverity {
346} // namespace base 347} // namespace base
347} // namespace android 348} // namespace android
348 349
349#endif // BASE_LOGGING_H 350#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 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17#ifndef UTILS_MACROS_H 17#ifndef ANDROID_BASE_MACROS_H
18#define UTILS_MACROS_H 18#define ANDROID_BASE_MACROS_H
19 19
20#include <stddef.h> // for size_t 20#include <stddef.h> // for size_t
21#include <unistd.h> // for TEMP_FAILURE_RETRY 21#include <unistd.h> // for TEMP_FAILURE_RETRY
@@ -185,4 +185,4 @@ void UNUSED(const T&...) {
185 } while (0) 185 } while (0)
186#endif 186#endif
187 187
188#endif // UTILS_MACROS_H 188#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 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17#ifndef BASE_MEMORY_H 17#ifndef ANDROID_BASE_MEMORY_H
18#define BASE_MEMORY_H 18#define ANDROID_BASE_MEMORY_H
19 19
20namespace android { 20namespace android {
21namespace base { 21namespace base {
@@ -44,4 +44,4 @@ static inline void put_unaligned(T* address, T v) {
44} // namespace base 44} // namespace base
45} // namespace android 45} // namespace android
46 46
47#endif // BASE_MEMORY_H 47#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 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17#ifndef BASE_PARSEINT_H 17#ifndef ANDROID_BASE_PARSEINT_H
18#define BASE_PARSEINT_H 18#define ANDROID_BASE_PARSEINT_H
19 19
20#include <errno.h> 20#include <errno.h>
21#include <stdlib.h> 21#include <stdlib.h>
@@ -70,4 +70,4 @@ bool ParseInt(const char* s, T* out,
70} // namespace base 70} // namespace base
71} // namespace android 71} // namespace android
72 72
73#endif // BASE_PARSEINT_H 73#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 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17#ifndef BASE_PARSENETADDRESS_H 17#ifndef ANDROID_BASE_PARSENETADDRESS_H
18#define BASE_PARSENETADDRESS_H 18#define ANDROID_BASE_PARSENETADDRESS_H
19 19
20#include <string> 20#include <string>
21 21
@@ -35,4 +35,4 @@ bool ParseNetAddress(const std::string& address, std::string* host, int* port,
35} // namespace base 35} // namespace base
36} // namespace android 36} // namespace android
37 37
38#endif // BASE_PARSENETADDRESS_H 38#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 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17#ifndef BASE_STRINGPRINTF_H 17#ifndef ANDROID_BASE_STRINGPRINTF_H
18#define BASE_STRINGPRINTF_H 18#define ANDROID_BASE_STRINGPRINTF_H
19 19
20#include <stdarg.h> 20#include <stdarg.h>
21#include <string> 21#include <string>
@@ -53,4 +53,4 @@ void StringAppendV(std::string* dst, const char* format, va_list ap)
53} // namespace base 53} // namespace base
54} // namespace android 54} // namespace android
55 55
56#endif // BASE_STRINGPRINTF_H 56#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 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17#ifndef BASE_STRINGS_H 17#ifndef ANDROID_BASE_STRINGS_H
18#define BASE_STRINGS_H 18#define ANDROID_BASE_STRINGS_H
19 19
20#include <sstream> 20#include <sstream>
21#include <string> 21#include <string>
@@ -65,4 +65,4 @@ bool EndsWith(const std::string& s, const char* suffix);
65} // namespace base 65} // namespace base
66} // namespace android 66} // namespace android
67 67
68#endif // BASE_STRINGS_H 68#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 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17#ifndef TEST_UTILS_H 17#ifndef ANDROID_BASE_TEST_UTILS_H
18#define TEST_UTILS_H 18#define ANDROID_BASE_TEST_UTILS_H
19 19
20#include <string> 20#include <string>
21 21
@@ -48,4 +48,4 @@ class TemporaryDir {
48 DISALLOW_COPY_AND_ASSIGN(TemporaryDir); 48 DISALLOW_COPY_AND_ASSIGN(TemporaryDir);
49}; 49};
50 50
51#endif // TEST_UTILS_H 51#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 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17#ifndef UTILS_THREAD_ANNOTATIONS_H 17#ifndef ANDROID_BASE_THREAD_ANNOTATIONS_H
18#define UTILS_THREAD_ANNOTATIONS_H 18#define ANDROID_BASE_THREAD_ANNOTATIONS_H
19 19
20#if defined(__SUPPORT_TS_ANNOTATION__) || defined(__clang__) 20#if defined(__SUPPORT_TS_ANNOTATION__) || defined(__clang__)
21#define THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x)) 21#define THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x))
@@ -80,4 +80,4 @@
80#define NO_THREAD_SAFETY_ANALYSIS \ 80#define NO_THREAD_SAFETY_ANALYSIS \
81 THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis) 81 THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis)
82 82
83#endif // UTILS_THREAD_ANNOTATIONS_H 83#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 {
76} // namespace base 76} // namespace base
77} // namespace android 77} // namespace android
78 78
79#endif // ANDROID_BASE_UNIQUE_FD_H 79#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 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17#ifndef BASE_UTF8_H 17#ifndef ANDROID_BASE_UTF8_H
18#define BASE_UTF8_H 18#define ANDROID_BASE_UTF8_H
19 19
20#ifdef _WIN32 20#ifdef _WIN32
21#include <string> 21#include <string>
@@ -84,4 +84,4 @@ using ::unlink;
84} // namespace base 84} // namespace base
85} // namespace android 85} // namespace android
86 86
87#endif // BASE_UTF8_H 87#endif // ANDROID_BASE_UTF8_H