On 27 Sep 2001 at 14:45, Kareila wrote:

> Since wget is no longer included in the standard Mac OS X 
distribution, I 
> tried to compile my own from the 1.7 sources and got stuck right about 
here:
> 
> cc -I. -I.    -DHAVE_CONFIG_H -
DSYSTEM_WGETRC=\"/usr/local/etc/wgetrc\" -
DLOCALEDIR=\"/usr/local/share/locale\" -g -O2 -c html-parse.c
> html-parse.c: In function `advance_declaration':
> html-parse.c:449: character constant too long
> html-parse.c:449: parse error before character constant
> html-parse.c:449: stray '\' in program
[snip]

This is a well-known bug in Apple's special C pre-processor - at least 
it's well known on the wget lists! 

There are two solutions to the problem, neither of which I am able to 
try myself - they were originated by Eugene Lee and Edward J. Sabol (as 
far as I know), and echoed several times since by others including 
myself. I did get a report from someone who said neither option worked 
for him!

Solution 1) Change line 435 of html-parse.c to:

    assert (ch == '\'' || ch == '\"');

    (i.e. add a \ before the ")

Solution 2) Use the following command to configure the Makefile:

    CPPFLAGS="-no-cpp-precomp" ./configure

    (then do a "make clean" and a "make").

If solution 2 doesn't work, you might try ...

Solution 2a) (Deprecated) Use the following command to configure the 
Makefile:

    CPPFLAGS="-traditional-cpp" ./configure

    (then do a "make clean" and a "make").

N.B. solution 2a is deprecated because it won't work with the future GCC 
3.1 compiler.

Reply via email to