summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>1997-12-01 04:01:57 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>1997-12-01 04:01:57 +0000
commit31fb120917c4f65d2069bd7d23b1876b523066fe (patch)
treeed319969aa1ff19d40a9be89a87a5129336cf174
parent22239a37ce131e4f5341aee571f08aced283e16a (diff)
downloadperl-31fb120917c4f65d2069bd7d23b1876b523066fe.tar.gz
Builds and passes all tests with gcc on Win32 - phew!
p4raw-id: //depot/ansiperl@342
-rw-r--r--embed.h2
-rw-r--r--ext/Opcode/Opcode.xs8
-rw-r--r--global.sym2
-rw-r--r--perl.h10
-rw-r--r--proto.h2
-rw-r--r--util.c14
-rw-r--r--win32/makedef.pl5
7 files changed, 34 insertions, 9 deletions
diff --git a/embed.h b/embed.h
index 38913b3d68..bd483e3b31 100644
--- a/embed.h
+++ b/embed.h
@@ -205,6 +205,8 @@
#define freq Perl_freq
#define ge_amg Perl_ge_amg
#define gen_constant_list Perl_gen_constant_list
+#define get_op_descs Perl_get_op_descs
+#define get_op_names Perl_get_op_names
#define gp_free Perl_gp_free
#define gp_ref Perl_gp_ref
#define gt_amg Perl_gt_amg
diff --git a/ext/Opcode/Opcode.xs b/ext/Opcode/Opcode.xs
index bed7099900..31e734a26c 100644
--- a/ext/Opcode/Opcode.xs
+++ b/ext/Opcode/Opcode.xs
@@ -28,15 +28,16 @@ op_names_init(void)
{
int i;
STRLEN len;
- char *opname;
+ char **op_names;
char *bitmap;
op_named_bits = newHV();
+ op_names = get_op_names();
for(i=0; i < maxo; ++i) {
SV *sv;
sv = newSViv(i);
SvREADONLY_on(sv);
- hv_store(op_named_bits, op_name[i], strlen(op_name[i]), sv, 0);
+ hv_store(op_named_bits, op_names[i], strlen(op_names[i]), sv, 0);
}
put_op_bitspec(":none",0, sv_2mortal(new_opset(Nullsv)));
@@ -290,7 +291,7 @@ opset_to_ops(opset, desc = 0)
STRLEN len;
int i, j, myopcode;
char *bitmap = SvPV(opset, len);
- char **names = (desc) ? op_desc : op_name;
+ char **names = (desc) ? get_op_descs() : get_op_names();
verify_opset(opset,1);
for (myopcode=0, i=0; i < opset_len; i++) {
U16 bits = bitmap[i];
@@ -375,6 +376,7 @@ opdesc(...)
int i, myopcode;
STRLEN len;
SV **args;
+ char **op_desc = get_op_descs();
/* copy args to a scratch area since we may push output values onto */
/* the stack faster than we read values off it if masks are used. */
args = (SV**)SvPVX(sv_2mortal(newSVpv((char*)&ST(0), items*sizeof(SV*))));
diff --git a/global.sym b/global.sym
index 4457a380ca..dfb2f3ad4d 100644
--- a/global.sym
+++ b/global.sym
@@ -35,6 +35,8 @@ find_threadsv
fold
fold_locale
freq
+get_op_descs
+get_op_names
ge_amg
gt_amg
hexdigit
diff --git a/perl.h b/perl.h
index 09d64af3e6..3d8e423f02 100644
--- a/perl.h
+++ b/perl.h
@@ -1394,11 +1394,11 @@ EXT short * ds;
EXT char * dc;
/* handy constants */
-EXTCONST char * Yes INIT("1");
-EXTCONST char * No INIT("");
-EXTCONST char * hexdigit INIT("0123456789abcdef0123456789ABCDEFx");
-EXTCONST char * patleave INIT("\\.^$@dDwWsSbB+*?|()-nrtfeaxc0123456789[{]}");
-EXTCONST char * vert INIT("|");
+#define Perl_Yes "1"
+#define Perl_No ""
+#define Perl_hexdigit "0123456789abcdef0123456789ABCDEFx"
+#define Perl_patleave "\\.^$@dDwWsSbB+*?|()-nrtfeaxc0123456789[{]}"
+#define Perl_vert "|"
EXTCONST char warn_uninit[]
INIT("Use of uninitialized value");
diff --git a/proto.h b/proto.h
index fa551b9b0d..a454a51f1e 100644
--- a/proto.h
+++ b/proto.h
@@ -72,6 +72,8 @@ void cx_dump _((PERL_CONTEXT* cs));
SV* filter_add _((filter_t funcp, SV* datasv));
void filter_del _((filter_t funcp));
I32 filter_read _((int idx, SV* buffer, int maxlen));
+char ** get_op_descs _((void));
+char ** get_op_names _((void));
I32 cxinc _((void));
void deb _((const char* pat,...)) __attribute__((format(printf,1,2)));
void deb_growlevel _((void));
diff --git a/util.c b/util.c
index 81035b9d4a..cb7a4f1424 100644
--- a/util.c
+++ b/util.c
@@ -2553,4 +2553,16 @@ Perl_GetVars(void)
{
return &Perl_Vars;
}
-#endif \ No newline at end of file
+#endif
+
+char **
+get_op_names(void)
+{
+ return op_name;
+}
+
+char **
+get_op_descs(void)
+{
+ return op_desc;
+}
diff --git a/win32/makedef.pl b/win32/makedef.pl
index 9b6cfe308d..1bda71e722 100644
--- a/win32/makedef.pl
+++ b/win32/makedef.pl
@@ -167,6 +167,11 @@ Perl_wait4pid
Perl_watch
Perl_yyname
Perl_yyrule
+Perl_Yes
+Perl_No
+Perl_hexdigit
+Perl_patleave
+Perl_vert
allgvs
curblock
curcsv