[uClibc] Some problems with _syscall5
Matt Bosworth
m_bosworth at yahoo.com
Wed Jun 6 19:29:49 UTC 2001
Stanley --
>
> There exists some errors in compiling mount, it shows the following =
> error. I can't solve it because i don;t seem to understand what it is
> =
> trying to tell.
I ran into this problem as well. It seems to be an issue with in
uClinux/include/asm-sparcnommu/unistd.h
I cut the _syscall5 definition out of linux-2.4.2 and pasted it in
there
instead, and that seemed to solve everything. . . at least, it
compiled :)
Here's the new definition for syscall (to save you a little trouble)
#define
_syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
type5,arg5) \
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
{ \
long __res; \
register long __g1 __asm__ ("g1") = __NR_##name; \
register long __o0 __asm__ ("o0") = (long)(arg1); \
register long __o1 __asm__ ("o1") = (long)(arg2); \
register long __o2 __asm__ ("o2") = (long)(arg3); \
register long __o3 __asm__ ("o3") = (long)(arg4); \
register long __o4 __asm__ ("o4") = (long)(arg5); \
__asm__ __volatile__ ("t 0x10\n\t" \
"bcc 1f\n\t" \
"mov %%o0, %0\n\t" \
"sub %%g0, %%o0, %0\n\t" \
"1:\n\t" \
: "=r" (__res), "=&r" (__o0) \
: "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3),
"r" (__o4), "r" (__g1) \
: "cc"); \
if (__res < -255 || __res>=0) \
return (type) __res; \
errno = -__res; \
return -1; \
}
Hope that helps!
-Matt
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
More information about the uClibc
mailing list