about summary refs log tree commit diff
path: root/absl/base/internal
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-12-10T17·03-0800
committerMatt Calabrese <calabrese@x.team>2019-12-10T20·07-0500
commit1e39f8626a4dadec1f56920b999dd4c3cfae333e (patch)
tree335bb815a8ef6a6d90f16cb5f1932bed164211a9 /absl/base/internal
parent77f87009a34c745255bd84d8f2647040d831a2b3 (diff)
Export of internal Abseil changes
--
b842b7fd9b1289be31f0b7ee8e62e48e550747cf by Greg Falcon <gfalcon@google.com>:

Change the Cord str_format formatter to use iteration instead of CordReader.

When Cord is publicly released, CordReader is not going with it.

PiperOrigin-RevId: 284780736

--
28e76c08ea7185a7ff9f4e0e02ae565fbbf7980f by Greg Falcon <gfalcon@google.com>:

Implementation detail change.

Introduce ABSL_NAMESPACE_BEGIN and _END annotation macros which indicate the beginning and end of a `namespace absl` scope.  Currently these do nothing, but they will be used to inject an inline namespace for LTS builds (to avoid symbol collisions against other Abseil versions).

These macros should not be used by end users, because end users should never write `namespace absl {` in their own code.

This CL applies these annotations to all code under //absl/base/.  The rest of Abseil will be annotated in this way in follow-up CLs.

PiperOrigin-RevId: 284776410

--
e1711dc6d696dcca50d4e7d4b4d8f3076575b7ec by Abseil Team <absl-team@google.com>:

--help changed to report long flags.

PiperOrigin-RevId: 284757720

--
78f66a68f428bbbd19d8d60e1125f43ba765fd35 by Tom Manshreck <shreck@google.com>:

Update comment on + or - in SimpleAToi()

PiperOrigin-RevId: 284231843
GitOrigin-RevId: b842b7fd9b1289be31f0b7ee8e62e48e550747cf
Change-Id: I3046b31391bd11c8bc4abab7785a863c377cd757
Diffstat (limited to 'absl/base/internal')
-rw-r--r--absl/base/internal/atomic_hook.h4
-rw-r--r--absl/base/internal/atomic_hook_test_helper.cc2
-rw-r--r--absl/base/internal/atomic_hook_test_helper.h2
-rw-r--r--absl/base/internal/bits.h4
-rw-r--r--absl/base/internal/cycleclock.cc2
-rw-r--r--absl/base/internal/cycleclock.h4
-rw-r--r--absl/base/internal/direct_mmap.h4
-rw-r--r--absl/base/internal/endian.h2
-rw-r--r--absl/base/internal/endian_test.cc2
-rw-r--r--absl/base/internal/exponential_biased.cc2
-rw-r--r--absl/base/internal/exponential_biased.h3
-rw-r--r--absl/base/internal/exponential_biased_test.cc2
-rw-r--r--absl/base/internal/hide_ptr.h4
-rw-r--r--absl/base/internal/identity.h4
-rw-r--r--absl/base/internal/inline_variable_testing.h2
-rw-r--r--absl/base/internal/invoke.h2
-rw-r--r--absl/base/internal/low_level_alloc.cc2
-rw-r--r--absl/base/internal/low_level_alloc.h2
-rw-r--r--absl/base/internal/low_level_alloc_test.cc2
-rw-r--r--absl/base/internal/low_level_scheduling.h2
-rw-r--r--absl/base/internal/periodic_sampler.cc2
-rw-r--r--absl/base/internal/periodic_sampler.h2
-rw-r--r--absl/base/internal/periodic_sampler_benchmark.cc2
-rw-r--r--absl/base/internal/periodic_sampler_test.cc2
-rw-r--r--absl/base/internal/raw_logging.cc2
-rw-r--r--absl/base/internal/raw_logging.h2
-rw-r--r--absl/base/internal/scheduling_mode.h4
-rw-r--r--absl/base/internal/scoped_set_env.cc2
-rw-r--r--absl/base/internal/scoped_set_env.h4
-rw-r--r--absl/base/internal/spinlock.cc2
-rw-r--r--absl/base/internal/spinlock.h2
-rw-r--r--absl/base/internal/spinlock_wait.cc2
-rw-r--r--absl/base/internal/spinlock_wait.h2
-rw-r--r--absl/base/internal/sysinfo.cc2
-rw-r--r--absl/base/internal/sysinfo.h2
-rw-r--r--absl/base/internal/sysinfo_test.cc2
-rw-r--r--absl/base/internal/thread_identity.cc2
-rw-r--r--absl/base/internal/thread_identity.h2
-rw-r--r--absl/base/internal/thread_identity_test.cc2
-rw-r--r--absl/base/internal/throw_delegate.cc2
-rw-r--r--absl/base/internal/throw_delegate.h4
-rw-r--r--absl/base/internal/unaligned_access.h6
-rw-r--r--absl/base/internal/unscaledcycleclock.cc2
-rw-r--r--absl/base/internal/unscaledcycleclock.h2
44 files changed, 111 insertions, 0 deletions
diff --git a/absl/base/internal/atomic_hook.h b/absl/base/internal/atomic_hook.h
index 6df956a6ab66..d885bc059e2f 100644
--- a/absl/base/internal/atomic_hook.h
+++ b/absl/base/internal/atomic_hook.h
@@ -20,6 +20,8 @@
 #include <cstdint>
 #include <utility>
 
