From: Arun Thomas Date: Tue, 9 Mar 2010 09:41:14 +0000 (+0000) Subject: Move archtypes.h, fpu.h, and stackframe.h X-Git-Tag: v3.1.7~248 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/CHANGES?a=commitdiff_plain;h=1f9ce647cfcc019fef9dc443d2e808207259e06a;p=minix.git Move archtypes.h, fpu.h, and stackframe.h Move archtypes.h to include/ dir, since several servers require it. Move fpu.h and stackframe.h to arch-specific header directory. Make source files and makefiles aware of the new header locations. --- diff --git a/commands/ibm/postmort.c b/commands/ibm/postmort.c index 1060d7797..4164307b1 100644 --- a/commands/ibm/postmort.c +++ b/commands/ibm/postmort.c @@ -33,7 +33,7 @@ #undef EXTERN /* defined this */ #define EXTERN /* so we get proc & mproc */ -#include "../../kernel/arch/i386/include/archtypes.h" +#include #include "../../kernel/const.h" #include "../../kernel/type.h" #include "../../kernel/proc.h" diff --git a/commands/ibm/sdump.c b/commands/ibm/sdump.c index eb3ac6dfe..9f9abc2dd 100644 --- a/commands/ibm/sdump.c +++ b/commands/ibm/sdump.c @@ -10,7 +10,7 @@ #undef EXTERN #define EXTERN -#include "../../kernel/arch/i386/include/archtypes.h" +#include #include "../../servers/pm/const.h" #include "../../servers/pm/type.h" #include "../../servers/pm/mproc.h" diff --git a/commands/mdb/core.c b/commands/mdb/core.c index 96f91f1a3..78448615c 100644 --- a/commands/mdb/core.c +++ b/commands/mdb/core.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include #include diff --git a/commands/mdb/kernel.c b/commands/mdb/kernel.c index 2afdf276b..ccc50d176 100644 --- a/commands/mdb/kernel.c +++ b/commands/mdb/kernel.c @@ -11,7 +11,7 @@ #include #include "proto.h" -#include +#include #include #include #include diff --git a/commands/mdb/mdb.c b/commands/mdb/mdb.c index c931b949c..47006109a 100644 --- a/commands/mdb/mdb.c +++ b/commands/mdb/mdb.c @@ -45,7 +45,7 @@ #include #include "proto.h" -#include "../../kernel/arch/i386/include/archtypes.h" +#include #include #include #include diff --git a/commands/ps/ps.c b/commands/ps/ps.c index 08efe8a50..676e10d2d 100644 --- a/commands/ps/ps.c +++ b/commands/ps/ps.c @@ -78,7 +78,7 @@ #include #include -#include "../../kernel/arch/i386/include/archtypes.h" +#include #include "../../kernel/const.h" #include "../../kernel/type.h" #include "../../kernel/proc.h" diff --git a/commands/simple/dumpcore.c b/commands/simple/dumpcore.c index f03214122..62e03170d 100644 --- a/commands/simple/dumpcore.c +++ b/commands/simple/dumpcore.c @@ -15,7 +15,7 @@ #include #include -#include "../../kernel/arch/i386/include/archtypes.h" +#include #include "../../kernel/proc.h" #define CLICK_WORDS (CLICK_SIZE / sizeof(unsigned long)) diff --git a/commands/simple/top.c b/commands/simple/top.c index 55d6e7d35..9fa434b1d 100644 --- a/commands/simple/top.c +++ b/commands/simple/top.c @@ -34,7 +34,7 @@ #include -#include "../../kernel/arch/i386/include/archtypes.h" +#include #include "../../servers/pm/mproc.h" #include "../../kernel/const.h" #include "../../kernel/proc.h" diff --git a/drivers/tty/Makefile b/drivers/tty/Makefile index 9e819ca28..ab7763371 100644 --- a/drivers/tty/Makefile +++ b/drivers/tty/Makefile @@ -14,7 +14,7 @@ d = .. # programs, flags, etc. MAKE = exec make CC = exec cc -CPPFLAGS = -I.. -I../.. -I../../kernel/arch/$(ARCH)/include -I$i +CPPFLAGS = -I.. -I../.. -I$i CFLAGS = $(CPPFLAGS) LDFLAGS = -i LIBS = -lsys -ltimers diff --git a/drivers/tty/keyboard.c b/drivers/tty/keyboard.c index 9a3be7b6f..9fe9dd5be 100644 --- a/drivers/tty/keyboard.c +++ b/drivers/tty/keyboard.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/arch/i386/Makefile b/include/arch/i386/Makefile index 5e3b1bbae..b3887ea76 100644 --- a/include/arch/i386/Makefile +++ b/include/arch/i386/Makefile @@ -1,6 +1,7 @@ INCSDIR= /usr/include/i386 -INCS= bios.h cmos.h cpu.h diskparm.h int86.h interrupt.h memory.h \ - partition.h pci.h ports.h vm.h +INCS= archtypes.h bios.h cmos.h cpu.h diskparm.h fpu.h int86.h \ + interrupt.h memory.h partition.h pci.h ports.h stackframe.h \ + vm.h .include diff --git a/kernel/arch/i386/include/archtypes.h b/include/arch/i386/archtypes.h similarity index 95% rename from kernel/arch/i386/include/archtypes.h rename to include/arch/i386/archtypes.h index 942363bc6..82c573b44 100644 --- a/kernel/arch/i386/include/archtypes.h +++ b/include/arch/i386/archtypes.h @@ -3,9 +3,8 @@ #define _I386_TYPES_H #include -#include "archconst.h" -#include -#include +#include +#include struct segdesc_s { /* segment descriptor for protected mode */ u16_t limit_low; diff --git a/include/sys/fpu.h b/include/arch/i386/fpu.h similarity index 100% rename from include/sys/fpu.h rename to include/arch/i386/fpu.h diff --git a/include/sys/stackframe.h b/include/arch/i386/stackframe.h similarity index 100% rename from include/sys/stackframe.h rename to include/arch/i386/stackframe.h diff --git a/include/minix/const.h b/include/minix/const.h index ea3aa37bc..9ba211b19 100644 --- a/include/minix/const.h +++ b/include/minix/const.h @@ -1,3 +1,5 @@ +#ifndef _MINIX_CONST_H +#define _MINIX_CONST_H #ifndef CHIP #error CHIP is not defined @@ -151,3 +153,5 @@ #define VERBOSEBOOT_BASIC 1 #define VERBOSEBOOT_MAX 2 #define VERBOSEBOOTVARNAME "verbose" + +#endif /* _MINIX_CONST_H */ diff --git a/include/sys/Makefile b/include/sys/Makefile index 08e8f0ad7..caf81424e 100644 --- a/include/sys/Makefile +++ b/include/sys/Makefile @@ -2,12 +2,12 @@ INCSDIR= /usr/include/sys -INCS= asynchio.h dir.h file.h fpu.h ioc_cmos.h ioc_disk.h \ +INCS= asynchio.h dir.h file.h ioc_cmos.h ioc_disk.h \ ioc_file.h ioc_memory.h ioc_scsi.h ioc_sound.h ioc_tape.h \ ioctl.h ioc_tty.h ipc.h jmp_buf.h kbdio.h mman.h \ mount.h mtio.h param.h ptrace.h queue.h resource.h \ select.h sem.h shm.h sigcontext.h signal.h socket.h \ - soundcard.h stackframe.h statfs.h stat.h svrctl.h timeb.h \ + soundcard.h statfs.h stat.h svrctl.h timeb.h \ time.h times.h types.h uio.h un.h utsname.h video.h vm.h \ wait.h diff --git a/include/sys/sigcontext.h b/include/sys/sigcontext.h index def987187..abac04aec 100644 --- a/include/sys/sigcontext.h +++ b/include/sys/sigcontext.h @@ -23,8 +23,8 @@ * be added in a different struct. */ #if (_MINIX_CHIP == _CHIP_INTEL) -#include -#include +#include +#include typedef struct stackframe_s sigregs; struct sigframe { /* stack frame created for signalled process */ diff --git a/kernel/arch/i386/apic_asm.S b/kernel/arch/i386/apic_asm.S index 3d0a138cf..815ce2825 100644 --- a/kernel/arch/i386/apic_asm.S +++ b/kernel/arch/i386/apic_asm.S @@ -1,4 +1,4 @@ -#include +#include "archconst.h" #include "apic.h" #include "sconst.h" #include "apic_asm.h" diff --git a/kernel/arch/i386/klib386.S b/kernel/arch/i386/klib386.S index dd94d6a58..cbfb932b4 100644 --- a/kernel/arch/i386/klib386.S +++ b/kernel/arch/i386/klib386.S @@ -4,7 +4,7 @@ #include #include #include -#include +#include "archconst.h" #include "../../const.h" #include "sconst.h" diff --git a/kernel/arch/i386/mpx386.S b/kernel/arch/i386/mpx386.S index d58c5d8e0..1729fa8cc 100644 --- a/kernel/arch/i386/mpx386.S +++ b/kernel/arch/i386/mpx386.S @@ -68,7 +68,7 @@ begbss: #include #include #include -#include +#include "archconst.h" #include "../../const.h" #include "../../proc.h" #include "sconst.h" diff --git a/kernel/arch/i386/protect.c b/kernel/arch/i386/protect.c index bbef77763..a77dcbe25 100644 --- a/kernel/arch/i386/protect.c +++ b/kernel/arch/i386/protect.c @@ -5,7 +5,7 @@ #include "../../kernel.h" #include "../../proc.h" -#include +#include "archconst.h" #include "proto.h" diff --git a/kernel/arch/i386/system.c b/kernel/arch/i386/system.c index 0b57abd70..665d85c87 100644 --- a/kernel/arch/i386/system.c +++ b/kernel/arch/i386/system.c @@ -10,8 +10,8 @@ #include #include #include -#include +#include "archconst.h" #include "proto.h" #include "../../proc.h" #include "../../debug.h" diff --git a/kernel/glo.h b/kernel/glo.h index 031805776..d3042d3dd 100644 --- a/kernel/glo.h +++ b/kernel/glo.h @@ -12,7 +12,8 @@ #endif #include -#include +#include +#include "archconst.h" #include "config.h" #include "debug.h" diff --git a/kernel/interrupt.c b/kernel/interrupt.c index d1168113d..a61331a52 100644 --- a/kernel/interrupt.c +++ b/kernel/interrupt.c @@ -15,7 +15,7 @@ #include "kernel.h" #include "proc.h" -#include +#include "archconst.h" #include "arch/i386/hw_intr.h" diff --git a/kernel/priv.h b/kernel/priv.h index d05a22683..b4bd9c886 100644 --- a/kernel/priv.h +++ b/kernel/priv.h @@ -13,6 +13,7 @@ * Jul 01, 2005 Created. (Jorrit N. Herder) */ #include +#include #include "const.h" #include "type.h" diff --git a/kernel/proto.h b/kernel/proto.h index eb9141876..fdcd6980f 100644 --- a/kernel/proto.h +++ b/kernel/proto.h @@ -4,7 +4,7 @@ #define PROTO_H #include -#include +#include #include /* Struct declarations. */ diff --git a/servers/is/Makefile b/servers/is/Makefile index a6af2bbd6..fb8de4aaa 100644 --- a/servers/is/Makefile +++ b/servers/is/Makefile @@ -15,7 +15,7 @@ f = $u/src/servers/fs # programs, flags, etc. CC = exec cc -CPPFLAGS=-I../../kernel/arch/$(ARCH)/include -I$i +CPPFLAGS=-I$i CFLAGS = $(CPROFILE) $(CPPFLAGS) LDFLAGS = -i LIBS = -lsys diff --git a/servers/is/inc.h b/servers/is/inc.h index 6c17ee9a1..08174df46 100644 --- a/servers/is/inc.h +++ b/servers/is/inc.h @@ -28,7 +28,7 @@ #include #include -#include +#include #include "proto.h" #include "glo.h" diff --git a/servers/pm/Makefile b/servers/pm/Makefile index f76be6867..dbb2891ec 100644 --- a/servers/pm/Makefile +++ b/servers/pm/Makefile @@ -12,7 +12,7 @@ k = $u/src/kernel # programs, flags, etc. CC = exec cc -CPPFLAGS=-I../../kernel/arch/$(ARCH)/include -I$i +CPPFLAGS=-I$i CFLAGS = $(CPROFILE) $(CPPFLAGS) LDFLAGS = -i diff --git a/servers/pm/dma.c b/servers/pm/dma.c index 11afac7ef..476006431 100644 --- a/servers/pm/dma.c +++ b/servers/pm/dma.c @@ -9,7 +9,6 @@ #include #include #include -#include #include "mproc.h" diff --git a/servers/pm/main.c b/servers/pm/main.c index a4fb748e6..e5cef3ad7 100644 --- a/servers/pm/main.c +++ b/servers/pm/main.c @@ -26,8 +26,7 @@ #include #include #include -#include -#include +#include #include #include "mproc.h" #include "param.h" diff --git a/servers/pm/misc.c b/servers/pm/misc.c index e5330ac89..e4c023f25 100644 --- a/servers/pm/misc.c +++ b/servers/pm/misc.c @@ -24,8 +24,7 @@ #include #include #include -#include -#include +#include #include #include #include "mproc.h" diff --git a/servers/pm/utility.c b/servers/pm/utility.c index f3058b3f6..0825d4b08 100644 --- a/servers/pm/utility.c +++ b/servers/pm/utility.c @@ -22,8 +22,7 @@ #include #include #include -#include -#include +#include #include "../../kernel/const.h" #include "../../kernel/config.h" #include "../../kernel/type.h" diff --git a/servers/rs/Makefile b/servers/rs/Makefile index 1e35b7c28..1bd073636 100644 --- a/servers/rs/Makefile +++ b/servers/rs/Makefile @@ -13,7 +13,7 @@ b = $i/ibm # programs, flags, etc. CC = exec cc -CPPFLAGS = -I../../kernel/arch/$(ARCH)/include +CPPFLAGS = CFLAGS = -I$i $(CPROFILE) $(CPPFLAGS) LDFLAGS = -i LIBS = -lsys diff --git a/servers/rs/inc.h b/servers/rs/inc.h index 892aa76fb..70ff1b8c3 100644 --- a/servers/rs/inc.h +++ b/servers/rs/inc.h @@ -27,7 +27,7 @@ #include #include -#include +#include #include /* For priv.h */ #include "../../kernel/priv.h" #include "../../kernel/ipc.h" diff --git a/servers/vm/Makefile b/servers/vm/Makefile index 8d844d84e..defbdd8bb 100644 --- a/servers/vm/Makefile +++ b/servers/vm/Makefile @@ -8,7 +8,7 @@ OBJ = main.o alloc.o utility.o exec.o exit.o fork.o break.o \ physravl.o rs.o queryexit.o map_mem.o ARCHOBJ = $(ARCH)/vm.o $(ARCH)/pagetable.o $(ARCH)/arch_pagefaults.o $(ARCH)/util.o -CPPFLAGS=-I../../kernel/arch/$(ARCH)/include -I$(ARCH) +CPPFLAGS=-I$(ARCH) CFLAGS = $(CPROFILE) $(CPPFLAGS) # build local binary diff --git a/servers/vm/i386/Makefile b/servers/vm/i386/Makefile index 77eb97c16..7f97f1341 100644 --- a/servers/vm/i386/Makefile +++ b/servers/vm/i386/Makefile @@ -3,7 +3,7 @@ include /etc/make.conf OBJ = vm.o pagetable.o arch_pagefaults.o util.o -CPPFLAGS=-I../../../kernel/arch/$(ARCH)/include -I. +CPPFLAGS=-I. CFLAGS = $(CPROFILE) $(CPPFLAGS) all: $(OBJ) diff --git a/servers/vm/i386/arch_vmproc.h b/servers/vm/i386/arch_vmproc.h index e6ea34bae..455e167e9 100644 --- a/servers/vm/i386/arch_vmproc.h +++ b/servers/vm/i386/arch_vmproc.h @@ -1,5 +1,4 @@ -#include #include #include #include diff --git a/servers/vm/main.c b/servers/vm/main.c index d0a7f8a5f..34184e27c 100644 --- a/servers/vm/main.c +++ b/servers/vm/main.c @@ -34,7 +34,7 @@ extern int missing_spares; -#include +#include #include "../../kernel/const.h" #include "../../kernel/config.h" #include "../../kernel/proc.h" diff --git a/servers/vm/utility.c b/servers/vm/utility.c index 844aae720..a4bbb8d0f 100644 --- a/servers/vm/utility.c +++ b/servers/vm/utility.c @@ -29,8 +29,7 @@ #include "glo.h" #include "util.h" -#include -#include +#include #include "../../kernel/const.h" #include "../../kernel/config.h" #include "../../kernel/type.h"