bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [PATCH] Fixing C89 warnings


From: Tim Rühsen
Subject: Re: [Bug-wget] [PATCH] Fixing C89 warnings
Date: Thu, 20 Nov 2014 21:53:17 +0100
User-agent: KMail/4.14.2 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; )

Am Donnerstag, 20. November 2014, 15:56:00 schrieb Gisle Vanem:
> Tim Ruehsen wrote:
> >> [1]:
> >>     #else
> >>     # define count_cols(mbs) ((int)(strlen(mbs)))
> >>     # define cols_to_bytes(mbs, cols, *ncols) do {  \
> >>     
> >>         *ncols = cols;                              \
> >>         bytes = cols;                               \
> >>     
> >>     }while (0)
> >>     #endif
> >> 
> >> (I forgot to add 'HAVE_WCWIDTH' and 'HAVE_MBTOWC').
> > 
> > ? could you send a patch ? I am not sure what to fix here.
> 
> FYI. the error from MSVC was:
>    progress.c(844) : error C2010: '*' : unexpected in macro formal parameter
> list progress.c(978) : error C2059: syntax error : 'do'
> 
> Here is a patch:
> 
> --- ../Git-latest/src/progress.c        2014-11-20 15:39:55 +0000
> +++ progress.c  2014-11-20 16:44:03 +0000
> @@ -841,10 +841,7 @@
>   }
>   #else
>   # define count_cols(mbs) ((int)(strlen(mbs)))
> -# define cols_to_bytes(mbs, cols, *ncols) do {  \
> -    *ncols = cols;                              \
> -    bytes = cols;                               \
> -}while (0)
> +# define cols_to_bytes(mbs, cols, ncols) *ncols = cols
>   #endif
> 
> > Does this hold true for Win32 (WinXP 32bit) ?
> > Or do we have to amend this check ?
> 
> Windows since way back has supported >4 GB files. It's
> been compilers that were slow following that. Since
> MingW/MSVC have libc support for huge-files, that
> 'wgint' is hardcoded to 64 bits signed. I vaguely remember
> me an Hrvoje discussed this long before you switched to
> Gnulib.

Instead of a #define to replace a function, I decided to write two small 
'dummy' functions here. It's pushed now.

I also pushed your patch/suggestion to always assume large-file for (defined 
WINDOWS) in src/build_info.c.in.

Tim

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]