+#include "absl/base/config.h"
+
 #ifdef _MSC_FULL_VER
 #define ABSL_HAVE_WORKING_ATOMIC_POINTER 0
 #define ABSL_HAVE_WORKING_CONSTEXPR_STATIC_INIT 0
@@ -29,6 +31,7 @@
 #endif
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 template <typename T>
@@ -170,6 +173,7 @@ class AtomicHook<ReturnType (*)(Args...)> {
 #undef ABSL_HAVE_WORKING_CONSTEXPR_STATIC_INIT
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INTERNAL_ATOMIC_HOOK_H_
diff --git a/absl/base/internal/atomic_hook_test_helper.cc b/absl/base/internal/atomic_hook_test_helper.cc
index fad7a89a6ffa..f95d962b343f 100644
--- a/absl/base/internal/atomic_hook_test_helper.cc
+++ b/absl/base/internal/atomic_hook_test_helper.cc
@@ -18,6 +18,7 @@
 #include "absl/base/internal/atomic_hook.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace atomic_hook_internal {
 
 ABSL_CONST_INIT absl::base_internal::AtomicHook<VoidF> func(DefaultFunc);
@@ -26,4 +27,5 @@ void DefaultFunc() { default_func_calls++; }
 void RegisterFunc(VoidF f) { func.Store(f); }
 
 }  // namespace atomic_hook_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/base/internal/atomic_hook_test_helper.h b/absl/base/internal/atomic_hook_test_helper.h
index 44ff780d6b93..3e72b4977d2f 100644
--- a/absl/base/internal/atomic_hook_test_helper.h
+++ b/absl/base/internal/atomic_hook_test_helper.h
@@ -18,6 +18,7 @@
 #include "absl/base/internal/atomic_hook.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace atomic_hook_internal {
 
 using VoidF = void (*)();
@@ -27,6 +28,7 @@ void DefaultFunc();
 void RegisterFunc(VoidF func);
 
 }  // namespace atomic_hook_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_ATOMIC_HOOK_TEST_HELPER_H_
diff --git a/absl/base/internal/bits.h b/absl/base/internal/bits.h
index 450b923f4a4c..8b03453c184f 100644
--- a/absl/base/internal/bits.h
+++ b/absl/base/internal/bits.h
@@ -20,6 +20,8 @@
 
 #include <cstdint>
 
+#include "absl/base/config.h"
+
 // Clang on Windows has __builtin_clzll; otherwise we need to use the
 // windows intrinsic functions.
 #if defined(_MSC_VER)
@@ -46,6 +48,7 @@
 
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 ABSL_BASE_INTERNAL_FORCEINLINE int CountLeadingZeros64Slow(uint64_t n) {
@@ -209,6 +212,7 @@ ABSL_BASE_INTERNAL_FORCEINLINE int CountTrailingZerosNonZero32(uint32_t n) {
 #undef ABSL_BASE_INTERNAL_FORCEINLINE
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INTERNAL_BITS_H_
diff --git a/absl/base/internal/cycleclock.cc b/absl/base/internal/cycleclock.cc
index e9844b7177a1..0e65005b8914 100644
--- a/absl/base/internal/cycleclock.cc
+++ b/absl/base/internal/cycleclock.cc
@@ -28,6 +28,7 @@
 #include "absl/base/internal/unscaledcycleclock.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 #if ABSL_USE_UNSCALED_CYCLECLOCK
@@ -102,4 +103,5 @@ double CycleClock::Frequency() {
 #endif
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/base/internal/cycleclock.h b/absl/base/internal/cycleclock.h
index 794564e12f17..a18b58444560 100644
--- a/absl/base/internal/cycleclock.h
+++ b/absl/base/internal/cycleclock.h
@@ -44,7 +44,10 @@
 
 #include <cstdint>
 
+#include "absl/base/config.h"
+
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 // -----------------------------------------------------------------------------
@@ -85,6 +88,7 @@ class CycleClockSource {
 };
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INTERNAL_CYCLECLOCK_H_
diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h
index 0401ddfa7e60..5618867ba0c6 100644
--- a/absl/base/internal/direct_mmap.h
+++ b/absl/base/internal/direct_mmap.h
@@ -62,6 +62,7 @@ extern "C" void* __mmap2(void*, size_t, int, int, int, size_t);
 #endif  // __BIONIC__
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 // Platform specific logic extracted from
@@ -128,6 +129,7 @@ inline int DirectMunmap(void* start, size_t length) {
 }
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #else  // !__linux__
@@ -136,6 +138,7 @@ inline int DirectMunmap(void* start, size_t length) {
 // actual mmap()/munmap() methods.
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd,
@@ -148,6 +151,7 @@ inline int DirectMunmap(void* start, size_t length) {
 }
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // __linux__
diff --git a/absl/base/internal/endian.h b/absl/base/internal/endian.h
index 8233cb52433b..9677530e8de3 100644
--- a/absl/base/internal/endian.h
+++ b/absl/base/internal/endian.h
@@ -31,6 +31,7 @@
 #include "absl/base/port.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 
 // Use compiler byte-swapping intrinsics if they are available.  32-bit
 // and 64-bit versions are available in Clang and GCC as of GCC 4.3.0.
@@ -259,6 +260,7 @@ inline void Store64(void *p, uint64_t v) {
 
 }  // namespace big_endian
 
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INTERNAL_ENDIAN_H_
diff --git a/absl/base/internal/endian_test.cc b/absl/base/internal/endian_test.cc
index 98a099e43e7a..aa6b8496905c 100644
--- a/absl/base/internal/endian_test.cc
+++ b/absl/base/internal/endian_test.cc
@@ -24,6 +24,7 @@
 #include "absl/base/config.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace {
 
 const uint64_t kInitialNumber{0x0123456789abcdef};
@@ -260,4 +261,5 @@ TEST(EndianessTest, big_endian) {
 }
 
 }  // namespace
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/base/internal/exponential_biased.cc b/absl/base/internal/exponential_biased.cc
index 7786c303cdd1..1b30c061e3bd 100644
--- a/absl/base/internal/exponential_biased.cc
+++ b/absl/base/internal/exponential_biased.cc
@@ -25,6 +25,7 @@
 #include "absl/base/optimization.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 // The algorithm generates a random number between 0 and 1 and applies the
@@ -88,4 +89,5 @@ void ExponentialBiased::Initialize() {
 }
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/base/internal/exponential_biased.h b/absl/base/internal/exponential_biased.h
index 6701e695ef0e..94f79a3378db 100644
--- a/absl/base/internal/exponential_biased.h
+++ b/absl/base/internal/exponential_biased.h
@@ -17,9 +17,11 @@
 
 #include <stdint.h>
 
+#include "absl/base/config.h"
 #include "absl/base/macros.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 // ExponentialBiased provides a small and fast random number generator for a
@@ -122,6 +124,7 @@ inline uint64_t ExponentialBiased::NextRandom(uint64_t rnd) {
 }
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INTERNAL_EXPONENTIAL_BIASED_H_
diff --git a/absl/base/internal/exponential_biased_test.cc b/absl/base/internal/exponential_biased_test.cc
index af003239f8de..90a482d2a9d5 100644
--- a/absl/base/internal/exponential_biased_test.cc
+++ b/absl/base/internal/exponential_biased_test.cc
@@ -27,6 +27,7 @@
 using ::testing::Ge;
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 MATCHER_P2(IsBetween, a, b,
@@ -194,4 +195,5 @@ TEST(ExponentialBiasedTest, InitializationModes) {
 }
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/base/internal/hide_ptr.h b/absl/base/internal/hide_ptr.h
index cf8f40802469..1dba80909a9b 100644
--- a/absl/base/internal/hide_ptr.h
+++ b/absl/base/internal/hide_ptr.h
@@ -17,7 +17,10 @@
 
 #include <cstdint>
 
+#include "absl/base/config.h"
+
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 // Arbitrary value with high bits set. Xor'ing with it is unlikely
@@ -42,6 +45,7 @@ inline T* UnhidePtr(uintptr_t hidden) {
 }
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INTERNAL_HIDE_PTR_H_
diff --git a/absl/base/internal/identity.h b/absl/base/internal/identity.h
index 086447c6039b..a3154ed7bc59 100644
--- a/absl/base/internal/identity.h
+++ b/absl/base/internal/identity.h
@@ -16,7 +16,10 @@
 #ifndef ABSL_BASE_INTERNAL_IDENTITY_H_
 #define ABSL_BASE_INTERNAL_IDENTITY_H_
 
+#include "absl/base/config.h"
+
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace internal {
 
 template <typename T>
@@ -28,6 +31,7 @@ template <typename T>
 using identity_t = typename identity<T>::type;
 
 }  // namespace internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INTERNAL_IDENTITY_H_
diff --git a/absl/base/internal/inline_variable_testing.h b/absl/base/internal/inline_variable_testing.h
index 15dc481e1010..3856b9f80f20 100644
--- a/absl/base/internal/inline_variable_testing.h
+++ b/absl/base/internal/inline_variable_testing.h
@@ -18,6 +18,7 @@
 #include "absl/base/internal/inline_variable.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace inline_variable_testing_internal {
 
 struct Foo {
@@ -39,6 +40,7 @@ const int& get_int_a();
 const int& get_int_b();
 
 }  // namespace inline_variable_testing_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INLINE_VARIABLE_TESTING_H_
diff --git a/absl/base/internal/invoke.h b/absl/base/internal/invoke.h
index 44f13302f434..c4eceebd7cda 100644
--- a/absl/base/internal/invoke.h
+++ b/absl/base/internal/invoke.h
@@ -45,6 +45,7 @@
 // top of this file for the API documentation.
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 // The five classes below each implement one of the clauses from the definition
@@ -180,6 +181,7 @@ InvokeT<F, Args...> Invoke(F&& f, Args&&... args) {
                                            std::forward<Args>(args)...);
 }
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INTERNAL_INVOKE_H_
diff --git a/absl/base/internal/low_level_alloc.cc b/absl/base/internal/low_level_alloc.cc
index a0638f9ea496..225abc247199 100644
--- a/absl/base/internal/low_level_alloc.cc
+++ b/absl/base/internal/low_level_alloc.cc
@@ -63,6 +63,7 @@
 #endif  // __APPLE__
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 // A first-fit allocator with amortized logarithmic free() time.
@@ -612,6 +613,7 @@ void *LowLevelAlloc::AllocWithArena(size_t request, Arena *arena) {
 }
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_LOW_LEVEL_ALLOC_MISSING
diff --git a/absl/base/internal/low_level_alloc.h b/absl/base/internal/low_level_alloc.h
index c98cdb30235e..db91951c825f 100644
--- a/absl/base/internal/low_level_alloc.h
+++ b/absl/base/internal/low_level_alloc.h
@@ -55,6 +55,7 @@
 #include "absl/base/port.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 class LowLevelAlloc {
@@ -119,6 +120,7 @@ class LowLevelAlloc {
 };
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INTERNAL_LOW_LEVEL_ALLOC_H_
diff --git a/absl/base/internal/low_level_alloc_test.cc b/absl/base/internal/low_level_alloc_test.cc
index 34a080cb15a6..7abbbf9c594e 100644
--- a/absl/base/internal/low_level_alloc_test.cc
+++ b/absl/base/internal/low_level_alloc_test.cc
@@ -22,6 +22,7 @@
 #include <utility>
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 namespace {
 
@@ -149,6 +150,7 @@ static struct BeforeMain {
 
 }  // namespace
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 int main(int argc, char *argv[]) {
diff --git a/absl/base/internal/low_level_scheduling.h b/absl/base/internal/low_level_scheduling.h
index 0fcc8d3bed97..961cc981b864 100644
--- a/absl/base/internal/low_level_scheduling.h
+++ b/absl/base/internal/low_level_scheduling.h
@@ -28,6 +28,7 @@ extern "C" bool __google_disable_rescheduling(void);
 extern "C" void __google_enable_rescheduling(bool disable_result);
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 class SchedulingHelper;  // To allow use of SchedulingGuard.
@@ -100,6 +101,7 @@ inline void SchedulingGuard::EnableRescheduling(bool /* disable_result */) {
 }
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INTERNAL_LOW_LEVEL_SCHEDULING_H_
diff --git a/absl/base/internal/periodic_sampler.cc b/absl/base/internal/periodic_sampler.cc
index 87c3c85ae3e2..520dabbaa006 100644
--- a/absl/base/internal/periodic_sampler.cc
+++ b/absl/base/internal/periodic_sampler.cc
@@ -19,6 +19,7 @@
 #include "absl/base/internal/exponential_biased.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 int64_t PeriodicSamplerBase::GetExponentialBiased(int period) noexcept {
@@ -48,4 +49,5 @@ bool PeriodicSamplerBase::SubtleConfirmSample() noexcept {
 }
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/base/internal/periodic_sampler.h b/absl/base/internal/periodic_sampler.h
index 238797424fc0..f8a86796b117 100644
--- a/absl/base/internal/periodic_sampler.h
+++ b/absl/base/internal/periodic_sampler.h
@@ -23,6 +23,7 @@
 #include "absl/base/optimization.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 // PeriodicSamplerBase provides the basic period sampler implementation.
@@ -204,6 +205,7 @@ template <typename Tag, int default_period>
 std::atomic<int> PeriodicSampler<Tag, default_period>::period_(default_period);
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INTERNAL_PERIODIC_SAMPLER_H_
diff --git a/absl/base/internal/periodic_sampler_benchmark.cc b/absl/base/internal/periodic_sampler_benchmark.cc
index 037596321776..5ad469ce79c2 100644
--- a/absl/base/internal/periodic_sampler_benchmark.cc
+++ b/absl/base/internal/periodic_sampler_benchmark.cc
@@ -16,6 +16,7 @@
 #include "absl/base/internal/periodic_sampler.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 namespace {
 
@@ -74,4 +75,5 @@ BENCHMARK(BM_PeriodicSampler_Disabled);
 
 }  // namespace
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/base/internal/periodic_sampler_test.cc b/absl/base/internal/periodic_sampler_test.cc
index 29f4d24d6323..3b301e37ab98 100644
--- a/absl/base/internal/periodic_sampler_test.cc
+++ b/absl/base/internal/periodic_sampler_test.cc
@@ -22,6 +22,7 @@
 #include "absl/base/macros.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 namespace {
 
@@ -172,4 +173,5 @@ TEST(PeriodicSamplerTest, SetGlobalPeriod) {
 
 }  // namespace
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/base/internal/raw_logging.cc b/absl/base/internal/raw_logging.cc
index d20bf34ef538..d79c5486658e 100644
--- a/absl/base/internal/raw_logging.cc
+++ b/absl/base/internal/raw_logging.cc
@@ -182,6 +182,7 @@ void RawLogVA(absl::LogSeverity severity, const char* file, int line,
 }  // namespace
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace raw_logging_internal {
 void SafeWriteToStderr(const char *s, size_t len) {
 #if defined(ABSL_HAVE_SYSCALL_WRITE)
@@ -232,4 +233,5 @@ void RegisterInternalLogFunction(InternalLogFunction func) {
 }
 
 }  // namespace raw_logging_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/base/internal/raw_logging.h b/absl/base/internal/raw_logging.h
index 49c8dfbf1b01..12145c48f569 100644
--- a/absl/base/internal/raw_logging.h
+++ b/absl/base/internal/raw_logging.h
@@ -93,6 +93,7 @@
   ::absl::NormalizeLogSeverity(severity)
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace raw_logging_internal {
 
 // Helper function to implement ABSL_RAW_LOG
@@ -172,6 +173,7 @@ extern base_internal::AtomicHook<InternalLogFunction> internal_log_function;
 void RegisterInternalLogFunction(InternalLogFunction func);
 
 }  // namespace raw_logging_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INTERNAL_RAW_LOGGING_H_
diff --git a/absl/base/internal/scheduling_mode.h b/absl/base/internal/scheduling_mode.h
index d5b4b7fd54ff..8be5ab6dd3c0 100644
--- a/absl/base/internal/scheduling_mode.h
+++ b/absl/base/internal/scheduling_mode.h
@@ -18,7 +18,10 @@
 #ifndef ABSL_BASE_INTERNAL_SCHEDULING_MODE_H_
 #define ABSL_BASE_INTERNAL_SCHEDULING_MODE_H_
 
+#include "absl/base/config.h"
+
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 // Used to describe how a thread may be scheduled.  Typically associated with
@@ -49,6 +52,7 @@ enum SchedulingMode {
 };
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INTERNAL_SCHEDULING_MODE_H_
diff --git a/absl/base/internal/scoped_set_env.cc b/absl/base/internal/scoped_set_env.cc
index 3ac3f68ddf90..8a934cb51191 100644
--- a/absl/base/internal/scoped_set_env.cc
+++ b/absl/base/internal/scoped_set_env.cc
@@ -23,6 +23,7 @@
 #include "absl/base/internal/raw_logging.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 namespace {
@@ -76,4 +77,5 @@ ScopedSetEnv::~ScopedSetEnv() {
 }
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/base/internal/scoped_set_env.h b/absl/base/internal/scoped_set_env.h
index 855b22fd41fe..19ec7b5d8a04 100644
--- a/absl/base/internal/scoped_set_env.h
+++ b/absl/base/internal/scoped_set_env.h
@@ -19,7 +19,10 @@
 
 #include <string>
 
+#include "absl/base/config.h"
+
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 class ScopedSetEnv {
@@ -36,6 +39,7 @@ class ScopedSetEnv {
 };
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INTERNAL_SCOPED_SET_ENV_H_
diff --git a/absl/base/internal/spinlock.cc b/absl/base/internal/spinlock.cc
index 7354438fbacb..8dd8dab9e20c 100644
--- a/absl/base/internal/spinlock.cc
+++ b/absl/base/internal/spinlock.cc
@@ -54,6 +54,7 @@
 //          holder to acquire the lock.  There may be outstanding waiter(s).
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 ABSL_CONST_INIT static base_internal::AtomicHook<void (*)(const void *lock,
@@ -228,4 +229,5 @@ uint64_t SpinLock::DecodeWaitCycles(uint32_t lock_value) {
 }
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/base/internal/spinlock.h b/absl/base/internal/spinlock.h
index 1d1bd6cfcf5a..24e2e9a6f820 100644
--- a/absl/base/internal/spinlock.h
+++ b/absl/base/internal/spinlock.h
@@ -46,6 +46,7 @@
 #include "absl/base/thread_annotations.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 class ABSL_LOCKABLE SpinLock {
@@ -236,6 +237,7 @@ inline uint32_t SpinLock::TryLockInternal(uint32_t lock_value,
 }
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INTERNAL_SPINLOCK_H_
diff --git a/absl/base/internal/spinlock_wait.cc b/absl/base/internal/spinlock_wait.cc
index fac8a21db4c5..fa824be1c008 100644
--- a/absl/base/internal/spinlock_wait.cc
+++ b/absl/base/internal/spinlock_wait.cc
@@ -32,6 +32,7 @@
 #endif
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 // See spinlock_wait.h for spec.
@@ -76,4 +77,5 @@ int SpinLockSuggestedDelayNS(int loop) {
 }
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/base/internal/spinlock_wait.h b/absl/base/internal/spinlock_wait.h
index 6642ce1ab310..169bc749fbc5 100644
--- a/absl/base/internal/spinlock_wait.h
+++ b/absl/base/internal/spinlock_wait.h
@@ -24,6 +24,7 @@
 #include "absl/base/internal/scheduling_mode.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 // SpinLockWait() waits until it can perform one of several transitions from
@@ -62,6 +63,7 @@ void SpinLockDelay(std::atomic<uint32_t> *w, uint32_t value, int loop,
 int SpinLockSuggestedDelayNS(int loop);
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 // In some build configurations we pass --detect-odr-violations to the
diff --git a/absl/base/internal/sysinfo.cc b/absl/base/internal/sysinfo.cc
index 68d4266b70cc..7945322f582e 100644
--- a/absl/base/internal/sysinfo.cc
+++ b/absl/base/internal/sysinfo.cc
@@ -55,6 +55,7 @@
 #include "absl/base/internal/unscaledcycleclock.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 static once_flag init_system_info_once;
@@ -409,4 +410,5 @@ pid_t GetTID() {
 #endif
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/base/internal/sysinfo.h b/absl/base/internal/sysinfo.h
index 93356d80d1c9..7246d5dd95c3 100644
--- a/absl/base/internal/sysinfo.h
+++ b/absl/base/internal/sysinfo.h
@@ -33,6 +33,7 @@
 #include "absl/base/port.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 // Nominal core processor cycles per second of each processor.   This is _not_
@@ -59,6 +60,7 @@ using pid_t = uint32_t;
 pid_t GetTID();
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INTERNAL_SYSINFO_H_
diff --git a/absl/base/internal/sysinfo_test.cc b/absl/base/internal/sysinfo_test.cc
index 82bbcc2b3bd3..cdec9b6a4ece 100644
--- a/absl/base/internal/sysinfo_test.cc
+++ b/absl/base/internal/sysinfo_test.cc
@@ -28,6 +28,7 @@
 #include "absl/synchronization/mutex.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 namespace {
 
@@ -95,4 +96,5 @@ TEST(SysinfoTest, LinuxGetTID) {
 
 }  // namespace
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/base/internal/thread_identity.cc b/absl/base/internal/thread_identity.cc
index 0ea159c58628..6a28f246dbdb 100644
--- a/absl/base/internal/thread_identity.cc
+++ b/absl/base/internal/thread_identity.cc
@@ -28,6 +28,7 @@
 #include "absl/base/internal/spinlock.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 #if ABSL_THREAD_IDENTITY_MODE != ABSL_THREAD_IDENTITY_MODE_USE_CPP11
@@ -135,4 +136,5 @@ ThreadIdentity* CurrentThreadIdentityIfPresent() {
 #endif
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/base/internal/thread_identity.h b/absl/base/internal/thread_identity.h
index 7cbce9cc8e02..a1aa45ff2e42 100644
--- a/absl/base/internal/thread_identity.h
+++ b/absl/base/internal/thread_identity.h
@@ -33,6 +33,7 @@
 #include "absl/base/internal/per_thread_tls.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 
 struct SynchLocksHeld;
 struct SynchWaitParams;
@@ -243,6 +244,7 @@ inline ThreadIdentity* CurrentThreadIdentityIfPresent() {
 #endif
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INTERNAL_THREAD_IDENTITY_H_
diff --git a/absl/base/internal/thread_identity_test.cc b/absl/base/internal/thread_identity_test.cc
index 13bfbe3bdbc1..3685779ce8f5 100644
--- a/absl/base/internal/thread_identity_test.cc
+++ b/absl/base/internal/thread_identity_test.cc
@@ -25,6 +25,7 @@
 #include "absl/synchronization/mutex.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 namespace {
 
@@ -123,4 +124,5 @@ TEST(ThreadIdentityTest, ReusedThreadIdentityMutexTest) {
 
 }  // namespace
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/base/internal/throw_delegate.cc b/absl/base/internal/throw_delegate.cc
index 8e928b8a257e..c055f75d9d28 100644
--- a/absl/base/internal/throw_delegate.cc
+++ b/absl/base/internal/throw_delegate.cc
@@ -22,6 +22,7 @@
 #include "absl/base/internal/raw_logging.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 namespace {
@@ -103,4 +104,5 @@ void ThrowStdBadFunctionCall() { Throw(std::bad_function_call()); }
 void ThrowStdBadAlloc() { Throw(std::bad_alloc()); }
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/base/internal/throw_delegate.h b/absl/base/internal/throw_delegate.h
index 03c700b5ee08..075f5272543a 100644
--- a/absl/base/internal/throw_delegate.h
+++ b/absl/base/internal/throw_delegate.h
@@ -19,7 +19,10 @@
 
 #include <string>
 
+#include "absl/base/config.h"
+
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 // Helper functions that allow throwing exceptions consistently from anywhere.
@@ -66,6 +69,7 @@ namespace base_internal {
 // [[noreturn]] void ThrowStdBadArrayNewLength();
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_BASE_INTERNAL_THROW_DELEGATE_H_
diff --git a/absl/base/internal/unaligned_access.h b/absl/base/internal/unaligned_access.h
index 2cf7c1d45b3f..6be56c865b3d 100644
--- a/absl/base/internal/unaligned_access.h
+++ b/absl/base/internal/unaligned_access.h
@@ -18,9 +18,11 @@
 #define ABSL_BASE_INTERNAL_UNALIGNED_ACCESS_H_
 
 #include <string.h>
+
 #include <cstdint>
 
 #include "absl/base/attributes.h"
+#include "absl/base/config.h"
 
 // unaligned APIs
 
@@ -56,6 +58,7 @@ void __sanitizer_unaligned_store64(void *p, uint64_t v);
 }  // extern "C"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 inline uint16_t UnalignedLoad16(const void *p) {
@@ -83,6 +86,7 @@ inline void UnalignedStore64(void *p, uint64_t v) {
 }
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #define ABSL_INTERNAL_UNALIGNED_LOAD16(_p) \
@@ -102,6 +106,7 @@ inline void UnalignedStore64(void *p, uint64_t v) {
 #else
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 inline uint16_t UnalignedLoad16(const void *p) {
@@ -129,6 +134,7 @@ inline void UnalignedStore32(void *p, uint32_t v) { memcpy(p, &v, sizeof v); }
 inline void UnalignedStore64(void *p, uint64_t v) { memcpy(p, &v, sizeof v); }
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #define ABSL_INTERNAL_UNALIGNED_LOAD16(_p) \
diff --git a/absl/base/internal/unscaledcycleclock.cc b/absl/base/internal/unscaledcycleclock.cc
index 593762bc8b8a..a32936aeab4e 100644
--- a/absl/base/internal/unscaledcycleclock.cc
+++ b/absl/base/internal/unscaledcycleclock.cc
@@ -27,6 +27,7 @@
 #include "absl/base/internal/sysinfo.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace base_internal {
 
 #if defined(__i386__)
@@ -96,6 +97,7 @@ double UnscaledCycleClock::Frequency() {
 #endif
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_USE_UNSCALED_CYCLECLOCK
diff --git a/absl/base/internal/unscaledcycleclock.h b/absl/base/internal/unscaledcycleclock.h
index 2d361e962841..cdce9bf8a83c 100644
--- a/absl/base/internal/unscaledcycleclock.h
+++ b/absl/base/internal/unscaledcycleclock.h
@@ -86,6 +86,7 @@
 #endif
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace time_internal {
 class UnscaledCycleClockWrapperForGetCurrentTime;
 }  // namespace time_internal
@@ -115,6 +116,7 @@ class UnscaledCycleClock {
 };
 
 }  // namespace base_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_USE_UNSCALED_CYCLECLOCK