Subject: | [PATCH] Fix Windows build with Visual C++ 6.0 |
Hi Dan,
You recently sent me (something like) the attached patch to fix the build of bleadperl on Windows using Visual C++ 6.0.
This is now being incorporated into bleadperl for Perl 5.20.0, so please consider including this in your next release of Encode.
Thanks again for the help.
Regards,
Steve
Subject: | U8.patch |
diff -ruN Encode-2.57.orig/Encode/encode.h Encode-2.57/Encode/encode.h
--- Encode-2.57.orig/Encode/encode.h 2011-11-11 15:44:00.000000000 +0000
+++ Encode-2.57/Encode/encode.h 2014-04-28 18:03:19.315595200 +0100
@@ -1,7 +1,7 @@
#ifndef ENCODE_H
#define ENCODE_H
-#ifndef U8
+#if !defined(U8) && !defined(U8TYPE)
/*
A tad devious this:
perl normally has a #define for U8 - if that isn't present then we
diff -ruN Encode-2.57.orig/Encode.pm Encode-2.57/Encode.pm
--- Encode-2.57.orig/Encode.pm 2014-01-03 04:52:36.000000000 +0000
+++ Encode-2.57/Encode.pm 2014-04-28 18:03:31.793595200 +0100
@@ -4,7 +4,7 @@
package Encode;
use strict;
use warnings;
-our $VERSION = sprintf "%d.%02d", q$Revision: 2.57 $ =~ /(\d+)/g;
+our $VERSION = sprintf "%d.%02d", q$Revision: 2.57_01 $ =~ /(\d+)/g;
use constant DEBUG => !!$ENV{PERL_ENCODE_DEBUG};
use XSLoader ();
XSLoader::load( __PACKAGE__, $VERSION );
diff -ruN Encode-2.57.orig/Encode.xs Encode-2.57/Encode.xs
--- Encode-2.57.orig/Encode.xs 2014-01-03 04:52:36.000000000 +0000
+++ Encode-2.57/Encode.xs 2014-04-28 18:03:38.560595200 +0100
@@ -6,7 +6,6 @@
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
-#define U8 U8
#include "encode.h"
# define PERLIO_MODNAME "PerlIO::encoding"
diff -ruN Encode-2.57.orig/Unicode/Unicode.xs Encode-2.57/Unicode/Unicode.xs
--- Encode-2.57.orig/Unicode/Unicode.xs 2014-01-03 04:52:42.000000000 +0000
+++ Encode-2.57/Unicode/Unicode.xs 2014-04-28 18:03:25.138595200 +0100
@@ -6,7 +6,6 @@
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
-#define U8 U8
#include "../Encode/encode.h"
#define FBCHAR 0xFFFd