summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2018-07-08 12:44:27 -0500
committerCraig A. Berry <craigberry@mac.com>2018-07-08 14:49:42 -0500
commit71525f77826ad33944c007b06b68a1f14a085e7a (patch)
tree441515164ba824d74c386b7cf1fdbd5820a50d8a
parent2f2a2ed1c0bbba915d8fbb368503976317358592 (diff)
downloadperl-71525f77826ad33944c007b06b68a1f14a085e7a.tar.gz
Make new EBCDIC tables global.
They are defined in the Perl library but referenced in the Perl executable, but the Perl executable can't see them unless they are exported by the library, and some linkers only make a symbol a public export if they've been told to explicitly.
-rw-r--r--ebcdic_tables.h24
-rw-r--r--globvar.sym3
-rw-r--r--inline.h18
-rw-r--r--perl.h12
-rw-r--r--regen/ebcdic.pl6
5 files changed, 33 insertions, 30 deletions
diff --git a/ebcdic_tables.h b/ebcdic_tables.h
index 08c7dc6bdb..103e10ef90 100644
--- a/ebcdic_tables.h
+++ b/ebcdic_tables.h
@@ -293,9 +293,9 @@ SOFTWARE.
*/
# ifndef DOINIT
-# EXTCONST U8 perl_extended_utf8_dfa_tab[];
+# EXTCONST U8 PL_extended_utf8_dfa_tab[];
# else
-# EXTCONST U8 perl_extended_utf8_dfa_tab[] = {
+# EXTCONST U8 PL_extended_utf8_dfa_tab[] = {
/* _0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _A _B _C _D _E _F*/
/*0_ */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*1_ */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -334,9 +334,9 @@ SOFTWARE.
*/
# ifndef DOINIT
-# EXTCONST U16 strict_utf8_dfa_tab[];
+# EXTCONST U16 PL_strict_utf8_dfa_tab[];
# else
-# EXTCONST U16 strict_utf8_dfa_tab[] = {
+# EXTCONST U16 PL_strict_utf8_dfa_tab[] = {
/* _0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _A _B _C _D _E _F*/
/*0_ */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*1_ */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -380,9 +380,9 @@ SOFTWARE.
*/
# ifndef DOINIT
-# EXTCONST U8 C9_utf8_dfa_tab[];
+# EXTCONST U8 PL_c9_utf8_dfa_tab[];
# else
-# EXTCONST U8 C9_utf8_dfa_tab[] = {
+# EXTCONST U8 PL_c9_utf8_dfa_tab[] = {
/* _0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _A _B _C _D _E _F*/
/*0_ */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*1_ */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -670,9 +670,9 @@ SOFTWARE.
*/
# ifndef DOINIT
-# EXTCONST U8 perl_extended_utf8_dfa_tab[];
+# EXTCONST U8 PL_extended_utf8_dfa_tab[];
# else
-# EXTCONST U8 perl_extended_utf8_dfa_tab[] = {
+# EXTCONST U8 PL_extended_utf8_dfa_tab[] = {
/* _0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _A _B _C _D _E _F*/
/*0_ */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*1_ */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -711,9 +711,9 @@ SOFTWARE.
*/
# ifndef DOINIT
-# EXTCONST U16 strict_utf8_dfa_tab[];
+# EXTCONST U16 PL_strict_utf8_dfa_tab[];
# else
-# EXTCONST U16 strict_utf8_dfa_tab[] = {
+# EXTCONST U16 PL_strict_utf8_dfa_tab[] = {
/* _0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _A _B _C _D _E _F*/
/*0_ */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*1_ */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -757,9 +757,9 @@ SOFTWARE.
*/
# ifndef DOINIT
-# EXTCONST U8 C9_utf8_dfa_tab[];
+# EXTCONST U8 PL_c9_utf8_dfa_tab[];
# else
-# EXTCONST U8 C9_utf8_dfa_tab[] = {
+# EXTCONST U8 PL_c9_utf8_dfa_tab[] = {
/* _0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _A _B _C _D _E _F*/
/*0_ */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*1_ */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
diff --git a/globvar.sym b/globvar.sym
index a91d520306..6fb387ca0a 100644
--- a/globvar.sym
+++ b/globvar.sym
@@ -8,9 +8,11 @@ PL_Yes
PL_bincompat_options
PL_bitcount
PL_block_type
+PL_c9_utf8_dfa_tab
PL_charclass
PL_check
PL_core_reg_engine
+PL_extended_utf8_dfa_tab
PL_fold
PL_fold_latin1
PL_fold_locale
@@ -64,6 +66,7 @@ PL_sig_name
PL_sig_num
PL_simple
PL_simple_bitmask
+PL_strict_utf8_dfa_tab
PL_subversion
PL_utf8skip
PL_uuemap
diff --git a/inline.h b/inline.h
index 33cbde8451..eab3d2f64c 100644
--- a/inline.h
+++ b/inline.h
@@ -1045,7 +1045,7 @@ This uses an adaptation of the table and algorithm given in
http://bjoern.hoehrmann.de/utf-8/decoder/dfa/, which provides comprehensive
documentation of the original version. A copyright notice for the original
version is given at the beginning of this file. The Perl adapation is
-documented at the definition of perl_extended_utf8_dfa_tab[].
+documented at the definition of PL_extended_utf8_dfa_tab[].
*/
@@ -1064,9 +1064,9 @@ S_isUTF8_CHAR(const U8 * const s0, const U8 * const e)
* helper function for the other platforms. */
while (s < e && LIKELY(state != 1)) {
- state = perl_extended_utf8_dfa_tab[256
+ state = PL_extended_utf8_dfa_tab[256
+ state
- + perl_extended_utf8_dfa_tab[*s]];
+ + PL_extended_utf8_dfa_tab[*s]];
if (state != 0) {
s++;
continue;
@@ -1132,7 +1132,7 @@ S_isSTRICT_UTF8_CHAR(const U8 * const s0, const U8 * const e)
PERL_ARGS_ASSERT_ISSTRICT_UTF8_CHAR;
while (s < e && LIKELY(state != 1)) {
- state = strict_utf8_dfa_tab[256 + state + strict_utf8_dfa_tab[*s]];
+ state = PL_strict_utf8_dfa_tab[256 + state + PL_strict_utf8_dfa_tab[*s]];
if (state != 0) {
s++;
@@ -1185,7 +1185,7 @@ This uses an adaptation of the tables and algorithm given in
http://bjoern.hoehrmann.de/utf-8/decoder/dfa/, which provides comprehensive
documentation of the original version. A copyright notice for the original
version is given at the beginning of this file. The Perl adapation is
-documented at the definition of C9_utf8_dfa_tab[].
+documented at the definition of PL_c9_utf8_dfa_tab[].
*/
@@ -1198,7 +1198,7 @@ S_isC9_STRICT_UTF8_CHAR(const U8 * const s0, const U8 * const e)
PERL_ARGS_ASSERT_ISC9_STRICT_UTF8_CHAR;
while (s < e && LIKELY(state != 1)) {
- state = C9_utf8_dfa_tab[256 + state + C9_utf8_dfa_tab[*s]];
+ state = PL_c9_utf8_dfa_tab[256 + state + PL_c9_utf8_dfa_tab[*s]];
if (state != 0) {
s++;
@@ -1797,7 +1797,7 @@ S_utf8n_to_uvchr_msgs(const U8 *s,
* http://bjoern.hoehrmann.de/utf-8/decoder/dfa/, which provides
* comprehensive documentation of the original version. A copyright notice
* for the original version is given at the beginning of this file. The
- * Perl adapation is documented at the definition of strict_utf8_dfa_tab[].
+ * Perl adapation is documented at the definition of PL_strict_utf8_dfa_tab[].
*/
const U8 * const s0 = s;
@@ -1813,12 +1813,12 @@ S_utf8n_to_uvchr_msgs(const U8 *s,
* cases. */
while (s < send && LIKELY(state != 1)) {
- UV type = strict_utf8_dfa_tab[*s];
+ UV type = PL_strict_utf8_dfa_tab[*s];
uv = (state == 0)
? ((0xff >> type) & NATIVE_UTF8_TO_I8(*s))
: UTF8_ACCUMULATE(uv, *s);
- state = strict_utf8_dfa_tab[256 + state + type];
+ state = PL_strict_utf8_dfa_tab[256 + state + type];
if (state != 0) {
s++;
diff --git a/perl.h b/perl.h
index f49c0daa96..f4b146d22b 100644
--- a/perl.h
+++ b/perl.h
@@ -5518,7 +5518,7 @@ static U8 utf8d_C9[] = {
* FF 1
*/
-EXTCONST U8 perl_extended_utf8_dfa_tab[] = {
+EXTCONST U8 PL_extended_utf8_dfa_tab[] = {
/* The first part of the table maps bytes to character classes to reduce
* the size of the transition table and create bitmasks. */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*00-0F*/
@@ -5656,7 +5656,7 @@ EXTCONST U8 perl_extended_utf8_dfa_tab[] = {
* F5-FF 1
*/
-EXTCONST U8 strict_utf8_dfa_tab[] = {
+EXTCONST U8 PL_strict_utf8_dfa_tab[] = {
/* The first part of the table maps bytes to character classes to reduce
* the size of the transition table and create bitmasks. */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*00-0F*/
@@ -5771,7 +5771,7 @@ EXTCONST U8 strict_utf8_dfa_tab[] = {
* F5-FF 1
*/
-EXTCONST U8 C9_utf8_dfa_tab[] = {
+EXTCONST U8 PL_c9_utf8_dfa_tab[] = {
/* The first part of the table maps bytes to character classes to reduce
* the size of the transition table and create bitmasks. */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*00-0F*/
@@ -5844,9 +5844,9 @@ EXTCONST U8 C9_utf8_dfa_tab[] = {
# else /* End of is DOINIT */
-EXTCONST U8 perl_extended_utf8_dfa_tab[];
-EXTCONST U8 strict_utf8_dfa_tab[];
-EXTCONST U8 C9_utf8_dfa_tab[];
+EXTCONST U8 PL_extended_utf8_dfa_tab[];
+EXTCONST U8 PL_strict_utf8_dfa_tab[];
+EXTCONST U8 PL_c9_utf8_dfa_tab[];
# endif
#endif /* end of isn't EBCDIC */
diff --git a/regen/ebcdic.pl b/regen/ebcdic.pl
index ffc294d8d4..0e40b13204 100644
--- a/regen/ebcdic.pl
+++ b/regen/ebcdic.pl
@@ -504,7 +504,7 @@ END
1, 1, 1, 1, 1, 1, 1, 1, 1,$N4,$N4,$N4, 1, 1, 1, 1, # N8
1, 1, 1, 1, 1, 1, 1, 1,$N5,$N5,$N5,$N5, 1, 1, 1, 1, # N9
);
- output_table(\@perl_extended_utf8_dfa, "perl_extended_utf8_dfa_tab",
+ output_table(\@perl_extended_utf8_dfa, "PL_extended_utf8_dfa_tab",
$NUM_CLASSES);
}
@@ -663,7 +663,7 @@ END
1,1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, # N13
1,1, 1, 1, 1, 1, 1, 1, 1, 1, $N2, $N2, $N2, $N2, $N2, $N2, $N2, $N2, $N2, $N2, $N2, $N2,$N13, # N14
);
- output_table(\@strict_utf8_dfa, "strict_utf8_dfa_tab", $NUM_CLASSES);
+ output_table(\@strict_utf8_dfa, "PL_strict_utf8_dfa_tab", $NUM_CLASSES);
}
{
@@ -754,7 +754,7 @@ END
1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, $N3, $N3, $N3, # N6
1,1, 1, 1, 1, 1, 1, 1, 1,$N3, 1, 1, 1, 1, # N7
);
- output_table(\@C9_utf8_dfa, "C9_utf8_dfa_tab", $NUM_CLASSES);
+ output_table(\@C9_utf8_dfa, "PL_c9_utf8_dfa_tab", $NUM_CLASSES);
}
print $out_fh get_conditional_compile_line_end();