Re: [cc65] Dodgy long constant passing?

From: dominic beesley <dominic1brahms.demon.co.uk>
Date: 2005-05-04 13:22:25
Ullrich von Bassewitz wrote:

>Hi!
>
>On Wed, May 04, 2005 at 04:27:42AM +0100, dominic beesley wrote:
>  
>
> [snip]
>
>The generated code looks as if you're calling lseek without a prototype. The
>call sequence doesn't match the prototype, it matches
>
>        int lseek ();
>
>instead. So
>
>        fsz = lseek(fd, 0, SEEK_END);
>
>is translated to a call
>
>        int = lseek (int, int, int);
>
>instead of
>
>        long = lseek (int, long, int);
>
>If you are definitely sure that a prototype is present, please send me a
>short(!) example that translates to the above code. Otherwise, please fix your
>code.
>
>Regards
>
>
>        Uz
>
>
>  
>
Yes, you're right. Was a bit late I should have slept on it before 
emailing! I thought the
prototype for lseek was in fcntl.h. Was testing my code with the test 
progs in
testcode/lib/seek.c which should have a #include <unistd.h> at the top, 
you may want
to change your copies.

Cheers

Dom
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed May 4 12:08:05 2005

This archive was generated by hypermail 2.1.8 : 2005-05-04 12:08:07 CEST