summaryrefslogtreecommitdiff
path: root/os2
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-09-18 08:05:28 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-09-18 08:05:28 +0000
commitd79a646beae7a86020bf36abcfc0cb1db4f161bd (patch)
tree236d3191028d0f3f5bb1c5c154de9af0f7fd147e /os2
parentee1280c953682bb27ef889bc50cff06de7d58555 (diff)
downloadperl-d79a646beae7a86020bf36abcfc0cb1db4f161bd.tar.gz
Missed OS/2 patch hunk.
p4raw-id: //depot/perl@21271
Diffstat (limited to 'os2')
-rw-r--r--os2/os2.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/os2/os2.c b/os2/os2.c
index ddb5895a8f..d5c3e2ee25 100644
--- a/os2/os2.c
+++ b/os2/os2.c
@@ -619,6 +619,7 @@ static const struct {
{&pmwin_handle, NULL, 745}, /* WinFlashWindow */
{&pmwin_handle, NULL, 780}, /* WinLoadPointer */
{&pmwin_handle, NULL, 828}, /* WinQuerySysPointer */
+ {&doscalls_handle, NULL, 417}, /* DosReplaceModule */
};
HMODULE
@@ -1828,6 +1829,29 @@ XS(XS_File__Copy_syscopy)
XSRETURN(1);
}
+/* APIRET APIENTRY DosReplaceModule (PCSZ pszOld, PCSZ pszNew, PCSZ pszBackup); */
+
+DeclOSFuncByORD(ULONG,replaceModule,ORD_DosReplaceModule,
+ (char *old, char *new, char *backup), (old, new, backup))
+
+XS(XS_OS2_replaceModule); /* prototype to pass -Wmissing-prototypes */
+XS(XS_OS2_replaceModule)
+{
+ dXSARGS;
+ if (items < 1 || items > 3)
+ Perl_croak(aTHX_ "Usage: OS2::replaceModule(target [, source [, backup]])");
+ {
+ char * target = (char *)SvPV_nolen(ST(0));
+ char * source = (items < 2) ? Nullch : (char *)SvPV_nolen(ST(1));
+ char * backup = (items < 3) ? Nullch : (char *)SvPV_nolen(ST(2));
+
+ if (!replaceModule(target, source, backup))
+ croak_with_os2error("replaceModule() error");
+ }
+ XSRETURN_EMPTY;
+}
+
+
#define PERL_PATCHLEVEL_H_IMPLICIT /* Do not init local_patches. */
#include "patchlevel.h"
#undef PERL_PATCHLEVEL_H_IMPLICIT
@@ -3478,6 +3502,7 @@ Xs_OS2_init(pTHX)
newXS("Cwd::sys_is_relative", XS_Cwd_sys_is_relative, file);
newXS("Cwd::sys_cwd", XS_Cwd_sys_cwd, file);
newXS("Cwd::sys_abspath", XS_Cwd_sys_abspath, file);
+ newXS("OS2::replaceModule", XS_OS2_replaceModule, file);
newXSproto("OS2::_control87", XS_OS2__control87, file, "$$");
newXSproto("OS2::get_control87", XS_OS2_get_control87, file, "");
newXSproto("OS2::set_control87", XS_OS2_set_control87, file, ";$$");