Skip to content

Commit

Permalink
Fix string.h being auto included pretty much everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
tbodt committed Dec 24, 2018
1 parent 557e86c commit f6f54ad
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion emu/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#include "misc.h"
#include "emu/float80.h"
#include "emu/memory.h"
#include "emu/tlb.h"

struct cpu_state;
struct tlb;
void cpu_run(struct cpu_state *cpu);
int cpu_step32(struct cpu_state *cpu, struct tlb *tlb);
int cpu_step16(struct cpu_state *cpu, struct tlb *tlb);
Expand Down
3 changes: 2 additions & 1 deletion emu/fpu.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// I don't remember if the interpreter was supposed to use this in addition to the jit
#include <math.h>
#include <string.h>
#include "emu/cpu.h"
#include "emu/float80.h"
#include "emu/fpu.h"
#include <math.h>

#define ST(i) cpu->fp[cpu->top + i]

Expand Down
1 change: 0 additions & 1 deletion emu/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include <stdatomic.h>
#include <unistd.h>
#include <string.h>
#include "util/list.h"
#include "util/sync.h"
#include "misc.h"
Expand Down
1 change: 1 addition & 0 deletions emu/modrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "debug.h"
#include "misc.h"
#include "emu/cpu.h"
#include "emu/tlb.h"

#undef DEFAULT_CHANNEL
#define DEFAULT_CHANNEL instr
Expand Down
1 change: 1 addition & 0 deletions emu/tlb.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef TLB_H
#define TLB_H

#include <string.h>
#include "emu/memory.h"
#include "debug.h"

Expand Down
2 changes: 2 additions & 0 deletions fs/fd.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include <stdlib.h>
#include <string.h>
#include "debug.h"
#include "kernel/task.h"
#include "kernel/errno.h"
#include "kernel/resource.h"
Expand Down
1 change: 1 addition & 0 deletions fs/mem.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <string.h>
#include "kernel/errno.h"
#include "kernel/random.h"
#include "fs/mem.h"
Expand Down
1 change: 1 addition & 0 deletions fs/mount.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <string.h>
#include <sys/stat.h>
#include "kernel/calls.h"
#include "kernel/fs.h"
Expand Down
1 change: 1 addition & 0 deletions fs/poll.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <string.h>
#include <poll.h>
#include "misc.h"
#include "util/list.h"
Expand Down
1 change: 1 addition & 0 deletions fs/proc.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <string.h>
#include <sys/stat.h>
#include "kernel/calls.h"
#include "kernel/fs.h"
Expand Down
1 change: 1 addition & 0 deletions fs/sock.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <string.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include "kernel/calls.h"
Expand Down
1 change: 1 addition & 0 deletions jit/offsets.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "jit/jit.h"
#include "jit/frame.h"
#include "emu/cpu.h"
#include "emu/tlb.h"

void cpu() {
OFFSET(CPU, cpu_state, eax);
Expand Down
1 change: 1 addition & 0 deletions kernel/poll.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <string.h>
#include "debug.h"
#include "kernel/fs.h"
#include "fs/fd.h"
Expand Down
1 change: 1 addition & 0 deletions kernel/signal.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "debug.h"
#include <string.h>
#include <signal.h>
#include "kernel/calls.h"
#include "kernel/signal.h"
Expand Down
1 change: 1 addition & 0 deletions main.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <stdlib.h>
#include <string.h>
#include "kernel/calls.h"
#include "kernel/task.h"
#include "xX_main_Xx.h"
Expand Down
3 changes: 2 additions & 1 deletion xX_main_Xx.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <signal.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include "kernel/init.h"
#include "kernel/fs.h"

Expand Down

0 comments on commit f6f54ad

Please sign in to comment.