summaryrefslogtreecommitdiff
path: root/win32/runperl.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-06-03 22:12:55 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-06-03 22:12:55 +0000
commit5a0924038aa1098308ad491a6148bc59d3045ce6 (patch)
treec3f9b914306db75e4a6afe152527af2459873e73 /win32/runperl.c
parent621ba9941bc6ba1d0f5f939ab961988d2e3f2195 (diff)
downloadperl-5a0924038aa1098308ad491a6148bc59d3045ce6.tar.gz
[win32] add AS patch#24, remove one other instance of error_no
that was missed (patch#23 was intentionally skipped) p4raw-id: //depot/win32/perl@1071
Diffstat (limited to 'win32/runperl.c')
-rw-r--r--win32/runperl.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/win32/runperl.c b/win32/runperl.c
index 36461bdc9e..17d2ac2a57 100644
--- a/win32/runperl.c
+++ b/win32/runperl.c
@@ -23,6 +23,12 @@ CPerlObj *pPerl;
#include <ipproc.h>
#include <ipstdio.h>
+#define CALLFUNC0RET(x)\
+ int ret = x;\
+ if(ret < 0)\
+ err = errno;\
+ return ret;
+
extern int g_closedir(DIR *dirp);
extern DIR *g_opendir(char *filename);
extern struct direct *g_readdir(DIR *dirp);
@@ -35,15 +41,15 @@ public:
CPerlDir() {};
virtual int Makedir(const char *dirname, int mode, int &err)
{
- return win32_mkdir(dirname, mode);
+ CALLFUNC0RET(win32_mkdir(dirname, mode));
};
virtual int Chdir(const char *dirname, int &err)
{
- return win32_chdir(dirname);
+ CALLFUNC0RET(win32_chdir(dirname));
};
virtual int Rmdir(const char *dirname, int &err)
{
- return win32_rmdir(dirname);
+ CALLFUNC0RET(win32_rmdir(dirname));
};
virtual int Close(DIR *dirp, int &err)
{