Steffen Goeldner <[EMAIL PROTECTED]> writes:
> I'm trying to compile HTML-Parser-3.14 with Borland's bcc32 compiler:
>
> bcc32 -c -O2 -D_RTLDLL -DWIN32 -DPERL_IMPLICIT_CONTEXT
> -DPERL_IMPLICIT_SYS -O2
> -D_RTLDLL -DVERSION=\"3.14\" -DXS_VERSION=\"3.14\"
> -ID:\opt\perl\lib
> \CORE -DMARKED_SECTION Parser.c
> Borland C++ 5.2 for Win32 Copyright (c) 1993, 1997 Borland International
> Parser.c:
> Error hparser.c 125: Undefined symbol 'level' in function report_event
> Error hparser.c 125: Undefined symbol 'curp' in function report_event
> Warning hparser.c 125: Suspicious pointer conversion in function
> report_event
> Error hparser.c 125: Undefined symbol 'level' in function report_event
> Error hparser.c 125: Undefined symbol 'curp' in function report_event
> Warning hparser.c 125: Suspicious pointer conversion in function
> report_event
> Error hparser.c 128: Undefined symbol 'level' in function report_event
> Error hparser.c 128: Undefined symbol 'curp' in function report_event
> Warning hparser.c 128: Suspicious pointer conversion in function
> report_event
> *** 6 errors in Compile ***
> dmake.exe: Error code 1, while making 'Parser.obj'
If you look at the code you will see that it is inside a
if (0) {
...
}
block. It is just old debugging code that happens to use some stdio
functions, and I guess in some perl configurations this does not work
unless we use PerlIO replacements.
A workaround for you is just to edit out that code block and
recompile.
I'll #if 0 it out properly for the next release.
Regards,
Gisle
> I found the same problem in the egroups archive:
>
> <http://www.egroups.com/message/libwww-perl/6538>
>
> I preprocessed the file:
>
> cpp32 -D_RTLDLL -DWIN32 -DPERL_IMPLICIT_CONTEXT -DPERL_I
> MPLICIT_SYS -DVERSION=\"3.14\" -DXS_VERSION=\"3.14\"
> -ID:\opt\perl\lib\CORE -D
> MARKED_SECTION Parser.c
> Borland C++ Preprocessor 5.2 for Win32
> Copyright (c) 1993, 1997 Borland International
> Parser.c:
>
> ...
> /* hparser.c 124: */if (*s == '\n') {
> /* hparser.c 125: */((++(((*(*Perl_IStdIO_ptr(((PerlInterpreter
> *)Perl_get_context())))->pStdout)((*Perl_IStdIO_ptr(((PerlInterpreter
> *)Perl_get_context())))))->level) < 0) ? (unsigned
> char)(*((*(*Perl_IStdIO_ptr(((PerlInterpreter
> *)Perl_get_context())))->pStdout)((*Perl_IStdIO_ptr(((PerlInterpreter
> *)Perl_get_context())))))->curp++=(('\\'))) : _fputc
> ((('\\')),(*(*Perl_IStdIO_ptr(((PerlInterpreter
> *)Perl_get_context())))->pStdout)((*Perl_IStdIO_ptr(((PerlInterpreter
> *)Perl_get_context())))))); ((++(((*(*Perl_IStdIO_ptr(((PerlInterpreter
> *)Perl_get_context())))->pStdout)((*Perl_IStdIO_ptr(((PerlInterpreter
> *)Perl_get_context())))))->level) < 0) ? (unsigned
> char)(*((*(*Perl_IStdIO_ptr(((PerlInterpreter
> *)Perl_get_context())))->pStdout)((*Perl_IStdIO_ptr(((PerlInterpreter
> *)Perl_get_context())))))->curp++=(('n'))) : _fputc
> ((('n')),(*(*Perl_IStdIO_ptr(((PerlInterpreter
> *)Perl_get_context())))->pStdout)((*Perl_IStdIO_ptr(((PerlInterpreter
> *)Perl_get_context()))))));
> /* hparser.c 126: */}
> /* hparser.c 127: */else
> /* hparser.c 128: */((++(((*(*Perl_IStdIO_ptr(((PerlInterpreter
> *)Perl_get_context())))->pStdout)((*Perl_IStdIO_ptr(((PerlInterpreter
> *)Perl_get_context())))))->level) < 0) ? (unsigned
> char)(*((*(*Perl_IStdIO_ptr(((PerlInterpreter
> *)Perl_get_context())))->pStdout)((*Perl_IStdIO_ptr(((PerlInterpreter
> *)Perl_get_context())))))->curp++=((*s))) : _fputc
> (((*s)),(*(*Perl_IStdIO_ptr(((PerlInterpreter
> *)Perl_get_context())))->pStdout)((*Perl_IStdIO_ptr(((PerlInterpreter
> *)Perl_get_context()))))));
> /* hparser.c 129: */s++;
> /* hparser.c 130: */}
> ...
>
> I spent some hours in the macro definitions, but lost the trail.
> Any ideas?
>
> Steffen Goeldner