[libc] Fix leftover `LIBC_NAMESPACE` after porting it (#113960)
Summary:
There are a few of these leftover, they should all use the
`LIBC_NAMESPACE_DECL` version because that implies visibility.
diff --git a/libc/src/math/cbrt.h b/libc/src/math/cbrt.h
index a7d5fe8..8cf7d9b 100644
--- a/libc/src/math/cbrt.h
+++ b/libc/src/math/cbrt.h
@@ -9,10 +9,12 @@
#ifndef LLVM_LIBC_SRC_MATH_CBRT_H
#define LLVM_LIBC_SRC_MATH_CBRT_H
-namespace LIBC_NAMESPACE {
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
double cbrt(double x);
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
#endif // LLVM_LIBC_SRC_MATH_CBRT_H
diff --git a/libc/src/stdio/gpu/fprintf.cpp b/libc/src/stdio/gpu/fprintf.cpp
index 6222589..46196d7 100644
--- a/libc/src/stdio/gpu/fprintf.cpp
+++ b/libc/src/stdio/gpu/fprintf.cpp
@@ -16,7 +16,7 @@
#include <stdarg.h>
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, fprintf,
(::FILE *__restrict stream, const char *__restrict format,
@@ -29,4 +29,4 @@
return ret_val;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/printf.cpp b/libc/src/stdio/gpu/printf.cpp
index d990319..be1885f 100644
--- a/libc/src/stdio/gpu/printf.cpp
+++ b/libc/src/stdio/gpu/printf.cpp
@@ -15,7 +15,7 @@
#include <stdarg.h>
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, printf, (const char *__restrict format, ...)) {
va_list vlist;
@@ -26,4 +26,4 @@
return ret_val;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/vfprintf.cpp b/libc/src/stdio/gpu/vfprintf.cpp
index 961cfa4..c92685f 100644
--- a/libc/src/stdio/gpu/vfprintf.cpp
+++ b/libc/src/stdio/gpu/vfprintf.cpp
@@ -14,7 +14,7 @@
#include "src/errno/libc_errno.h"
#include "src/stdio/gpu/vfprintf_utils.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, vfprintf,
(::FILE *__restrict stream, const char *__restrict format,
@@ -24,4 +24,4 @@
return ret_val;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/vfprintf_utils.h b/libc/src/stdio/gpu/vfprintf_utils.h
index 93ce164..5010ee1 100644
--- a/libc/src/stdio/gpu/vfprintf_utils.h
+++ b/libc/src/stdio/gpu/vfprintf_utils.h
@@ -9,10 +9,11 @@
#include "hdr/types/FILE.h"
#include "src/__support/RPC/rpc_client.h"
#include "src/__support/arg_list.h"
+#include "src/__support/macros/config.h"
#include "src/stdio/gpu/file.h"
#include "src/string/string_utils.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
template <uint16_t opcode>
LIBC_INLINE int vfprintf_impl(::FILE *__restrict file,
@@ -82,4 +83,4 @@
#endif
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/vprintf.cpp b/libc/src/stdio/gpu/vprintf.cpp
index 2bb74d7..54012f3 100644
--- a/libc/src/stdio/gpu/vprintf.cpp
+++ b/libc/src/stdio/gpu/vprintf.cpp
@@ -13,7 +13,7 @@
#include "src/errno/libc_errno.h"
#include "src/stdio/gpu/vfprintf_utils.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, vprintf,
(const char *__restrict format, va_list vlist)) {
@@ -22,4 +22,4 @@
return ret_val;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/vsscanf.h b/libc/src/stdio/vsscanf.h
index 992c44d..c57b174 100644
--- a/libc/src/stdio/vsscanf.h
+++ b/libc/src/stdio/vsscanf.h
@@ -9,12 +9,14 @@
#ifndef LLVM_LIBC_SRC_STDIO_VSSCANF_H
#define LLVM_LIBC_SRC_STDIO_VSSCANF_H
+#include "src/__support/macros/config.h"
+
#include <stdarg.h>
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
int vsscanf(const char *s, const char *format, va_list vlist);
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
#endif // LLVM_LIBC_SRC_STDIO_VSSCANF_H