X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=minimod.pl;h=fea77c0ef7f4b6fd1c0ee94f42e843dbcde0d680;hb=b4bd6dcd4597bfa7eb0b9542213d88964c71ae3b;hp=b9b70715b20ed8cdb61442baea5a2b7240c44518;hpb=9bb683e6b9e9c477f8ad211dd2f5b8c19d1b7bc2;p=p5sagit%2Fp5-mst-13.2.git diff --git a/minimod.pl b/minimod.pl old mode 100755 new mode 100644 index b9b7071..fea77c0 --- a/minimod.pl +++ b/minimod.pl @@ -1,4 +1,5 @@ -# minimod.PL writes the contents of miniperlmain.c into the module +#./miniperl -w +# minimod.pl writes the contents of miniperlmain.c into the module # ExtUtils::Miniperl for later perusal (when the perl source is # deleted) # @@ -10,6 +11,10 @@ # # Version 1.0, Feb 2nd 1995 by Andreas Koenig +BEGIN { unshift @INC, "lib" } + +use strict; + print <<'END'; # This File keeps the contents of miniperlmain.c. # @@ -40,7 +45,7 @@ $tail=<<'EOF!TAIL'; END while () { - print; + print unless /dXSUB_SYS/; } close MINI; @@ -59,13 +64,15 @@ sub writemain{ my($mname, $cname); ($mname = $pname) =~ s!/!::!g; ($cname = $pname) =~ s!/!__!g; - print "EXTERN_C void boot_${cname} _((CV* cv));\n"; + print "EXTERN_C void boot_${cname} (pTHX_ CV* cv);\n"; } my ($tail1,$tail2) = ( $tail =~ /\A(.*\n)(\s*\}.*)\Z/s ); print $tail1; - print " char *file = __FILE__;\n"; + print "\tconst char file[] = __FILE__;\n"; + print "\tdXSUB_SYS;\n" if $] > 5.002; + foreach $_ (@exts){ my($pname) = canon('/', $_); my($mname, $cname, $ccode);