Merge "Fix <android-base/*.h> header guards."

This commit is contained in:
Elliott Hughes 2016-03-26 16:08:59 +00:00 committed by Gerrit Code Review
commit 3761365735
13 changed files with 38 additions and 37 deletions

View file

@ -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 <string>
@ -43,4 +43,4 @@ std::string SystemErrorCodeToString(int error_code);
} // namespace base
} // namespace android
#endif // BASE_ERRORS_H
#endif // ANDROID_BASE_ERRORS_H

View file

@ -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 <sys/stat.h>
#include <string>
@ -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

View file

@ -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

View file

@ -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 <stddef.h> // for size_t
#include <unistd.h> // for TEMP_FAILURE_RETRY
@ -185,4 +185,4 @@ void UNUSED(const T&...) {
} while (0)
#endif
#endif // UTILS_MACROS_H
#endif // ANDROID_BASE_MACROS_H

View file

@ -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

View file

@ -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 <errno.h>
#include <stdlib.h>
@ -70,4 +70,4 @@ bool ParseInt(const char* s, T* out,
} // namespace base
} // namespace android
#endif // BASE_PARSEINT_H
#endif // ANDROID_BASE_PARSEINT_H

View file

@ -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 <string>
@ -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

View file

@ -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 <stdarg.h>
#include <string>
@ -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

View file

@ -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 <sstream>
#include <string>
@ -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

View file

@ -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 <string>
@ -48,4 +48,4 @@ class TemporaryDir {
DISALLOW_COPY_AND_ASSIGN(TemporaryDir);
};
#endif // TEST_UTILS_H
#endif // ANDROID_BASE_TEST_UTILS_H

View file

@ -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

View file

@ -80,4 +80,4 @@ class unique_fd final {
} // namespace base
} // namespace android
#endif // ANDROID_BASE_UNIQUE_FD_H
#endif // ANDROID_BASE_UNIQUE_FD_H

View file

@ -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 <string>
@ -84,4 +84,4 @@ using ::unlink;
} // namespace base
} // namespace android
#endif // BASE_UTF8_H
#endif // ANDROID_BASE_UTF8_H