This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: lseek() returning Invalid Argument
- From: Eric Blake <ebb9 at byu dot net>
- To: cygwin at cygwin dot com
- Date: Tue, 15 Sep 2009 23:07:44 +0000 (UTC)
- Subject: Re: lseek() returning Invalid Argument
- References: <h8p54p$j1l$1@ger.gmane.org>
gballey <galley <at> ace-co.com> writes:
> Anyone got an idea of what is going on here?
Yep.
Oh, you wanted to know what your bug is?
>
> Thanks.
>
> /* begin test.c */
>
> #include <fcntl.h>
> #include <stdio.h>
Oops - no #include <unistd.h>. lseek takes 64-bit type arguments, but without
a declaration from the correct header, the compiler assumes it takes int
arguments. Try compiling with -Wall.
--
Eric Blake
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple