From: "Randy.Dunlap" Cleanups for more syscall prototypes. --- arch/alpha/kernel/osf_sys.c | 1 - arch/arm/kernel/armksyms.c | 7 ------- arch/arm/kernel/sys_arm.c | 2 +- arch/arm26/kernel/armksyms.c | 7 ------- arch/arm26/kernel/sys_arm.c | 2 +- arch/h8300/kernel/sys_h8300.c | 3 +-- arch/i386/kernel/sys_i386.c | 3 +-- arch/ia64/ia32/sys_ia32.c | 5 ----- arch/m68k/kernel/sys_m68k.c | 3 +-- arch/m68knommu/kernel/sys_m68k.c | 3 +-- arch/mips/kernel/linux32.c | 6 ------ arch/mips/kernel/sysirix.c | 6 ------ arch/parisc/kernel/parisc_ksyms.c | 5 +---- arch/ppc/kernel/syscalls.c | 3 +-- arch/ppc64/kernel/sys_ppc32.c | 2 -- arch/s390/kernel/compat_linux.c | 12 ------------ arch/s390/kernel/sys_s390.c | 4 ---- arch/sh/kernel/sys_sh.c | 5 +---- arch/sparc/kernel/setup.c | 2 +- arch/sparc/kernel/sys_sunos.c | 15 --------------- arch/sparc64/kernel/setup.c | 2 +- arch/sparc64/kernel/sparc64_ksyms.c | 3 +-- arch/sparc64/kernel/sys_sparc.c | 2 -- arch/sparc64/kernel/sys_sparc32.c | 5 ----- arch/sparc64/kernel/sys_sunos32.c | 11 ----------- arch/x86_64/ia32/sys_ia32.c | 12 ------------ include/linux/syscalls.h | 10 +++++----- kernel/compat.c | 8 +------- 28 files changed, 18 insertions(+), 131 deletions(-) diff -puN arch/alpha/kernel/osf_sys.c~add-syscalls_h-3 arch/alpha/kernel/osf_sys.c --- 25/arch/alpha/kernel/osf_sys.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/alpha/kernel/osf_sys.c 2004-02-06 22:35:55.000000000 -0800 @@ -822,7 +822,6 @@ osf_setsysinfo(unsigned long op, void *b affects all sorts of things, like timeval and itimerval. */ extern struct timezone sys_tz; -extern asmlinkage int sys_utimes(char *, struct timeval *); extern int do_adjtimex(struct timex *); struct timeval32 diff -puN arch/arm26/kernel/armksyms.c~add-syscalls_h-3 arch/arm26/kernel/armksyms.c --- 25/arch/arm26/kernel/armksyms.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/arm26/kernel/armksyms.c 2004-02-06 22:35:55.000000000 -0800 @@ -44,13 +44,6 @@ extern void outswb(unsigned int port, co extern void __bad_xchg(volatile void *ptr, int size); /* - * syscalls - */ -extern int sys_write(int, const char *, int); -extern int sys_read(int, char *, int); -extern int sys_lseek(int, off_t, int); - -/* * libgcc functions - functions that are used internally by the * compiler... (prototypes are not correct though, but that * doesn't really matter since they're not versioned). diff -puN arch/arm26/kernel/sys_arm.c~add-syscalls_h-3 arch/arm26/kernel/sys_arm.c --- 25/arch/arm26/kernel/sys_arm.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/arm26/kernel/sys_arm.c 2004-02-06 22:35:55.000000000 -0800 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -138,7 +139,6 @@ out: * Perform the select(nd, in, out, ex, tv) and mmap() system * calls. */ -extern asmlinkage int sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *); struct sel_arg_struct { unsigned long n; diff -puN arch/arm/kernel/armksyms.c~add-syscalls_h-3 arch/arm/kernel/armksyms.c --- 25/arch/arm/kernel/armksyms.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/arm/kernel/armksyms.c 2004-02-06 22:35:55.000000000 -0800 @@ -45,13 +45,6 @@ extern void outswb(unsigned int port, co extern void __bad_xchg(volatile void *ptr, int size); /* - * syscalls - */ -extern int sys_write(int, const char *, int); -extern int sys_read(int, char *, int); -extern int sys_lseek(int, off_t, int); - -/* * libgcc functions - functions that are used internally by the * compiler... (prototypes are not correct though, but that * doesn't really matter since they're not versioned). diff -puN arch/arm/kernel/sys_arm.c~add-syscalls_h-3 arch/arm/kernel/sys_arm.c --- 25/arch/arm/kernel/sys_arm.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/arm/kernel/sys_arm.c 2004-02-06 22:35:55.000000000 -0800 @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -137,7 +138,6 @@ out: * Perform the select(nd, in, out, ex, tv) and mmap() system * calls. */ -extern asmlinkage int sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *); struct sel_arg_struct { unsigned long n; diff -puN arch/h8300/kernel/sys_h8300.c~add-syscalls_h-3 arch/h8300/kernel/sys_h8300.c --- 25/arch/h8300/kernel/sys_h8300.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/h8300/kernel/sys_h8300.c 2004-02-06 22:35:55.000000000 -0800 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -155,8 +156,6 @@ out: } #endif -extern asmlinkage int sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *); - struct sel_arg_struct { unsigned long n; fd_set *inp, *outp, *exp; diff -puN arch/i386/kernel/sys_i386.c~add-syscalls_h-3 arch/i386/kernel/sys_i386.c --- 25/arch/i386/kernel/sys_i386.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/i386/kernel/sys_i386.c 2004-02-06 22:35:55.000000000 -0800 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -106,8 +107,6 @@ out: } -extern asmlinkage int sys_select(int, fd_set __user *, fd_set __user *, fd_set __user *, struct timeval __user *); - struct sel_arg_struct { unsigned long n; fd_set __user *inp, *outp, *exp; diff -puN arch/ia64/ia32/sys_ia32.c~add-syscalls_h-3 arch/ia64/ia32/sys_ia32.c --- 25/arch/ia64/ia32/sys_ia32.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/ia64/ia32/sys_ia32.c 2004-02-06 22:35:55.000000000 -0800 @@ -2352,7 +2352,6 @@ sys32_sysctl (struct sysctl32 *args) asmlinkage long sys32_newuname (struct new_utsname *name) { - extern asmlinkage long sys_newuname(struct new_utsname * name); int ret = sys_newuname(name); if (!ret) @@ -2397,8 +2396,6 @@ sys32_getresgid16 (u16 *rgid, u16 *egid, asmlinkage long sys32_lseek (unsigned int fd, int offset, unsigned int whence) { - extern off_t sys_lseek (unsigned int fd, off_t offset, unsigned int origin); - /* Sign-extension of "offset" is important here... */ return sys_lseek(fd, offset, whence); } @@ -2647,14 +2644,12 @@ sys32_sched_rr_get_interval (pid_t pid, asmlinkage long sys32_pread (unsigned int fd, void *buf, unsigned int count, u32 pos_lo, u32 pos_hi) { - extern asmlinkage long sys_pread64 (unsigned int, char *, size_t, loff_t); return sys_pread64(fd, buf, count, ((unsigned long) pos_hi << 32) | pos_lo); } asmlinkage long sys32_pwrite (unsigned int fd, void *buf, unsigned int count, u32 pos_lo, u32 pos_hi) { - extern asmlinkage long sys_pwrite64 (unsigned int, const char *, size_t, loff_t); return sys_pwrite64(fd, buf, count, ((unsigned long) pos_hi << 32) | pos_lo); } diff -puN arch/m68k/kernel/sys_m68k.c~add-syscalls_h-3 arch/m68k/kernel/sys_m68k.c --- 25/arch/m68k/kernel/sys_m68k.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/m68k/kernel/sys_m68k.c 2004-02-06 22:35:55.000000000 -0800 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -156,8 +157,6 @@ out: } #endif -extern asmlinkage int sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *); - struct sel_arg_struct { unsigned long n; fd_set *inp, *outp, *exp; diff -puN arch/m68knommu/kernel/sys_m68k.c~add-syscalls_h-3 arch/m68knommu/kernel/sys_m68k.c --- 25/arch/m68knommu/kernel/sys_m68k.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/m68knommu/kernel/sys_m68k.c 2004-02-06 22:35:55.000000000 -0800 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -111,8 +112,6 @@ out: return error; } -extern asmlinkage int sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *); - struct sel_arg_struct { unsigned long n; fd_set *inp, *outp, *exp; diff -puN arch/mips/kernel/linux32.c~add-syscalls_h-3 arch/mips/kernel/linux32.c --- 25/arch/mips/kernel/linux32.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/mips/kernel/linux32.c 2004-02-06 22:35:55.000000000 -0800 @@ -124,8 +124,6 @@ out: } -asmlinkage long sys_truncate(const char * path, unsigned long length); - asmlinkage int sys_truncate64(const char *path, unsigned int high, unsigned int low) { @@ -374,8 +372,6 @@ xlate_dirent(void *dirent64, void *diren return; } -asmlinkage long sys_getdents(unsigned int fd, void * dirent, unsigned int count); - asmlinkage long sys32_getdents(unsigned int fd, void * dirent32, unsigned int count) { @@ -496,8 +492,6 @@ struct sysinfo32 { char _f[8]; }; -extern asmlinkage int sys_sysinfo(struct sysinfo *info); - asmlinkage int sys32_sysinfo(struct sysinfo32 *info) { struct sysinfo s; diff -puN arch/mips/kernel/sysirix.c~add-syscalls_h-3 arch/mips/kernel/sysirix.c --- 25/arch/mips/kernel/sysirix.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/mips/kernel/sysirix.c 2004-02-06 22:35:55.000000000 -0800 @@ -236,7 +236,6 @@ asmlinkage int irix_prctl(struct pt_regs #undef DEBUG_PROCGRPS extern unsigned long irix_mapelf(int fd, struct elf_phdr *user_phdrp, int cnt); -extern void sys_sync(void); extern int getrusage(struct task_struct *p, int who, struct rusage *ru); extern char *prom_getenv(char *name); extern long prom_setenv(char *name, char *value); @@ -872,8 +871,6 @@ asmlinkage unsigned long irix_sethostid( return -EINVAL; } -extern asmlinkage int sys_socket(int family, int type, int protocol); - asmlinkage int irix_socket(int family, int type, int protocol) { switch(type) { @@ -1488,9 +1485,6 @@ asmlinkage int irix_sigqueue(int pid, in return -EINVAL; } -extern asmlinkage int sys_truncate(const char * path, unsigned long length); -extern asmlinkage int sys_ftruncate(unsigned int fd, unsigned long length); - asmlinkage int irix_truncate64(char *name, int pad, int size1, int size2) { int retval; diff -puN arch/parisc/kernel/parisc_ksyms.c~add-syscalls_h-3 arch/parisc/kernel/parisc_ksyms.c --- 25/arch/parisc/kernel/parisc_ksyms.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/parisc/kernel/parisc_ksyms.c 2004-02-06 22:35:55.000000000 -0800 @@ -27,6 +27,7 @@ #include #include #include +#include #include EXPORT_SYMBOL(memchr); @@ -83,10 +84,6 @@ EXPORT_SYMBOL(__memcpy_fromio); EXPORT_SYMBOL(__memset_io); #include -extern long sys_open(const char *, int, int); -extern off_t sys_lseek(int, off_t, int); -extern int sys_read(int, char *, int); -extern int sys_write(int, const char *, int); EXPORT_SYMBOL(sys_open); EXPORT_SYMBOL(sys_lseek); EXPORT_SYMBOL(sys_read); diff -puN arch/ppc64/kernel/sys_ppc32.c~add-syscalls_h-3 arch/ppc64/kernel/sys_ppc32.c --- 25/arch/ppc64/kernel/sys_ppc32.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/sys_ppc32.c 2004-02-06 22:35:55.000000000 -0800 @@ -2507,8 +2507,6 @@ long sys32_syslog(u32 type, char * buf, } -extern asmlinkage long sys_umask(int mask); - /* Note: it is necessary to treat mask as an unsigned int, * with the corresponding cast to a signed int to insure that the * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) diff -puN arch/ppc/kernel/syscalls.c~add-syscalls_h-3 arch/ppc/kernel/syscalls.c --- 25/arch/ppc/kernel/syscalls.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/ppc/kernel/syscalls.c 2004-02-06 22:35:55.000000000 -0800 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -200,8 +201,6 @@ out: return err; } -extern int sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *); - /* * Due to some executables calling the wrong select we sometimes * get wrong args. This determines how the args are being passed diff -puN arch/s390/kernel/compat_linux.c~add-syscalls_h-3 arch/s390/kernel/compat_linux.c --- 25/arch/s390/kernel/compat_linux.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/s390/kernel/compat_linux.c 2004-02-06 22:35:55.000000000 -0800 @@ -1384,8 +1384,6 @@ int cp_compat_stat(struct kstat *stat, s return err; } -extern asmlinkage int sys_sysfs(int option, unsigned long arg1, unsigned long arg2); - asmlinkage int sys32_sysfs(int option, u32 arg1, u32 arg2) { return sys_sysfs(option, arg1, arg2); @@ -1559,8 +1557,6 @@ struct sysinfo32 { char _f[8]; }; -extern asmlinkage int sys_sysinfo(struct sysinfo *info); - asmlinkage int sys32_sysinfo(struct sysinfo32 *info) { struct sysinfo s; @@ -2172,10 +2168,6 @@ static int nfs_getfh32_res_trans(union n return copy_to_user(res32, kres, sizeof(*res32)) ? -EFAULT : 0; } -/* -asmlinkage long sys_ni_syscall(void); -*/ - int asmlinkage sys32_nfsservctl(int cmd, struct nfsctl_arg32 *arg32, union nfsctl_res32 *res32) { struct nfsctl_arg *karg = NULL; @@ -2290,8 +2282,6 @@ asmlinkage int sys32_settimeofday(struct return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL); } -asmlinkage int sys_utimes(char *, struct timeval *); - asmlinkage int sys32_utimes(char *filename, struct compat_timeval *tvs) { char *kfilename; @@ -2326,8 +2316,6 @@ asmlinkage int sys32_pause(void) return -ERESTARTNOHAND; } -extern asmlinkage int sys_prctl(int option, unsigned long arg2, unsigned long arg3, - unsigned long arg4, unsigned long arg5); asmlinkage int sys32_prctl(int option, u32 arg2, u32 arg3, u32 arg4, u32 arg5) { diff -puN arch/s390/kernel/sys_s390.c~add-syscalls_h-3 arch/s390/kernel/sys_s390.c --- 25/arch/s390/kernel/sys_s390.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/s390/kernel/sys_s390.c 2004-02-06 22:35:55.000000000 -0800 @@ -126,8 +126,6 @@ out: return error; } -extern asmlinkage int sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *); - #ifndef CONFIG_ARCH_S390X struct sel_arg_struct { unsigned long n; @@ -298,8 +296,6 @@ asmlinkage int sys_ioperm(unsigned long #else /* CONFIG_ARCH_S390X */ -extern asmlinkage int sys_newuname(struct new_utsname * name); - asmlinkage int s390x_newuname(struct new_utsname * name) { int ret = sys_newuname(name); diff -puN arch/sh/kernel/sys_sh.c~add-syscalls_h-3 arch/sh/kernel/sys_sh.c --- 25/arch/sh/kernel/sys_sh.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/sh/kernel/sys_sh.c 2004-02-06 22:35:55.000000000 -0800 @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -240,16 +241,12 @@ asmlinkage int sys_uname(struct old_utsn asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char * buf, size_t count, long dummy, loff_t pos) { - extern asmlinkage ssize_t sys_pread64(unsigned int fd, char * buf, - size_t count, loff_t pos); return sys_pread64(fd, buf, count, pos); } asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char * buf, size_t count, long dummy, loff_t pos) { - extern asmlinkage ssize_t sys_pwrite64(unsigned int fd, const char * buf, - size_t count, loff_t pos); return sys_pwrite64(fd, buf, count, pos); } diff -puN arch/sparc64/kernel/setup.c~add-syscalls_h-3 arch/sparc64/kernel/setup.c --- 25/arch/sparc64/kernel/setup.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/sparc64/kernel/setup.c 2004-02-06 22:35:55.000000000 -0800 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -71,7 +72,6 @@ struct screen_info screen_info = { void (*prom_palette)(int); void (*prom_keyboard)(void); -asmlinkage void sys_sync(void); /* it's really int */ static void prom_console_write(struct console *con, const char *s, unsigned n) diff -puN arch/sparc64/kernel/sparc64_ksyms.c~add-syscalls_h-3 arch/sparc64/kernel/sparc64_ksyms.c --- 25/arch/sparc64/kernel/sparc64_ksyms.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/sparc64/kernel/sparc64_ksyms.c 2004-02-06 22:35:55.000000000 -0800 @@ -91,8 +91,7 @@ extern int compat_sys_ioctl(unsigned int extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *); extern long sparc32_open(const char * filename, int flags, int mode); extern int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long offset, unsigned long size, pgprot_t prot, int space); -extern long sys_close(unsigned int); - + extern int __ashrdi3(int, int); extern void dump_thread(struct pt_regs *, struct user *); diff -puN arch/sparc64/kernel/sys_sparc32.c~add-syscalls_h-3 arch/sparc64/kernel/sys_sparc32.c --- 25/arch/sparc64/kernel/sys_sparc32.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/sparc64/kernel/sys_sparc32.c 2004-02-06 22:35:55.000000000 -0800 @@ -1331,8 +1331,6 @@ int cp_compat_stat(struct kstat *stat, s return err; } -extern asmlinkage int sys_sysfs(int option, unsigned long arg1, unsigned long arg2); - asmlinkage int sys32_sysfs(int option, u32 arg1, u32 arg2) { return sys_sysfs(option, arg1, arg2); @@ -1558,8 +1556,6 @@ struct sysinfo32 { char _f[20-2*sizeof(int)-sizeof(int)]; }; -extern asmlinkage int sys_sysinfo(struct sysinfo *info); - asmlinkage int sys32_sysinfo(struct sysinfo32 *info) { struct sysinfo s; @@ -2338,7 +2334,6 @@ done: return err; } #else /* !NFSD */ -extern asmlinkage long sys_ni_syscall(void); int asmlinkage sys32_nfsservctl(int cmd, void *notused, void *notused2) { return sys_ni_syscall(); diff -puN arch/sparc64/kernel/sys_sparc.c~add-syscalls_h-3 arch/sparc64/kernel/sys_sparc.c --- 25/arch/sparc64/kernel/sys_sparc.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/sparc64/kernel/sys_sparc.c 2004-02-06 22:35:55.000000000 -0800 @@ -281,8 +281,6 @@ out: return err; } -extern asmlinkage int sys_newuname(struct new_utsname __user *name); - asmlinkage int sparc64_newuname(struct new_utsname __user *name) { int ret = sys_newuname(name); diff -puN arch/sparc64/kernel/sys_sunos32.c~add-syscalls_h-3 arch/sparc64/kernel/sys_sunos32.c --- 25/arch/sparc64/kernel/sys_sunos32.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/sparc64/kernel/sys_sunos32.c 2004-02-06 22:35:55.000000000 -0800 @@ -585,11 +585,6 @@ struct sunos_nfs_mount_args { char *netname; /* server's netname */ }; -extern asmlinkage int sys_mount(char *, char *, char *, unsigned long, void *); -extern asmlinkage int sys_connect(int fd, struct sockaddr *uservaddr, int addrlen); -extern asmlinkage int sys_socket(int family, int type, int protocol); -extern asmlinkage int sys_bind(int fd, struct sockaddr *umyaddr, int addrlen); - /* Bind the socket on a local reserved port and connect it to the * remote server. This on Linux/i386 is done by the mount program, @@ -1199,9 +1194,6 @@ static inline int check_nonblock(int ret return ret; } -extern asmlinkage int sys_recv(int fd, void *ubuf, size_t size, unsigned flags); -extern asmlinkage int sys_send(int fd, void *buff, size_t len, unsigned flags); -extern asmlinkage int sys_accept(int fd, struct sockaddr *sa, int *addrlen); extern asmlinkage int sys32_readv(u32 fd, u32 vector, s32 count); extern asmlinkage int sys32_writev(u32 fd, u32 vector, s32 count); @@ -1299,9 +1291,6 @@ asmlinkage int sunos_sigaction (int sig, return ret; } -extern asmlinkage int sys_setsockopt(int fd, int level, int optname, - char *optval, int optlen); - asmlinkage int sunos_setsockopt(int fd, int level, int optname, u32 optval, int optlen) { diff -puN arch/sparc/kernel/setup.c~add-syscalls_h-3 arch/sparc/kernel/setup.c --- 25/arch/sparc/kernel/setup.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/sparc/kernel/setup.c 2004-02-06 22:35:55.000000000 -0800 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -66,7 +67,6 @@ struct screen_info screen_info = { extern unsigned long trapbase; void (*prom_palette)(int); -asmlinkage void sys_sync(void); /* it's really int */ /* Pretty sick eh? */ void prom_sync_me(void) diff -puN arch/sparc/kernel/sys_sunos.c~add-syscalls_h-3 arch/sparc/kernel/sys_sunos.c --- 25/arch/sparc/kernel/sys_sunos.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/sparc/kernel/sys_sunos.c 2004-02-06 22:35:55.000000000 -0800 @@ -565,8 +565,6 @@ asmlinkage int sunos_pathconf(char *path } /* SunOS mount system call emulation */ -extern asmlinkage int -sys_select(int n, fd_set *inp, fd_set *outp, fd_set *exp, struct timeval *tvp); asmlinkage int sunos_select(int width, fd_set *inp, fd_set *outp, fd_set *exp, struct timeval *tvp) { @@ -622,11 +620,6 @@ struct sunos_nfs_mount_args { }; -extern asmlinkage int sys_connect(int fd, struct sockaddr *uservaddr, int addrlen); -extern asmlinkage int sys_socket(int family, int type, int protocol); -extern asmlinkage int sys_bind(int fd, struct sockaddr *umyaddr, int addrlen); - - /* Bind the socket on a local reserved port and connect it to the * remote server. This on Linux/i386 is done by the mount program, * not by the kernel. @@ -1049,11 +1042,6 @@ static inline int check_nonblock(int ret return ret; } -extern asmlinkage int sys_recv(int fd, void * ubuf, int size, unsigned flags); -extern asmlinkage int sys_send(int fd, void * buff, int len, unsigned flags); -extern asmlinkage int sys_accept(int fd, struct sockaddr *sa, int *addrlen); - - asmlinkage int sunos_read(unsigned int fd,char *buf,int count) { int ret; @@ -1159,9 +1147,6 @@ sunos_sigaction(int sig, const struct ol } -extern asmlinkage int sys_setsockopt(int fd, int level, int optname, char *optval, int optlen); -extern asmlinkage int sys_getsockopt(int fd, int level, int optname, char *optval, int *optlen); - asmlinkage int sunos_setsockopt(int fd, int level, int optname, char *optval, int optlen) { diff -puN arch/x86_64/ia32/sys_ia32.c~add-syscalls_h-3 arch/x86_64/ia32/sys_ia32.c --- 25/arch/x86_64/ia32/sys_ia32.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/arch/x86_64/ia32/sys_ia32.c 2004-02-06 22:35:55.000000000 -0800 @@ -111,9 +111,6 @@ int cp_compat_stat(struct kstat *kbuf, s return 0; } -extern long sys_truncate(char *, loff_t); -extern long sys_ftruncate(int, loff_t); - asmlinkage long sys32_truncate64(char * filename, unsigned long offset_low, unsigned long offset_high) { @@ -1338,8 +1335,6 @@ long sys32_uname(struct old_utsname * na return err?-EFAULT:0; } -extern int sys_ustat(dev_t, struct ustat *); - long sys32_ustat(unsigned dev, struct ustat32 *u32p) { struct ustat u; @@ -1702,8 +1697,6 @@ long asmlinkage sys32_nfsservctl(int cmd } #endif -extern long sys_io_setup(unsigned nr_reqs, aio_context_t *ctx); - long sys32_io_setup(unsigned nr_reqs, u32 *ctx32p) { long ret; @@ -1761,11 +1754,6 @@ asmlinkage long sys32_io_submit(aio_cont return i ? i : ret; } -extern asmlinkage long sys_io_getevents(aio_context_t ctx_id, - long min_nr, - long nr, - struct io_event *events, - struct timespec *timeout); asmlinkage long sys32_io_getevents(aio_context_t ctx_id, unsigned long min_nr, diff -puN include/linux/syscalls.h~add-syscalls_h-3 include/linux/syscalls.h --- 25/include/linux/syscalls.h~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/include/linux/syscalls.h 2004-02-06 22:35:55.000000000 -0800 @@ -149,6 +149,7 @@ asmlinkage long sys_sched_rr_get_interva asmlinkage long sys_setpriority(int which, int who, int niceval); asmlinkage long sys_getpriority(int which, int who); +asmlinkage long sys_shutdown(int, int); asmlinkage long sys_reboot(int magic1, int magic2, unsigned int cmd, void __user *arg); asmlinkage long sys_restart_syscall(void); @@ -211,8 +212,6 @@ asmlinkage long sys_mount(char __user *d void __user *data); asmlinkage long sys_umount(char __user *name, int flags); asmlinkage long sys_oldumount(char __user *name); -asmlinkage long sys_pivot_root(const char __user *new_root, - const char __user *put_old); asmlinkage long sys_truncate(const char __user *path, unsigned long length); asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length); @@ -265,6 +264,8 @@ asmlinkage unsigned long sys_mremap(unsi unsigned long old_len, unsigned long new_len, unsigned long flags, unsigned long new_addr); asmlinkage long sys_munmap(unsigned long addr, size_t len); +asmlinkage long sys_pivot_root(const char __user *new_root, + const char __user *put_old); asmlinkage long sys_chroot(const char __user *filename); asmlinkage long sys_mknod(const char __user *filename, int mode, unsigned dev); @@ -403,7 +404,6 @@ asmlinkage long sys_recvmsg(int fd, stru asmlinkage long sys_socket(int, int, int); asmlinkage long sys_socketpair(int, int, int, int [2]); asmlinkage long sys_socketcall(int call, unsigned long __user *args); -asmlinkage long sys_shutdown(int, int); asmlinkage long sys_listen(int, int); asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds, long timeout); @@ -428,8 +428,6 @@ asmlinkage long sys_setrlimit(unsigned i struct rlimit __user *rlim); asmlinkage long sys_getrusage(int who, struct rusage __user *ru); asmlinkage long sys_umask(int mask); -asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, - unsigned long arg4, unsigned long arg5); asmlinkage long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn); asmlinkage long sys_pciconfig_read(unsigned long bus, unsigned long dfn, @@ -439,6 +437,8 @@ asmlinkage long sys_pciconfig_write(unsi unsigned long off, unsigned long len, void *buf); +asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, + unsigned long arg4, unsigned long arg5); asmlinkage long sys_swapon(const char __user *specialfile, int swap_flags); asmlinkage long sys_swapoff(const char __user *specialfile); asmlinkage long sys_sysctl(struct __sysctl_args __user *args); diff -puN kernel/compat.c~add-syscalls_h-3 kernel/compat.c --- 25/kernel/compat.c~add-syscalls_h-3 2004-02-06 22:35:55.000000000 -0800 +++ 25-akpm/kernel/compat.c 2004-02-06 22:35:55.000000000 -0800 @@ -227,8 +227,6 @@ asmlinkage long compat_sys_futex(u32 *ua } #endif -asmlinkage long sys_setrlimit(unsigned int resource, struct rlimit *rlim); - asmlinkage long compat_sys_setrlimit(unsigned int resource, struct compat_rlimit *rlim) { struct rlimit r; @@ -254,7 +252,6 @@ asmlinkage long compat_sys_setrlimit(uns } #ifdef COMPAT_RLIM_OLD_INFINITY -asmlinkage long sys_old_getrlimit(unsigned int resource, struct rlimit *rlim); asmlinkage long compat_sys_old_getrlimit(unsigned int resource, struct compat_rlimit *rlim) { @@ -279,9 +276,8 @@ asmlinkage long compat_sys_old_getrlimit } return ret; } -#endif -asmlinkage long sys_getrlimit (unsigned int resource, struct rlimit *rlim); +#endif asmlinkage long compat_sys_getrlimit (unsigned int resource, struct compat_rlimit *rlim) { @@ -331,8 +327,6 @@ static long put_compat_rusage (struct co return 0; } -asmlinkage long sys_getrusage(int who, struct rusage *ru); - asmlinkage long compat_sys_getrusage(int who, struct compat_rusage *ru) { struct rusage r; _