On Fri, 19 May 2000, Paul Koning wrote:

> >>>>> "Russell" == Russell King <- ARM Linux Admin <[EMAIL PROTECTED]>> writes:
> 
>  Russell> Hanske;Stefan writes:
>  >> Here is what I get for a small llseek() test program using libc
>  >> with _FILE_OFFSET_BITS=64: file = fopen("/dev/zero","r"); offset =
>  >> llseek(file, 0x1000, SEEK_SET); printf("The offset is: %lld.\n",
>  >> offset);
>  >> 
>  >> This is using gcc version 2.95.3 19991030 (prerelease)
> 
>  Russell> Try compiling it with -Wall.  You will get warnings.  For
>  Russell> starters, llseek doesn't take a FILE * argument as the first
>  Russell> parameter.  Secondly, it returns an "int".
> 
> I guess it's a naming error then -- because surely naming something
> "llseek" when it doesn't return a "long long int" is a misleading
> thing to do...
> 
>       paul
Might be right. But in glibc, llseek() is a week reference to lseek64(),
the compiler didn't complain about implicit declaration of function
llseek() when stdio.h was included, so I thought it would have a
prototype. Btw, when disassembling lseek64() in glibc, I found that
something similar is made to the return value there. Don't know what to do
about that. On i386-platforms it is supposed to work with glibc-2.* .

If the above solutions are ment to be portable, I'll see if I can convince
some responsible person to change the  source code.

Thank you very much.


unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]
++        Please use [EMAIL PROTECTED] for           ++
++                        kernel-related discussions.                      ++

Reply via email to