mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-07 11:48:30 +00:00
Reduce makefile dependencies by 10%
The includes in libc/calls/calls.h have now been refactored so that functions with struct parameters are declared in libc/calls/struct/
This commit is contained in:
parent
4e7ce1538c
commit
adac64a52b
202 changed files with 372 additions and 319 deletions
|
@ -13,5 +13,13 @@ struct dirent { /* linux getdents64 abi */
|
|||
struct dirstream;
|
||||
typedef struct dirstream DIR;
|
||||
|
||||
DIR *fdopendir(int) dontdiscard;
|
||||
DIR *opendir(const char *) dontdiscard;
|
||||
int closedir(DIR *);
|
||||
int dirfd(DIR *);
|
||||
long telldir(DIR *);
|
||||
struct dirent *readdir(DIR *);
|
||||
void rewinddir(DIR *);
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_DIRENT_H_ */
|
||||
|
|
|
@ -7,5 +7,9 @@ struct iovec {
|
|||
size_t iov_len;
|
||||
};
|
||||
|
||||
ssize_t preadv(int, struct iovec *, int, int64_t);
|
||||
ssize_t pwritev(int, const struct iovec *, int, int64_t);
|
||||
ssize_t vmsplice(int, const struct iovec *, int64_t, uint32_t);
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_IOVEC_H_ */
|
||||
|
|
|
@ -7,5 +7,8 @@ struct rlimit {
|
|||
uint64_t rlim_max; /* maximum limit in bytes */
|
||||
};
|
||||
|
||||
int getrlimit(int, struct rlimit *);
|
||||
int setrlimit(int, const struct rlimit *);
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_RLIMIT_H_ */
|
||||
|
|
|
@ -4,28 +4,27 @@
|
|||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct rusage {
|
||||
union {
|
||||
struct {
|
||||
struct timeval ru_utime; /* user CPU time used */
|
||||
struct timeval ru_stime; /* system CPU time used */
|
||||
int64_t ru_maxrss; /* maximum resident set size in (kb) */
|
||||
int64_t ru_ixrss; /* shared memory size (integral kb CLK_TCK) */
|
||||
int64_t ru_idrss; /* unshared data size (integral kb CLK_TCK) */
|
||||
int64_t ru_isrss; /* unshared stack size (integral kb CLK_TCK) */
|
||||
int64_t ru_minflt; /* page reclaims */
|
||||
int64_t ru_majflt; /* page faults */
|
||||
int64_t ru_nswap; /* swaps */
|
||||
int64_t ru_inblock; /* block input operations */
|
||||
int64_t ru_oublock; /* block output operations */
|
||||
int64_t ru_msgsnd; /* IPC messages sent */
|
||||
int64_t ru_msgrcv; /* IPC messages received */
|
||||
int64_t ru_nsignals; /* signals received */
|
||||
int64_t ru_nvcsw; /* voluntary context switches */
|
||||
int64_t ru_nivcsw; /* involuntary context switches */
|
||||
};
|
||||
uint8_t __conservatism[1024];
|
||||
};
|
||||
struct timeval ru_utime; /* user CPU time used */
|
||||
struct timeval ru_stime; /* system CPU time used */
|
||||
int64_t ru_maxrss; /* maximum resident set size in (kb) */
|
||||
int64_t ru_ixrss; /* shared memory size (integral kb CLK_TCK) */
|
||||
int64_t ru_idrss; /* unshared data size (integral kb CLK_TCK) */
|
||||
int64_t ru_isrss; /* unshared stack size (integral kb CLK_TCK) */
|
||||
int64_t ru_minflt; /* page reclaims */
|
||||
int64_t ru_majflt; /* page faults */
|
||||
int64_t ru_nswap; /* swaps */
|
||||
int64_t ru_inblock; /* block input operations */
|
||||
int64_t ru_oublock; /* block output operations */
|
||||
int64_t ru_msgsnd; /* IPC messages sent */
|
||||
int64_t ru_msgrcv; /* IPC messages received */
|
||||
int64_t ru_nsignals; /* signals received */
|
||||
int64_t ru_nvcsw; /* voluntary context switches */
|
||||
int64_t ru_nivcsw; /* involuntary context switches */
|
||||
};
|
||||
|
||||
int getrusage(int, struct rusage *);
|
||||
int wait3(int *, int, struct rusage *);
|
||||
int wait4(int, int *, int, struct rusage *);
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_RUSAGE_H_ */
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "libc/calls/typedef/sigaction_f.h"
|
||||
#include "libc/calls/typedef/sighandler_t.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/sysv/consts/sig.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
struct sigaction { /* cosmo abi */
|
||||
|
|
|
@ -6,5 +6,14 @@ typedef struct sigset {
|
|||
uint64_t __bits[2];
|
||||
} sigset_t;
|
||||
|
||||
int sigprocmask(int, const sigset_t *, sigset_t *);
|
||||
int sigsuspend(const sigset_t *);
|
||||
|
||||
int sigaddset(sigset_t *, int) paramsnonnull();
|
||||
int sigdelset(sigset_t *, int) paramsnonnull();
|
||||
int sigemptyset(sigset_t *) paramsnonnull();
|
||||
int sigfillset(sigset_t *) paramsnonnull();
|
||||
int sigismember(const sigset_t *, int) paramsnonnull() nosideeffect;
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGSET_H_ */
|
||||
|
|
|
@ -7,5 +7,7 @@ union sigval {
|
|||
void *sival_ptr;
|
||||
};
|
||||
|
||||
int sigqueue(int, int, const union sigval);
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGVAL_H_ */
|
||||
|
|
|
@ -22,5 +22,10 @@ struct stat { /* cosmo abi */
|
|||
uint64_t st_gen; /* xnu/bsd only */
|
||||
};
|
||||
|
||||
int stat(const char *, struct stat *);
|
||||
int lstat(const char *, struct stat *);
|
||||
int fstat(int, struct stat *);
|
||||
int fstatat(int, const char *, struct stat *, int);
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_STAT_H_ */
|
||||
|
|
|
@ -18,5 +18,7 @@ struct sysinfo {
|
|||
uint32_t mem_unit; /* ram stuff above is multiples of this */
|
||||
};
|
||||
|
||||
int sysinfo(struct sysinfo *);
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_SYSINFO_H_ */
|
||||
|
|
|
@ -7,5 +7,7 @@ struct timespec {
|
|||
int64_t tv_nsec; /* nanoseconds */
|
||||
};
|
||||
|
||||
int futex(uint32_t *, int, int, const struct timespec *, uint32_t *);
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_TIMESPEC_H_ */
|
||||
|
|
|
@ -7,5 +7,7 @@ struct timeval {
|
|||
int64_t tv_usec; /* microseconds */
|
||||
};
|
||||
|
||||
int lutimes(const char *, const struct timeval[2]);
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_TIMEVAL_H_ */
|
||||
|
|
|
@ -9,5 +9,7 @@ struct tms {
|
|||
int64_t tms_cstime; /* children kernelspace time */
|
||||
};
|
||||
|
||||
long times(struct tms *);
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_TMS_H_ */
|
||||
|
|
|
@ -14,5 +14,7 @@ struct utsname {
|
|||
char domainname[SYS_NMLN];
|
||||
};
|
||||
|
||||
int uname(struct utsname *);
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_UTSNAME_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue