about summary refs log tree commit diff
path: root/absl/random/internal
diff options
context:
space:
mode:
Diffstat (limited to 'absl/random/internal')
-rw-r--r--absl/random/internal/BUILD.bazel9
-rw-r--r--absl/random/internal/chi_square.cc2
-rw-r--r--absl/random/internal/chi_square.h4
-rw-r--r--absl/random/internal/distribution_caller.h4
-rw-r--r--absl/random/internal/distribution_test_util.cc2
-rw-r--r--absl/random/internal/distribution_test_util.h2
-rw-r--r--absl/random/internal/distributions.h2
-rw-r--r--absl/random/internal/explicit_seed_seq.h4
-rw-r--r--absl/random/internal/fast_uniform_bits.h4
-rw-r--r--absl/random/internal/fast_uniform_bits_test.cc2
-rw-r--r--absl/random/internal/fastmath.h2
-rw-r--r--absl/random/internal/gaussian_distribution_gentables.cc2
-rw-r--r--absl/random/internal/generate_real.h2
-rw-r--r--absl/random/internal/iostream_state_saver.h2
-rw-r--r--absl/random/internal/mock_overload_set.h2
-rw-r--r--absl/random/internal/mocking_bit_gen_base.h2
-rw-r--r--absl/random/internal/nanobenchmark.cc2
-rw-r--r--absl/random/internal/nanobenchmark.h4
-rw-r--r--absl/random/internal/nanobenchmark_test.cc2
-rw-r--r--absl/random/internal/nonsecure_base.h2
-rw-r--r--absl/random/internal/pcg_engine.h2
-rw-r--r--absl/random/internal/pool_urbg.cc2
-rw-r--r--absl/random/internal/pool_urbg.h2
-rw-r--r--absl/random/internal/randen.cc2
-rw-r--r--absl/random/internal/randen.h2
-rw-r--r--absl/random/internal/randen_detect.cc2
-rw-r--r--absl/random/internal/randen_detect.h4
-rw-r--r--absl/random/internal/randen_engine.h2
-rw-r--r--absl/random/internal/randen_hwaes.cc4
-rw-r--r--absl/random/internal/randen_hwaes.h4
-rw-r--r--absl/random/internal/randen_slow.cc2
-rw-r--r--absl/random/internal/randen_slow.h4
-rw-r--r--absl/random/internal/randen_traits.h4
-rw-r--r--absl/random/internal/salted_seed_seq.h2
-rw-r--r--absl/random/internal/seed_material.cc2
-rw-r--r--absl/random/internal/seed_material.h2
-rw-r--r--absl/random/internal/sequence_urbg.h4
-rw-r--r--absl/random/internal/traits.h2
-rw-r--r--absl/random/internal/uniform_helper.h2
-rw-r--r--absl/random/internal/wide_multiply.h2
40 files changed, 109 insertions, 0 deletions
diff --git a/absl/random/internal/BUILD.bazel b/absl/random/internal/BUILD.bazel
index 952929ea264d..d7ad4efec989 100644
--- a/absl/random/internal/BUILD.bazel
+++ b/absl/random/internal/BUILD.bazel
@@ -51,6 +51,7 @@ cc_library(
     visibility = [
         "//absl/random:__pkg__",
     ],
+    deps = ["//absl/base:config"],
 )
 
 cc_library(
@@ -78,6 +79,7 @@ cc_library(
     visibility = [
         "//absl/random:__pkg__",
     ],
+    deps = ["//absl/base:config"],
 )
 
 cc_library(
@@ -138,6 +140,7 @@ cc_library(
     ],
     copts = ABSL_DEFAULT_COPTS,
     linkopts = ABSL_DEFAULT_LINKOPTS,
+    deps = ["//absl/base:config"],
 )
 
 cc_library(
@@ -148,6 +151,7 @@ cc_library(
     ],
     copts = ABSL_DEFAULT_COPTS,
     linkopts = ABSL_DEFAULT_LINKOPTS,
+    deps = ["//absl/base:config"],
 )
 
 cc_library(
@@ -269,6 +273,7 @@ cc_library(
         "randen-keys.inc",
         "platform.h",
     ],
+    deps = ["//absl/base:config"],
 )
 
 cc_library(
@@ -297,6 +302,7 @@ cc_library(
     linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":platform",
+        "//absl/base:config",
         "//absl/base:core_headers",
     ],
 )
@@ -317,6 +323,7 @@ cc_library(
     deps = [
         ":platform",
         ":randen_hwaes_impl",
+        "//absl/base:config",
     ],
 )
 
@@ -338,6 +345,7 @@ cc_library(
     linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":platform",
+        "//absl/base:config",
         "//absl/base:core_headers",
     ],
 )
@@ -368,6 +376,7 @@ cc_library(
     copts = ABSL_DEFAULT_COPTS,
     linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
+        "//absl/base:config",
         "//absl/base:core_headers",
         "//absl/base:raw_logging_internal",
         "//absl/strings",
diff --git a/absl/random/internal/chi_square.cc b/absl/random/internal/chi_square.cc
index c0acc9477883..640d48cea6f4 100644
--- a/absl/random/internal/chi_square.cc
+++ b/absl/random/internal/chi_square.cc
@@ -19,6 +19,7 @@
 #include "absl/random/internal/distribution_test_util.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 namespace {
 
@@ -227,4 +228,5 @@ double ChiSquarePValue(double chi_square, int dof) {
 }
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/random/internal/chi_square.h b/absl/random/internal/chi_square.h
index fa8646f274cd..07f4fbe52298 100644
--- a/absl/random/internal/chi_square.h
+++ b/absl/random/internal/chi_square.h
@@ -26,7 +26,10 @@
 
 #include <cassert>
 
+#include "absl/base/config.h"
+
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 constexpr const char kChiSquared[] = "chi-squared";
@@ -80,6 +83,7 @@ double ChiSquareValue(int dof, double p);
 double ChiSquarePValue(double chi_square, int dof);
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_CHI_SQUARE_H_
diff --git a/absl/random/internal/distribution_caller.h b/absl/random/internal/distribution_caller.h
index 0318e1f8072e..02603cf84355 100644
--- a/absl/random/internal/distribution_caller.h
+++ b/absl/random/internal/distribution_caller.h
@@ -19,7 +19,10 @@
 
 #include <utility>
 
+#include "absl/base/config.h"
+
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // DistributionCaller provides an opportunity to overload the general
@@ -51,6 +54,7 @@ struct DistributionCaller {
 };
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_DISTRIBUTION_CALLER_H_
diff --git a/absl/random/internal/distribution_test_util.cc b/absl/random/internal/distribution_test_util.cc
index 85c8d596ebf8..e9005658c0a7 100644
--- a/absl/random/internal/distribution_test_util.cc
+++ b/absl/random/internal/distribution_test_util.cc
@@ -25,6 +25,7 @@
 #include "absl/strings/str_format.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 namespace {
 
@@ -413,4 +414,5 @@ double MaxErrorTolerance(double acceptance_probability) {
 }
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/random/internal/distribution_test_util.h b/absl/random/internal/distribution_test_util.h
index b5ba49fa7e1e..6d94cf6c97bf 100644
--- a/absl/random/internal/distribution_test_util.h
+++ b/absl/random/internal/distribution_test_util.h
@@ -26,6 +26,7 @@
 // non-test code.
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // http://webspace.ship.edu/pgmarr/Geo441/Lectures/Lec%205%20-%20Normality%20Testing.pdf
@@ -106,6 +107,7 @@ double BetaIncomplete(double x, double p, double q);
 double BetaIncompleteInv(double p, double q, double alpha);
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_DISTRIBUTION_TEST_UTIL_H_
diff --git a/absl/random/internal/distributions.h b/absl/random/internal/distributions.h
index c8cec02b7fbc..d7e3c0161f06 100644
--- a/absl/random/internal/distributions.h
+++ b/absl/random/internal/distributions.h
@@ -23,6 +23,7 @@
 #include "absl/random/internal/uniform_helper.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // In the absence of an explicitly provided return-type, the template
@@ -45,6 +46,7 @@ using uniform_inferred_return_t =
                           is_widening_convertible<A, B>::value, B, A>::type>;
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_DISTRIBUTIONS_H_
diff --git a/absl/random/internal/explicit_seed_seq.h b/absl/random/internal/explicit_seed_seq.h
index b660ece50017..6a743eaf46cc 100644
--- a/absl/random/internal/explicit_seed_seq.h
+++ b/absl/random/internal/explicit_seed_seq.h
@@ -22,7 +22,10 @@
 #include <iterator>
 #include <vector>
 
+#include "absl/base/config.h"
+
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // This class conforms to the C++ Standard "Seed Sequence" concept
@@ -82,6 +85,7 @@ class ExplicitSeedSeq {
 };
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_EXPLICIT_SEED_SEQ_H_
diff --git a/absl/random/internal/fast_uniform_bits.h b/absl/random/internal/fast_uniform_bits.h
index e8df92f3d99f..f13c8729f7c8 100644
--- a/absl/random/internal/fast_uniform_bits.h
+++ b/absl/random/internal/fast_uniform_bits.h
@@ -20,7 +20,10 @@
 #include <limits>
 #include <type_traits>
 
+#include "absl/base/config.h"
+
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 // Returns true if the input value is zero or a power of two. Useful for
 // determining if the range of output values in a URBG
@@ -255,6 +258,7 @@ FastUniformBits<UIntType>::Generate(URBG& g,  // NOLINT(runtime/references)
 }
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_FAST_UNIFORM_BITS_H_
diff --git a/absl/random/internal/fast_uniform_bits_test.cc b/absl/random/internal/fast_uniform_bits_test.cc
index 9f2e82687dd6..f5b837e5861b 100644
--- a/absl/random/internal/fast_uniform_bits_test.cc
+++ b/absl/random/internal/fast_uniform_bits_test.cc
@@ -19,6 +19,7 @@
 #include "gtest/gtest.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 namespace {
 
@@ -269,4 +270,5 @@ TEST(FastUniformBitsTest, URBG32bitRegression) {
 
 }  // namespace
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/random/internal/fastmath.h b/absl/random/internal/fastmath.h
index 4bd184105399..6baeb5a7c917 100644
--- a/absl/random/internal/fastmath.h
+++ b/absl/random/internal/fastmath.h
@@ -25,6 +25,7 @@
 #include "absl/base/internal/bits.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // Returns the position of the first bit set.
@@ -67,6 +68,7 @@ inline constexpr uint64_t rotr(uint64_t value, uint8_t bits) {
 }
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_FASTMATH_H_
diff --git a/absl/random/internal/gaussian_distribution_gentables.cc b/absl/random/internal/gaussian_distribution_gentables.cc
index 16a23cb2f91f..a2bf03940f67 100644
--- a/absl/random/internal/gaussian_distribution_gentables.cc
+++ b/absl/random/internal/gaussian_distribution_gentables.cc
@@ -27,6 +27,7 @@
 #include "absl/base/macros.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 namespace {
 
@@ -135,6 +136,7 @@ void TableGenerator::Print(std::ostream* os) {
 }
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 int main(int, char**) {
diff --git a/absl/random/internal/generate_real.h b/absl/random/internal/generate_real.h
index 246d863e56e4..20f6d20807d5 100644
--- a/absl/random/internal/generate_real.h
+++ b/absl/random/internal/generate_real.h
@@ -29,6 +29,7 @@
 #include "absl/random/internal/traits.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // Tristate tag types controlling the output of GenerateRealFromBits.
@@ -139,6 +140,7 @@ inline RealType GenerateRealFromBits(uint64_t bits, int exp_bias = 0) {
 }
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_GENERATE_REAL_H_
diff --git a/absl/random/internal/iostream_state_saver.h b/absl/random/internal/iostream_state_saver.h
index df88fa76bcde..7378829a423c 100644
--- a/absl/random/internal/iostream_state_saver.h
+++ b/absl/random/internal/iostream_state_saver.h
@@ -24,6 +24,7 @@
 #include "absl/numeric/int128.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // The null_state_saver does nothing.
@@ -238,6 +239,7 @@ inline FloatType read_floating_point(IStream& is) {
 }
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_IOSTREAM_STATE_SAVER_H_
diff --git a/absl/random/internal/mock_overload_set.h b/absl/random/internal/mock_overload_set.h
index 539313d73c95..c2a30d89d52b 100644
--- a/absl/random/internal/mock_overload_set.h
+++ b/absl/random/internal/mock_overload_set.h
@@ -23,6 +23,7 @@
 #include "absl/random/mocking_bit_gen.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 template <typename DistrT, typename Fn>
@@ -85,5 +86,6 @@ struct MockOverloadSet<DistrT, FirstSig, Rest...>
 };
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 #endif  // ABSL_RANDOM_INTERNAL_MOCK_OVERLOAD_SET_H_
diff --git a/absl/random/internal/mocking_bit_gen_base.h b/absl/random/internal/mocking_bit_gen_base.h
index aff2ba6df3e7..eeeae9d295b2 100644
--- a/absl/random/internal/mocking_bit_gen_base.h
+++ b/absl/random/internal/mocking_bit_gen_base.h
@@ -25,6 +25,7 @@
 #include "absl/strings/str_cat.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // MockingBitGenExpectationFormatter is invoked to format unsatisfied mocks
@@ -113,6 +114,7 @@ class MockingBitGenBase {
 };  // namespace random_internal
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_MOCKING_BIT_GEN_BASE_H_
diff --git a/absl/random/internal/nanobenchmark.cc b/absl/random/internal/nanobenchmark.cc
index feb81c859585..8fee77fcc776 100644
--- a/absl/random/internal/nanobenchmark.cc
+++ b/absl/random/internal/nanobenchmark.cc
@@ -70,6 +70,7 @@
 #endif
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal_nanobenchmark {
 namespace {
 
@@ -799,4 +800,5 @@ size_t Measure(const Func func, const void* arg, const FuncInput* inputs,
 }
 
 }  // namespace random_internal_nanobenchmark
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/random/internal/nanobenchmark.h b/absl/random/internal/nanobenchmark.h
index c2b650d191b7..a5097ba27b0f 100644
--- a/absl/random/internal/nanobenchmark.h
+++ b/absl/random/internal/nanobenchmark.h
@@ -50,7 +50,10 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include "absl/base/config.h"
+
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal_nanobenchmark {
 
 // Input influencing the function being measured (e.g. number of bytes to copy).
@@ -163,6 +166,7 @@ static inline size_t MeasureClosure(const Closure& closure,
 }
 
 }  // namespace random_internal_nanobenchmark
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_NANOBENCHMARK_H_
diff --git a/absl/random/internal/nanobenchmark_test.cc b/absl/random/internal/nanobenchmark_test.cc
index 383345a8b474..ab824ef55fd9 100644
--- a/absl/random/internal/nanobenchmark_test.cc
+++ b/absl/random/internal/nanobenchmark_test.cc
@@ -18,6 +18,7 @@
 #include "absl/strings/numbers.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal_nanobenchmark {
 namespace {
 
@@ -67,6 +68,7 @@ void RunAll(const int argc, char* argv[]) {
 
 }  // namespace
 }  // namespace random_internal_nanobenchmark
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 int main(int argc, char* argv[]) {
diff --git a/absl/random/internal/nonsecure_base.h b/absl/random/internal/nonsecure_base.h
index 8847e74bef6b..730fa2ea12d2 100644
--- a/absl/random/internal/nonsecure_base.h
+++ b/absl/random/internal/nonsecure_base.h
@@ -33,6 +33,7 @@
 #include "absl/types/span.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // Each instance of NonsecureURBGBase<URBG> will be seeded by variates produced
@@ -143,6 +144,7 @@ class NonsecureURBGBase {
 };
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_NONSECURE_BASE_H_
diff --git a/absl/random/internal/pcg_engine.h b/absl/random/internal/pcg_engine.h
index b5df4eafffa4..53c23fe1b492 100644
--- a/absl/random/internal/pcg_engine.h
+++ b/absl/random/internal/pcg_engine.h
@@ -24,6 +24,7 @@
 #include "absl/random/internal/iostream_state_saver.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // pcg_engine is a simplified implementation of Melissa O'Neil's PCG engine in
@@ -300,6 +301,7 @@ using pcg32_2018_engine = pcg_engine<
     random_internal::pcg_xsh_rr_64_32>;
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_PCG_ENGINE_H_
diff --git a/absl/random/internal/pool_urbg.cc b/absl/random/internal/pool_urbg.cc
index f2e1c1f6fe26..5bee530770eb 100644
--- a/absl/random/internal/pool_urbg.cc
+++ b/absl/random/internal/pool_urbg.cc
@@ -37,6 +37,7 @@ using absl::base_internal::SpinLock;
 using absl::base_internal::SpinLockHolder;
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 namespace {
 
@@ -249,4 +250,5 @@ template class RandenPool<uint32_t>;
 template class RandenPool<uint64_t>;
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/random/internal/pool_urbg.h b/absl/random/internal/pool_urbg.h
index 9b2dd4bfceeb..05721929f54e 100644
--- a/absl/random/internal/pool_urbg.h
+++ b/absl/random/internal/pool_urbg.h
@@ -22,6 +22,7 @@
 #include "absl/types/span.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // RandenPool is a thread-safe random number generator [random.req.urbg] that
@@ -124,6 +125,7 @@ class PoolURBG {
 };
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_POOL_URBG_H_
diff --git a/absl/random/internal/randen.cc b/absl/random/internal/randen.cc
index bab8075a54f8..78a1e00c0832 100644
--- a/absl/random/internal/randen.cc
+++ b/absl/random/internal/randen.cc
@@ -41,6 +41,7 @@
 // structured/low-entropy counters to digits of Pi.
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 namespace {
 
@@ -86,4 +87,5 @@ Randen::Randen() {
 }
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/random/internal/randen.h b/absl/random/internal/randen.h
index a4ff25459688..c2834aaf3d2c 100644
--- a/absl/random/internal/randen.h
+++ b/absl/random/internal/randen.h
@@ -23,6 +23,7 @@
 #include "absl/random/internal/randen_traits.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // RANDen = RANDom generator or beetroots in Swiss German.
@@ -95,6 +96,7 @@ class Randen {
 };
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_RANDEN_H_
diff --git a/absl/random/internal/randen_detect.cc b/absl/random/internal/randen_detect.cc
index d5946b219cc2..d63230c25583 100644
--- a/absl/random/internal/randen_detect.cc
+++ b/absl/random/internal/randen_detect.cc
@@ -95,6 +95,7 @@ static uint32_t GetAuxval(uint32_t hwcap_type) {
 #endif
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // The default return at the end of the function might be unreachable depending
@@ -216,4 +217,5 @@ bool CPUSupportsRandenHwAes() {
 #endif
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/random/internal/randen_detect.h b/absl/random/internal/randen_detect.h
index 44c5c6672391..f283f4322647 100644
--- a/absl/random/internal/randen_detect.h
+++ b/absl/random/internal/randen_detect.h
@@ -15,7 +15,10 @@
 #ifndef ABSL_RANDOM_INTERNAL_RANDEN_DETECT_H_
 #define ABSL_RANDOM_INTERNAL_RANDEN_DETECT_H_
 
+#include "absl/base/config.h"
+
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // Returns whether the current CPU supports RandenHwAes implementation.
@@ -24,6 +27,7 @@ namespace random_internal {
 bool CPUSupportsRandenHwAes();
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_RANDEN_DETECT_H_
diff --git a/absl/random/internal/randen_engine.h b/absl/random/internal/randen_engine.h
index 02212a137c36..6b33731336e7 100644
--- a/absl/random/internal/randen_engine.h
+++ b/absl/random/internal/randen_engine.h
@@ -28,6 +28,7 @@
 #include "absl/random/internal/randen.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // Deterministic pseudorandom byte generator with backtracking resistance
@@ -223,6 +224,7 @@ class alignas(16) randen_engine {
 };
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_RANDEN_ENGINE_H_
diff --git a/absl/random/internal/randen_hwaes.cc b/absl/random/internal/randen_hwaes.cc
index 6cc36fd39b5e..e23844f12e56 100644
--- a/absl/random/internal/randen_hwaes.cc
+++ b/absl/random/internal/randen_hwaes.cc
@@ -75,6 +75,7 @@
 #include <cstdlib>
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // No accelerated implementation.
@@ -106,6 +107,7 @@ void RandenHwAes::Generate(const void*, void*) {
 }
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #else  // defined(ABSL_RANDEN_HWAES_IMPL)
@@ -518,6 +520,7 @@ inline ABSL_TARGET_CRYPTO void Permute(
 }  // namespace
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 bool HasRandenHwAesImplementation() { return true; }
@@ -629,6 +632,7 @@ void ABSL_TARGET_CRYPTO RandenHwAes::Generate(const void* keys,
 #endif
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // (ABSL_RANDEN_HWAES_IMPL)
diff --git a/absl/random/internal/randen_hwaes.h b/absl/random/internal/randen_hwaes.h
index d8e6055f01a9..bce36b522609 100644
--- a/absl/random/internal/randen_hwaes.h
+++ b/absl/random/internal/randen_hwaes.h
@@ -15,12 +15,15 @@
 #ifndef ABSL_RANDOM_INTERNAL_RANDEN_HWAES_H_
 #define ABSL_RANDOM_INTERNAL_RANDEN_HWAES_H_
 
+#include "absl/base/config.h"
+
 // HERMETIC NOTE: The randen_hwaes target must not introduce duplicate
 // symbols from arbitrary system and other headers, since it may be built
 // with different flags from other targets, using different levels of
 // optimization, potentially introducing ODR violations.
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // RANDen = RANDom generator or beetroots in Swiss German.
@@ -41,6 +44,7 @@ class RandenHwAes {
 bool HasRandenHwAesImplementation();
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_RANDEN_HWAES_H_
diff --git a/absl/random/internal/randen_slow.cc b/absl/random/internal/randen_slow.cc
index e7959c7e0525..8d07458254a5 100644
--- a/absl/random/internal/randen_slow.cc
+++ b/absl/random/internal/randen_slow.cc
@@ -462,6 +462,7 @@ inline ABSL_RANDOM_INTERNAL_ATTRIBUTE_ALWAYS_INLINE void Permute(
 }  // namespace
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 const void* RandenSlow::GetKeys() {
@@ -501,4 +502,5 @@ void RandenSlow::Generate(const void* keys, void* state_void) {
 }
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/random/internal/randen_slow.h b/absl/random/internal/randen_slow.h
index 305861308003..72f92b54ad23 100644
--- a/absl/random/internal/randen_slow.h
+++ b/absl/random/internal/randen_slow.h
@@ -17,7 +17,10 @@
 
 #include <cstddef>
 
+#include "absl/base/config.h"
+
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // RANDen = RANDom generator or beetroots in Swiss German.
@@ -38,6 +41,7 @@ class RandenSlow {
 };
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_RANDEN_SLOW_H_
diff --git a/absl/random/internal/randen_traits.h b/absl/random/internal/randen_traits.h
index 4f1f408d1917..2b8bbe73830e 100644
--- a/absl/random/internal/randen_traits.h
+++ b/absl/random/internal/randen_traits.h
@@ -22,7 +22,10 @@
 
 #include <cstddef>
 
+#include "absl/base/config.h"
+
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // RANDen = RANDom generator or beetroots in Swiss German.
@@ -54,6 +57,7 @@ struct RandenTraits {
 };
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_RANDEN_TRAITS_H_
diff --git a/absl/random/internal/salted_seed_seq.h b/absl/random/internal/salted_seed_seq.h
index 864870069254..5953a090f80c 100644
--- a/absl/random/internal/salted_seed_seq.h
+++ b/absl/random/internal/salted_seed_seq.h
@@ -30,6 +30,7 @@
 #include "absl/types/span.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // This class conforms to the C++ Standard "Seed Sequence" concept
@@ -160,6 +161,7 @@ SaltedSeedSeq<typename std::decay<SSeq>::type> MakeSaltedSeedSeq(SSeq&& seq) {
 }
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_SALTED_SEED_SEQ_H_
diff --git a/absl/random/internal/seed_material.cc b/absl/random/internal/seed_material.cc
index ab4dd0c26b07..4d38a57419ec 100644
--- a/absl/random/internal/seed_material.cc
+++ b/absl/random/internal/seed_material.cc
@@ -61,6 +61,7 @@
 #endif
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 namespace {
 
@@ -214,4 +215,5 @@ absl::optional<uint32_t> GetSaltMaterial() {
 }
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
diff --git a/absl/random/internal/seed_material.h b/absl/random/internal/seed_material.h
index 57de8a24d5e0..4be10e925685 100644
--- a/absl/random/internal/seed_material.h
+++ b/absl/random/internal/seed_material.h
@@ -27,6 +27,7 @@
 #include "absl/types/span.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // Returns the number of 32-bit blocks needed to contain the given number of
@@ -97,6 +98,7 @@ void MixIntoSeedMaterial(absl::Span<const uint32_t> sequence,
 absl::optional<uint32_t> GetSaltMaterial();
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_SEED_MATERIAL_H_
diff --git a/absl/random/internal/sequence_urbg.h b/absl/random/internal/sequence_urbg.h
index 9a9b57738da4..bc96a12cd29c 100644
--- a/absl/random/internal/sequence_urbg.h
+++ b/absl/random/internal/sequence_urbg.h
@@ -21,7 +21,10 @@
 #include <type_traits>
 #include <vector>
 
+#include "absl/base/config.h"
+
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // `sequence_urbg` is a simple random number generator which meets the
@@ -51,6 +54,7 @@ class sequence_urbg {
 };
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_SEQUENCE_URBG_H_
diff --git a/absl/random/internal/traits.h b/absl/random/internal/traits.h
index 40eb011f195f..75772bd9abb4 100644
--- a/absl/random/internal/traits.h
+++ b/absl/random/internal/traits.h
@@ -22,6 +22,7 @@
 #include "absl/base/config.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // random_internal::is_widening_convertible<A, B>
@@ -94,6 +95,7 @@ struct make_unsigned_bits {
 };
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_TRAITS_H_
diff --git a/absl/random/internal/uniform_helper.h b/absl/random/internal/uniform_helper.h
index f68b1823ef00..663107cb3a63 100644
--- a/absl/random/internal/uniform_helper.h
+++ b/absl/random/internal/uniform_helper.h
@@ -22,6 +22,7 @@
 #include "absl/meta/type_traits.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 template <typename IntType>
 class uniform_int_distribution;
 
@@ -173,6 +174,7 @@ struct UniformDistributionWrapper : public UniformDistribution<NumType> {
 };
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_UNIFORM_HELPER_H_
diff --git a/absl/random/internal/wide_multiply.h b/absl/random/internal/wide_multiply.h
index ebbfa1f2c10e..6e4cf1be0af4 100644
--- a/absl/random/internal/wide_multiply.h
+++ b/absl/random/internal/wide_multiply.h
@@ -31,6 +31,7 @@
 #include "absl/random/internal/traits.h"
 
 namespace absl {
+ABSL_NAMESPACE_BEGIN
 namespace random_internal {
 
 // Helper object to multiply two 64-bit values to a 128-bit value.
@@ -104,6 +105,7 @@ struct wide_multiply<uint64_t> {
 #endif
 
 }  // namespace random_internal
+ABSL_NAMESPACE_END
 }  // namespace absl
 
 #endif  // ABSL_RANDOM_INTERNAL_WIDE_MULTIPLY_H_