diff -ur GD-1.14/GD.xs GD-1.14-win32/GD.xs
--- GD-1.14/GD.xs	Sun Apr 27 17:17:42 1997
+++ GD-1.14-win32/GD.xs	Sun Apr 27 17:00:16 1997
@@ -250,7 +250,7 @@
 	{
 		gdImagePtr theImage;
 		FILE*	theFile;
-		theFile = fh2file(filehandle,"r");
+		theFile = fh2file(filehandle,"rb");
 		if (theFile == NULL) {
 		  RETVAL = NULL;
 		} else {
@@ -271,7 +271,7 @@
 	{
 		gdImagePtr theImage;
 		FILE*	theFile;
-		theFile = fh2file(filehandle,"r");
+		theFile = fh2file(filehandle,"rb");
 		if (theFile == NULL) {
 			RETVAL = NULL;
 		} else {
@@ -292,7 +292,7 @@
 	{
 		gdImagePtr theImage;
 		FILE*	theFile;
-		theFile = fh2file(filehandle,"r");
+		theFile = fh2file(filehandle,"rb");
 		if (theFile == NULL) {
 			RETVAL = NULL;
 		} else {
diff -ur GD-1.14/demos/brushes.pl GD-1.14-win32/demos/brushes.pl
--- GD-1.14/demos/brushes.pl	Sun Apr 27 17:17:42 1997
+++ GD-1.14-win32/demos/brushes.pl	Sun Apr 27 17:36:50 1997
@@ -37,6 +37,8 @@
 $im->setStyle($green,$green,$green,gdTransparent,$red,$red,$red,gdTransparent);
 $im->line(0,280,300,280,gdStyled);
 
+binmode STDOUT;
+
 # print the image to stdout
 print $im->gif;
 
diff -ur GD-1.14/demos/copies.pl GD-1.14-win32/demos/copies.pl
--- GD-1.14/demos/copies.pl	Sun Apr 27 17:17:42 1997
+++ GD-1.14-win32/demos/copies.pl	Sun Apr 27 17:37:38 1997
@@ -38,6 +38,8 @@
 # Same thing, but doubling the size
 $im->copyResized($im,10,200,20,20,100,100,50,50);
 
+binmode STDOUT;
+
 # print the image to stdout
 print $im->gif;
 
diff -ur GD-1.14/demos/fills.pl GD-1.14-win32/demos/fills.pl
--- GD-1.14/demos/fills.pl	Sun Apr 27 17:17:42 1997
+++ GD-1.14-win32/demos/fills.pl	Sun Apr 27 17:37:54 1997
@@ -23,6 +23,8 @@
 # black interior of the ellipse
 $im->fill(50, 21, $red);
 
+binmode STDOUT;
+
 # print the image to stdout
 print $im->gif;
 
diff -ur GD-1.14/demos/gd_example.cgi GD-1.14-win32/demos/gd_example.cgi
--- GD-1.14/demos/gd_example.cgi	Sun Apr 27 17:17:42 1997
+++ GD-1.14-win32/demos/gd_example.cgi	Sun Apr 27 17:40:20 1997
@@ -26,6 +26,8 @@
 # And fill it with red
 $im->fill(50,50,$red);
 
+binmode STDOUT;
+
 # Convert the image to GIF and print it on standard output
 print $im->gif;
 
diff -ur GD-1.14/demos/polys.pl GD-1.14-win32/demos/polys.pl
--- GD-1.14/demos/polys.pl	Sun Apr 27 17:17:42 1997
+++ GD-1.14-win32/demos/polys.pl	Sun Apr 27 17:38:12 1997
@@ -28,6 +28,8 @@
 $poly->map($poly->bounds,50,20,80,160);
 $im->filledPolygon($poly,$white);
 
+binmode STDOUT;
+
 # print the image to stdout
 print $im->gif;
 
diff -ur GD-1.14/demos/shapes.pl GD-1.14-win32/demos/shapes.pl
--- GD-1.14/demos/shapes.pl	Sun Apr 27 17:17:42 1997
+++ GD-1.14-win32/demos/shapes.pl	Sun Apr 27 17:38:34 1997
@@ -42,6 +42,8 @@
 $im->fill(100,70,$red);
 $im->fill(40,40,$yellow);
 
+binmode STDOUT;
+
 # print the image to stdout
 print $im->gif;
 
diff -ur GD-1.14/libgd/Makefile.PL GD-1.14-win32/libgd/Makefile.PL
--- GD-1.14/libgd/Makefile.PL	Sun Apr 27 17:17:42 1997
+++ GD-1.14-win32/libgd/Makefile.PL	Sun Apr 27 17:21:32 1997
@@ -13,15 +13,21 @@
 sub MY::top_targets {
 '
 all    ::    static
+	@$(NOOP)
 
 static ::    libgd$(LIB_EXT)
+	@$(NOOP)
 
 test:
 	
 
 libgd$(LIB_EXT): $(O_FILES)
-	$(AR) cr libgd$(LIB_EXT) $(O_FILES)
+'.
+($^O eq 'MSWin32' ?
+'	lib.exe -out:libgd$(LIB_EXT) $(O_FILES)
+' :
+'	$(AR) $(AR_STATIC_ARGS) libgd$(LIB_EXT) $(O_FILES)
 	$(RANLIB) libgd$(LIB_EXT)
-';
+');
 }
 
diff -ur GD-1.14/t/GD.t GD-1.14-win32/t/GD.t
--- GD-1.14/t/GD.t	Sun Apr 27 17:17:42 1997
+++ GD-1.14-win32/t/GD.t	Sun Apr 27 17:12:20 1997
@@ -23,6 +23,7 @@
     undef $/;
     open (REGRESSFILE,"./test.out.$testNo.gif") 
 	|| die "Can't open regression file './t/test.out.$testNo.gif': $!\n";
+    binmode REGRESSFILE;
     my($regressdata) = <REGRESSFILE>;
     close REGRESSFILE;
     print $imageData eq $regressdata ? "ok $testNo" : "not ok $testNo","\n";
@@ -30,6 +31,7 @@
     if ($WRITEREGRESS) {
 	open (REGRESSFILE,">./test.out.$testNo.gif") 
 	    || die "Can't open regression file './t/test.out.$testNo.gif': $!\n";
+        binmode REGRESSFILE;
 	print REGRESSFILE $imageData;
 	close REGRESSFILE;
     }
@@ -43,6 +45,7 @@
     my($green) = $im->colorAllocate(0,255,0);
     my($yellow) = $im->colorAllocate(255,250,205);
     open (TILE,"./tile.gif") || die "Can't open tile file: $!";
+    binmode TILE;
     my($tile) = newFromGif GD::Image(TILE);
     close TILE;
     $im->setBrush($tile);
--- GD-1.14/libgd/Makefile.PL~	Sun Jun 22 16:21:59 1997
+++ GD-1.14/libgd/Makefile.PL	Sun Aug 03 14:23:07 1997
End of Patch.
