more Fix Windows build (of Encode) with VC++ 6.0
authorDavid Mitchell <davem@iabyn.com>
Tue, 29 Apr 2014 11:53:37 +0000 (12:53 +0100)
committerDavid Mitchell <davem@iabyn.com>
Tue, 29 Apr 2014 11:56:46 +0000 (12:56 +0100)
The previous commit (080a7046069084) broke g++ builds.
This commit, based on a suggestion by Jan, changes the test of whether
we're "in perl" from being the def'ness of U8 to being the def'ness of
H_Perl; and removes all the '#define U8 U8's that were formerly used to
signal this state.

13 files changed:
Porting/Maintainers.pl
cpan/Encode/Byte/Makefile.PL
cpan/Encode/CN/Makefile.PL
cpan/Encode/EBCDIC/Makefile.PL
cpan/Encode/Encode/Makefile_PL.e2x
cpan/Encode/Encode/encode.h
cpan/Encode/JP/Makefile.PL
cpan/Encode/KR/Makefile.PL
cpan/Encode/Symbol/Makefile.PL
cpan/Encode/TW/Makefile.PL
cpan/Encode/bin/enc2xs
cpan/Encode/encengine.c
t/porting/customized.dat

index 4fe35d5..4ae3baf 100755 (executable)
@@ -392,7 +392,23 @@ use File::Glob qw(:case);
         'FILES'        => q[cpan/Encode],
         'CUSTOMIZED'   => [
             # Waiting to be merged upstream: see CPAN RT#95130
-            qw(        Encode.pm Encode.xs Encode/encode.h Unicode/Unicode.xs ),
+            qw(
+                bin/enc2xs
+                Byte/Makefile.PL
+                CN/Makefile.PL
+                EBCDIC/Makefile.PL
+                encengine.c
+                Encode/encode.h
+                Encode/encode.h
+                Encode/Makefile_PL.e2x
+                Encode.pm
+                Encode.xs
+                JP/Makefile.PL
+                KR/Makefile.PL
+                Symbol/Makefile.PL
+                TW/Makefile.PL
+                Unicode/Unicode.xs
+            ),
         ],
     },
 
index e368ac8..4b2a2bf 100644 (file)
@@ -105,7 +105,6 @@ sub post_initialize
 #include <EXTERN.h>
 #include <perl.h>
 #include <XSUB.h>
