Re: [PATCH] ssize_t: fix definition on mingw

2012-04-05 Thread Eric Blake
On 04/05/2012 04:10 AM, Bruno Haible wrote: > This patch will not help to fix Daniel Berrange's problem. In mingw > and mingw64, ssize_t is defined by , and gnulib will not > override it. > > Test program: > foo.c = > #include > size_t a; > ssize_t b; > =

Re: [PATCH] ssize_t: fix definition on mingw

2012-04-05 Thread Bruno Haible
Eric Blake wrote: > Then how do I explain the compiler > warning that Daniel was seeing under mingw64? They come from disagreements regarding the "integer conversion rank" of 'size_t' and 'ssize_t' between GCC and . When you write printf("%zd",arg) then GCC compares its own built-in knowledge abo

Re: [PATCH] ssize_t: fix definition on mingw

2012-04-05 Thread Eric Blake
On 04/05/2012 07:05 AM, Daniel P. Berrange wrote: > On Thu, Apr 05, 2012 at 06:07:20AM -0600, Eric Blake wrote: >> On 04/05/2012 04:10 AM, Bruno Haible wrote: >> You forgot to check one (64-bit mingw64): >> >> $ x86_64-w64-mingw32-gcc -E foo.c | grep size_t >> __extension__ typedef unsigned long lo

Re: [PATCH] ssize_t: fix definition on mingw

2012-04-05 Thread Daniel P. Berrange
On Thu, Apr 05, 2012 at 06:07:20AM -0600, Eric Blake wrote: > On 04/05/2012 04:10 AM, Bruno Haible wrote: > You forgot to check one (64-bit mingw64): > > $ x86_64-w64-mingw32-gcc -E foo.c | grep size_t > __extension__ typedef unsigned long long size_t; > __extension__ typedef long long ssize_t; >

Re: [PATCH] ssize_t: fix definition on mingw

2012-04-05 Thread Bruno Haible
Hi Eric, > We were blindly defining ssize_t to int. On mingw64, this is the > correct size, but the wrong rank, which leads gcc to issue warnings > for %zd printf directives. > > * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Match rank of size_t. This patch will not help to fix Daniel Berrange's problem. I

[PATCH] ssize_t: fix definition on mingw

2012-03-29 Thread Eric Blake
We were blindly defining ssize_t to int. On mingw64, this is the correct size, but the wrong rank, which leads gcc to issue warnings for %zd printf directives. * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Match rank of size_t. Signed-off-by: Eric Blake --- Bruno, is this okay to apply? ChangeLog |