open(O_RDWR) and lseek() fail
Bengt Larsson
lists.cygwin4@bengtl.net
Sat Mar 29 04:42:00 GMT 2014
Nellis, Kenneth wrote:
>So, then, after changing %d to %lld, gcc -Wall -pedantic complains:
>
>x.c: In function main:
>x.c:12:2: warning: ISO C90 does not support the ll gnu_printf length modifier [-Wformat=]
> printf("pos = %lld\n",lseek(f, 0l, SEEK_CUR));
> ^
>x.c:12:2: warning: ISO C90 does not support the ll gnu_printf length modifier [-Wformat=]
Or you could use the standard: include <stdint.h> and:
printf("pos = %jd\n", (intmax_t)lseek(f, 0l, SEEK_CUR));
>
>Wondering how to printf an off_t value without the compiler complaining while
>using -Wall -pedantic.
>
>--Ken Nellis
--
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
More information about the Cygwin
mailing list