This patch removes warnings about implicit definitions of bzero and bcopy by including <oskit/c/string.h>.
(At some other places already (Glibc-)<string.h> has been included, but this could perhaps be a problem if e.g. size_t were not the same as oskit_size_t, since oskit-mach is linked against liboskit_c, not libc). If you would like <string.h> to be used instead, run sed 's/lude *<oskit\/c\//lude </' over the patch. Besides this, some unused variables within these files have been removed or deactivated (in case they belong to deactivated code). -------------------------------------------------------------------- 2002-03-05 Michael Teichgraeber <[EMAIL PROTECTED]> * device/net_io.c: Include <oskit/c/string.h> * i386/i386/fpu.c: Likewise. * i386/i386/pcb.c: Likewise. * i386/i386/phys.c: Likewise. * i386/i386/trap.c: Likewise. * i386/i386/user_ldt.c: Likewise. * i386/intel/pmap.c: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_object.c: Likewise. * ipc/ipc_port.c: Likewise. * ipc/mach_debug.c: Likewise. * kern/eventcount.c: Likewise. * kern/host.c: Likewise. * kern/lock.c: Likewise. * kern/mach_clock.c: Likewise. * kern/pc_sample.c: Likewise. * kern/processor.c: Likewise. * kern/syscall_emulation.c: Likewise. * kern/task.c: Likewise. * kern/zalloc.c: Likewise. * vm/vm_debug.c: Likewise. * vm/vm_kern.c: Likewise. * vm/vm_object.c: Likewise. * device/net_io.c (net_set_filter): Removed non-void* casts from arguments of bcopy call. * i386/i386/phys.c (pmap_copy_page): Supplied return type `void'. (pmap_zero_page): Likewise. * i386/i386/phys.c (pmap_copy_page): Added void* casts within bcopy call. * device/net_io.c: Don't include ds_routines.h. * kern/task.c (task_create): Encapsulated i within #if FAST_TAS. * i386/i386/pcb.c (thread_setstatus): Deactivated unused variables. * device/dev_pager.c (device_pager_data_write): Likewise. * kern/bootstrap.c (copy_bootstrap): Likewise. * i386/i386/trap.c (v86_assist): Removed unused variable(s). (kernel_trap): Likewise. (user_trap): Likewise. * i386/i386/pit.c (clkstart): Likewise. * device/net_io.c (net_set_filter): Likewise. * kern/bootstrap.c (boot_script_exec_cmd): Likewise. * ipc/ipc_kmsg.c (ipc_kmsg_copyin_body): Likewise. Index: device/dev_pager.c =================================================================== RCS file: /cvsroot/hurd/gnumach/device/dev_pager.c,v retrieving revision 1.1.1.1.2.2 diff -u -p -r1.1.1.1.2.2 dev_pager.c --- device/dev_pager.c 5 Apr 2001 06:52:46 -0000 1.1.1.1.2.2 +++ device/dev_pager.c 5 Mar 2002 01:11:46 -0000 @@ -420,10 +420,11 @@ kern_return_t device_pager_data_write( register pointer_t addr, vm_size_t data_count) { +#if 0 register dev_pager_t ds; register device_t device; kern_return_t result; - +#endif panic("(device_pager)data_write: called"); #if 0 ds = dev_pager_hash_lookup((ipc_port_t)pager); Index: device/net_io.c =================================================================== RCS file: /cvsroot/hurd/gnumach/device/net_io.c,v retrieving revision 1.1.1.1.2.2 diff -u -p -r1.1.1.1.2.2 net_io.c --- device/net_io.c 5 Apr 2001 06:52:46 -0000 1.1.1.1.2.2 +++ device/net_io.c 5 Mar 2002 01:11:49 -0000 @@ -47,7 +47,6 @@ #include <device/net_io.h> #include <device/if_hdr.h> /*#include <device/io_req.h> */ -#include <device/ds_routines.h> #include <mach/boolean.h> #include <mach/vm_param.h> @@ -62,6 +61,8 @@ #include <kern/sched_prim.h> #include <kern/thread.h> +#include <oskit/c/string.h> + #if NORMA_ETHER #include <norma/ipc_ether.h> #endif /*NORMA_ETHER*/ @@ -1270,8 +1271,8 @@ net_set_filter(ifp, rcv_port, priority, my_infp->rcv_count = 0; /* Copy filter program. */ - bcopy ((vm_offset_t)filter, (vm_offset_t)my_infp->filter, - filter_bytes); + bcopy (filter, my_infp->filter, filter_bytes); + my_infp->filter_end = (filter_t *)((char *)my_infp->filter + filter_bytes); @@ -1291,7 +1292,6 @@ net_set_filter(ifp, rcv_port, priority, if (match != 0) { /* Insert to hash list */ net_hash_entry_t *p; - int j; hash_entp->rcv_port = rcv_port; for (i = 0; i < match->jt; i++) /* match->jt is n_keys */ Index: i386/i386/fpu.c =================================================================== RCS file: /cvsroot/hurd/gnumach/i386/i386/fpu.c,v retrieving revision 1.2.2.1 diff -u -p -r1.2.2.1 fpu.c --- i386/i386/fpu.c 25 Nov 1999 23:12:56 -0000 1.2.2.1 +++ i386/i386/fpu.c 5 Mar 2002 01:11:49 -0000 @@ -37,6 +37,8 @@ #include <kern/thread.h> #include <kern/zalloc.h> +#include <oskit/c/string.h> + #include <i386/thread.h> #include <i386/fpu.h> #include "cpu_number.h" Index: i386/i386/pcb.c =================================================================== RCS file: /cvsroot/hurd/gnumach/i386/i386/pcb.c,v retrieving revision 1.2.2.2 diff -u -p -r1.2.2.2 pcb.c --- i386/i386/pcb.c 29 Oct 2000 08:53:32 -0000 1.2.2.2 +++ i386/i386/pcb.c 5 Mar 2002 01:11:50 -0000 @@ -31,6 +31,7 @@ #include <mach/kern_return.h> #include <mach/thread_status.h> #include <oskit/exec/exec.h> +#include <oskit/c/string.h> #include "vm_param.h" #include <kern/counters.h> @@ -508,8 +509,10 @@ kern_return_t thread_setstatus(thread, f * Temporary - replace by i386_io_map */ case i386_ISA_PORT_MAP_STATE: { +#if 0 register struct i386_isa_port_map_state *state; register iopb_tss_t tss; +#endif if (count < i386_ISA_PORT_MAP_STATE_COUNT) return(KERN_INVALID_ARGUMENT); Index: i386/i386/phys.c =================================================================== RCS file: /cvsroot/hurd/gnumach/i386/i386/phys.c,v retrieving revision 1.1.1.1.2.1 diff -u -p -r1.1.1.1.2.1 phys.c --- i386/i386/phys.c 25 Nov 1999 23:13:56 -0000 1.1.1.1.2.1 +++ i386/i386/phys.c 5 Mar 2002 01:11:50 -0000 @@ -37,6 +37,7 @@ #include <mach/machine/vm_param.h> #include <oskit/x86/base_paging.h> +#include <oskit/c/string.h> #include <kern/assert.h> @@ -65,8 +66,8 @@ debug_unprotect_page (vm_offset_t p) /* * pmap_zero_page zeros the specified (machine independent) page. */ -pmap_zero_page(p) - vm_offset_t p; +void +pmap_zero_page (vm_offset_t p) { assert(p != vm_page_fictitious_addr); debug_unprotect_page (p); @@ -77,15 +78,15 @@ pmap_zero_page(p) /* * pmap_copy_page copies the specified (machine independent) pages. */ -pmap_copy_page(src, dst) - vm_offset_t src, dst; +void +pmap_copy_page (vm_offset_t src, vm_offset_t dst) { assert(src != vm_page_fictitious_addr); assert(dst != vm_page_fictitious_addr); debug_unprotect_page (src); debug_unprotect_page (dst); - bcopy(phystokv(src), phystokv(dst), PAGE_SIZE); + bcopy((void*) phystokv(src), (void*) phystokv(dst), PAGE_SIZE); debug_protect_page (src); debug_protect_page (dst); } Index: i386/i386/trap.c =================================================================== RCS file: /cvsroot/hurd/gnumach/i386/i386/trap.c,v retrieving revision 1.4.2.3 diff -u -p -r1.4.2.3 trap.c --- i386/i386/trap.c 5 Apr 2001 06:52:46 -0000 1.4.2.3 +++ i386/i386/trap.c 5 Mar 2002 01:11:51 -0000 @@ -54,6 +54,7 @@ #include <oskit/gdb.h> #include <oskit/x86/pc/base_console.h> /* enable_gdb */ #include <oskit/x86/physmem.h> +#include <oskit/c/string.h> #include "debug.h" @@ -173,7 +174,6 @@ char *trap_name(unsigned int trapnum) void kernel_trap(regs) register struct trap_state *regs; { - int exc; int code; int subcode; register int type; @@ -347,8 +347,6 @@ int user_trap(regs) int code; int subcode; register int type; - vm_map_t map; - kern_return_t result; register thread_t thread = current_thread(); if ((vm_offset_t)thread < phys_mem_max) { @@ -802,7 +800,6 @@ v86_assist(thread, regs) { vm_offset_t sp; int nflags; - int size; union iret_struct iret_struct; v86->flags &= ~V86_IRET_PENDING; Index: i386/i386/user_ldt.c =================================================================== RCS file: /cvsroot/hurd/gnumach/i386/i386/user_ldt.c,v retrieving revision 1.2.2.1 diff -u -p -r1.2.2.1 user_ldt.c --- i386/i386/user_ldt.c 25 Nov 1999 23:14:15 -0000 1.2.2.1 +++ i386/i386/user_ldt.c 5 Mar 2002 01:11:52 -0000 @@ -33,7 +33,9 @@ #include <vm/vm_kern.h> +#include <oskit/c/string.h> #include <oskit/x86/seg.h> + #include <i386/thread.h> #include <i386/user_ldt.h> #include "ldt.h" Index: i386/intel/pmap.c =================================================================== RCS file: /cvsroot/hurd/gnumach/i386/intel/pmap.c,v retrieving revision 1.3.2.3 diff -u -p -r1.3.2.3 pmap.c --- i386/intel/pmap.c 5 Apr 2001 06:52:46 -0000 1.3.2.3 +++ i386/intel/pmap.c 5 Mar 2002 01:11:54 -0000 @@ -76,6 +76,7 @@ #include <oskit/x86/physmem.h> #include <oskit/x86/base_cpu.h> +#include <oskit/c/string.h> #include <mach/machine/vm_param.h> #include <machine/thread.h> Index: ipc/ipc_kmsg.c =================================================================== RCS file: /cvsroot/hurd/gnumach/ipc/ipc_kmsg.c,v retrieving revision 1.1.1.1.2.1 diff -u -p -r1.1.1.1.2.1 ipc_kmsg.c --- ipc/ipc_kmsg.c 5 Apr 2001 06:52:47 -0000 1.1.1.1.2.1 +++ ipc/ipc_kmsg.c 5 Mar 2002 01:11:57 -0000 @@ -61,6 +61,8 @@ #include <ipc/ipc_machdep.h> +#include <oskit/c/string.h> + extern int copyinmap(); extern int copyoutmap(); void ipc_msg_print(); /* forward */ @@ -1385,7 +1387,6 @@ ipc_kmsg_copyin_body(kmsg, space, map) ipc_object_t dest; vm_offset_t saddr, eaddr; boolean_t complex; - mach_msg_return_t mr; boolean_t use_page_lists, steal_pages; dest = (ipc_object_t) kmsg->ikm_header.msgh_remote_port; Index: ipc/ipc_object.c =================================================================== RCS file: /cvsroot/hurd/gnumach/ipc/ipc_object.c,v retrieving revision 1.1.1.1.2.2 diff -u -p -r1.1.1.1.2.2 ipc_object.c --- ipc/ipc_object.c 7 Oct 2001 22:25:16 -0000 1.1.1.1.2.2 +++ ipc/ipc_object.c 5 Mar 2002 01:11:58 -0000 @@ -37,6 +37,9 @@ #include <mach/kern_return.h> #include <mach/port.h> #include <mach/message.h> + +#include <oskit/c/string.h> + #include <ipc/port.h> #include <ipc/ipc_space.h> #include <ipc/ipc_entry.h> Index: ipc/ipc_port.c =================================================================== RCS file: /cvsroot/hurd/gnumach/ipc/ipc_port.c,v retrieving revision 1.1.1.1.2.1 diff -u -p -r1.1.1.1.2.1 ipc_port.c --- ipc/ipc_port.c 5 Apr 2001 06:52:47 -0000 1.1.1.1.2.1 +++ ipc/ipc_port.c 5 Mar 2002 01:11:59 -0000 @@ -41,6 +41,9 @@ #include <kern/lock.h> #include <kern/ipc_sched.h> #include <kern/ipc_kobject.h> + +#include <oskit/c/string.h> + #include <ipc/ipc_entry.h> #include <ipc/ipc_space.h> #include <ipc/ipc_object.h> Index: ipc/mach_debug.c =================================================================== RCS file: /cvsroot/hurd/gnumach/ipc/mach_debug.c,v retrieving revision 1.1.1.1.2.1 diff -u -p -r1.1.1.1.2.1 mach_debug.c --- ipc/mach_debug.c 5 Apr 2001 06:52:47 -0000 1.1.1.1.2.1 +++ ipc/mach_debug.c 5 Mar 2002 01:11:59 -0000 @@ -51,6 +51,7 @@ #include <ipc/ipc_table.h> #include <ipc/ipc_right.h> +#include <oskit/c/string.h> /* Index: kern/bootstrap.c =================================================================== RCS file: /cvsroot/hurd/gnumach/kern/bootstrap.c,v retrieving revision 1.3.2.10 diff -u -p -r1.3.2.10 bootstrap.c --- kern/bootstrap.c 7 Oct 2001 22:25:16 -0000 1.3.2.10 +++ kern/bootstrap.c 5 Mar 2002 01:12:00 -0000 @@ -446,7 +446,9 @@ read_exec(void *handle, vm_offset_t file static void copy_bootstrap(void *e, exec_info_t *boot_exec_info) { +#if 0 /*XXX*/ register vm_map_t user_map = current_task()->map; +#endif int err; if (err = exec_load(boot_read, read_exec, e, boot_exec_info)) @@ -689,9 +691,7 @@ boot_script_exec_cmd (void *hook, task_t char **argv, char *strings, int stringlen) { struct multiboot_module *mod = hook; - exec_info_t boot_exec_info; - register vm_map_t user_map = current_task()->map; int err; if (task != MACH_PORT_NULL) Index: kern/eventcount.c =================================================================== RCS file: /cvsroot/hurd/gnumach/kern/eventcount.c,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 eventcount.c --- kern/eventcount.c 25 Feb 1997 21:28:22 -0000 1.1.1.1 +++ kern/eventcount.c 5 Mar 2002 01:12:00 -0000 @@ -52,6 +52,8 @@ #include <kern/eventcount.h> +#include <oskit/c/string.h> + #if NCPUS <= 1 void simpler_thread_setrun( Index: kern/host.c =================================================================== RCS file: /cvsroot/hurd/gnumach/kern/host.c,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 host.c --- kern/host.c 25 Feb 1997 21:28:22 -0000 1.1.1.1 +++ kern/host.c 5 Mar 2002 01:12:01 -0000 @@ -42,6 +42,8 @@ #include <kern/processor.h> #include <kern/ipc_host.h> +#include <oskit/c/string.h> + #include <mach/vm_param.h> Index: kern/lock.c =================================================================== RCS file: /cvsroot/hurd/gnumach/kern/lock.c,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 lock.c --- kern/lock.c 25 Feb 1997 21:28:23 -0000 1.1.1.1 +++ kern/lock.c 5 Mar 2002 01:12:01 -0000 @@ -45,6 +45,8 @@ #include <ddb/db_sym.h> #endif +#include <oskit/c/string.h> + #if NCPUS > 1 Index: kern/mach_clock.c =================================================================== RCS file: /cvsroot/hurd/gnumach/kern/mach_clock.c,v retrieving revision 1.3.2.2 diff -u -p -r1.3.2.2 mach_clock.c --- kern/mach_clock.c 5 Apr 2001 06:52:47 -0000 1.3.2.2 +++ kern/mach_clock.c 5 Mar 2002 01:12:02 -0000 @@ -62,6 +62,8 @@ #include <kern/pc_sample.h> #endif +#include <oskit/c/string.h> + void softclock(); /* forward */ Index: kern/pc_sample.c =================================================================== RCS file: /cvsroot/hurd/gnumach/kern/pc_sample.c,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 pc_sample.c --- kern/pc_sample.c 25 Feb 1997 21:28:24 -0000 1.1.1.1 +++ kern/pc_sample.c 5 Mar 2002 01:12:02 -0000 @@ -31,6 +31,9 @@ #include <mach/mach_types.h> /* vm_address_t */ #include <mach/std_types.h> /* pointer_t */ #include <mach/pc_sample.h> + +#include <oskit/c/string.h> + #include <kern/host.h> #include <kern/thread.h> #include <kern/pc_sample.h> Index: kern/processor.c =================================================================== RCS file: /cvsroot/hurd/gnumach/kern/processor.c,v retrieving revision 1.1.1.1.2.1 diff -u -p -r1.1.1.1.2.1 processor.c --- kern/processor.c 5 Apr 2001 06:52:47 -0000 1.1.1.1.2.1 +++ kern/processor.c 5 Mar 2002 01:12:03 -0000 @@ -35,6 +35,9 @@ #include <mach/policy.h> #include <mach/processor_info.h> #include <mach/vm_param.h> + +#include <oskit/c/string.h> + #include <kern/cpu_number.h> #include <kern/lock.h> #include <kern/host.h> Index: kern/syscall_emulation.c =================================================================== RCS file: /cvsroot/hurd/gnumach/kern/syscall_emulation.c,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 syscall_emulation.c --- kern/syscall_emulation.c 25 Feb 1997 21:28:26 -0000 1.1.1.1 +++ kern/syscall_emulation.c 5 Mar 2002 01:12:03 -0000 @@ -26,6 +26,9 @@ #include <mach/error.h> #include <mach/vm_param.h> + +#include <oskit/c/string.h> + #include <kern/syscall_emulation.h> #include <kern/task.h> #include <kern/kalloc.h> Index: kern/task.c =================================================================== RCS file: /cvsroot/hurd/gnumach/kern/task.c,v retrieving revision 1.3 diff -u -p -r1.3 task.c --- kern/task.c 23 May 1999 16:13:00 -0000 1.3 +++ kern/task.c 5 Mar 2002 01:12:04 -0000 @@ -43,6 +43,9 @@ #include <mach/task_special_ports.h> #include <ipc/ipc_space.h> #include <ipc/ipc_types.h> + +#include <oskit/c/string.h> + #include <kern/mach_param.h> #include <kern/task.h> #include <kern/thread.h> @@ -126,7 +129,10 @@ kern_return_t task_create( { register task_t new_task; register processor_set_t pset; + +#if FAST_TAS int i; +#endif new_task = (task_t) zalloc(task_zone); if (new_task == TASK_NULL) { Index: kern/zalloc.c =================================================================== RCS file: /cvsroot/hurd/gnumach/kern/zalloc.c,v retrieving revision 1.1.1.1.2.1 diff -u -p -r1.1.1.1.2.1 zalloc.c --- kern/zalloc.c 5 Apr 2001 06:52:47 -0000 1.1.1.1.2.1 +++ kern/zalloc.c 5 Mar 2002 01:12:05 -0000 @@ -53,6 +53,9 @@ #include <vm/vm_kern.h> #endif +#include <oskit/c/string.h> + + #define ADD_TO_ZONE(zone, element) \ MACRO_BEGIN \ *((vm_offset_t *)(element)) = (zone)->free_elements; \ Index: vm/vm_debug.c =================================================================== RCS file: /cvsroot/hurd/gnumach/vm/vm_debug.c,v retrieving revision 1.1.1.1.2.1 diff -u -p -r1.1.1.1.2.1 vm_debug.c --- vm/vm_debug.c 5 Apr 2001 06:52:47 -0000 1.1.1.1.2.1 +++ vm/vm_debug.c 5 Mar 2002 01:12:06 -0000 @@ -50,6 +50,7 @@ #include <kern/host.h> #include <ipc/ipc_port.h> +#include <oskit/c/string.h> /* Index: vm/vm_kern.c =================================================================== RCS file: /cvsroot/hurd/gnumach/vm/vm_kern.c,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 vm_kern.c --- vm/vm_kern.c 25 Feb 1997 21:28:36 -0000 1.1.1.1 +++ vm/vm_kern.c 5 Mar 2002 01:12:06 -0000 @@ -46,6 +46,7 @@ #include <vm/vm_page.h> #include <vm/vm_pageout.h> +#include <oskit/c/string.h> /* Index: vm/vm_object.c =================================================================== RCS file: /cvsroot/hurd/gnumach/vm/vm_object.c,v retrieving revision 1.2.2.1 diff -u -p -r1.2.2.1 vm_object.c --- vm/vm_object.c 25 Nov 1999 23:29:03 -0000 1.2.2.1 +++ vm/vm_object.c 5 Mar 2002 01:12:10 -0000 @@ -58,6 +58,8 @@ #include <vm/vm_page.h> #include <vm/vm_pageout.h> +#include <oskit/c/string.h> + void memory_object_release( ipc_port_t pager, _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd