| ... | ... | @@ -2234,6 +2234,10 @@ pub const libc = struct { |
| 2234 | 2234 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/remainderl.html |
| 2235 | 2235 | pub extern fn remainderl(x: c_longdouble, y: c_longdouble) c_longdouble; |
| 2236 | 2236 | |
| 2237 | /// int renameat(int oldfd, const char *old, int newfd, const char *new); |
| 2238 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/renameat.html |
| 2239 | pub extern fn renameat(oldfd: c_int, old: [*:0]const u8, newfd: c_int, new: [*:0]const u8) c_int; |
| 2240 | |
| 2237 | 2241 | /// double rint(double x); |
| 2238 | 2242 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/rint.html |
| 2239 | 2243 | pub extern fn rint(x: f64) f64; |
| ... | ... | @@ -3208,3 +3212,8 @@ pub fn getdents(dirfd: c_int, buf: []u8) errno.Error!usize { |
| 3208 | 3212 | std.debug.assert(rc >= 0); |
| 3209 | 3213 | return @intCast(rc); |
| 3210 | 3214 | } |
| 3215 | pub fn renameat(oldfd: c_int, old: [*:0]const u8, newfd: c_int, new: [*:0]const u8) !void { |
| 3216 | const rc = libc.renameat(oldfd, old, newfd, new); |
| 3217 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 3218 | std.debug.assert(rc == 0); |
| 3219 | } |