diff options
author | Jacques Vidrine <nectar@FreeBSD.org> | 2004-01-09 16:52:09 +0000 |
---|---|---|
committer | Jacques Vidrine <nectar@FreeBSD.org> | 2004-01-09 16:52:09 +0000 |
commit | e4dc8baa84ba268ae07ac65481c5085dc2a79e7f (patch) | |
tree | 9ca5ad04689553c5e971e12633d53b09108d5ed4 /lib | |
parent | cfa35456ca199a2264e6a18e1f99b91f7fb4f11b (diff) | |
download | src-e4dc8baa84ba268ae07ac65481c5085dc2a79e7f.tar.gz src-e4dc8baa84ba268ae07ac65481c5085dc2a79e7f.zip |
Provide sysarch(2) prototypes in the MD sysarch.h headers. While I'm
at it, use the ANSI C generic pointer type for the second argument,
thus matching the documentation.
Remove the now extraneous (and now conflicting) function declarations
in various libc sources. Remove now unnecessary casts.
Reviewed by: bde
Notes
Notes:
svn path=/head/; revision=124296
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/alpha/gen/fpgetmask.c | 4 | ||||
-rw-r--r-- | lib/libc/alpha/gen/fpsetmask.c | 2 | ||||
-rw-r--r-- | lib/libc/amd64/sys/amd64_get_fsbase.c | 4 | ||||
-rw-r--r-- | lib/libc/amd64/sys/amd64_get_gsbase.c | 4 | ||||
-rw-r--r-- | lib/libc/amd64/sys/amd64_set_fsbase.c | 4 | ||||
-rw-r--r-- | lib/libc/amd64/sys/amd64_set_gsbase.c | 4 | ||||
-rw-r--r-- | lib/libc/i386/sys/i386_get_ioperm.c | 4 | ||||
-rw-r--r-- | lib/libc/i386/sys/i386_get_ldt.c | 4 | ||||
-rw-r--r-- | lib/libc/i386/sys/i386_set_ioperm.c | 4 | ||||
-rw-r--r-- | lib/libc/i386/sys/i386_set_ldt.c | 4 | ||||
-rw-r--r-- | lib/libc/i386/sys/i386_vm86.c | 4 | ||||
-rw-r--r-- | lib/libc/sparc64/sys/__sparc_sigtramp_setup.c | 3 | ||||
-rw-r--r-- | lib/libc/sparc64/sys/__sparc_utrap_install.c | 4 | ||||
-rw-r--r-- | lib/libc/sparc64/sys/__sparc_utrap_setup.c | 4 |
14 files changed, 14 insertions, 39 deletions
diff --git a/lib/libc/alpha/gen/fpgetmask.c b/lib/libc/alpha/gen/fpgetmask.c index 43053aaf7f62..036a150f7553 100644 --- a/lib/libc/alpha/gen/fpgetmask.c +++ b/lib/libc/alpha/gen/fpgetmask.c @@ -38,8 +38,6 @@ __FBSDID("$FreeBSD$"); #include <ieeefp.h> #include <machine/sysarch.h> -extern int sysarch(int op, char *parms); - struct params { u_int64_t mask; }; @@ -49,6 +47,6 @@ fpgetmask() { struct params p; - sysarch(ALPHA_GET_FPMASK, (char *) &p); + sysarch(ALPHA_GET_FPMASK, &p); return((fp_except_t) p.mask); } diff --git a/lib/libc/alpha/gen/fpsetmask.c b/lib/libc/alpha/gen/fpsetmask.c index 28675b5d88a3..65da3c511421 100644 --- a/lib/libc/alpha/gen/fpsetmask.c +++ b/lib/libc/alpha/gen/fpsetmask.c @@ -49,6 +49,6 @@ fpsetmask(mask) struct params p; p.mask = (u_int64_t) mask; - sysarch(ALPHA_SET_FPMASK, (char *) &p); + sysarch(ALPHA_SET_FPMASK, &p); return ((fp_except_t) p.mask); } diff --git a/lib/libc/amd64/sys/amd64_get_fsbase.c b/lib/libc/amd64/sys/amd64_get_fsbase.c index 54222b165a96..ff5eb8f305ae 100644 --- a/lib/libc/amd64/sys/amd64_get_fsbase.c +++ b/lib/libc/amd64/sys/amd64_get_fsbase.c @@ -29,11 +29,9 @@ __FBSDID("$FreeBSD$"); #include <machine/sysarch.h> -extern int sysarch(int op, char *parms); - int amd64_get_fsbase(void **addr) { - return (sysarch(AMD64_GET_FSBASE, (char *)addr)); + return (sysarch(AMD64_GET_FSBASE, addr)); } diff --git a/lib/libc/amd64/sys/amd64_get_gsbase.c b/lib/libc/amd64/sys/amd64_get_gsbase.c index abb02dfff547..ddbf977f5dd1 100644 --- a/lib/libc/amd64/sys/amd64_get_gsbase.c +++ b/lib/libc/amd64/sys/amd64_get_gsbase.c @@ -29,11 +29,9 @@ __FBSDID("$FreeBSD$"); #include <machine/sysarch.h> -extern int sysarch(int op, char *parms); - int amd64_get_gsbase(void **addr) { - return (sysarch(AMD64_GET_GSBASE, (char *)addr)); + return (sysarch(AMD64_GET_GSBASE, addr)); } diff --git a/lib/libc/amd64/sys/amd64_set_fsbase.c b/lib/libc/amd64/sys/amd64_set_fsbase.c index cbe4cac6f927..e0914859a1ae 100644 --- a/lib/libc/amd64/sys/amd64_set_fsbase.c +++ b/lib/libc/amd64/sys/amd64_set_fsbase.c @@ -29,11 +29,9 @@ __FBSDID("$FreeBSD$"); #include <machine/sysarch.h> -extern int sysarch(int op, char *parms); - int amd64_set_fsbase(void *addr) { - return (sysarch(AMD64_SET_FSBASE, (char *)&addr)); + return (sysarch(AMD64_SET_FSBASE, &addr)); } diff --git a/lib/libc/amd64/sys/amd64_set_gsbase.c b/lib/libc/amd64/sys/amd64_set_gsbase.c index 334c942259b3..f8963288ac07 100644 --- a/lib/libc/amd64/sys/amd64_set_gsbase.c +++ b/lib/libc/amd64/sys/amd64_set_gsbase.c @@ -29,11 +29,9 @@ __FBSDID("$FreeBSD$"); #include <machine/sysarch.h> -extern int sysarch(int op, char *parms); - int amd64_set_gsbase(void *addr) { - return (sysarch(AMD64_SET_GSBASE, (char *)&addr)); + return (sysarch(AMD64_SET_GSBASE, &addr)); } diff --git a/lib/libc/i386/sys/i386_get_ioperm.c b/lib/libc/i386/sys/i386_get_ioperm.c index 30c050cf6dbe..7bc27f812654 100644 --- a/lib/libc/i386/sys/i386_get_ioperm.c +++ b/lib/libc/i386/sys/i386_get_ioperm.c @@ -29,8 +29,6 @@ __FBSDID("$FreeBSD$"); #include <machine/sysarch.h> -extern int sysarch(int op, char *parms); - int i386_get_ioperm(unsigned int start, unsigned int *length, int *enable) { @@ -41,7 +39,7 @@ i386_get_ioperm(unsigned int start, unsigned int *length, int *enable) p.length = *length; p.enable = *enable; - error = sysarch(I386_GET_IOPERM, (char *)&p); + error = sysarch(I386_GET_IOPERM, &p); *length = p.length; *enable = p.enable; diff --git a/lib/libc/i386/sys/i386_get_ldt.c b/lib/libc/i386/sys/i386_get_ldt.c index 2575c3e26193..73d76670bb8b 100644 --- a/lib/libc/i386/sys/i386_get_ldt.c +++ b/lib/libc/i386/sys/i386_get_ldt.c @@ -33,8 +33,6 @@ __FBSDID("$FreeBSD$"); #include <machine/segments.h> #include <machine/sysarch.h> -extern int sysarch(int op, char *parms); - int i386_get_ldt(int start, union descriptor *descs, int num) { @@ -44,5 +42,5 @@ i386_get_ldt(int start, union descriptor *descs, int num) p.descs = descs; p.num = num; - return sysarch(I386_GET_LDT, (char *)&p); + return sysarch(I386_GET_LDT, &p); } diff --git a/lib/libc/i386/sys/i386_set_ioperm.c b/lib/libc/i386/sys/i386_set_ioperm.c index c9ad54edf676..258e2af417b0 100644 --- a/lib/libc/i386/sys/i386_set_ioperm.c +++ b/lib/libc/i386/sys/i386_set_ioperm.c @@ -29,8 +29,6 @@ __FBSDID("$FreeBSD$"); #include <machine/sysarch.h> -extern int sysarch(int op, char *parms); - int i386_set_ioperm(unsigned int start, unsigned int length, int enable) { @@ -40,5 +38,5 @@ i386_set_ioperm(unsigned int start, unsigned int length, int enable) p.length = length; p.enable = enable; - return (sysarch(I386_SET_IOPERM, (char *)&p)); + return (sysarch(I386_SET_IOPERM, &p)); } diff --git a/lib/libc/i386/sys/i386_set_ldt.c b/lib/libc/i386/sys/i386_set_ldt.c index 9693791073dd..0bb109aee970 100644 --- a/lib/libc/i386/sys/i386_set_ldt.c +++ b/lib/libc/i386/sys/i386_set_ldt.c @@ -33,8 +33,6 @@ __FBSDID("$FreeBSD$"); #include <machine/segments.h> #include <machine/sysarch.h> -extern int sysarch(int op, char *parms); - int i386_set_ldt(int start, union descriptor *descs, int num) { @@ -44,5 +42,5 @@ i386_set_ldt(int start, union descriptor *descs, int num) p.descs = descs; p.num = num; - return sysarch(I386_SET_LDT, (char *)&p); + return sysarch(I386_SET_LDT, &p); } diff --git a/lib/libc/i386/sys/i386_vm86.c b/lib/libc/i386/sys/i386_vm86.c index 16fe3b385253..c007608e6220 100644 --- a/lib/libc/i386/sys/i386_vm86.c +++ b/lib/libc/i386/sys/i386_vm86.c @@ -29,8 +29,6 @@ __FBSDID("$FreeBSD$"); #include <machine/sysarch.h> -extern int sysarch(int op, char *parms); - int i386_vm86(int fcn, void *data) { @@ -39,5 +37,5 @@ i386_vm86(int fcn, void *data) p.sub_op = fcn; p.sub_args = (char *)data; - return (sysarch(I386_VM86, (void *)&p)); + return (sysarch(I386_VM86, &p)); } diff --git a/lib/libc/sparc64/sys/__sparc_sigtramp_setup.c b/lib/libc/sparc64/sys/__sparc_sigtramp_setup.c index 294b18f2b3ff..63fcb82eb418 100644 --- a/lib/libc/sparc64/sys/__sparc_sigtramp_setup.c +++ b/lib/libc/sparc64/sys/__sparc_sigtramp_setup.c @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include <stdlib.h> extern char __sigtramp[]; -extern int sysarch(int op, char *parms); static const struct sparc_sigtramp_install_args sia = { __sigtramp, NULL }; @@ -43,5 +42,5 @@ void __sparc_sigtramp_setup(void) { - sysarch(SPARC_SIGTRAMP_INSTALL, (char *)&sia); + sysarch(SPARC_SIGTRAMP_INSTALL, &sia); } diff --git a/lib/libc/sparc64/sys/__sparc_utrap_install.c b/lib/libc/sparc64/sys/__sparc_utrap_install.c index d1881088a141..7b1a5e7a0226 100644 --- a/lib/libc/sparc64/sys/__sparc_utrap_install.c +++ b/lib/libc/sparc64/sys/__sparc_utrap_install.c @@ -30,8 +30,6 @@ __FBSDID("$FreeBSD$"); #include <machine/utrap.h> #include <machine/sysarch.h> -extern int sysarch(int op, char *parms); - int __sparc_utrap_install(utrap_entry_t type, utrap_handler_t new_precise, utrap_handler_t new_deferred, utrap_handler_t *old_precise, @@ -47,5 +45,5 @@ __sparc_utrap_install(utrap_entry_t type, utrap_handler_t new_precise, ua[0].old_deferred = old_deferred; uia.num = 1; uia.handlers = ua; - return (sysarch(SPARC_UTRAP_INSTALL, (char *)&uia)); + return (sysarch(SPARC_UTRAP_INSTALL, &uia)); } diff --git a/lib/libc/sparc64/sys/__sparc_utrap_setup.c b/lib/libc/sparc64/sys/__sparc_utrap_setup.c index 749de2b63e3b..f4a624bfe4c7 100644 --- a/lib/libc/sparc64/sys/__sparc_utrap_setup.c +++ b/lib/libc/sparc64/sys/__sparc_utrap_setup.c @@ -36,8 +36,6 @@ __FBSDID("$FreeBSD$"); #include "__sparc_utrap_private.h" -extern int sysarch(int op, char *parms); - static const struct sparc_utrap_args ua[] = { { UT_FP_DISABLED, __sparc_utrap_fp_disabled, NULL, NULL, NULL }, { UT_FP_EXCEPTION_IEEE_754, __sparc_utrap_gen, NULL, NULL, NULL }, @@ -56,5 +54,5 @@ void __sparc_utrap_setup(void) { - sysarch(SPARC_UTRAP_INSTALL, (char *)&uia); + sysarch(SPARC_UTRAP_INSTALL, &uia); } |