summaryrefslogtreecommitdiff
path: root/os2
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>2003-09-16 16:49:42 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2003-09-17 06:02:19 +0000
commit4ab57fcbe55563102f75ccfb800b14bb33d79457 (patch)
tree1b0b93e1b3f287d901e8f5c90943de7415abf861 /os2
parentbe4925cb01e0e3f28046e3417d8e84ca65859589 (diff)
downloadperl-4ab57fcbe55563102f75ccfb800b14bb33d79457.tar.gz
OS/2 APIs again
Message-ID: <20030917064941.GA20444@math.berkeley.edu> p4raw-id: //depot/perl@21259
Diffstat (limited to 'os2')
-rw-r--r--os2/os2ish.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/os2/os2ish.h b/os2/os2ish.h
index 0da62aad27..7825c93148 100644
--- a/os2/os2ish.h
+++ b/os2/os2ish.h
@@ -530,7 +530,7 @@ void init_PMWIN_entries(void);
/* The expressions below return true on error. */
/* INCL_DOSERRORS needed. rc should be declared outside. */
-#define CheckOSError(expr) (!(rc = (expr)) ? 0 : (FillOSError(rc), 1))
+#define CheckOSError(expr) ((rc = (expr)) ? (FillOSError(rc), rc) : 0)
/* INCL_WINERRORS needed. */
#define CheckWinError(expr) ((expr) ? 0: (FillWinError, 1))
@@ -679,6 +679,7 @@ enum entries_ordinals {
ORD_WinFlashWindow,
ORD_WinLoadPointer,
ORD_WinQuerySysPointer,
+ ORD_DosReplaceModule,
ORD_NENTRIES
};
@@ -689,7 +690,11 @@ enum entries_ordinals {
#define DeclVoidFuncByORD(name,o,at,args) \
void name at { CallORD(void,o,at,args); }
-/* These functions return false on error, and save the error info in $^E */
+/* This function returns error code on error, and saves the error info in $^E and Perl_rc */
+#define DeclOSFuncByORD_native(ret,name,o,at,args) \
+ ret name at { unsigned long rc; return CheckOSError(CallORD(ret,o,at,args)); }
+
+/* These functions return false on error, and save the error info in $^E and Perl_rc */
#define DeclOSFuncByORD(ret,name,o,at,args) \
ret name at { unsigned long rc; return !CheckOSError(CallORD(ret,o,at,args)); }
#define DeclWinFuncByORD(ret,name,o,at,args) \