-#define U8 U8
 #include "encode.h"
 END
     foreach my $table (sort keys %tables) {
index 323b47e..3fd595a 100644 (file)
@@ -81,7 +81,6 @@ sub post_initialize
 #include <EXTERN.h>
 #include <perl.h>
 #include <XSUB.h>
-#define U8 U8
 #include "encode.h"
 END
     foreach my $table (sort keys %tables) {
index 1c78c6a..77dff98 100644 (file)
@@ -62,7 +62,6 @@ sub post_initialize
 #include <EXTERN.h>
 #include <perl.h>
 #include <XSUB.h>
-#define U8 U8
 #include "encode.h"
 END
     foreach my $table (sort keys %tables) {
index 9fe60ef..53c2dd3 100644 (file)
@@ -98,7 +98,6 @@ sub post_initialize
 #include <EXTERN.h>
 #include <perl.h>
 #include <XSUB.h>
-#define U8 U8
 #include "encode.h"
 END
     foreach my $table (sort keys %tables) {
index af34ba2..5fbcf76 100644 (file)
@@ -1,11 +1,8 @@
 #ifndef ENCODE_H
 #define ENCODE_H
 
-#if !defined(U8) && !defined(U8TYPE)
-/* 
-   A tad devious this:
-   perl normally has a #define for U8 - if that isn't present then we
-   typedef it - leaving it #ifndef so we can do data parts without
+#ifndef H_PERL
+/* check whether we're "in perl" so that we can do data parts without
    getting extern references to the code parts
 */
 typedef unsigned char U8;
@@ -74,7 +71,7 @@ struct encode_s
     const char *const name[2];      /* name(s) of this encoding */
 };
 
-#ifdef U8
+#ifdef H_PERL
 /* See comment at top of file for deviousness */
 
 extern int do_encode(const encpage_t *enc, const U8 *src, STRLEN *slen,
@@ -83,7 +80,7 @@ extern int do_encode(const encpage_t *enc, const U8 *src, STRLEN *slen,
 
 extern void Encode_DefineEncoding(encode_t *enc);
 
-#endif /* U8 */
+#endif /* H_PERL */
 
 #define ENCODE_NOSPACE  1
 #define ENCODE_PARTIAL  2
index c6a725f..10c2bb6 100644 (file)
@@ -81,7 +81,6 @@ sub post_initialize
 #include <EXTERN.h>
 #include <perl.h>
 #include <XSUB.h>
-#define U8 U8
 #include "encode.h"
 END
     foreach my $table (sort keys %tables) {
index 49c0319..6934b8b 100644 (file)
@@ -79,7 +79,6 @@ sub post_initialize
 #include <EXTERN.h>
 #include <perl.h>
 #include <XSUB.h>
-#define U8 U8
 #include "encode.h"
 END
     foreach my $table (sort keys %tables) {
index 2c94aab..945136b 100644 (file)
@@ -67,7 +67,6 @@ sub post_initialize
 #include <EXTERN.h>
 #include <perl.h>
 #include <XSUB.h>
-#define U8 U8
 #include "encode.h"
 END
     foreach my $table (sort keys %tables) {
index f90861f..f2cbeea 100644 (file)
@@ -77,7 +77,6 @@ sub post_initialize
 #include <EXTERN.h>
 #include <perl.h>
 #include <XSUB.h>
-#define U8 U8
 #include "encode.h"
 END
     foreach my $table (sort keys %tables) {
index c5f788d..25ce6f0 100644 (file)
@@ -187,7 +187,6 @@ END
     print C "#include <EXTERN.h>\n";
     print C "#include <perl.h>\n";
     print C "#include <XSUB.h>\n";
-    print C "#define U8 U8\n";
    }
   print C "#include \"encode.h\"\n\n";
 
index efe198a..33f2a86 100644 (file)
@@ -88,7 +88,6 @@ we add a flag to re-add the removed byte to the source we could handle
 
 #include <EXTERN.h>
 #include <perl.h>
-#define U8 U8
 #include "encode.h"
 
 int
index 311b33f..c784106 100644 (file)
@@ -1,7 +1,17 @@
 Digest::MD5 cpan/Digest-MD5/t/files.t bdbe05b705d9da305fedce7a9f4b6ba63250c7cf
+Encode cpan/Encode/bin/enc2xs e8eb480be70267e0c2ac9df7f18a6e329c64e494
+Encode cpan/Encode/Byte/Makefile.PL dbceeb6ba7cb05df3d30412a4390d40ed8e4af5d
+Encode cpan/Encode/CN/Makefile.PL 3c28dcb8bbb0f0f16deec6e7f76e4701dadba364
+Encode cpan/Encode/EBCDIC/Makefile.PL de8ad9cfea819fcab809b90d97431dbdf0ec53cd
+Encode cpan/Encode/encengine.c 8e59c3e3a2bc9c866531f653c7377250495c27f4
 Encode cpan/Encode/Encode.pm cf239e1b3a79a564d01a9a011f7ebc80f4551a65
 Encode cpan/Encode/Encode.xs 4edcc474315eb3f38f53e24418bca7e7c2809cc8
-Encode cpan/Encode/Encode/encode.h e2565cefa0b9a0ff82801d7fa740a2df831932ca
+Encode cpan/Encode/Encode/encode.h 69a2a11529d868017b9d1fcfe00069621d7c0503
+Encode cpan/Encode/Encode/Makefile_PL.e2x 804949878b675562dddac59600d29232ddff7fe0
+Encode cpan/Encode/JP/Makefile.PL c5039f65c3b40c536f04beee9c8c47de888c65fa
+Encode cpan/Encode/KR/Makefile.PL 10d1ad37b196da1eaf49671fa5b65a744d232040
+Encode cpan/Encode/Symbol/Makefile.PL 7337ce85aa6bcc562d123ea184995dec7bc9f521
+Encode cpan/Encode/TW/Makefile.PL 686ea18ef9da743d961981a20ea19d391808d256
 Encode cpan/Encode/Unicode/Unicode.xs 27731231063734c063c661f3af4d95150f9d87ac
 Module::Build cpan/Module-Build/lib/Module/Build/ConfigData.pm 85eb9656e68d1f256737dc52d86b5d0fed28f832
 PerlIO::via::QuotedPrint cpan/PerlIO-via-QuotedPrint/t/QuotedPrint.t ca39f0146e89de02c746e199c45dcb3e5edad691