X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:from:to:subject:date:reply-to:message-id
	:references:in-reply-to:mime-version:content-type
	:content-transfer-encoding; q=dns; s=default; b=G0ukwYbyX4dtlu2s
	yjiZaWUst6L4oP8Gai3KESqlx1dqULpBW3g62W0t2+UaX3KqEKW58ge4rjt6gGEr
	fvGetTGil5g/NTDTxg0pL075h1HUMEz/8houbIx+++znSaSeaB0NCjvO+4w1H5m1
	nMm7TiMr1nXxgmzGGAKR2nhBLHM=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:from:to:subject:date:reply-to:message-id
	:references:in-reply-to:mime-version:content-type
	:content-transfer-encoding; s=default; bh=OGq2f66U8SezZSxCgV6P7B
	EBg6Q=; b=w05uTGXprLSysl/CdzI7rdta4HHrWE/v6mEO+MOKPB/ENOop/gLp1q
	Gei0FiWshz3tyB+ctEA8XFtFLV3a3IPZdFl5y9Dm+DIu7Xgg7GgAlxcUE0cj0GzS
	1QFrL5NIIlaXFKWIRisr1ReMRewf8c6np7Cr/oGQ8H26/c0JpFvBU=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_JMF_BL autolearn=no version=3.3.2
X-HELO: homiemail-a54.g.dreamhost.com
From: Bengt Larsson <lists.cygwin4@bengtl.net>
To: cygwin@cygwin.com
Subject: Re: open(O_RDWR) and lseek() fail
Date: Fri, 28 Mar 2014 19:13:39 +0100
Reply-To: cygwin@cygwin.com
Message-ID: <eqebj9t2gi572mj6fnp17sal574g5ii1hd@4ax.com>
References: <20140328093110.GA23367@calimero.vinschen.de> <0D835E9B9CD07F40A48423F80D3B5A702CE06F27@USA7109MB022.na.xerox.net>
In-Reply-To: <0D835E9B9CD07F40A48423F80D3B5A702CE06F27@USA7109MB022.na.xerox.net>
User-Agent: ForteAgent/7.20.32.1218
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-IsSubscribed: yes
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id s2SIDv8U015244

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


