perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafael Garcia-Suarez <rgarciasua...@mandriva.com>
Subject Re: compiling trunk on Suse Linux 10.1
Date Tue, 06 Jun 2006 11:37:33 GMT
Torsten Foertsch wrote:
> On Tuesday 06 June 2006 11:46, Philip M. Gollucci wrote:
> > Torsten Foertsch wrote:
> > > Further on, in line 564 it complains about an illegal typecast. This
> > > Linux behaves in this regard obviously like Windows.
> > >
> > >    561  #ifdef WIN32
> > >    562      PERL_SYS_INIT3(&argc, &argv, &env);
> > >    563  #else
> > >    564      (void)PERL_SYS_INIT3(&argc, &argv, &env);
> > >    565  #endif /* WIN32 */
> >
> > Any help on what this define should actually be is appreciated as I'm
> > getting lost in the perl.h and friends #define foo.
> >
> > P5P:
> >    Any help appreciated as to what this #ifdef should be.
> 
> This is the correct error:
> 
> cc -I/home/r2/work/mp2/trunk/r412021/src/modules/perl 
> -I/home/r2/work/mp2/trunk/r412021/xs -I/opt/apache22/include 
> -I/opt/apache22/include  -I/opt/apache22/include -D_REENTRANT -D_GNU_SOURCE 
> -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -pipe 
> -Wdeclaration-after-statement 
> -I/usr/lib/perl5/5.8.8/i586-linux-thread-multi/CORE -DMOD_PERL -DMP_COMPAT_1X 
> -DLINUX=2 -D_LARGEFILE64_SOURCE -DAP_DEBUG -O2 -march=i586 -mtune=i686 
> -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -Wall -pipe -fPIC -c 
> mod_perl.c
> mod_perl.c: In function ___modperl_sys_init___:
> mod_perl.c:564: error: invalid use of void expression
> 
> The preprocessor converts line 564 into
> 
>     (void) (*Perl_Gsigfpe_saved_ptr(((void *)0))) = signal(8, 
> ((__sighandler_t) 1)); ;

Not a valid C line.

Note that PERL_SYS_INIT3 can expand to multiple statements; IMHO you
shouldn't cast it to void.

That said, this patch could help :

--- perl.h      (révision 7934)
+++ perl.h      (copie de travail)
@@ -2514,7 +2514,7 @@
 #    define PERL_FPU_INIT fpsetmask(0);
 #  else
 #    if defined(SIGFPE) && defined(SIG_IGN) && !defined(PERL_MICRO)
-#      define PERL_FPU_INIT       PL_sigfpe_saved = (Sighandler_t) signal(SIGFPE, SIG_IGN);
+#      define PERL_FPU_INIT       (PL_sigfpe_saved = (Sighandler_t) signal(SIGFPE, SIG_IGN));
 #      define PERL_FPU_PRE_EXEC   { Sigsave_t xfpe; rsignal_save(SIGFPE, PL_sigfpe_saved,
&xfpe);
 #      define PERL_FPU_POST_EXEC    rsignal_restore(SIGFPE, &xfpe); }
 #    else
End.

not sure what the optimal solution is.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message