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: Gisle Vanem
Subject: Re: [Bug-wget] [PATCH] Fixing C89 warnings
Date: Thu, 20 Nov 2014 15:56:00 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:33.0) Gecko/20100101 Firefox/33.0 SeaMonkey/2.30

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.

--
--gv



reply via email to

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