Flatten InfoZIP directory and fix build issues

This commit is contained in:
Justine Tunney 2022-04-20 21:59:25 -07:00
parent ae638c0850
commit 87396f43bc
66 changed files with 869 additions and 5763 deletions

View file

@ -25,19 +25,13 @@
#include "libc/dce.h"
#include "libc/errno.h"
#include "libc/intrin/asan.internal.h"
#include "libc/intrin/kprintf.h"
#include "libc/macros.internal.h"
#include "libc/sysv/consts/iov.h"
#include "libc/sysv/errfuns.h"
#include "libc/zipos/zipos.internal.h"
/**
* Reads with maximum generality.
*
* @return number of bytes actually read, or -1 w/ errno
* @asyncsignalsafe
* @vforksafe
*/
ssize_t preadv(int fd, struct iovec *iov, int iovlen, int64_t off) {
static ssize_t Preadv(int fd, struct iovec *iov, int iovlen, int64_t off) {
static bool once, demodernize;
int i, err;
ssize_t rc;
@ -106,3 +100,27 @@ ssize_t preadv(int fd, struct iovec *iov, int iovlen, int64_t off) {
return toto;
}
/**
* Reads with maximum generality.
*
* @return number of bytes actually read, or -1 w/ errno
* @asyncsignalsafe
* @vforksafe
*/
ssize_t preadv(int fd, struct iovec *iov, int iovlen, int64_t off) {
ssize_t rc;
rc = Preadv(fd, iov, iovlen, off);
#if defined(SYSDEBUG) && _DATATRACE
if (__strace > 0) {
if (rc == -1 && errno == EFAULT) {
STRACE("preadv(%d, %p, %d, %'ld) → %'zd% m", fd, iov, iovlen, off, rc);
} else {
kprintf(STRACE_PROLOGUE "preadv(%d, [", fd);
__strace_iov(iov, iovlen, rc != -1 ? rc : 0);
kprintf("], %d, %'ld) → %'ld% m%n", iovlen, off, rc);
}
}
#endif
return rc;
}