diff options
author | Guillaume Chatelet <gchatelet@google.com> | 2023-09-26 11:45:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-26 11:45:04 +0200 |
commit | b6bc9d72f65a5086f310f321e969d96e9a559e75 (patch) | |
tree | 1e9a9f8c36c9dfc0106507f7b7a0055af83c4a07 /libc/src/fcntl | |
parent | 7675f541f75baa20e8ec007cd625a837e89fc01f (diff) | |
download | llvm-b6bc9d72f65a5086f310f321e969d96e9a559e75.zip llvm-b6bc9d72f65a5086f310f321e969d96e9a559e75.tar.gz llvm-b6bc9d72f65a5086f310f321e969d96e9a559e75.tar.bz2 |
[libc] Mass replace enclosing namespace (#67032)
This is step 4 of
https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079
Diffstat (limited to 'libc/src/fcntl')
-rw-r--r-- | libc/src/fcntl/creat.h | 4 | ||||
-rw-r--r-- | libc/src/fcntl/linux/creat.cpp | 8 | ||||
-rw-r--r-- | libc/src/fcntl/linux/open.cpp | 10 | ||||
-rw-r--r-- | libc/src/fcntl/linux/openat.cpp | 8 | ||||
-rw-r--r-- | libc/src/fcntl/open.h | 4 | ||||
-rw-r--r-- | libc/src/fcntl/openat.h | 4 |
6 files changed, 19 insertions, 19 deletions
diff --git a/libc/src/fcntl/creat.h b/libc/src/fcntl/creat.h index 0c1abda..fc91a3c 100644 --- a/libc/src/fcntl/creat.h +++ b/libc/src/fcntl/creat.h @@ -11,10 +11,10 @@ #include <fcntl.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { int creat(const char *path, int mode); -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE #endif // LLVM_LIBC_SRC_FCNTL_CREAT_H diff --git a/libc/src/fcntl/linux/creat.cpp b/libc/src/fcntl/linux/creat.cpp index 0b449bb..0710fab 100644 --- a/libc/src/fcntl/linux/creat.cpp +++ b/libc/src/fcntl/linux/creat.cpp @@ -15,14 +15,14 @@ #include <fcntl.h> #include <sys/syscall.h> // For syscall numbers. -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(int, creat, (const char *path, int mode_flags)) { #ifdef SYS_open - int fd = __llvm_libc::syscall_impl<int>( + int fd = LIBC_NAMESPACE::syscall_impl<int>( SYS_open, path, O_CREAT | O_WRONLY | O_TRUNC, mode_flags); #else - int fd = __llvm_libc::syscall_impl<int>( + int fd = LIBC_NAMESPACE::syscall_impl<int>( SYS_openat, AT_FDCWD, path, O_CREAT | O_WRONLY | O_TRUNC, mode_flags); #endif @@ -33,4 +33,4 @@ LLVM_LIBC_FUNCTION(int, creat, (const char *path, int mode_flags)) { return -1; } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/fcntl/linux/open.cpp b/libc/src/fcntl/linux/open.cpp index 9558a2b0..7394069 100644 --- a/libc/src/fcntl/linux/open.cpp +++ b/libc/src/fcntl/linux/open.cpp @@ -16,7 +16,7 @@ #include <stdarg.h> #include <sys/syscall.h> // For syscall numbers. -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(int, open, (const char *path, int flags, ...)) { mode_t mode_flags = 0; @@ -30,10 +30,10 @@ LLVM_LIBC_FUNCTION(int, open, (const char *path, int flags, ...)) { } #ifdef SYS_open - int fd = __llvm_libc::syscall_impl<int>(SYS_open, path, flags, mode_flags); + int fd = LIBC_NAMESPACE::syscall_impl<int>(SYS_open, path, flags, mode_flags); #else - int fd = __llvm_libc::syscall_impl<int>(SYS_openat, AT_FDCWD, path, flags, - mode_flags); + int fd = LIBC_NAMESPACE::syscall_impl<int>(SYS_openat, AT_FDCWD, path, flags, + mode_flags); #endif if (fd > 0) return fd; @@ -42,4 +42,4 @@ LLVM_LIBC_FUNCTION(int, open, (const char *path, int flags, ...)) { return -1; } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/fcntl/linux/openat.cpp b/libc/src/fcntl/linux/openat.cpp index c6a47bf..a2f7413 100644 --- a/libc/src/fcntl/linux/openat.cpp +++ b/libc/src/fcntl/linux/openat.cpp @@ -16,7 +16,7 @@ #include <stdarg.h> #include <sys/syscall.h> // For syscall numbers. -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(int, openat, (int dfd, const char *path, int flags, ...)) { mode_t mode_flags = 0; @@ -29,8 +29,8 @@ LLVM_LIBC_FUNCTION(int, openat, (int dfd, const char *path, int flags, ...)) { va_end(varargs); } - int fd = - __llvm_libc::syscall_impl<int>(SYS_openat, dfd, path, flags, mode_flags); + int fd = LIBC_NAMESPACE::syscall_impl<int>(SYS_openat, dfd, path, flags, + mode_flags); if (fd > 0) return fd; @@ -38,4 +38,4 @@ LLVM_LIBC_FUNCTION(int, openat, (int dfd, const char *path, int flags, ...)) { return -1; } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/fcntl/open.h b/libc/src/fcntl/open.h index 49cfb50..30950dd 100644 --- a/libc/src/fcntl/open.h +++ b/libc/src/fcntl/open.h @@ -11,10 +11,10 @@ #include <fcntl.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { int open(const char *path, int flags, ...); -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE #endif // LLVM_LIBC_SRC_FCNTL_OPEN_H diff --git a/libc/src/fcntl/openat.h b/libc/src/fcntl/openat.h index 96a96de..5ea5d7f 100644 --- a/libc/src/fcntl/openat.h +++ b/libc/src/fcntl/openat.h @@ -11,10 +11,10 @@ #include <fcntl.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { int openat(int dfd, const char *path, int flags, ...); -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE #endif // LLVM_LIBC_SRC_FCNTL_OPENAT_H |