mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-30 14:30:27 +00:00
Improve system call support
This commit is contained in:
parent
63b867bd2f
commit
3085ac7837
65 changed files with 900 additions and 544 deletions
|
@ -67,7 +67,7 @@ struct dirstream {
|
|||
struct {
|
||||
unsigned buf_pos;
|
||||
unsigned buf_end;
|
||||
uint64_t buf[BUFSIZ / 8];
|
||||
uint64_t buf[(BUFSIZ + 256) / 8];
|
||||
};
|
||||
struct {
|
||||
bool isdone;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/sysdebug.internal.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
|
@ -58,6 +59,7 @@ FILE *fopen(const char *pathname, const char *mode) {
|
|||
FILE *f;
|
||||
bool noclose;
|
||||
int fd, flags;
|
||||
SYSDEBUG("fopen(%`'s)", pathname);
|
||||
flags = fopenflags(mode);
|
||||
pathname = fixpathname(pathname, flags);
|
||||
if ((fd = openpathname(pathname, flags, &noclose)) != -1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue