[libc-commits] [libc] 6489125 - [libc] Add `FILENO` related macros to `unistd.h`. (#124688)
via libc-commits
libc-commits at lists.llvm.org
Tue Jan 28 08:45:04 PST 2025
Author: c8ef
Date: 2025-01-29T00:45:01+08:00
New Revision: 648912582ccb9bda36427244957843fbdd95abaf
URL: https://github.com/llvm/llvm-project/commit/648912582ccb9bda36427244957843fbdd95abaf
DIFF: https://github.com/llvm/llvm-project/commit/648912582ccb9bda36427244957843fbdd95abaf.diff
LOG: [libc] Add `FILENO` related macros to `unistd.h`. (#124688)
Closes #124637.
This is necessary to build LLVM with LLVM-libc and align the behavior
with other libc implementations.
ref: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/unistd.h.html
Added:
Modified:
libc/include/llvm-libc-macros/unistd-macros.h
Removed:
################################################################################
diff --git a/libc/include/llvm-libc-macros/unistd-macros.h b/libc/include/llvm-libc-macros/unistd-macros.h
index 4f27f075fcc61b..e09dada04a19d4 100644
--- a/libc/include/llvm-libc-macros/unistd-macros.h
+++ b/libc/include/llvm-libc-macros/unistd-macros.h
@@ -5,4 +5,8 @@
#include "linux/unistd-macros.h"
#endif
+#define STDIN_FILENO 0
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+
#endif // LLVM_LIBC_MACROS_UNISTD_MACROS_H
More information about the libc-commits
mailing list