On Friday 10 Sep 2004 15:04, nobu.nokada / softhome.net wrote:
>
> Andrew Walrond wrote in [ruby-talk:112137]:
> > On Friday 10 Sep 2004 03:19, nobu.nokada / softhome.net wrote:
> > > syscall assumes all arguments to system calls should be
> > > unsigned long.  This works fine on platforms int and long are
> > > same, but is int on x86_64 32bits?
> >
> > Sizeof short: 2
> > Sizeof int: 4
> > Sizeof long: 8
> > Sizeof long long: 8
> >
> > So sizeof(int) != sizeof(long). I guess you need to change unsigned long
> > to unsigned int. in the code.
>
> Isn't sizeof(void*) 8?

Yes. But ignore my mail; I was mislead by 'man syscall' which gives the 
prototype as
 int syscall(int SYSNO, ...)
but the correct definition is given by 'info syscall'
 long int syscall(long int SYSNO, ...)

So the fix is obviously not what I said before.

>
> Use ext/dl or make an extension library instead, I think
> syscall should be deprecated now.  It just came from perl.

Ok Fine.

I'll make an extension library for glibc's reboot() instead.

Thanks

Andrew Walrond