Win32 tweaks to get Encode to build
Nick Ing-Simmons [Thu, 14 Dec 2000 22:38:53 +0000 (22:38 +0000)]
 - temp hack to makedef.pl till PerlIO is properly "exported".
 - MSVC dislikes
   static encpage_t foo[];
   so make 'em extern for now.

p4raw-id: //depot/perlio@8117

ext/Encode/compile
makedef.pl

index 7020b9f..3a106f3 100755 (executable)
@@ -38,6 +38,8 @@ sub encode_M
  return &encode_S;
 }
 
+@ARGV = map(glob($_),@ARGV) if $^O eq 'MSWin32';
+
 my $cname = shift(@ARGV);
 chmod(0666,$cname) if -f $cname && !-w $cname;
 open(C,">$cname") || die "Cannot open $cname:$!";
@@ -230,15 +232,14 @@ sub outstring
  return $sym;
 }
 
-
-
 sub output
 {
  my ($fh,$name,$a) = @_;
  $name =~ s/\W+/_/g;
  $a->{Cname} = $name;
  my @keys = grep(ref($a->{$_}),sort keys %$a);
- print $fh "\nstatic encpage_t $name\[\];\n";
+ print $fh "\nextern encpage_t $name\[\];\n";
+ # print $fh "\nstatic encpage_t *$name;\n";
  # Sub-tables
  my %str;
  my $l;
@@ -284,7 +285,7 @@ sub output
   }
 
  print $fh "\n";
- print $fh "static encpage_t $name\[",scalar(@ent),"] = {\n";
+ print $fh "encpage_t $name\[",scalar(@ent),"] = {\n";
  foreach my $b (@ent)
   {
    my ($s,$e,$out,$t,$end,$l) = @{$a->{$b}};
index 3e0271a..4385f1a 100644 (file)
@@ -797,3 +797,29 @@ perl_destruct
 perl_free
 perl_parse
 perl_run
+PerlIO_define_layer
+PerlIOBuf_set_ptrcnt
+PerlIOBuf_get_cnt
+PerlIOBuf_get_ptr
+PerlIOBuf_bufsiz
+PerlIOBuf_setlinebuf
+PerlIOBase_clearerr
+PerlIOBase_error
+PerlIOBase_eof
+PerlIOBuf_tell
+PerlIOBuf_seek
+PerlIOBuf_write
+PerlIOBuf_unread
+PerlIOBuf_read
+PerlIOBuf_reopen
+PerlIOBuf_open
+PerlIOBuf_fdopen
+PerlIOBase_fileno
+PerlIOBuf_pushed
+PerlIOBuf_fill
+PerlIOBuf_flush
+PerlIOBase_close
+PerlIO_define_layer
+PerlIO_pending
+PerlIO_unread
+PerlIO_push
\ No newline at end of file