Skip to content

Commit

Permalink
Adopt the new Fil-C runtime header file style. Corresponds to llvm-pr…
Browse files Browse the repository at this point in the history
…oject-deluge/47f056256949
  • Loading branch information
Filip Pizlo committed Jun 26, 2024
1 parent 85c4980 commit ac12712
Show file tree
Hide file tree
Showing 29 changed files with 29 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/dirent/closedir.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <unistd.h>
#include <stdlib.h>
#include "__dirent.h"
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

int closedir(DIR *dir)
{
Expand Down
2 changes: 1 addition & 1 deletion src/dirent/dirfd.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <dirent.h>
#include "__dirent.h"
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

int dirfd(DIR *d)
{
Expand Down
2 changes: 1 addition & 1 deletion src/dirent/fdopendir.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <errno.h>
#include <stdlib.h>
#include "__dirent.h"
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

DIR *fdopendir(int fd)
{
Expand Down
2 changes: 1 addition & 1 deletion src/dirent/readdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <stddef.h>
#include "__dirent.h"
#include "syscall.h"
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

struct dirent *readdir(DIR *dir)
{
Expand Down
2 changes: 1 addition & 1 deletion src/dirent/rewinddir.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <unistd.h>
#include "__dirent.h"
#include "lock.h"
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

void rewinddir(DIR *dir)
{
Expand Down
2 changes: 1 addition & 1 deletion src/dirent/seekdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <unistd.h>
#include "__dirent.h"
#include "lock.h"
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

void seekdir(DIR *dir, long off)
{
Expand Down
2 changes: 1 addition & 1 deletion src/dirent/telldir.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <dirent.h>
#include "__dirent.h"
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

long telldir(DIR *dir)
{
Expand Down
2 changes: 1 addition & 1 deletion src/env/__libc_start_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "dynlink.h"
#include "libc.h"
#include <errno.h>
#include <stdfil.h>
#include <pizlonated_runtime.h>

static void dummy(void) {}
weak_alias(dummy, _init);
Expand Down
1 change: 1 addition & 0 deletions src/internal/libc.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <stdio.h>
#include <limits.h>
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

struct __locale_map;

Expand Down
2 changes: 1 addition & 1 deletion src/internal/pthread_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "syscall.h"
#include "atomic.h"
#include "futex.h"
#include <stdfil.h>
#include <pizlonated_runtime.h>

#include "pthread_arch.h"

Expand Down
1 change: 1 addition & 0 deletions src/internal/syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <sys/syscall.h>
#include "syscall_arch.h"
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

#ifndef SYSCALL_RLIM_INFINITY
#define SYSCALL_RLIM_INFINITY (~0ULL)
Expand Down
2 changes: 1 addition & 1 deletion src/ldso/dlopen.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <dlfcn.h>
#include "dynlink.h"
#include <stdfil.h>
#include <pizlonated_common_syscalls.h>

static void *stub_dlopen(const char *file, int mode)
{
Expand Down
2 changes: 1 addition & 1 deletion src/ldso/dlsym.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <dlfcn.h>
#include "dynlink.h"
#include <stdfil.h>
#include <pizlonated_common_syscalls.h>

void *dlsym(void *restrict p, const char *restrict s)
{
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/utmpx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <utmpx.h>
#include <stddef.h>
#include <errno.h>
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

void endutxent(void)
{
Expand Down
2 changes: 1 addition & 1 deletion src/misc/getentropy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <unistd.h>
#include <pthread.h>
#include <errno.h>
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

int getentropy(void *buffer, size_t len)
{
Expand Down
2 changes: 1 addition & 1 deletion src/misc/initgroups.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#define _GNU_SOURCE
#include <grp.h>
#include <limits.h>
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

int initgroups(const char *user, gid_t gid)
{
Expand Down
2 changes: 1 addition & 1 deletion src/misc/openpty.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <pty.h>
#include <stdio.h>
#include <pthread.h>
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

int openpty(int *pm, int *ps, char *name, const struct termios *tio, const struct winsize *ws)
{
Expand Down
2 changes: 1 addition & 1 deletion src/misc/syslog.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <fcntl.h>
#include "lock.h"
#include "fork_impl.h"
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>
#include <stdio.h>
#include <stdlib.h>

Expand Down
2 changes: 1 addition & 1 deletion src/network/getaddrinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <endian.h>
#include <errno.h>
#include "lookup.h"
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

int getaddrinfo(const char *restrict host, const char *restrict serv, const struct addrinfo *restrict hint, struct addrinfo **restrict res)
{
Expand Down
2 changes: 1 addition & 1 deletion src/network/socket.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <sys/socket.h>
#include <fcntl.h>
#include <errno.h>
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

int socket(int domain, int type, int protocol)
{
Expand Down
2 changes: 1 addition & 1 deletion src/passwd/getgrent.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "pwf.h"
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

static FILE *f;
static char *line, **mem;
Expand Down
2 changes: 1 addition & 1 deletion src/passwd/getgrouplist.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <byteswap.h>
#include <errno.h>
#include "nscd.h"
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

int getgrouplist(const char *user, gid_t gid, gid_t *groups, int *ngroups)
{
Expand Down
2 changes: 1 addition & 1 deletion src/passwd/getpwent.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "pwf.h"
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

static FILE *f;
static char *line;
Expand Down
2 changes: 1 addition & 1 deletion src/process/posix_spawnp.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <spawn.h>
#include <unistd.h>
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

int posix_spawnp(pid_t *restrict res, const char *restrict file,
const posix_spawn_file_actions_t *fa,
Expand Down
2 changes: 1 addition & 1 deletion src/sched/sched_yield.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <sched.h>
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

int sched_yield()
{
Expand Down
2 changes: 1 addition & 1 deletion src/setjmp/longjmp.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <setjmp.h>
#include <stdfil.h>
#include <pizlonated_runtime.h>

_Noreturn void longjmp(jmp_buf buf, int value)
{
Expand Down
2 changes: 1 addition & 1 deletion src/signal/sigwait.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <signal.h>
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

int sigwait(const sigset_t *restrict mask, int *restrict sig)
{
Expand Down
2 changes: 1 addition & 1 deletion src/stat/futimens.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <sys/stat.h>
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

int futimens(int fd, const struct timespec times[2])
{
Expand Down
2 changes: 1 addition & 1 deletion src/unistd/getpeereid.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <unistd.h>
#include <stdfil.h>
#include <pizlonated_musl_syscalls.h>

int getpeereid(int fd, uid_t *uid, gid_t *gid) {
return zsys_getpeereid(fd, uid, gid);
Expand Down

0 comments on commit ac12712

Please sign in to comment.