summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorJan Dubois <jand@activestate.com>2006-12-11 05:09:09 -0800
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-12-12 10:20:04 +0000
commit5bd7e777abc05b6a5df0dcabdb989e2f8f19d138 (patch)
treefd755213d96caf10b2a6167fb368cb3138cc33b2 /win32
parentb4f6c04b44f75623f37bec8de1842dd241cf229c (diff)
downloadperl-5bd7e777abc05b6a5df0dcabdb989e2f8f19d138.tar.gz
get ext/Win32/Win32.xs to compile on cygwin
Date: Mon, 11 Dec 2006 13:09:09 -0800 Message-ID: <isfrn2tbfleo1svmmi5kh673f4uh69am11@4ax.com> and: Date: Mon, 11 Dec 2006 15:08:53 -0800 Message-ID: <kvorn2h0d14jo3khmmj2a9svsp2mplrodv@4ax.com> p4raw-id: //depot/perl@29528
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 620a1cffe3..c312c554f6 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -4268,6 +4268,31 @@ win32_dynaload(const char* filename)
return LoadLibraryExA(PerlDir_mapA(filename), NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
}
+XS(w32_SetChildShowWindow)
+{
+ dXSARGS;
+ BOOL use_showwindow = w32_use_showwindow;
+ /* use "unsigned short" because Perl has redefined "WORD" */
+ unsigned short showwindow = w32_showwindow;
+
+ if (items > 1)
+ Perl_croak(aTHX_ "usage: Win32::SetChildShowWindow($showwindow)");
+
+ if (items == 0 || !SvOK(ST(0)))
+ w32_use_showwindow = FALSE;
+ else {
+ w32_use_showwindow = TRUE;
+ w32_showwindow = (unsigned short)SvIV(ST(0));
+ }
+
+ EXTEND(SP, 1);
+ if (use_showwindow)
+ ST(0) = sv_2mortal(newSViv(showwindow));
+ else
+ ST(0) = &PL_sv_undef;
+ XSRETURN(1);
+}
+
static void
forward(pTHX_ const char *function)
{
@@ -4299,7 +4324,12 @@ FORWARD(GetFullPathName)
FORWARD(GetLongPathName)
FORWARD(CopyFile)
FORWARD(Sleep)
-FORWARD(SetChildShowWindow)
+
+/* Don't forward Win32::SetChildShowWindow(). It accesses the internal variable
+ * w32_showwindow in thread_intern and is therefore not implemented in Win32.xs.
+ */
+/* FORWARD(SetChildShowWindow) */
+
#undef FORWARD
void