perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: modperl-2.0/lib/ModPerl WrapXS.pm
Date Mon, 22 Oct 2001 01:33:47 GMT
dougm       01/10/21 18:33:47

  Modified:    lib/Apache Build.pm
               lib/ModPerl WrapXS.pm
  Log:
  win32 only allow 1 -def arg; so put all symbols into modperl.def
  
  Revision  Changes    Path
  1.66      +4 -6      modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- Build.pm	2001/10/22 00:10:13	1.65
  +++ Build.pm	2001/10/22 01:33:47	1.66
  @@ -750,8 +750,7 @@
   
   sub export_files_MSWin32 {
       my $self = shift;
  -    map "-def:$self->{cwd}/xs/modperl$_.def",
  -        ("", "_inline", "_ithreads");
  +    "-def:$self->{cwd}/xs/modperl.def";
   }
   
   sub dynamic_link_header_default {
  @@ -774,9 +773,9 @@
   
   sub dynamic_link_MSWin32 {
       my $self = shift;
  -    my @defs = $self->export_files_MSWin32;
  +    my $defs = $self->export_files_MSWin32;
       return $self->dynamic_link_header_default .
  -           "@defs" . <<'EOF';
  +           $defs . <<'EOF';
   	-out:$@
   EOF
   }
  @@ -923,8 +922,7 @@
   #XXX: install *.def / search @INC
   sub otherldflags_MSWin32 {
       my $self = shift;
  -    my(@defs) = $self->export_files_MSWin32;
  -    return "@defs";
  +    $self->export_files_MSWin32;
   }
   
   sub otherldflags_aix {
  
  
  
  1.30      +26 -10    modperl-2.0/lib/ModPerl/WrapXS.pm
  
  Index: WrapXS.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/WrapXS.pm,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- WrapXS.pm	2001/10/21 06:12:08	1.29
  +++ WrapXS.pm	2001/10/22 01:33:47	1.30
  @@ -582,27 +582,43 @@
       }
   }
   
  -#two export files are generated:
  -#$name.$ext - global symbols
  -#${name}_inline.$ext - __inline__ functions
  -#the inline export file is needed #ifdef MP_DEBUG
  +#three .sym files are generated:
  +#global   - global symbols
  +#ithreads - #ifdef USE_ITHREADS functions
  +#inline   - __inline__ functions
  +#the inline symbols are needed #ifdef MP_DEBUG
   #since __inline__ will be turned off
   
  +my %multi_export = map { $_, 1 } qw(exp);
  +
   sub open_export_files {
       my($self, $name, $ext) = @_;
   
       my $dir = $self->{XS_DIR};
       my %handles;
  +    my @types = qw(global inline ithreads);
  +
  +    if ($multi_export{$ext}) {
  +        #write to multiple files
  +        for my $type (@types) {
  +            my $file = "$dir/${name}_$type.$ext";
   
  -    for my $type ("", "_inline", "_ithreads") {
  -        my $file = "$dir/$name$type.$ext";
  +            open my $fh, '>', $file or
  +              die "open $file: $!";
  +
  +            $handles{$type} = $fh;
  +        }
  +    }
  +    else {
  +        #write to one file
  +        my $file = "$dir/$name.$ext";
   
           open my $fh, '>', $file or
             die "open $file: $!";
   
  -        (my $fh_name = $type) =~ s/^_//;
  -        $fh_name ||= 'default';
  -        $handles{$fh_name} = $fh;
  +        for my $type (@types) {
  +            $handles{$type} = $fh;
  +        }
       }
   
       \%handles;
  @@ -659,7 +675,7 @@
           return $handles->{ithreads};
       }
   
  -    $handles->{default};
  +    $handles->{global};
   }
   
   sub write_export_file {
  
  
  

Mime
View raw message