summaryrefslogtreecommitdiff
path: root/os2/os2ish.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-03-05 13:51:17 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-05 13:51:17 +0000
commit5ba48348b2bf48a04aedce7107ba7c0939e5b567 (patch)
tree0a1d2d59fe5bbf96045e3d9c028b104337f1d0ba /os2/os2ish.h
parent4194d4900628023d2d8e6a71f5036d1975be36d7 (diff)
downloadperl-5ba48348b2bf48a04aedce7107ba7c0939e5b567.tar.gz
Integrate change #9030 from maintperl into mainline.
Subject: [PATCH 5.6.1] OS/2 cleanup p4raw-link: @9030 on //depot/maint-5.6/perl: 2105755b4e61318e9489b9a118af8e270a8bc735 p4raw-id: //depot/perl@9031 p4raw-branched: from //depot/maint-5.6/perl@9029 'branch in' os2/os2add.sym p4raw-integrated: from //depot/maint-5.6/perl@9029 'copy in' os2/Changes os2/OS2/REXX/REXX.pm os2/OS2/REXX/t/rx_cmprt.t os2/os2.sym (@5902..) os2/Makefile.SHs (@8153..) os2/OS2/REXX/REXX.xs os2/os2ish.h (@8606..) 'merge in' lib/ExtUtils/MM_OS2.pm os2/OS2/REXX/Makefile.PL (@5902..) MANIFEST (@8986..) makedef.pl (@8987..) os2/os2.c (@9016..) lib/ExtUtils/MM_Unix.pm (@9028..)
Diffstat (limited to 'os2/os2ish.h')
-rw-r--r--os2/os2ish.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/os2/os2ish.h b/os2/os2ish.h
index dccd9320b6..30e67ca071 100644
--- a/os2/os2ish.h
+++ b/os2/os2ish.h
@@ -261,6 +261,8 @@ PerlIO *my_syspopen(pTHX_ char *cmd, char *mode);
int my_syspclose(PerlIO *f);
FILE *my_tmpfile (void);
char *my_tmpnam (char *);
+int my_mkdir (__const__ char *, long);
+int my_rmdir (__const__ char *);
#undef L_tmpnam
#define L_tmpnam MAXPATHLEN
@@ -283,6 +285,8 @@ char *my_tmpnam (char *);
#define my_getenv(var) getenv(var)
#define flock my_flock
+#define rmdir my_rmdir
+#define mkdir my_mkdir
void *emx_calloc (size_t, size_t);
void emx_free (void *);
@@ -394,6 +398,8 @@ struct PMWIN_entries_t {
unsigned long hwndFilter, unsigned long msgFilterFirst,
unsigned long msgFilterLast);
void * (*DispatchMsg)(unsigned long hab, struct _QMSG *pqmsg);
+ unsigned long (*GetLastError)(unsigned long hab);
+ unsigned long (*CancelShutdown)(unsigned long hmq, unsigned long fCancelAlways);
};
extern struct PMWIN_entries_t PMWIN_entries;
void init_PMWIN_entries(void);
@@ -418,9 +424,14 @@ void init_PMWIN_entries(void);
#define CheckWinError(expr) ((expr) ? 0: (FillWinError, 1))
#define FillOSError(rc) (os2_setsyserrno(rc), \
Perl_severity = SEVERITY_ERROR)
-#define FillWinError (Perl_severity = ERRORIDSEV(Perl_rc), \
- Perl_rc = ERRORIDERROR(Perl_rc)), \
- os2_setsyserrno(Perl_rc)
+
+/* At this moment init_PMWIN_entries() should be a nop (WinInitialize should
+ be called already, right?), so we do not risk stepping over our own error */
+#define FillWinError ( init_PMWIN_entries(), \
+ Perl_rc=(*PMWIN_entries.GetLastError)(perl_hab_GET()),\
+ Perl_severity = ERRORIDSEV(Perl_rc), \
+ Perl_rc = ERRORIDERROR(Perl_rc), \
+ os2_setsyserrno(Perl_rc))
#define STATIC_FILE_LENGTH 127