summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2003-05-11 15:37:14 +0000
committerGurusamy Sarathy <gsar@cpan.org>2003-05-11 15:37:14 +0000
commit23f519f064273e3cc195f02d4e0e49cf7c9329a8 (patch)
tree9ebc17e9a7bac8e64aff728140176a475a33a76b
parentd782915283e79abc8a89d4bd0d3f0ae9357b87bb (diff)
downloadperl-23f519f064273e3cc195f02d4e0e49cf7c9329a8.tar.gz
fix Embed.t failure on windows: PERL_SYS_TERM() is implemented
in terms of an exported function rather than as an inlined macro (latter wants PL_op_mutex which isn't exported as such) Jarkko: please merge into maint-5.8 p4raw-id: //depot/perl@19484
-rw-r--r--dosish.h5
-rw-r--r--makedef.pl1
-rw-r--r--win32/win32.c7
-rw-r--r--win32/win32.h1
4 files changed, 13 insertions, 1 deletions
diff --git a/dosish.h b/dosish.h
index b3d86e55a0..6828bafe06 100644
--- a/dosish.h
+++ b/dosish.h
@@ -30,6 +30,7 @@
#else /* DJGPP */
# ifdef WIN32
# define PERL_SYS_INIT(c,v) Perl_win32_init(c,v)
+# define PERL_SYS_TERM() Perl_win32_term()
# define BIT_BUCKET "nul"
# else
# ifdef NETWARE
@@ -42,7 +43,9 @@
# endif
#endif /* DJGPP */
-#define PERL_SYS_TERM() OP_REFCNT_TERM; MALLOC_TERM
+#ifndef PERL_SYS_TERM
+# define PERL_SYS_TERM() OP_REFCNT_TERM; MALLOC_TERM
+#endif
#define dXSUB_SYS
/*
diff --git a/makedef.pl b/makedef.pl
index d239d163de..74773fb329 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -1006,6 +1006,7 @@ if ($PLATFORM =~ /^win(?:32|ce)$/) {
Perl_init_os_extras
Perl_thread_create
Perl_win32_init
+ Perl_win32_term
RunPerl
win32_async_check
win32_errno
diff --git a/win32/win32.c b/win32/win32.c
index f3281f39ce..c40920332d 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -4884,6 +4884,13 @@ Perl_win32_init(int *argcp, char ***argvp)
}
void
+Perl_win32_term(void)
+{
+ OP_REFCNT_TERM;
+ MALLOC_TERM;
+}
+
+void
win32_get_child_IO(child_IO_table* ptbl)
{
ptbl->childStdIn = GetStdHandle(STD_INPUT_HANDLE);
diff --git a/win32/win32.h b/win32/win32.h
index 01b22f19ae..f4102c3c64 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -275,6 +275,7 @@ extern int mkstemp(const char *path);
#define init_os_extras Perl_init_os_extras
DllExport void Perl_win32_init(int *argcp, char ***argvp);
+DllExport void Perl_win32_term(void);
DllExport void Perl_init_os_extras(void);
DllExport void win32_str_os_error(void *sv, DWORD err);
DllExport int RunPerl(int argc, char **argv, char **env);