diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-06-03 22:12:55 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-06-03 22:12:55 +0000 |
commit | 5a0924038aa1098308ad491a6148bc59d3045ce6 (patch) | |
tree | c3f9b914306db75e4a6afe152527af2459873e73 | |
parent | 621ba9941bc6ba1d0f5f939ab961988d2e3f2195 (diff) | |
download | perl-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
-rw-r--r-- | embedvar.h | 3 | ||||
-rw-r--r-- | globals.c | 2 | ||||
-rw-r--r-- | perlvars.h | 5 | ||||
-rw-r--r-- | win32/makedef.pl | 1 | ||||
-rw-r--r-- | win32/runperl.c | 12 |
5 files changed, 10 insertions, 13 deletions
diff --git a/embedvar.h b/embedvar.h index a74b4e41de..6cb5972ef7 100644 --- a/embedvar.h +++ b/embedvar.h @@ -782,7 +782,6 @@ #define do_undump (Perl_Vars.Gdo_undump) #define egid (Perl_Vars.Gegid) #define error_count (Perl_Vars.Gerror_count) -#define error_no (Perl_Vars.Gerror_no) #define euid (Perl_Vars.Geuid) #define eval_cond (Perl_Vars.Geval_cond) #define eval_mutex (Perl_Vars.Geval_mutex) @@ -902,7 +901,6 @@ #define Gdo_undump do_undump #define Gegid egid #define Gerror_count error_count -#define Gerror_no error_no #define Geuid euid #define Geval_cond eval_cond #define Geval_mutex eval_mutex @@ -1022,7 +1020,6 @@ #define do_undump Perl_do_undump #define egid Perl_egid #define error_count Perl_error_count -#define error_no Perl_error_no #define euid Perl_euid #define eval_cond Perl_eval_cond #define eval_mutex Perl_eval_mutex @@ -1438,7 +1438,7 @@ CPerlObj::operator new(size_t nSize, IPerlMem *pvtbl) int& CPerlObj::ErrorNo(void) { - return error_no; + return errno; } void diff --git a/perlvars.h b/perlvars.h index 9f801fb64d..954a99fb91 100644 --- a/perlvars.h +++ b/perlvars.h @@ -25,11 +25,6 @@ PERLVARI(Gthreadsv_names, char *, THREADSV_NAMES) PERLVAR(Gcurthr, struct perl_thread *) /* Currently executing (fake) thread */ #endif #endif /* USE_THREADS */ -#ifdef PERL_OBJECT -#ifdef WIN32 -PERLVAR(Gerror_no, int) /* errno for each interpreter */ -#endif -#endif PERLVAR(Guid, int) /* current real user id */ PERLVAR(Geuid, int) /* current effective user id */ diff --git a/win32/makedef.pl b/win32/makedef.pl index 1b45f7387c..237c950585 100644 --- a/win32/makedef.pl +++ b/win32/makedef.pl @@ -112,7 +112,6 @@ Perl_dump_packsubs Perl_dump_pm Perl_dump_sub Perl_expectterm -Perl_error_no Perl_extralen Perl_fetch_gv Perl_fetch_io 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) { |