mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-12 14:09:12 +00:00
Support dirfd relative iops on Windows
We always favor calling functions like openat(), fstatat(), etc. because Linux, XNU, FreeBSD, and OpenBSD all elected to support them, while some systems like Android love them so much, that they stopped supporting the old interfaces. This change ensures that when dirfd is actually a dirfd and not AT_FDCWD we'll do the right thing on Windows NT. We use an API that's been around since Vista to accomplish that. This change also adds exponential backoff to chdir() on Windows since it seems almost as flaky on Windows 7 as the rmdir() function.
This commit is contained in:
parent
b8d26e2418
commit
417797d218
42 changed files with 361 additions and 241 deletions
2
libc/sysv/calls/fchdir-sysv.s
Normal file
2
libc/sysv/calls/fchdir-sysv.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall fchdir$sysv 0x000d000d200d0051 globl hidden
|
|
@ -1,2 +0,0 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall fchdir 0x000d000d200d0051 globl
|
|
@ -1,2 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall mknodat 0x014022ffffff0103 globl
|
||||
.scall mknodat 0x0140022fffff0103 globl
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue