develooper Front page | perl.perl5.porters | Postings from June 2001

10930 on win32

From:
Prymmer/Kahn
Date:
June 26, 2001 09:21
Subject:
10930 on win32
Message ID:
Pine.BSF.4.21.0106260857510.26957-100000@shell8.ba.best.com

With MS VC 5 I see "macro redefinition" warnings for PERLIO_NOT_STDIO
when compiling ext/IO/IO.c owing to the C<#define PERLIO_NOT_STDIO 0>
in win32/win32.h.  Unfortunately adding a C<#ifndef PERLIO_NOT_STDIO>
guard around the #define in win32.h means that when compiling IO
I'll see "redefinition" warnings for various I/O routines like
freopen() et al. such as these:

..\..\lib\CORE\XSUB.h(329) : warning C4005: 'fopen' : macro redefinition
..\..\lib\CORE\XSUB.h(330) : warning C4005: 'fclose' : macro redefinition
..\..\lib\CORE\XSUB.h(335) : warning C4005: 'fputc' : macro redefinition
..\..\lib\CORE\XSUB.h(336) : warning C4005: 'fputs' : macro redefinition
..\..\lib\CORE\XSUB.h(337) : warning C4005: 'fflush' : macro redefinition
..\..\lib\CORE\XSUB.h(340) : warning C4005: 'fdopen' : macro redefinition
..\..\lib\CORE\XSUB.h(341) : warning C4005: 'freopen' : macro redefinition
..\..\lib\CORE\XSUB.h(342) : warning C4005: 'fread' : macro redefinition
..\..\lib\CORE\XSUB.h(343) : warning C4005: 'fwrite' : macro redefinition
..\..\lib\CORE\XSUB.h(344) : warning C4005: 'setbuf' : macro redefinition
..\..\lib\CORE\XSUB.h(345) : warning C4005: 'setvbuf' : macro redefinition
..\..\lib\CORE\XSUB.h(348) : warning C4005: 'vfprintf' : macro
redefinition
..\..\lib\CORE\XSUB.h(349) : warning C4005: 'ftell' : macro redefinition
..\..\lib\CORE\XSUB.h(350) : warning C4005: 'fseek' : macro redefinition
..\..\lib\CORE\XSUB.h(352) : warning C4005: 'fsetpos' : macro redefinition
..\..\lib\CORE\XSUB.h(354) : warning C4005: 'tmpfile' : macro redefinition
..\..\lib\CORE\XSUB.h(396) : warning C4005: 'popen' : macro redefinition
..\..\lib\CORE\XSUB.h(397) : warning C4005: 'pclose' : macro redefinition

There errors seen during the compile of ext/Thread/Thread.c are still
present:

        cl -c  -nologo -Gf -W3 -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE
-DNO_STRICT -DPERL_IMPLICIT_CONTEXT -DPERL_
IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -O1 -MD -DNDEBUG
-DVERSION=\"1.0\"  -DXS_VERSION=\"1.0\"  -
I..\..\lib\CORE  Thread.c
Thread.c
Thread.xs(352) : error C2065: 'my_perl' : undeclared identifier
Thread.xs(352) : warning C4047: 'function' : 'struct interpreter *'
differs in levels of indirection from 'int
 '
Thread.xs(352) : warning C4024: 'Perl_ILIO_ptr' : different types for
formal and actual parameter 1
Thread.xs(352) : warning C4047: 'function' : 'struct interpreter *'
differs in levels of indirection from 'int
 '
Thread.xs(352) : warning C4024: 'Perl_ILIO_ptr' : different types for
formal and actual parameter 1
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

For which a possible workaround that seems to at least allow Thread.xs 
-> Thread.c to compile appears to be:

*** perl/ext/Thread/Thread.xs.orig Tue Jun 26 08:56:20 2001
--- perl/ext/Thread/Thread.xs Tue Jun 26 08:59:14 2001
***************
*** 347,355 ****
--- 347,357 ----
       * so don't be surprised if this isn't robust while debugging
       * with -DL.
       */
+ #ifndef WIN32
      DEBUG_S(PerlIO_printf(Perl_debug_log,
  	    "handle_thread_signal: got signal %d\n", sig););
      write(sig_pipe[1], &c, 1);
+ #endif /* not on win32 */
  }
  
  MODULE = Thread		PACKAGE = Thread
End of Hack (possibly a patch?)

BTW In playing with a prototype for perlivp I note that after running 

   nmake install

(into d:\perl) with the 10907 kit that the following two files are
missing, but should have been present according to .packlist entries:

d:\perl\bin/libnetcfg.bat d:\perl\bin/xsubpp.bat

I note that I do have the xsubpp installed in d:\perl\lib\ExtUtils\xsubpp
but I do not have an xsubpp.bat nor any trace of libnetcfg* in my
test installation tree in d:\perl.


Here was an odd message seen during `nmake test`:

io/fflush.............................ok, 1/4 skipped:  no fork
io/fs.................................ok 20/29The system cannot find the path specified.
io/fs.................................ok, 12/29 skipped: various reasons
io/inplace............................ok

I am not sure why io/fs.t appears to run twice, nor why the test needs to
find a certain path.

The final tally was:

Failed Test               Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
..\ext\POSIX\POSIX.t         2   512    29    3  10.34%  13 28-29
..\lib\Test\More\t\fail.t                2    1  50.00%  2
op/flip.t                               10    1  10.00%  10
 (3 subtests UNEXPECTEDLY SUCCEEDED), 37 tests and 185 subtests skipped.
Failed 3/421 test scripts, 99.29% okay. 5/22314 subtests failed, 99.98%
okay.
NMAKE : fatal error U1077: '..\perl.exe' : return code '0x9'
Stop.


Peter Prymmer






nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About