Skip to content

Commit

Permalink
more Fix Windows build (of Encode) with VC++ 6.0
Browse files Browse the repository at this point in the history
The previous commit (080a704) 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.
  • Loading branch information
iabyn committed Apr 29, 2014
1 parent d37662c commit 9e9002e
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 19 deletions.
18 changes: 17 additions & 1 deletion Porting/Maintainers.pl
Expand Up @@ -392,7 +392,23 @@ package Maintainers;
'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
),
],
},

Expand Down
1 change: 0 additions & 1 deletion cpan/Encode/Byte/Makefile.PL
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion cpan/Encode/CN/Makefile.PL
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion cpan/Encode/EBCDIC/Makefile.PL
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion cpan/Encode/Encode/Makefile_PL.e2x
Expand Up @@ -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) {
Expand Down
11 changes: 4 additions & 7 deletions cpan/Encode/Encode/encode.h
@@ -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;
Expand Down Expand Up @@ -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,
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion cpan/Encode/JP/Makefile.PL
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion cpan/Encode/KR/Makefile.PL
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion cpan/Encode/Symbol/Makefile.PL
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion cpan/Encode/TW/Makefile.PL
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion cpan/Encode/bin/enc2xs
Expand Up @@ -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";

Expand Down
1 change: 0 additions & 1 deletion cpan/Encode/encengine.c
Expand Up @@ -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
Expand Down
12 changes: 11 additions & 1 deletion t/porting/customized.dat
@@ -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
Expand Down

0 comments on commit 9e9002e

Please sign in to comment.