On Thu, 10 Apr 2008, Jan Dubois wrote:

> On Thu, 10 Apr 2008, Andy Dougherty wrote:
> > On Thu, 10 Apr 2008, Gabor Szabo wrote:
> > 
> > > C:/strawberry/perl/lib/CORE/config.h:39:20: warning: "/*" within comment
> > >
> > > I don't claim to understand this but based on what Dmitry found it is
> > > complaining about
> > > C:/strawberry/perl/lib/CORE/config.h having C structures like
> > >
> > >    /* #define A B /* comment */
> > 
> > In the unix config.h generated by Configure, we replace that with
> > 
> >      /* #define A B / * comment */
> > 
> > note the space here  ^
> > 
> > to avoid just this problem.  I don't know how Strawberry perl generates
> > its config.h, but that's the place to look.
> 
> They are pregenerated in the perl source distribution in win32/config_H.gc.
> The problem is most likely in win32/config_h.PL.  Especially this line
> looks suspicious:
> 
>   s#/[ *\*]*\*/#/**/#;

Here is the equivalent command in Configure:  (I've left in the
metaconfig comments, but they are stripped out in the version of
Configure as shipped)

?X:
?X: Since we unconditionally translate leading #undef into /*#define, we're
?X: stuck when we really want to have a #undef in config.h. That's why there
?X: is provision here for #un-def, which is translated back into #undef after
?X: all original #undef have been processed.
?X:
?X:     Previously, we changed all 
?X:             #undef FOO /**/ 
?X:     into
?X:             /*#define FOO /**/ 
?X:     The xlc compiler (available on IBM's AIX) complains that this is
?X:     an illegal attempt to write a nested comment, and warns against it.
?X:     There's apparently no way to shut the compiler up, either.
?X:     This sed command from Hallvard B Furuseth 
?X:     changes it to
?X:             /*#define FOO / **/ 
sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 
's!^#un-def!#undef!'

-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to