Commit ef4eddde authored by gejun's avatar gejun

Unify inclusion guards

parent 09cc273d
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef BAIDU_BTHREAD_BTHREAD_H
#define BAIDU_BTHREAD_BTHREAD_H
#ifndef BTHREAD_BTHREAD_H
#define BTHREAD_BTHREAD_H
#include <pthread.h>
#include <sys/socket.h>
......@@ -326,4 +326,4 @@ extern void* bthread_getspecific(bthread_key_t key) __THROW;
__END_DECLS
#endif // BAIDU_BTHREAD_BTHREAD_H
#endif // BTHREAD_BTHREAD_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 22 17:30:12 CST 2014
#ifndef BAIDU_BTHREAD_BUTEX_H
#define BAIDU_BTHREAD_BUTEX_H
#ifndef BTHREAD_BUTEX_H
#define BTHREAD_BUTEX_H
#include <errno.h> // users need to check errno
#include <time.h> // timespec
......@@ -69,4 +69,4 @@ int butex_wait(void* butex, int expected_value, const timespec* abstime);
} // namespace bthread
#endif // BAIDU_BTHREAD_BUTEX_H
#endif // BTHREAD_BUTEX_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Sep 15 10:51:15 CST 2014
#ifndef PUBLIC_BTHREAD_BTHREAD_COMLOG_INITIALIZER_H
#define PUBLIC_BTHREAD_BTHREAD_COMLOG_INITIALIZER_H
#ifndef BTHREAD_COMLOG_INITIALIZER_H
#define BTHREAD_COMLOG_INITIALIZER_H
#include <com_log.h> // com_openlog_r, com_closelog_r
#include <butil/macros.h>
......@@ -43,4 +43,4 @@ private:
}
#endif // PUBLIC_BTHREAD_BTHREAD_COMLOG_INITIALIZER_H
#endif // BTHREAD_COMLOG_INITIALIZER_H
......@@ -16,8 +16,8 @@
// Author: Zhangyi Chen (chenzhangyi01@baidu.com)
// Date: 2016/06/03 13:06:40
#ifndef PUBLIC_BTHREAD_COUNTDOWN_EVENT_H
#define PUBLIC_BTHREAD_COUNTDOWN_EVENT_H
#ifndef BTHREAD_COUNTDOWN_EVENT_H
#define BTHREAD_COUNTDOWN_EVENT_H
#include "bthread/bthread.h"
......@@ -55,4 +55,4 @@ private:
} // namespace bthread
#endif //PUBLIC_BTHREAD_COUNTDOWN_EVENT_H
#endif // BTHREAD_COUNTDOWN_EVENT_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Wed Jul 30 11:47:19 CST 2014
#ifndef BAIDU_BTHREAD_ERRNO_H
#define BAIDU_BTHREAD_ERRNO_H
#ifndef BTHREAD_ERRNO_H
#define BTHREAD_ERRNO_H
#include <errno.h> // errno
#include "butil/errno.h" // berror(), DEFINE_BTHREAD_ERRNO
......@@ -36,4 +36,4 @@ extern const int ESTOP;
__END_DECLS
#endif //BAIDU_BTHREAD_ERRNO_H
#endif //BTHREAD_ERRNO_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef BAIDU_BTHREAD_BTHREAD_ID_H
#define BAIDU_BTHREAD_BTHREAD_ID_H
#ifndef BTHREAD_ID_H
#define BTHREAD_ID_H
#include "butil/macros.h" // BAIDU_SYMBOLSTR
#include "bthread/types.h"
......@@ -187,4 +187,4 @@ int bthread_id_list_reset2_bthreadsafe(bthread_id_list_t* list, int error_code,
bthread_mutex_t* mutex) __THROW;
#endif
#endif // BAIDU_BTHREAD_BTHREAD_ID_H
#endif // BTHREAD_ID_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef BAIDU_BTHREAD_INTERRUPT_PTHREAD_H
#define BAIDU_BTHREAD_INTERRUPT_PTHREAD_H
#ifndef BTHREAD_INTERRUPT_PTHREAD_H
#define BTHREAD_INTERRUPT_PTHREAD_H
#include <pthread.h>
......@@ -29,4 +29,4 @@ int interrupt_pthread(pthread_t th);
} // namespace bthread
#endif // BAIDU_BTHREAD_INTERRUPT_PTHREAD_H
#endif // BTHREAD_INTERRUPT_PTHREAD_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Jun 20 11:57:23 CST 2016
#ifndef BAIDU_BTHREAD_LIST_OF_ABAFREE_ID_H
#define BAIDU_BTHREAD_LIST_OF_ABAFREE_ID_H
#ifndef BTHREAD_LIST_OF_ABAFREE_ID_H
#define BTHREAD_LIST_OF_ABAFREE_ID_H
#include <vector>
#include <deque>
......@@ -209,4 +209,4 @@ size_t ListOfABAFreeId<Id, IdTraits>::get_sizes(size_t* cnts, size_t n) {
} // namespace bthread
#endif // BAIDU_BTHREAD_LIST_OF_ABAFREE_ID_H
#endif // BTHREAD_LIST_OF_ABAFREE_ID_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Sep 15 10:51:15 CST 2014
#ifndef BAIDU_BTHREAD_LOG_H
#define BAIDU_BTHREAD_LOG_H
#ifndef BTHREAD_LOG_H
#define BTHREAD_LOG_H
#ifdef BAIDU_INTERNAL
#include "bthread/comlog_initializer.h"
......@@ -25,4 +25,4 @@
#define BT_VLOG VLOG(100)
#endif // BAIDU_BTHREAD_LOG_H
#endif // BTHREAD_LOG_H
......@@ -16,8 +16,8 @@
// Author: chenzhangyi01@baidu.com, gejun@baidu.com
// Date: 2017/07/27 23:07:06
#ifndef PUBLIC_BTHREAD_PARKING_LOT_H
#define PUBLIC_BTHREAD_PARKING_LOT_H
#ifndef BTHREAD_PARKING_LOT_H
#define BTHREAD_PARKING_LOT_H
#include "butil/atomicops.h"
#include "bthread/sys_futex.h"
......@@ -69,4 +69,4 @@ private:
} // namespace bthread
#endif //PUBLIC_BTHREAD_PARKING_LOT_H
#endif // BTHREAD_PARKING_LOT_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Fri Dec 5 13:40:57 CST 2014
#ifndef BAIDU_BTHREAD_PROCESSOR_H
#define BAIDU_BTHREAD_PROCESSOR_H
#ifndef BTHREAD_PROCESSOR_H
#define BTHREAD_PROCESSOR_H
// Pause instruction to prevent excess processor bus usage, only works in GCC
# ifndef cpu_relax
......@@ -44,4 +44,4 @@
errno = saved_errno; \
} while (0)
#endif // BAIDU_BTHREAD_PROCESSOR_H
#endif // BTHREAD_PROCESSOR_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Sun, 22 Jan 2017
#ifndef BAIDU_BTHREAD_REMOTE_TASK_QUEUE_H
#define BAIDU_BTHREAD_REMOTE_TASK_QUEUE_H
#ifndef BTHREAD_REMOTE_TASK_QUEUE_H
#define BTHREAD_REMOTE_TASK_QUEUE_H
#include "butil/containers/bounded_queue.h"
#include "butil/macros.h"
......@@ -77,4 +77,4 @@ friend class TaskGroup;
} // namespace bthread
#endif // BAIDU_BTHREAD_REMOTE_TASK_QUEUE_H
#endif // BTHREAD_REMOTE_TASK_QUEUE_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Sun Sep 7 22:37:39 CST 2014
#ifndef BAIDU_BTHREAD_ALLOCATE_STACK_H
#define BAIDU_BTHREAD_ALLOCATE_STACK_H
#ifndef BTHREAD_ALLOCATE_STACK_H
#define BTHREAD_ALLOCATE_STACK_H
#include <assert.h>
#include <gflags/gflags.h> // DECLARE_int32
......@@ -77,4 +77,4 @@ void jump_stack(ContextualStack* from, ContextualStack* to);
#include "bthread/stack_inl.h"
#endif // BAIDU_BTHREAD_ALLOCATE_STACK_H
#endif // BTHREAD_ALLOCATE_STACK_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Sun Sep 7 22:37:39 CST 2014
#ifndef BAIDU_BTHREAD_ALLOCATE_STACK_INL_H
#define BAIDU_BTHREAD_ALLOCATE_STACK_INL_H
#ifndef BTHREAD_ALLOCATE_STACK_INL_H
#define BTHREAD_ALLOCATE_STACK_INL_H
DECLARE_int32(guard_page_size);
DECLARE_int32(tc_stack_small);
......@@ -192,4 +192,4 @@ template <> struct ObjectPoolValidator<
} // namespace butil
#endif // BAIDU_BTHREAD_ALLOCATE_STACK_INL_H
#endif // BTHREAD_ALLOCATE_STACK_INL_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef BAIDU_BTHREAD_SYS_FUTEX_H
#define BAIDU_BTHREAD_SYS_FUTEX_H
#ifndef BTHREAD_SYS_FUTEX_H
#define BTHREAD_SYS_FUTEX_H
#include <syscall.h> // SYS_futex
#include <unistd.h> // syscall
......@@ -46,4 +46,4 @@ inline int futex_requeue_private(void* addr1, int nwake, void* addr2) {
} // namespace bthread
#endif // BAIDU_BTHREAD_SYS_FUTEX_H
#endif // BTHREAD_SYS_FUTEX_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef BAIDU_BTHREAD_TASK_CONTROL_H
#define BAIDU_BTHREAD_TASK_CONTROL_H
#ifndef BTHREAD_TASK_CONTROL_H
#define BTHREAD_TASK_CONTROL_H
#ifndef NDEBUG
#include <iostream> // std::ostream
......@@ -122,4 +122,4 @@ inline bvar::LatencyRecorder& TaskControl::exposed_pending_time() {
} // namespace bthread
#endif // BAIDU_BTHREAD_TASK_CONTROL_H
#endif // BTHREAD_TASK_CONTROL_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef BAIDU_BTHREAD_TASK_GROUP_H
#define BAIDU_BTHREAD_TASK_GROUP_H
#ifndef BTHREAD_TASK_GROUP_H
#define BTHREAD_TASK_GROUP_H
#include "butil/time.h" // cpuwide_time_ns
#include "bthread/task_control.h"
......@@ -250,4 +250,4 @@ friend class TaskControl;
#include "task_group_inl.h"
#endif // BAIDU_BTHREAD_TASK_GROUP_H
#endif // BTHREAD_TASK_GROUP_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef BAIDU_BTHREAD_TASK_GROUP_INL_H
#define BAIDU_BTHREAD_TASK_GROUP_INL_H
#ifndef BTHREAD_TASK_GROUP_INL_H
#define BTHREAD_TASK_GROUP_INL_H
namespace bthread {
......@@ -103,4 +103,4 @@ inline void TaskGroup::flush_nosignal_tasks_remote() {
} // namespace bthread
#endif // BAIDU_BTHREAD_TASK_GROUP_INL_H
#endif // BTHREAD_TASK_GROUP_INL_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef BAIDU_BTHREAD_TASK_META_H
#define BAIDU_BTHREAD_TASK_META_H
#ifndef BTHREAD_TASK_META_H
#define BTHREAD_TASK_META_H
#include <pthread.h> // pthread_spin_init
#include "bthread/butex.h" // butex_construct/destruct
......@@ -121,4 +121,4 @@ public:
} // namespace bthread
#endif // BAIDU_BTHREAD_TASK_META_H
#endif // BTHREAD_TASK_META_H
......@@ -15,8 +15,8 @@
// Author: Ge,Jun (gejun@baidu.com)
#ifndef BAIDU_BTHREAD_TIMER_THREAD_H
#define BAIDU_BTHREAD_TIMER_THREAD_H
#ifndef BTHREAD_TIMER_THREAD_H
#define BTHREAD_TIMER_THREAD_H
#include <vector> // std::vector
#include <pthread.h> // pthread_*
......@@ -106,4 +106,4 @@ TimerThread* get_global_timer_thread();
} // end namespace bthread
#endif // BAIDU_BTHREAD_TIMER_THREAD_H
#endif // BTHREAD_TIMER_THREAD_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef BAIDU_BTHREAD_BTHREAD_TYPES_H
#define BAIDU_BTHREAD_BTHREAD_TYPES_H
#ifndef BTHREAD_TYPES_H
#define BTHREAD_TYPES_H
#include <stdint.h> // uint64_t
#if defined(__cplusplus)
......@@ -220,4 +220,4 @@ typedef struct {
typedef uint64_t bthread_timer_t;
#endif // BAIDU_BTHREAD_BTHREAD_TYPES_H
#endif // BTHREAD_TYPES_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef BAIDU_BTHREAD_BTHREAD_UNSTABLE_H
#define BAIDU_BTHREAD_BTHREAD_UNSTABLE_H
#ifndef BTHREAD_UNSTABLE_H
#define BTHREAD_UNSTABLE_H
#include <pthread.h>
#include <sys/socket.h>
......@@ -124,4 +124,4 @@ extern void bthread_keytable_pool_reserve(
__END_DECLS
#endif // BAIDU_BTHREAD_BTHREAD_UNSTABLE_H
#endif // BTHREAD_UNSTABLE_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef BAIDU_BTHREAD_WORK_STEALING_QUEUE_H
#define BAIDU_BTHREAD_WORK_STEALING_QUEUE_H
#ifndef BTHREAD_WORK_STEALING_QUEUE_H
#define BTHREAD_WORK_STEALING_QUEUE_H
#include "butil/macros.h"
#include "butil/atomicops.h"
......@@ -151,4 +151,4 @@ private:
} // namespace bthread
#endif // BAIDU_BTHREAD_WORK_STEALING_QUEUE_H
#endif // BTHREAD_WORK_STEALING_QUEUE_H
......@@ -17,8 +17,8 @@
// Do small memory allocations on continuous blocks.
#ifndef BAIDU_BASE_ARENA_H
#define BAIDU_BASE_ARENA_H
#ifndef BUTIL_ARENA_H
#define BUTIL_ARENA_H
#include <stdint.h>
#include "butil/macros.h"
......@@ -80,4 +80,4 @@ inline void* Arena::allocate(size_t n) {
} // namespace butil
#endif // BAIDU_BASE_ARENA_H
#endif // BUTIL_ARENA_H
......@@ -18,8 +18,8 @@
// Get name of a class. For example, class_name<T>() returns the name of T
// (with namespace prefixes). This is useful in template classes.
#ifndef BAIDU_BASE_CLASS_NAME_H
#define BAIDU_BASE_CLASS_NAME_H
#ifndef BUTIL_CLASS_NAME_H
#define BUTIL_CLASS_NAME_H
#include <typeinfo>
#include <string> // std::string
......@@ -53,4 +53,4 @@ template <typename T> std::string class_name_str(T const& obj) {
} // namespace butil
#endif // BAIDU_BASE_CLASS_NAME_H
#endif // BUTIL_CLASS_NAME_H
......@@ -17,8 +17,8 @@
// Wrappers of IP and port.
#ifndef BAIDU_BASE_ENDPOINT_H
#define BAIDU_BASE_ENDPOINT_H
#ifndef BUTIL_ENDPOINT_H
#define BUTIL_ENDPOINT_H
#include <netinet/in.h> // in_addr
#include <iostream> // std::ostream
......@@ -216,4 +216,4 @@ struct hash<butil::EndPoint> {
}
#endif // BAIDU_BASE_ENDPOINT_H
#endif // BUTIL_ENDPOINT_H
......@@ -17,8 +17,8 @@
// Add customized errno.
#ifndef BAIDU_BASE_BAIDU_ERRNO_H
#define BAIDU_BASE_BAIDU_ERRNO_H
#ifndef BUTIL_BAIDU_ERRNO_H
#define BUTIL_BAIDU_ERRNO_H
#define __const__
#include <errno.h> // errno
......@@ -77,4 +77,4 @@ template <int error_code> class BaiduErrnoHelper {};
const char* berror(int error_code);
const char* berror();
#endif //BAIDU_BASE_BAIDU_ERRNO_H
#endif //BUTIL_BAIDU_ERRNO_H
......@@ -15,8 +15,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Thu Dec 31 13:35:39 CST 2015
#ifndef PUBLIC_COMMON_BASE_FAST_RAND_H
#define PUBLIC_COMMON_BASE_FAST_RAND_H
#ifndef BUTIL_FAST_RAND_H
#define BUTIL_FAST_RAND_H
#include <stdint.h>
......@@ -65,4 +65,4 @@ double fast_rand_double();
}
#endif // PUBLIC_COMMON_BASE_FAST_RAND_H
#endif // BUTIL_FAST_RAND_H
......@@ -15,8 +15,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon. Nov 7 14:47:36 CST 2011
#ifndef BAIDU_BASE_FD_GUARD_H
#define BAIDU_BASE_FD_GUARD_H
#ifndef BUTIL_FD_GUARD_H
#define BUTIL_FD_GUARD_H
#include <unistd.h> // close()
......@@ -74,4 +74,4 @@ private:
} // namespace butil
#endif // BAIDU_BASE_FD_GUARD_H
#endif // BUTIL_FD_GUARD_H
......@@ -17,8 +17,8 @@
// Utility functions on file descriptor.
#ifndef BAIDU_BASE_FD_UTILITY_H
#define BAIDU_BASE_FD_UTILITY_H
#ifndef BUTIL_FD_UTILITY_H
#define BUTIL_FD_UTILITY_H
namespace butil {
......@@ -40,4 +40,4 @@ int make_no_delay(int socket);
} // namespace butil
#endif // BAIDU_BASE_FD_UTILITY_H
#endif // BUTIL_FD_UTILITY_H
......@@ -15,8 +15,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jun 23 15:03:24 CST 2015
#ifndef BAIDU_BASE_FIND_CSTR_H
#define BAIDU_BASE_FIND_CSTR_H
#ifndef BUTIL_FIND_CSTR_H
#define BUTIL_FIND_CSTR_H
#include <string>
#include <map>
......@@ -149,4 +149,4 @@ find_lowered_cstr(std::map<std::string, T, C, A>& m,
} // namespace butil
#endif // BAIDU_BASE_FIND_CSTR_H
#endif // BUTIL_FIND_CSTR_H
#ifndef PUBLIC_COMMON_BASE_INTRUSIVE_PTR_HPP
#define PUBLIC_COMMON_BASE_INTRUSIVE_PTR_HPP
#ifndef BUTIL_INTRUSIVE_PTR_HPP
#define BUTIL_INTRUSIVE_PTR_HPP
// Copyright (c) 2001, 2002 Peter Dimov
//
......@@ -293,4 +293,4 @@ inline size_t hash_value(const butil::intrusive_ptr<T>& sp) {
} // namespace BASE_HASH_NAMESPACE
#endif // PUBLIC_COMMON_BASE_INTRUSIVE_PTR_HPP
#endif // BUTIL_INTRUSIVE_PTR_HPP
......@@ -14,8 +14,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon. Nov 7 14:47:36 CST 2011
#ifndef BAIDU_BASE_BAIDU_SCOPED_LOCK_H
#define BAIDU_BASE_BAIDU_SCOPED_LOCK_H
#ifndef BUTIL_BAIDU_SCOPED_LOCK_H
#define BUTIL_BAIDU_SCOPED_LOCK_H
#include "butil/build_config.h"
......@@ -396,4 +396,4 @@ void double_lock(std::unique_lock<Mutex1> &lck1, std::unique_lock<Mutex2> &lck2)
};
#endif // BAIDU_BASE_BAIDU_SCOPED_LOCK_H
#endif // BUTIL_BAIDU_SCOPED_LOCK_H
......@@ -16,8 +16,8 @@
Date: Sun Aug 20 11:39:01 CST 2017
*/
#ifndef BAIDU_BASE_SSL_COMPAT_H
#define BAIDU_BASE_SSL_COMPAT_H
#ifndef BUTIL_SSL_COMPAT_H
#define BUTIL_SSL_COMPAT_H
#include <openssl/ssl.h>
#include <openssl/opensslv.h>
......@@ -523,4 +523,4 @@ BRPC_INLINE int EVP_PKEY_base_id(const EVP_PKEY *pkey) {
#endif /* OPENSSL_VERSION_NUMBER < 0x0090801fL */
#endif /* BAIDU_BASE_SSL_COMPAT_H */
#endif /* BUTIL_SSL_COMPAT_H */
// Copyright (c) 2015 Baidu, Inc.
#ifndef BAIDU_BASE_STATUS_H
#define BAIDU_BASE_STATUS_H
#ifndef BUTIL_STATUS_H
#define BUTIL_STATUS_H
#include <stdarg.h> // va_list
#include <stdlib.h> // free
......@@ -139,4 +139,4 @@ inline std::ostream& operator<<(std::ostream& os, const Status& st) {
} // namespace butil
#endif // BAIDU_BASE_STATUS_H
#endif // BUTIL_STATUS_H
// Copyright (c) 2011 Baidu, Inc.
// Date: Mon. Nov 7 14:47:36 CST 2011
#ifndef BAIDU_BASE_STRING_PRINTF_H
#define BAIDU_BASE_STRING_PRINTF_H
#ifndef BUTIL_STRING_PRINTF_H
#define BUTIL_STRING_PRINTF_H
#include <string> // std::string
#include <stdarg.h> // va_list
......@@ -34,4 +34,4 @@ int string_vappendf(std::string* output, const char* format, va_list args);
} // namespace butil
#endif // BAIDU_BASE_STRING_PRINTF_H
#endif // BUTIL_STRING_PRINTF_H
......@@ -17,8 +17,8 @@
// Iteratively split a string by one or multiple separators.
#ifndef BAIDU_BASE_STRING_SPLITTER_H
#define BAIDU_BASE_STRING_SPLITTER_H
#ifndef BUTIL_STRING_SPLITTER_H
#define BUTIL_STRING_SPLITTER_H
#include <stdlib.h>
#include <stdint.h>
......@@ -159,4 +159,4 @@ private:
#include "butil/string_splitter_inl.h"
#endif // BAIDU_BASE_STRING_SPLITTER_H
#endif // BUTIL_STRING_SPLITTER_H
......@@ -17,8 +17,8 @@
#include <limits.h>
#ifndef BAIDU_BASE_STRING_SPLITTER_INL_H
#define BAIDU_BASE_STRING_SPLITTER_INL_H
#ifndef BUTIL_STRING_SPLITTER_INL_H
#define BUTIL_STRING_SPLITTER_INL_H
namespace butil {
......@@ -311,4 +311,4 @@ int StringMultiSplitter::to_double(double* pv) const {
} // namespace butil
#endif // BAIDU_BASE_STRING_SPLITTER_INL_H
#endif // BUTIL_STRING_SPLITTER_INL_H
......@@ -15,8 +15,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Sun Nov 7 21:43:34 CST 2010
#ifndef BAIDU_BASE_SYNCHRONOUS_EVENT_H
#define BAIDU_BASE_SYNCHRONOUS_EVENT_H
#ifndef BUTIL_SYNCHRONOUS_EVENT_H
#define BUTIL_SYNCHRONOUS_EVENT_H
#include <vector> // std::vector
#include <algorithm> // std::find
......@@ -228,4 +228,4 @@ public:
} // end namespace detail
} // end namespace butil
#endif // BAIDU_BASE_SYNCHRONOUS_EVENT_H
#endif // BUTIL_SYNCHRONOUS_EVENT_H
......@@ -5,8 +5,8 @@
// Compute murmurhash3 iteratively so that you don't have to buffer
// everything in memory before computation. The APIs are similar with MD5
#ifndef PUBLIC_COMMON_BASE_THIRD_PARTY_MURMURHASH3_MURMURHASH3_H
#define PUBLIC_COMMON_BASE_THIRD_PARTY_MURMURHASH3_MURMURHASH3_H
#ifndef BUTIL_THIRD_PARTY_MURMURHASH3_MURMURHASH3_H
#define BUTIL_THIRD_PARTY_MURMURHASH3_MURMURHASH3_H
// ======= Platform-specific functions and macros =======
// Microsoft Visual Studio
......@@ -99,4 +99,4 @@ void MurmurHash3_x64_128_Final(void* out, const MurmurHash3_x64_128_Context* ctx
} // namespace butil
#endif // PUBLIC_COMMON_BASE_THIRD_PARTY_MURMURHASH3_MURMURHASH3_H
#endif // BUTIL_THIRD_PARTY_MURMURHASH3_MURMURHASH3_H
......@@ -28,8 +28,8 @@
//
// Internals shared between the Snappy implementation and its unittest.
#ifndef PUBLIC_COMMON_BASE_THIRD_PARTY_SNAPPY_SNAPPY_INTERNAL_H_
#define PUBLIC_COMMON_BASE_THIRD_PARTY_SNAPPY_SNAPPY_INTERNAL_H_
#ifndef BUTIL_THIRD_PARTY_SNAPPY_SNAPPY_INTERNAL_H_
#define BUTIL_THIRD_PARTY_SNAPPY_SNAPPY_INTERNAL_H_
#include "snappy-stubs-internal.h"
......@@ -149,4 +149,4 @@ static inline int FindMatchLength(const char* s1,
} // end namespace snappy
} // end namespace butil
#endif // PUBLIC_COMMON_BASE_THIRD_PARTY_SNAPPY_SNAPPY_INTERNAL_H_
#endif // BUTIL_THIRD_PARTY_SNAPPY_SNAPPY_INTERNAL_H_
......@@ -26,8 +26,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef PUBLIC_COMMON_BASE_THIRD_PARTY_SNAPPY_SNAPPY_SINKSOURCE_H_
#define PUBLIC_COMMON_BASE_THIRD_PARTY_SNAPPY_SNAPPY_SINKSOURCE_H_
#ifndef BUTIL_THIRD_PARTY_SNAPPY_SNAPPY_SINKSOURCE_H_
#define BUTIL_THIRD_PARTY_SNAPPY_SNAPPY_SINKSOURCE_H_
#include <stddef.h>
......@@ -181,4 +181,4 @@ class UncheckedByteArraySink : public Sink {
} // namespace snappy
} // namespace butil
#endif // PUBLIC_COMMON_BASE_THIRD_PARTY_SNAPPY_SNAPPY_SINKSOURCE_H_
#endif // BUTIL_THIRD_PARTY_SNAPPY_SNAPPY_SINKSOURCE_H_
......@@ -28,8 +28,8 @@
//
// Various stubs for the open-source version of Snappy.
#ifndef PUBLIC_COMMON_BASE_THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_STUBS_INTERNAL_H_
#define PUBLIC_COMMON_BASE_THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_STUBS_INTERNAL_H_
#ifndef BUTIL_THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_STUBS_INTERNAL_H_
#define BUTIL_THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_STUBS_INTERNAL_H_
#include <string>
#include <assert.h>
......@@ -399,4 +399,4 @@ inline char* string_as_array(std::string* str) {
} // namespace snappy
} // namespace butil
#endif // PUBLIC_COMMON_BASE_THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_STUBS_INTERNAL_H_
#endif // BUTIL_THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_STUBS_INTERNAL_H_
......@@ -36,8 +36,8 @@
// using BMDiff and then compressing the output of BMDiff with
// Snappy.
#ifndef PUBLIC_COMMON_BASE_THIRD_PARTY_SNAPPY_SNAPPY_H__
#define PUBLIC_COMMON_BASE_THIRD_PARTY_SNAPPY_SNAPPY_H__
#ifndef BUTIL_THIRD_PARTY_SNAPPY_SNAPPY_H__
#define BUTIL_THIRD_PARTY_SNAPPY_SNAPPY_H__
#include "butil/basictypes.h"
#include <string>
......@@ -207,4 +207,4 @@ static const size_t kMaxHashTableSize = 1 << kMaxHashTableBits;
} // end namespace snappy
} // end namespace butil
#endif // PUBLIC_COMMON_BASE_THIRD_PARTY_SNAPPY_SNAPPY_H__
#endif // BUTIL_THIRD_PARTY_SNAPPY_SNAPPY_H__
......@@ -15,8 +15,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon. Nov 7 14:47:36 CST 2011
#ifndef BAIDU_BASE_THREAD_LOCAL_H
#define BAIDU_BASE_THREAD_LOCAL_H
#ifndef BUTIL_THREAD_LOCAL_H
#define BUTIL_THREAD_LOCAL_H
#include <new> // std::nothrow
#include <cstddef> // NULL
......@@ -76,4 +76,4 @@ template <typename T> void delete_object(void* arg) {
#include "thread_local_inl.h"
#endif // BAIDU_BASE_THREAD_LOCAL_H
#endif // BUTIL_THREAD_LOCAL_H
......@@ -15,8 +15,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Sep 16 12:39:12 CST 2014
#ifndef BAIDU_BASE_THREAD_LOCAL_INL_H
#define BAIDU_BASE_THREAD_LOCAL_INL_H
#ifndef BUTIL_THREAD_LOCAL_INL_H
#define BUTIL_THREAD_LOCAL_INL_H
namespace butil {
......@@ -48,4 +48,4 @@ template <typename T> inline T* get_thread_local() {
} // namespace butil
#endif // BAIDU_BASE_THREAD_LOCAL_INL_H
#endif // BUTIL_THREAD_LOCAL_INL_H
......@@ -17,8 +17,8 @@
// Measuring time
#ifndef BAIDU_BUTIL_TIME_H
#define BAIDU_BUTIL_TIME_H
#ifndef BUTIL_TIME_H
#define BUTIL_TIME_H
#include <time.h> // timespec, clock_gettime
#include <sys/time.h> // timeval, gettimeofday
......@@ -348,4 +348,4 @@ private:
} // namespace butil
#endif // BAIDU_BUTIL_TIME_H
#endif // BUTIL_TIME_H
#ifndef BAIDU_BASE_UNIQUE_PTR_H
#define BAIDU_BASE_UNIQUE_PTR_H
#ifndef BUTIL_UNIQUE_PTR_H
#define BUTIL_UNIQUE_PTR_H
#include "butil/build_config.h"
......@@ -469,4 +469,4 @@ operator>=(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y) {
} // namespace std
#endif // BASE_CXX11_ENABLED
#endif // BAIDU_BASE_UNIQUE_PTR_H
#endif // BUTIL_UNIQUE_PTR_H
......@@ -17,8 +17,8 @@
// Wrappers of unix domain sockets, mainly for unit-test of network stuff.
#ifndef BAIDU_BASE_UNIX_SOCKET_H
#define BAIDU_BASE_UNIX_SOCKET_H
#ifndef BUTIL_UNIX_SOCKET_H
#define BUTIL_UNIX_SOCKET_H
namespace butil {
......@@ -36,4 +36,4 @@ int unix_socket_connect(const char* sockname);
} // namespace butil
#endif // BAIDU_BASE_UNIX_SOCKET_H
#endif // BUTIL_UNIX_SOCKET_H
......@@ -15,8 +15,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Thu Nov 22 13:57:56 CST 2012
#ifndef BAIDU_BASE_ZERO_COPY_STREAM_AS_STREAMBUF_H
#define BAIDU_BASE_ZERO_COPY_STREAM_AS_STREAMBUF_H
#ifndef BUTIL_ZERO_COPY_STREAM_AS_STREAMBUF_H
#define BUTIL_ZERO_COPY_STREAM_AS_STREAMBUF_H
#include <streambuf>
#include <google/protobuf/io/zero_copy_stream.h>
......@@ -49,4 +49,4 @@ private:
} // namespace butil
#endif // BAIDU_BASE_ZERO_COPY_STREAM_AS_STREAMBUF_H
#endif // BUTIL_ZERO_COPY_STREAM_AS_STREAMBUF_H
......@@ -15,8 +15,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Dec 14 19:12:30 CST 2015
#ifndef PUBLIC_BVAR_BVAR_COLLECTOR_H
#define PUBLIC_BVAR_BVAR_COLLECTOR_H
#ifndef BVAR_COLLECTOR_H
#define BVAR_COLLECTOR_H
#include "butil/containers/linked_list.h"
#include "butil/fast_rand.h"
......@@ -132,4 +132,4 @@ private:
} // namespace bvar
#endif // PUBLIC_BVAR_BVAR_COLLECTOR_H
#endif // BVAR_COLLECTOR_H
......@@ -15,8 +15,8 @@
// Author Zhangyi Chen (chenzhangyi01@baidu.com)
// Date 2014/09/22 11:57:43
#ifndef BAIDU_BVAR__COMBINER_H
#define BAIDU_BVAR__COMBINER_H
#ifndef BVAR_COMBINER_H
#define BVAR_COMBINER_H
#include <string> // std::string
#include <vector> // std::vector
......@@ -341,4 +341,4 @@ private:
} // namespace detail
} // namespace bvar
#endif //BAIDU_BVAR__COMBINER_H
#endif // BVAR_COMBINER_H
// Copyright (c) 2015 Baidu, Inc.
// Author: Jiang,Lin (jianglin05@baidu.com)
// Date: 2015/05/26 16:59:16
#ifndef PROTOBUF_JSON_ENCODE_DECODE_H
#define PROTOBUF_JSON_ENCODE_DECODE_H
#ifndef BRPC_JSON2PB_ENCODE_DECODE_H
#define BRPC_JSON2PB_ENCODE_DECODE_H
namespace json2pb {
......@@ -27,4 +27,4 @@ bool decode_name(const std::string& content, std::string& decoded_content);
}
#endif //PROTOBUF_JSON_ENCODE_DECODE_H
#endif //BRPC_JSON2PB_ENCODE_DECODE_H
......@@ -2,8 +2,8 @@
// Author: Zhangyi Chen (chenzhangyi01@baidu.com)
// Date: 2015/03/17 15:34:52
#ifndef PROTOBUF_JSON_RAPIDJSON_H
#define PROTOBUF_JSON_RAPIDJSON_H
#ifndef BRPC_JSON2PB_RAPIDJSON_H
#define BRPC_JSON2PB_RAPIDJSON_H
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
......@@ -31,4 +31,4 @@
#pragma GCC diagnostic pop
#endif
#endif //PROTOBUF_JSON_RAPIDJSON_H
#endif //BRPC_JSON2PB_RAPIDJSON_H
......@@ -3,8 +3,8 @@
// Author: Zhangyi Chen (chenzhangyi01@baidu.com)
// Date: 2014/10/29 15:01:09
#ifndef PROTOBUF_JSON_ZERO_COPY_STREAM_READER_H
#define PROTOBUF_JSON_ZERO_COPY_STREAM_READER_H
#ifndef BRPC_JSON2PB_ZERO_COPY_STREAM_READER_H
#define BRPC_JSON2PB_ZERO_COPY_STREAM_READER_H
#include <google/protobuf/io/zero_copy_stream.h> // ZeroCopyInputStream
......@@ -70,4 +70,4 @@ private:
} // namespace json2pb
#endif //PROTOBUF_JSON_ZERO_COPY_STREAM_READER_H
#endif //BRPC_JSON2PB_ZERO_COPY_STREAM_READER_H
......@@ -2,8 +2,8 @@
// Author: Zhangyi Chen (chenzhangyi01@baidu.com)
// Date: 2014/10/29 16:44:42
#ifndef PROTOBUF_JSON_ZERO_COPY_STREAM_WRITER_H
#define PROTOBUF_JSON_ZERO_COPY_STREAM_WRITER_H
#ifndef BRPC_JSON2PB_ZERO_COPY_STREAM_WRITER_H
#define BRPC_JSON2PB_ZERO_COPY_STREAM_WRITER_H
#include <google/protobuf/io/zero_copy_stream.h> // ZeroCopyOutputStream
#include <iostream>
......@@ -98,4 +98,4 @@ private:
} // namespace json2pb
#endif //PROTOBUF_JSON_ZERO_COPY_STREAM_WRITER_H
#endif //BRPC_JSON2PB_ZERO_COPY_STREAM_WRITER_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Oct 19 17:17:36 CST 2015
#ifndef PUBLIC_MCPACK2PB_MCPACK_FIELD_TYPE_H
#define PUBLIC_MCPACK2PB_MCPACK_FIELD_TYPE_H
#ifndef MCPACK2PB_MCPACK_FIELD_TYPE_H
#define MCPACK2PB_MCPACK_FIELD_TYPE_H
#include <stddef.h>
#include <stdint.h>
......@@ -144,4 +144,4 @@ inline size_t get_primitive_type_size(FieldType type) {
} // namespace mcpack2pb
#endif // PUBLIC_MCPACK2PB_MCPACK_FIELD_TYPE_H
#endif // MCPACK2PB_MCPACK_FIELD_TYPE_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Oct 19 17:17:36 CST 2015
#ifndef PUBLIC_MCPACK2PB_MCPACK_MCPACK2PB_H
#define PUBLIC_MCPACK2PB_MCPACK_MCPACK2PB_H
#ifndef MCPACK2PB_MCPACK_MCPACK2PB_H
#define MCPACK2PB_MCPACK_MCPACK2PB_H
#include <google/protobuf/message.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
......@@ -159,4 +159,4 @@ inline bool MessageHandler::serialize_to_iobuf(
} // namespace mcpack2pb
#endif // PUBLIC_MCPACK2PB_MCPACK_MCPACK2PB_H
#endif // MCPACK2PB_MCPACK_MCPACK2PB_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Oct 19 17:17:36 CST 2015
#ifndef PUBLIC_MCPACK2PB_MCPACK_PARSER_INL_H
#define PUBLIC_MCPACK2PB_MCPACK_PARSER_INL_H
#ifndef MCPACK2PB_MCPACK_PARSER_INL_H
#define MCPACK2PB_MCPACK_PARSER_INL_H
namespace mcpack2pb {
......@@ -261,4 +261,4 @@ inline T ISOArrayIterator::as_fp() const {
} // namespace mcpack2pb
#endif // PUBLIC_MCPACK2PB_MCPACK_PARSER_INL_H
#endif // MCPACK2PB_MCPACK_PARSER_INL_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Oct 19 17:17:36 CST 2015
#ifndef PUBLIC_MCPACK2PB_MCPACK_PARSER_H
#define PUBLIC_MCPACK2PB_MCPACK_PARSER_H
#ifndef MCPACK2PB_MCPACK_PARSER_H
#define MCPACK2PB_MCPACK_PARSER_H
#include <limits> // std::numeric_limits
#include <google/protobuf/io/zero_copy_stream.h>
......@@ -267,4 +267,4 @@ private:
#include "mcpack2pb/parser-inl.h"
#endif // PUBLIC_MCPACK2PB_MCPACK_PARSER_H
#endif // MCPACK2PB_MCPACK_PARSER_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Oct 19 17:17:36 CST 2015
#ifndef PUBLIC_MCPACK2PB_MCPACK_SERIALIZER_INL_H
#define PUBLIC_MCPACK2PB_MCPACK_SERIALIZER_INL_H
#ifndef MCPACK2PB_MCPACK_SERIALIZER_INL_H
#define MCPACK2PB_MCPACK_SERIALIZER_INL_H
void* fast_memcpy(void *__restrict dest, const void *__restrict src, size_t n);
......@@ -298,4 +298,4 @@ inline void Serializer::end_object_iso()
} // namespace mcpack2pb
#endif // PUBLIC_MCPACK2PB_MCPACK_SERIALIZER_INL_H
#endif // MCPACK2PB_MCPACK_SERIALIZER_INL_H
......@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Oct 19 17:17:36 CST 2015
#ifndef PUBLIC_MCPACK2PB_MCPACK_SERIALIZER_H
#define PUBLIC_MCPACK2PB_MCPACK_SERIALIZER_H
#ifndef MCPACK2PB_MCPACK_SERIALIZER_H
#define MCPACK2PB_MCPACK_SERIALIZER_H
#include <limits>
#include <google/protobuf/io/zero_copy_stream.h>
......@@ -282,4 +282,4 @@ private:
#include "mcpack2pb/serializer-inl.h"
#endif // PUBLIC_MCPACK2PB_MCPACK_SERIALIZER_H
#endif // MCPACK2PB_MCPACK_SERIALIZER_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment