aboutsummaryrefslogtreecommitdiff
path: root/libc/src/stdio/gpu
diff options
context:
space:
mode:
authorPetr Hosek <phosek@google.com>2024-07-11 12:35:22 -0700
committerGitHub <noreply@github.com>2024-07-11 12:35:22 -0700
commit3f30effe1bd81fa1b039218a9bfe79c3b03fafad (patch)
treef3f9bbaca2e1088607359c74c4c696742383c032 /libc/src/stdio/gpu
parent2d7e136fc0e31207b962397250bc1581203c8d59 (diff)
downloadllvm-3f30effe1bd81fa1b039218a9bfe79c3b03fafad.zip
llvm-3f30effe1bd81fa1b039218a9bfe79c3b03fafad.tar.gz
llvm-3f30effe1bd81fa1b039218a9bfe79c3b03fafad.tar.bz2
[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98075)
This is a part of #97655.
Diffstat (limited to 'libc/src/stdio/gpu')
-rw-r--r--libc/src/stdio/gpu/clearerr.cpp5
-rw-r--r--libc/src/stdio/gpu/fclose.cpp5
-rw-r--r--libc/src/stdio/gpu/feof.cpp5
-rw-r--r--libc/src/stdio/gpu/ferror.cpp5
-rw-r--r--libc/src/stdio/gpu/fflush.cpp5
-rw-r--r--libc/src/stdio/gpu/fgetc.cpp5
-rw-r--r--libc/src/stdio/gpu/fgets.cpp5
-rw-r--r--libc/src/stdio/gpu/file.h5
-rw-r--r--libc/src/stdio/gpu/fopen.cpp5
-rw-r--r--libc/src/stdio/gpu/fputc.cpp5
-rw-r--r--libc/src/stdio/gpu/fputs.cpp5
-rw-r--r--libc/src/stdio/gpu/fread.cpp5
-rw-r--r--libc/src/stdio/gpu/fseek.cpp5
-rw-r--r--libc/src/stdio/gpu/ftell.cpp5
-rw-r--r--libc/src/stdio/gpu/fwrite.cpp5
-rw-r--r--libc/src/stdio/gpu/getc.cpp5
-rw-r--r--libc/src/stdio/gpu/getchar.cpp5
-rw-r--r--libc/src/stdio/gpu/putc.cpp5
-rw-r--r--libc/src/stdio/gpu/putchar.cpp5
-rw-r--r--libc/src/stdio/gpu/puts.cpp5
-rw-r--r--libc/src/stdio/gpu/remove.cpp5
-rw-r--r--libc/src/stdio/gpu/stderr.cpp5
-rw-r--r--libc/src/stdio/gpu/stdin.cpp5
-rw-r--r--libc/src/stdio/gpu/stdout.cpp5
-rw-r--r--libc/src/stdio/gpu/ungetc.cpp5
25 files changed, 75 insertions, 50 deletions
diff --git a/libc/src/stdio/gpu/clearerr.cpp b/libc/src/stdio/gpu/clearerr.cpp
index ec7fe41..5826a7b 100644
--- a/libc/src/stdio/gpu/clearerr.cpp
+++ b/libc/src/stdio/gpu/clearerr.cpp
@@ -8,10 +8,11 @@
#include "src/stdio/clearerr.h"
#include "file.h"
+#include "src/__support/macros/config.h"
#include "hdr/types/FILE.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(void, clearerr, (::FILE * stream)) {
rpc::Client::Port port = rpc::client.open<RPC_CLEARERR>();
@@ -21,4 +22,4 @@ LLVM_LIBC_FUNCTION(void, clearerr, (::FILE * stream)) {
port.close();
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/fclose.cpp b/libc/src/stdio/gpu/fclose.cpp
index 3bc68f1..78caccd 100644
--- a/libc/src/stdio/gpu/fclose.cpp
+++ b/libc/src/stdio/gpu/fclose.cpp
@@ -7,12 +7,13 @@
//===----------------------------------------------------------------------===//
#include "src/stdio/fclose.h"
+#include "src/__support/macros/config.h"
#include "src/stdio/gpu/file.h"
#include "hdr/stdio_macros.h"
#include "hdr/types/FILE.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, fclose, (::FILE * stream)) {
uint64_t ret = 0;
@@ -27,4 +28,4 @@ LLVM_LIBC_FUNCTION(int, fclose, (::FILE * stream)) {
return static_cast<int>(ret);
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/feof.cpp b/libc/src/stdio/gpu/feof.cpp
index dee1e38..4a8a173 100644
--- a/libc/src/stdio/gpu/feof.cpp
+++ b/libc/src/stdio/gpu/feof.cpp
@@ -8,10 +8,11 @@
#include "src/stdio/feof.h"
#include "file.h"
+#include "src/__support/macros/config.h"
#include "hdr/types/FILE.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, feof, (::FILE * stream)) {
int ret;
@@ -23,4 +24,4 @@ LLVM_LIBC_FUNCTION(int, feof, (::FILE * stream)) {
return ret;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/ferror.cpp b/libc/src/stdio/gpu/ferror.cpp
index 90e1592..1cee96f 100644
--- a/libc/src/stdio/gpu/ferror.cpp
+++ b/libc/src/stdio/gpu/ferror.cpp
@@ -8,10 +8,11 @@
#include "src/stdio/ferror.h"
#include "file.h"
+#include "src/__support/macros/config.h"
#include "hdr/types/FILE.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, ferror, (::FILE * stream)) {
int ret;
@@ -23,4 +24,4 @@ LLVM_LIBC_FUNCTION(int, ferror, (::FILE * stream)) {
return ret;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/fflush.cpp b/libc/src/stdio/gpu/fflush.cpp
index 60c3522..be267a2 100644
--- a/libc/src/stdio/gpu/fflush.cpp
+++ b/libc/src/stdio/gpu/fflush.cpp
@@ -8,10 +8,11 @@
#include "src/stdio/fflush.h"
#include "file.h"
+#include "src/__support/macros/config.h"
#include "hdr/types/FILE.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, fflush, (::FILE * stream)) {
int ret;
@@ -23,4 +24,4 @@ LLVM_LIBC_FUNCTION(int, fflush, (::FILE * stream)) {
return ret;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/fgetc.cpp b/libc/src/stdio/gpu/fgetc.cpp
index 08e6eb3..cb42f31 100644
--- a/libc/src/stdio/gpu/fgetc.cpp
+++ b/libc/src/stdio/gpu/fgetc.cpp
@@ -8,11 +8,12 @@
#include "src/stdio/fgetc.h"
#include "file.h"
+#include "src/__support/macros/config.h"
#include "hdr/stdio_macros.h" // for EOF.
#include "hdr/types/FILE.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, fgetc, (::FILE * stream)) {
unsigned char c;
@@ -23,4 +24,4 @@ LLVM_LIBC_FUNCTION(int, fgetc, (::FILE * stream)) {
return c;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/fgets.cpp b/libc/src/stdio/gpu/fgets.cpp
index fb0a30b..942f6f0 100644
--- a/libc/src/stdio/gpu/fgets.cpp
+++ b/libc/src/stdio/gpu/fgets.cpp
@@ -8,6 +8,7 @@
#include "src/stdio/fgets.h"
#include "file.h"
+#include "src/__support/macros/config.h"
#include "src/stdio/feof.h"
#include "src/stdio/ferror.h"
@@ -15,7 +16,7 @@
#include "hdr/types/FILE.h"
#include <stddef.h>
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(char *, fgets,
(char *__restrict str, int count,
@@ -40,4 +41,4 @@ LLVM_LIBC_FUNCTION(char *, fgets,
return str;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/file.h b/libc/src/stdio/gpu/file.h
index 8cbba9e..5de7684 100644
--- a/libc/src/stdio/gpu/file.h
+++ b/libc/src/stdio/gpu/file.h
@@ -7,13 +7,14 @@
//===----------------------------------------------------------------------===//
#include "src/__support/RPC/rpc_client.h"
+#include "src/__support/macros/config.h"
#include "src/string/string_utils.h"
#include "hdr/types/FILE.h"
#include <stdio.h> //needed for stdin/out/err
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
namespace file {
enum Stream {
@@ -96,4 +97,4 @@ LIBC_INLINE uint64_t read(::FILE *f, void *data, size_t size) {
}
} // namespace file
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/fopen.cpp b/libc/src/stdio/gpu/fopen.cpp
index 1e55725..76daece 100644
--- a/libc/src/stdio/gpu/fopen.cpp
+++ b/libc/src/stdio/gpu/fopen.cpp
@@ -8,11 +8,12 @@
#include "src/stdio/fopen.h"
#include "src/__support/CPP/string_view.h"
+#include "src/__support/macros/config.h"
#include "src/stdio/gpu/file.h"
#include "hdr/types/FILE.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(::FILE *, fopen,
(const char *__restrict path, const char *__restrict mode)) {
@@ -29,4 +30,4 @@ LLVM_LIBC_FUNCTION(::FILE *, fopen,
return reinterpret_cast<FILE *>(file);
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/fputc.cpp b/libc/src/stdio/gpu/fputc.cpp
index a99eaeb..ad2db03 100644
--- a/libc/src/stdio/gpu/fputc.cpp
+++ b/libc/src/stdio/gpu/fputc.cpp
@@ -8,11 +8,12 @@
#include "src/stdio/fputc.h"
#include "file.h"
+#include "src/__support/macros/config.h"
#include "hdr/stdio_macros.h" // for EOF.
#include "hdr/types/FILE.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, fputc, (int c, ::FILE *stream)) {
unsigned char uc = static_cast<unsigned char>(c);
@@ -24,4 +25,4 @@ LLVM_LIBC_FUNCTION(int, fputc, (int c, ::FILE *stream)) {
return 0;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/fputs.cpp b/libc/src/stdio/gpu/fputs.cpp
index 4803da9..7a08244 100644
--- a/libc/src/stdio/gpu/fputs.cpp
+++ b/libc/src/stdio/gpu/fputs.cpp
@@ -8,13 +8,14 @@
#include "src/stdio/fputs.h"
#include "src/__support/CPP/string_view.h"
+#include "src/__support/macros/config.h"
#include "src/errno/libc_errno.h"
#include "src/stdio/gpu/file.h"
#include "hdr/stdio_macros.h" // for EOF.
#include "hdr/types/FILE.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, fputs,
(const char *__restrict str, ::FILE *__restrict stream)) {
@@ -25,4 +26,4 @@ LLVM_LIBC_FUNCTION(int, fputs,
return 0;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/fread.cpp b/libc/src/stdio/gpu/fread.cpp
index 233a780..57fa5b6 100644
--- a/libc/src/stdio/gpu/fread.cpp
+++ b/libc/src/stdio/gpu/fread.cpp
@@ -7,11 +7,12 @@
//===----------------------------------------------------------------------===//
#include "src/stdio/fread.h"
+#include "src/__support/macros/config.h"
#include "src/stdio/gpu/file.h"
#include "hdr/types/FILE.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(size_t, fread,
(void *__restrict buffer, size_t size, size_t nmemb,
@@ -22,4 +23,4 @@ LLVM_LIBC_FUNCTION(size_t, fread,
return result / size;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/fseek.cpp b/libc/src/stdio/gpu/fseek.cpp
index 3b1f85d..4f3e9ce 100644
--- a/libc/src/stdio/gpu/fseek.cpp
+++ b/libc/src/stdio/gpu/fseek.cpp
@@ -8,10 +8,11 @@
#include "src/stdio/fseek.h"
#include "file.h"
+#include "src/__support/macros/config.h"
#include "hdr/types/FILE.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, fseek, (::FILE * stream, long offset, int whence)) {
int ret;
@@ -27,4 +28,4 @@ LLVM_LIBC_FUNCTION(int, fseek, (::FILE * stream, long offset, int whence)) {
return ret;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/ftell.cpp b/libc/src/stdio/gpu/ftell.cpp
index 5664726..483b1ad 100644
--- a/libc/src/stdio/gpu/ftell.cpp
+++ b/libc/src/stdio/gpu/ftell.cpp
@@ -8,10 +8,11 @@
#include "src/stdio/ftell.h"
#include "file.h"
+#include "src/__support/macros/config.h"
#include "hdr/types/FILE.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(long, ftell, (::FILE * stream)) {
long ret;
@@ -23,4 +24,4 @@ LLVM_LIBC_FUNCTION(long, ftell, (::FILE * stream)) {
return ret;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/fwrite.cpp b/libc/src/stdio/gpu/fwrite.cpp
index 1321e32c..6c54869 100644
--- a/libc/src/stdio/gpu/fwrite.cpp
+++ b/libc/src/stdio/gpu/fwrite.cpp
@@ -8,10 +8,11 @@
#include "src/stdio/fwrite.h"
#include "file.h"
+#include "src/__support/macros/config.h"
#include "hdr/types/FILE.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(size_t, fwrite,
(const void *__restrict buffer, size_t size, size_t nmemb,
@@ -23,4 +24,4 @@ LLVM_LIBC_FUNCTION(size_t, fwrite,
return result / size;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/getc.cpp b/libc/src/stdio/gpu/getc.cpp
index d77d8ba..9c32974 100644
--- a/libc/src/stdio/gpu/getc.cpp
+++ b/libc/src/stdio/gpu/getc.cpp
@@ -8,11 +8,12 @@
#include "src/stdio/getc.h"
#include "file.h"
+#include "src/__support/macros/config.h"
#include "hdr/stdio_macros.h" // for EOF.
#include "hdr/types/FILE.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, getc, (::FILE * stream)) {
unsigned char c;
@@ -23,4 +24,4 @@ LLVM_LIBC_FUNCTION(int, getc, (::FILE * stream)) {
return c;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/getchar.cpp b/libc/src/stdio/gpu/getchar.cpp
index 28e86da..048cf23 100644
--- a/libc/src/stdio/gpu/getchar.cpp
+++ b/libc/src/stdio/gpu/getchar.cpp
@@ -8,13 +8,14 @@
#include "src/stdio/getchar.h"
#include "file.h"
+#include "src/__support/macros/config.h"
#include "hdr/stdio_macros.h" // for EOF.
#include "hdr/types/FILE.h"
#include <stdio.h> //needed for stdin
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, getchar, ()) {
unsigned char c;
@@ -25,4 +26,4 @@ LLVM_LIBC_FUNCTION(int, getchar, ()) {
return c;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/putc.cpp b/libc/src/stdio/gpu/putc.cpp
index d054d28..f8ae98d 100644
--- a/libc/src/stdio/gpu/putc.cpp
+++ b/libc/src/stdio/gpu/putc.cpp
@@ -8,11 +8,12 @@
#include "src/stdio/putc.h"
#include "file.h"
+#include "src/__support/macros/config.h"
#include "hdr/stdio_macros.h" // for EOF.
#include "hdr/types/FILE.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, putc, (int c, ::FILE *stream)) {
unsigned char uc = static_cast<unsigned char>(c);
@@ -24,4 +25,4 @@ LLVM_LIBC_FUNCTION(int, putc, (int c, ::FILE *stream)) {
return 0;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/putchar.cpp b/libc/src/stdio/gpu/putchar.cpp
index 3e38401..d03a3fe 100644
--- a/libc/src/stdio/gpu/putchar.cpp
+++ b/libc/src/stdio/gpu/putchar.cpp
@@ -8,13 +8,14 @@
#include "src/stdio/putchar.h"
#include "file.h"
+#include "src/__support/macros/config.h"
#include "hdr/stdio_macros.h" // for EOF.
#include "hdr/types/FILE.h"
#include <stdio.h> //needed for stdout
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, putchar, (int c)) {
unsigned char uc = static_cast<unsigned char>(c);
@@ -26,4 +27,4 @@ LLVM_LIBC_FUNCTION(int, putchar, (int c)) {
return 0;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/puts.cpp b/libc/src/stdio/gpu/puts.cpp
index f6d91cc..af84432 100644
--- a/libc/src/stdio/gpu/puts.cpp
+++ b/libc/src/stdio/gpu/puts.cpp
@@ -8,6 +8,7 @@
#include "src/stdio/puts.h"
#include "src/__support/CPP/string_view.h"
+#include "src/__support/macros/config.h"
#include "src/errno/libc_errno.h"
#include "src/stdio/gpu/file.h"
@@ -16,7 +17,7 @@
#include <stdio.h> //needed for stdout
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, puts, (const char *__restrict str)) {
cpp::string_view str_view(str);
@@ -27,4 +28,4 @@ LLVM_LIBC_FUNCTION(int, puts, (const char *__restrict str)) {
return 0;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/remove.cpp b/libc/src/stdio/gpu/remove.cpp
index 6b53e1f..3f21e8a 100644
--- a/libc/src/stdio/gpu/remove.cpp
+++ b/libc/src/stdio/gpu/remove.cpp
@@ -8,10 +8,11 @@
#include "src/stdio/remove.h"
#include "file.h"
+#include "src/__support/macros/config.h"
#include "hdr/types/FILE.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, remove, (const char *path)) {
int ret;
@@ -23,4 +24,4 @@ LLVM_LIBC_FUNCTION(int, remove, (const char *path)) {
return ret;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/stdio/gpu/stderr.cpp b/libc/src/stdio/gpu/stderr.cpp
index e239b94..efbc3b4 100644
--- a/libc/src/stdio/gpu/stderr.cpp
+++ b/libc/src/stdio/gpu/stderr.cpp
@@ -7,10 +7,11 @@
//===----------------------------------------------------------------------===//
#include "hdr/types/FILE.h"
+#include "src/__support/macros/config.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
static struct {
} stub;
FILE *stderr = reinterpret_cast<FILE *>(&stub);
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
extern "C" FILE *stderr = reinterpret_cast<FILE *>(&LIBC_NAMESPACE::stub);
diff --git a/libc/src/stdio/gpu/stdin.cpp b/libc/src/stdio/gpu/stdin.cpp
index 6a305c8..66618fd 100644
--- a/libc/src/stdio/gpu/stdin.cpp
+++ b/libc/src/stdio/gpu/stdin.cpp
@@ -7,10 +7,11 @@
//===----------------------------------------------------------------------===//
#include "hdr/types/FILE.h"
+#include "src/__support/macros/config.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
static struct {
} stub;
FILE *stdin = reinterpret_cast<FILE *>(&stub);
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
extern "C" FILE *stdin = reinterpret_cast<FILE *>(&LIBC_NAMESPACE::stub);
diff --git a/libc/src/stdio/gpu/stdout.cpp b/libc/src/stdio/gpu/stdout.cpp
index fffe137..e3869f9 100644
--- a/libc/src/stdio/gpu/stdout.cpp
+++ b/libc/src/stdio/gpu/stdout.cpp
@@ -7,10 +7,11 @@
//===----------------------------------------------------------------------===//
#include "hdr/types/FILE.h"
+#include "src/__support/macros/config.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
static struct {
} stub;
FILE *stdout = reinterpret_cast<FILE *>(&stub);
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL
extern "C" FILE *stdout = reinterpret_cast<FILE *>(&LIBC_NAMESPACE::stub);
diff --git a/libc/src/stdio/gpu/ungetc.cpp b/libc/src/stdio/gpu/ungetc.cpp
index 52379e1..e9232a5 100644
--- a/libc/src/stdio/gpu/ungetc.cpp
+++ b/libc/src/stdio/gpu/ungetc.cpp
@@ -8,10 +8,11 @@
#include "src/stdio/ungetc.h"
#include "file.h"
+#include "src/__support/macros/config.h"
#include "hdr/types/FILE.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, ungetc, (int c, ::FILE *stream)) {
int ret;
@@ -26,4 +27,4 @@ LLVM_LIBC_FUNCTION(int, ungetc, (int c, ::FILE *stream)) {
return ret;
}
-} // namespace LIBC_NAMESPACE
+} // namespace LIBC_NAMESPACE_DECL