summaryrefslogtreecommitdiff
path: root/lib/ExtUtils
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ExtUtils')
-rw-r--r--lib/ExtUtils/Liblist.pm5
-rw-r--r--lib/ExtUtils/MM_Unix.pm2
-rw-r--r--lib/ExtUtils/MM_Win32.pm2
-rw-r--r--lib/ExtUtils/MakeMaker.pm2
-rwxr-xr-xlib/ExtUtils/xsubpp26
5 files changed, 30 insertions, 7 deletions
diff --git a/lib/ExtUtils/Liblist.pm b/lib/ExtUtils/Liblist.pm
index 47ce3dcf87..640978a214 100644
--- a/lib/ExtUtils/Liblist.pm
+++ b/lib/ExtUtils/Liblist.pm
@@ -109,6 +109,7 @@ sub _unix_os2_ext {
} elsif (-f ($fullname="$thispth/lib$thislib.$so")
&& (($Config{'dlsrc'} ne "dl_dld.xs") || ($thislib eq "m"))){
} elsif (-f ($fullname="$thispth/lib${thislib}_s$Config_libext")
+ && (! $Config{'archname'} =~ /RM\d\d\d-svr4/)
&& ($thislib .= "_s") ){ # we must explicitly use _s version
} elsif (-f ($fullname="$thispth/lib$thislib$Config_libext")){
} elsif (-f ($fullname="$thispth/$thislib$Config_libext")){
@@ -229,6 +230,10 @@ sub _win32_ext {
# add "$Config{installarchlib}/CORE" to default search path
push @libpath, "$Config{installarchlib}/CORE";
+ if ($VC and exists $ENV{LIB} and $ENV{LIB}) {
+ push @libpath, split /;/, $ENV{LIB};
+ }
+
foreach (Text::ParseWords::quotewords('\s+', 0, $potential_libs)){
$thislib = $_;
diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm
index 4c8da339b8..da2255271f 100644
--- a/lib/ExtUtils/MM_Unix.pm
+++ b/lib/ExtUtils/MM_Unix.pm
@@ -3496,7 +3496,7 @@ MOD_INSTALL = $(PERL) -I$(INST_LIB) -I$(PERL_LIB) -MExtUtils::Install \
-e "install({@ARGV},'$(VERBINST)',0,'$(UNINST)');"
DOC_INSTALL = $(PERL) -e '$$\="\n\n";' \
--e 'print "=head2 ", scalar(localtime), ": C<", shift, ">", " L<", shift, ">";' \
+-e 'print "=head2 ", scalar(localtime), ": C<", shift, ">", " L<", $$arg=shift, "|", $$arg, ">";' \
-e 'print "=over 4";' \
-e 'while (defined($$key = shift) and defined($$val = shift)){print "=item *";print "C<$$key: $$val>";}' \
-e 'print "=back";'
diff --git a/lib/ExtUtils/MM_Win32.pm b/lib/ExtUtils/MM_Win32.pm
index e08c6791ee..7f40ff7ece 100644
--- a/lib/ExtUtils/MM_Win32.pm
+++ b/lib/ExtUtils/MM_Win32.pm
@@ -684,7 +684,7 @@ MOD_INSTALL = $(PERL) -I$(INST_LIB) -I$(PERL_LIB) -MExtUtils::Install \
-e "install({ @ARGV },'$(VERBINST)',0,'$(UNINST)');"
DOC_INSTALL = $(PERL) -e "$$\=\"\n\n\";" \
--e "print '=head2 ', scalar(localtime), ': C<', shift, '>', ' L<', shift, '>';" \
+-e "print '=head2 ', scalar(localtime), ': C<', shift, '>', ' L<', $$arg=shift, '|', $$arg, '>';" \
-e "print '=over 4';" \
-e "while (defined($$key = shift) and defined($$val = shift)) { print '=item *';print 'C<', \"$$key: $$val\", '>'; }" \
-e "print '=back';"
diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm
index 38cb2169a3..9906fd5383 100644
--- a/lib/ExtUtils/MakeMaker.pm
+++ b/lib/ExtUtils/MakeMaker.pm
@@ -189,7 +189,7 @@ sub full_setup {
AUTHOR ABSTRACT ABSTRACT_FROM BINARY_LOCATION
C CAPI CCFLAGS CONFIG CONFIGURE DEFINE DIR DISTNAME DL_FUNCS DL_VARS
EXCLUDE_EXT EXE_FILES FIRST_MAKEFILE FULLPERL FUNCLIST H
- HTMLLIBPODS HTMLSCRIPTPOD IMPORTS
+ HTMLLIBPODS HTMLSCRIPTPODS IMPORTS
INC INCLUDE_EXT INSTALLARCHLIB INSTALLBIN INSTALLDIRS INSTALLHTMLPRIVLIBDIR
INSTALLHTMLSCRIPTDIR INSTALLHTMLSITELIBDIR INSTALLMAN1DIR
INSTALLMAN3DIR INSTALLPRIVLIB INSTALLSCRIPT INSTALLSITEARCH
diff --git a/lib/ExtUtils/xsubpp b/lib/ExtUtils/xsubpp
index 96e1bb44c4..5a71e89636 100755
--- a/lib/ExtUtils/xsubpp
+++ b/lib/ExtUtils/xsubpp
@@ -70,6 +70,14 @@ affected is the use of I<target>s by the output C code (see L<perlguts>).
This may significantly slow down the generated code, but this is the way
B<xsubpp> of 5.005 and earlier operated.
+=item B<-noinout>
+
+Disable recognition of C<IN>, C<OUT_LIST> and C<INOUT_LIST> declarations.
+
+=item B<-noargtypes>
+
+Disable recognition of ANSI-like descriptions of function signature.
+
=back
=head1 ENVIRONMENT
@@ -114,7 +122,7 @@ if ($^O eq 'VMS') {
$FH = 'File0000' ;
-$usage = "Usage: xsubpp [-v] [-C++] [-except] [-prototypes] [-noversioncheck] [-nolinenumbers] [-nooptimize] [-s pattern] [-typemap typemap]... file.xs\n";
+$usage = "Usage: xsubpp [-v] [-C++] [-except] [-prototypes] [-noversioncheck] [-nolinenumbers] [-nooptimize] [-noinout] [-noargtypes] [-s pattern] [-typemap typemap]... file.xs\n";
$proto_re = "[" . quotemeta('\$%&*@;') . "]" ;
# mjn
@@ -126,6 +134,10 @@ $WantVersionChk = 1 ;
$ProtoUsed = 0 ;
$WantLineNumbers = 1 ;
$WantOptimize = 1 ;
+
+my $process_inout = 1;
+my $process_argtypes = 1;
+
SWITCH: while (@ARGV and $ARGV[0] =~ /^-./) {
$flag = shift @ARGV;
$flag =~ s/^-// ;
@@ -143,6 +155,10 @@ SWITCH: while (@ARGV and $ARGV[0] =~ /^-./) {
$WantLineNumbers = 1, next SWITCH if $flag eq 'linenumbers';
$WantOptimize = 0, next SWITCH if $flag eq 'nooptimize';
$WantOptimize = 1, next SWITCH if $flag eq 'optimize';
+ $process_inout = 0, next SWITCH if $flag eq 'noinout';
+ $process_inout = 1, next SWITCH if $flag eq 'inout';
+ $process_argtypes = 0, next SWITCH if $flag eq 'noargtypes';
+ $process_argtypes = 1, next SWITCH if $flag eq 'argtypes';
(print "xsubpp version $XSUBPP_version\n"), exit
if $flag eq 'v';
die $usage;
@@ -385,9 +401,6 @@ sub CASE_handler {
$_ = '' ;
}
-my $process_inout = 1;
-my $process_argtypes = 1;
-
sub INPUT_handler {
for (; !/^$BLOCK_re/o; $_ = shift(@line)) {
last if /^\s*NOT_IMPLEMENTED_YET/;
@@ -997,6 +1010,11 @@ while (fetch_para()) {
($ret_type) = TidyType($_);
$RETVAL_no_return = 1 if $ret_type =~ s/^NO_OUTPUT\s+//;
+ # Allow one-line ANSI-like declaration
+ unshift @line, $2
+ if $process_argtypes
+ and $ret_type =~ s/^(.*?\w.*?)\s*\b(\w+\s*\(.*)/$1/s;
+
# a function definition needs at least 2 lines
blurt ("Error: Function definition too short '$ret_type'"), next PARAGRAPH
unless @line ;