[libc-commits] [libc] [libc] [unistd] implement pipe2 syscall wrapper (PR #114474)
via libc-commits
libc-commits at lists.llvm.org
Fri Nov 1 14:11:47 PDT 2024
================
@@ -287,6 +287,23 @@ def Linux : StandardSpec<"Linux"> {
]
>;
+
+ HeaderSpec UniStd = HeaderSpec<
+ "unistd.h",
+ [], // Macros
+ [],
+ [], // Enumerations
+ [
+ FunctionSpec<
+ "pipe2",
+ RetValSpec<IntType>,
+ [ArgSpec<IntPtr>] //TODO: make this int[2]
----------------
duncpro wrote:
Also, AFAIK the `pipe` definition in `posix.td` actually doesn't have this problem.
https://github.com/llvm/llvm-project/blob/f54cdc5d6ee5532da117f2489c105148c94dcb39/libc/spec/posix.td#L646-L650
The [posix standard for `pipe`](https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/unistd.h.html) defines the signature as...
```
int pipe(int[2]);
```
This matches the `FunctionSpec` we have in `posix.td`.
https://github.com/llvm/llvm-project/pull/114474
More information about the libc-commits
mailing list