From: nobu.nokada@... Date: 2004-09-10T23:04:20+09:00 Subject: Re: [BUG] Kernel#syscall on x86_64 linux Hi, At Fri, 10 Sep 2004 17:32:28 +0900, 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? Use ext/dl or make an extension library instead, I think syscall should be deprecated now. It just came from perl. -- Nobu Nakada