From: Nick Ing-Simmons <nik@tiuk.ti.com>
Date: Thu, 14 Dec 2000 22:38:53 +0000 (+0000)
Subject: Win32 tweaks to get Encode to build
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=18b7339f76ca9f2454845b454e0d2168c487e8ee;p=p5sagit%2Fp5-mst-13.2.git

Win32 tweaks to get Encode to build
 - 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
---

diff --git a/ext/Encode/compile b/ext/Encode/compile
index 7020b9f..3a106f3 100755
--- a/ext/Encode/compile
+++ b/ext/Encode/compile
@@ -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}};
diff --git a/makedef.pl b/makedef.pl
index 3e0271a..4385f1a 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -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